Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/facebook.../admin
File: ajax-backlink.php
<?php
[0] Fix | Delete
if( !defined('ABSPATH') ){ exit();}
[1] Fix | Delete
add_action('wp_ajax_xyz_fbap_ajax_backlink', 'xyz_fbap_ajax_backlink_call');
[2] Fix | Delete
[3] Fix | Delete
function xyz_fbap_ajax_backlink_call() {
[4] Fix | Delete
[5] Fix | Delete
global $wpdb;
[6] Fix | Delete
if($_POST){
[7] Fix | Delete
if (! isset( $_POST['_wpnonce'] )|| ! wp_verify_nonce( $_POST['_wpnonce'],'backlink' ))
[8] Fix | Delete
{
[9] Fix | Delete
echo 1;die;
[10] Fix | Delete
}
[11] Fix | Delete
if(current_user_can('administrator')){
[12] Fix | Delete
if(isset($_POST)){
[13] Fix | Delete
if(intval($_POST['enable'])==1){
[14] Fix | Delete
update_option('xyz_credit_link','fbap');
[15] Fix | Delete
echo "fbap";
[16] Fix | Delete
}
[17] Fix | Delete
if(intval($_POST['enable'])==-1){
[18] Fix | Delete
update_option('xyz_fbap_credit_dismiss', "hide");
[19] Fix | Delete
echo -1;
[20] Fix | Delete
}
[21] Fix | Delete
}
[22] Fix | Delete
}
[23] Fix | Delete
}
[24] Fix | Delete
die();
[25] Fix | Delete
}
[26] Fix | Delete
[27] Fix | Delete
add_action('wp_ajax_xyz_fbap_selected_pages_auto_update', 'xyz_fbap_selected_pages_auto_update_fn');
[28] Fix | Delete
function xyz_fbap_selected_pages_auto_update_fn() {
[29] Fix | Delete
global $wpdb;
[30] Fix | Delete
if(current_user_can('administrator')){
[31] Fix | Delete
if($_POST){
[32] Fix | Delete
if (! isset( $_POST['_wpnonce'] )|| ! wp_verify_nonce( $_POST['_wpnonce'],'xyz_fbap_selected_pages_nonce' ))
[33] Fix | Delete
{
[34] Fix | Delete
echo 1;die;
[35] Fix | Delete
}
[36] Fix | Delete
if(isset($_POST)){
[37] Fix | Delete
$pages=stripslashes($_POST['pages']);
[38] Fix | Delete
$fbap_sec_key=$_POST['smap_secretkey'];
[39] Fix | Delete
$xyz_fbap_fb_numericid=$_POST['xyz_fb_numericid'];
[40] Fix | Delete
$xyz_fbap_smapsoln_userid=$_POST['smapsoln_userid'];
[41] Fix | Delete
update_option('xyz_fbap_page_names',$pages);
[42] Fix | Delete
update_option('xyz_fbap_af', 0);
[43] Fix | Delete
update_option('xyz_fbap_secret_key', $fbap_sec_key);
[44] Fix | Delete
update_option('xyz_fbap_fb_numericid', $xyz_fbap_fb_numericid);
[45] Fix | Delete
update_option('xyz_fbap_smapsoln_userid', $xyz_fbap_smapsoln_userid);
[46] Fix | Delete
}
[47] Fix | Delete
}
[48] Fix | Delete
}
[49] Fix | Delete
die();
[50] Fix | Delete
}
[51] Fix | Delete
add_action('wp_ajax_xyz_fbap_xyzscripts_accinfo_auto_update', 'xyz_fbap_xyzscripts_accinfo_auto_update_fn');
[52] Fix | Delete
function xyz_fbap_xyzscripts_accinfo_auto_update_fn() {
[53] Fix | Delete
global $wpdb;
[54] Fix | Delete
if(current_user_can('administrator')){
[55] Fix | Delete
if($_POST){
[56] Fix | Delete
if (! isset( $_POST['_wpnonce'] )|| ! wp_verify_nonce( $_POST['_wpnonce'],'xyz_fbap_xyzscripts_accinfo_nonce' ))
[57] Fix | Delete
{
[58] Fix | Delete
echo 1;die;
[59] Fix | Delete
}
[60] Fix | Delete
if(isset($_POST)){
[61] Fix | Delete
$xyzscripts_hash_val=stripslashes($_POST['xyz_user_hash']);
[62] Fix | Delete
$xyzscripts_user_id=$_POST['xyz_userid'];
[63] Fix | Delete
update_option('xyz_fbap_xyzscripts_user_id', $xyzscripts_user_id);
[64] Fix | Delete
update_option('xyz_fbap_xyzscripts_hash_val', $xyzscripts_hash_val);
[65] Fix | Delete
}
[66] Fix | Delete
}
[67] Fix | Delete
}
[68] Fix | Delete
die();
[69] Fix | Delete
}
[70] Fix | Delete
add_action('wp_ajax_xyz_fbap_del_entries', 'xyz_fbap_del_entries_fn');
[71] Fix | Delete
function xyz_fbap_del_entries_fn() {
[72] Fix | Delete
global $wpdb;
[73] Fix | Delete
if(current_user_can('administrator')){
[74] Fix | Delete
if($_POST){
[75] Fix | Delete
if (! isset( $_POST['_wpnonce'] )|| ! wp_verify_nonce( $_POST['_wpnonce'],'xyz_fbap_del_entries_nonce' ))
[76] Fix | Delete
{
[77] Fix | Delete
echo 1;die;
[78] Fix | Delete
}
[79] Fix | Delete
$auth_id=$_POST['auth_id'];
[80] Fix | Delete
$xyz_fbap_xyzscripts_user_id = $_POST['xyzscripts_id'];
[81] Fix | Delete
$xyz_fbap_xyzscripts_hash_val= $_POST['xyzscripts_user_hash'];
[82] Fix | Delete
$delete_entry_details=array('smap_id'=>$auth_id,
[83] Fix | Delete
'xyzscripts_user_id' =>$xyz_fbap_xyzscripts_user_id,
[84] Fix | Delete
);
[85] Fix | Delete
[86] Fix | Delete
$url=XYZ_SMAP_SOLUTION_AUTH_URL.'authorize/delete-fb-auth.php';
[87] Fix | Delete
$content=xyz_fbap_post_to_smap_api($delete_entry_details, $url,$xyz_fbap_xyzscripts_hash_val);
[88] Fix | Delete
echo $content;
[89] Fix | Delete
$result=json_decode($content);$delete_flag=0;
[90] Fix | Delete
if(!empty($result))
[91] Fix | Delete
{
[92] Fix | Delete
if (isset($result->status))
[93] Fix | Delete
$delete_flag =$result->status;
[94] Fix | Delete
}
[95] Fix | Delete
if ($delete_flag===1)
[96] Fix | Delete
{
[97] Fix | Delete
if ($auth_id==get_option('xyz_fbap_smapsoln_userid'))
[98] Fix | Delete
{
[99] Fix | Delete
update_option('xyz_fbap_page_names','');
[100] Fix | Delete
update_option('xyz_fbap_af', 1);
[101] Fix | Delete
update_option('xyz_fbap_secret_key', '');
[102] Fix | Delete
update_option('xyz_fbap_smapsoln_userid', 0);
[103] Fix | Delete
update_option('xyz_fbap_fb_numericid','');
[104] Fix | Delete
}
[105] Fix | Delete
}
[106] Fix | Delete
}
[107] Fix | Delete
}
[108] Fix | Delete
die();
[109] Fix | Delete
}
[110] Fix | Delete
add_action('wp_ajax_xyz_fbap_del_fb_entries', 'xyz_fbap_del_fb_entries_fn');
[111] Fix | Delete
function xyz_fbap_del_fb_entries_fn() {
[112] Fix | Delete
global $wpdb;
[113] Fix | Delete
if(current_user_can('administrator')){
[114] Fix | Delete
if($_POST){
[115] Fix | Delete
if (! isset( $_POST['_wpnonce'] )|| ! wp_verify_nonce( $_POST['_wpnonce'],'xyz_fbap_del_fb_entries_nonce' ))
[116] Fix | Delete
{
[117] Fix | Delete
echo 1;die;
[118] Fix | Delete
}
[119] Fix | Delete
$fb_userid=$_POST['fb_userid'];
[120] Fix | Delete
$xyz_fbap_xyzscripts_user_id = $_POST['xyzscripts_id'];
[121] Fix | Delete
$xyz_fbap_xyzscripts_hash_val= $_POST['xyzscripts_user_hash'];
[122] Fix | Delete
$tr_iterationid=$_POST['tr_iterationid'];
[123] Fix | Delete
$delete_entry_details=array('fb_userid'=>$fb_userid,
[124] Fix | Delete
'xyzscripts_user_id' =>$xyz_fbap_xyzscripts_user_id);
[125] Fix | Delete
$url=XYZ_SMAP_SOLUTION_AUTH_URL.'authorize/delete-fb-auth.php';//save-selected-pages-test.php
[126] Fix | Delete
$content=xyz_fbap_post_to_smap_api($delete_entry_details, $url,$xyz_fbap_xyzscripts_hash_val);
[127] Fix | Delete
echo $content;
[128] Fix | Delete
}
[129] Fix | Delete
}
[130] Fix | Delete
die();
[131] Fix | Delete
}
[132] Fix | Delete
?>
[133] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function