当前位置: 首页>>代码示例>>PHP>>正文


PHP Table::setValues方法代码示例

本文整理汇总了PHP中Table::setValues方法的典型用法代码示例。如果您正苦于以下问题:PHP Table::setValues方法的具体用法?PHP Table::setValues怎么用?PHP Table::setValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Table的用法示例。


在下文中一共展示了Table::setValues方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getnewCtrlNo



		// NEW NO FOR ASSIGNEE COMPANY
		$newNum = getnewCtrlNo("assignee_company");

		// SET FMS DB
		$fms_db = new DBConfig;
		$fms_db->setFleetDB();

		// SAVE NEW USER MENU
		$ins_assigneecompany = new Table;
		$ins_assigneecompany->setSQLType($fms_db->getSQLType());
		$ins_assigneecompany->setInstance($fms_db->getInstance());
		$ins_assigneecompany->setTable("assigneemapper");
		$ins_assigneecompany->setField("id,companyID,assigneeID,type,createdBy,createdDate");
		$ins_assigneecompany->setValues("'$newNum','$companyid','$assigneeid','assignee_company','$sys_UserID','$today'");
		$ins_assigneecompany->doQuery("save");
		
		// CLOSING FMS DB
		$fms_db->DBClose();

		// UPDATE CONTROL NO
		UpdateCtrlNo("assignee_company");

		$url = BASE_URL . V_ASSIGNEECOMPANY . "?id=" . $assigneeid;
		$msg = "Company was successfully tagged to Assignee.";

		$alert = new MessageAlert();
		$alert->setURL($url);
		$alert->setMessage($msg);
		$alert->Alert();
开发者ID:rogerapras,项目名称:fms,代码行数:29,代码来源:assigneecompanyController.php

示例2:

		if($curAssignee != $assignee){
			// SAVE ASSIGNEE EQUIPMENT
			$ins_ass_equip = new Table;
			$ins_ass_equip->setSQLType($fms_db->getSQLType());
			$ins_ass_equip->setInstance($fms_db->getInstance());
			$ins_ass_equip->setTable("assigneeequipment");
			$ins_ass_equip->setField("id,assigneeID,equipmentID,assignedStart");
			$ins_ass_equip->setValues("'$newNum','$assignee','$id','$today'");
			$ins_ass_equip->doQuery("save");

			// UPDATE ASSIGNEE EQUIPMENT
			$upd_ass_equip = new Table;
			$upd_ass_equip->setSQLType($fms_db->getSQLType());
			$upd_ass_equip->setInstance($fms_db->getInstance());
			$upd_ass_equip->setTable("assigneeequipment");
			$upd_ass_equip->setValues("assignedEnd = '$today', isCurrent = '0'");
			$upd_ass_equip->setParam("WHERE assigneeID = '$curAssignee' AND equipmentID = '$id'");
			$upd_ass_equip->doQuery("update");
		}

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

		// UPDATE CONTROL NO
		UpdateCtrlNo("assignee_equipment");

		if($_FILES['txtEquipmentPhoto']['size'] > 0){
			if (!is_dir($dir)) {
				mkdir($dir, 0777, true);
			}
			if(file_exists($dir . "/" . $oldPhoto)){
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:equipmentController.php

示例3: MessageAlert

		$suppContactNo = $_POST['txtSupplierContactNo'];
		$suppContactPerson = $_POST['txtSupplierContactPerson'];
		$suppTIN = $_POST['txtSupplierTIN'];
		$status = $_POST['txtStatus'];

		// 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->setTable("suppliermaster");
		$supplier->setValues("supplierName = '$suppName',supplierAddress = '$suppAddress',supplierEmailAddress = '$suppEmailAddress'
						,supplierContactNo = '$suppContactNo',contactPerson = '$suppContactPerson',TIN = '$suppTIN'
						,modifiedBy = '$sys_UserID', modifiedDate = '$today', status = '$status'");
		$supplier->setParam("WHERE supplierID = '$id'");
		$supplier->doQuery("update");

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

		$url = BASE_URL . V_SUPPLIER;
		$msg = "Supplier successfully updated.";

		$alert = new MessageAlert();
		$alert->setURL($url);
		$alert->setMessage($msg);
		$alert->Alert();
	}
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:supplierController.php

示例4: date

		$desc = $_POST['txtDescription'];
		$startDate = $_POST['txtStartDate'] . ' ' . date("h:i:s");
		$dueDate = $_POST['txtDueDate']  . ' ' . date("h:i:s");
		$status = $_POST['txtStatus'];

		// SET FMS DB
		$fms_db = new DBConfig;
		$fms_db->setFleetDB();

		// SET REMINDER
		$parts = new Table;
		$parts->setSQLType($fms_db->getSQLType());
		$parts->setInstance($fms_db->getInstance());
		$parts->setTable("remindermaster");
		$parts->setValues("title = '$title', description = '$desc', location = '$location', category = '$category'
						, startDate = '$startDate', dueDate = '$dueDate'
						, modifiedBy = '$sys_UserID', modifiedDate = '$today', status = '$status'");
		$parts->setParam("WHERE reminderID = '$id'");
		$parts->doQuery("update");

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

		$url = BASE_URL . V_REMINDERS;
		$msg = "Reminder successfully updated.";

		$alert = new MessageAlert();
		$alert->setURL($url);
		$alert->setMessage($msg);
		$alert->Alert();
	}
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:remindersController.php

示例5:

	// APPROVED WORK ORDER
	if(isset($_POST['approved']) && !empty($_POST['approved']) && $_POST['approved'] == 1){
		$apprRemarks = $_POST['txtApproverRemarks'];
		$status = $_POST['txtStatus'];
		$id = $worefno;

		// SET FMS DB
		$fms_db = new DBConfig;
		$fms_db->setFleetDB();

		// SET WORK ORDER
		$workorder = new Table;
		$workorder->setSQLType($fms_db->getSQLType());
		$workorder->setInstance($fms_db->getInstance());
		$workorder->setTable("workordermaster");
		$workorder->setValues("approverRemarks = '$apprRemarks', status = '$status', approvedDate = '$today'");
		$workorder->setParam("WHERE woReferenceNo = '$id'");
		$workorder->doQuery("update");
		
		// CLOSING FMS DB
		$fms_db->DBClose();

		switch($status){
			case 2: $statusDesc = 'approved'; break;
			case 7: $statusDesc = 'disapproved'; break;
			default: break;
		}

		$url = BASE_URL;
		$msg = "Work Order successfully " . $statusDesc . ".";
开发者ID:rogerapras,项目名称:fms,代码行数:30,代码来源:workorderController.php

示例6: MessageAlert

<?
	if(isset($_GET['user_access_add']) && !empty($_GET['user_access_add']) && $_GET['user_access_add'] == '1'){
		$menuid = $_GET['menuid'];
		$userid = $_GET['userid'];

		// SET FMS DB
		$fms_db = new DBConfig;
		$fms_db->setFleetDB();

		// SAVE NEW USER MENU
		$ins_assignee = new Table;
		$ins_assignee->setSQLType($fms_db->getSQLType());
		$ins_assignee->setInstance($fms_db->getInstance());
		$ins_assignee->setTable("usermenu");
		$ins_assignee->setField("userID,menuID,createdBy,createdDate");
		$ins_assignee->setValues("'$userid','$menuid','$sys_UserID','$today'");
		$ins_assignee->doQuery("save");

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

		$url = BASE_URL . V_USERACCESS . "?id=" . $userid;
		$msg = "Menu was successfully added.";

		$alert = new MessageAlert();
		$alert->setURL($url);
		$alert->setMessage($msg);
		$alert->Alert();
	}
	if(isset($_GET['user_access_remove']) && !empty($_GET['user_access_remove']) && $_GET['user_access_remove'] == '1'){
		$menuid = $_GET['menuid'];
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:useraccessController.php

示例7: MessageAlert

	// -- 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
		$fms_db = new DBConfig;
		$fms_db->setFleetDB();

		// SET CATEGORY
		$category = new Table;
		$category->setSQLType($fms_db->getSQLType());
		$category->setInstance($fms_db->getInstance());
		$category->setTable("categorymaster");
		$category->setValues("categoryName = '$catName', modifiedBy = '$sys_UserID', modifiedDate = '$today', status = '$status'");
		$category->setParam("WHERE categoryID = '$id'");
		$category->doQuery("update");

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

		$url = BASE_URL . V_CATEGORY;
		$msg = "Category successfully updated.";

		$alert = new MessageAlert();
		$alert->setURL($url);
		$alert->setMessage($msg);
		$alert->Alert();
	}
	// -- END UPDATE CATEGORY --
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:categoryController.php

示例8: MessageAlert

	// -- 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
		$fms_db = new DBConfig;
		$fms_db->setFleetDB();

		// SET LOCATION
		$location = new Table;
		$location->setSQLType($fms_db->getSQLType());
		$location->setInstance($fms_db->getInstance());
		$location->setTable("locationmaster");
		$location->setValues("locationName = '$locName', modifiedBy = '$sys_UserID', modifiedDate = '$today', status = '$status'");
		$location->setParam("WHERE locationID = '$id'");
		$location->doQuery("update");

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

		$url = BASE_URL . V_LOCATION;
		$msg = "Location successfully updated.";

		$alert = new MessageAlert();
		$alert->setURL($url);
		$alert->setMessage($msg);
		$alert->Alert();
	}
	// -- END UPDATE LOCATION --
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:locationController.php

示例9: MessageAlert

	// -- 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
		$fms_db = new DBConfig;
		$fms_db->setFleetDB();

		// SET SERVICE TYPE
		$servicetype = new Table;
		$servicetype->setSQLType($fms_db->getSQLType());
		$servicetype->setInstance($fms_db->getInstance());
		$servicetype->setTable("servicetypemaster");
		$servicetype->setValues("description = '$desc', modifiedBy = '$sys_UserID', modifiedDate = '$today', status = '$status'");
		$servicetype->setParam("WHERE serviceTypeID = '$id'");
		$servicetype->doQuery("update");

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

		$url = BASE_URL . V_SERVICETYPE;
		$msg = "Service Type successfully updated.";

		$alert = new MessageAlert();
		$alert->setURL($url);
		$alert->setMessage($msg);
		$alert->Alert();
	}
	// -- END UPDATE SERVICE TYPE --
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:servicetypeController.php

示例10: generatePassword

			$alert->Alert();
		}

		// GENERATE NEW PASSWORD ENTERED
		$newpass = generatePassword(strtoupper($new));

		// SET FMS DB
		$fms_db = new DBConfig;
		$fms_db->setFleetDB();

		// SET USER
		$user = new Table;
		$user->setSQLType($fms_db->getSQLType());
		$user->setInstance($fms_db->getInstance());
		$user->setTable("usermaster");
		$user->setValues("userPass = '$newpass'");
		$user->setParam("WHERE userID = '$id'");
		$user->doQuery("update");

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

		$url = BASE_URL . V_USERCHANGEPASSWORD;
		$msg = "Password successfully changed.";

		$alert = new MessageAlert();
		$alert->setURL($url);
		$alert->setMessage($msg);
		$alert->Alert();
	}
	// --END USER CHANGE PASSWORD --
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:userController.php

示例11: MessageAlert

		$id = $_GET['id'];
		$desc = $_POST['txtDescription'];
		$variant = $_POST['txtVariant'];
		$variantDesc = $_POST['txtVariantDesc'];
		$status = $_POST['txtStatus'];

		// 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->setTable("modelmaster");
		$model->setValues("description = '$desc', variant = '$variant', variantDescription = '$variantDesc'
					, modifiedBy = '$sys_UserID', modifiedDate = '$today', status = '$status'");
		$model->setParam("WHERE modelID = '$id'");
		$model->doQuery("update");

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

		$url = BASE_URL . V_MODEL;
		$msg = "Model successfully updated.";

		$alert = new MessageAlert();
		$alert->setURL($url);
		$alert->setMessage($msg);
		$alert->Alert();
	}
	// -- END UPDATE MODEL --
开发者ID:rogerapras,项目名称:fms,代码行数:32,代码来源:modelController.php

示例12:

		if($_FILES['txtAttachment']['size'] > 0){
			$fAttachment = "attachment = '$attachment',";
		}

		// 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->setTable("assigneemaster");
		$assignee->setValues("companyID = '$company',locationID = '$location',firstname = '$fName'
						,lastname = '$lName',gender = '$gender',age = '$age',contactNo1 = '$contactNo1',contactNo2 = '$contactNo2'
						,address = '$address',costCenter = '$costCenter',immediateHead = '$immediateHead'
						,emailAddress = '$immediateEmailAddress', $fAttachment licenseNo = '$licenseNo'
						,expirationDate = '$licenseExpirationDate',licenseAddress = '$licenseAddress'
						, modifiedBy = '$sys_UserID', modifiedDate = '$today', status = '$status'");
		$assignee->setParam("WHERE assigneeID = '$id'");
		$assignee->doQuery("update");

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

		if($_FILES['txtAttachment']['size'] > 0){
			if (!is_dir($dir)) {
				mkdir($dir, 0777, true);
			}
			if(file_exists($dir . "/" . $oldAttachment)){
				unlink($dir . "/" . $oldAttachment);
			}
开发者ID:rogerapras,项目名称:fms,代码行数:32,代码来源:assigneeController.php

示例13: MessageAlert

		if(!empty($attachment)){
			$attachmentval = ",attachment = '$attachment'";
		}

		// SET FMS DB
		$fms_db = new DBConfig;
		$fms_db->setFleetDB();

		// SET PURCHASE ORDER
		$poreceiving = new Table;
		$poreceiving->setSQLType($fms_db->getSQLType());
		$poreceiving->setInstance($fms_db->getInstance());
		$poreceiving->setTable("poreceiving");
		$poreceiving->setValues("woReferenceNo = '$wo',labor = '$labor',miscellaneous = '$misc',parts = '$parts'
						,discount = '$disc',tax = '$tax',Amount = '$totalCost' $attachment
						,status = '$status'
						, modifiedBy = '$sys_UserID', modifiedDate = '$today'");
		$poreceiving->setParam("WHERE poReferenceNo = '$id'");
		$poreceiving->doQuery("update");
		
		// CLOSING FMS DB
		$fms_db->DBClose();

		$url = BASE_URL . V_PORECEIVINGEDIT . "?edit=1&id=" . $id;
		$msg = "Purchase Order successfully updated.";

		$alert = new MessageAlert();
		$alert->setURL($url);
		$alert->setMessage($msg);
		$alert->Alert();
	}
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:poreceivingController.php

示例14: MessageAlert

		$lowStockQty = str_replace(",","",$_POST['txtLowStockQty']);
		$price = str_replace(",","",$_POST['txtPrice']);
		$retailPrice = str_replace(",","",$_POST['txtRetailPrice']);
		$status = $_POST['txtStatus'];

		// 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->setTable("partsmaster");
		$parts->setValues("stockCode = '$stockCode', brand = '$brand', model = '$model', description = '$desc'
						, stockOnHand = '$stockOnHand', lowStockQty = '$lowStockQty', price = '$price', retailPrice = '$retailPrice'
						, modifiedBy = '$sys_UserID', modifiedDate = '$today', status = '$status'");
		$parts->setParam("WHERE partsID = '$id'");
		$parts->doQuery("update");

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

		$url = BASE_URL . V_PARTS;
		$msg = "Parts successfully updated.";

		$alert = new MessageAlert();
		$alert->setURL($url);
		$alert->setMessage($msg);
		$alert->Alert();
	}
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:partsController.php

示例15: MessageAlert

	// -- 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
		$fms_db = new DBConfig;
		$fms_db->setFleetDB();

		// SET MAKE
		$make = new Table;
		$make->setSQLType($fms_db->getSQLType());
		$make->setInstance($fms_db->getInstance());
		$make->setTable("makemaster");
		$make->setValues("makeName = '$makeName', modifiedBy = '$sys_UserID', modifiedDate = '$today', status = '$status'");
		$make->setParam("WHERE makeID = '$id'");
		$make->doQuery("update");

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

		$url = BASE_URL . V_MAKE;
		$msg = "Make successfully updated.";

		$alert = new MessageAlert();
		$alert->setURL($url);
		$alert->setMessage($msg);
		$alert->Alert();
	}
	// -- END UPDATE MAKE --
开发者ID:rogerapras,项目名称:fms,代码行数:31,代码来源:makeController.php


注:本文中的Table::setValues方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。