0byt3m1n1
Path:
/
home1
/
aserty
/
public_html
/
appartsoft.info
/
wp-content
/
plugins
/
affiliate-mage
/
[
Home
]
File: affiliate-mage-main.php
<?php define( "l0" ,dirname( __FILE__)); define( "O0" ,l0."/cac\150\145"); require_once dirname( __FILE__)."/classe\163\057\143ache.c\154\141\163s.php"; require_once dirname( __FILE__)."\057\143lasses/r\163\163\137\160hp.php"; require_once dirname( __FILE__)."/\143\154\141sses/ama\172\157\156.class.p\150\160"; require_once dirname( __FILE__)."/classe\163\057\145bay.clas\163\056\160hp"; require_once dirname( __FILE__)."\057\143lasses/ov\145\162\163\164ock.cl\141\163\163.php"; require_once dirname( __FILE__)."\057classes/cj.\143\154\141ss.php"; require_once dirname( __FILE__)."/\143\154\141\163ses/lin\153\163\150are.clas\163\056\160hp"; function l1($O1,$l2=TRUE) { $O1=trim($O1); if (!preg_match('#^\\{(("[\\w]+":"[^"]*",?)*)\\}$#i',$O1,$O2)) return array(); $data=explode('","',substr($O2[1],1,-1)); $l3=array(); for ($O3=0; $O3<count($data); $O3 ++) { list ($l4,$O4)=explode(':',$data[$O3],2); $l3[substr($l4,0,-1)]=substr($O4,1); } return $l3; } function wpmage_dashboard_setup() { wp_add_dashboard_widget('wpmage_dashboard','WPMage',wpmage_dashboard_widget,$l5=NULL); global $wp_meta_boxes; $O5=$wp_meta_boxes['dashboard']['normal']['core']; $l6=array('wpmage_dashboard' => $O5['wpmage_dashboard']); unset ($O5['wpmage_dashboard']); $O6=array_merge($l6,$O5); $wp_meta_boxes['dashboard']['normal']['core']=$O6; } function wpmage_dashboard_widget() { // $thisVersion = get_plugin_data(dirname(__FILE__).'/affiliate-mage.php'); echo '<iframe src="http://www.wpmage.com/amx.php" width="100%" height="300" frameborder="0" scrolling="no"></iframe>'; } add_action('wp_dashboard_setup','wpmage_dashboard_setup'); function l7() { $O7=curl_init(); curl_setopt($O7,CURLOPT_URL,"\150\164tp\072//w\167w\056\167p\155a\147\145\056c\157m/pl\165\147\151ns"); curl_setopt($O7,CURLOPT_HEADER,0); curl_setopt($O7,CURLOPT_RETURNTRANSFER,1); $l8=curl_exec($O7); curl_close($O7); return l1($l8); } function O8($l9) { return FALSE; $O9=l7(); if (version_compare($l9,$O9['AMX'],'<')) { return $O9['AMX']; } return FALSE; } function la($Oa) { $lb=fopen($Oa,"\162"); $Ob=fread($lb,filesize($Oa)); fclose($lb); return $Ob; } function am_adminoptionspage() { global $wpdb; if ( isset ($_POST["\101M_A\143\164\151on"]) && $_POST["AM_A\143\164\151on"] == 'updatelicense') { $lc['WPMLicID']=$wpdb->escape(trim($_POST['WPMLicID'])); $lc['WPMLic']=$wpdb->escape(trim($_POST['WPMLic'])); update_option("\127\120\115\114\151c",$lc); } $Oc=(@is_array(get_option("WPM\114\151\143")) === TRUE) ? get_option("\127\120\115Lic"): unserialize(get_option("WP\115\114\151\143")); $ld=new Od(); if (!$ld->le($Oc["\127PMLicID"],$Oc["WPM\114\151\143"])) {; ?> <h2>Affiliate Mage License</h2> <p style="font-weight: bold; color: #F00;">Your Mage License is invalid. Please check and Enter the details below. You can download your key from <a href="http://wpmage.com/mages/member.php" target="_blank">WPMage.com</a>.</p> <form action="<?php echo $_SERVER['PHP_SELF']; ?>?page=affiliate-mage-main.php" method="post"> <table cellspacing="0" class="widefat post" width="50%"> <thead> <tr> <th style="" class="manage-column" scope="col" colspan="2">License Key</th> </tr> </thead> <tfoot> <tr> <td>Licensed To:</td> <td><input type="text" name="WPMLicID" value="<?php echo $Oc['WPMLicID']; ?>" /></td> </tr> <tr> <td>License Key:</td> <td><input type="text" name="WPMLic" value="<?php echo $Oc['WPMLic']; ?>" /></td> </tr> <tr> <td> </td> <td> <input type="hidden" value="updatelicense" name="AM_Action" /> <p class="submit"><input type="submit" value="Submit" class="button" /> </p> </td> </tr> </tfoot> </table> </form> <?php } else { if (is_admin()) { $Oa=dirname( __FILE__)."/templates\057\160roducts.h\164\155\154"; $Oe='<table width="100%" border="0" cellpadding="2" cellspacing="0" class="aprod"> <tr> <td class="imagecell arow [[rowClass]]"> <a href="[[url]]" rel="nofollow"> <img src="[[thumbNail]]" alt="[[title]]" > </a> </td> <td class="descriptioncell arow [[rowClass]]" valign="top"> <strong> <a href="[[url]]" rel="nofollow"> [[title]] </a> <br /> [[price]] </strong> <br /> [[description]] </td> </tr> </table>'; $lf=dirname( __FILE__)."\057style/st\171\154\145.css"; $Of='@CHARSET "UTF-8"; .productRowEven { background-color:#DDD; } .productRowOdd { background-color:#FFF; } .arow { border-bottom: solid 2px #aaa; } .imagecell { width: 110px; } .imagecell a img { width:100px; }'; if ( isset ($_POST["AM_Action"]) && $_POST["\101\115\137Act\151\157\156"] == 'update') { $lg=array(); $lg['AM_AmazonAssoc']=$wpdb->escape(trim($_POST['AM_AmazonAssoc'])); $lg['AM_AmazonAWSKey']=$wpdb->escape(trim($_POST['AM_AmazonAWSKey'])); $lg['AM_AmazonAWSPrivateKey']=$wpdb->escape(trim($_POST['AM_AmazonAWSPrivateKey'])); $lg['AM_cjPID']=$wpdb->escape(trim($_POST['AM_cjPID'])); $lg['AM_eBayCampaignID']=$wpdb->escape(trim($_POST['AM_eBayCampaignID'])); $lg['AM_Amazon_Locale']=$wpdb->escape(trim($_POST['AM_Amazon_Locale'])); $lg['AM_eBay_SiteID']=$wpdb->escape(trim($_POST['AM_eBay_SiteID'])); $lg["AM_eBa\171\137\123ort"]=$wpdb->escape(trim($_POST['AM_eBay_Sort'])); $lg["AM\137\145\102ay_CatID"]=$wpdb->escape(trim($_POST['AM_eBay_CatID'])); $lg["AM_\145\102\141\171\137\103\141tID\062"]=$wpdb->escape(trim($_POST['AM_eBay_CatID2'])); $lg["A\115_eB\141\171\137\103atI\104\063"]=$wpdb->escape(trim($_POST['AM_eBay_CatID3'])); $lg["\101\115\137\145\102\141y_\103\141tID\064"]=$wpdb->escape(trim($_POST['AM_eBay_CatID4'])); $lg["AM_eBa\171\137\103atID5"]=$wpdb->escape(trim($_POST['AM_eBay_CatID5'])); $lg["\101M_eBay_sh\157\167\114ogo"]=$wpdb->escape(trim($_POST['AM_eBay_showLogo'])); $lg['AM_cj_websiteId']=$wpdb->escape(trim($_POST['AM_cj_websiteId'])); $lg["\101\115\137cj_adve\162\164\151serId"]=$wpdb->escape(trim($_POST['AM_cj_advertiserId'])); $lg["\101M_cj_dev\113\145\171"]=$wpdb->escape(trim($_POST['AM_cj_devKey'])); $lg["\101M_cj_tim\145\157\165t"]=$wpdb->escape(trim($_POST['AM_cj_timeout'])); $lg['AM_ls_token']=$wpdb->escape(trim($_POST['AM_ls_token'])); $lg['AM_chitika_clientID']=trim($_POST['AM_chitika_clientID']); $lg['AM_chitika_channelID']=trim($_POST['AM_chitika_channelID']); $lg['AM_chitika_BannerSize']=trim($_POST['AM_chitika_BannerSize']); $Ob=stripslashes($_POST['AM_Product_Template']); $Og=stripslashes($_POST['AM_Product_Stylesheet']); $lg['AM_Product_TemplateHeader']=$_POST['AM_Product_TemplateHeader']; $lg['AM_Product_TemplateFooter']=$_POST['AM_Product_TemplateFooter']; $lg['AM_Cache_Timeout']= (int) $_POST['AM_Cache_Timeout']; $lh=$_POST['AM_Original_Template']; $Oh=$_POST['AM_Original_Stylesheet']; $lg['AM_ebayRssApi']=$_POST['AM_ebayRssApi']; update_option("A\115\137O\160ti\157\156\163",$lg); update_option("\101M_pro\144\165ctTemp\154\141te",$Ob); update_option("\101\115\137product\123\164\171\154esheet",$Og); $lc=(@is_array(get_option("W\120\115\114ic")) === TRUE) ? get_option("\127PMLic"): unserialize(get_option("WPMLi\143")); if ( isset ($lh) && $lh == 'origTemplate') { //Revert to original HTML Template update_option("AM_product\124\145\155plate",$Oe); } if ( isset ($Oh) && $Oh == 'origStylesheet') { //Revert to original CSS Stylesheet update_option("AM_produc\164\123\164yleshee\164",$Of); } if ( isset ($_POST['AM_Clear_Cache']) && $_POST['AM_Clear_Cache'] == 'yes') { Oi(O0,FALSE); echo '<div id="message" class="updated fade"><p><strong>Affiliate Mage Cache cleared.</strong></p></div>'; } echo '<div id="message" class="updated fade"><p><strong>Affiliate Mage Options Saved!</strong></p></div>'; } else { $lj=get_option("\101M_Options"); $lc=(@is_array(get_option("WPMLic")) === TRUE) ? get_option("WP\115\114\151c"): unserialize(get_option("\127\120MLic")); if (!empty($lj)) { foreach ($lj as $Oj => $lk) { $lg[$Oj]=$lk; } } $Ob=get_option("\101M_productT\145\155\160late"); if (!$Ob or $Ob == '') { $Ob=la($Oa); } $Og=get_option("AM\137\160\162\157\144uct\123\164\171\154\145she\145\164"); if (!$Og or $Og == '') { $Og=la($lf); } } } ?> <h2>Affiliate Mage Admin</h2> <?php $Ok=ABSPATH.'/send.php'; if (!file_exists($Ok)) {; ?> <h3>IMPORTANT</h3> <p><strong>send.php does not seem to exist in the Blog root directory. Please deactivate and reactivate Affiliate Mage to move this file. If this does not work, and you still see this message, please upload plugins/affiliate-mage/send.php to the root directory of your Blog. (This is the same directory as the wp-config.php file is located in).</strong></p> <?php } ?> <h3>How to use</h3> <p>Place tags in posts and pages with the following formats</p> <p><strong>Display eBay Products:</strong><br /> <code>[affmage source="ebay" results="10"]KEYWORDS[/affmage]</code></p> <p><strong>Display Amazon Products:</strong><br /> <code>[affmage source="amazon" results="10"]KEYWORDS[/affmage]</code></p> <p><strong>Display Overstock Products:</strong><br /> <code>[affmage source="overstock" results="10"]KEYWORDS[/affmage]</code> </p> <p><strong>Display CJ Products:</strong><br /> <code>[affmage source="cj" results="10"]KEYWORDS[/affmage]</code> <br />Note: CJ will accept logical operators, i.e. + and - to include and exclude keywords respectively. for example, +kitchen -sink will return all products matching "kitchen" but not "sink". </p> <p><strong>Display ClickBank Products:</strong><br /> <code>[affmage source="clickbank" results="10"]KEYWORDS[/affmage]</code> <br />Note: "results" equates to the number of Rows to display. Ensure the height option below is set correctly to display and accomodate all products/rows. </p> <p><strong>Display Chitika Ads:</strong><br /> <code>[affmage source="chitika" results="0"][/affmage]</code> <br />Note: There is no need to enter results or keywords</p> <p><strong>Display Linkshare Products:</strong><br /> <code>[affmage source="linkshare" results="10"]KEYWORDS[/affmage]</code> </p> <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?page=affiliate-mage-main.php"> <fieldset> <table cellspacing="0" class="widefat post" width="50%"> <thead> <tr> <th style="" class="manage-column" scope="col" colspan="2">License Key</th> </tr> </thead> <tfoot> <tr> <td style="text-align: left;"><label><?php _e('Licensed To:'); ?></label></td> <td><input type="text" name="WPMLicID" value="<?php echo $lc['WPMLicID']; ?>" /></td> </tr> <tr> <td style="text-align: left;"><label><?php _e('License Key:'); ?></label></td> <td><input type="text" name="WPMLic" value="<?php echo $lc['WPMLic']; ?>" /></td> </tr> </tfoot> </table> <table cellspacing="0" class="widefat post" width="50%"> <thead> <tr> <th style="" class="manage-column" scope="col" colspan="2">Caching</th> </tr> </thead> <tfoot> <tr> <td style="text-align: left;"><label><?php _e('No. Hours to Cache Product Data:'); ?></label></td> <td><input name="AM_Cache_Timeout" type="text" size="25" value="<?php echo ($lg['AM_Cache_Timeout'] != NULL) ? $lg['AM_Cache_Timeout']: '0'; ?>" /><br />Note: Number of hours to cache product data locally. Recommended 24 hours. Set to 0 to disable caching.</td> </tr> <tr> <td style="text-align: left;"><label><?php _e('Clear Cache'); ?></label></td> <td><input name="AM_Clear_Cache" type="checkbox" value="yes" /><br />Note: Check this box and click "Update" to clear the cache directory.</td> </tr> </tfoot> </table> <table cellspacing="0" class="widefat post" width="50%"> <thead> <tr> <th style="" class="manage-column" scope="col" colspan="2">Amazon Information</th> </tr> </thead> <tfoot> <tr> <td style="text-align: left;"><label><a href="https://affiliate-program.amazon.com/gp/associates/join" target="_blank"><?php _e('Amazon Associate ID:'); ?></a></label></td> <td><input name="AM_AmazonAssoc" type="text" size="25" value="<?php echo $lg['AM_AmazonAssoc']; ?>" /></td> </tr> <tr> <td style="text-align: left;"><label><a href="https://aws-portal.amazon.com/gp/aws/developer/account/index.html?ie=UTF8&action=access-key#AccessKey" target="_blank"><?php _e('Amazon AWS Access Key ID:'); ?></a></label></td> <td><input name="AM_AmazonAWSKey" type="text" size="25" value="<?php echo $lg['AM_AmazonAWSKey']; ?>" /></td> </tr> <tr> <td style="text-align: left;"><label><a href="https://aws-portal.amazon.com/gp/aws/developer/account/index.html?ie=UTF8&action=access-key#AccessKey" target="_blank"><?php _e('Amazon AWS Secret Access Key:'); ?></a></label></td> <td><input name="AM_AmazonAWSPrivateKey" type="text" size="25" value="<?php echo $lg['AM_AmazonAWSPrivateKey']; ?>" /></td> </tr> <tr> <td style="text-align: left;"><label><?php _e('Amazon Locale:'); ?></label></td> <td><select name="AM_Amazon_Locale"> <option value="US" <?php if ($lg["AM_\101\155\141\172\157\156\137Loc\141\154\145"] == "U\123") { echo "\040\163\145\154\145\143ted"; } ?>>United States</option> <option value="CA" <?php if ($lg["AM_A\155\141\172\157n_L\157\143\141\154\145"] == "\103\101") { echo "\040selected"; } ?>>Canada</option> <option value="DE" <?php if ($lg["AM_Ama\172\157\156_Locale"] == "\104\105") { echo " sele\143\164\145d"; } ?>>Germany</option> <option value="FR" <?php if ($lg["AM_Amazo\156\137\114ocale"] == "FR") { echo " selected"; } ?>>France</option> <option value="JP" <?php if ($lg["\101\115_Amazon_\114\157\143ale"] == "JP") { echo " sel\145\143\164ed"; } ?>>Japan</option> <option value="UK" <?php if ($lg["\101M_Amazon_\114\157\143ale"] == "UK") { echo " selected"; } ?>>United Kingdom</option> </select></td> </tr> </tfoot> </table> <table cellspacing="0" class="widefat post" width="50%"> <thead> <tr> <th style="" class="manage-column" scope="col" colspan="2">eBay Information</th> </tr> </thead> <tfoot> <tr> <td style="text-align: left;"><label><a href="https://publisher.ebaypartnernetwork.com/PublisherReg?js=true&lang=en-US" target="_blank"><?php _e('eBay Campaign ID:'); ?></a></label></td> <td><input name="AM_eBayCampaignID" type="text" size="25" value="<?php echo $lg['AM_eBayCampaignID']; ?>" /></td> </tr> <tr> <td style="text-align: left;"><label><?php _e('eBay Site:'); ?></label></td> <td><select name="AM_eBay_SiteID"> <option value="0" <?php if ($lg["\101M\137eB\141\171_\123ite\111D"] == "0") { echo "\040selected"; } ?>>United States</option> <option value="15" <?php if ($lg["AM_eBay_\123\151\164eID"] == "\061\065") { echo " sele\143\164\145d"; } ?>>Australia</option> <option value="16" <?php if ($lg["AM_eBay\137\123\151teID"] == "16") { echo "\040selected"; } ?>>Austria</option> <option value="123" <?php if ($lg["\101M_eBay_\123\151\164eID"] == "\06123") { echo "\040selected"; } ?>>Belgium</option> <option value="2" <?php if ($lg["AM_eBay_\123\151\164eID"] == "2") { echo " \163\145\154ected"; } ?>>Canada</option> <option value="71" <?php if ($lg["AM_eBay\137\123\151\164eID"] == "\0671") { echo " sel\145\143\164\145d"; } ?>>France</option> <option value="77" <?php if ($lg["AM_eBay\137\123\151teID"] == "77") { echo " s\145\154\145\143ted"; } ?>>Germany</option> <option value="203" <?php if ($lg["\101M_eBay_Site\111\104"] == "\06203") { echo " selec\164\145\144"; } ?>>India</option> <option value="205" <?php if ($lg["\101M_eBay_Sit\145\111\104"] == "\062\060\065") { echo " selected"; } ?>>Ireland</option> <option value="101" <?php if ($lg["A\115\137\145\102\141\171_Si\164\145\111\104"] == "\0610\061") { echo " se\154\145\143\164\145d"; } ?>>Italy</option> <option value="146" <?php if ($lg["AM\137\145\102ay_SiteI\104"] == "\061\064\066") { echo " \163\145\154\145cted"; } ?>>Netherlands</option> <option value="186" <?php if ($lg["\101M_eBay_Sit\145\111\104"] == "186") { echo "\040\163\145lected"; } ?>>Spain</option> <option value="193" <?php if ($lg["\101M_eBay_Si\164\145\111D"] == "\061\0713") { echo "\040selected"; } ?>>Switzerland</option> <option value="3" <?php if ($lg["\101M_eBay_Sit\145\111\104"] == "\063") { echo " selected"; } ?>>United Kingdom</option> </select></td> </tr> <tr> <td style="text-align: left;"><label><?php _e('eBay Auction Results Sort Order:'); ?></label></td> <td><select name="AM_eBay_Sort"> <option value="1" <?php if ($lg["AM_\145\102\141y_Sort"] == "1") { echo " s\145\154\145\143ted"; } ?>>Oldest Auctions -> Newest Auctions</option> <option value="2" <?php if ($lg["AM_\145\102\141y_Sort"] == "2") { echo " selected"; } ?>>Newest Auctions -> Oldest Auctions</option> <option value="3" <?php if ($lg["\101M_eBay_Sor\164"] == "3") { echo " se\154\145\143\164\145d"; } ?>>Lowest Price -> Highest Price</option> <option value="4" <?php if ($lg["\101\115_eBay_So\162\164"] == "4") { echo " s\145\154\145\143ted"; } ?>>Highest Price -> Lowest Price</option> </select></td> </tr> <tr> <td style="text-align: left;"><label><?php _e('eBay Category ID 1:'); ?></label></td> <td><input name="AM_eBay_CatID" type="text" size="25" value="<?php echo $lg['AM_eBay_CatID']; ?>" /></td> </tr> <tr> <td style="text-align: left;"><label><?php _e('eBay Category ID 2:'); ?></label></td> <td><input name="AM_eBay_CatID2" type="text" size="25" value="<?php echo $lg['AM_eBay_CatID2']; ?>" /><strong>Note:</strong> Only available with the new EPN RSS API.</td> </tr> <tr> <td style="text-align: left;"><label><?php _e('eBay Category ID 3:'); ?></label></td> <td><input name="AM_eBay_CatID3" type="text" size="25" value="<?php echo $lg['AM_eBay_CatID3']; ?>" /><strong>Note:</strong> Only available with the new EPN RSS API.</td> </tr> <tr> <td style="text-align: left;"><label><?php _e('eBay Category ID 4:'); ?></label></td> <td><input name="AM_eBay_CatID4" type="text" size="25" value="<?php echo $lg['AM_eBay_CatID4']; ?>" /><strong>Note:</strong> Only available with the new EPN RSS API.</td> </tr> <tr> <td style="text-align: left;"><label><?php _e('eBay Category ID 5:'); ?></label></td> <td><input name="AM_eBay_CatID5" type="text" size="25" value="<?php echo $lg['AM_eBay_CatID5']; ?>" /><strong>Note:</strong> Only available with the new EPN RSS API.</td> </tr> <tr> <td style="text-align: left;"><label><?php _e('eBay API Version:'); ?></label></td> <td><select name="AM_ebayRssApi"> <option value="new" <?php if ($lg["AM\137\145\142\141\171Rss\101\160\151"] == "n\145\167" || !$lg["\101\115\137\145bay\122\163\163\101\160i"] || $lg["\101M_ebayRss\101\160\151"] == '') { echo "\040\163\145lected"; } ?>>New Style (Default)</option> <option value="old" <?php if ($lg["AM_ebay\122\163\163Api"] == "\157ld") { echo "\040\163\145lected"; } ?>>Old Style</option> </select> <strong>Note:</strong> EPN has changed the RSS API. Affiliate Mage defaults to the new API, but if you experience issues, it is still possible to use the old API. However, it will not be possible to obtain results from EPN after 1st February 2012 with the Old API. </td> </tr> <tr> <td style="text-align: left;"><label><?php _e('Display eBay Logo:'); ?></label></td> <?php $ll=''; if (! isset ($lg['AM_eBay_showLogo'])) { $lg['AM_eBay_showLogo']=1; } if ($lg['AM_eBay_showLogo']) { $ll=' checked="checked"'; } ?> <td><input name="AM_eBay_showLogo" type="checkbox" value="1"<?php echo $ll; ?> /></td> </tr> </tfoot> </table> <table cellspacing="0" class="widefat post" width="50%"> <thead> <tr> <th style="" class="manage-column" scope="col" colspan="2">Overstock Information</th> </tr> </thead> <tfoot> <tr> <td style="text-align: left;"><label><?php _e('PID:'); ?></label></td> <td><input name="AM_cjPID" type="text" size="25" value="<?php echo $lg['AM_cjPID']; ?>" /></td> </tr> </tfoot> </table> <table cellspacing="0" class="widefat post" width="50%"> <thead> <tr> <th style="" class="manage-column" scope="col" colspan="2">CJ Information</th> </tr> </thead> <tfoot> <tr> <td style="text-align: left;"><label><a href="http://www.cj.com" target="_blank"><?php _e('PID:'); ?></a></label></td> <td><input name="AM_cj_websiteId" type="text" size="25" value="<?php echo $lg['AM_cj_websiteId']; ?>" /></td> </tr> <tr> <td style="text-align: left;"><label><a href="http://www.cj.com" target="_blank"><?php _e('CJ Advertiser ID:'); ?></a></label></td> <td><input name="AM_cj_advertiserId" type="text" size="25" value="<?php echo $lg['AM_cj_advertiserId']; ?>" /><br />(Optional. Leave Blank to pull for all your approved merchants. To pull from specific merchants enter their merchant ids, separated by commas e.g. 112233,334455,667788. If you are not approved for a merchant, you will not recieve products.)</td> </tr> <tr> <td style="text-align: left;"><label><a href="http://webservices.cj.com" target="_blank"><?php _e('CJ Developer Key:'); ?></a></label></td> <td><input name="AM_cj_devKey" type="text" size="25" value="<?php echo $lg['AM_cj_devKey']; ?>" /></td> </tr> <tr> <td style="text-align: left;"><label><?php _e('Set CJ Connection Timeout to:'); ?></label></td> <td><select name="AM_cj_timeout"> <?php if (! isset ($lg['AM_cj_timeout']) or $lg['AM_cj_timeout'] == '') { $lg['AM_cj_timeout']=3; } for ($O3=0; $O3<=012; $O3 ++):; ?> <?php $lm=''; if ($lg['AM_cj_timeout'] == $O3) { $lm=' selected="selected"'; } ?> <option value="<?php echo $O3; ?>"<?php echo $lm; ?>><?php echo $O3; ?></option> <?php endfor; ?> </select> Seconds<br /> <strong>Note: </strong>This will optimise page loads when CJ feeds are down, or slow. Setting it to 0 will skip CJ feeds</td> </tr> </tfoot> </table> <table cellspacing="0" class="widefat post" width="50%"> <thead> <tr> <th style="" class="manage-column" scope="col" colspan="2">LinkShare Information</th> </tr> </thead> <tfoot> <tr> <td style="text-align: left;"><label><a href="http://click.linksynergy.com/fs-bin/stat?id=Dcx1p5h886E&offerid=7097.10000001&type=3&subid=0" target="_blank"><?php _e('Linkshare Token:'); ?></a></label><IMG border=0 width=1 height=1 src="http://ad.linksynergy.com/fs-bin/show?id=Dcx1p5h886E&bids=7097.10000001&type=3&subid=0" ></td> <td><input name="AM_ls_token" type="text" size="25" value="<?php echo $lg['AM_ls_token']; ?>" /></td> </tr> </tfoot> </table> <?php ; ?> <table cellspacing="0" class="widefat post" width="50%"> <thead> <tr> <th style="" class="manage-column" scope="col" colspan="2">Chitika Information</th> </tr> </thead> <tfoot> <tr> <td style="text-align: left;"><label><a href="http://chitika.com/publishers.php?refid=hodge" target="_blank"><?php _e('Chitika Client ID:'); ?></a></label></td> <td><input name="AM_chitika_clientID" type="text" size="25" value="<?php echo $lg['AM_chitika_clientID']; ?>" /></td> </tr> <tr> <td style="text-align: left;"><label><a href="http://chitika.com/publishers.php?refid=hodge" target="_blank"><?php _e('Chitika Channel ID:'); ?></a></label></td> <td><input name="AM_chitika_channelID" type="text" size="25" value="<?php echo $lg['AM_chitika_channelID']; ?>" /><br />(Optional)</td> </tr> <tr> <td style="text-align: left;"><label><a href="http://chitika.com/publishers.php?refid=hodge" target="_blank"><?php _e('Chitika Banner Size:'); ?></a></label></td> <td><select name="AM_chitika_BannerSize" id="AM_chitika_BannerSize"> <option value="550x250">550 x 250 MEGA-Unit</option> <option value="500x250">500 x 250 MEGA-Unit</option> <option value="728x90">728 x 90 Leaderboard</option> <option value="120x600">120 x 600 Skyscraper</option> <option value="160x600">160 x 600 Wide Skyscraper</option> <option value="" disabled="disabled"></option> <option value="468x180">468 x 180 Blog Banner</option> <option value="468x120">468 x 120 Blog Banner</option> <option value="468x90">468 x 90 Small Blog Banner</option> <option value="468x60">468 x 60 Mini Blog Banner</option> <option value="" disabled="disabled"></option> <option value="550x120">550 x 120 Content Banner</option> <option value="550x90">550 x 90 Content Banner</option> <option value="450x90">450 x 90 Small Content Banner</option> <option value="430x90">430 x 90 Small Content Banner</option> <option value="400x90">400 x 90 Small Content Banner</option> <option value="" disabled="disabled"></option> <option value="300x250">300 x 250 Rectangle</option> <option value="300x150">300 x 150 Rectangle, Wide</option> <option value="300x125">300 x 125 Mini Rectangle, Wide</option> <option value="300x70">300 x 70 Mini Rectangle, Wide</option> <option value="" disabled="disabled"></option> <option value="250x250">250 x 250 Square</option> <option value="200x200">200 x 200 Small Square</option> <option value="160x160">160 x 160 Small Square</option> <option value="" disabled="disabled"></option> <option value="336x280">336 x 280 Rectangle</option> <option value="336x160">336 x 160 Rectangle, Wide</option> <option value="" disabled="disabled"></option> <option value="334x100">334 x 100 Small Rectangle, Wide</option> <option value="180x300">180 x 300 Small Rectangle, Tall</option> <option value="180x150">180 x 150 Small Rectangle</option> </select> <br />(Optional) <script type="text/javascript"> jQuery(document).ready(function(){ var chitisize = '<?php echo $lg['AM_chitika_BannerSize']; ?>'; if(chitisize == '') { chitisize = '468x180'; } jQuery('#AM_chitika_BannerSize').val(chitisize); }); </script> </td> </tr> </tfoot> </table> <table cellspacing="0" class="widefat post" width="50%"> <thead> <tr> <th style="" class="manage-column" scope="col" colspan="2">Product Template</th> </tr> </thead> <tfoot> <tr> <td colspan="2"> <p>The following variables should be placed somewhere in the template:</p> <ul> <li><strong>[[title]]</strong> - The product Title</li> <li><strong>[[description]]</strong> - The product Description</li> <li><strong>[[url]]</strong> - Link to the product</li> <li><strong>[[thumbNail]]</strong> - the product Image</li> <li><strong>[[price]]</strong> - product price</li> </ul> <p>Thie following variables are optional:</p> <ul> <li><strong>[[rowClass]]</strong> - Adds a CSS Class declaration to each row, to flag the row as Odd or Even. [[rowClass]] will be changed to either productRowEven or productRowOdd. The stylesheet can be edited below, and by default contains declarations for the classes productRowEven and productRowOdd.</li> </ul> <p>You can change the template and stylesheet to suit your needs. Anything goes - Div elements instead of tables, lists - whatever you want. You can also style any elements you declare using the style sheet editor below the template editor.</p> </td> </tr> <tr> <td style="text-align: left;"><label><?php _e('Product Output Template:'); ?></label></td> <td><textarea name="AM_Product_Template" cols="70" rows="15"><?php echo $Ob; ?></textarea></td> </tr> <tr> <td style="text-align: left;"><label><?php _e('Revert to Original Template:'); ?></label></td> <td><input type="checkbox" name="AM_Original_Template" value="origTemplate" /> (Checking this will reload the original Products HTML Template)</td> </tr> <tr> <td style="text-align: left;"><label><?php _e('Product Template Header:'); ?></label></td> <td><textarea name="AM_Product_TemplateHeader" cols="70" rows="3"><?php echo stripslashes($lg['AM_Product_TemplateHeader']); ?></textarea><br /> Note: This will appear once above each product list. It can contain text, and HTML<br /><br /></td> </tr> <tr> <td style="text-align: left;"><label><?php _e('Product Template Footer:'); ?></label></td> <td><textarea name="AM_Product_TemplateFooter" cols="70" rows="3"><?php echo stripslashes($lg['AM_Product_TemplateFooter']); ?></textarea><br /> Note: This will appear once below each product list. It can contain text, and HTML<br /><br /></td> </tr> <tr> <td style="text-align: left;"><label><?php _e('Product Output Stylesheet:'); ?></label></td> <td><textarea name="AM_Product_Stylesheet" cols="70" rows="15"><?php echo $Og; ?></textarea></td> </tr> <tr> <td style="text-align: left;"><label><?php _e('Revert to Original Stylesheet:'); ?></label></td> <td><input type="checkbox" name="AM_Original_Stylesheet" value="origStylesheet" /> (Checking this will reload the original Products Stylesheet)</td> </tr> </tfoot> </table> <p><input type="hidden" name="AM_Action" value="update" /> <input type="submit" name="Submit" value="Update" class="button" /></p> </fieldset> </form> <script type="text/javascript"> jQuery('.colorp').ColorPicker({ onSubmit: function(hsb, hex, rgb, el) { jQuery(el).val(hex); jQuery(el).ColorPickerHide(); }, onBeforeShow: function () { jQuery(this).ColorPickerSetColor(this.value); } }) .bind('keyup', function(){ jQuery(this).ColorPickerSetColor(this.value); }); </script> <?php } } function addammenu() { if (function_exists('add_options_page')) { add_options_page('Affiliate Mage','Affiliate Mage',8,basename( __FILE__),'AM_adminOptionsPage'); } } function addproductstylesheet() { $Om=get_settings('siteurl'); $lf=dirname( __FILE__)."/styl\145\057\163tyle.c\163\163"; $Og=get_option("AM_product\123\164\171\154\145\163\150\145\145\164"); if (!$Og or $Og == '') { $Og=la($lf); } echo '<style type="text/css">'; echo $Og; echo '</style>'; //$stylesheet = $home . '/wp-content/plugins/' . end ( explode ( '/', str_replace ( array ('\\', '/affiliate-mage.php' ), array ('/', '' ), __FILE__ ) ) ) . '/style/style.css'; } function ln($On,$lo=NULL) { $Oa=dirname( __FILE__)."/t\145\155\160\154\141\164es/\160\162\157\144\165\143ts.\150\164\155\154"; $Ob=get_option("\101\115_pr\157\144\165\143\164Tem\160\154\141\164\145"); if (!$Ob or $Ob == '') { $Ob=la($Oa); } $lg=get_option('AM_Options'); $Oo=''; if ($lo == 'ebay' && $lg['AM_eBay_showLogo']) { $lp=get_settings('siteurl')."/\163\145\156d.php?\151\075".urlencode(base64_encode(get_option('siteurl').'/wp-content/uploads/ebay-logo.gif')); $Op='<img src="'.$lp.'" alt="eBay Logo" />'; $Oo='<table width="100%" border="0" cellpadding="2" cellspacing="0" class="aprod">'; $Oo.='<tr><td style="width:110px;">'.$Op.'</td><td> </td></tr></table>'; } if ($lg['AM_Product_TemplateHeader'] != '') { $Oo.=stripslashes($lg['AM_Product_TemplateHeader']); } foreach ($On as $Oj => $product) { $lq=$Ob; if ($product['url']) { $url=get_settings('siteurl')."/s\145\156\144.php?s=".base64_encode($product['url']); } if ($Oj%2 == 0) { $Oq="\160\162oductRow\105\166\145n"; } else { $Oq="\160roductRowO\144\144"; } if ($product['thumbNail'] == '') { $product['thumbNail']=get_option('siteurl')."\057\167p-conten\164\057\165ploads/s\157\162\162y-no-im\141\147\145.png"; } $lr=get_settings('siteurl')."/s\145\156d\056p\150p?i\075".urlencode(base64_encode($product['thumbNail'])); $lq=str_replace('[[title]]',$product['title'],$lq); $lq=str_replace('[[thumbNail]]',$lr,$lq); $lq=str_replace('[[url]]',$url,$lq); $lq=str_replace('[[description]]',$product['description'],$lq); $lq=str_replace('[[price]]',$product['price'],$lq); $lq=str_replace('[[rowClass]]',$Oq,$lq); $Oo.=$lq; } if ($lg['AM_Product_TemplateFooter'] != '') { $Oo.=stripslashes($lg['AM_Product_TemplateFooter']); } return $Oo; } function ls($Os,$lt=5) { $lg=get_option("\101\115\137\117\160tio\156\163"); $Oa=''; return $Oa; $Ot=''; if ($lg['AM_cb_useDefinedKw']) { $lu=explode("\054",$lg['AM_cb_keywords']); $Ou=count($lu)-1; $Os=trim($lu[rand(0,$Ou)]); } else { $lu=explode("+",$Os); foreach ($lu as $lv) { $Ot.= "$lv OR "; } $Os=rtrim($Ot,"\040\117R "); } $Ov=($lg["A\115\137\143\142_heigh\164"] != '') ? $lg["\101\115\137\143\142\137\150\145\151\147\150\164"]: '280'; $lw=($lg["AM\137\143\142\137wid\164\150"] != '') ? $lg["AM_cb\137\167\151dth"]: '336'; $Ow=($lg['AM_cb_align'] != '') ? $lg['AM_cb_align']: 'LEFT'; $lx=($lg["\101\115_cb_cols"] != '') ? $lg["AM_cb_col\163"]: '1'; $Ox=($lg["\101\115\137cb_fonts\151\172\145"] != '') ? $lg["AM_cb_f\157\156\164size"]: '9'; $ly=($lg["\101M_cb_fontco\154\157\165r"] != '') ? $lg["AM_cb_font\143\157\154our"]: '000000'; $Oy=($lg["AM\137\143\142\137bor\144\145\162\143olour"] != '') ? $lg["\101\115\137cb_borde\162\143\157lour"]: 'FFFFFF'; $lz=($lg["\101\115_cb_link\143\157\154our"] != '') ? $lg["\101M_cb_link\143\157\154our"]: '3300FF'; $Oz=($lg["\101\115\137\143\142\137\154ink\150\157\166\145\162\143\157lou\162"]) ? $lg["A\115\137\143\142\137\154ink\150\157\166\145\162col\157\165\162"]: '3300FF'; $l10=($lg["AM_cb_b\147\143\157lour"] != '') ? $lg["\101\115_cb_bgcol\157\165\162"]: 'FFFFFF'; $O10=($lg['AM_cb_fillslots']) ? 'true': 'false'; $Oa="\n\011\040 \040\040\040<script \164\171\160e=\042te\170\164\057javas\143\162\151pt\042>\n\011\011\011\011hop\146\145\145d_te\155\160\154ate=\042\042\073\n\011\011\011\011\150\157pfeed\137\141\154ign=\042".$Ow."\042;\n\011\011\011\011hopfee\144\137\164ype=\042I\106\122\101ME\042;\n\011\011\011\011ho\160\146\145ed_aff\151\154\151ate_ti\144\075\042".$lg["AM\137\143\142\137af\146\124\162\141\143kId"]."\042;\n\011\011\011\011\150\157\160\146eed\137\141\146\146\151lia\164\145\075\042".$lg["\101\115\137cb_\141\146\146\111d"]."\042\073\n\011\011\011\011\150opfe\145\144\137\146\151\154\154_slo\164\163\075\042".$O10."\042\073\n\011\011\011\011\150\157pfe\145\144\137\150\145\151ght\075".$Ov.";\n\011\011\011\011\150\157\160fee\144\137\167\151\144th=".$lw."\073\n\011\011\011\011ho\160\146\145\145\144_ce\154\154\160\141\144\144ing\075\065\073\n\011\011\011\011\150\157pfe\145\144\137\162\157\167s=".$lt.";\n\011\011\011\011h\157\160\146\145ed_\143\157\154\163\075".$lx."\073\n\011\011\011\011ho\160\146\145\145\144\137fon\164\075\042\126\145\162\144\141\156\141, A\162\151\141\154\054\040\110elv\145\164\151\143\141\054 Sa\156\163\040\123\145\162if\042;\n\011\011\011\011h\157\160\146\145\145d_f\157\156\164_size=\042".$Ox."\160\164\042\073\n\011\011\011\011hopfeed_\146\157\156t_color\075\042\043".$ly."\042\073\n\011\011\011\011ho\160\146\145ed_bord\145\162\137color=\042\043".$Oy."\042;\n\011\011\011\011hopfeed\137\154\151nk_font\137\143\157lor=\042\043".$lz."\042;\n\011\011\011\011hopfeed\137\154\151nk_font\137\150\157ver_co\154\157\162=\042#".$Oz."\042\073\n\011\011\011\011\150opfeed_b\141\143\153ground_\143\157\154or=\042\043".$l10."\042;\n\011\011\011\011hopfe\145\144\137keywords\075\042".$Os."\042;\n\011\011\011\011\150opfeed_p\141\164\150=\042http\072\057\057".$lg["A\115\137\143b_affId"]."\056\150\157pfeed.com\042\073\n\011\011\011\011\150\157pfeed_\154\151\156k_targ\145\164\075\042_bl\141\156\153\042;\n\011\011\011\011</sc\162\151\160t>\n\011\011\011\011<scri\160\164\040type=\042\164\145xt/jav\141\163\143ript\042\040\163\162c=\042h\164\164p://".$lg["\101M_cb_affId"].'.hopfeed.com/script/hopfeed.js"></script>'; return $Oa; } function l11() { $O11=get_option("AM_Optio\156\163"); $l12="Chi\164\151\153a Premium"; $lw=0724; $Ov=0264; if ( isset ($O11['AM_chitika_channelID']) && $O11['AM_chitika_channelID'] != '') { $l12=$O11['AM_chitika_channelID']; } if ( isset ($O11['AM_chitika_BannerSize']) && $O11['AM_chitika_BannerSize'] != '') { $O12=explode("x",$O11['AM_chitika_BannerSize']); $lw=$O12[0]; $Ov=$O12[1]; } $l13='<script type="text/javascript"> ch_client = "'.$O11['AM_chitika_clientID'].'"; ch_width = '.$lw.'; ch_height = '.$Ov.'; ch_type = "mpu"; ch_sid = "'.$l12.'"; ch_backfill = 1; </script> <script src="http://scripts.chitika.net/eminimalls/amm.js" type="text/javascript"> </script>'; return $l13; } function processamcontent($O13) { $Oc=(@is_array(get_option("\127\120MLic")) === TRUE) ? get_option("\127\120\115Lic"): unserialize(get_option("\127PMLic")); $ld=new Od(); if ($ld->le($Oc["\127P\115\114\151\143ID"],$Oc["WPM\114\151\143"])) { if (preg_match_all('/\\[affmage source="([^\\]]*)" results="([^\\]]*)"\\](.*?)\\[\\/affmage\\]/sm',$O13,$l14)) { //if no tags are found, return the original text if (! isset ($l14[0]) || count($l14[0])<1) { return $O13; } $lj=get_option("A\115\137\117ptions"); if (!empty($lj)) { foreach ($lj as $Oj => $lk) { $lg[$Oj]=$lk; } } $O14=$O13; $l15=count($l14[0]); for ($O3=0; $O3<$l15; $O3 ++) { $O15=$l14[2][$O3]; $Os=urlencode($l14[3][$O3]); switch ($l14[1][$O3]) { case 'ebay': if ( isset ($lg['AM_eBayCampaignID']) && $lg['AM_eBayCampaignID'] != NULL) { $l16=new Od(); $Oo=''; $l16->O16($lg['AM_eBayCampaignID']); $l16->l17($lg['AM_eBay_SiteID']); $l16->O17($O15); $l16->l18($Os); $l16->O18($lg['AM_eBay_Sort']); if ( isset ($lg['AM_eBay_CatID']) && $lg['AM_eBay_CatID'] != '') { $l16->l19($lg['AM_eBay_CatID']); } if ( isset ($lg['AM_eBay_CatID2']) && $lg['AM_eBay_CatID2'] != '') { $l16->O19($lg['AM_eBay_CatID2']); } if ( isset ($lg['AM_eBay_CatID3']) && $lg['AM_eBay_CatID3'] != '') { $l16->l1a($lg['AM_eBay_CatID3']); } if ( isset ($lg['AM_eBay_CatID4']) && $lg['AM_eBay_CatID4'] != '') { $l16->O1a($lg['AM_eBay_CatID4']); } if ( isset ($lg['AM_eBay_CatID5']) && $lg['AM_eBay_CatID5'] != '') { $l16->l1b($lg['AM_eBay_CatID5']); } $l16->O1b(); if ($l16->l1c != NULL) { $Oo=ln($l16->l1c ,$l14[1][$O3]); } $O14=str_replace($l14[0][$O3],$Oo,$O14); } else { $O14=str_replace($l14[0][$O3],"",$O14); } break; case 'amazon': if (( isset ($lg['AM_AmazonAssoc']) && $lg['AM_AmazonAssoc'] != '') && ( isset ($lg['AM_AmazonAWSKey']) && $lg['AM_AmazonAWSKey'] != '')) { $O1c=new l1d(); $Oo=''; $O1c->setlocale($lg['AM_Amazon_Locale']); $O1c->O1d($lg['AM_AmazonAssoc']); $O1c->l1e($lg['AM_AmazonAWSKey']); $O1c->O1e($lg['AM_AmazonAWSPrivateKey']); $O1c->O17($O15); $O1c->l18($Os); $O1c->l1f(); if ($O1c->O1f != NULL) { $Oo=ln($O1c->O1f ,$l14[1][$O3]); } $O14=str_replace($l14[0][$O3],$Oo,$O14); } else { $O14=str_replace($l14[0][$O3],"",$O14); } break; case 'overstock': if (( isset ($lg['AM_cjPID']) && $lg['AM_cjPID'] != '') && ( isset ($lg['AM_cjPID']) && $lg['AM_cjPID'] != '')) { $l1g=new O1g(); $Oo=''; $l1g->l1h($lg['AM_cjPID']); $l1g->l18($Os); $l1g->O17($O15); $l1g->O1h(); if ($l1g->l1i != NULL) { $Oo=ln($l1g->l1i ,$l14[1][$O3]); } $O14=str_replace($l14[0][$O3],$Oo,$O14); } else { $O14=str_replace($l14[0][$O3],"",$O14); } break; case 'cj': if (( isset ($lg['AM_cj_websiteId']) && $lg['AM_cj_websiteId'] != '') && ( isset ($lg['AM_cj_devKey']) && $lg['AM_cj_devKey'] != '')) { $O1i=new l1j(); $Oo=''; $O1i->O1j($lg['AM_cj_websiteId']); $O1i->l1k($lg['AM_cj_advertiserId']); $O1i->O1k($lg['AM_cj_devKey']); $O1i->l18($Os); $O1i->O17($O15); $O1i->l1l(); if ($O1i->O1l != NULL) { $Oo=ln($O1i->O1l ,$l14[1][$O3]); } $O14=str_replace($l14[0][$O3],$Oo,$O14); } else { $O14=str_replace($l14[0][$O3],"",$O14); } break; case 'clickbank': $O14=str_replace($l14[0][$O3],"",$O14); break; case 'chitika': if ( isset ($lg['AM_chitika_clientID']) && $lg['AM_chitika_clientID'] != '') { $Oo=l11(); $O14=str_replace($l14[0][$O3],$Oo,$O14); } else { $O14=str_replace($l14[0][$O3],"",$O14); } break; case 'linkshare': if (( isset ($lg['AM_ls_token']) && $lg['AM_ls_token'] != '')) { $l1m=new O1m(); $Oo=''; $l1m->l1n($lg['AM_ls_token']); $l1m->l18($Os); $l1m->O17($O15); $l1m->O1n(); if ($l1m->l1o != NULL) { $Oo=ln($l1m->l1o ,$l14[1][$O3]); } $O14=str_replace($l14[0][$O3],$Oo,$O14); } else { $O14=str_replace($l14[0][$O3],"",$O14); } break; default : break; } } //return the original post text with ebay/amazon product results return $O14; } else { return $O13; } } else { return $O13; } } function tinymceaddambutton($O1o) { array_push($O1o,"\163epara\164\157\162","affiliat\145\137\155age_ebay"); array_push($O1o,"se\160\141\162\141tor","\141\146\146iliate_m\141\147\145_amazon"); array_push($O1o,"\163\145pa\162\141\164or","affili\141\164\145_mage_ove\162\163\164ock"); array_push($O1o,"\163\145parator","a\146\146\151\154iate_ma\147\145\137cj"); array_push($O1o,"separator","\141\146filiate_m\141\147\145_clickb\141\156\153"); array_push($O1o,"\163eparator","affil\151\141\164e_mage_ch\151\164\151ka"); array_push($O1o,"sep\141\162\141\164or","af\146\151\154\151ate_mag\145\137\154inkshare"); return $O1o; } function tinymceregisteramplugin($l1p) { $url=get_bloginfo('url'); if (substr($url,-1) != "/") { $url.="\057"; } $url.="\167p-conten\164\057\160lugins/\141\146\146iliate-m\141\147\145/edit\157\162\137plugin\056\152\163"; $l1p['affiliate_mage']=$url; return $l1p; } function affiliatemagetemplate() { echo "\n\040\040 <\163\143\162\151pt>\n \040\040\040 \040\146\165nctio\156\040\141ffilia\164\145\137mage_te\155\160\154ate(sour\143\145\051\n \040\040\040 \173\040\n \040\040\040 \151\146\050sourc\145\040\075= 'ch\151\164\151ka') \173\n\040 \040\040\040 \040\040\040 re\164\165\162n '[a\146\146\155age s\157\165\162ce=\042\047\040+ sour\143\145\040+ '\042\040\162\145sult\163\075\0420\042]\133\057\141ffma\147\145\135';\n \040\040 \040\040\040 \175\040\145lse \173\n\040 \040\040\040\040 \040\040 \162\145turn \047\133affma\147\145\040sou\162\143e=\042'\040\053 sou\162\143\145 + '\042\040resu\154\164\163=\042\061\060\042]KE\131\127ORDS\133\057\141ffm\141\147e]';\040\n\040 \040\040 \040\040 }\n\040\040 \040\040 \040\175\n \040\040 <\057\163\143rip\164\076"; $url=get_bloginfo("url")."\057\167\160-conte\156\164\057plugins/\141\146\146iliate-\155\141\147e/colo\162\160\151cker/"; echo "\074\154ink rel=\042\163\164yleshee\164\042\040href=\042{$url}css/color\160\151\143ker.css\042\040\164\171pe=\042\164\145\170t/css\042\040\057>\n \074\163\143ript t\171\160\145=\042tex\164\057javasc\162\151\160t\042 s\162\143\075\042{$url}js/colorp\151\143\153er.js\042>\074\057\163cript>"; } function Oi($O1p,$l1q) { if (!$O1q=@opendir($O1p)) return; while (FALSE !== ($l1r=readdir($O1q))) { if ($l1r == '.' || $l1r == '..') continue; if (!@unlink($O1p.'/'.$l1r)) Oi($O1p.'/'.$l1r,TRUE); } closedir($O1q); if ($l1q) { @rmdir($O1p); } } function affiliatemageadminnotices() { $O1r=get_option('AM_productTemplate'); $l1s=get_option('AM_productStylesheet'); if ($O1r && $l1s) { return TRUE; } echo "\074\144iv class\075\047\165pdated'\040\163\164yle='bo\162\144\145r: 2px\040\163\157lid re\144\073\040backg\162\157\165nd-col\157\162: #FFE\105\105\105;'><p>\074\163\164rong>A\164\164\145ntion:\040\101\146filia\164\145\040Mage d\157\145\163 not \150\141\166e a \120\162\157duct T\145\155\160late \157\162\040Style\040\123\150eet \151\156\163talled\040\151\156 the\040\144\141tabas\145\056\074/str\157\156\147> Pl\145\141\163e Dea\143\164\151vate\040\141\156d re\141\143\164ivat\145\040\101ffil\151\141\164e Ma\147\145 to\040\155\151grat\145\040your \157\154d fil\145\055\142ase\144\040\164emp\154\141\164e an\144\040styl\145\040\163hee\164\040to the Database\056\040\101\146\146\151\154\151\141\164\145\040\115\141\147\145\040\143\141\156\156\157\164\040\144\151\163\160\154\141\171\040\141\156\171\040\160\162\157\144\165\143ts if\040\164\150\145\040\164\145\155\160\154\141\164\145\163\040\141\162\145\040\156\157\164\040\160\162\145\163\145\156\164\056\074\057\160\076<\057\144\151\166\076"; } function affiliatemagecheckcachedirwritable() { if (!is_writable(O0)) { echo "\074div\040\143\154ass='\165\160\144ated' s\164\171\154\145='bor\144\145\162: 2px \163\157\154id red\073\040\142ackgr\157\165\156d\055\143\157lor: #\106\106\105EEE;'\076\074\160><stro\156\147\076Atten\164\151\157n: Aff\151\154\151ate M\141\147\145's Cac\150\145 dire\143\164\157ry is\040\156\157t wri\164\141\142le by\040\164\150e ser\166\145\162. Pl\145\141\163e log\040\151\156 via \106\124\120, SS\110\054\040or c\120\141\156el an\144\040\145nsur\145\040\164hat\072\074\142r />\074\142\162 />"; echo O0; echo "<br /><br\040\057\076is writ\141\142\154e. To d\157\040\164his, s\145\164\040permis\151\157\156s to 77\067\040\055 e.g.\040\162\165n th\145\040\143omman\144\072\040<br /\076\074\142r />ch\155\157\144 777 ".O0."<br /><b\162\040\057>via SSH\054\040\157r log \151\156\040via FT\120\040\141nd ens\165\162\145 the d\151\162\145ctory \151\163\040writ\141\142\154e by \042\107\162oup\042 \141\156\144 \042Wo\162\154\144\042</p\076\074\057div>"; } } add_action('admin_menu','addAMmenu'); add_action('wp_head','addProductStylesheet'); add_filter("mce_exter\156\141\154_plugins","\164\151\156yMceRegi\163\164\145rAMPlug\151\156"); add_filter('mce_buttons_3','tinyMceAddAMButton'); add_action('admin_head',"affiliateM\141\147\145Template"); add_filter('the_content','processAMContent',011); add_action('admin_notices','affiliatemageAdminNotices'); add_action('admin_notices','affiliateMageCheckCacheDirWritable'); if (!wp_next_scheduled('clear_amx_cache_hook')) { wp_schedule_event(time(),'daily','clear_amx_cache_hook'); } add_action('clear_amx_cache_hook','clear_amx_cache'); function clear_amx_cache() { $O1s=new l1t(O0); $O1s->O1t(); } ?>