Exemple #1
0
		public function chkBrowser(){
			if($this->getBrowserName() == 'Internet_Explorer' && $this->getBrowserVersion() <= 9){
				$alert = new MessageAlert;
				$alert->setMessage("You have an outdated version of Internet Explorer. Please upgrade to latest version or you may use other browser such as Mozilla Firefox/Google Chrome.");
				//$alert->setURL("http://windows.microsoft.com/en-us/internet-explorer/download-ie");
				$alert->setURL(BASE_URL . 'download/');
				$alert->Alert();
			}
		}
		// SET CONTROL NO
		$ctrlno = new Table;
		$ctrlno->setSQLType($fms_db->getSQLType());
		$ctrlno->setInstance($fms_db->getInstance());
		$ctrlno->setTable("controlnomaster");
		$ctrlno->setValues("description = '$desc', type = '$type', code = '$code', noOfDigit = '$noofdigit'
							, lastDigit = '$lastdigit', modifiedBy = '$sys_UserID', modifiedDate = '$today', status = '$status'");
		$ctrlno->setParam("WHERE id = '$id'");
		$ctrlno->doQuery("update");
		$row_ctrlno = $ctrlno->getLists();
		$res_ctrlno = $ctrlno->getError();

		// CLOSING FMS DB
		$fms_db->DBClose();

		$msg = null;
		if($res_ctrlno > 0){
			$url = BASE_URL . V_CONTROLNOEDIT . "edit=1&id=" . $id;
			$msg .= "Sorry! There has been an error in updating your control no. Please check the data and update it again.";
		}else{
			$url = BASE_URL . V_CONTROLNO;
			$msg .= "Control No successfully updated.";
		}

		$alert = new MessageAlert();
		$alert->setURL($url);
		$alert->setMessage($msg);
		$alert->Alert();
	}
	// -- END UPDATE CONTROL NO --
?>