0byt3m1n1
Path:
/
home1
/
aserty
/
public_html
/
bonniescraftygifts.com
/
iFzj4
/
configCHM
/
Jump
/
0-aserty
/
appartsoft.com
/
wp-content
/
plugins
/
content revenge
/
[
Home
]
File: contentRevenge_admin.php
<?php global $wpdb; // When content revenge form is posted. if(isset($_POST['ContentRevenge_hidden']) == TRUE && $_POST['ContentRevenge_hidden'] == 'Y') { // Yahoo and OAuth fields $content_revenge_options['oauth_key'] = trim($_POST['ContentRevenge_key']); $content_revenge_options['oauth_secret'] = trim($_POST['ContentRevenge_secret']); $content_revenge_options['terms_api'] = trim($_POST['ContentRevenge_termsAPI']); // Category field $content_revenge_options['post_cat'] = trim($_POST['ContentRevenge_postCat']); // Keywords field $content_revenge_options['keywords'] = trim($_POST['ContentRevenge_keywords']); $stripChrs = array('`','~','!','@','#','$','%','^','&','*','(',')','+','=','{','}','[',']',':',';','"','’','\'','\\','|',',','.','?'); $content_revenge_options['keywords'] = str_replace($stripChrs, '', $content_revenge_options['keywords']); //$content_revenge_options['keywords'] = str_replace('<br />', '', $content_revenge_options['keywords']); // Negative keywords field $content_revenge_options['negative_keywords'] = trim($_POST['ContentRevenge_negative_keywords']); $content_revenge_options['negative_keywords'] = str_replace($stripChrs, '', $content_revenge_options['negative_keywords']); // Number of posts field $content_revenge_options['count_from'] = trim($_POST['ContentRevenge_countFrom']); $content_revenge_options['count_to'] = trim($_POST['ContentRevenge_countTo']); // Date fields $content_revenge_options['start_y'] = trim($_POST['ContentRevenge_startY']); $content_revenge_options['start_m'] = trim($_POST['ContentRevenge_startM']); $content_revenge_options['start_d'] = trim($_POST['ContentRevenge_startD']); // Prepend content field $content_revenge_options['prepend'] = trim($_POST['ContentRevenge_prepend']); $content_revenge_options['prepend'] = str_replace('\"', '"', $content_revenge_options['prepend']); // Number of posts per day field $content_revenge_options['ag_posts_from'] = isset($_POST['ContentRevenge_ag_posts_from']) == TRUE ? trim($_POST['ContentRevenge_ag_posts_from']) : ''; $content_revenge_options['ag_posts_to'] = isset($_POST['ContentRevenge_ag_posts_to']) == TRUE ? trim($_POST['ContentRevenge_ag_posts_to']) : ''; // Show document icons field $content_revenge_options['doc_icons'] = isset($_POST['ContentRevenge_docIcons']) == TRUE ? trim($_POST['ContentRevenge_docIcons']) : ''; // Adult content field $content_revenge_options['adult'] = isset($_POST['ContentRevenge_adult']) == TRUE ? trim($_POST['ContentRevenge_adult']) : ''; // Images field $content_revenge_options['images'] = isset($_POST['ContentRevenge_images']) == TRUE ? trim($_POST['ContentRevenge_images']) : ''; // Wikipedia field $content_revenge_options['wikipedia_results'] = isset($_POST['ContentRevenge_wikipedia_results']) == TRUE ? trim($_POST['ContentRevenge_wikipedia_results']) : ''; // About field $content_revenge_options['about_results'] = isset($_POST['ContentRevenge_about_results']) == TRUE ? trim($_POST['ContentRevenge_about_results']) : ''; // YouTube field $content_revenge_options['youtube_results'] = isset($_POST['ContentRevenge_youtube_results']) == TRUE ? trim($_POST['ContentRevenge_youtube_results']) : ''; // News field $content_revenge_options['news_results'] = isset($_POST['ContentRevenge_news_results']) == TRUE ? trim($_POST['ContentRevenge_news_results']) : ''; // NOT USED //$content_revenge_options['php_bay'] = trim($_POST['ContentRevenge_phpBay']); //$content_revenge_options['php_bay_cat'] = trim($_POST['ContentRevenge_phpBayCat']); // Generate field $content_revenge_options['generate'] = isset($_POST['ContentRevenge_generate']) == TRUE ? trim($_POST['ContentRevenge_generate']) : ''; // Update option in table update_option('ContentRevenge', $content_revenge_options); // GENERATE POSTS if ($content_revenge_options['generate'] == 'on') { bossContent_Generate(); } else { // OUTPUT MESSAGE AT TOP OF ADMIN PANEL WHEN SAVED ?> <div class="updated"><p><strong><?php _e('Options Saved', 'ContentRevenge_trdom'); ?></strong></p></div> <?php } } // This code runs when the page is loaded else { // Set the default values for fields. $content_revenge_options['oauth_key'] = ''; $content_revenge_options['oauth_secret'] = ''; $content_revenge_options['terms_api'] = ''; $content_revenge_options['post_cat'] = ''; $content_revenge_options['keywords'] = ''; $content_revenge_options['negative_keywords'] = ''; $content_revenge_options['count_from'] = '1'; $content_revenge_options['count_to'] = '4'; $content_revenge_options['start_y'] = ''; $content_revenge_options['start_m'] = ''; $content_revenge_options['start_d'] = ''; $content_revenge_options['prepend'] = ''; $content_revenge_options['ag_posts_from'] = '2'; $content_revenge_options['ag_posts_to'] = '4'; $content_revenge_options['doc_icons'] = ''; $content_revenge_options['adult'] = ''; $content_revenge_options['images'] = ''; $content_revenge_options['wikipedia_results'] = ''; $content_revenge_options['about_results'] = ''; $content_revenge_options['youtube_results'] = ''; $content_revenge_options['news_results'] = ''; $content_revenge_options['php_bay'] = ''; $content_revenge_options['php_bay_cat'] = ''; $content_revenge_options['generate'] = ''; // Load options from options table and unserialize them. if (is_array(get_option('ContentRevenge')) === TRUE && count(get_option('ContentRevenge')) > 1) { $content_revenge_options = get_option('ContentRevenge'); } } ?> <div class="wrap"> <h2><?php _e('Content Revenge v2.06 Admin', 'ContentRevenge_trdom'); ?></h2> <script type="text/javascript" src="http://www.contentrevenge.com/banners/720x90.js"></script> <form name="ContentRevenge_form" method="post" action="<?php echo admin_url(); ?>options-general.php?page=Content_Revenge" onsubmit="return countToOptions();"> <input type="hidden" name="ContentRevenge_hidden" value="Y" /> <h3><?php _e('Post Generation Settings', 'ContentRevenge_trdom'); ?></h3> <table cellspacing="15"> <tbody> <tr> <td valign="top"> <?php _e('OAuth Consumer Key: ', 'ContentRevenge_trdom'); ?> </td> <td valign="top"> <input type="text" name="ContentRevenge_key" id="ContentRevenge_key" value="<?php echo esc_html($content_revenge_options['oauth_key']); ?>" size="90" /> </td> </tr> <tr> <td valign="top"> <?php _e('OAuth Consumer Secret: ', 'ContentRevenge_trdom'); ?> </td> <td valign="top"> <input type="text" name="ContentRevenge_secret" id="ContentRevenge_secret" value="<?php echo esc_html($content_revenge_options['oauth_secret']); ?>" size="90" /> <br /> <?php _e('Get Your OAuth Credentials', 'ContentRevenge_trdom'); ?> <a href="https://developer.apps.yahoo.com/dashboard/createKey.html" target="_blank"><?php _e('Here', 'ContentRevenge_trdom'); ?></a> </td> </tr> <tr> <td valign="top"> <?php _e('Yahoo! Term Extraction App ID: ', 'ContentRevenge_trdom'); ?> </td> <td valign="top"> <input type="text" name="ContentRevenge_termsAPI" id="ContentRevenge_termsAPI" value="<?php echo esc_html($content_revenge_options['terms_api']); ?>" size="90" /> <br /> <?php _e('Get Your Yahoo! Term Extraction App ID', 'ContentRevenge_trdom'); ?> <a href="https://developer.apps.yahoo.com/wsregapp/" target="_blank"><?php _e('Here', 'ContentRevenge_trdom'); ?></a> <?php _e('(can be used on multiple sites).', 'ContentRevenge_trdom'); ?> </td> </tr> <tr> <td valign="top"> <?php _e('Validate Keys', 'ContentRevenge_trdom'); ?> </td> <td valign="top"> <span id="cr_validate_status"><a href="#" id="cr_validate_keys"><?php _e('Click Here', 'ContentRevenge_trdom'); ?></a></span> </td> </tr> <tr> <td valign="top"> <?php _e('Category: ', 'ContentRevenge_trdom'); ?> </td> <td valign="top"> <select id="ContentRevenge_postCat" name="ContentRevenge_postCat"> <?php // GET THE LIST OF POST CATEGORIES FROM THE wp_terms TABLE $sql = $wpdb->prepare("SELECT t.`name`, t.`term_id` FROM `".$wpdb->term_taxonomy."` AS tt LEFT JOIN `".$wpdb->terms."` AS t ON (t.`term_id` = tt.`term_id`) WHERE tt.`taxonomy` = 'category' ORDER BY t.`name`"); $result = array(); $result = $wpdb->get_results($sql, ARRAY_A); if (count($result) > 0) { // Loop over the results foreach ($result as $category) { $category_selected = ''; // Check which category was selected on form submit if ($content_revenge_options['post_cat'] == $category['term_id']) { $category_selected = ' selected="selected"'; } ?> <option value="<?php echo $category['term_id']; ?>"<?php echo $category_selected; ?>><?php echo esc_html($category['name']); ?></option> <?php } } ?> </select> <br /> </td> </tr> <tr> <td valign="top"> <?php _e('Keyword List: ', 'ContentRevenge_trdom'); ?> <br /> <?php _e('Paste Up to 1,000 Keywords', 'ContentRevenge_trdom'); ?> <br/> <font style="color: #FF0000;"><?php _e('No Space after Last Keyword', 'ContentRevenge_trdom'); ?></font> </td> <td valign="top"> <textarea name="ContentRevenge_keywords" cols="50" rows="10"><?php echo esc_html(stripslashes($content_revenge_options['keywords'])); ?></textarea> <br /> <?php _e('Place each keyword on a new line, without commas.', 'ContentRevenge_trdom'); ?> </td> </tr> <tr> <td valign="top"> <?php _e('Negative Keyword List: ', 'ContentRevenge_trdom'); ?> <br /> <?php _e('Paste Up to 1,000 Keywords', 'ContentRevenge_trdom'); ?> <br/> <font style="color: #FF0000;"><?php _e('No Space after Last Negative Keyword', 'ContentRevenge_trdom'); ?></font> </td> <td valign="top"> <textarea name="ContentRevenge_negative_keywords" cols="50" rows="10"><?php echo esc_html(stripslashes($content_revenge_options['negative_keywords'])); ?></textarea> <br /> <?php _e('Place each negative keyword on a new line, without commas.', 'ContentRevenge_trdom'); ?> </td> </tr> <tr> <td valign="top"> <?php _e('Number Of Results Per Post: ', 'ContentRevenge_trdom'); ?> </td> <td valign="top"> <select id="ContentRevenge_countFrom" name="ContentRevenge_countFrom"> <?php // Output numbers from 1 to 20 for ($n = 1; $n <= 20; $n++) { $count_from_selected = ''; // Check which number was selected on form submit if ($n == $content_revenge_options['count_from']) { $count_from_selected = ' selected="selected"'; } echo '<option value="'.$n.'"'.$count_from_selected.'>'.$n.'</option>'; } ?> </select> <?php _e('to', 'ContentRevenge_trdom'); ?> <select id="ContentRevenge_countTo" name="ContentRevenge_countTo"> <?php // Output numbers from 1 to 20 for ($n = 1; $n <= 20; $n++) { $count_to_selected = ''; // Check which number was selected on form submit if ($n == $content_revenge_options['count_to']) { $count_to_selected = ' selected="selected"'; } echo '<option value="'.$n.'"'.$count_to_selected.'>'.$n.'</option>'; } ?> </select> </td> </tr> <tr> <td valign="top"> <?php _e('Select Post Start Date: ', 'ContentRevenge_trdom'); ?> </td> <td valign="top"> <select name="ContentRevenge_startY" id="ContentRevenge_startY" onchange="setDay();"> <?php // Output years for ($y = date('Y') - 5; $y <= date('Y') + 5; $y++) { $year_selected = ''; // Check which year was selected on form submit if ($y == $content_revenge_options['start_y']) { $year_selected = ' selected="selected"'; } echo '<option value="'.$y.'"'.$year_selected.'>'.$y.'</option>'; } ?> </select> - <select name="ContentRevenge_startM" id="ContentRevenge_startM" onchange="setDay();"> <?php // Output months for ($m = 1; $m <= 12; $m++) { $month_selected = ''; // Check which year was selected on form submit if ($m == $content_revenge_options['start_m']) { $month_selected = ' selected="selected"'; } // Prepend 0 for months if there is only 1 number if ($m < 10) { $m = '0'.$m; } echo '<option value="'.$m.'"'.$month_selected.'>'.$m.'</option>'; } ?> </select> - <select name="ContentRevenge_startD" id="ContentRevenge_startD"> <?php // Output days for ($d = 1; $d <= 31; $d++) { $day_selected = ''; // Check which year was selected on form submit if ($d == $content_revenge_options['start_d']) { $day_selected = ' selected="selected"'; } // Prepend 0 for days if there is only 1 number if ($d < 10) { $d = '0'.$d; } echo '<option value="'.$d.'"'.$day_selected.'>'.$d.'</option>'; } ?> </select> <?php _e(' YYYY-MM-DD', 'ContentRevenge_trdom'); ?> </td> </tr> <tr> <td valign="top"> <?php _e('Prepend Content With: ', 'ContentRevenge_trdom'); ?> </td> <td valign="top"> <textarea name="ContentRevenge_prepend" cols="50" rows="5"><?php echo esc_html(stripslashes($content_revenge_options['prepend'])); ?></textarea> <br /> <?php _e(' You may include HTML tags', 'ContentRevenge_trdom'); ?> </td> </tr> <tr> <td valign="top"> <?php _e('Number Of Posts Per Day: ', 'ContentRevenge_trdom'); ?> </td> <td valign="top"> <select id="ContentRevenge_ag_posts_from" name="ContentRevenge_ag_posts_from"> <option value="1"<?php echo isset($content_revenge_options['ag_posts_from']) == TRUE && $content_revenge_options['ag_posts_from'] === '1' ? ' selected="selected"': ''; ?>>1</option> <option value="2"<?php echo (isset($content_revenge_options['ag_posts_from']) == TRUE && $content_revenge_options['ag_posts_from'] === '2') || (isset($content_revenge_options['ag_posts_from']) == FALSE) ? ' selected="selected"': ''; ?>>2</option> <option value="3"<?php echo isset($content_revenge_options['ag_posts_from']) == TRUE && $content_revenge_options['ag_posts_from'] === '3' ? ' selected="selected"': ''; ?>>3</option> <option value="4"<?php echo isset($content_revenge_options['ag_posts_from']) == TRUE && $content_revenge_options['ag_posts_from'] === '4' ? ' selected="selected"': ''; ?>>4</option> </select> <?php _e('to', 'ContentRevenge_trdom'); ?> <select id="ContentRevenge_ag_posts_to" name="ContentRevenge_ag_posts_to"> <option value="1"<?php echo isset($content_revenge_options['ag_posts_to']) == TRUE && $content_revenge_options['ag_posts_to'] === '1' ? ' selected="selected"': ''; ?>>1</option> <option value="2"<?php echo isset($content_revenge_options['ag_posts_to']) == TRUE && $content_revenge_options['ag_posts_to'] === '2' ? ' selected="selected"': ''; ?>>2</option> <option value="3"<?php echo isset($content_revenge_options['ag_posts_to']) == TRUE && $content_revenge_options['ag_posts_to'] === '3' ? ' selected="selected"': ''; ?>>3</option> <option value="4"<?php echo (isset($content_revenge_options['ag_posts_to']) == TRUE && $content_revenge_options['ag_posts_to'] === '4') || (isset($content_revenge_options['ag_posts_to']) == FALSE) ? ' selected="selected"': ''; ?>>4</option> </select> </td> </tr> <tr> <td valign="top"> <?php _e('Turn On Document Icons: ', 'ContentRevenge_trdom'); ?> </td> <td valign="top"> <input type="checkbox" name="ContentRevenge_docIcons" <?php if($content_revenge_options['doc_icons'] == 'on') { echo 'checked="checked"'; } ?> /> </td> </tr> <tr> <td valign="top"> <?php _e('Apply Adult Content Filter: ', 'ContentRevenge_trdom'); ?> </td> <td valign="top"> <input type="checkbox" name="ContentRevenge_adult" <?php if($content_revenge_options['adult'] == 'on') { echo 'checked="checked"'; } ?> /> </td> </tr> <tr> <td valign="top"> <?php _e('Include Image Results: ', 'ContentRevenge_trdom'); ?> </td> <td valign="top"> <input type="checkbox" name="ContentRevenge_images" <?php if($content_revenge_options['images'] == 'on') { echo 'checked="checked"'; } ?> /> </td> </tr> <tr> <td valign="top"> <?php _e('Add Wikipedia Results ', 'ContentRevenge_trdom'); ?> </td> <td valign="top"> <input type="checkbox" name="ContentRevenge_wikipedia_results" <?php if($content_revenge_options['wikipedia_results'] == 'on') { echo 'checked="checked"'; } ?> /> </td> </tr> <tr> <td valign="top"> <?php _e('Add About.com Results ', 'ContentRevenge_trdom'); ?> </td> <td valign="top"> <input type="checkbox" name="ContentRevenge_about_results" <?php if($content_revenge_options['about_results'] == 'on') { echo 'checked="checked"'; } ?> /> </td> </tr> <tr> <td valign="top"> <?php _e('Add YouTube Results ', 'ContentRevenge_trdom'); ?> </td> <td valign="top"> <input type="checkbox" name="ContentRevenge_youtube_results" <?php if($content_revenge_options['youtube_results'] == 'on') { echo 'checked="checked"'; } ?> /> </td> </tr> <tr> <td valign="top"> <?php _e('Add News Results ', 'ContentRevenge_trdom'); ?> </td> <td valign="top"> <input type="checkbox" name="ContentRevenge_news_results" <?php if($content_revenge_options['news_results'] == 'on') { echo 'checked="checked"'; } ?> /> </td> </tr> <!-- THIS IS A V.2.0 FEATURE --> <!--<tr> <td valign="top"> <?php #_e('Enable phpBay: ', 'ContentRevenge_trdom'); ?> </td> <td valign="top"> <input type="checkbox" name="ContentRevenge_phpBay" <?php #if($content_revenge_options['php_bay'] == 'on') { echo 'checked="checked"'; } ?> /> </td> </tr> <tr> <td valign="top"> <?php #_e('eBay Category:<br />(If phpBay is enabled) ', 'ContentRevenge_trdom'); ?> </td> <td valign="top"> <input type="text" name="ContentRevenge_phpBayCat" value="<?php #echo $content_revenge_options['php_bay_cat']; ?>" size="25" /> </td> </tr>--> <tr> <td valign="top"> <?php _e('Generate New Posts Upon Save: ', 'ContentRevenge_trdom'); ?> </td> <td valign="top"> <input type="checkbox" name="ContentRevenge_generate" <?php if($content_revenge_options['generate'] == 'on') { echo 'checked="checked"'; } ?> /> </td> </tr> </tbody> </table> <p class="submit"> <input type="submit" name="Submit" value="<?php _e('Save', 'ContentRevenge_trdom'); ?>" /> </p> </form> <hr /> <script type="text/javascript"> /* <![CDATA[ */ var $j = jQuery.noConflict(); $j(document).ready(function(){ $j('#cr_show_deleted_keywords').click(function(){ $j('#cr_deleted_keywords_cont').slideDown(); return false; }); }); /* ]]> */ </script> <h3><?php _e('Deleted Keywords', 'ContentRevenge_trdom'); ?></h3> <p><?php _e('<a href="#" id="cr_show_deleted_keywords">Click here</a> to show the list of deleted keywords for which no results were found.', 'ContentRevenge_trdom'); ?></p> <div id="cr_deleted_keywords_cont" style="display:none;"> <textarea cols="80" rows="5" name="cr_deleted_keywords_textarea" id="cr_deleted_keywords_textarea" readonly="readonly"> <?php if (isset($content_revenge_options['deleted_keywords']) == TRUE && count($content_revenge_options['deleted_keywords']) > 0) { foreach ($content_revenge_options['deleted_keywords'] as $deleted_keyword) { echo $deleted_keyword['date'].' - '.$deleted_keyword['keyword']."\r\n"; } } ?> </textarea> <br /> <input type="button" class="button-secondary action" name="cr_download_keywords" id="cr_download_keywords" onclick="window.location.href='/wp-content/plugins/content-revenge/download_deleted_keywords.php?security=<?php echo wp_create_nonce('cr_download_keywords'); ?>'" value="<?php _e('Download Keywords', 'ContentRevenge_trdom'); ?>" /> <input type="button" class="button-secondary action" name="cr_clear_keywords" id="cr_clear_keywords" value="<?php _e('Clear Keywords', 'ContentRevenge_trdom'); ?>" /> </div> <br /> <hr /> <h3><?php _e('Manual Placement of Content Revenge', 'ContentRevenge_trdom'); ?></h3> <p><?php _e('To manually insert Content Revenge results into a post, you can use the following shortcode: [cr]', 'ContentRevenge_trdom'); ?></p> <p><?php _e('*** Once the results are inserted into a post, they are written into the Database so you will have to manually edit the post to change anything.', 'ContentRevenge_trdom'); ?></p> <h3><?php _e('Yahoo BOSS API Pricing', 'ContentRevenge_trdom'); ?></h3> <style type="text/css"> table#prices { background-color: #fde9d9; border-top: 1px solid #000; border-right: 1px solid #000; border-left: 1px solid #000; } table#prices tr th { width: 180px; } table#prices tr td { border-bottom: 1px solid #000; padding: 10px; } </style> <table id="prices" cellspacing="0"> <thead> <tr> <th>Results Type</th> <th>Cost Per 1,000 Queries</th> </tr> </thead> <tbody> <tr> <td>Documents (Web)</td> <td style="text-align: center;">$0.80 cents</td> </tr> <tr> <td>Wikipedia.com (Web)</td> <td style="text-align: center;">$0.80 cents</td> </tr> <tr> <td>About.com (Web)</td> <td style="text-align: center;">$0.80 cents</td> </tr> <tr> <td>YouTube.com (Web)</td> <td style="text-align: center;">$0.80 cents</td> </tr> <tr> <td>News</td> <td style="text-align: center;">$0.10 cents</td> </tr> <tr> <td>Images</td> <td style="text-align: center;">$0.30 cents</td> </tr> </tbody> </table> <p><strong><?php _e('Total cost to publish 1,000 Content Revenge pages using all 6 result types = $3.60', 'ContentRevenge_trdom'); ?></strong></p> <p><?php _e('I highly recommend using all result types if you can afford it. If you use all 6 result types your cost is only a mere $3.60 per 1,000 pages generated. This is very cheap when you compare the cost of writing articles.', 'ContentRevenge_trdom'); ?></p> <p><?php _e('The above prices are current as of December 5, 2011. Please check current pricing of the Yahoo BOSS API billing by visiting <a href="http://info.yahoo.com/legal/us/yahoo/search/bosspricing/" target="_blank">Yahoo BOSS Billing</a>.', 'ContentRevenge_trdom'); ?></p> <p><?php _e('Disclaimer: Content Revenge creators are not responsible for any changes or price increases of the Yahoo BOSS API. By using this plugin you agree to the Terms and Conditions stated within your Yahoo BOSS API account. It is your responsibility to stay current with the Yahoo BOSS API Terms and costs.', 'ContentRevenge_trdom'); ?></p> </div>