本文整理汇总了PHP中HTML_Page2类的典型用法代码示例。如果您正苦于以下问题:PHP HTML_Page2类的具体用法?PHP HTML_Page2怎么用?PHP HTML_Page2使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了HTML_Page2类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _renderForm
/**
* Outputs the form.
*
* @param object HTML_QuickForm_Page the page being processed
* @access public
* @since 2.0.0RC1
*/
function _renderForm(&$page)
{
$tab = ' ';
$p = new HTML_Page2(array('lineend' => PHP_EOL, 'tab' => $tab, 'doctype' => 'XHTML 1.0 Strict', 'language' => 'en', 'cache' => 'false'));
$p->disableXmlProlog();
$p->setTitle('PEAR::HTML_Progress2 - Generator');
$p->setMetaData('author', 'Laurent Laville');
$formTemplate = "\n<form{attributes}>" . "\n<table class=\"maintable\">" . "\n<caption>HTML_Progress2 Generator</caption>" . "\n{content}" . "\n</table>" . "\n</form>";
$headerTemplate = "\n<tr>" . "\n\t<th colspan=\"2\">" . "\n\t\t{header}" . "\n\t</th>" . "\n</tr>";
$elementTemplate = "\n<tr valign=\"top\">" . "\n\t<td class=\"qfLabel\"> " . "<!-- BEGIN required --><span class=\"required\">*</span><!-- END required -->" . "{label}</td>" . "\n\t<td class=\"qfElement\">" . "\n{element}" . "<!-- BEGIN label_2 --> " . "<span class=\"qfLabel2\">{label_2}</span>" . "<!-- END label_2 -->" . "\n\t</td>" . "\n</tr>";
$groupTemplate = "\n\t\t<table class=\"group\">" . "\n\t\t<tr>" . "\n\t\t\t{content}" . "\n\t\t</tr>" . "\n\t\t</table>";
$groupElementTemplate = "<td>{element}" . "<!-- BEGIN label --><br/>" . "<span class=\"qfLabel\">{label}</span>" . "<!-- END label -->" . "</td>";
$renderer =& $page->defaultRenderer();
$renderer->setFormTemplate($formTemplate);
$renderer->setHeaderTemplate($headerTemplate);
$renderer->setElementTemplate($elementTemplate);
$renderer->setGroupTemplate($groupTemplate, 'name');
$renderer->setGroupElementTemplate($groupElementTemplate, 'name');
$styles = $this->getStyleSheet();
$js = '';
// on preview tab, add progress bar javascript and stylesheet
if ($page->getAttribute('id') == 'Preview') {
$pb = $page->controller->createProgressBar();
$pb->setTab($tab);
$styles .= $pb->getStyle();
$js = $pb->getScript();
$p->addStyleDeclaration($styles);
$p->addScriptDeclaration($js);
$pbElement =& $page->getElement('progressBar');
$pbElement->setText($pb->toHtml() . '<br /><br />');
} else {
$p->addStyleDeclaration($styles);
}
$page->accept($renderer);
$p->addBodyContent($renderer->toHtml());
$p->display();
}
示例2: array
$form->addHtml("</fieldset>\n");
}
/////////////////////////////////////////////////////////////////////////////////
$formName = 'form8';
$form->addHtml("<fieldset>\n");
$form->addHtml('<div class="block-header">Other Info</div>');
$form->addHtml('<div id="' . $formName . '">');
$form->addHtml($form->addHtml($summary_table));
$form->addData(${$formName}, $_POST);
$form->addHtml($form->addDiv($form->makeField("submit", $formName, "", "Save Changes", array('class' => 'submit'))));
$form->addHtml('</div>');
$form->addHtml("</fieldset>\n");
$form->addHtml("</div>\n");
$onLoad .= 'showForm(' . $viewForm . ');self.focus;' . $source['onload'] . ';';
// start a new page
$page = new HTML_Page2($page_defaults);
$additional_js = '
if (!previousID) {
var previousID = "form' . $viewForm . '";
}
function addFeature() {
var status = document.testForm.status.options[document.testForm.status.options.selectedIndex].value;
var featureId = document.testForm.featureId.options[document.testForm.featureId.options.selectedIndex].value;
document.location.href = \'?do=feature_add&cli_id=' . $cli_id . '&status=\'+status+\'&featureId=\'+featureId+\'&return=' . urlencode($_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING']) . '&viewForm=7\';
}
示例3: elseif
$stage = $_GET["stage"];
}
if (!$_GET["dea_id"]) {
echo "error, no dea_id";
} else {
$dea_id = $_GET["dea_id"];
}
if ($_POST["viewForm"]) {
$viewForm = $_POST["viewForm"];
} elseif ($_GET["viewForm"]) {
$viewForm = $_GET["viewForm"];
} else {
$viewForm = "1";
}
// start a new page
$page = new HTML_Page2($page_defaults);
$tenants = array();
// improvement 06/10/06 - link table for multiple vendors on a single deal
$sql = "SELECT\n\tdeal.*,\n\tproperty.*,\n\tCONCAT(pro_addr1,' ',pro_addr2,' ',pro_addr3,' ',pro_addr4,' ',pro_postcode) AS pro_addr,\n\tclient.cli_id,\n\tCONCAT(client.cli_salutation,' ',client.cli_fname,' ',client.cli_sname) AS cli_name,\n\n\ttenant.cli_id AS ten_id,\n\tCONCAT(tenant.cli_salutation,' ',tenant.cli_fname,' ',tenant.cli_sname) AS ten_name,\n\n\tCONCAT(use_fname,' ',use_sname) AS use_name,\n\tcli2dea.*,\n\tbranch.bra_id,branch.bra_title,\n\tT.pty_title AS ptype,\n\tST.pty_title AS psubtype,\n\tkeybook.*,\n\n\tfea_title\n\nFROM\n\tdeal\nLEFT JOIN cli2dea ON cli2dea.c2d_dea = deal.dea_id AND cli2dea.c2d_capacity = 'Owner'\nLEFT JOIN client ON cli2dea.c2d_cli = client.cli_id\nLEFT JOIN tel AS client_tel ON client_tel.tel_cli = client.cli_id AND client_tel.tel_ord = 1\n\nLEFT JOIN cli2dea AS ten2dea ON ten2dea.c2d_dea = deal.dea_id AND ten2dea.c2d_capacity = 'Tenant'\nLEFT JOIN client AS tenant ON ten2dea.c2d_cli = tenant.cli_id\nLEFT JOIN tel AS tenant_tel ON tenant_tel.tel_cli = tenant.cli_id AND tenant_tel.tel_ord = 1\n\nLEFT JOIN property ON deal.dea_prop = property.pro_id\n\nLEFT JOIN branch ON deal.dea_branch = branch.bra_id\nLEFT JOIN user ON deal.dea_neg = user.use_id\n\nLEFT JOIN ptype AS T ON deal.dea_ptype = T.pty_id\nLEFT JOIN ptype AS ST ON deal.dea_psubtype = ST.pty_id\n\nLEFT JOIN keybook ON deal.dea_id = keybook.key_deal\n\nLEFT JOIN fea2dea ON deal.dea_id = fea2dea.f2d_dea\nLEFT JOIN feature ON fea2dea.f2d_fea = feature.fea_id AND fea_type = 'Lettings'\n\nWHERE\ndeal.dea_id = {$dea_id}\n";
$q = $db->query($sql);
if (DB::isError($q)) {
die("db error: " . $q->getMessage());
}
$numRows = $q->numRows();
if ($numRows == 0) {
echo "select error";
exit;
} else {
while ($row = $q->fetchRow()) {
if (trim($row["cli_name"])) {
$vendors[$row["cli_id"]] = trim($row["cli_name"]);
示例4: header
}
// already have cliennt id, skip to offer page
if ($_GET["cli_id"]) {
header("Location:offer_submit.php?dea_id={$dea_id}&cli_id=" . $_GET["cli_id"]);
}
$destination = "offer";
$goto = "offer_submit.php";
$page_title = "Submit Offer";
$form_title = "Submit Offer";
$carry = urlencode($_GET["return"]);
}
if (!$cli_name_label) {
$cli_name_label = 'Client Name';
}
# start a new page
$page = new HTML_Page2($page_defaults);
switch ($stage) {
###########################################################
# stage 1 - basic client search
###########################################################
case 1:
$formData1 = array('cli_name' => array('type' => 'text', 'label' => $cli_name_label, 'value' => $_GET["cli_name"], 'attributes' => array('class' => 'addr')), 'cli_email' => array('type' => 'text', 'label' => 'Email', 'value' => $_GET["cli_email"], 'attributes' => array('class' => 'addr')));
$form = new Form();
$form->addForm("", "get", $PHP_SELF);
$form->addHtml("<div id=\"standard_form\">\n");
$form->addField("hidden", "stage", "", "2");
$form->addField("hidden", "dest", "", $destination);
$form->addField("hidden", "dea_id", "", $_GET["dea_id"]);
$form->addField("hidden", "app_id", "", $_GET["app_id"]);
$form->addField("hidden", "carry", "", $carry);
$form->addHtml("<fieldset>\n");
示例5: array
$form->addLegend('Edit Entry');
$form->addData($formData1, $_POST);
$form->addHtml("</fieldset>\n");
/////////////////////////////////////////////////////////////////////////////////
$form->addHtml("<fieldset>\n");
$form->addLegend('Address');
if (!$pro_pcid) {
$form->ajaxPostcode("by_freetext", "pro");
} else {
$form->addData($formData2, $_POST);
$form->addHtml($form->addDiv($form->makeField("submit", "", "", "Save Changes", array('class' => 'submit'))));
}
$form->addHtml("</fieldset>\n");
$form->addHtml("</div>\n");
// start a new page
$page = new HTML_Page2($page_defaults);
$page->setTitle("Directory > Edit");
$page->addStyleSheet(GLOBAL_URL . 'css/styles.css');
$page->addScript(GLOBAL_URL . 'js/global.js');
$page->addScript(GLOBAL_URL . 'js/scriptaculous/prototype.js');
$page->addScriptDeclaration($source['js']);
$page->setBodyAttributes(array('onLoad' => $source['onload']));
$page->addBodyContent('<div id="content">');
$page->addBodyContent($menu);
$page->addBodyContent('<p><a href="image.php?dir_id=' . $dir_id . '">Images</a></p>');
$page->addBodyContent($form->renderForm());
$page->addBodyContent('</div>');
$page->display();
exit;
} else {
// if the form has been submitted
示例6: elseif
$stage = $_GET["stage"];
} elseif ($_POST["stage"]) {
$stage = $_POST["stage"];
} else {
// default to valuation_address
$stage = "valuation_address";
}
// this page cannot be used without a cli_id
if (!$_GET["cli_id"]) {
header("Location:client_lookup.php?dest=instruction");
exit;
} else {
$cli_id = $_GET["cli_id"];
}
// start a new page
$page = new HTML_Page2($page_defaults);
switch ($stage) {
/////////////////////////////////////////////////////////////////////////////
// valuation_address
// search deal+property and display any linked properties
// else, enter property to be valued details
/////////////////////////////////////////////////////////////////////////////
case "valuation_address":
if ($_GET["dea_id"]) {
$sql = "SELECT dea_prop FROM deal WHERE dea_id = " . $_GET["dea_id"];
$q = $db->query($sql);
if (DB::isError($q)) {
die("db error: " . $q->getMessage() . $sql);
}
$numRows = $q->numRows();
while ($row = $q->fetchRow()) {
示例7: hideMsg
$msg = '
<script type="text/javascript" language="javascript">
<!--
function hideMsg(){
setTimeout("hideMsgDiv()",1500);
}
function hideMsgDiv() {
new Effect.Fade("floating_message");
}
-->
</script><div id="notify"><div id="floating_message">' . urldecode($_GET["msg"]) . '</div></div>';
}
$navbar_array = array('back' => array('title' => 'Back', 'label' => 'Back', 'link' => $_GET["searchLink"]), 'search' => array('title' => 'Appointment Search', 'label' => 'Appointment Search', 'link' => 'appointment_search.php'));
$navbar = navbar2($navbar_array);
//replaceQueryStringArray($_GET["searchLink"],array('app_id'))
$page = new HTML_Page2($page_defaults);
$page->setTitle("Appointment");
$page->addStyleSheet(getDefaultCss());
$page->addScript('js/global.js');
$page->addScript('js/scriptaculous/prototype.js');
$page->addScript('js/scriptaculous/scriptaculous.js');
$page->setBodyAttributes(array('onLoad' => $onLoad));
$page->addBodyContent($header_and_menu);
$page->addBodyContent('<div id="content">');
$page->addBodyContent($navbar);
$page->addBodyContent($form->renderForm());
$page->addBodyContent('</div>');
if ($msg) {
$page->addBodyContent($msg);
}
$page->display();
示例8: unset
// set current appointment's column value, this is used in subsequent apps to determine positioning
$divs[$div_id]["column"] = $column;
if ($column > $max_column) {
$max_column = $column;
}
// write the div
$render .= ' <div id="app' . $div["id"] . '" class="calEntryDiv" style="position: absolute; height: ' . $div["app_height"] . 'px; left: ' . $left . 'px; top:' . $div["start_pixel"] . 'px; width:' . ($width - 3) . 'px; border: 1px solid #' . $div["colour"] . '; border-left: 10px solid #' . $div["colour"] . '; z-index:1; overflow: hidden; " onClick="javascript:document.location.href=\'appointment_edit.php?app_id=' . $div["id"] . '\'" onMouseOver="calEventOver(this,' . $div["app_height"] . ')" onMouseOut="calEventOut(this,' . $div["app_height"] . ')">' . "\n";
$render .= ' <strong>' . $div["type"] . '</strong> ' . $div["start"] . '<br>' . $div["client"] . '<!--<br><br>' . $div["addr"] . "-->\n" . ' </div>' . "\n";
}
// the current appointment ends in this interval
if ($div["end_stamp"] >= $interval && $div["end_stamp"] < $interval + $default_calendar_interval) {
// remove column reference from master array
unset($divs[$div_id]["column"]);
}
}
}
unset($left, $column);
$counter++;
}
$js = "\n\nvar theDiv = null;\nvar theHeight = null;\n\nfunction calEventOver(lnk,newHeight) {\n\ttheDiv = lnk;\n\ttheHeight = newHeight;\n\twindow.setTimeout(\"calEventOver2()\", 1000);\n\t}\nfunction calEventOver2() {\n\ttheDiv.style.overflow = 'visible';\n\ttheDiv.style.zIndex = '1000';\n\ttheDiv.style.height = theHeight;\n\t}\n\n\n\t";
$page = new HTML_Page2($page_defaults);
$page->setTitle('Calendar');
$page->addStyleSheet(getDefaultCss());
$page->addStyleSheet(GLOBAL_URL . 'css/balloons.css');
$page->addScript(GLOBAL_URL . 'js/global.js');
$page->setBodyAttributes(array('style' => 'background-color: #' . $calendar_bg_colour . '; background-image: url(\'/images/sys/admin/calendar_bg.gif\');background-repeat: repeat'));
$page->addBodyContent('<div id="content_wide">');
$page->addBodyContent('<div style="height:' . ($default_workingday_end - $default_workingday_start + 1) * (60 * $zoom) . 'px; width:50px; position: absolute;">' . "\n" . $hourBar . '</div>' . "\n");
$page->addBodyContent('<div style="height:' . ($default_workingday_end - $default_workingday_start + 1) * (60 * $zoom) . 'px;">' . "\n" . $render . '</div>' . "\n");
$page->addBodyContent('</div>');
$page->display();
示例9: trim
$id = $_GET["id"];
$title = trim(ucwords($_GET["title"]));
$sql = "UPDATE category SET cat_title = '{$title}' WHERE cat_id = {$id}";
$result = mysql_query($sql);
header("Location:tree.php");
} elseif ($_GET["action"] == "move") {
$id = $_GET["id"];
$new_id = $_GET["new_id"];
$tree->moveAll($id, $new_id);
header("Location:tree.php");
} elseif ($_GET["action"] == "delete") {
// delete a node
// do not allow top levels to be deleted
if (!$_GET["node_id"]) {
echo "error";
exit;
}
$tree->delete($_GET["node_id"]);
header("Location:tree.php");
}
// start a new page
$page = new HTML_Page2($page_defaults);
$page->setTitle("Edit Directory Node");
$page->addStyleSheet(GLOBAL_URL . 'css/styles.css');
$page->addScript(GLOBAL_URL . 'js/global.js');
$page->addBodyContent('<div id="content">');
$page->addBodyContent($menu);
$page->addBodyContent($form->renderForm());
$page->addBodyContent($form2->renderForm());
$page->addBodyContent('</div>');
$page->display();
示例10: Weeks
<td><a href="http://www.xteleurope.com" target="_blank">Xtel Europe</a> - 01342 335000</td>
<td>Xtel now handle all billing and technical issues instead of BT </td>
</tr>
<tr valign="top" bgcolor="#CCCCCC">
<td colspan="3"><strong>Mobile Phones</strong></td>
</tr>
<tr valign="top">
<td>o2</td>
<td>Mike Rogerson - 01928 702 308<br> <a href="mailto:mike.rogerson@o2.com">mike.rogerson@o2.com</a>
</td>
<td>Lost or stolen phones must be cancelled. </td>
</tr>
<tr valign="top">
<td>T-Mobile</td>
<td>Jonathon Weeks (3b Direct)<br>
0151 335 3600 </td>
<td>Lost or stolen phones must be cancelled. </td>
</tr>
</table>';
$navbar_array = array('back' => array('title' => 'Back', 'label' => 'Back', 'link' => $_GET["searchLink"]), 'search' => array('title' => 'Property Search', 'label' => 'Property Search', 'link' => '../property_search.php'));
$navbar = navbar2($navbar_array);
$page = new HTML_Page2($page_defaults);
$page->setTitle("Technical Support Contacts");
$page->addStyleSheet('../css/styles.css');
$page->addScript('../js/global.js');
$page->addBodyContent($header_and_menu);
$page->addBodyContent('<div id="content_wide">');
$page->addBodyContent($navbar);
$page->addBodyContent($render);
$page->addBodyContent('</div>');
$page->display();
示例11: HTML_Page2
#content table, #content tr, #content td {
margin:0; padding:0;
}
#content td {
margin:0; padding:5px;
border-bottom:1px solid black;
}
#content h1 {
margin:10px 0 5px 0;
font-size:20px;
color:#666666;
}
#content h2 {
margin:20px 0 5px 0;
font-size:16px;
color:#999999;
}
#content hr {
margin:20px 0 20px 0;
}
';
$page = new HTML_Page2($page_defaults);
$page->setTitle("Stats");
$page->addStyleSheet(getDefaultCss());
$page->addStyleDeclaration($css);
$page->addScript('js/global.js');
$page->addBodyContent($header_and_menu);
$page->addBodyContent('<div id="content">');
$page->addBodyContent($render);
$page->addBodyContent('</div>');
$page->display();
示例12: HTML_Page2
$jumpRight = '0';
} else {
$jumpRight = $jumpRight - $width;
}
// scroll to active appointment (or current hour) minus 120 to show previous hour
$onLoad .= '
window.print();
';
//window.focus();
$js_footer = '<script type="text/javascript">
// <!--
window.onLoad = ' . $onLoad . '
// -->
</script>';
$page = new HTML_Page2($page_defaults);
$page->setTitle('Calendar');
$page->addStyleSheet(GLOBAL_URL . 'css/styles_print.css');
$page->addScript(GLOBAL_URL . 'js/global.js');
$page->addScript(GLOBAL_URL . 'js/overlib/overlibmws.js');
//$page->setBodyAttributes(array('style'=>'background-color: #'.$calendar_bg_colour.'; background-image: url(\'/images/sys/admin/calendar_bg.gif\');background-repeat: repeat')); //'onLoad'=>$onLoad,
$page->addBodyContent('<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000"></div>');
#$page->addBodyContent('<div id="loading" style="width:100%; text-align:center; padding-top:200px"><h1><img src="/images/sys/admin/ajax-loader.gif" /> Loading</h1></div>');
$page->addBodyContent('<div id="calendar">');
//style="display: none;"
$page->addBodyContent('<div style="height:' . ($default_workingday_end - $default_workingday_start + 1) * (60 * $zoom) . 'px; width:50px; position: absolute">' . "\n" . $hourBar . '</div>' . "\n");
$page->addBodyContent('<div style="height:' . ($default_workingday_end - $default_workingday_start + 1) * (60 * $zoom) . 'px;">' . "\n" . $render . '</div>' . "\n");
$page->addBodyContent('</div>');
$page->addBodyContent($js_footer);
$page->display();
示例13: die
<?php
require_once "inx/global.inc.php";
// printer friendly deal details
if (!$_GET["dea_id"]) {
die("no dea_id");
}
if ($_GET["dea_id"]) {
$stage = $_GET["dea_id"];
} else {
$stage = $_POST["dea_id"];
}
// start a new page
$page = new HTML_Page2($page_defaults);
$sql = "SELECT\n\tdeal.*,DATE_FORMAT(deal.dea_available,'%D %M %Y') as date_available_formatted,\n\tmedia.*,\n\tarea.are_title,\n\tpro_addr3,LEFT(pro_postcode, 4) AS pro_postcode,\n\tpro_east,pro_north,pro_latitude,pro_longitude,\n\tCONCAT(use_fname,' ',use_sname) AS use_name,\n\tbranch.bra_id,branch.bra_title,\n\tT.pty_title AS ptype,\n\tST.pty_title AS psubtype,\n\tGROUP_CONCAT(DISTINCT CONCAT(feature.fea_title) ORDER BY feature.fea_id ASC SEPARATOR '~') AS features\nFROM\n\tdeal\n\nLEFT JOIN property ON deal.dea_prop = property.pro_id\nLEFT JOIN area ON property.pro_area = area.are_id\nLEFT JOIN branch ON deal.dea_branch = branch.bra_id\nLEFT JOIN user ON deal.dea_neg = user.use_id\n\nLEFT JOIN ptype AS T ON deal.dea_ptype = T.pty_id\nLEFT JOIN ptype AS ST ON deal.dea_psubtype = ST.pty_id\n\nLEFT JOIN media ON deal.dea_id = media.med_row AND media.med_table = 'deal'\n\nLEFT JOIN link_instruction_to_feature ON dealId = deal.dea_id\nLEFT JOIN feature ON featureId = feature.fea_id\n\nWHERE\ndeal.dea_id = {$stage}\nGROUP BY med_id\nORDER BY media.med_order\n";
//echo $sql;
$q = $db->query($sql);
if (DB::isError($q)) {
die("db error: " . $q->getMessage());
}
$numRows = $q->numRows();
if ($numRows == 0) {
echo "select error<br>{$sql}";
exit;
} else {
while ($row = $q->fetchRow()) {
/**
* @var $dea_id
* @var $pro_addr3
* @var $dea_strapline
* @var $dea_description
示例14: Form
$form = new Form();
$form->addForm("app_form", "GET", $PHP_SELF);
$form->addHtml("<div id=\"standard_form\">\n");
$form->addField("hidden", "action", "", "update");
$form->addField("hidden", "app_id", "", $app_id);
$form->addField("hidden", "app_type", "", $app_type);
$form->addField("hidden", "searchLink", "", urlencode($searchLink));
$form->addHtml("<fieldset>\n");
$form->addHtml('<div class="block-header">Add ' . $app_type . '</div>');
$form->addData($formData1, $_GET);
$form->addHtml($form->addDiv($form->makeField("submit", $formName, "", "Save Changes", array('class' => 'submit'))));
$form->addHtml('</div>');
$navbar_array = array('search' => array('title' => 'Appointment Search', 'label' => 'Appointment Search', 'link' => 'appointment_search.php'));
$navbar = navbar2($navbar_array);
//replaceQueryStringArray($_GET["searchLink"],array('app_id'))
$page = new HTML_Page2($page_defaults);
$page->setTitle("Appointment");
$page->addStyleSheet(getDefaultCss());
$page->addScript('js/global.js');
$page->addScript('js/scriptaculous/prototype.js');
$page->addScript('js/scriptaculous/scriptaculous.js');
$page->addScript('js/CalendarPopup.js');
$page->addScriptDeclaration('document.write(getCalendarStyles());var popcalapp_date = new CalendarPopup("popCalDivapp_date");popcalapp_date.showYearNavigation(); ');
$page->addBodyContent($header_and_menu);
$page->addBodyContent('<div id="content">');
$page->addBodyContent($navbar);
$page->addBodyContent($form->renderForm());
$page->addBodyContent('</div>');
$page->display();
exit;
} else {
示例15: HTML_Page2
<?php
require_once "inx/global.inc.php";
// list users
$page = new HTML_Page2($page_defaults);
if ($_GET["stage"]) {
$stage = $_GET["stage"];
} elseif ($_POST["stage"]) {
$stage = $_POST["stage"];
} else {
$stage = 1;
}
switch ($stage) {
###########################################################
# stage 1 - list
###########################################################
case 1:
if ($_GET["orderby"]) {
$orderby = $_GET["orderby"];
$return["orderby"] = $orderby;
} else {
$orderby = 'use_name';
}
if ($_GET['direction']) {
$direction = $_GET['direction'];
} else {
$direction = 'ASC';
}
$searchLink = $_SERVER['PHP_SELF'] . urlencode('?' . $_SERVER['QUERY_STRING']);
$sql = "SELECT\nCONCAT(use_fname,' ',use_sname) AS use_name,\nuser.*,\nbranch.bra_title\nFROM\nuser\nLEFT JOIN branch ON user.use_branch = branch.bra_id\nWHERE\nuse_status = 'Active'\n\nORDER BY {$orderby} {$direction}";
$q = $db->query($sql);