Example #1
0
function wp_auto_spinner_thesaurus_f()
{
    ?>

<?php 
    //INI
    $wp_auto_spinner_lang = get_option('wp_auto_spinner_lang', 'en');
    $file = get_option('wp_auto_spinner_custom_' . $wp_auto_spinner_lang, array());
    ?>


<div class="wrap">
    
    <div style="margin-left:8px" class="icon32 icon32-posts-page" id="icon-edit-pages">
        <br>
    </div>
    
    <h2>Wordpress Auto Spinner Custom Thesaurus</h2>
 
     <div id="synonyms_choice">
	    <label for="field-treasures">
	    	Thesaurus :
	    </label>
	    <select  disabled="disabled" name="treasures" id="treasures">
	    		<option  value="en"  <?php 
    opt_selected('en', $wp_auto_spinner_lang);
    ?>
 >English</option> 
				<option  value="du"  <?php 
    opt_selected('du', $wp_auto_spinner_lang);
    ?>
 >Dutch</option>
				<option  value="ge"  <?php 
    opt_selected('ge', $wp_auto_spinner_lang);
    ?>
 >German</option>
				<option  value="fr"  <?php 
    opt_selected('fr', $wp_auto_spinner_lang);
    ?>
 >French</option>
				<option  value="sp"  <?php 
    opt_selected('sp', $wp_auto_spinner_lang);
    ?>
 >Spanish</option>
				<option  value="po"  <?php 
    opt_selected('po', $wp_auto_spinner_lang);
    ?>
 >Portuguese</option>
				<option  value="ro"  <?php 
    opt_selected('ro', $wp_auto_spinner_lang);
    ?>
 >Romanian</option>
				<option  value="tr"  <?php 
    opt_selected('tr', $wp_auto_spinner_lang);
    ?>
 >Turkish</option>
				 
	    </select>
    </div>

    <div id="dashboard-widgets-wrap">

    <div class="metabox-holder columns-2" id="dashboard-widgets">
        <div class="postbox-container" id="postbox-container-1">
            <div class="meta-box-sortables ui-sortable" id="normal-sortables">
                <div class="postbox">
                    <h3 class="hndle"><span>Thesaurus synonyms</span></h3>
                    <div class="inside">
                        <!--  insider start -->





                        <div id="synonyms_wraper">
                            <div id="synonyms">
                                <p>All Words</p>
                                <select name="sometext" size="30" id="word_select">
                               
                                </select>

                            </div>

                            <div id="synonyms_words">
                                <p>Current Word</p>
                                <input  disabled="disabled"  type="text" id="synonym_word" />
                                <p>Word synonyms</p>
                                <textarea disabled="disabled" rows="10" cols="20" name="name" id="word_synonyms"></textarea>
                                <p>
                                    
                                    <input name="wp_spinner_rewrite_source" id="wp_spinner_rewrite_source" type="hidden" value="<?php 
    echo site_url('/?wp_auto_spinner=ajax');
    ?>
">
                                    
                                    <button  id="edit_synonyms" title="Edit Synonym">
                                        <img src="<?php 
    echo plugins_url('images/edit.png', __FILE__);
    ?>
 " /><br>Edit
                                    </button>
                                    
                                    <button  id="save_synonyms"  disabled="disabled"  title="Save Synonym">
                                        <img src="<?php 
    echo plugins_url('images/save.png', __FILE__);
    ?>
 " /><br>Save
                                    </button>
                                    
                                    <button  id="cancel_synonyms"  disabled="disabled"  title="Cancel">
                                        <img src="<?php 
    echo plugins_url('images/delete.png', __FILE__);
    ?>
 " /><br>Cancle
                                    </button>
                                    
                                    <button  id="delete_synonyms"   title="Delete Synonym">
                                        <img src="<?php 
    echo plugins_url('images/trash.png', __FILE__);
    ?>
 " /><br>Trash
                                    </button>
                                    
                                    
                                </p>
                            </div>
                            <!-- synonyms words -->

                            <div class="clear"></div>

                        </div>
                        <!--synonyms wraper-->

                        <!-- /insider 3 -->
                    </div>
                </div>

            </div>
        </div><!-- postbox container 1  -->

         <div class="postbox-container" id="postbox-container-2">
            <div class="meta-box-sortables ui-sortable" id="normal-sortables">
                <div class="postbox">
                    <h3 class="hndle"><span>Add New Synonyms</span></h3>
                    <div class="inside">
                        <!--  insider start -->
							<p>one word per line</p>
							<textarea  style="width:100%" cols="15" rows="3" class="mceEditor" id="content" name="content"></textarea>
							<button id="add_synonyms" class="button">Add synonyms</button>
                        <!-- /insider 3 -->
                    </div>
                </div>

            </div>
        </div><!-- postbox container 2  -->
        

    </div>


</div>
</div>
<!-- wrap -->

<script type="text/javascript">
	var synonyms_arr = <?php 
    echo json_encode($file);
    ?>
;
	var lastKey=0; 
		 
	
	   jQuery.each(synonyms_arr, function( index, value ) {
		 
			   jQuery('#word_select').append( '<option value="'+ index +'" >'+ value.split('|')[0] +'</option>') ;
 				lastKey=index;
	    });

	   jQuery('#word_synonyms').focus();
		
	
</script>

<?php 
}
Example #2
0
function wp_auto_spinner_settings()
{
    ?>

<?php 
    $itm_prefix = 'wp_auto_spinner';
    $itm_id = 4092452;
    //delete_option($itm_prefix.'_license_active');
    $proxify = true;
    $license_active = get_option($itm_prefix . '_license_active', '');
    //purchase check
    if (isset($_POST[$itm_prefix . '_license']) && trim($license_active) === '') {
        //save it
        update_option($itm_prefix . '_license', $_POST[$itm_prefix . '_license']);
        //activating
        //curl ini
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_HEADER, 0);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
        curl_setopt($ch, CURLOPT_TIMEOUT, 20);
        curl_setopt($ch, CURLOPT_REFERER, 'http://www.bing.com/');
        curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8');
        curl_setopt($ch, CURLOPT_MAXREDIRS, 5);
        // Good leeway for redirections.
        //curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); // Many login forms redirect at least once.
        curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt");
        //curl get
        $x = 'error';
        //change domain ?
        $append = '';
        if (isset($_POST['wp_auto_spin']) && in_array('OPT_CHANGE_DOMAIN', $_POST['wp_auto_spin'])) {
            $append = '&changedomain=yes';
        }
        $url = 'http://deandev.com/license/index.php?itm=' . $itm_id . '&domain=' . $_SERVER['HTTP_HOST'] . '&purchase=' . trim($_POST[$itm_prefix . '_license']) . $append;
        if (WP_VALVE_PROXY) {
            $url = 'http://labnol-proxy-server.appspot.com/' . str_replace('http://', '', $url);
        }
        curl_setopt($ch, CURLOPT_HTTPGET, 1);
        curl_setopt($ch, CURLOPT_URL, trim($url));
        while (trim($x) != '') {
            $exec = curl_exec($ch);
            $x = curl_error($ch);
        }
        $resback = $exec;
        $resarr = json_decode($resback);
        if (isset($resarr->message)) {
            $license_message = $resarr->message;
            //activate the plugin
            update_option($itm_prefix . '_license_active', 'active');
            update_option($itm_prefix . '_license_active_date', time('now'));
            $license_active = get_option($itm_prefix . '_license_active', '');
        } else {
            if (isset($resarr->error)) {
                $license_error = $resarr->error;
            }
        }
    } else {
    }
    // update options on post
    if (isset($_POST['wp_auto_spinner_lang'])) {
        if (!isset($_POST['wp_auto_spin'])) {
            update_option('wp_auto_spin', array());
        } else {
            update_option('wp_auto_spin', $_POST['wp_auto_spin']);
        }
        if (!isset($_POST['wp_spinner_types'])) {
            update_option('wp_spinner_types', array('post'));
        } else {
            update_option('wp_spinner_types', $_POST['wp_spinner_types']);
        }
        if (!isset($_POST['post_category'])) {
            update_option('wp_auto_spin_execl', array());
        } else {
            update_option('wp_auto_spin_execl', $_POST['post_category']);
        }
        update_option('wp_auto_spinner_lang', $_POST['wp_auto_spinner_lang']);
        update_option('wp_auto_spinner_execlude', $_POST['wp_auto_spinner_execlude']);
        update_option('wp_auto_spinner_email', $_POST['wp_auto_spinner_email']);
        update_option('wp_auto_spinner_password', $_POST['wp_auto_spinner_password']);
        update_option('wp_auto_spinner_quality', $_POST['wp_auto_spinner_quality']);
        update_option('wp_auto_spinner_license', $_POST['wp_auto_spinner_license']);
        echo '<div class="updated" id="message"><p>Plugin settings <strong>updated successfully</strong>. </p></div>';
    }
    // data
    $wp_auto_spinner_lang = get_option('wp_auto_spinner_lang', 'en');
    $wp_auto_spinner_execlude = get_option('wp_auto_spinner_execlude', '');
    $wp_auto_spinner_email = get_option('wp_auto_spinner_email', '');
    $wp_auto_spinner_password = get_option('wp_auto_spinner_password', '');
    $wp_auto_spinner_quality = get_option('wp_auto_spinner_quality', 'medium');
    $queue_url = admin_url('admin.php?page=wp_auto_spinner_queue');
    ?>
<div class="wrap">
	<div style="margin-left: 8px" class="icon32" id="icon-options-general">
		<br>
	</div>

	<form method="POST" class="TTWForm-auto-spin">
	
	<h2>Settings <input type="submit" name="save" value="Save Changes" class="button-primary"></h2>
		<div id="dashboard-widgets-wrap">

			<div class="metabox-holder columns-1" id="dashboard-widgets">
				<div class="postbox-container" id="postbox-container-1">
					<div>
						
						<?php 
    if (trim($license_active) != '') {
        ?>
						
						
						<div class="postbox">
							<h3 class="hndle">
								<span>Basic options</span>
							</h3>
							<div class="inside">
								<!--  insider start -->

								 
								<table class="form-table">
									<tbody>
										
										
									
										<tr>
											<th scope="row"><label>Thesaurus Language</label></th>
											<td>
												<select name="wp_auto_spinner_lang" id="field1zz">
													<option value="en" <?php 
        opt_selected('en', $wp_auto_spinner_lang);
        ?>
>English</option>
													<option value="du" <?php 
        opt_selected('du', $wp_auto_spinner_lang);
        ?>
>Dutch</option>
													<option value="ge" <?php 
        opt_selected('ge', $wp_auto_spinner_lang);
        ?>
>German</option>
													<option value="fr" <?php 
        opt_selected('fr', $wp_auto_spinner_lang);
        ?>
>French</option>
													<option value="sp" <?php 
        opt_selected('sp', $wp_auto_spinner_lang);
        ?>
>Spanish</option>
													<option value="po" <?php 
        opt_selected('po', $wp_auto_spinner_lang);
        ?>
>Portuguese</option>
													<option value="ro" <?php 
        opt_selected('ro', $wp_auto_spinner_lang);
        ?>
>Romanian</option>
													<option value="tr" <?php 
        opt_selected('tr', $wp_auto_spinner_lang);
        ?>
>Turkish</option>
		
												</select>
			
												<div class="description">Choose what language the content will be rewritten in .</div></td>
										</tr>
										
										<tr>
											<th scope="row"><label>Auto Spin ?</label></th>
											<td>
												<input name="wp_auto_spin[]" id="field-wp_auto_spin_active-1" value="OPT_AUTO_SPIN_ACTIVE" type="checkbox">  Activate <strong>automatic spining mode</strong> for posts .
												<div style="padding-top:5px" class="description">Tick this option to spin bots posts automatically. when this option is active any bot post get added to your wordpress it will be sent to the <a href="<?php 
        echo $queue_url;
        ?>
">spinning queue</a> . note that you should setup the cron job below for the plugin to process items that get sent to the <a href="<?php 
        echo $queue_url;
        ?>
">spinning queue</a></div>
											
												
										</tr>
										<tr>
											<th scope="row"><label>Spin Title ?</label></th>
											<td>
			
												<input name="wp_auto_spin[]" id="field-wp_auto_spin_active-1" value="OPT_AUTO_SPIN_ACTIVE_TTL" type="checkbox">   When automatically spinning an article <strong>spin post title</strong> also .
										</tr>
										
									
										
										<tr>
											<th scope="row"><label>Don't spin the content  ?</label></th>
											<td>
			
												<input name="wp_auto_spin[]"  value="OPT_AUTO_SPIN_DEACTIVE_CNT" type="checkbox"> Tick this option to deactivate content spinning . looks like a wierd option but this is suitable for people who want to spin just the title .
										</tr>
			 
										<tr>
											<th scope="row"><label>Spin Slug ?</label></th>
											<td>
			
												<input name="wp_auto_spin[]" id="field-wp_auto_spin_active-1" value="OPT_AUTO_SPIN_SLUG" type="checkbox">   Spin the <abbr title="Permalink">post slug</abbr> ? .
									
										</tr>
										
										<tr>
											<th scope="row"><label>Spin Link texts ?</label></th>
											<td>
			
												<input name="wp_auto_spin[]" value="OPT_AUTO_SPIN_LINKS" type="checkbox">   When spinning an article <strong>spin link text</strong> also .
										</tr>
										
										<tr>
											<th scope="row"><label>Auto spin manually written </label></th>
											<td>
			
												<input name="wp_auto_spin[]" id="field-wp_auto_spin_active-1" value="OPT_AUTO_SPIN_ACTIVE_MANUAL" type="checkbox">   Automatically spin <abbr title="(this will spin posts you are writing manually so when you write and preview post it will get spinned instantly)(not recommended)"><strong>manually written</strong></abbr> articles .
										</tr>
										
										<tr>
											<th scope="row"><label>Spin instantly ? </label></th>
											<td>
			
												<input name="wp_auto_spin[]" value="OPT_AUTO_SPIN_PUBLISH" type="checkbox">   Auto spin instantly <abbr title="Fire spinning processing once the post get published regularly it get added to the spin queue"><strong>on publish</strong></abbr> .
												<div style="padding-top:5px" class="description">By default, Bots posts get added to the <a href="<?php 
        echo $queue_url;
        ?>
">spinning queue</a> where the cron do process them one every minute . if you wan't to spin them instantly tick this option .</div> 
										</tr>
										
										<tr>
											<th scope="row"><label>Activate Shuffule mode ? (Not recommended)</label></th>
											<td>
			
												<input name="wp_auto_spin[]"  value="OPT_AUTO_SPIN_ACTIVE_SHUFFLE" type="checkbox">Replace <strong>any word</strong> in the set by another in synonyms set    
												
												<div class="discription">By default if we have a synonyms set on the form   word1|word2|word3  if the content contains word1 it will be replaced by word2 or word3 but if it contains word2 it will not be replaced as the plugin replaces the first word of the set not the counter . by ticking this option if word2 or word3 are in the content they will be replaced by word1 or another word on the set.</div> 
												
										</tr>
										
										<tr>
											<th scope="row"><label>Spin scheduled posts instantly ?</label></th>
											<td>
			
												<input name="wp_auto_spin[]"  value="OPT_AUTO_SPIN_SCHEDULED" type="checkbox">By default scheduled posts get spinned once published tick here if you don't want them to wait untill published    
												
										</tr>
										
									</tbody>
								</table>
									

									<p style="padding-top: 5px">

										<input class="button" name="submit" value="Save Settings" type="submit">

									</p>



								</div>
								<!--/TTWForm-contain-->



								<!-- insider End -->

							</div>
						</div>

						<div class="postbox" >
							<h3 class="hndle">
								<span>Custom Post Types <span class="postbox-title-action"></span></span>
							</h3>
							<div class="inside">
								<!-- insider 3 -->
								
								<table class="form-table">
									<tbody>
								
										<tr>
											<th scope="row"><label>Post Types ?</label></th>
											<td>
			
												<?php 
        $ptype = get_post_types(array(), 'names', 'or');
        foreach ($ptype as $type) {
            if (post_type_supports($type, 'editor')) {
                $post_types[] = $type;
            }
        }
        foreach ($post_types as $post_type) {
            ?>
					
														
																 
																<input name="wp_spinner_types[]" value="<?php 
            echo $post_type;
            ?>
" type="checkbox"> <span class="option-title">
													       			 <?php 
            echo $post_type;
            ?>
 
													                </span>
																 
																
												 <?php 
        }
        ?>
												
												<div class="description">Choose what post types the plugin will support so it shows it's box when you edit this post type</div>
									
		
										</tr>
										
									</tbody>
								</table>
									

								
															<p style="padding-top: 5px">
									<input type="submit" value="Save Settings" name="submit" class="button">
								</p>



								<!-- /insider 3 -->
							</div>
						</div>
						
						
						<div class="postbox" >
							<h3 class="hndle">
								<span>Cron Job Setup<span class="postbox-title-action"></span></span>
							</h3>
							<div class="inside">
								<!-- insider 3 -->
								
								<?php 
        $lastrun = get_option('wp_auto_spinner_last_run', 1392146043);
        ?>
	
								<table class="form-table">
									<tbody>
									    <tr>
											<th scope="row"><label>Internal Cron </label></th>
											<td>
			
											<input name="wp_auto_spin[]" value="OPT_AUTO_SPIN_CRON" type="checkbox"> <span class="option-title"> Use Wordpress Built-in Cron instead . </span>
										</tr>
										<tr>
											<th scope="row"><label>Cron Status </label></th>
											<td>
			
												<p style="margin-top: -13px;"><strong>Current</strong> server time is  <strong>( <?php 
        echo date('h:i:s');
        ?>
 )</strong> , Cron last run at <strong>( <?php 
        echo date("h:i:s", $lastrun);
        ?>
 )</strong> this is <strong> ( <?php 
        echo $timdiff = time('now') - $lastrun;
        ?>
 )</strong> seconds ago and it runs every <strong>( 60 )</strong> seconds to process one item from the <a href="<?php 
        echo $queue_url;
        ?>
">spinning queue</a> so it should run again after <strong>( <?php 
        echo 60 - $timdiff;
        ?>
 )</strong> seconds.
										</tr>
										
										<tr>
											<th scope="row"><label>Run Now </label></th>
											<td>
			
												<?php 
        $cronurl = site_url('?wp_auto_spinner=cron', __FILE__);
        ?>
												( <a target="blank" href="<?php 
        echo $cronurl;
        ?>
">Start now </a>)
												
												<div class="description">Click this link to trigger the cron manually which will process one item from the <a href="<?php 
        echo $queue_url;
        ?>
">spinning queue</a></div>
										</tr>
										
										<tr>
											<th scope="row"><label>Cron Command </label></th>
											<td>
												
												    <div style="background-color: #FFFBCC; border: 1px solid #E6DB55; color: #555555; padding: 5px; width: 97%; margin-top: 10px">
														
														<?php 
        echo 'curl ' . $cronurl;
        ?>
 
													</div>
													<div class="description">Add this command to your hosting crontab. refer to documentation if you need help</div>
													
													<p>if the above command didn't work use the one bleow</p>

																		
								
										</tr>
										
										<tr>
											<th scope="row"><label>Alternate Command</label></th>
											<td>
			
													<div style="background-color: #FFFBCC; border: 1px solid #E6DB55; color: #555555; padding: 5px; width: 97%; margin-top: 10px">
													<?php 
        $cronpath = dirname(__FILE__) . '/cron.php';
        echo 'php ' . $cronpath;
        ?>
													</div>												
												<div class="description">This is another alternative to the above command in case the above didn't work for your host</div>
										</tr>
									
									</tbody>
								</table>
								
								
								<p style="padding-top: 5px">
									<input type="submit" class="button" name="submit" value="Save Settings">
								</p>


								<!-- /insider 3 -->
							</div>
						</div>


 
						<div class="postbox" >
							<h3 class="hndle">
								<span>Execlusion and protected terms <span class="postbox-title-action"></span></span>
							</h3>
							<div class="inside">
								<!-- insider 3 -->
								
								<table class="form-table">
									<tbody>
									    <tr>
											<th scope="row"><label>Execlude Title Words </label></th>
											<td>
			
											<input name="wp_auto_spin[]" value="OPT_AUTO_SPIN_TITLE_EX" type="checkbox"> <span class="option-title"> Execlude title words from spinning in the post content . </span>
										</tr>
										<tr>
											<th scope="row"><label>Reserved Words </label></th>
											<td>
			
											<textarea style="width: 100%" rows="5" cols="20" name="wp_auto_spinner_execlude" id="field-wp_auto_spinner_execlude"><?php 
        echo stripslashes($wp_auto_spinner_execlude);
        ?>
</textarea>
											<div class="description">Words in this box will not be spinned , add them one per line</div>
										</tr>
										<tr>
											<th scope="row"><label>Execluded Categories </label></th>
											<td>
			
											<div id="taxonomy-category" class="categorydiv">
												<div id="category-all" class="tabs-panel">
													<input type="hidden" name="post_category[]" value="0">
													<ul id="categorychecklist" data-wp-lists="list:category" class="categorychecklist form-no-clear">
														<?php 
        wp_category_checklist();
        ?>
													</ul>
												</div>
			
											</div>
											<div class="description">Posts belong to these categories will not be spinned.</div>
										</tr>
										
										</tbody>
									</table>

								 

								<p style="padding-top: 5px">
									<input type="submit" value="Save Settings" name="submit" class="button">
								</p>

								<!-- /insider 3 -->
							</div>
						</div>

						 


						<div class="postbox" >
							<h3 class="hndle">
								<span>Spin Rewriter (OPTIONAL) <span class="postbox-title-action"></span></span>
							</h3>
							<div class="inside">
								<!-- insider 3 -->

								<p>By Default, the plugin uses it's internal synonyms database but you still can use <a href="http://www.spinrewriter.com/?ref=11ade">spinrewiter</a> API to spin the posts .</p>



								<table  class="form-table">
								
									<tr>
										<th scope="row">SpinRewriter Active </td>
										<td><input name="wp_auto_spin[]" value="OPT_AUTO_SPIN_REWRITER" type="checkbox"> <span class="option-title"> Use spinrewriter.com api . </span></td>
									</tr>
							
									<tr>
										<th scope="row">SpinRewriter email  </td>
										<td><input  style="width:100%" value="<?php 
        echo $wp_auto_spinner_email;
        ?>
" name="wp_auto_spinner_email" id="field-spinner-email" type="text"></td>
									</tr>

									<tr>
										<th scope="row">SpinRewriter api key  </td>
										<td><input  style="width:100%" value="<?php 
        echo $wp_auto_spinner_password;
        ?>
" name="wp_auto_spinner_password" id="field-spinner-password" type="password"></td>
									</tr>
									
									<?php 
        if (trim($wp_auto_spinner_email) != '' && trim($wp_auto_spinner_password) != '') {
            require_once "inc/SpinRewriterAPI.php";
            // Authenticate yourself.
            $spinrewriter_api = new SpinRewriterAPI($wp_auto_spinner_email, $wp_auto_spinner_password);
            // Make the actual API request and save response as a native PHP array.
            $api_response = $spinrewriter_api->getQuota();
            // Output the API response.
            if (isset($api_response['response'])) {
                echo '<tr><th scope="row">Status</th><td>' . $api_response['response'] . '</td></tr>';
            }
        }
        ?>
									
									<tr>
										<th scope="row">Confidence Level</td>
										<td>
											
											 
										 <select name="wp_auto_spinner_quality" >
											<option value="low" <?php 
        opt_selected('low', $wp_auto_spinner_quality);
        ?>
>Low</option>
											<option value="medium" <?php 
        opt_selected('medium', $wp_auto_spinner_quality);
        ?>
>Medium</option>
											<option value="high" <?php 
        opt_selected('high', $wp_auto_spinner_quality);
        ?>
>High</option>
											

										</select>
									 
										
										</td>
									</tr>
									<?php 
        /*
        <tr>
        	<th scope="row">Nested Spin  </th>
        	<td><input name="wp_auto_spin[]" value="OPT_AUTO_SPIN_NestedSpintax" type="checkbox"> <span class="option-title"> Set whether the One-Click Rewrite process uses nested spinning syntax (multi-level spinning) or not. . </span></td>
        </tr>
        */
        ?>
									
									<tr>
										<th scope="row">Auto Sentences  </th>
										<td><input name="wp_auto_spin[]" value="OPT_AUTO_SPIN_AutoSentences" type="checkbox"> <span class="option-title"> Set whether Spin Rewriter rewrites complete sentences on its own. </span></td>
									</tr>
									<tr>
										<th scope="row">Auto Paragraphs  </th>
										<td><input name="wp_auto_spin[]" value="OPT_AUTO_SPIN_AutoParagraphs" type="checkbox"> <span class="option-title"> Set whether Spin Rewriter rewrites entire paragraphs on its own. </span></td>
									</tr>
									<tr>
										<th scope="row">Auto New Paragraphs  </th>
										<td><input name="wp_auto_spin[]" value="OPT_AUTO_SPIN_AutoNewParagraphs" type="checkbox"> <span class="option-title"> Set whether Spin Rewriter writes additional paragraphs on its own. </span></td>
									</tr>
									<tr>
										<th scope="row">Auto Sentence Trees</th>
										<td><input name="wp_auto_spin[]" value="OPT_AUTO_SPIN_AutoSentenceTrees" type="checkbox"> <span class="option-title"> Set whether Spin Rewriter changes the entire structure of phrases and sentences.</span></td>
									</tr>
									
									<tr>
										<th scope="row">Auto Protected Terms</th>
										<td><input name="wp_auto_spin[]" value="OPT_AUTO_SPIN_AutoProtectedTerms" type="checkbox"> <span class="option-title"> Set whether Spin Rewriter protect capped letters from spinning.</span></td>
									</tr>


									
									
								</table>

 								<p style="padding-top: 5px">
									<input type="submit" value="Save Settings" name="submit" class="button">
								</p>



								<!-- /insider 3 -->
							</div>
						</div>

						<?php 
    }
    ?>

						<div class="postbox" >
							<h3 class="hndle">
								<span>License<span class="postbox-title-action"></span></span>
							</h3>
							<div class="inside">
								<!-- insider 3 -->
								
						 		<table class="form-table">
									<tbody>
										
										
									
										<tr>
											<th scope="row"><label>Purchase Code</label></th>
											<td><input class="widefat" name="wp_auto_spinner_license" value="<?php 
    echo get_option('wp_auto_spinner_license', '');
    ?>
"   type="text">
			
												<div class="description">If you don't know what is your purchase code check this <a href="http://www.youtube.com/watch?v=eAHsVR_kO7A">video</a> on how to get it   .</div></td>
										</tr>
										
										<?php 
    if (isset($license_error) && stristr($license_error, 'another')) {
        ?>
										
										<tr>
											<th scope="row"><label> Change domain </label></th>
											<td><input name="wp_auto_spin[]"   value="OPT_CHANGE_DOMAIN" type="checkbox"> <span class="option-title"> Disable license at the other domain and use it with this domain </span></td>
										</tr>
										
										<?php 
    }
    ?>
										
										<tr>
											<th scope="row"><label>License Status</label></th>
											<td>
			
												<div class="description"><?php 
    if (trim($license_active) != '') {
        echo 'Active';
    } else {
        echo 'Inactive ';
        if (isset($license_error)) {
            echo '<p><span style="color:red">' . $license_error . '</span></p>';
        }
    }
    ?>
</div></td>
										</tr>
			
										
									</tbody>
								</table>

								<p style="padding-top: 5px">
									<input type="submit" class="button" name="submit" value="Save Settings">
								</p>


								<!-- /insider 3 -->
							</div>
						</div>						
						

					</div>
				</div>


			</div>


			<div class="clear"></div>
		 
	</form>
	<!--/TTWForm-->
</div>

<script type="text/javascript">
    var $vals = '<?php 
    $opt = get_option('wp_auto_spin', array());
    $wp_spinner_types = get_option('wp_spinner_types', array('post', 'product'));
    print_r(implode('|', array_merge($opt, $wp_spinner_types)));
    ?>
';
    $val_arr = $vals.split('|');
    jQuery('input:checkbox').removeAttr('checked');
    jQuery.each($val_arr, function (index, value) {
        if (value != '') {
            jQuery('input:checkbox[value="' + value + '"]').attr('checked', 'checked');
        }
    });

    var $vals = '<?php 
    $opt = get_option('wp_auto_spin_execl', array());
    print_r(implode('|', $opt));
    ?>
';
    $val_arr = $vals.split('|');

    jQuery.each($val_arr, function (index, value) {
        if (value != '') {
            jQuery('input:checkbox[value="' + value + '"]').attr('checked', 'checked');
        }
    });
    
</script>

<?php 
}
function wp_keword_tool_fn()
{
    ?>
 

 <?php 
    if (isset($_POST['wp_keyword_tool_google'])) {
        foreach ($_POST as $key => $val) {
            if (stristr($key, 'keyword')) {
                update_option($key, $val);
            }
        }
        echo '<div class="updated " id="message"><p>Changes saved</p></div>';
    }
    $allletters = array();
    $en = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z');
    $allletters['English'] = $en;
    //French
    $allletters['French'] = array("é", "è", "ç", "à", "a", "z", "e", "r", "t", "y", "u", "i", "o", "p", "\$", "q", "s", "d", "f", "g", "h", "j", "k", "l", "m", "ù", "w", "x", "c", "v", "b", "n");
    //dutch
    $allletters['Dutch'] = array_merge($en, array("ë", "ÿ", "ü", "ï", "ö", "ä"));
    //German
    $allletters['German'] = array("ß", "q", "w", "e", "r", "t", "z", "u", "i", "o", "p", "ü", "a", "s", "d", "f", "g", "h", "j", "k", "l", "ö", "ä", "y", "x", "c", "v", "b", "n", "m");
    $allletters['Russian'] = array("ё", "й", "ц", "у", "к", "е", "н", "г", "ш", "щ", "з", "х", "ъ", "ф", "ы", "в", "а", "п", "р", "о", "л", "д", "ж", "э", "я", "ч", "с", "м", "и", "т", "ь", "б", "ю", "!", "№");
    $allletters['Spanish'] = array("º", "¡", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "ç", "a", "s", "d", "f", "g", "h", "j", "k", "l", "ñ", "z", "x", "c", "v", "b", "n", "m");
    $allletters['Swedish'] = array("§", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "å", "a", "s", "d", "f", "g", "h", "j", "k", "l", "ö", "ä", "z", "x", "c", "v", "b", "n", "m", "ë", "ÿ", "ü", "ï");
    //arabic
    $allletters['Arabic'] = array("ذ", "ض", "ص", "ث", "ق", "ف", "غ", "ع", "ه", "خ", "ح", "ج", "د", "ش", "س", "ي", "ب", "ل", "ا", "ت", "ن", "م", "ك", "ط", "ئ", "ء", "ؤ", "ر", "لا", "ى", "ة", "و", "ز", "ظ");
    //albnian
    $allletters['Albanian'] = array_merge($en, array('ç', 'ë'));
    //amharic
    $allletters['Amharic'] = array("፩", "ሀ", "በ", "ነ", "መ", "ወ", "ጠ", "ተ", "ለ", "ረ", "የ", "ኣ", "ኡ", "አ", "እ", "ኤ", "ኧ", "እ", "አ", "ኦ", "ኢ", "ቐ", "ቀ", "ከ", "ደ", "ኸ", "ገ", "ሰ", "ቸ", "ዘ", "ፈ");
    //armanian
    $allletters['Armanian'] = array("ձ", "յ", "օ", "ռ", "ժ", "խ", "վ", "է", "ր", "դ", "ե", "ը", "ի", "ո", "բ", "չ", "ջ", "'", "ա", "ս", "տ", "ֆ", "կ", "հ", "ճ", "ք", "լ", "թ", "փ", "'", "զ", "ց", "գ", "ւ", "պ", "ն", "մ", "շ", "ղ", "ծ");
    //bangla
    $allletters['bangla'] = array("ৃ", "ৌ", "ৈ", "া", "ী", "ূ", "ব", "হ", "গ", "দ", "জ", "ড", "়", "ো", "ে", "্", "ি", "ু", "প", "র", "ক", "ত", "চ", "ট", "ম", "ন", "ব", "ল", "স", "য");
    //chineese
    $allletters['Chinese'] = array("手", "田", "水", "口", "廿", "卜", "山", "戈", "人", "心", "日", "尸", "木", "火", "土", "竹", "十", "大", "中", "Z", "難", "金", "女", "月", "弓");
    //coptic
    $allletters['Coptic'] = array("⸗", "ⲑ", "ⲱ", "ⲉ", "ⲣ", "ⲧ", "ⲯ", "ⲩ", "ⲓ", "ⲟ", "ⲡ", "̀", "ⲁ", "ⲥ", "ⲇ", "ⲫ", "ⲅ", "ⲏ", "ϫ", "ⲕ", "ⲗ", "̀", "ⲍ", "ⲝ", "ⲭ", "ϣ", "ⲃ", "ⲛ", "ⲙ", "́");
    //Croatian
    $allletters['Croatian'] = array("q", "w", "e", "r", "t", "z", "u", "i", "o", "p", "š", "đ", "ž", "a", "s", "d", "f", "g", "h", "j", "k", "l", "č", "ć", "y", "x", "c", "v", "b", "n", "m");
    //Czech
    $allletters['Czech'] = array("ě", "š", "č", "ř", "ž", "ý", "á", "í", "é", "q", "w", "e", "r", "t", "z", "u", "i", "o", "p", "ú", "¨", "a", "s", "d", "f", "g", "h", "j", "k", "l", "ů", "§", "y", "x", "c", "v", "b", "n", "m");
    //Danish
    $allletters['Danish'] = array("q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "å", "a", "s", "d", "f", "g", "h", "j", "k", "l", "æ", "ø", "z", "x", "c", "v", "b", "n", "m", "ë", "ÿ", "ü", "ï", "ö", "ä");
    //Dhivehi
    $allletters['Dhivehi'] = array("ް", "އ", "ެ", "ރ", "ތ", "ޔ", "ު", "ި", "ޮ", "ޕ", "ަ", "ސ", "ދ", "ފ", "ގ", "ހ", "ޖ", "ކ", "ލ", "ޒ", "×", "ޗ", "ވ", "ބ", "ނ", "މ");
    //Estonian
    $allletters['Estonian'] = array("ˇ", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "ü", "õ", "a", "s", "d", "f", "g", "h", "j", "k", "l", "ö", "ä", "z", "x", "c", "v", "b", "n", "m");
    //Farsi
    $allletters['Farsi'] = array("۴", "۵", "۶", "ض", "ص", "ث", "ق", "ف", "غ", "ع", "ه", "خ", "ح", "ج", "چ", "ش", "س", "ی", "ب", "ل", "ا", "ت", "ن", "م", "ک", "گ", "ظ", "ط", "ز", "ر", "ذ", "د", "پ", "و");
    //Finnish
    $allletters['Finnish'] = array("§", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "å", "a", "s", "d", "f", "g", "h", "j", "k", "l", "ö", "ä", "z", "x", "c", "v", "b", "n", "m", "ë", "ÿ", "ü", "ï", "ö", "ä");
    //Georgian
    $allletters['Georgian'] = array("№", "§", "ღ", "ჯ", "უ", "კ", "ე", "ნ", "გ", "შ", "წ", "ზ", "ხ", "ც", "ფ", "ძ", "ვ", "თ", "ა", "პ", "რ", "ო", "ლ", "დ", "ჟ", "(", "ჭ", "ჩ", "ყ", "ს", "მ", "ი", "ტ", "ქ", "ბ", "ჰ");
    //Greek
    $allletters['Greek'] = array("ς", "ε", "ρ", "τ", "υ", "θ", "ι", "ο", "π", "α", "σ", "δ", "φ", "γ", "η", "ξ", "κ", "λ", "ζ", "χ", "ψ", "ω", "β", "ν", "μ");
    //Gujarati
    $allletters['Gujarati'] = array("ૃ", "ૌ", "ૈ", "ા", "ી", "ૂ", "બ", "હ", "ગ", "દ", "જ", "ડ", "઼", "ૉ", "ો", "ે", "્", "િ", "ુ", "પ", "ર", "ક", "ત", "ચ", "ટ", "ં", "મ", "ન", "વ", "લ", "સ", "ય");
    //Hindi
    $allletters['Hindi'] = array("ृ", "ौ", "ै", "ा", "ी", "ू", "ब", "ह", "ग", "द", "ज", "ड", "़", "ॉ", "ो", "े", "्", "ि", "ु", "प", "र", "क", "त", "च", "ट", "ॉ", "ं", "म", "न", "व", "ल", "स", "य");
    //Hungarian
    $allletters['Hungarian'] = array("ö", "ü", "ó", "q", "w", "e", "r", "t", "z", "u", "i", "o", "p", "ő", "ú", "ű", "a", "s", "d", "f", "g", "h", "j", "k", "l", "é", "á", "ű", "y", "x", "c", "v", "b", "n", "m");
    //Irish
    $allletters['Irish'] = $en;
    //Italian
    $allletters['Italian'] = array("ì", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "è", "ù", "a", "s", "d", "f", "g", "h", "j", "k", "l", "ò", "à", "z", "x", "c", "v", "b", "n", "m");
    //Japanese
    $allletters['Japanese'] = array("ろ", "ぬ", "ふ", "あ", "う", "え", "お", "や", "ゆ", "よ", "わ", "ほ", "へ", "た", "て", "い", "す", "か", "ん", "な", "に", "ら", "せ", "゛", "゜", "む", "ち", "と", "し", "は", "き", "く", "ま", "の", "り", "れ", "け", "む", "つ", "さ", "そ", "ひ", "こ", "み", "も", "ね", "る", "め");
    //Kannada
    $allletters['Kannada'] = array("ೊ", "ೃ", "ೌ", "ೈ", "ಾ", "ೀ", "ೂ", "ಬ", "ಹ", "ಗ", "ದ", "ಜ", "ಡ", "ೋ", "ೇ", "್", "ಿ", "ು", "ಪ", "ರ", "ಕ", "ತ", "ಚ", "ಟ", "ೆ", "ಂ", "ಮ", "ನ", "ವ", "ಲ", "ಸ", ",", ".", "ಯ", "ಒ", "ಃ", "ಋ", "ಔ", "ಐ", "ಆ", "ಈ", "ಊ", "ಭ", "ಙ", "ಘ", "ಧ", "ಝ", "ಢ", "ಞ", "ಓ", "ಏ", "ಅ", "ಇ", "ಉ", "ಫ", "ಱ", "ಖ", "ಥ", "ಛ", "ಠ", "ಎ", "ಣ", "ಳ", "ಶ", "ಷ");
    //Kazakh
    $allletters['Kazakh'] = array("ә", "і", "ң", "ғ", ",", ".", "ү", "ұ", "қ", "ө", "һ", "й", "ц", "у", "к", "е", "н", "г", "ш", "щ", "з", "х", "ъ", "ф", "ы", "в", "а", "п", "р", "о", "л", "д", "ж", "э", "я", "ч", "с", "м", "и", "т", "ь", "б", "ю", "№", "!", "Ә", "І", "Ң", "Ғ", "Ү", "Ұ", "Қ", "Ө", "Һ", "Й", "Ц", "У", "К", "Е", "Н", "Г", "Ш", "Щ", "З", "Х", "Ъ", "Ф", "Ы", "В", "А", "П", "Р", "О", "Л", "Д", "Ж", "Э", "Я", "Ч", "С", "М", "И", "Т", "Ь", "Б", "Ю");
    //Khmer
    $allletters['Khmer'] = array("១", "២", "៣", "៤", "៥", "៦", "៧", "៨", "៩", "០", "គ", "ធ", "ឆ", "ឹ", "េ", "រ", "ត", "យ", "ុ", "ិ", "ោ", "ផ", "ៀ", "ឨ", "ឮ", "ា", "ស", "ដ", "ថ", "ង", "ហ", "្", "ក", "ល", "ើ", "់", "ឋ", "ខ", "ច", "វ", "ប", "ន", "ម", "ំុ", "។", "៊​", "៛", "%", "៌", "័", "៏", "៝", "ឪ", "ឈ", "ឺ", "ែ", "ឬ", "ទ", "ួ", "ូ", "ី", "ៅ", "ភ", "ឿ", "ឧ", "ឭ", "ាំ", "ៃ", "ឌ", "ឣ", "ះ", "ញ", "ឡ", "ោៈ", "៉", "ឍ", "ឃ", "ជ", "េះ", "ព", "ណ", "ំ", "ុះ", "៕");
    //Khowar
    $allletters['Khowar'] = array("ﺃ", "۴", "۵", "۶", "ق", "و", "ع", "ر", "ت", "ے", "ء", "ی", "ہ", "پ", "ئ", "نگ", "س", "د", "ف", "گ", "ح", "ج", "ک", "ل", "ز", "ش", "چ", "ط", "ب", "ن", "م", "څ", "ځ", "ݲ", "ڵ", "ڑ", "ٹ", "ڇ", "ڗ", "ټ", "ڂ", "ڼ", "ڠ", "مﬞ", "|", "آ", "ص", "ڈ", "ݯ", "غ", "ھ", "ض", "خ", "ٷ", ":", "ذ", "ژ", "ث", "ظ", "ݱ", "ڨ", "ݰ", "٫");
    //Korean
    $allletters['Korean'] = array("ㅂ", "ㅈ", "ㄷ", "ㄱ", "ㅅ", "ㅛ", "ㅕ", "ㅑ", "ㅐ", "ㅔ", "ㅁ", "ㄴ", "ㅇ", "ㄹ", "ㅎ", "ㅗ", "ㅓ", "ㅏ", "ㅋ", "ㅌ", "ㅊ", "ㅍ", "ㅠ", "ㅜ", "ㅡ", "ㅃ", "ㅉ", "ㄸ", "ㄲ", "ㅆ", "ㅒ", "ㅖ");
    //Kurdish
    $allletters['Kurdish'] = array("١", "وو", "ي", "ڕ", "ط", "ێ", "ء", "ح", "ٶ", "ث", "|", "آ", "ش", "ذ", "إ", "غ", "أ", "ك", "ڵ", "ض", "ص", "چ", "ظ", "ى", "ة", "ـ");
    //Lao
    $allletters['Lao'] = array("ຢ", "ຟ", "ໂ", "ຖ", "ຸ", "ູ", "ຄ", "ຕ", "ຈ", "ຂ", "ຊ", "ໍ", "ົ", "ໄ", "ຳ", "ພ", "ະ", "ິ", "ີ", "ຮ", "ນ", "ຍ", "ບ", "ລ", "“", "ັ", "ຫ", "ກ", "ດ", "ເ", "້", "່", "າ", "ສ", "ວ", "ງ", "ຜ", "ປ", "ແ", "ອ", "ຶ", " ື", "ທ", "ມ", "ໃ", "ຝ", "/", "໑", "໒", "໓", "໔", "໌", "ຼ", "໕", "໖", "໗", "໘", "໙", "ໍ່", "ົ້", "໐", "ຳ້", "ິ້", "ີ້", "ຣ", "ໜ", "ຽ", "ຫຼ", "ັ້", "໊", "໋", "₭", "(", "ຯ", "ຶ້", "ື້", "ໆ", "ໝ");
    //Latvian
    $allletters['Latvian'] = array("f", "ū", "g", "j", "r", "m", "v", "n", "z", "ē", "č", "ž", "h", "ķ", "š", "u", "s", "i", "l", "d", "a", "t", "e", "c", "ģ", "ņ", "b", "ī", "k", "p", "o", "ā", "ļ");
    //Lithuanian
    $allletters['Lithuanian'] = array("ą", "č", "ę", "ė", "į", "š", "ų", "ū", "ž", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "a", "s", "d", "f", "g", "h", "j", "k", "l", "z", "x", "c", "v", "b", "n", "m");
    $allletters['Malayalam'] = array("ൊ", "ൃ", "ൌ", "ൈ", "ാ", "ീ", "ൂ", "ബ", "ഹ", "ഗ", "ദ", "ജ", "ഡ", "c", "ോ", "േ", "്", "ി", "ു", "പ", "ര", "ക", "ത", "ച", "ട", "െ", "ം", "മ", "ന", "വ", "ല", "സ", ",", ".", "യ", "ഒ", "ഃ", "ഋ", "ഔ", "ഐ", "ആ", "ഈ", "ഊ", "ഭ", "ങ", "ഘ", "ധ", "ഝ", "ഢ", "ഞ", "ഓ", "ഏ", "അ", "ഇ", "ഉ", "ഫ", "റ", "ഖ", "ഥ", "ഛ", "ഠ", "എ", "ണ", "ഴ", "ള", "ശ", "ഷ");
    $allletters['Marathi'] = array("१", "२", "३", "४", "५", "६", "७", "८", "९", "०", "ृ", "ौ", "ै", "ा", "ी", "ू", "ब", "ह", "ग", "द", "ज", "ड", "़", "ॉ", "ो", "े", "्", "ि", "ु", "प", "र", "क", "त", "च", "ट", "ं", "म", "न", "व", "ल", "स", "य", "ऍ", "ॅ", "ः", "ऋ", "औ", "ऐ", "आ", "ई", "ऊ", "भ", "ङ", "घ", "ध", "झ", "ढ", "ञ", "ऑ", "ओ", "ए", "अ", "इ", "उ", "फ", "ऱ", "ख", "थ", "छ", "ठ", "ँ", "ण", "ळ", "श", "ष", "य़");
    $allletters['Nepali'] = array("ञ", "घ", "ङ", "झ", "छ", "ट", "ठ", "ड", "ढ", "ण", "ध", "भ", "च", "त", "थ", "ग", "ष", "य", "उ", "ृ", "े", "ब", "क", "म", "ा", "न", "ज", "व", "प", "ि", "स", "ु", "श", "ह", "अ", "ख", "द", "ल", "फ", "र", "१", "२", "३", "४", "५", "६", "७", "८", "९", "०", "ं", "ो", "इ", "ए", "ै", "्", "ँ", "ी", "ू", "ऋ");
    $allletters['Norwegian'] = array("q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "å", "a", "s", "d", "f", "g", "h", "j", "k", "l", "ø", "æ", "z", "x", "c", "v", "b", "n", "m", "§");
    $allletters['Oriya'] = array("ୃ", "ୌ", "ୈ", "ା", "ୀ", "ୂ", "ବ", "ହ", "ଗ", "ଦ", "ଜ", "ଡ", "଼", "ୋ", "େ", "୍", "ି", "ୁ", "ପ", "ର", "କ", "ତ", "ଚ", "ଟ", "ୟ", "ଂ", "ମ", "ନ", "ଲ", "ସ", "ଯ", "@", "୍ର", "ର୍", "ଜ୍ଞ", "ତ୍ର", "କ୍ଷ", "ଶ୍ର", "(", ")", "ଃ", "ଋ", "ଔ", "ଐ", "ଆ", "ଈ", "ଊ", "ଭ", "ଙ", "ଘ", "ଧ", "ଝ", "ଢ", "ଞ", "|", "ଓ", "ଏ", "ଅ", "ଇ", "ଉ", "ଫ", "j", "ଖ", "ଥ", "ଛ", "ଠ", "ୱ", "ଁ", "ଣ", "v", "b", "ଳ", "ଶ", "ଷ", "ଯ଼");
    $allletters['Polish'] = array("q", "w", "e", "r", "t", "z", "u", "i", "o", "p", "ż", "ś", "ó", "a", "s", "d", "f", "g", "h", "j", "k", "l", "ł", "ą", "y", "x", "c", "v", "b", "n", "m", "ń", "ć", "ź", "ę");
    $allletters['Punjabi'] = array("ੌ", "ੈ", "ਾ", "ੀ", "ੂ", "ਬ", "ਹ", "ਗ", "ਦ", "ਜ", "ਡ", "਼", "ੋ", "ੇ", "੍", "ਿ", "ੁ", "ਪ", "ਰ", "ਕ", "ਤ", "ਚ", "ਟ", "ੰ", "ਮ", "ਨ", "ਵ", "ਲ", "ਸ", "ਯ", "ੱ", "ਔ", "ਐ", "ਆ", "ਈ", "ਊ", "ਭ", "ਙ", "ਘ", "ਧ", "ਝ", "ਢ", "ਞ", "ਓ", "ਏ", "ਅ", "ਇ", "ਉ", "ਫ", "ਖ", "ਥ", "ਛ", "ਠ", "ਂ", "ਣ", "ੲ", "ਲ਼", "ਸ਼");
    $allletters['Romanian'] = array("q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "ă", "î", "â", "a", "s", "d", "f", "g", "h", "j", "k", "l", "ș", "ț", "z", "x", "c", "v", "b", "n", "m");
    $allletters['Sinhala'] = array("්‍ර", "ු", "අ", "ැ", "ර", "ඒ", "හ", "ම", "ස", "ද", "ච", "ඤ", "්", "ි", "ා", "ෙ", "ට", "ය", "ව", "න", "ක", "ත", "ං", "ජ", "ඩ", "ඉ", "බ", "ප", "ල", "ග", "/", "ර්‍", "ූ", "උ", "ෑ", "ඍ", "ඔ", "ශ", "ඹ", "ෂ", "ධ", "ඡ", "ඥ", "ෟ", "ී", "ෘ", "ෆ", "ඨ", "්‍ය", "ළු", "ණ", "ඛ", "ථ", "ඃ", "ඣ", "ඪ", "ඊ", "භ", "ඵ", "ළ", "ඝ");
    $allletters['Slovak'] = array("ľ", "š", "č", "ť", "ž", "ý", "á", "í", "é", "q", "w", "e", "r", "t", "z", "u", "i", "o", "p", "ú", "ä", "ň", "a", "s", "d", "f", "g", "h", "j", "k", "l", "ô", "§", "y", "x", "c", "v", "b", "n", "m");
    $allletters['Slovenian'] = array("q", "w", "e", "r", "t", "z", "u", "i", "o", "p", "š", "đ", "ž", "a", "s", "d", "f", "g", "h", "j", "k", "l", "č", "ć", "y", "x", "c", "v", "b", "n", "m");
    $allletters['Tamil'] = array("ஆ", "ஈ", "ஊ", "ஐ", "ஏ", "ள", "ற", "ன", "ட", "ண", "ச", "ஞ", "அ", "இ", "உ", "்", "எ", "க", "ப", "ம", "த", "ந", "ய", "ஔ", "ஓ", "ஒ", "வ", "ங", "ல", "ர", "ஸ", "ஷ", "ஜ", "ஹ", "க்ஷ", "ஸ்ரீ", "ஶ", "i", "௹", "௺", "௸", "ஃ", "g", "h", "j", "௳", "௴", "௵", "௶", "௷", "n");
    $allletters['Telugu'] = array("ృ", "ౌ", "ై", "ా", "ీ", "ూ", "బ", "హ", "గ", "ద", "జ", "డ", "ో", "ే", "్", "ి", "ు", "ప", "ర", "క", "త", "చ", "ట", "ె", "ం", "మ", "న", "వ", "ల", "స", "య", "ఒ", "ఋ", "ఔ", "ఐ", "ఆ", "ఈ", "ఊ", "భ", "ఙ", "ఘ", "ధ", "ఝ", "ఢ", "ఞ", "ఓ", "ఏ", "అ", "ఇ", "ఉ", "ఫ", "ఱ", "ఖ", "థ", "ఛ", "ఠ", "ఎ", "ఁ", "ణ", "న", "ళ", "శ", "ష");
    $allletters['Tibetan'] = array("ཨ", "༡", "༢", "༣", "༤", "༥", "༦", "༧", "༨", "༩", "༠", "ཧ", "ཝ", "ཅ", "ཆ", "ེ", "ར", "ཏ", "ཡ", "ུ", "ི", "ོ", "ཕ", "ཙ", "ཚ", "ཛ", "འ", "ས", "ད", "བ", "ང", "མ", "་", "ག", "ལ", "ཞ", "།", "ཟ", "ཤ", "ཀ", "ཁ", "པ", "ན", "྅", "ཐ", "ཇ", "ཉ", "༁", "༪", "༫", "༬", "༭", "༮", "༯", "༰", "༱", "༲", "༳", "༼", "༽", "༕", "༖", "༗", "ྼ", "ཊ", "ྻ", "༘", "༙", "ཌ", "༾", "༿", "࿏", "༂", "༃", "༆", "༇", "༸", "༞", "༴", "ཥ", "ཀྵ", "ཎ", "༹", "ཋ", "༺", "༻");
    $allletters['Thai'] = array("ภ", "ถ", "ุ", "ึ", "ค", "ต", "จ", "ข", "ช", "ๆ", "ไ", "ำ", "พ", "ะ", "ั", "ี", "ร", "น", "ย", "บ", "ล", "ฃ", "ฟ", "ห", "ก", "ด", "เ", "้", "่", "า", "ส", "ว", "ง", "ฃ", "ผ", "ป", "แ", "อ", "ิ", "ื", "ท", "ม", "ใ", "ฝ", "๑", "๒", "๓", "๔", "ู", "฿", "๕", "๖", "๗", "๘", "๙", "๐", "ฎ", "ฑ", "ธ", "ํ", "๊", "ณ", "ฯ", "ญ", "ฐ", "ฅ", "ฤ", "ฆ", "ฏ", "โ", "ฌ", "็", "๋", "ษ", "ศ", "ซ", "ฅ", "ฉ", "ฮ", "ฺ", "์", "ฒ", "ฬ", "ฦ");
    $allletters['Turkish'] = array("q", "w", "e", "r", "t", "y", "u", "ı", "o", "p", "ğ", "ü", "a", "s", "d", "f", "g", "h", "j", "k", "l", "ş", "i", "z", "x", "c", "v", "b", "n", "m", "ö", "ç", "é", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "ğ", "ü", "a", "s", "d", "f", "g", "h", "j", "k", "l", "ş", "i", "z", "x", "c", "v", "b", "n", "m", "ö", "ç");
    $allletters['Urdu'] = array("ط", "ص", "ھ", "د", "ٹ", "پ", "ت", "ب", "ج", "ح", "م", "و", "ر", "ن", "ل", "ا", "ک", "ی", "ق", "ف", "س", "ش", "غ", "ع", "ظ", "ض", "ذ", "ڈ", "ث", "چ", "خ", "ژ", "ز", "ڑ", "ں", "ء", "آ", "گ", "ي", "ۓ", "‎", "ؤ", "ئ");
    $allletters['Ukrainian'] = array("й", "ц", "у", "к", "е", "н", "г", "ш", "щ", "з", "х", "ї", "ф", "і", "в", "а", "п", "р", "о", "л", "д", "ж", "є", "ґ", "я", "ч", "с", "м", "и", "т", "ь", "б", "ю", "₴", "№");
    $allletters['Uzbek'] = array("ё", "ғ", "ҳ", "й", "ц", "у", "к", "е", "н", "г", "ш", "ў", "з", "х", "ъ", "ф", "қ", "в", "а", "п", "р", "о", "л", "д", "ж", "э", "я", "ч", "с", "м", "и", "т", "ь", "б", "ю", "ё", "№", "ғ", "ҳ", "й", "ц", "у", "к", "е", "н", "г", "ш", "ў", "з", "х", "ф", "қ", "в", "а", "п", "р", "о", "л", "д", "ж", "э", "я", "ч", "с", "м", "и", "т", "ь", "б", "ю");
    $allletters['Vietnamese'] = array("ă", "â", "ê", "ô", "̀", "̉", "̃", "́", "̣", "đ", "₫", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "ư", "ơ", "a", "s", "d", "f", "g", "h", "j", "k", "l", "z", "x", "c", "v", "b", "n", "m");
    $wp_keyword_tool_google = get_option('wp_keyword_tool_google', 'google.com');
    $wp_keyword_tool_alphabets = get_option('wp_keyword_tool_alphabets', 'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z');
    ?>

<div class="wrap">
    <div style="margin-left:8px" class="icon32" id="icon-options-general">
        <br>
    </div>
    <h2><?php 
    _e('Keyword tool for wordpress settings', 'wp_keyword_tool');
    ?>
</h2>
    <!--before  container-->
    <div class="metabox-holder" id="dashboard-widgets">
        <div style="width:49%;" class="postbox-container">
            <div style="min-height:1px;" class="meta-box-sortables ui-sortable" id="normal-sortables">
                <div class="postbox" id="dashboard_right_now">
                    <h3 class="hndle">
                        <span><?php 
    _e('General settings', 'wp_keyword_tool');
    ?>
</span>
                    </h3>
                    <div class="inside main" style="padding-bottom:20px">
                        <!--/ before container-->
                        
                        	<div class="TTWForm-container-funny-fb ">
                        	      <form novalidate="" method="POST" class="TTWForm-funny-fb">
                        	      	
                        	      	
                        	      	<div class="TTWForm">                     
										
										<div class="field f_100" >
											<label>
												<?php 
    _e('Google Site', 'wp_keyword_tool');
    ?>
 :
											</label>
											<select name="wp_keyword_tool_google" >
												
												<?php 
    $googles = "google.com google.ad google.ae google.com.af google.com.ag google.com.ai google.al google.am google.co.ao google.com.ar google.as google.at google.com.au google.az google.ba google.com.bd google.be google.bf google.bg google.com.bh google.bi google.bj google.com.bn google.com.bo google.com.br google.bs google.bt google.co.bw google.by google.com.bz google.ca google.cd google.cf google.cg google.ch google.ci google.co.ck google.cl google.cm google.cn google.com.co google.co.cr google.com.cu google.cv google.com.cy google.cz google.de google.dj google.dk google.dm google.com.do google.dz google.com.ec google.ee google.com.eg google.es google.com.et google.fi google.com.fj google.fm google.fr google.ga google.ge google.gg google.com.gh google.com.gi google.gl google.gm google.gp google.gr google.com.gt google.gy google.com.hk google.hn google.hr google.ht google.hu google.co.id google.ie google.co.il google.im google.co.in google.iq google.is google.it google.je google.com.jm google.jo google.co.jp google.co.ke google.com.kh google.ki google.kg google.co.kr google.com.kw google.kz google.la google.com.lb google.li google.lk google.co.ls google.lt google.lu google.lv google.com.ly google.co.ma google.md google.me google.mg google.mk google.ml google.com.mm google.mn google.ms google.com.mt google.mu google.mv google.mw google.com.mx google.com.my google.co.mz google.com.na google.com.nf google.com.ng google.com.ni google.ne google.nl google.no google.com.np google.nr google.nu google.co.nz google.com.om google.com.pa google.com.pe google.com.pg google.com.ph google.com.pk google.pl google.pn google.com.pr google.ps google.pt google.com.py google.com.qa google.ro google.ru google.rw google.com.sa google.com.sb google.sc google.se google.com.sg google.sh google.si google.sk google.com.sl google.sn google.so google.sm google.st google.com.sv google.td google.tg google.co.th google.com.tj google.tk google.tl google.tm google.tn google.to google.com.tr google.tt google.com.tw google.co.tz google.com.ua google.co.ug google.co.uk google.com.uy google.co.uz google.com.vc google.co.ve google.vg google.co.vi google.com.vn google.vu google.ws google.rs google.co.za google.co.zm google.co.zw google.cat ";
    $arr = explode(' ', $googles);
    $arr = array_filter($arr);
    foreach ($arr as $google) {
        ?>
														<option  value="<?php 
        echo $google;
        ?>
"  <?php 
        opt_selected($google, $wp_keyword_tool_google);
        ?>
 ><?php 
        echo $google;
        ?>
</option>
														<?php 
    }
    ?>
												
												
												
											</select>

										</div>
										
										<div style="margin-top:10px;position:relative;">
										
										<div style="float:left;width:33%" id="field-wp_keyword_tool_alphabets-container" class="field f_100" >
											<label for="field-wp_keyword_tool_alphabets">
												Language letters
											</label>
											<br><textarea style="width:100%; height: 125px;" required="required" rows="5" cols="20" name="wp_keyword_tool_alphabets" id="field-wp_keyword_tool_alphabets"><?php 
    echo $wp_keyword_tool_alphabets;
    ?>
</textarea>
										</div> 
										
										
										<div style="width:30%;margin-top:20px;margin-left:10px;float:left"  id="field-language-container" class="field f_100" >
											
											<select style="width:100%;height:125px" name="language" size="6" id="field1zz">
												 
											</select>
										</div>
										
										<div style="float: left; display: inline; width: 30%; margin-left: 10px;margin-top:20px">
											<p><small style="width:100%"><i style="width:100%"><?php 
    _e('Select your language from the list to get the letters if your language is not in the list add your language letters manually comma separated like a,b,c,... etc', 'wp_keyword_tool');
    ?>
</i></small></p>
										</div>
                        	      		
                        	      		<div class="clear"></div>
                        	      		</div>
                        	      		
                        	      		
                        	      	
		                        	      	<div id="form-submit" class="field f_100   submit">
		                        	      	    <input name="submit" value="<?php 
    _e('Save options', 'wp_keyword_tool');
    ?>
" type="submit">
		                        	      	</div>
                        	      	</div>
                        	      	
                        	      	 
                        	      </div><!--/TTWForm-->
                        	</div><!--/TTWForm-contain-->
                        
                        <!--after container-->
                        <div style="clear:both"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- / start container-->
 

<div class="clear"></div>

<script type="text/javascript">
												
var alllangs= <?php 
    echo json_encode($allletters);
    ?>
;
jQuery.each(alllangs,function(k,v){
    
    jQuery('#field1zz').append('<option  value="'+ k +'" >'+k+'</option>')  ;

});
    
</script> 

<?php 
}
Example #4
0
function wp_auto_spinner_settings()
{
    ?>

<?php 
    // update options on post
    if (isset($_POST['submit'])) {
        if (!isset($_POST['wp_auto_spin'])) {
            update_option('wp_auto_spin', array());
        } else {
            update_option('wp_auto_spin', $_POST['wp_auto_spin']);
        }
        if (!isset($_POST['post_category'])) {
            update_option('wp_auto_spin_execl', array());
        } else {
            update_option('wp_auto_spin_execl', $_POST['post_category']);
        }
        update_option('wp_auto_spinner_lang', $_POST['wp_auto_spinner_lang']);
        update_option('wp_auto_spinner_execlude', $_POST['wp_auto_spinner_execlude']);
        echo '<div class="updated" style="width:252px;margin:20px 0 10px 0px ; " id="message"><p>Options updated successfully </p></div>';
    }
    //data
    $wp_auto_spinner_lang = get_option('wp_auto_spinner_lang', 'en');
    $wp_auto_spinner_execlude = get_option('wp_auto_spinner_execlude', '');
    ?>

<div class="error">
    					<p><?php 
    echo '<strong>Important Notice :</strong> Automatically spinned posts get spinned when <strong>viewed from the front end </strong>. i.e the spinned post first visitor (including bots) is the one who trigger the spinning action .';
    ?>
</p>
</div> 


<div class="wrap">
    <div style="margin-left:8px" class="icon32" id="icon-options-general">
        <br>
    </div>
    <h2>Wordpress Auto Spinner Settings</h2>
    <!--before  container-->
    <div class="metabox-holder" id="dashboard-widgets">
        <div style="width:49%;" class="postbox-container">
            <div style="min-height:1px;" class="meta-box-sortables ui-sortable" id="normal-sortables">
                <div class="postbox" id="dashboard_right_now">
                    <h3 class="hndle">
                        <span>Basic settings</span>
                    </h3>
                    <div class="inside" style="padding-bottom:20px">
                        <!--/ before container-->
                        
                        	<div class="TTWForm-container-auto-spin">
                        	      <form method="POST" class="TTWForm-auto-spin">
                        	      	
                        	      	<div id="field-wp_auto_spin_active-container" class="field f_100" >
                        	      	     <div style="margin-bottom:10px" class="option clearfix">
                        	      	         <input     name="wp_auto_spin[]" id="field-wp_auto_spin_active-1" value="OPT_AUTO_SPIN_ACTIVE" type="checkbox">     
                        	      	          <span class="option-title">
                        	      	 			 Activate automatic spin for posts
                        	      	          </span>
                        	      	     </div>
                        	      	     
                        	      	      <div  style="margin-bottom:10px" class="option clearfix">
                        	      	         <input     name="wp_auto_spin[]" id="field-wp_auto_spin_active-1" value="OPT_AUTO_SPIN_ACTIVE_TTL" type="checkbox">     
                        	      	          <span class="option-title">
                        	      	 			 When automatically spinning an article spin post title also .
                        	      	          </span>
                        	      	     </div>

                        	      	     <div style="margin-bottom:10px" class="option clearfix">
                        	      	         <input     name="wp_auto_spin[]" id="field-wp_auto_spin_active-1" value="OPT_AUTO_SPIN_SLUG" type="checkbox">     
                        	      	          <span class="option-title">
                        	      	 			 Spin the post slug ? (permalink)
                        	      	          </span>
                        	      	     </div>                         	      	     

 
                        	      	     
                        	      	     <div class="option clearfix">
                        	      	         <input     name="wp_auto_spin[]" id="field-wp_auto_spin_active-1" value="OPT_AUTO_SPIN_ACTIVE_MANUAL" type="checkbox">     
                        	      	          <span class="option-title">
                        	      	 			 Also automatically spin articles I manually write <p>
                        	      	 			 <i>(this will spin posts you are writing manually so when you write and preview post it will get spinned instantly)(not recommended)</i>   .</p>
                        	      	          </span>
                        	      	     </div>
                        	      	     

                        	      	     
                        	      	</div>
                        	      	
                        	      	
                        	      	<div id="field-wp_auto_spinner_lang-container" class="field f_100" >
										<label for="field-wp_auto_spinner_lang">
											Treasures Language :
										</label>
										<select name="wp_auto_spinner_lang" id="field1zz">
											<option  value="en"  <?php 
    opt_selected('en', $wp_auto_spinner_lang);
    ?>
 >English</option> 
											<option  value="du"  <?php 
    opt_selected('du', $wp_auto_spinner_lang);
    ?>
 >Dutch</option>
											<option  value="ge"  <?php 
    opt_selected('ge', $wp_auto_spinner_lang);
    ?>
 >German</option>
											<option  value="fr"  <?php 
    opt_selected('fr', $wp_auto_spinner_lang);
    ?>
 >French</option>
											<option  value="sp"  <?php 
    opt_selected('sp', $wp_auto_spinner_lang);
    ?>
 >Spanish</option>
											<option  value="po"  <?php 
    opt_selected('po', $wp_auto_spinner_lang);
    ?>
 >Portuguese</option>
											<option  value="ro"  <?php 
    opt_selected('ro', $wp_auto_spinner_lang);
    ?>
 >Romanian</option>
				 					
										
										</select>
									</div>
                        	      	
 
                        	      	<div id="form-submit" class="field f_100   submit">
                        	      	    <input name="submit" value="Save Options" type="submit">
                        	      	</div>
                        	      	
                        	      	
                        	      	 
                        	      </div><!--/TTWForm-->
                        	</div><!--/TTWForm-contain-->
                        
                        <!--after container-->
                        <div style="clear:both"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- / start container-->
 
 <div class="clear"></div>
     <!--before  container-->
    <div class="metabox-holder" id="dashboard-widgets">
        <div style="width:49%;" class="postbox-container">
            <div style="min-height:1px;" class="meta-box-sortables ui-sortable" id="normal-sortables">
                 	
                        	      	<div id="categorydiv" class="postbox " style="margin-top:20px">
										<div class="handlediv" title="Click to toggle"><br></div><h3 class="hndle"><span>Execlude these categories from auto spinning</span></h3>
										<div class="inside">
											<div id="taxonomy-category" class="categorydiv">	 
												<div id="category-all" class="tabs-panel">
													<input type="hidden" name="post_category[]" value="0">			<ul id="categorychecklist" data-wp-lists="list:category" class="categorychecklist form-no-clear">								
														<?php 
    wp_category_checklist();
    ?>
													</ul>
												</div>
														
											</div>
											
											
											
										</div>
									 </div>
									 
									 
									 
                </div>
            </div>
        </div>
   
    <!-- / start container-->
  <div class="clear"></div>

     <!--before  container-->
    <div class="metabox-holder" id="dashboard-widgets">
        <div style="width:49%;" class="postbox-container">
            <div style="min-height:1px;" class="meta-box-sortables ui-sortable" id="normal-sortables">
                 	
                        	      	<div id="categorydiv" class="postbox " style="margin-top:20px">
									<div class="handlediv" title="Click to toggle"><br></div><h3 class="hndle"><span>Reserved words </span></h3>
									<div class="inside">
										<div id="taxonomy-category" class="categorydiv">
											
									
											<div id="field-wp_auto_spinner_execlude-container" class="field f_100" >
			                        	    	<label for="field-wp_auto_spinner_execlude">
			                        	    		Execlude these words from being spinned (one per line)
			                        	    	</label>
			                        	    	<br><textarea  rows="5" cols="20" name="wp_auto_spinner_execlude" id="field-wp_auto_spinner_execlude"><?php 
    echo $wp_auto_spinner_execlude;
    ?>
</textarea>
			                        	    </div> 
									 
										</div>
									</div>
									</div>
                </div>
            </div>
        </div>
   
    <!-- / start container-->
  <div class="clear"></div>  
                         	    
  



<?php 
}
Example #5
0
function wp_auto_spinner_log()
{
    // DB
    global $wpdb;
    //FILTER
    $filter = "";
    if (isset($_POST['action_type'])) {
        $act = $_POST['action_type'];
        if ($act == 'Error') {
            $action = " action like '%Error%' ";
        } elseif ($act == 'approved') {
            $action = " action like 'Comment approved%'";
        }
    } else {
        $action = '';
    }
    if ($action != '') {
        if ($filter == '') {
            $filter = " where {$action}";
        } else {
            $filter .= " and {$action}";
        }
    }
    // records number
    if (isset($_POST['number'])) {
        $num = $_POST['number'];
    } else {
        $num = '100';
    }
    // define limit
    $limit = '';
    if (is_numeric($num)) {
        $limit = " limit {$num} ";
    }
    $qdate = '';
    // finally date filters `date` >= str_to_date( '07/03/11', '%m/%d/%y' )
    if (isset($_POST['from']) && $_POST['from'] != '') {
        $from = $_POST['from'];
        $qdate = " `date` >= str_to_date( '{$from}', '%m/%d/%y' )";
    }
    if (isset($_POST['to']) && $_POST['to'] != '') {
        $to = $_POST['to'];
        if ($qdate == '') {
            $qdate .= " `date` <= str_to_date( '{$to}', '%m/%d/%y' )";
        } else {
            $qdate .= " and `date` <= str_to_date( '{$to}', '%m/%d/%y' )";
        }
    }
    if ($qdate != '') {
        if ($filter == '') {
            $filter = " where {$qdate}";
        } else {
            $filter .= "and {$qdate}";
        }
    }
    $query = "SELECT * FROM wp_auto_spinner_log {$filter} ORDER BY id DESC {$limit}";
    $res = $wpdb->get_results($query);
    ?>

 
<style>
.ttw-date {
	width: 81px;
}

.Publish{
	background: none repeat scroll 0 0 #AAAAAA;
    color: #FFFFFF !important;
}

.Publish td{
	color:#FFFFFF !important;
}

</style>
<div class="wrap">
	<div class="icon32" id="icon-edit-comments">
		<br>
	</div>
	<h2>Wordpress Auto Spinner action log</h2>
	
	<form method="post" action="">
		<div class="tablenav top">

		 

			<div class="alignleft actions">
				<select name="number">
					<option <?php 
    opt_selected($num, '50');
    ?>
						value="999">Records Number</option>
					<option <?php 
    opt_selected($num, '100');
    ?>
						value="100">100</option>
					<option <?php 
    opt_selected($num, '500');
    ?>
						value="500">500</option>
					<option <?php 
    opt_selected($num, '1000');
    ?>
						value="1000">1000</option>
					<option <?php 
    opt_selected($num, 'all');
    ?>
						value="all">All</option>
				</select> <select name="action_type">
					<option <?php 
    @opt_selected($act, '');
    ?>
						value="">Show all actions</option>
					<option <?php 
    @opt_selected($act, 'Error');
    ?>
						value="Error">Error</option>

				</select>
			</div>
			<div class="clear"></div>
			<div class="alignleft actions" style="margin: 11px 0 11px 0">

				<label for="field1"> From Date: <small><i>(optional)</i> </small> </label>
				<input class="ttw-date date" name="from" id="field1" type="date"
					autocomplete="off"> <label for="field2"> To Date: </label> <input
					class="ttw-date date" name="to" id="field2" type="date"
					autocomplete="off"> <input type="submit" value="Filter"
					class="button-secondary" id="post-query-submit" name="submit">
			</div>




		</div>

		</form>
		
		<div class="clear"></div>
		<?php 
    $lastrun = get_option('wp_auto_spinner_last_run', 1392146043);
    ?>
		<div id="welcome-panel" class="welcome-panel">
			<p style="margin-top: -13px;"><strong>Current</strong> server time is  <strong>( <?php 
    echo date('h:i:s');
    ?>
 )</strong> , Cron last run at <strong>( <?php 
    echo date("h:i:s", $lastrun);
    ?>
 )</strong> this is <strong> ( <?php 
    echo $timdiff = time('now') - $lastrun;
    ?>
 )</strong> seconds ago and it runs every <strong>( 60 )</strong> seconds to process one item from the queue so it should run again after <strong>( <?php 
    echo 60 - $timdiff;
    ?>
 )</strong> seconds.
		</div>
	
		
		<table class="widefat fixed">
			<thead>
				<tr>
					<th class="column-date">Index</th>
					<th class="column-response">Date</th>
					<th class="column-response">Type of action</th>
					<th>Data Processed</th>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<th>index</th>
					<th>Date</th>
					<th>Type of action</th>
					<th>Data Processed</th>
				</tr>
			</tfoot>
			<tbody>

			<?php 
    $i = 1;
    foreach ($res as $rec) {
        $action = $rec->action;
        //filter the data strip keyword
        $datas = explode(';', $rec->data);
        $data = $datas[0];
        if (stristr($action, 'Posted:')) {
            $url = plugins_url() . '/wp-auto-spinner';
            $action = 'New Post';
            //restoring link
        } elseif (stristr($action, 'Processing')) {
            $action = 'Processing Campaign';
        }
        if (stristr($data, 'html')) {
            $data = '<textarea>' . htmlspecialchars($data) . '</textarea>';
        } else {
            //$data=htmlspecialchars( ($data) );
        }
        echo '<tr class="' . $rec->action . '"><td class="column-date">' . $i . '</td><td  class="column-response" style="padding:5px">' . urldecode($rec->date) . '</td><td  class="column-response" style="padding:5px">' . $action . '</td><td  style="padding:5px">' . urldecode($data) . ' </td></tr>';
        $i++;
    }
    ?>
			</tbody>
		</table>

</div>
 


			<?php 
}