<? // -- START SAVE NEW MAKE -- if(isset($_POST['save']) && !empty($_POST['save']) && $_POST['save'] == 1){ $makeName = $_POST['txtMakeName']; $newNum = getNewCtrlNo("make"); // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SAVE NEW MAKE $ins_make = new Table; $ins_make->setSQLType($fms_db->getSQLType()); $ins_make->setInstance($fms_db->getInstance()); $ins_make->setTable("makemaster"); $ins_make->setField("makeID,makeName,createdBy,createdDate"); $ins_make->setValues("'$newNum','$makeName','$sys_UserID','$today'"); $ins_make->doQuery("save"); // CLOSING FMS DB $fms_db->DBClose(); // UPDATE CONTROL NO MAKE UpdateCtrlNo("make"); $url = BASE_URL . V_MAKE; $msg = "New Make successfully saved."; $alert = new MessageAlert(); $alert->setURL($url); $alert->setMessage($msg);
$gasolineAllocationInCash = str_replace(",","",$_POST['txtGasolineAllocationInCash']); $insuranceAppliedDate = $_POST['txtInsuranceAppliedDate']; $insuranceExpirationDate = $_POST['txtInsuranceExpirationDate']; $insuranceReminderInDays = $_POST['txtInsuranceReminderInDays']; $purchaseDate = $_POST['txtPurchaseDate']; $conductionSticker = $_POST['txtConductionSticker']; $year = $_POST['txtYear']; $plateNo = $_POST['txtPlateNo']; $engineNo = $_POST['txtEngineNo']; $chassisNo = $_POST['txtChassisNo']; $serialNo = $_POST['txtSerialNo']; $acquisitionCost = str_replace(",","",$_POST['txtAcquisitionCost']); $insuranceCost = str_replace(",","",$_POST['txtInsuranceCost']); $registrationCost = str_replace(",","",$_POST['txtRegistrationCost']); $depresitionValue = str_replace(",","",$_POST['txtDepresitionValue']); $newNum = getNewCtrlNo("equipment"); $newNum1 = getnewCtrlNo("assignee_equipment"); $dir = EQUIPMENTPICS . $newNum; // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SAVE NEW EQUIPMENT $ins_equipment = new Table; $ins_equipment->setSQLType($fms_db->getSQLType()); $ins_equipment->setInstance($fms_db->getInstance()); $ins_equipment->setTable("equipmentmaster"); $ins_equipment->setField("equipmentID,photo,assigneeID,companyID,categoryID,makeID,locationID,modelID,color ,mileageStart,mileageEnd,gasolineAllocationInLiters,gasolineAllocationInCash
<? // -- START SAVE NEW SUPPLIER -- if(isset($_POST['save']) && !empty($_POST['save']) && $_POST['save'] == 1){ $suppName = $_POST['txtSupplierName']; $suppAddress = $_POST['txtSupplierAddress']; $suppEmailAddress = $_POST['txtSupplierEmailAddress']; $suppContactNo = $_POST['txtSupplierContactNo']; $suppContactPerson = $_POST['txtSupplierContactPerson']; $suppTIN = $_POST['txtSupplierTIN']; $newNum = getNewCtrlNo("supplier"); // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SAVE NEW SUPPLIER $ins_category = new Table; $ins_category->setSQLType($fms_db->getSQLType()); $ins_category->setInstance($fms_db->getInstance()); $ins_category->setTable("suppliermaster"); $ins_category->setField("supplierID,supplierName,supplierAddress,supplierEmailAddress,supplierContactNo,contactPerson ,TIN,createdBy,createdDate"); $ins_category->setValues("'$newNum','$suppName','$suppAddress','$suppEmailAddress','$suppContactNo','$suppContactPerson' ,'$suppTIN','$sys_UserID','$today'"); $ins_category->doQuery("save"); // CLOSING FMS DB $fms_db->DBClose(); // UPDATE CONTROL NO SUPPLIER UpdateCtrlNo("supplier");
$row_searchrem = $searchrem->getLists(); $num_searchrem = $searchrem->getNumRows(); // CLOSING FMS DB $fms_db->DBClose(); } // -- START SAVE NEW REMINDER -- if(isset($_POST['save']) && !empty($_POST['save']) && $_POST['save'] == 1){ $title = $_POST['txtTitle']; $location = $_POST['txtLocation']; $category = $_POST['txtCategory']; $desc = $_POST['txtDescription']; $startDate = $_POST['txtStartDate'] . ' ' . date("h:i:s"); $dueDate = $_POST['txtDueDate'] . ' ' . date("h:i:s"); $newNum = getNewCtrlNo("reminder"); // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SAVE NEW REMINDER $ins_reminder = new Table; $ins_reminder->setSQLType($fms_db->getSQLType()); $ins_reminder->setInstance($fms_db->getInstance()); $ins_reminder->setTable("remindermaster"); $ins_reminder->setField("reminderID,title,description,location,category,startDate,dueDate ,createdBy,createdDate"); $ins_reminder->setValues("'$newNum','$title','$desc','$location','$category','$startDate','$dueDate' ,'$sys_UserID','$today'"); $ins_reminder->doQuery("save");
// -- START SAVE NEW WORK ORDER -- if(isset($_POST['save']) && !empty($_POST['save']) && $_POST['save'] == 1){ $serviceType = $_POST['txtServiceType']; $equipment = $_POST['txtEquipment']; $meter = $_POST['txtMeter']; $labor = str_replace(",","",$_POST['txtLabor']); $misc = str_replace(",","",$_POST['txtMiscellaneous']); $parts = str_replace(",","",$_POST['txtParts']); $disc = str_replace(",","",$_POST['txtDiscount']); $tax = str_replace(",","",$_POST['txtTax']); $subTotal = str_replace(",","",($labor + $misc + $parts) - $disc); $totalCost = str_replace(",","",$_POST['txtTotalCost']); $isWarranty = $_POST['txtIsWarranty']; $isBackJob = $_POST['txtIsBackJob']; $remarks = addslashes($_POST['txtRemarks']); $newNum = getNewCtrlNo("work_order"); $arrParts = $_POST['txtPartsArray']; // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SAVE NEW WORK ORDER MST $ins_womst = new Table; $ins_womst->setSQLType($fms_db->getSQLType()); $ins_womst->setInstance($fms_db->getInstance()); $ins_womst->setTable("workordermaster"); $ins_womst->setField("woReferenceNo,woTransactionDate,serviceTypeID,equipmentID,meter,remarks ,labor,miscellaneous,parts,discount,tax,subTotal,totalCost,isWarranty,isBackJob ,createdBy,createdDate");
<? if(isset($_GET['user_assignee_add']) && !empty($_GET['user_assignee_add']) && $_GET['user_assignee_add'] == '1'){ $assigneeid = $_GET['assigneeid']; $userid = $_GET['userid']; $newNum = getNewCtrlNo("user_assignee"); // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SAVE NEW USER MENU $ins_userassignee = new Table; $ins_userassignee->setSQLType($fms_db->getSQLType()); $ins_userassignee->setInstance($fms_db->getInstance()); $ins_userassignee->setTable("assigneemapper"); $ins_userassignee->setField("id,userID,assigneeID,type,createdBy,createdDate"); $ins_userassignee->setValues("'$newNum','$userid','$assigneeid','user_assignee',$sys_UserID','$today'"); $ins_userassignee->doQuery("save"); // CLOSING FMS DB $fms_db->DBClose(); // UPDATE CONTROL NO USER ASSIGNEE UpdateCtrlNo("user_assignee"); $url = BASE_URL . V_USERASSIGNEE . "?id=" . $userid; $msg = "User Assignee was successfully tagged."; $alert = new MessageAlert(); $alert->setURL($url); $alert->setMessage($msg);
<? // -- START SAVE NEW CATEGORY -- if(isset($_POST['save']) && !empty($_POST['save']) && $_POST['save'] == 1){ $catName = $_POST['txtCategoryName']; $newNum = getNewCtrlNo("category"); // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SAVE NEW CATEGORY $ins_category = new Table; $ins_category->setSQLType($fms_db->getSQLType()); $ins_category->setInstance($fms_db->getInstance()); $ins_category->setTable("categorymaster"); $ins_category->setField("categoryID,categoryName,createdBy,createdDate"); $ins_category->setValues("'$newNum','$catName','$sys_UserID','$today'"); $ins_category->doQuery("save"); // CLOSING FMS DB $fms_db->DBClose(); // UPDATE CONTROL NO CATEGORY UpdateCtrlNo("category"); $url = BASE_URL . V_CATEGORY; $msg = "New Category successfully saved."; $alert = new MessageAlert(); $alert->setURL($url); $alert->setMessage($msg);
<? // -- START SAVE NEW LOCATION -- if(isset($_POST['save']) && !empty($_POST['save']) && $_POST['save'] == 1){ $locName = $_POST['txtLocationName']; $newNum = getNewCtrlNo("location"); // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SAVE NEW LOCATION $ins_location = new Table; $ins_location->setSQLType($fms_db->getSQLType()); $ins_location->setInstance($fms_db->getInstance()); $ins_location->setTable("locationmaster"); $ins_location->setField("locationID,locationName,createdBy,createdDate"); $ins_location->setValues("'$newNum','$locName','$sys_UserID','$today'"); $ins_location->doQuery("save"); // CLOSING FMS DB $fms_db->DBClose(); // UPDATE CONTROL NO LOCATION UpdateCtrlNo("location"); $url = BASE_URL . V_LOCATION; $msg = "New Location successfully saved."; $alert = new MessageAlert(); $alert->setURL($url); $alert->setMessage($msg);
<? // -- START SAVE NEW SERVICE TYPE -- if(isset($_POST['save']) && !empty($_POST['save']) && $_POST['save'] == 1){ $desc = $_POST['txtDescription']; $newNum = getNewCtrlNo("service_type"); // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SAVE NEW SERVICE TYPE $ins_servicetype = new Table; $ins_servicetype->setSQLType($fms_db->getSQLType()); $ins_servicetype->setInstance($fms_db->getInstance()); $ins_servicetype->setTable("servicetypemaster"); $ins_servicetype->setField("serviceTypeID,description,createdBy,createdDate"); $ins_servicetype->setValues("'$newNum','$desc','$sys_UserID','$today'"); $ins_servicetype->doQuery("save"); // CLOSING FMS DB $fms_db->DBClose(); // UPDATE CONTROL NO SERVICE TYPE UpdateCtrlNo("service_type"); $url = BASE_URL . V_SERVICETYPE; $msg = "New Service Type successfully saved."; $alert = new MessageAlert(); $alert->setURL($url); $alert->setMessage($msg);
<? // -- START SAVE NEW MODEL -- if(isset($_POST['save']) && !empty($_POST['save']) && $_POST['save'] == 1){ $desc = $_POST['txtDescription']; $variant = $_POST['txtVariant']; $variantDesc = $_POST['txtVariantDesc']; $newNum = getNewCtrlNo("model"); // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SAVE NEW MODEL $ins_make = new Table; $ins_make->setSQLType($fms_db->getSQLType()); $ins_make->setInstance($fms_db->getInstance()); $ins_make->setTable("modelmaster"); $ins_make->setField("modelID,description,variant,variantDescription,createdBy,createdDate"); $ins_make->setValues("'$newNum','$desc','$variant','$variantDesc','$sys_UserID','$today'"); $ins_make->doQuery("save"); // CLOSING FMS DB $fms_db->DBClose(); // UPDATE CONTROL NO MODEL UpdateCtrlNo("model"); $url = BASE_URL . V_MODEL; $msg = "New Model successfully saved."; $alert = new MessageAlert();
$location = $_POST['txtLocation']; $fName = $_POST['txtFName']; $lName = $_POST['txtLName']; $gender = $_POST['txtGender']; $age = $_POST['txtAge']; $contactNo1 = $_POST['txtContactNo1']; $contactNo2 = $_POST['txtContactNo2']; $address = $_POST['txtAddress']; $costCenter = $_POST['txtCostCenter']; $immediateHead = $_POST['txtImmediateHead']; $immediateEmailAddress = $_POST['txtImmediateEmailAddress']; $attachment = $_FILES['txtAttachment']['name']; $licenseNo = $_POST['txtLicenseNo']; $licenseExpirationDate = $_POST['txtLicenseExpirationDate']; $licenseAddress = $_POST['txtLicenseAddress']; $newNum = getNewCtrlNo("assignee"); $dir = ASSIGNEEATTACHMENTS . $newNum; // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SAVE NEW ASSIGNEE $ins_assignee = new Table; $ins_assignee->setSQLType($fms_db->getSQLType()); $ins_assignee->setInstance($fms_db->getInstance()); $ins_assignee->setTable("assigneemaster"); $ins_assignee->setField("assigneeID,companyID,locationID,firstname,lastname,gender,age,contactNo1,contactNo2,address ,costCenter,immediateHead,emailAddress,attachment,licenseNo,expirationDate,licenseAddress ,createdBy,createdDate");
$num_searchpo = $searchpo->getLists(); // CLOSING FMS DB $fms_db->DBClose(); } // -- START SAVE NEW PURCHASE ORDER -- if(isset($_POST['save']) && !empty($_POST['save']) && $_POST['save'] == 1){ $wo = $_POST['txtWorkOrderNo']; $labor = str_replace(",","",$_POST['txtLabor']); $misc = str_replace(",","",$_POST['txtMiscellaneous']); $parts = str_replace(",","",$_POST['txtParts']); $disc = str_replace(",","",$_POST['txtDiscount']); $tax = str_replace(",","",$_POST['txtTax']); $totalCost = str_replace(",","",$_POST['txtTotalCost']); $attachment = $_FILES['txtAttachment']['name']; $newNum = getNewCtrlNo("po_receiving"); $dirPOAttachment = POATTACHMENTS . $newNum; if(!empty($attachment)){ $attachmentfld = ",attachment"; $attachmentval = ",'$attachment'"; }else{ $attachmentfld = null; $attachmentval = null; } // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB();
<? // -- START SAVE NEW PARTS -- if(isset($_POST['save']) && !empty($_POST['save']) && $_POST['save'] == 1){ $stockCode = $_POST['txtStockCode']; $brand = $_POST['txtBrand']; $model = $_POST['txtModel']; $desc = $_POST['txtDescription']; $stockOnHand = str_replace(",","",$_POST['txtStockOnHand']); $lowStockQty = str_replace(",","",$_POST['txtLowStockQty']); $price = str_replace(",","",$_POST['txtPrice']); $retailPrice = str_replace(",","",$_POST['txtRetailPrice']); $newNum = getNewCtrlNo("parts"); // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SAVE NEW PARTS $ins_parts = new Table; $ins_parts->setSQLType($fms_db->getSQLType()); $ins_parts->setInstance($fms_db->getInstance()); $ins_parts->setTable("partsmaster"); $ins_parts->setField("partsID,stockCode,brand,model,description,stockOnHand,lowStockQty,price,retailPrice ,createdBy,createdDate"); $ins_parts->setValues("'$newNum','$stockCode','$brand','$model','$desc','$stockOnHand','$lowStockQty','$price','$retailPrice' ,'$sys_UserID','$today'"); $ins_parts->doQuery("save"); // CLOSING FMS DB $fms_db->DBClose();
<? // -- START SAVE NEW MENU -- if(isset($_POST['save']) && !empty($_POST['save']) && $_POST['save'] == 1){ $menuName = $_POST['txtMenuName']; $menuController = $_POST['txtMenuController']; $isMaintenance = $_POST['txtIsMenuMaintenance']; $isTransaction = $_POST['txtIsMenuTransaction']; $isReport = $_POST['txtIsMenuReport']; $sortNo = $_POST['txtSortNo']; if(!empty($_POST['txtGlyphicon'])){ $glyphicon = $_POST['txtGlyphicon']; }else{ $glyphicon = "glyphicons glyphicons-book"; } $newNum = getNewCtrlNo("menu"); // SET FMS DB $fms_db = new DBConfig; $fms_db->setFleetDB(); // SAVE NEW MENU $ins_menu = new Table; $ins_menu->setSQLType($fms_db->getSQLType()); $ins_menu->setInstance($fms_db->getInstance()); $ins_menu->setTable("menumaster"); $ins_menu->setField("menuID,menuName,menuController,isMenuMaintenance,isMenuTransactions,isMenuReport,SortNo ,createdBy,createdDate"); $ins_menu->setValues("'$newNum','$menuName','$menuController','$isMaintenance','$isTransaction','$isReport','$sortNo' ,'$sys_UserID','$today'"); $ins_menu->doQuery("save");