/*
Plugin Name: Pingback Optimizer
Plugin URI: http://www.pingbackoptimizer.com
Description: Optimize Your Pingbacks! - Automatically submit your pingback URLs to multiple RSS directories. Boost your search engine rankings and get more traffic!
Version: 2.3
Author:Pingback Optimizer
Author URI:http://www.pingbackoptimizer.com
*/
session_start();
include_once(ABSPATH . 'wp-includes/pluggable.php');
require_once(dirname(__FILE__). '/rss_log.php');
require_once(dirname(__FILE__). '/process_submit.php');
require_once(dirname(__FILE__) . '/php5_functions.php');
require_once(dirname(__FILE__) . '/http_functions.php');
require_once(dirname(__FILE__) . '/curl_functions.php');
require_once(dirname(__FILE__) . '/form_parser.php');
require_once(dirname(__FILE__) . '/string_functions.php');
require_once(dirname(__FILE__) . '/captcha_model.php');
require_once(dirname(__FILE__) . '/simplexml.php');
require_once(dirname(__FILE__) . '/dbc_client.php');
require_once(dirname(__FILE__) . '/feed_generator.php');
require_once(dirname(__FILE__) . '/aggregator_model.php');
require_once(dirname(__FILE__) . '/callback_functions.php');
require_once(dirname(__FILE__) . '/rss_cron_job.php');
require_once(dirname(__FILE__) . '/other_functions.php');
require_once(dirname(__FILE__) . '/rss_database.php');
require_once(dirname(__FILE__) . '/ping_function.php');
ini_set("max_execution_time",25000);
add_action('init','init_variable');
function init_variable()
{
update_option("hwe_plugin_version_pingback","2.3");
update_option("hwe_central_server_path","http://www.pingbackoptimizer.com");
}
add_action('comment_post','fun_comment_backup');
function fun_comment_backup($comment_id)
{
$type=get_comment_type($comment_id);
if($type=='trackback' || $type=='pingback' )
{
global $wpdb;
$tabname1=$wpdb->prefix."plu_comment_backup";
$tabname=$wpdb->prefix."comments";
$sql_sel="select * from $tabname where comment_ID=".$comment_id;
$mysqlq=mysql_query($sql_sel);
while($row=mysql_fetch_array($mysqlq))
{
$commentauthor=$row['comment_author'];
$commentconent=$row['comment_content'];
//remove special character
$commentauthor=strip_tags($commentauthor);
$commentauthor= preg_replace("/?[a-z0-9]{2,8};/i","",$commentauthor);
$commentauthor=cleansee($commentauthor);
$commentauthor=str_replace("'","",$commentauthor);
$commentauthor=str_replace("`","",$commentauthor);
$commentauthor=str_replace(",","",$commentauthor);
$commentauthor=str_replace("|","",$commentauthor);
$commentauthor=str_replace("…","",$commentauthor);
$commentauthor=str_replace("»","",$commentauthor);
$commentauthor=str_replace("-","",$commentauthor);
$commentauthor=str_replace(";","",$commentauthor);
$commentauthor=postname_replace($commentauthor);
$commentconent=strip_tags($commentconent);
$commentconent= preg_replace("/?[a-z0-9]{2,8};/i","",$commentconent);
$commentconent=cleansee($commentconent);
$commentconent=str_replace("'","",$commentconent);
$commentconent=str_replace("`","",$commentconent);
$commentconent=str_replace(",","",$commentconent);
$commentconent=str_replace("|","",$commentconent);
$commentconent=str_replace("…","",$commentconent);
$commentconent=str_replace("»","",$commentconent);
$commentconent=str_replace("-","",$commentconent);
$commentconent=str_replace(";","",$commentconent);
$commentconent=postname_replace($commentconent);
//remove special character
$sql_table1="insert into $tabname1 set comment_id='$comment_id',comment_post_ID='".$row['comment_post_ID']."',comment_author='".$commentauthor."',comment_author_email='".$row['comment_author_email']."',comment_author_url='".$row['comment_author_url']."',comment_author_IP='".$row['comment_author_IP']."',comment_date='".$row['comment_date']."',comment_date_gmt='".$row['comment_date_gmt']."',comment_content='".$commentconent."',comment_karma='".$row['comment_karma']."',comment_agent='".$row['comment_agent']."',comment_type='".$row['comment_type']."',comment_parent='".$row['comment_parent']."',user_id='".$row['user_id']."',status=0,date_status=0 ";
mysql_query($sql_table1);
}
}
}
function cleansee($string)
{
$test = str_replace('"', '\"', strip_tags($string));
$test = ereg_replace("'", "", $string);
return($test);
}
add_action('init','fun_email_smashdfw');
function fun_email_smashdfw()
{
global $wpdb;
$tabname_com_backup=$wpdb->prefix."plu_comment_backup";
$upi = 0;
$updateme = get_option("hwe-to-update");
$updatefeed_randomno=get_option("hwe-to-update-feedrandomno");
if($updateme)
{
$ary_updateme = explode("*",$updateme);
while($upi <= sizeof($ary_updateme))
{
$ary_updateme[$upi];
if($ary_updateme[$upi])
{
$sql_u01="update $tabname_com_backup set status=1,feed_no='$updatefeed_randomno',date_status='".time()."' where id=".$ary_updateme[$upi];
mysql_query($sql_u01);
///send pingback URL mail prepare data
global $wpdb;
$tabname_com_backup1=$wpdb->prefix."plu_comment_backup";
$sq11 = "select comment_author_url from $tabname_com_backup1 where id=".$ary_updateme[$upi];
$posts11 = mysql_query($sq11);
$updateme11="";
while($row11=mysql_fetch_array($posts11))
{
$auturl=$row11['comment_author_url'];
}
$updateme_auturl.=$auturl."\n";
update_option("hwe_mail_pingurl",$updateme_auturl);
///send pingback URL mail prepare data
}
$upi++;
}
//entery feed link with date in table
global $wpdb;
$tabname_feed=$wpdb->prefix."plu_feed_backup";
$feedurl2=get_option('hwe_feed_url');
$sql_u_f="insert into $tabname_feed set date_status=".time().",feed_url='".$feedurl2."'";
mysql_query($sql_u_f);
$hwe_firstmail_no=get_option('hwe_firstmail_no');
if($hwe_firstmail_no==1)
{
//sent mail
global $wpdb;
$ins_tab=$wpdb->prefix."plu_email_option";
$fet_sql="select * from $ins_tab";
$res_fet=mysql_query($fet_sql);
$i=0;
if($res_fet)
{
while($row=mysql_fetch_array($res_fet))
{
$email_option=$row['email_option'];
$e_id=$row['email_id_save'];
$id=$row['id'];
if($email_option==8) // if enable set in configure plugin page
{
send_mail($e_id,$id);
}
$i++;
}
}
}
update_option("hwe_mail_pingurl","");
update_option("hwe-to-update","");
update_option("hwe-to-update-feedrandomno","");
update_option("hwe_firstmail_no",0);
}
$rnow=$_GET['rnow'];//get variable if right now button click on ping back page and if click then run sumbit immediately...
$checkcron=get_option("hwe_check_cron"); // cron time variable get
if($checkcron==1)
{
$curtime=time();
$strtotime_date_mktime_after_next=get_option("hwerun_convert_cron_after_next");
$crontime=get_option("hwerun_convert_cron");
$crondate=date("Y-m-d",$crontime);
$currentdate=date("Y-m-d");
$lastdate=get_option("hwe_lastsend");
}
/*echo "currenttime:'".$curtime."'strtotime_date_mktime_after_next:'".$strtotime_date_mktime_after_next."'currendate:'".$currentdate."'lastdate:'".$lastdate."'";*/
//if match cron run acording to days set in pingback page.
if($curtime >= $strtotime_date_mktime_after_next && $checkcron==1) // cron time variable check
{
$selday=get_option("hwe_selday");
if($selday==100) // if every hour select in configure plugin
{
$nextmail=$strtotime_date_mktime_after_next+60*60;
update_option("hwerun_convert_cron_after_next",$nextmail);
update_option("hwe_lastsend",$currentdate);
update_option("hwe_lastsend_mktime",time());
submit_feeds();
update_option("hwelast_run",time());
}
else// if day select in configure plugin
{
if($lastdate!=$currentdate) //this condition stop submit feed same day.
{
$nextmail=$curtime+$sel_days*24*60*60;
update_option("hwerun_convert_cron_after_next",$nextmail);
update_option("hwe_lastsend",$currentdate);
update_option("hwe_lastsend_mktime",time());
submit_feeds();
update_option("hwelast_run",time());
}
}
}
}
function submit_feeds()
{
$url = "http://www.pingbackoptimizer.com/admin444/plugin_validation.php";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_TIMEOUT, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,"email=".get_option("valid_email")."&api=".get_option("valid_api_key"));
curl_setopt($ch, CURLOPT_VERBOSE, 1);
$rand_feedno = curl_exec($ch);
curl_close($ch);
if($rand_feedno)
{
//$rand_feedno= generateRandomString();
global $wpdb;
$tabname_comment=$wpdb->prefix."comments";
$tabname_com_backup=$wpdb->prefix."plu_comment_backup";
$readurl=get_option('hwe_urlfeed');
if($readurl=="") { $readurl=20; }
$limitread=get_option('hwe_selday');
$sq9 = "select * from $tabname_com_backup where status=0 limit 0,".$readurl;
$posts9 = mysql_query($sq9);
$numrow=0;
$updateme="";
while($row01=mysql_fetch_array($posts9))
{
$id3=$row01['id'];
$updateme.=$id3."*";
$comment_id=$row01['comment_id'];
//comment submit in feed then delete
global $wpdb;
$tabname_comment=$wpdb->prefix."comments";
$sql_del="delete from $tabname_comment where comment_ID=".$comment_id;
mysql_query($sql_del);
$numrow=1;
}
update_option("hwe-to-update",$updateme);
update_option("hwe-to-update-feedrandomno",$rand_feedno);
update_option("hwe_firstmail_no",1);
//for submit on site
$feedurl=get_option('siteurl')."/?feedno=".$rand_feedno;
//for submit on site
update_option("hwe_feed_url",$feedurl);
update_option("hwe_process_mail","");//if new submission then again entry in if condition.
if($numrow>0)
{
$db = new WTG_DB();
$db->createTables();
wtg_installdb_po();
//$postID = $post->ID;
global $logger, $indent;
//$GLOBALS['wtg']['postID'] = $postID;
// works for published post only
// if($post->post_status == 'publish') {
// $wtg_option = get_option('wtg_option');
// if ($wtg_option['pause_posting'] == 0)
// {
//if(!empty($wtg_option['processing']) && $wtg_option['registration']) {
// if($wtg_option['registration']) {
$logger = new WTG_Rss_Log();
$logger->openlog();
$logger->info("A feed was just published(Feedno=$rand_feedno). About to Trigger feed submission session.");
$GLOBALS['wtg']['feedName'] = $feedurl;
if (empty($GLOBALS['wtg']['feedName']))
{
$logger->error("Dump feed FAIL exit");
return;
}
$logger->info("Feed url will be " .$feedurl);
//crear submissions
clear_submission_aggrator();
//submit feeds
update_option("hwe-tmp-feedtitle",get_option('blogname'));
update_option("hwe-tmp-feeddescription",get_option('blogdescription'));
update_option("hwe-tmp-feedurl",$feedurl);
wtg_submit_rss_po($rand_feedno,$feedurl);
$result=wtg_get_version_po(WTG_UPGRADE_VERSION_URL);
$version_message='';
if(version_compare($result, WTG_CURRENT_VERSION, '>'))
{
$version_message="##############################################\nPingback Optimizer Feed Process Report.\n##############################################\n\n";
}
else
{
$version_message="##############################################\nPingback Optimizer Feed Process Report.\n##############################################\n\n";
}
submit_other_site($feedurl);
$logger->closelog();
update_option("hwe_process_mail",$version_message.$logger->get_latest_log_text());
//send mail
global $wpdb;
$ins_tab=$wpdb->prefix."plu_email_option";
$fet_sql="select * from $ins_tab";
$res_fet=mysql_query($fet_sql);
$i=0;
if($res_fet)
{
while($row=mysql_fetch_array($res_fet))
{
$email_option=$row['email_option'];
$e_id=$row['email_id_save'];
$id=$row['id'];
if($email_option==8) // if enable set in configure plugin page
{
send_mail_process($e_id,$id);
}
$i++;
}
}
//for send mail
}
}
}
function clear_submission_aggrator()
{
global $wpdb;
$tabname_com_agg=$wpdb->prefix."_plu_aggregators";
$sq13 = "select * from $tabname_com_agg";
$posts13 = mysql_query($sq13);
while($row13=mysql_fetch_array($posts13))
{
$name=$row13['name'];
$status=get_option("hwe-".$name);
update_option("hwe-".$name,"");
}
update_option("hwe-myrss365.com","");
update_option("hwe-plazoo.com","");
update_option("hwe-blogpulse.com","");
update_option("hwe-feeds2read.net","");
update_option("hwe-devasp.com","");
}
function send_mail_process($eid,$id)
{
$email_from=get_option("hwe_email_form");
if(!$email_from)
{
$email_from = get_option('admin_email');
}
$headers="From:".$email_from."\n";
$headers.="Reply-to:".$email_from."\n";
//send process feed mail
$run_process_mail=get_option("hwe_radiooption");
if($run_process_mail==8)
{
$content_process_mail=get_option("hwe_process_mail");
$len=strlen($content_process_mail);
if($len>200)
{
mail($eid, 'PingbackOptimizer: Feed Submission Process Mail',$content_process_mail, $headers);
}
}
}
function send_mail($eid,$id)
{
$email_from=get_option("hwe_email_form");
if(!$email_from)
{
$email_from = get_option('admin_email');
}
$email_subject = "PingbackOptimizer: Feed Submited Successfully"; // The Subject of the email
$email_message = "Pingback Optimizer! "."\n";
$feedur90=get_option("hwe_feed_url");
$email_message.= "Last submit feed url "."\n";
$email_message.= $feedur90;
$email_message.="\n\n\n\n";
$email_message.= "Last submit pingback URLs "."\n";
$ping_url=get_option("hwe_mail_pingurl");
$email_message.=$ping_url;
$headers="From:".$email_from."\n";
$headers.="Reply-to:".$email_from."\n";
//last feed mail
mail($eid, $email_subject, $email_message, $headers);
}
function fcnCheckForExternalURL($data)
{
$pattern = '/rel="nofollow" (href\="https?\:\/\/(mysite.com[\/"]))/';
$replace = '${1}';
$data = preg_replace($pattern,$replace,$data);
return $data;
}
function generateRandomString($length = 20, $letters = '1234567890QWERTYUIOPASDFGHJKLZXCVBNM')
{
$s = '';
$lettersLength = strlen($letters)-1;
for($i = 0 ; $i < $length ; $i++)
{
$s .= $letters[rand(0,$lettersLength)];
}
return $s;
}
add_action('admin_footer', 'process_exist_ping');
function process_exist_ping()
{
$if_process=get_option("hwe_process_exist_ping");
if($if_process==1)
{
global $wpdb;
$tabname22=$wpdb->prefix."comments";
$sql_sel22="select * from $tabname22 where comment_type='pingback'";
$sql_sel_res22=mysql_query($sql_sel22);
$five_count=1;
while($row22=mysql_fetch_array($sql_sel_res22))
{
if($five_count<=100)// one time 5 ping back process
{
$countrow22=0;
global $wpdb;
$tabname_backup=$wpdb->prefix."plu_comment_backup";
$sql_sel="select * from $tabname_backup where comment_id=".$row22['comment_ID'];
$sql_sel_res=mysql_query($sql_sel);
if($sql_sel_res)
{
$countrow22=mysql_num_rows($sql_sel_res);
}
if($countrow22==0) // not duplicate
{
$commentauthor=$row22['comment_author'];
$commentconent=$row22['comment_content'];
$commentauthor=strip_tags($commentauthor);
$commentauthor= preg_replace("/?[a-z0-9]{2,8};/i","",$commentauthor);
$commentauthor=cleansee($commentauthor);
$commentauthor=str_replace("'","",$commentauthor);
$commentauthor=str_replace("`","",$commentauthor);
$commentauthor=str_replace(",","",$commentauthor);
$commentauthor=str_replace("|","",$commentauthor);
$commentauthor=str_replace("…","",$commentauthor);
$commentauthor=str_replace("»","",$commentauthor);
$commentauthor=str_replace("-","",$commentauthor);
$commentauthor=str_replace(";","",$commentauthor);
$commentauthor=postname_replace($commentauthor);
$commentconent=strip_tags($commentconent);
$commentconent= preg_replace("/?[a-z0-9]{2,8};/i","",$commentconent);
$commentconent=cleansee($commentconent);
$commentconent=str_replace("'","",$commentconent);
$commentconent=str_replace("`","",$commentconent);
$commentconent=str_replace(",","",$commentconent);
$commentconent=str_replace("|","",$commentconent);
$commentconent=str_replace("…","",$commentconent);
$commentconent=str_replace("»","",$commentconent);
$commentconent=str_replace("-","",$commentconent);
$commentconent=str_replace(";","",$commentconent);
$commentconent=postname_replace($commentconent);
$sql_table1="insert into $tabname_backup set comment_id='".$row22['comment_ID']."',comment_post_ID='".$row22['comment_post_ID']."',comment_author='".$commentauthor."',comment_author_email='".$row22['comment_author_email']."',comment_author_url='".$row22['comment_author_url']."',comment_author_IP='".$row22['comment_author_IP']."',comment_date='".$row22['comment_date']."',comment_date_gmt='".$row22['comment_date_gmt']."',comment_content='".$commentconent."',comment_karma='".$row22['comment_karma']."',comment_agent='".$row22['comment_agent']."',comment_type='".$row22['comment_type']."',comment_parent='".$row22['comment_parent']."',user_id='".$row22['user_id']."',status=0,date_status=0 ";
mysql_query($sql_table1);
$five_count++;
}
}
if($five_count>100)
{
break;
}
}
}
}
function postname_replace($str, $replace=array(), $delimiter='-')
{
setlocale(LC_ALL, 'en_US.UTF8');
if( !empty($replace) ) {
$str = str_replace((array)$replace, ' ', $str);
}
$clean = iconv('UTF-8', 'ASCII//TRANSLIT', $str);
$clean = preg_replace("/[^a-zA-Z0-9\/_|+ -]/", '', $clean);
/*$clean = strtolower(trim($clean, '-'));
$clean = preg_replace("/[\/_|+ -]+/", $delimiter, $clean);*/
return $clean;
}
register_activation_hook(__FILE__,"fun_create_table_smashdfw_actovate");
function fun_create_table_smashdfw_actovate()
{
global $wpdb;
$tabname=$wpdb->prefix."plu_email_option";
$sql_table="CREATE TABLE $tabname (
`id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`email_option` INT NOT NULL ,
`email_id_save` TEXT NOT NULL ,
`email_date` VARCHAR(255) NOT NULL
)";
mysql_query($sql_table);
$tabname3=$wpdb->prefix."plu_comment_backup";
$sql_table3="CREATE TABLE $tabname3 (
`id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`comment_id` BIGINT NOT NULL ,
`comment_post_ID` BIGINT NOT NULL ,
`comment_author` tinytext NOT NULL ,
`comment_author_email` VARCHAR(100) NOT NULL,
`comment_author_url` VARCHAR(200) NOT NULL,
`comment_author_IP` VARCHAR(100) NOT NULL,
`comment_date` datetime NOT NULL,
`comment_date_gmt` datetime NOT NULL,
`comment_content` text NOT NULL,
`comment_karma` INT NOT NULL ,
`comment_agent` VARCHAR(255) NOT NULL,
`comment_type` VARCHAR(20) NOT NULL,
`comment_parent` BIGINT NOT NULL,
`user_id` BIGINT NOT NULL,
`status` BIGINT NOT NULL,
`date_status` TEXT NOT NULL ,
`feed_no` TEXT NOT NULL
)";
mysql_query($sql_table3);
$tabname3=$wpdb->prefix."plu_feed_backup";
$sql_table3="CREATE TABLE $tabname3 (
`id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`date_status` TEXT NOT NULL ,
`feed_url` TEXT NOT NULL
)";
mysql_query($sql_table3);
$db = new WTG_DB();
$db->createTables();
wtg_installdb_po();
}
add_action('init',"fun_smashdfw_actovate");
function fun_smashdfw_actovate()
{
$firsttime_setvar=get_option("hwe-firsttime_setvar");
if($firsttime_setvar!=1)
{
update_option("hwe_urlfeed",20);
update_option("hwe_selday",7);
update_option("hwe_txtmail",get_option('admin_email'));
update_option("rss_optimizer_cron",1);
update_option("hwe_license",0);
update_option("hwe_check_cron",0);
update_option("hwe_run_process_mail",1);
update_option("hwe_process_exist_ping",0);
update_option("hwe_firstmail_no",0);
update_option("hwe-firsttime_setvar",1);
}
}
add_action('init',"fun_create_table_smashdfw");
function fun_create_table_smashdfw()
{
global $wpdb;
$tabname=$wpdb->prefix."plu_email_option";
$sql_table="CREATE TABLE IF NOT EXISTS $tabname (
`id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`email_option` INT NOT NULL ,
`email_id_save` TEXT NOT NULL ,
`email_date` VARCHAR(255) NOT NULL
)";
mysql_query($sql_table);
$tabname3=$wpdb->prefix."plu_comment_backup";
$sql_table3="CREATE TABLE IF NOT EXISTS $tabname3 (
`id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`comment_id` BIGINT NOT NULL ,
`comment_post_ID` BIGINT NOT NULL ,
`comment_author` tinytext NOT NULL ,
`comment_author_email` VARCHAR(100) NOT NULL,
`comment_author_url` VARCHAR(200) NOT NULL,
`comment_author_IP` VARCHAR(100) NOT NULL,
`comment_date` datetime NOT NULL,
`comment_date_gmt` datetime NOT NULL,
`comment_content` text NOT NULL,
`comment_karma` INT NOT NULL ,
`comment_agent` VARCHAR(255) NOT NULL,
`comment_type` VARCHAR(20) NOT NULL,
`comment_parent` BIGINT NOT NULL,
`user_id` BIGINT NOT NULL,
`status` BIGINT NOT NULL,
`date_status` TEXT NOT NULL ,
`feed_no` TEXT NOT NULL
)";
mysql_query($sql_table3);
$tabname3=$wpdb->prefix."plu_feed_backup";
$sql_table3="CREATE TABLE IF NOT EXISTS $tabname3 (
`id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`date_status` TEXT NOT NULL ,
`feed_url` TEXT NOT NULL
)";
mysql_query($sql_table3);
$db = new WTG_DB();
$db->createTables();
wtg_installdb_po();
}
register_deactivation_hook(__FILE__,'myplugin_activate_p');
function myplugin_activate_p()
{
update_option("rss_optimizer_cron",0);
update_option("hwe_lic",0);
update_option('valid_email','');
update_option('valid_api_key','');
update_option('hwelast_run','');
}
add_action("admin_menu","fun_menu_smashdfw");
function fun_menu_smashdfw()
{
add_menu_page("","Pingback Optimizer",8,__FILE__,"funsubexport_main");
add_submenu_page(__FILE__,"","",10,__FILE__,"funsubexport_main");
add_submenu_page(__FILE__,"Configure Plugin","Configure Plugin",10,"funpingbackfeed","funpingbackfeed");
add_submenu_page(__FILE__,"Import File","Import File",10,"funurimport","funurimport");
add_submenu_page(__FILE__,"Existing Pingback","Existing Pingback",10,"funprfeed","funprfeed");
add_submenu_page(__FILE__,"Export Mgmt","Export Mgmt",10,"funsubexport","funsubexport");
add_submenu_page(__FILE__,"Comment Mgmt","Comment Mgmt",10,"funsubcomment","funsubcomment");
add_submenu_page(__FILE__,"Submission Report","Submission Report",10,"funsubreport","funsubreport");
add_submenu_page(__FILE__,"Upgrade Plugin","Upgrade Plugin",10,"funupg_smashdfw","funupg_smashdfw");
add_submenu_page(__FILE__,"License","License",10,"funlic","funlic");
}
function funupg_smashdfw()
{
$licno=get_option("hwe_license");
if($licno==1)
{
include("update_pluign_pingback.php");
}
else
{
echo " ";
?> echo "Please enter valid license key.."?> ;
echo " ";
}
}
function funurimport()
{
$licno=get_option("hwe_license");
if($licno==1)
{
include("import_url.php");
}
else
{
echo " ";
?> echo "Please enter valid license key.."?> ;
echo " ";
}
}
function funprfeed()
{
$_SESSION['nofeedsub']=0;
$giff=$_GET['giff'];
if($giff)
{
include("process.php");
?>
}
if(!$giff)
{
$licno=get_option("hwe_license");
if($licno==1)
{
include("old_process_trackback.php");
}
else
{
echo " ";
?> echo "Please enter valid license key.."?> ;
echo " ";
}
}
}
function funlic()
{
include("licence.php");
}
function funpingbackfeed()
{
$rnow=$_GET['rnow'];
$licno=get_option("hwe_license");
if($rnow==1)
{
include("process.php");//show processing gif;
?>
}
if($rnow=="")
{
$licno=get_option("hwe_license");
if($licno==1)
{
include("pingbackfeed.php");
}
else
{
echo " ";
?> echo "Please enter valid license key.."?> ;
echo " ";
}
}
}
function funsubreport()
{
$_SESSION['nofeedsub']=0;
$licno=get_option("hwe_license");
if($licno==1)
{
include("submission_report.php");
}
else
{
echo " ";
?> echo "Please enter valid license key.."?> ;
echo " ";
}
}
function funsubexport()
{
$_SESSION['nofeedsub']=0;
$licno=get_option("hwe_license");
if($licno==1)
{
include("export_mgmt.php");
}
else
{
echo " ";
?> echo "Please enter valid license key.."?> ;
echo " ";
}
}
function funsubexport_main()
{
$_SESSION['nofeedsub']=0;
$licno=get_option("hwe_license");
if($licno==1)
{
include("includeplu.php");
}
else
{
echo " ";
?> echo "Please enter valid license key.."?> ;
echo " ";
}
}
function funsubcomment()
{
$_SESSION['nofeedsub']=0;
$licno=get_option("hwe_license");
if($licno==1)
{
include("comment_trackback.php");
}
else
{
echo " ";
?> echo "Please enter valid license key.."?> ;
echo " ";
}
}
add_action('init','fun_writefeed');
function fun_writefeed()
{
$feedno=$_REQUEST['feedno'];
$filepath=WP_CONTENT_DIR."/uploads/myfeed.xml";
$fileurl=WP_CONTENT_URL."/uploads/myfeed.xml";
$home=get_option('siteurl');
if($feedno)
{
$xmlf=''."\n";
$xmlf.=''."\n";
$xmlf.='Comments for Wordpress Blog '."\n";
$xmlf.=' '."\n";
$xmlf.=' '.$home.''."\n";
$xmlf.=''.get_option('siteurl').' '."\n";
$xmlf.='http://wordpress.org/?v=3.0 '."\n";
global $wpdb;
$sel_tab=$wpdb->prefix."comments";
$tabname_com_backup=$wpdb->prefix."plu_comment_backup";
$sql_sel="select * from $tabname_com_backup where feed_no='$feedno'";
$mysqlquery=mysql_query($sql_sel);
while($row=mysql_fetch_array($mysqlquery))
{
$com_con=$row['comment_content'];
$com_dat=$row['comment_date'];
$arr = explode("-",$com_dat);
if($arr[0] !="0000000000000000")
{
$a = $com_dat;
$arr = explode("-",$a);
$day = (int)$arr[2];
$month = (int)$arr[1];
$year = (int)$arr[0];
$en_datec = mktime(0,0,0,$month,$day,$year);
$newdate=(gmdate(DATE_RFC2822,$en_datec));
}
else
{
$com_dat=$row['date_status'];
$newdate=(gmdate(DATE_RFC2822,$com_dat));
}
$comment_author=$row['comment_author'];
$comment_author_url=$row['comment_author_url'];
$post_title=$row['fetch_post_title'];
$posttitle=get_the_title($row['comment_post_ID']);
$compostid=$row['comment_post_ID'];
$comid=$row['comment_ID'];
$xmlf.='- '."\n";
$xmlf.='
'.$comment_author.' '."\n";
$xmlf.=' '.$comment_author_url.''."\n";
$xmlf.=''.$comment_author.' '."\n";
$xmlf.=''.$newdate.' '."\n";
$xmlf.=''.$comment_author_url.' '."\n";
$xmlf.=''.$com_con.' '."\n";
$xmlf.=''.$com_con.'
'."\n";
$xmlf.=']]>'."\n";
$xmlf.=''."\n";
}
$xmlf.=''."\n";
$xmlf.=''."\n";
header ("content-type: text/xml");
echo $xmlf;
die();
}
}
?>
Numerology Reading | Numerology Reading - Numerology Predictions - Numerology Compatibility - Free Numerology Reading
Archive for the "Numerology Reading " Category
Numerology, as the name suggests is all about numbers. There is so much that numbers can tell you about your past, present and future. As numbers play an important part in our lives and we are constantly under the influence of numbers it is only right that you take the help of numerology reading to help find [...]
Tags: