本文整理汇总了PHP中db_enum函数的典型用法代码示例。如果您正苦于以下问题:PHP db_enum函数的具体用法?PHP db_enum怎么用?PHP db_enum使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了db_enum函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: db_enum
<?php
echo db_enum("property", "garden", $intGarden);
?>
</select></td>
<td align="right" class="greyForm">Parking</td>
<td colspan="3" class="greyForm"><select name="parking" style="width: 190px;">
<?php
echo db_enum("property", "parking", $intParking);
?>
</select></td>
</tr>
<tr>
<td class="greyForm" align="right">Card</td>
<td class="greyForm"><select name="card" style="width: 190px;">
<?php
echo db_enum("property", "card", $intCard);
?>
</select></td>
<td align="right" class="greyForm"> </td>
<td colspan="3" class="greyForm"> </td>
</tr>
</table>
<?php
if ($SaleLet == 1 && $intTenure != 1) {
?>
<table align="center" width="600" border="0" cellspacing="3" cellpadding="4">
<tr>
<td colspan="2"><EM>The following details have been provided by the vendor and have not been verified.</EM></td>
</tr>
<tr>
<td><strong>Tenure:</strong> </td>
示例2: while
while ($row = $q->fetchRow()) {
$matched_areas[$row["are_title"]] = $row["are_id"];
if ($numRows == 1) {
$default_area = $row["are_title"];
}
}
if ($are_title) {
$default_area = $are_title;
}
if ($matched_areas) {
$formDataArea = array('pro_area' => array('type' => 'radio', 'label' => 'Area', 'value' => $default_area, 'options' => $matched_areas), 'pro_areanew' => array('type' => 'button', 'label' => 'New Area', 'value' => 'New Area', 'attributes' => array('class' => 'button', 'onClick' => 'javascript:addArea(\'' . $pc1 . '\',\'' . urlencode($_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING']) . '\')')));
} else {
$formDataArea = array('pro_areanew' => array('type' => 'button', 'label' => 'New Area', 'value' => 'New Area', 'attributes' => array('class' => 'button', 'onClick' => 'javascript:addArea(\'' . $pc1 . '\',\'' . urlencode($_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING']) . '\')')));
}
# build data arrays for property particulars
$formData = array('dea_ptype' => array('type' => 'select_multi', 'label' => 'Property Type', 'required' => 2, 'options' => array('dd1' => $ptype['dd1'], 'dd2' => $ptype['dd2'])), 'dea_bedroom' => array('type' => 'select_number', 'label' => 'Bedrooms', 'value' => $dea_bedroom, 'attributes' => array('class' => 'narrow'), 'options' => array('blank' => 'blank')), 'dea_reception' => array('type' => 'select_number', 'label' => 'Receptions', 'value' => $dea_reception, 'attributes' => array('class' => 'narrow'), 'options' => array('blank' => 'blank')), 'dea_bathroom' => array('type' => 'select_number', 'label' => 'Bathrooms', 'value' => $dea_bathroom, 'attributes' => array('class' => 'narrow'), 'options' => array('blank' => 'blank')), 'dea_floor' => array('type' => 'select', 'label' => 'Floor', 'value' => $dea_floor, 'options' => join_arrays(array(array('blank' => ''), db_enum("deal", "dea_floor", "array"))), 'attributes' => array('class' => 'medium')), 'dea_floors' => array('type' => 'select_number', 'label' => 'Floors', 'options' => array('blank' => '', 'min' => '1'), 'value' => $dea_floors, 'attributes' => array('class' => 'narrow')));
// remove area from the equation
#$formData = join_arrays(array($formDataArea,$formData));
if (!$_GET["action"]) {
// start new form object
$form = new Form();
$form->addForm("form", "get", $PHP_SELF);
$form->addHtml("<div id=\"standard_form\">\n");
$form->addField("hidden", "stage", "", "particulars");
$form->addField("hidden", "action", "", "update");
$form->addField("hidden", "cli_id", "", $cli_id);
$form->addField("hidden", "pro_id", "", $pro_id);
$form->addField("hidden", "dea_id", "", $dea_id);
$form->addHtml("<fieldset>\n");
$form->addLegend('Property Particulars');
$form->addData($formDataArea, $_GET);
示例3: array
// vendor / landlord page
$formData2 = array('dea_notes_arr' => array('type' => 'textarea', 'label' => 'Add Access Info', 'attributes' => array('class' => 'noteInput')));
// marketing info
if ($dea_commissiontype == 'fixed') {
$dea_commission = format_price($dea_commission);
}
if ($dea_type == 'Sales') {
if ($dea_valueprice) {
$dea_valueprice = format_price($dea_valueprice);
}
if ($dea_valuepricemax) {
$dea_valuepricemax = format_price($dea_valuepricemax);
}
$formData3 = array('dea_valueprice' => array('type' => 'text', 'label' => 'Valuation Price', 'group' => 'Valuation Price', 'value' => $dea_valueprice, 'required' => 3, 'attributes' => array('style' => 'width: 100px', 'maxlength' => 12), 'function' => 'numbers_only'), 'dea_valuepricemax' => array('type' => 'text', 'label' => 'Valuation Price', 'group' => 'Valuation Price', 'last_in_group' => 1, 'value' => $dea_valuepricemax, 'required' => 3, 'attributes' => array('style' => 'width: 100px', 'maxlength' => 12), 'function' => 'numbers_only', 'tooltip' => 'You can enter a price range, or just enter a single price in the first field'), 'dea_marketprice' => array('type' => 'text', 'label' => 'Market Price', 'value' => format_price($dea_marketprice), 'required' => 3, 'attributes' => array('style' => 'width: 100px', 'maxlength' => 12), 'group' => 'Market Price', 'function' => 'numbers_only'), 'dea_qualifier' => array('type' => 'select', 'label' => 'Market Price', 'value' => $dea_qualifier, 'required' => 2, 'options' => db_enum('deal', 'dea_qualifier', 'array'), 'group' => 'Market Price', 'last_in_group' => 1, 'attributes' => array('style' => 'width: 100px')), 'dea_commission' => array('type' => 'text', 'label' => 'Commission', 'group' => 'Commission', 'value' => $dea_commission, 'required' => 3, 'attributes' => array('style' => 'width: 55px', 'maxlength' => 9), 'function' => 'numbers_only'), 'dea_commissiontype' => array('type' => 'select', 'label' => 'Commission', 'group' => 'Commission', 'last_in_group' => 1, 'value' => $dea_commissiontype, 'required' => 3, 'options' => db_enum('deal', 'dea_commissiontype', 'array')), 'dea_share' => array('type' => 'select', 'label' => 'Deal Share', 'value' => $dea_share, 'required' => 2, 'attributes' => array('style' => 'width: 70px'), 'options' => db_enum('deal', 'dea_share', 'array')), 'dea_chainfree' => array('type' => 'radio', 'label' => 'Chain Free', 'value' => $dea_chainfree, 'required' => 2, 'options' => db_enum('deal', 'dea_chainfree', 'array')), 'dea_tenure' => array('type' => 'select', 'label' => 'Tenure', 'value' => $dea_tenure, 'required' => 2, 'options' => db_enum("deal", "dea_tenure", "array"), 'attributes' => array('style' => 'width: 165px')), 'dea_leaseend' => array('type' => 'text', 'label' => 'Lease Expires', 'value' => $dea_leaseend, 'attributes' => array('style' => 'width: 165px'), 'tooltip' => 'This must be the year the lease expires, must be 4 digits long e.g. 2010'), 'dea_servicecharge' => array('type' => 'text', 'label' => 'Service Charge', 'value' => $dea_servicecharge, 'attributes' => array('style' => 'width: 165px')), 'dea_groundrent' => array('type' => 'text', 'label' => 'Ground Rent', 'value' => $dea_groundrent, 'attributes' => array('style' => 'width: 165px')), 'dea_board' => array('type' => 'select', 'label' => 'Board', 'value' => $dea_board, 'required' => 2, 'options' => db_enum("deal", "dea_board", "array"), 'attributes' => array('style' => 'width: 120px'), 'group' => 'Board'), 'dea_boardtype' => array('type' => 'select', 'label' => 'Board', 'value' => $dea_boardtype, 'required' => 2, 'options' => db_enum("deal", "dea_boardtype", "array"), 'attributes' => array('style' => 'width: 80px'), 'group' => 'Board'), 'dea_board_log' => array('type' => 'button', 'label' => 'History', 'value' => 'History', 'attributes' => array('class' => 'button', 'onClick' => 'window.open(\'changeLog.php?scope=board&dea_id=' . $dea_id . '\',\'logWin\',\'width=550,height=400,scrollbars=1\');'), 'group' => 'Board', 'last_in_group' => 1), 'dea_branch' => array('type' => 'select_branch', 'label' => 'Branch', 'value' => $dea_branch, 'required' => 2, 'attributes' => array('style' => 'width: 165px')), 'dea_neg' => array('type' => 'select_user', 'label' => 'Negotiator', 'value' => $dea_neg, 'required' => 3, 'attributes' => array('style' => 'width: 165px'), 'options' => array('' => '(unassigned)')));
} elseif ($dea_type == 'Lettings') {
$formData3 = array('dea_marketprice' => array('type' => 'text', 'label' => 'Market Price (pw)', 'value' => format_price($dea_marketprice, 'GBP', true), 'required' => 2, 'attributes' => array('style' => 'width: 100px', 'maxlength' => 15), 'function' => 'numbers_only'), 'dea_commission' => array('type' => 'text', 'label' => 'Commission', 'group' => 'Commission', 'value' => $dea_commission, 'required' => 3, 'attributes' => array('style' => 'width: 70px', 'maxlength' => 7), 'function' => 'numbers_only'), 'dea_commissiontype' => array('type' => 'select', 'label' => 'Commission', 'group' => 'Commission', 'last_in_group' => 1, 'value' => $dea_commissiontype, 'required' => 3, 'options' => db_enum('deal', 'dea_commissiontype', 'array')), 'dea_share' => array('type' => 'select', 'label' => 'Deal Share', 'value' => $dea_share, 'required' => 2, 'attributes' => array('style' => 'width: 100px'), 'options' => db_enum('deal', 'dea_share', 'array')), 'dea_term' => array('type' => 'select', 'label' => 'Term', 'value' => $dea_term, 'required' => 3, 'attributes' => array('style' => 'width: 100px'), 'options' => join_arrays(array(array('' => ''), db_enum('deal', 'dea_term', 'array')))), 'dea_available' => array('type' => 'datetime', 'label' => 'Available Date', 'value' => $dea_available, 'attributes' => array('style' => 'width: 100px')), 'dea_managed' => array('type' => 'radio', 'label' => 'Managed by W&S', 'value' => $dea_managed, 'options' => db_enum('deal', 'dea_managed', 'array')), 'dea_board' => array('type' => 'select', 'label' => 'Board', 'value' => $dea_board, 'required' => 2, 'options' => db_enum("deal", "dea_board", "array"), 'attributes' => array('style' => 'width: 120px'), 'group' => 'Board'), 'dea_boardtype' => array('type' => 'select', 'label' => 'Board', 'value' => $dea_boardtype, 'required' => 2, 'options' => db_enum("deal", "dea_boardtype", "array"), 'attributes' => array('style' => 'width: 80px'), 'group' => 'Board'), 'dea_board_log' => array('type' => 'button', 'label' => 'History', 'value' => 'History', 'attributes' => array('class' => 'button', 'onClick' => 'window.open(\'changeLog.php?scope=board&dea_id=' . $dea_id . '\',\'logWin\',\'width=550,height=400,scrollbars=1\');'), 'group' => 'Board', 'last_in_group' => 1), 'dea_branch' => array('type' => 'select_branch', 'label' => 'Branch', 'value' => $dea_branch, 'required' => 2, 'attributes' => array('style' => 'width: 165px')), 'dea_neg' => array('type' => 'select_user', 'label' => 'Negotiator', 'value' => $dea_neg, 'required' => 3, 'attributes' => array('style' => 'width: 165px'), 'options' => array('' => '(unassigned)')));
}
# build select of possible new statuses, and create any additional fields relating to the possible new statuses
switch ($dea_status) {
case "Valuation":
$statuses = array('Valuation' => 'Valuation', 'Instructed' => 'Instructed', 'Not Instructed' => 'Not Instructed');
$additional_fields = array();
break;
case "Instructed":
$statuses = array('Instructed' => 'Instructed', 'Production' => 'Production', 'Withdrawn' => 'Withdrawn', 'Disinstructed' => 'Disinstructed');
$additional_fields = array();
break;
case "Production":
$statuses = array('Production' => 'Production', 'Proofing' => 'Proofing', 'Withdrawn' => 'Withdrawn', 'Disinstructed' => 'Disinstructed');
$additional_fields = array();
break;
示例4: db_dropdown
<td>Bathrooms</td>
<td>' . db_dropdown("pro_bathroom", "10", $pro_bathroom, "0", "NULL") . '</td>
</tr>
<tr>
<td>Garden length</td>
<td><input name="pro_gardenlength" type="text" size="10" value="' . $pro_gardenlength . '">
<input name="pro_gardenlength_unit" type="radio" value="mtr" checked>
meters
<input name="pro_gardenlength_unit" type="radio" value="ft">
feet </td>
<td>Built</td>
<td><input name="pro_built" type="text" size="10" value="' . $pro_built . '"></td>
</tr>
<tr>
<td>Listed</td>
<td>' . db_enum("property", "pro_listed", "select", $pro_listed, "NULL") . '</td>
<td>Refurbished</td>
<td><input name="pro_refurbed" type="text" size="10" value="' . $pro_refurbed . '"></td>
</tr>
</table>
<input type="submit">
</form>
';
echo html_header("Add Property", " onLoad=\"init(document.forms[0].pro_psubtype)\"", $_js);
echo $render;
echo $html_footer;
// end of stage
break;
/////////////////////////////////////////////////////////////////////////////
// stage 5: validate and store info in property table
/////////////////////////////////////////////////////////////////////////////
示例5: replaceQueryStringArray
$render .= '</tr>' . "\n";
}
}
$render .= '
<tr>
<th colspan="7">
<a href="?' . replaceQueryStringArray($query_string, array('d', 'm', 'y', 'app_highlight', 'jumpto')) . '&y=' . $Yesterday['y'] . '&m=' . $Yesterday['m'] . '&d=' . $Yesterday['d'] . '" title="Yesterday">«</a>
<a href="?' . replaceQueryStringArray($query_string, array('d', 'm', 'y', 'app_highlight', 'jumpto')) . '&y=' . date('Y') . '&m=' . date('m') . '&d=' . date('j') . '">Today</a>
<a href="?' . replaceQueryStringArray($query_string, array('d', 'm', 'y', 'app_highlight', 'jumpto')) . '&y=' . $Tomorrow['y'] . '&m=' . $Tomorrow['m'] . '&d=' . $Tomorrow['d'] . '" title="Tomorrow">»</a>
</th>
</tr>
</table>
</div>
';
// caledar quick add
foreach (db_enum("appointment", "app_type", "array") as $key => $val) {
$render_type_q .= '<option value="' . $key . '"';
$render_type_q .= '>' . $val . '</option>' . "\n";
}
$render .= '
<div id="calQuickAdd">
<form name="quickAdd" action="appointment_add.php">
<table>
<tr>
<th>Create Appointment</th>
</tr>
<tr>
<td>
<select name="app_type" style="width: 110px">
' . $render_type_q . '
</select>
示例6: error_message
echo error_message($results['Errors'], urlencode($return));
exit;
}
$db_data["bug_date"] = $date_mysql;
db_query($db_data, 'UPDATE', 'bug', 'bug_id', $bug_id);
// send mail
$subject = "Update on your {$bug_type}";
$msg = "Dear {$use_name},\n\nYou submitted a {$bug_type} on {$bug_date}. This {$bug_type} has been updated by " . $_SESSION["auth"]["use_fname"] . ' ' . $_SESSION["auth"]["use_sname"] . ".\n\n------------------------------------------------------------\nYour original {$bug_type}:\n" . wordwrap($db_data["bug_blurb"], 65, "\n") . "\n------------------------------------------------------------\n" . $_SESSION["auth"]["use_fname"] . ' ' . $_SESSION["auth"]["use_sname"] . "'s response:\n" . wordwrap($db_data["bug_response"], 65, "\n") . "\n------------------------------------------------------------\n\nThe status of this {$bug_type} has now been set to " . $db_data["bug_status"];
if ($_GET["send"] == 'Yes') {
send_email($use_email, $_SESSION["auth"]["use_email"], $subject, $msg);
}
header("Location:superadmin_tools.php");
}
// submit bug
} else {
$formData1 = array('bug_type' => array('type' => 'radio', 'label' => 'Type', 'value' => $bug_type, 'options' => db_enum("bug", "bug_type", "array"), 'default' => 'Question'), 'bug_blurb' => array('type' => 'textarea', 'label' => 'Description', 'value' => $bug_blurb, 'required' => 2, 'attributes' => array('style' => 'width:400px;height:80px')), 'bug_user' => array('type' => 'hidden', 'value' => $_SESSION["auth"]["use_id"]), 'bug_page' => array('type' => 'hidden', 'value' => $_GET["bug_page"]));
if (!$_GET["action"]) {
$form = new Form();
$form->addForm("", "GET", $PHP_SELF);
$form->addHtml("<div id=\"standard_form\">\n");
$form->addField("hidden", "action", "", "save");
$formName = 'form1';
$form->addHtml("<fieldset>\n");
$form->addHtml('<div class="block-header">Assistance</div>');
$form->addHtml('<div id="' . $formName . '">');
$form->addData($formData1, $_GET);
$buttons = $form->makeField("submit", "", "", "Submit", array('class' => 'submit'));
$buttons .= $form->makeField("button", "", "", "Cancel", array('class' => 'button', 'onClick' => 'document.location.href = \'' . urldecode($_GET["bug_page"]) . '\''));
$form->addHtml($form->addDiv($buttons));
$form->addHtml("</div>\n");
$form->addHtml("</fieldset>\n");
示例7: array
if ($numRows == 1) {
$default_area = $row["are_title"];
}
}
if ($are_title) {
$default_area = $are_title;
}
if ($matched_areas) {
$formDataArea = array('pro_area' => array('type' => 'radio', 'label' => 'Area', 'value' => $default_area, 'options' => $matched_areas));
} else {
$formDataArea = array('pro_areanew' => array('type' => 'button', 'label' => 'New Area', 'value' => 'New Area', 'attributes' => array('class' => 'button', 'onClick' => 'javascript:addArea(\'' . $pc1 . '\',\'' . urlencode($_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING']) . '\')')));
}
# build data arrays for property particulars
$formData = array('dea_ptype' => array('type' => 'select_multi', 'label' => 'Property Type', 'required' => 2, 'options' => array('dd1' => $ptype['dd1'], 'dd2' => $ptype['dd2'])), 'dea_bedroom' => array('type' => 'select_number', 'label' => 'Bedrooms', 'value' => $dea_bedroom, 'attributes' => array('class' => 'narrow'), 'options' => array('blank' => 'blank')), 'dea_reception' => array('type' => 'select_number', 'label' => 'Receptions', 'value' => $dea_reception, 'attributes' => array('class' => 'narrow'), 'options' => array('blank' => 'blank')), 'dea_bathroom' => array('type' => 'select_number', 'label' => 'Bathrooms', 'value' => $dea_bathroom, 'attributes' => array('class' => 'narrow'), 'options' => array('blank' => 'blank')), 'dea_floor' => array('type' => 'select', 'label' => 'Floor', 'value' => $dea_floor, 'options' => join_arrays(array(array('blank' => ''), db_enum("deal", "dea_floor", "array"))), 'attributes' => array('class' => 'medium')), 'dea_floors' => array('type' => 'select_number', 'label' => 'Floors', 'options' => array('blank' => '', 'min' => '1'), 'value' => $dea_floors, 'attributes' => array('class' => 'narrow')));
if ($dea_type == 'Sales') {
$formData1 = array('dea_date' => array('type' => 'datetime', 'label' => 'Date Instructed', 'value' => $dea_date, 'required' => 2, 'attributes' => array('class' => 'medium')), 'dea_branch' => array('type' => 'select_branch', 'label' => 'Branch', 'value' => $_SESSION["auth"]["use_branch"], 'required' => 2, 'attributes' => array('class' => 'medium')), 'dea_neg' => array('type' => 'select_user', 'label' => 'Negotiator', 'value' => '', 'required' => 1, 'attributes' => array('class' => 'medium'), 'options' => array('' => '(unassigned)')), 'dea_marketprice' => array('type' => 'text', 'label' => 'Market Price', 'required' => 2, 'attributes' => array('class' => 'medium'), 'function' => 'numbers_only'), 'dea_commission' => array('type' => 'text', 'label' => 'Commission', 'group' => 'Commission', 'value' => $dea_commission, 'required' => 3, 'attributes' => array('style' => 'width: 55px', 'maxlength' => 9), 'function' => 'numbers_only'), 'dea_commissiontype' => array('type' => 'select', 'label' => 'Commission', 'group' => 'Commission', 'last_in_group' => 1, 'value' => $dea_commissiontype, 'required' => 3, 'options' => db_enum('deal', 'dea_commissiontype', 'array')), 'dea_tenure' => array('type' => 'select', 'label' => 'Tenure', 'value' => $dea_tenure, 'required' => 2, 'options' => db_enum("deal", "dea_tenure", "array"), 'attributes' => array('style' => 'width: 165px')), 'dea_servicecharge' => array('type' => 'text', 'label' => 'Service Charge', 'value' => $dea_servicecharge, 'attributes' => array('style' => 'width: 165px')), 'dea_groundrent' => array('type' => 'text', 'label' => 'Ground Rent', 'value' => $dea_groundrent, 'attributes' => array('style' => 'width: 165px')));
} elseif ($dea_type == 'Lettings') {
$formData1 = array('dea_date' => array('type' => 'datetime', 'label' => 'Date Instructed', 'value' => $dea_date, 'required' => 2, 'attributes' => array('class' => 'medium')), 'dea_available' => array('type' => 'datetime', 'label' => 'Date Available', 'value' => $dea_available, 'required' => 3, 'attributes' => array('class' => 'medium')), 'dea_branch' => array('type' => 'select_branch', 'label' => 'Branch', 'value' => $_SESSION["auth"]["use_branch"], 'required' => 2, 'attributes' => array('class' => 'medium')), 'dea_neg' => array('type' => 'select_user', 'label' => 'Negotiator', 'value' => '', 'required' => 1, 'attributes' => array('class' => 'medium'), 'options' => array('' => '(unassigned)')), 'dea_marketprice' => array('type' => 'text', 'label' => 'Market Price', 'required' => 2, 'attributes' => array('class' => 'medium'), 'function' => 'numbers_only'));
}
if ($dea_status == 'Valuation') {
unset($formData1["dea_neg"]);
}
if (!$_GET["action"]) {
// start new form object
$form = new Form();
$form->addForm("form", "get", $PHP_SELF);
$form->addHtml("<div id=\"standard_form\">\n");
$form->addField("hidden", "stage", "", "particulars");
$form->addField("hidden", "action", "", "update");
$form->addField("hidden", "cli_id", "", $cli_id);
$form->addField("hidden", "pro_id", "", $pro_id);
示例8: while
while ($rowFurn = $qFurn->fetchRow()) {
echo '<option value="' . $rowFurn["Furnished_ID"] . '"';
if ($Furnished == $rowFurn["Furnished_ID"]) {
echo ' selected';
}
echo '>' . $rowFurn["Furnished_Title"] . '</option>
';
}
?>
</select></td>
</tr>
<tr>
<td align="right" class="greyForm"> Term</td>
<td class="greyForm"><select name="TermLet" style="width:120px">
<?php
echo db_enum("clients", "TermLet", $TermLet);
?>
</select></td>
</tr>
<tr>
<td height="30" align="right" class="redForm">Email Updates</td>
<td class="redForm"><label for="StatusYesLet">
<input type="radio" name="StatusLet" id="StatusYesLet" value="L" <?php
if ($StatusLet == "L") {
echo "checked";
}
?>
>
Yes</label> <label for="StatusNoLet">
<input type="radio" name="StatusLet" id="StatusNoLet" value="S" <?php
if ($StatusLet == "S") {
示例9: db_enum
echo '>' . $i . '</option>';
}
?>
</select></td>
</tr>
<tr>
<td class="greyForm" align="right">Garden</td>
<td class="greyForm"><select name="garden" style="width: 190px;">
<?php
echo db_enum("property", "garden", $intGarden);
?>
</select></td>
<td align="right" class="greyForm">Parking</td>
<td colspan="3" class="greyForm"><select name="parking" style="width: 190px;">
<?php
echo db_enum("property", "parking", $intParking);
?>
</select></td>
</tr>
</table>
<?php
if ($SaleLet == 1 && $intTenure != 1) {
?>
<table align="center" width="600" border="0" cellspacing="3" cellpadding="4">
<tr>
<td colspan="2"><EM>The following details have been provided by the vendor and have not been verified.</EM></td>
</tr>
<tr>
<td><strong>Tenure:</strong> </td>
<td><em><?php
echo $strTenureTitle;
示例10: die
$orderby = 'pro_addr3';
}
if ($_GET['direction']) {
$direction = $_GET['direction'];
} else {
$direction = 'ASC';
}
$sql = "SELECT\ndeal.*,\npro_id,CONCAT(pro_addr1,' ',pro_addr2,' ',pro_addr3,' ',pro_addr4,' ',LEFT(pro_postcode, 4)) AS pro_addr,\nbra_id,bra_title\nFROM\ndeal\nLEFT JOIN property ON deal.dea_prop = property.pro_id\nLEFT JOIN branch ON deal.dea_branch = branch.bra_id\nWHERE\n(dea_status = 'Production' OR dea_status = 'Proofing' OR dea_status = 'Available' OR dea_status = 'Under Offer' OR dea_status = 'Exchanged' OR dea_status = 'Under Offer with Other')\nORDER BY {$orderby} {$direction}";
$q = $db->query($sql);
if (DB::isError($q)) {
die("db error: " . $q->getMessage() . $sql);
}
$numRows = $q->numRows();
if ($numRows !== 0) {
while ($row = $q->fetchRow()) {
$board_status = db_enum('deal', 'dea_board', 'array');
foreach ($board_status as $key => $val) {
$status_select .= '<option value="' . $key . '"';
if ($row["dea_board"] == $val) {
$status_select .= ' selected';
}
$status_select .= '>' . $val . '</option>' . "\n";
}
$status_select = '<select name="board[' . $row["dea_id"] . ']">' . $status_select . '</select>';
// onChange="document.boardForm.submit();"
$data[] = '
<tr class="trOff" onMouseOver="trOver(this)" onMouseOut="trOut(this)">
<td class="bold">' . $row["pro_addr"] . '</td>
<td width="100">' . $row["dea_status"] . '</td>
<td width="150">' . $row["bra_title"] . '</td>
<td width="80">' . $status_select . '</td>
示例11: db_enum
<tr>
<td>Any other requirements</td>
<td><textarea name="textarea" rows="3" style="width: 220px"></textarea></td>
</tr>
</table>
<br>
<table width="600" border="1" align="center" cellpadding="5" cellspacing="0">
<tr>
<th colspan="2">Lettings Property Requirements</th>
</tr>
<tr>
<td>Property Type</td>
<td><select name="PropertyTypeLet" style="width:220px">
<?php
echo db_enum("clients", "PropertyType", $PropertyTypeLet);
?>
</select>
</td>
</tr>
<tr>
<td>Price range</td>
<td><select name="MinPriceLet" style="width: 100px">
<option value="0">Minimum</option>
<?php
for ($i = 50; $i <= 1000;) {
echo '<option value="' . $i . '"';
if ($i == $MinPriceLet) {
echo ' selected';
}
echo '>' . price_format($i) . '</option>';
示例12: addTel
function addTel($_data)
{
$count = 1;
$rows = count($_data);
if ($rows) {
foreach ($_data as $key => $val) {
$_tels .= $this->makeField('text', 'tel' . $count, 'Telephone ' . $count, $val['number']);
$_tels .= $this->makeField('select', 'tel' . $count . 'type', '', $val['type'], '', db_enum("tel", "tel_type", "array")) . ' ';
// delete
if ($rows > 1) {
$_tels .= '<a href="tel.func.php?action=delete&tel_id=' . $val['id'] . '"><img src="' . GLOBAL_URL . 'img/icons/cross_sm.gif" border="0" alt="Delete this Telephone Number" /></a>';
} else {
$_tels .= '<img src="' . GLOBAL_URL . 'img/icons/cross_sm_grey.gif" border="0" alt="Delete this Telephone Number" />';
}
// move up
if ($count == 1) {
$_tels .= '<img src="' . GLOBAL_URL . 'img/icons/arrow_up_sm_grey.gif" border="0" alt="Move Up" />';
} else {
$_tels .= '<a href="tel.func.php?action=reorder&tel_id=' . $val['id'] . '&cur=' . $count . '&new=' . ($count - 1) . '"><img src="' . GLOBAL_URL . 'img/icons/arrow_up_sm.gif" border="0" alt="Move Up" /></a>';
}
// move down
if ($count == $rows) {
$_tels .= '<img src="' . GLOBAL_URL . 'img/icons/arrow_down_sm_grey.gif" border="0" alt="Move Down" />';
} else {
$_tels .= '<a href="tel.func.php?action=reorder&tel_id=' . $val['id'] . '&cur=' . $count . '&new=' . ($count + 1) . '"><img src="' . GLOBAL_URL . 'img/icons/arrow_down_sm.gif" border="0" alt="Move Down" /></a>';
}
$_output .= $this->addLabel('tel' . $count, 'Telephone ' . $count, $_tels);
$_tels = '';
$count++;
}
}
// add blank for new
$_tels .= $this->makeField('text', 'telnew', 'New', '');
$_tels .= $this->makeField('select', 'telnewtype', '', '', '', db_enum("tel", "tel_type", "array")) . ' ';
if ($rows) {
$newtel_label = 'New Telephone';
} else {
$newtel_label = 'Telephone';
}
$_output .= $this->addLabel('New', $newtel_label, $_tels);
$this->output .= $_output;
}
示例13: date
case 1:
if (!$_GET["action"]) {
/*
if (!$_GET["date_from"]) {
$_GET["date_from"] = date('d/m/Y'); //23/11/2006
}
if (!$_GET["date_to"]) {
$_GET["date_to"] = date('d/m/Y');
}
*/
if ($_GET["type"] == 'Note') {
$notetype_display = "";
} else {
$notetype_display = "none";
}
$formData1 = array('keyword' => array('type' => 'text', 'label' => 'Keyword(s)', 'value' => $_GET["keyword"], 'attributes' => array('class' => 'addr'), 'tooltip' => 'Seperate multiple keywords with commas'), 'branch' => array('type' => 'select_branch_2', 'label' => 'Branch', 'value' => $_GET["branch"], 'attributes' => array('class' => 'medium')), 'user' => array('type' => 'select_user', 'label' => 'User', 'value' => $_GET["user"], 'attributes' => array('class' => 'medium'), 'tooltip' => 'Lead user only (does not include attendees)', 'options' => array('' => 'Any')), 'type' => array('type' => 'select', 'label' => 'Appointment Type', 'group' => 'Appointment Type', 'value' => $_GET["type"], 'options' => join_arrays(array(array('' => 'Any'), db_enum("appointment", "app_type", "array"))), 'attributes' => array('class' => 'medium', 'onChange' => 'controlAppointmentType(this,\'type\');')), 'notetype' => array('type' => 'select', 'label' => 'Sub-Type', 'group' => 'Appointment Type', 'last_in_group' => 1, 'value' => $_GET["notetype"], 'options' => db_enum("appointment", "app_notetype", "array"), 'attributes' => array('style' => 'display:' . $notetype_display)), 'date_from' => array('type' => 'datetime', 'label' => 'Date (from)', 'value' => $_GET["date_from"], 'attributes' => array('class' => 'medium')), 'date_to' => array('type' => 'datetime', 'label' => 'Date (to)', 'value' => $_GET["date_to"], 'attributes' => array('class' => 'medium')), 'status' => array('type' => 'select', 'label' => 'Status', 'value' => $_GET["status"], 'options' => db_enum("appointment", "app_status", "array"), 'attributes' => array('class' => 'medium')));
$form = new Form();
$form->addForm("", "GET", $PHP_SELF);
$form->addHtml("<div id=\"standard_form\">\n");
$form->addField("hidden", "stage", "", "1");
$form->addField("hidden", "action", "", "advanced_search");
$formName = 'form1';
$form->addHtml("<fieldset>\n");
$form->addHtml('<div class="block-header">Search Calendar</div>');
$form->addHtml('<div id="' . $formName . '">');
$form->addData($formData1, $_GET);
$form->addHtml($form->addDiv($form->makeField("submit", "", "", "Search", array('class' => 'submit'))));
$form->addHtml("</div>\n");
$form->addHtml("</fieldset>\n");
if (!$_GET["viewForm"]) {
$viewForm = 1;
示例14: header
} else {
$carry_deal = $_GET["dea_id"];
}
header("Location:?stage=appointment&cli_id=" . $_GET["cli_id"] . "&dea_id=" . $carry_deal);
}
if (!$_GET["action"]) {
if (!$_GET["scope"]) {
$_GET["scope"] = $_SESSION["auth"]["default_scope"];
}
// disable term (pw/pcm) unless term == let
if ($_GET["scope"] == "Lettings") {
$term_attributes = array();
} else {
$term_attributes = array('disabled' => 'disabled');
}
$formData1 = array('scope' => array('type' => 'radio', 'label' => 'Sales or Lettings', 'value' => $_GET["scope"], 'init' => 'Sales', 'options' => array('Sales' => 'sale', 'Lettings' => 'let'), 'attributes' => array('onClick' => 'javascript:toggleField(\'term\');')), 'keyword' => array('type' => 'text', 'label' => 'Keyword(s)', 'value' => $_GET["keyword"], 'attributes' => array('class' => 'addr'), 'tooltip' => 'Seperate multiple keywords with commas'), 'status' => array('type' => 'select', 'label' => 'Status', 'value' => $_GET["status"], 'default' => 'Instructed', 'options' => join_arrays(array(array('' => 'Any'), db_enum("deal", "dea_status", "array")))), 'price_min' => array('type' => 'text', 'label' => 'Price From', 'value' => $_GET["price"], 'group' => 'Price Range', 'init' => '(minimum)', 'attributes' => array('style' => 'width:100px', 'onFocus' => 'javascript:clearField(this,\'(minimum)\')')), 'price_max' => array('type' => 'text', 'label' => 'Price To', 'value' => $_GET["price"], 'group' => 'Price Range', 'init' => '(maximum)', 'attributes' => array('style' => 'width:100px', 'onFocus' => 'javascript:clearField(this,\'(maximum)\')')), 'term' => array('type' => 'select', 'label' => 'Term', 'value' => $_GET["term"], 'group' => 'Price Range', 'last_in_group' => '1', 'attributes' => $term_attributes, 'options' => array('per week' => 'per week', 'per month' => 'per month'), 'tooltip' => 'If you enter a price range, properties without a price will not appear'), 'bed' => array('type' => 'select_number', 'label' => 'Minimum Beds'));
$form = new Form();
$form->addForm("", "GET", $PHP_SELF);
$form->addHtml("<div id=\"standard_form\">\n");
$form->addField("hidden", "stage", "", "address");
$form->addField("hidden", "action", "", "advanced_search");
$form->addField("hidden", "cli_id", "", $cli_id);
$form->addField("hidden", "app_id", "", $_GET["app_id"]);
$form->addField("hidden", "date", "", $_GET["date"]);
$formName = 'form1';
$form->addHtml("<fieldset>\n");
$form->addHtml('<div class="block-header">Property to Visit</div>');
$form->addHtml('<div id="' . $formName . '">');
$form->addData($formData1, $_GET);
$form->addHtml($form->addDiv($form->makeField("submit", "", "", "Search", array('class' => 'submit'))));
$form->addHtml("</div>\n");
示例15: db_query
exit;
}
db_query($db_data, "UPDATE", "branch", "bra_id", $bra_id);
$msg = urlencode('Update Successful');
header("Location:{$redirect}&msg={$msg}");
exit;
}
break;
###########################################################
# stage 3 - add
###########################################################
###########################################################
# stage 3 - add
###########################################################
case 3:
$form1 = array('use_salutation' => array('type' => 'select', 'group' => 'Full Name', 'label' => 'Salutation', 'value' => $use_salutation, 'required' => 2, 'options' => db_enum("user", "use_salutation", "array"), 'attributes' => array('style' => 'width:60px')), 'use_fname' => array('type' => 'text', 'group' => 'Full Name', 'label' => 'Forename', 'value' => $use_fname, 'init' => 'Forename(s)', 'required' => 2, 'attributes' => array('style' => 'width:100px', 'onFocus' => 'javascript:clearField(this,\'Forename(s)\')'), 'function' => 'format_name'), 'use_sname' => array('type' => 'text', 'group' => 'Full Name', 'last_in_group' => 1, 'label' => 'Surname', 'value' => $use_sname, 'init' => 'Surname', 'required' => 2, 'attributes' => array('style' => 'width:152px', 'onFocus' => 'javascript:clearField(this,\'Surname\')'), 'function' => 'format_name'), 'use_status' => array('type' => 'radio', 'label' => 'Status', 'value' => $use_status, 'required' => 2, 'options' => db_enum("user", "use_status", "array")), 'use_username' => array('type' => 'text', 'label' => 'Username', 'value' => $use_username, 'required' => 2, 'attributes' => array('class' => 'addr'), 'function' => 'format_username'), 'use_password' => array('type' => 'text', 'label' => 'Password', 'default' => random_string(30), 'value' => $use_password, 'required' => 2, 'attributes' => array('class' => 'addr')), 'use_email' => array('type' => 'text', 'label' => 'Email', 'value' => $use_email, 'required' => 2, 'attributes' => array('class' => 'addr')), 'use_branch' => array('type' => 'select', 'label' => 'Branch', 'value' => $use_branch, 'required' => 2, 'options' => db_lookup("use_branch", "branch", "array"), 'attributes' => array('class' => 'medium')), 'use_scope' => array('type' => 'radio', 'label' => 'Default Scope', 'value' => $use_scope, 'required' => 2, 'options' => db_enum("user", "use_scope", "array")), 'use_colour' => array('type' => 'text', 'label' => 'Colour', 'value' => $use_colour, 'group' => 'Colour', 'attributes' => array('class' => 'medium', 'style' => 'font-weight:bold; color: #' . $use_colour . '; background-color: #' . $use_colour)), 'use_colour_pick' => array('type' => 'button', 'label' => 'Colour', 'value' => 'Pick', 'group' => 'Colour', 'last_in_group' => 1, 'attributes' => array('class' => 'button', 'onClick' => 'javascript:colourPickWindow();')), 'use_mobile' => array('type' => 'text', 'label' => 'Mobile', 'value' => $use_mobile, 'attributes' => array('class' => 'medium')), 'use_hometel' => array('type' => 'text', 'label' => 'Home Tel', 'value' => $use_hometel, 'attributes' => array('class' => 'medium')));
$form2 = array('use_pcid' => array('type' => 'hidden', 'value' => $use_pcid), 'use_addr1' => array('type' => 'text', 'label' => 'House Number', 'value' => $use_addr1, 'required' => 2, 'attributes' => array('class' => 'addr'), 'function' => 'format_street'), 'use_addr2' => array('type' => 'text', 'label' => 'Building Name', 'value' => $use_addr2, 'required' => 1, 'attributes' => array('class' => 'addr'), 'function' => 'format_street'), 'use_addr3' => array('type' => 'text', 'label' => 'Street', 'value' => $use_addr3, 'required' => 2, 'attributes' => array('class' => 'addr'), 'function' => 'format_street'), 'use_addr4' => array('type' => 'text', 'label' => 'Town or Area', 'value' => $use_addr4, 'required' => 3, 'attributes' => array('class' => 'addr'), 'function' => 'format_street'), 'use_addr5' => array('type' => 'text', 'label' => 'City or County', 'value' => $use_addr5, 'required' => 2, 'attributes' => array('class' => 'addr'), 'function' => 'format_street'), 'use_postcode' => array('type' => 'text', 'label' => 'Postcode', 'value' => $use_postcode, 'required' => 2, 'attributes' => array('class' => 'pc', 'maxlength' => 9), 'function' => 'format_postcode'), 'use_country' => array('type' => 'select', 'label' => 'Country', 'value' => $use_country, 'required' => 2, 'options' => db_lookup("use_country", "country", "array"), 'attributes' => array('class' => 'addr')));
if (!$_POST["action"]) {
$form = new Form();
$form->addForm("form", "post", $PHP_SELF);
$form->addHtml("<div id=\"standard_form\">\n");
$form->addField("hidden", "action", "", 'update');
$form->addField("hidden", "stage", "", "3");
/////////////////////////////////////////////////////////////////////////////////
$formName = 'form1';
$form->addHtml("<fieldset>\n");
$form->addHtml('<div class="block-header">User</div>');
$form->addData(${$formName}, $_POST);
$form->addHtml($form->addDiv($form->makeField("submit", $formName, "", "Save Changes", array('class' => 'submit'))));
$form->addHtml("</fieldset>\n");
/////////////////////////////////////////////////////////////////////////////////