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/consult.php
<?php
class consult{

	function consult (){
	
		global $CORE, $TBS;
		
		$TBS->LoadTemplate(ADMIN_PATH."skin/consult.html");
	
		switch($CORE->input['code']){
			
			default : $this->goList(); break;			
			
			case 'post': $this->goPost(); break;
			
			case 'del': $this->goDel(); break;
	
		}	
	}

	function goList(){
	
		global $CORE, $DB, $TBS, $print, $mp;
		
		$showsection = 0;
		$TBS->MergeField('showsection',$showsection);
		
		if(!$CORE->input['reoder']){ // show list----------------			
		
			$temp = $DB->query("SELECT * FROM NNCCMS_consultcat ORDER BY type,cpos");
			
			$num['empty'] = ($DB->get_num_rows($temp)==0) ? 1 : 0;
			
			while ($data = $DB->fetch_row($temp)){				
				$cat[] = $data;
			}
			
			$show[] = $num;
			$TBS->MergeBlock('show',$show);
			
			$TBS->MergeBlock('cat',$cat);
			
			$TBS->Show(TBS_OUTPUT+TBS_NOTHING);
				
		}else{ // do re oder ---------------------------------------
		
			$input_arr = $CORE->input;

        	$t = $DB->compile_query("cid,cpos","NNCCMS_consultcat","WHERE scat=0",'');

        	while($row = $DB->fetch_row($t)){
             	foreach($input_arr as $k => $v){
                   $k = intval ($k);
                   $v = intval ($v);
                   if($row['cid']==$k){
                        $DB->query("update NNCCMS_consultcat set cpos='$v' where cid='$k'");
                   }
             	}
        	}

			$url = $CORE->admin_url."&act=consult";	
			$text = "Đã lưu thứ tự";	
			$print->redirect ($text,$url);
		
		}

	}
	
	function goPost(){
	
		global $CORE, $DB, $func, $TBS, $print;
		
		$showsection = 1;
		$TBS->MergeField('showsection',$showsection);
		
		$id = intval($CORE->input['id']);
		// Show post -----------------------------------------------------------------------
		if(!$CORE->input['bsubmit']){
			
			if(!$id || $id==0){				
				$data['status'] = 1;
			}else{			
				$temp=$DB->query("SELECT * FROM NNCCMS_consultcat WHERE cid='".$id."'");
				$data = $DB->fetch_row($temp);
			}
			
			//$data['sub'] = $func->drop_down_menu('sub',$data['scat'],'NNCCMS_consultcat','cid','cname',"WHERE scat=0");			
				
			$data['des'] = $func->loadWYS('des',$data['cdes'],15);
			
			$data['edes'] = $func->loadWYS('edes',$data['cedes'],15);			
			
			$data['status'] = $func->yes_no($data['status'],'status');
			
			$post[] = $data;
						
			$TBS->MergeBlock('post',$post);	
			$TBS->Show(TBS_OUTPUT+TBS_NOTHING);
				
		// Do post -------------------------------------------
		}else{
			//$type = intval($CORE->input['type']);	
			$name = $CORE->input['name'];	
			$ename = $CORE->input['ename'];			
			$des = $CORE->input['des'];	
			$edes = $CORE->input['edes'];					
			$pos = intval($CORE->input['pos']);	
			$status = intval($CORE->input['status']);			
			//$sub = intval($CORE->input['sub']);
			
			// Do Add ------------------
			if(!$id || $id==0){
				
				$DB->query("INSERT INTO `NNCCMS_consultcat`(`cid`,`cname`,`cename`,`scat`,`cdes`,`cedes`,`cimg`,`cpos`,`status`,`type`)		
				VALUES (		
				'', '$name', '$ename', '$sub', '$des', '$edes', '', '$pos', '$status', '$type')");
				
			// Do Edit -----------------
			}else{
			
				$DB->query("update `NNCCMS_consultcat` SET `cname` = '$name', `cename` = '$ename', `scat` = '$sub',
				`cdes` = '$des', `cedes` = '$edes', `cpos` = '$pos', `status` = '$status', `type` = '$type'
				WHERE `cid`=$id");
			}

			$url=$CORE->admin_url."&act=consult";
			$print->redirect ("Đã cập nhật ...",$url);
		
		}
	
	}
	
	function goDel(){
	
		global $CORE, $DB, $print;

        $id = intval($CORE->input['id']);
		
		$query = $DB->query("SELECT * FROM NNCCMS_consult WHERE `cid`='$id' LIMIT 1");
		
		if ($DB->get_num_rows($query)>0) $DB->query("DELETE FROM NNCCMS_consult WHERE `cid`='$id'");
		
        $DB->query("DELETE FROM NNCCMS_consultcat WHERE `cid`='$id' OR `scat`='$id'");		

        $url = $CORE->admin_url."&act=consult";

        $text = "Đã xóa...";

        $print->redirect ($text,$url);
	
	}
	

}
$run = new consult();
?>

ZeroDay Forums Mini