/* Decoded by unphp.net */ $plugin_azonpp = "GetAzon"; $short_name = "azonpp"; $categories = get_categories('type=post&hide_empty=0&orderby=name'); $wp_cats = array(); foreach ($categories as $category_list ) { $wp_cats[$category_list->cat_ID] = $category_list->cat_name; } array_unshift($wp_cats,"Choose one"); function azonpp_option($page_option) { global $wpdb; $page_option_id = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_name = '".$page_option."'"); return $page_option_id; } $status = array('publish','draft'); $strength = array('Full Description','500','1000','1500'); $bln = array( "January","February","March","April","May","June","July","August","September","October","November","December"); $country = array( 'com'=>'amazon.com','de'=>'amazon.de','co.uk'=>'amazon.co.uk','ca'=>'amazon.ca','fr'=>'amazon.fr','co.jp'=>'amazon.co.jp','it'=>'amazon.it','cn'=>'amazon.cn','es'=>'amazon.es'); $option_azonpp = array ( array( "name"=>$plugin_azonpp." Options", "type"=>"title"), array( "type"=>"header"), array( "name"=>"General Setting", "type"=>"above"), array( "name"=>"Associate tag", "desc"=>"Insert your affiliate code.", "id"=>$short_name."_affiliate", "std"=>"carcen-20", "type"=>"text"), array( "name"=>"API Key", "desc"=>"Your API Key.", "id"=>$short_name."_apikey", "type"=>"text"), array( "name"=>"Secret API Key", "desc"=>"Your secret api key.", "id"=>$short_name."_secretkey", "type"=>"text"), array( "name"=>"Amazon Country", "desc"=>"Select country language.", "id"=>$short_name."_country", "options"=>$country, "std"=>"disable all", "type"=>"select"), array( "name"=>"Custom Template", "desc"=>" [title]
[imagesmall]
[imagelarge]
[imagemedium]
[rating]
[ratingimage]
[asin]
[price]
[listprice]
[lowprice]
[link]
[linkreviews]
[reviewsiframe]
[feature]
[description]
", "std"=>"

[title]


Asin : [asin]
Price : [price]
ListPrice : [listprice]
Feature :
[feature] Description :
[description]", "id"=>$short_name."_template", "type"=>"textarea"), array( "type"=>"close"), array( "type"=>"open"), array( "type"=>"credit") ); $option_addpost = array ( array( "name"=>$plugin_azonpp." Options", "type"=>"title"), array( "type"=>"header"), array( "name"=>"Poster Setting", "type"=>"above"), array( "name"=>"ASIN", "desc"=>"Enter your ASIN code lists below, one on each line.", "id"=>$short_name."_asin", "type"=>"textarea"), array( "name"=>"Time Post", "desc"=>"Hours : Menites.", "id"=>$short_name."_timeh", "type"=>"texth"), array( "id"=>$short_name."_timem", "type"=>"textm"), array( "name"=>"Date Posting", "desc"=>"Date posting on.", "id"=>$short_name."_day", "options"=>$day, "type"=>"selectday"), array( "id"=>$short_name."_month", "options"=>$bln, "type"=>"selectmonth"), array( "id"=>$short_name."_year", "options"=>$years, "type"=>"selectyear"), array( "name"=>"Status Post", "desc"=>"Status post.", "id"=>$short_name."_status", "options"=>$status, "std"=>"publish", "type"=>"select"), array( "name"=>"Length Description", "desc"=>"Length description.", "id"=>$short_name."_lenght", "options"=>$strength, "type"=>"select"), array( "name"=>"Interval Post", "desc"=>"Interval post every minute.", "id"=>$short_name."_interval", "type"=>"text"), array( "name"=>"Category Post", "desc"=>"Choose your category.", "std"=>array($post_category), "id"=>$short_name."_category", "type"=>"selectsatu"), array( "type"=>"close"), array( "type"=>"open"), array( "type"=>"credit") ); add_action('admin_menu','saad_azon_admin_menu'); function saad_azon_admin_menu() { global $plugin_azonpp,$short_name,$option_azonpp,$option_addpost; if ( $_GET['page'] == 'azon-page') { if ( 'save'== $_REQUEST['action'] ) { foreach ($option_azonpp as $value) { update_option( $value['id'],$_REQUEST[$value['id'] ] );} foreach ($option_azonpp as $value) { if( isset( $_REQUEST[$value['id'] ] ) ) {update_option( $value['id'],$_REQUEST[$value['id'] ] );}else {delete_option( $value['id'] );}} header("Location: admin.php?page=azon-page&saved=true"); die; } else if( 'reset'== $_REQUEST['action'] ) { foreach ($option_azonpp as $value) { delete_option( $value['id'] );} header("Location: admin.php?page=azon-page&reset=true"); die; } } if ( $_GET['page'] == 'add-page') { if ( 'save'== $_REQUEST['action'] ) { foreach ($option_addpost as $value) { update_option( $value['id'],$_REQUEST[$value['id'] ] );} foreach ($option_addpost as $value) { if( isset( $_REQUEST[$value['id'] ] ) ) {update_option( $value['id'],$_REQUEST[$value['id'] ] );}else {delete_option( $value['id'] );}} header("Location: admin.php?page=add-page&saved=true"); die; } else if( 'reset'== $_REQUEST['action'] ) { foreach ($option_addpost as $value) { delete_option( $value['id'] );} header("Location: admin.php?page=add-page&reset=true"); die; } } add_menu_page( 'index.php',$plugin_azonpp,'manage_options','azon-page','saad_azon_page',WP_PLUGIN_URL."/GetAzon/check.png"); add_submenu_page( 'azon-page','Home Settings','Home Settings','manage_options','azon-page','saad_azon_page'); add_submenu_page( 'azon-page','Add to Post','Add to Post','manage_options','add-page','saad_azon_add'); } add_action('admin_init','plugin_azonpp_init'); function plugin_azonpp_init() { $files_dir=get_bloginfo('siteurl'); wp_enqueue_style("azonpp",$files_dir."/wp-content/plugins/GetAzon/style.css",false,"1.0","all"); } function saad_azon_page() { if (!current_user_can('manage_options')) { wp_die( __('You do not have sufficient permissions to access this page.')); } global $plugin_azonpp,$short_name,$option_azonpp; $i=0; if ( $_REQUEST['saved'] ) echo '

'.$plugin_azonpp.' Options Updated.

'; if ( $_REQUEST['reset'] ) echo '

'.$plugin_azonpp.' Options Updated.

'; ;echo '

Azon Poster Settings

';foreach ($option_azonpp as $value) { switch ( $value['type'] ) { case "open": ;echo ' ';break; case "close": ;echo '
';break; case 'text': ;echo '

';echo $value['desc'];;echo '
'; break; case 'textarea': ;echo '

';echo $value['desc'];;echo '
'; break; case 'select': ;echo '

';echo $value['desc'];;echo '
'; break; case 'selectsatu': ;echo '

';echo $value['desc'];;echo '
'; ;echo '
'; break; case "credit": ;echo '
';echo $value['desc'];;echo '
'; break; case "bottom": ;echo '
';break; case "above": $i++; ;echo '

';echo $value['name'];;echo '

';break; } } ;echo '
';} function saad_azon_add() { if (!current_user_can('manage_options')) { wp_die( __('You do not have sufficient permissions to access this page.')); } global $plugin_azonpp,$short_name,$option_addpost; $i=0; if ( $_REQUEST['saved'] ) echo '

'.$plugin_azonpp.' Options Updated.

'; if ( $_REQUEST['reset'] ) echo '

'.$plugin_azonpp.' Options Updated.

';;echo ' '; include ('post_data.php'); } ;