<? // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SET SERVICE TYPE $servicetypemst = new Table; $servicetypemst->setSQLType($fms_db->getSQLType()); $servicetypemst->setInstance($fms_db->getInstance()); $servicetypemst->setView("v_servicetypemaster"); $servicetypemst->setParam("ORDER BY serviceTypeID"); $servicetypemst->doQuery("query"); $row_servicetypemst = $servicetypemst->getLists(); // CLOSING FMS DB $fms_db->DBClose(); ?>
// -- START EDIT MAKE -- if(isset($_GET['edit']) && !empty($_GET['edit']) && $_GET['edit'] == 1 && !empty($_GET['id'])){ $id = $_GET['id']; // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SET MAKE $make = new Table; $make->setSQLType($fms_db->getSQLType()); $make->setInstance($fms_db->getInstance()); $make->setView("v_makemaster"); $make->setParam("WHERE makeID = '$id'"); $make->doQuery("query"); $row_make = $make->getLists(); // CLOSING FMS DB $fms_db->DBClose(); $status = $row_make[0]['status']; } // -- END EDIT CATEGORY -- // -- START UPDATE MAKE -- if(isset($_POST['update']) && !empty($_POST['update']) && $_POST['update'] == 1){ $id = $_GET['id']; $makeName = $_POST['txtMakeName']; $status = $_POST['txtStatus']; // SET FMS DB
$status = $_POST['txtStatus']; // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // 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();
$chkwourl->setParam("WHERE url = '$sesid'"); $chkwourl->doQuery("query"); $num_chkurl = $chkwourl->getNumRows(); $row_chkurl = $chkwourl->getLists(); $wourl_status = $row_chkurl[0]['status']; // CHECK WORK ORDER $wo_dtl = new Table; $wo_dtl->setSQLType($fms_db->getSQLType()); $wo_dtl->setInstance($fms_db->getInstance()); $wo_dtl->setView("v_workorderdetail"); $wo_dtl->setParam("WHERE woReferenceNo = '$worefno'"); $wo_dtl->doQuery("query"); $num_wo_dtl = $wo_dtl->getNumRows(); $row_wo_dtl = $wo_dtl->getLists(); // CLOSING FMS DB $fms_db->DBClose(); if($num_chkwo == 0 || $num_chkurl == 0 || $wo_status != 1 || $wourl_status != 1){ $url = BASE_URL; $msg = "Invalid URL!"; $alert = new MessageAlert(); $alert->setURL($url); $alert->setMessage($msg); $alert->Alert(); } } // -- END WORK ORDER FOR APPROVAL
// -- START EDIT SUPPLIER -- if(isset($_GET['edit']) && !empty($_GET['edit']) && $_GET['edit'] == 1 && !empty($_GET['id'])){ $id = $_GET['id']; // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SET SUPPLIER $supplier = new Table; $supplier->setSQLType($fms_db->getSQLType()); $supplier->setInstance($fms_db->getInstance()); $supplier->setView("v_suppliermaster"); $supplier->setParam("WHERE supplierID = '$id'"); $supplier->doQuery("query"); $row_supplier = $supplier->getLists(); // CLOSING FMS DB $fms_db->DBClose(); $status = $row_supplier[0]['status']; } // -- END EDIT SUPPLIER -- // -- START UPDATE SUPPLIER -- if(isset($_POST['update']) && !empty($_POST['update']) && $_POST['update'] == 1){ $id = $_GET['id']; $suppName = $_POST['txtSupplierName']; $suppAddress = $_POST['txtSupplierAddress']; $suppEmailAddress = $_POST['txtSupplierEmailAddress']; $suppContactNo = $_POST['txtSupplierContactNo'];
$assigneemst->doQuery("query"); $row_assigneemst = $assigneemst->getLists(); break; case "a": $where = "assigneeID = '$id'"; // SET EQUIPMENT $equipmentmst = new Table; $equipmentmst->setSQLType($fms_db->getSQLType()); $equipmentmst->setInstance($fms_db->getInstance()); $equipmentmst->setView("v_equipmentmaster"); $equipmentmst->setParam("ORDER BY equipmentID"); $equipmentmst->doQuery("query"); $row_equipmentmst = $equipmentmst->getLists(); break; default: break; } } // SET ASSIGNEE $assigneeequipment = new Table; $assigneeequipment->setSQLType($fms_db->getSQLType()); $assigneeequipment->setInstance($fms_db->getInstance()); $assigneeequipment->setView("v_assigneeequipment"); $assigneeequipment->setParam("WHERE $where ORDER BY isCurrent DESC,assignedStart DESC"); $assigneeequipment->doQuery("query"); $row_assigneeequipment = $assigneeequipment->getLists(); // CLOSING FMS DB $fms_db->DBClose(); ?>
<? // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SET PURCHASE ORDER $poreceivingmst = new Table; $poreceivingmst->setSQLType($fms_db->getSQLType()); $poreceivingmst->setInstance($fms_db->getInstance()); $poreceivingmst->setView("v_poreceiving"); $poreceivingmst->setParam("WHERE status = '0' ORDER BY status ASC, poReferenceNo DESC, poTransactionDate DESC"); $poreceivingmst->doQuery("query"); $row_poreceivingmst = $poreceivingmst->getLists(); // SET WORK ORDER $workordermst = new Table; $workordermst->setSQLType($fms_db->getSQLType()); $workordermst->setInstance($fms_db->getInstance()); $workordermst->setView("v_workordermaster"); $workordermst->setParam("WHERE status NOT IN('5','6','7','8') ORDER BY status ASC, woReferenceNo DESC, woTransactionDate DESC"); $workordermst->doQuery("query"); $row_workordermst = $workordermst->getLists(); // CLOSING FMS DB $fms_db->DBClose(); ?>
$fms_db->setFleetDB(); // SET USER $usermst = new Table; $usermst->setSQLType($fms_db->getSQLType()); $usermst->setInstance($fms_db->getInstance()); $usermst->setView("v_usermaster"); $usermst->setParam("ORDER BY userID"); $usermst->doQuery("query"); $row_usermst = $usermst->getLists(); // GET USER $getuser = new Table; $getuser->setSQLType($fms_db->getSQLType()); $getuser->setInstance($fms_db->getInstance()); $getuser->setView("v_usermaster"); $getuser->setParam("WHERE userID = '$sys_UserID'"); $getuser->doQuery("query"); $row_getuser = $getuser->getLists(); $userPass = $row_getuser[0]['userPass']; // CLOSING FMS DB $fms_db->DBClose(); function generatePassword($password){ $salt = 'FleetManagementSystem'; $newpass = md5(sha1($salt.$password)); return $newpass; } ?>
// -- START EDIT MODEL -- if(isset($_GET['edit']) && !empty($_GET['edit']) && $_GET['edit'] == 1 && !empty($_GET['id'])){ $id = $_GET['id']; // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SET MODEL $model = new Table; $model->setSQLType($fms_db->getSQLType()); $model->setInstance($fms_db->getInstance()); $model->setView("v_modelmaster"); $model->setParam("WHERE modelID = '$id'"); $model->doQuery("query"); $row_model = $model->getLists(); // CLOSING FMS DB $fms_db->DBClose(); $status = $row_model[0]['status']; } // -- END EDIT MODEL -- // -- START UPDATE MODEL -- if(isset($_POST['update']) && !empty($_POST['update']) && $_POST['update'] == 1){ $id = $_GET['id']; $desc = $_POST['txtDescription']; $variant = $_POST['txtVariant']; $variantDesc = $_POST['txtVariantDesc']; $status = $_POST['txtStatus'];
$purchaseorder->setInstance($fms_db->getInstance()); $purchaseorder->setView("v_poreceiving"); $purchaseorder->setParam("WHERE poReferenceNo = '$id'"); $purchaseorder->doQuery("query"); $row_purchaseorder = $purchaseorder->getLists(); $wo = $row_purchaseorder[0]['woReferenceNo']; // SET WORK ORDER $workorder = new Table; $workorder->setSQLType($fms_db->getSQLType()); $workorder->setInstance($fms_db->getInstance()); $workorder->setView("v_workordermaster"); $workorder->setParam("WHERE woReferenceNo = '$wo' AND status NOT IN('6','7','8')"); $workorder->doQuery("query"); $row_workorder = $workorder->getLists(); // CLOSING FMS DB $fms_db->DBClose(); if(count($row_purchaseorder) == 0){ $alert = new MessageAlert(); $alert->setURL(BASE_URL . V_PORECEIVING); $alert->setMessage("Invalid URL!"); $alert->Alert(); } $status = $row_purchaseorder[0]['status']; if($status > 0){ $disabled = 'disabled';
// -- START EDIT ASSIGNEE -- if(isset($_GET['edit']) && !empty($_GET['edit']) && $_GET['edit'] == 1 && !empty($_GET['id'])){ $id = $_GET['id']; // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SET ASSIGNEE $assignee = new Table; $assignee->setSQLType($fms_db->getSQLType()); $assignee->setInstance($fms_db->getInstance()); $assignee->setView("v_assigneemaster"); $assignee->setParam("WHERE assigneeID = '$id'"); $assignee->doQuery("query"); $row_assignee = $assignee->getLists(); // CLOSING FMS DB $fms_db->DBClose(); $status = $row_assignee[0]['status']; } // -- END EDIT ASSIGNEE -- // -- START UPDATE ASSIGNEE -- if(isset($_POST['update']) && !empty($_POST['update']) && $_POST['update'] == 1){ $id = $_GET['id']; $company = $_POST['txtCompany']; $location = $_POST['txtLocation']; $fName = $_POST['txtFName']; $lName = $_POST['txtLName'];
<? // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SET MAKE $makemst = new Table; $makemst->setSQLType($fms_db->getSQLType()); $makemst->setInstance($fms_db->getInstance()); $makemst->setView("v_makemaster"); $makemst->setParam("ORDER BY makeID"); $makemst->doQuery("query"); $row_makemst = $makemst->getLists(); // CLOSING FMS DB $fms_db->DBClose(); ?>
<? // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SET LOCATION $locationmst = new Table; $locationmst->setSQLType($fms_db->getSQLType()); $locationmst->setInstance($fms_db->getInstance()); $locationmst->setView("v_locationmaster"); $locationmst->setParam("ORDER BY locationID"); $locationmst->doQuery("query"); $row_locationmst = $locationmst->getLists(); // CLOSING FMS DB $fms_db->DBClose(); ?>
// -- START EDIT PARTS -- if(isset($_GET['edit']) && !empty($_GET['edit']) && $_GET['edit'] == 1 && !empty($_GET['id'])){ $id = $_GET['id']; // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SET PARTS $parts = new Table; $parts->setSQLType($fms_db->getSQLType()); $parts->setInstance($fms_db->getInstance()); $parts->setView("v_partsmaster"); $parts->setParam("WHERE partsID = '$id'"); $parts->doQuery("query"); $row_parts = $parts->getLists(); // CLOSING FMS DB $fms_db->DBClose(); $status = $row_parts[0]['status']; } // -- END EDIT PARTS -- // -- START UPDATE PARTS -- if(isset($_POST['update']) && !empty($_POST['update']) && $_POST['update'] == 1){ $id = $_GET['id']; $stockCode = $_POST['txtStockCode']; $brand = $_POST['txtBrand']; $model = $_POST['txtModel']; $desc = $_POST['txtDescription'];
<? $id = $_GET['id']; // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SET USER ACCESS $userassignee = new Table; $userassignee->setSQLType($fms_db->getSQLType()); $userassignee->setInstance($fms_db->getInstance()); $userassignee->setView("v_userassigneemapper"); $userassignee->setParam("WHERE userID = '$id'"); $userassignee->doQuery("query"); $row_userassignee = $userassignee->getLists(); $num_userassignee = $userassignee->getNumRows(); // SET USER ACCESS $assigneemst = new Table; $assigneemst->setSQLType($fms_db->getSQLType()); $assigneemst->setInstance($fms_db->getInstance()); $assigneemst->setView("v_assigneemaster"); $assigneemst->setParam("WHERE assigneeID NOT IN(SELECT assigneeID FROM v_userassigneemapper)"); $assigneemst->doQuery("query"); $row_assigneemst = $assigneemst->getLists(); // CLOSING FMS DB $fms_db->DBClose(); ?>
<? // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SET REMINDERS $remindersmst = new Table; $remindersmst->setSQLType($fms_db->getSQLType()); $remindersmst->setInstance($fms_db->getInstance()); $remindersmst->setView("v_remindermaster"); $remindersmst->setParam("WHERE status = '0' ORDER BY reminderID"); $remindersmst->doQuery("query"); $row_remindersmst = $remindersmst->getLists(); // CLOSING FMS DB $fms_db->DBClose(); ?>
<? // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SET CONTROL NO $usermenu_access = new Table; $usermenu_access->setSQLType($fms_db->getSQLType()); $usermenu_access->setInstance($fms_db->getInstance()); $usermenu_access->setView("v_usermenu"); $usermenu_access->setParam("WHERE userID = '$sys_UserID'"); $usermenu_access->doQuery("query"); $row_usermenu_access = $usermenu_access->getLists(); // CLOSING FMS DB $fms_db->DBClose(); ?>
<? // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SET MODEL $modelmst = new Table; $modelmst->setSQLType($fms_db->getSQLType()); $modelmst->setInstance($fms_db->getInstance()); $modelmst->setView("v_modelmaster"); $modelmst->setParam("ORDER BY modelID"); $modelmst->doQuery("query"); $row_modelmst = $modelmst->getLists(); // CLOSING FMS DB $fms_db->DBClose(); ?>
// -- START EDIT CATEGORY -- if(isset($_GET['edit']) && !empty($_GET['edit']) && $_GET['edit'] == 1 && !empty($_GET['id'])){ $id = $_GET['id']; // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SET CATEGORY $category = new Table; $category->setSQLType($fms_db->getSQLType()); $category->setInstance($fms_db->getInstance()); $category->setView("v_categorymaster"); $category->setParam("WHERE categoryID = '$id'"); $category->doQuery("query"); $row_category = $category->getLists(); // CLOSING FMS DB $fms_db->DBClose(); $status = $row_category[0]['status']; } // -- END EDIT CATEGORY -- // -- START UPDATE CATEGORY -- if(isset($_POST['update']) && !empty($_POST['update']) && $_POST['update'] == 1){ $id = $_GET['id']; $catName = $_POST['txtCategoryName']; $status = $_POST['txtStatus']; // SET FMS DB
<? // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SET COMPANY $companymst = new Table; $companymst->setSQLType($fms_db->getSQLType()); $companymst->setInstance($fms_db->getInstance()); $companymst->setView("v_companymaster"); $companymst->setParam("ORDER BY companyID"); $companymst->doQuery("query"); $row_companymst = $companymst->getLists(); // CLOSING FMS DB $fms_db->DBClose(); ?>
// -- START EDIT REMINDER -- if(isset($_GET['edit']) && !empty($_GET['edit']) && $_GET['edit'] == 1 && !empty($_GET['id'])){ $id = $_GET['id']; // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SET REMINDER $reminders = new Table; $reminders->setSQLType($fms_db->getSQLType()); $reminders->setInstance($fms_db->getInstance()); $reminders->setView("v_remindermaster"); $reminders->setParam("WHERE reminderID = '$id'"); $reminders->doQuery("query"); $row_reminders = $reminders->getLists(); // CLOSING FMS DB $fms_db->DBClose(); $status = $row_reminders[0]['status']; } // -- END EDIT REMINDER -- // -- START UPDATE REMINDER -- if(isset($_POST['update']) && !empty($_POST['update']) && $_POST['update'] == 1){ $id = $_GET['id']; $title = $_POST['txtTitle']; $location = $_POST['txtLocation']; $category = $_POST['txtCategory']; $desc = $_POST['txtDescription'];
// -- START EDIT LOCATION -- if(isset($_GET['edit']) && !empty($_GET['edit']) && $_GET['edit'] == 1 && !empty($_GET['id'])){ $id = $_GET['id']; // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SET LOCATION $location = new Table; $location->setSQLType($fms_db->getSQLType()); $location->setInstance($fms_db->getInstance()); $location->setView("v_locationmaster"); $location->setParam("WHERE locationID = '$id'"); $location->doQuery("query"); $row_location = $location->getLists(); // CLOSING FMS DB $fms_db->DBClose(); $status = $row_location[0]['status']; } // -- END EDIT LOCATION -- // -- START UPDATE LOCATION -- if(isset($_POST['update']) && !empty($_POST['update']) && $_POST['update'] == 1){ $id = $_GET['id']; $locName = $_POST['txtLocationName']; $status = $_POST['txtStatus']; // SET FMS DB
// -- START DELETE EQUIPMENT -- if(isset($_GET['delete']) && !empty($_GET['delete']) && $_GET['delete'] == 1 && !empty($_GET['id'])){ $id = $_GET['id']; // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SET EQUIPMENT $equipmentmst = new Table; $equipmentmst->setSQLType($fms_db->getSQLType()); $equipmentmst->setInstance($fms_db->getInstance()); $equipmentmst->setView("v_equipmentmaster"); $equipmentmst->setParam("WHERE equipmentID = '$id'"); $equipmentmst->doQuery("query"); $row_equipmentmst = $equipmentmst->getLists(); // DELETE EQUIPMENT $del_equipment = new Table; $del_equipment->setSQLType($fms_db->getSQLType()); $del_equipment->setInstance($fms_db->getInstance()); $del_equipment->setTable("equipmentmaster"); $del_equipment->setParam("WHERE equipmentID = '$id'"); $del_equipment->doQuery("delete"); $res_equipment = $del_equipment->getError(); // CLOSING FMS DB $fms_db->DBClose(); $dir = EQUIPMENTPICS . $id;
<? // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SET MAKE $invoicing = new Table; $invoicing->setSQLType($fms_db->getSQLType()); $invoicing->setInstance($fms_db->getInstance()); $invoicing->setView("v_equipmentrepairedmaster"); $invoicing->setParam("WHERE noOfTransactions > 0 ORDER BY companyName "); $invoicing->doQuery("query"); $row_invoicing = $invoicing->getLists(); // CLOSING FMS DB $fms_db->DBClose(); ?>
<? // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SET USER ACCESS $usermenu = new Table; $usermenu->setSQLType($fms_db->getSQLType()); $usermenu->setInstance($fms_db->getInstance()); $usermenu->setView("v_usermenu"); $usermenu->setParam("WHERE userID = '$sys_UserID'"); $usermenu->doQuery("query"); $row_usermenu = $usermenu->getLists(); // SET USER ACCESS $menumst = new Table; $menumst->setSQLType($fms_db->getSQLType()); $menumst->setInstance($fms_db->getInstance()); $menumst->setView("v_menumaster"); $menumst->setParam("WHERE menuID NOT IN(SELECT menuID FROM v_usermenu)"); $menumst->doQuery("query"); $row_menumst = $menumst->getLists(); // CLOSING FMS DB $fms_db->DBClose(); ?>
<? // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SET PARTS $partsmst = new Table; $partsmst->setSQLType($fms_db->getSQLType()); $partsmst->setInstance($fms_db->getInstance()); $partsmst->setView("v_partsmaster"); $partsmst->setParam("ORDER BY partsID"); $partsmst->doQuery("query"); $row_partsmst = $partsmst->getLists(); // CLOSING FMS DB $fms_db->DBClose(); ?>
$_SESSION['SYS_AVATAR'] = USERPICS . $username . '/' . $row_user[0]['userPic']; $_SESSION['SYS_USERTYPE'] = $row_user[0]['userType']; $_SESSION['SYS_USERLVL'] = $row_user[0]['accessLevel']; // SET FMS DB $fms_db = new DBCOnfig; $fms_db->setFleetDB(); // SET USER ACCESS $userassignee = new Table; $userassignee->setSQLType($fms_db->getSQLType()); $userassignee->setInstance($fms_db->getInstance()); $userassignee->setView("v_userassigneemapper"); $userassignee->setParam("WHERE userID = '$username'"); $userassignee->doQuery("query"); $row_userassignee = $userassignee->getLists(); $num_userassignee = $userassignee->getNumRows(); // GET ASSIGNEE ID $assigneeID = $row_userassignee[0]['assigneeID']; // SET ASSIGNEE TO SESSION $_SESSION['SYS_ASSIGNEE'] = $assigneeID; // CLOSING FMS DB $fms_db->DBClose(); $alert = new MessageAlert; $alert->setURL(BASE_URL); $alert->setMessage("Access Granted."); $alert->Alert();
// -- START EDIT SERVICE TYPE -- if(isset($_GET['edit']) && !empty($_GET['edit']) && $_GET['edit'] == 1 && !empty($_GET['id'])){ $id = $_GET['id']; // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SET SERVICE TYPE $servicetype = new Table; $servicetype->setSQLType($fms_db->getSQLType()); $servicetype->setInstance($fms_db->getInstance()); $servicetype->setView("v_servicetypemaster"); $servicetype->setParam("WHERE serviceTypeID = '$id'"); $servicetype->doQuery("query"); $row_servicetype = $servicetype->getLists(); // CLOSING FMS DB $fms_db->DBClose(); $status = $row_servicetype[0]['status']; } // -- END EDIT SERVICE TYPE -- // -- START UPDATE SERVICE TYPE -- if(isset($_POST['update']) && !empty($_POST['update']) && $_POST['update'] == 1){ $id = $_GET['id']; $desc = $_POST['txtDescription']; $status = $_POST['txtStatus']; // SET FMS DB
<? // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SET CATEGORY $categorymst = new Table; $categorymst->setSQLType($fms_db->getSQLType()); $categorymst->setInstance($fms_db->getInstance()); $categorymst->setView("v_categorymaster"); $categorymst->setParam("ORDER BY categoryID"); $categorymst->doQuery("query"); $row_categorymst = $categorymst->getLists(); // CLOSING FMS DB $fms_db->DBClose(); ?>
if($comp_exist == 0){ $alert = new MessageAlert(); $alert->setURL(BASE_URL . 'invoicing.php'); $alert->setMessage("Invalid URL!11"); $alert->Alert(); } // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SET MAKE $invoicingdtl = new Table; $invoicingdtl->setSQLType($fms_db->getSQLType()); $invoicingdtl->setInstance($fms_db->getInstance()); $invoicingdtl->setView("v_equipmentrepaireddetail"); $invoicingdtl->setParam("WHERE companyID = '$id' ORDER BY woTransactionDate DESC"); $invoicingdtl->doQuery("query"); $row_invoicingdtl = $invoicingdtl->getLists(); // CLOSING FMS DB $fms_db->DBClose(); }else{ $alert = new MessageAlert(); $alert->setURL(BASE_URL . 'invoicing.php'); $alert->setMessage("Invalid URL!"); $alert->Alert(); } ?>