Your IP : 216.73.216.79


Current Path : /var/www/html/ebilikparlimen1/ebilik/tempahan/
Upload File :
Current File : /var/www/html/ebilikparlimen1/ebilik/tempahan/bilik_bulkhandler.php

<?php
if (file_exists ('library.php')){
	include_once 'library.php';
} elseif (file_exists ('../library.php')){
	include_once '../library.php';
}
$isAuth = CUSTOM_User::checkAuthentication ();

if (! $isAuth) {
	header ( "Location: ks_user/login.php?msg=notlogin" );
	exit ();
}

//get userid from session
$ks_session = CUSTOM_User::getSessionData ();
$usr_role = $ks_session ['USR_ROLE'];
$usr_id = $ks_session ['USR_ID'];
$usr_name = $ks_session ['USR_NAME'];
$selId = $_POST [ 'selId' ] ;

$selId = array_unique ( $selId );

if($selId){
	foreach ( $selId as $curId ) {

		$arrId = explode ( "_", $curId );
		$curId = $arrId [0];

	$objBilik = new CUSTOM_Bilik();
	if ($pri != 'multiple') {
		$objBilik->setId($curId);
	}else {
		//do nothing
	}
	if(! $objBilik->exists()){
		echo "ID : $curId does not exist";
		exit();
	}

	$objBilik->delete();

	}
}
header ( "Location: bilik_list.php");