示例#1
0
$theform->addField($theinput);
$theinput = new inputSmartSearch($db, "assignedtoid", "Pick Active User", $therecord["assignedtoid"], "assigned to", false, 18, 255, false);
$theform->addField($theinput);
$theinput = new inputDatePicker("assignedtodate", $therecord["assignedtodate"], "follow up date");
$theform->addField($theinput);
$theinput = new inputTimePicker("assignedtotime", $therecord["assignedtotime"], "follow up time", false, 11, 15, false);
$theform->addField($theinput);
$theinput = new inputChoiceList($db, "category", $therecord["category"], "notecategories");
$theform->addField($theinput);
//repeat fields
if ($therecord["startdate"]) {
    $repeatBase = stringToDate($therecord["startdate"], "SQL");
} else {
    $repeatBase = mktime();
}
$theinput = new inputCheckbox("repeating", $therecord["repeating"], "repeat");
$theinput->setAttribute("onchange", "checkRepeat();");
$theform->addField($theinput);
$temparray = array("Daily" => "Daily", "Weekly" => "Weekly", "Monthly" => "Monthly", "Yearly" => "Yearly");
$theinput = new inputBasiclist("repeattype", $therecord["repeattype"], $temparray, "frequency");
$theinput->setAttribute("onchange", "changeRepeatType();");
$theform->addField($theinput);
$theinput = new inputField("repeatevery", $therecord["repeatevery"], "frequency of repeating", false, "integer", 2, 4, false);
$theform->addField($theinput);
$theinput = new inputBasiclist("monthlyontheweek", $therecord["repeatontheweek"], $thetable->weekArray, "on the week of", false);
$theinput2 = new inputBasiclist("yearlyontheweek", $therecord["repeatontheweek"], $thetable->weekArray, "on the week of", false);
if (!$therecord["repeatontheday"]) {
    $theinput->setAttribute("disabled", "disabled");
    $theinput2->setAttribute("disabled", "disabled");
    $weekNumber = ceil(date("d", $repeatBase) / 7);
    if ($weekNumber > 4) {
示例#2
0
include "modules/bms/include/aritems.php";
$aritems = new aritems($db, "tbld:c595dbe7-6c77-1e02-5e81-c2e215736e9c");
$therecord = $aritems->processAddEditPage();
$payments = new aritemPayments($db, $therecord);
$client = new relatedClient($db, $therecord["clientid"]);
$clientInfo = $client->getClientInfo();
$clientName = $clientInfo["name"];
if (isset($therecord["phpbmsStatus"])) {
    $statusmessage = $therecord["phpbmsStatus"];
}
$phpbms->cssIncludes[] = "pages/aritems.css";
$phpbms->jsIncludes[] = "modules/bms/javascript/aritem.js";
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theinput = new inputCheckbox("posted", $therecord["posted"]);
$theinput->setAttribute("disabled", "disabled");
$theform->addField($theinput);
$theinput = new inputField("client", $clientName, NULL, true, NULL, 60, 128);
$theinput->setAttribute("class", "uneditable");
$theinput->setAttribute("readonly", "readonly");
$theform->addField($theinput);
$theinput = new inputField("type", $therecord["type"], NULL, true, NULL, 14, 64);
$theinput->setAttribute("class", "uneditable");
$theinput->setAttribute("readonly", "readonly");
$theform->addField($theinput);
$theinput = new inputField("status", $therecord["status"], NULL, true, NULL, 9, 64);
$theinput->setAttribute("class", "uneditable");
$theinput->setAttribute("readonly", "readonly");
$theform->addField($theinput);
$theinput = new inputField("theid", $therecord["id"], "id", true, NULL, 9, 64);
    $statusmessage = $therecord["phpbmsStatus"];
}
$pageTitle = "Shipping Method";
$phpbms->cssIncludes[] = "pages/shippingmethods.css";
$phpbms->jsIncludes[] = "modules/bms/javascript/shippingmethods.js";
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theinput = new inputCheckbox("inactive", $therecord["inactive"]);
$theform->addField($theinput);
$theinput = new inputField("priority", $therecord["priority"], NULL, false, "integer", 8, 8);
$theform->addField($theinput);
$theinput = new inputField("name", $therecord["name"], NULL, true, NULL, 32, 128);
$theinput->setAttribute("class", "important");
$theform->addField($theinput);
$theinput = new inputCheckbox("canestimate", $therecord["canestimate"], "estimate shipping");
$theinput->setAttribute("onchange", "checkScript(this);");
$theform->addField($theinput);
$theform->jsMerge();
//==============================================================
//End Form Elements
include "header.php";
?>
<div class="bodyline">
	<?php 
$theform->startForm($pageTitle);
?>

	<fieldset id="fsAttributes">
		<legend>attributes</legend>
		<p><br/><?php