예제 #1
0
 /**
  * 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\">&nbsp;" . "<!-- BEGIN required --><span class=\"required\">*</span><!-- END required -->" . "{label}</td>" . "\n\t<td class=\"qfElement\">" . "\n{element}" . "<!-- BEGIN label_2 -->&nbsp;" . "<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
0
 function toHTML()
 {
     $HTML = '';
     if ($this->_ShowLogo) {
         $HTML .= freshports_Logo();
     }
     if ($this->_ShowAnnouncements) {
         $Announcement = new Announcement($this->{$_db});
         $NumRows = $Announcement->FetchAllActive();
         if ($NumRows > 0) {
             $HTML .= DisplayAnnouncements($Announcement);
         }
     }
     $HTML .= freshports_MainTable() . "\n<tr><td width='100%' valign='top'>\n" . freshports_MainContentTable() . "\n<tr>\n" . freshports_PageBannerText($this->_title);
     $this->prependBodyContent($HTML);
     $this->addBodyContent("\n</table><td valign=\"top\">" . freshports_SideBar() . "</td></tr></table>\n" . freshports_ShowFooter());
     return parent::toHTML();
 }
예제 #3
0
        $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\';
	}



예제 #4
0
    $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"]);
    }
    // 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");
예제 #6
0
     $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
예제 #7
0
    $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()) {
        $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();
예제 #9
0
                // 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();
예제 #10
0
    $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();
예제 #11
0
    <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();
예제 #12
0
#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();
예제 #13
0
    $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();
예제 #14
0
<?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
    $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 {
예제 #16
0
<?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);
			<td>' . preg_replace("/\\([a-z0-9\\ ]+\\)/", "", $row["pro_addr"]) . '</td>
			<td class="nowrap">' . $row["use_name"] . '</td>
			<td><a href="appointment_edit.php?app_id=' . $row["app_id"] . '&searchLink=' . $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING'] . '"><img src="/images/sys/admin/icons/edit-icon.png" width="16" height="16" border="0" alt="View Appointment" /></a></td>
			<td><a href="/admin4/appointment/feedback/id/id=' . $row["d2a_id"] . '"><img src="/images/sys/admin/icons/comment_add.gif" width="16" height="16" border="0" alt="Leave Feedback" /></a></td>
			</tr>
			';
            $countLettings++;
        }
    }
    $feedback = '
	<h1>Missing Feedback Sales (' . $countSales . ')</h1>
	<table border="0" cellpadding="5" cellspacing="0">
	' . $feedback . '</table>';
    $feedback2 = '
	<h1>Missing Feedback Lettings (' . $countLettings . ')</h1>
	<table border="0" cellpadding="5" cellspacing="0">
	' . $feedback2 . '</table>';
}
$page = new HTML_Page2($page_defaults);
$page->setTitle("Leave Feedback");
$page->addStyleSheet(getDefaultCss());
$page->addScriptDeclaration($js);
$page->addScript('js/global.js');
$page->addBodyContent($header_and_menu);
$page->addBodyContent('<div id="home"><table width="100%" cellpadding="10"><tr valign="top"><td width="50%">');
$page->addBodyContent($feedback);
$page->addBodyContent('</td><td width="50%">');
$page->addBodyContent($feedback2);
$page->addBodyContent('</td></tr></table>');
$page->addBodyContent('</div>');
$page->display();
예제 #18
0
// The initializing code can also be in in the form of an HTML
// attr="value" string.
// Possible attributes are:
//      - cache ("true" or "false")
//      - charset (e.g., "utf-8")
//      - doctype (e.g., "XHTML Basic 1.0")
//      - language (two letter designator: e.g., "en")
//      - lineend ("unix", "win", "mac", custom string)
//      - mime (e.g., "application/xhtml+xml")
//      - namespace (URI)
//      - profile (URI)
//      - tab (e.g., "    ")
//      - disableProlog (bool)
// All the above have defaults, so it is not necessary
// to specify everything. For example, the proper namespace
// is chosen by default.
$page = new HTML_Page2(['lineend' => 'unix', 'doctype' => 'XHTML 1.0 Strict', 'language' => 'en', 'cache' => 'false', 'tab' => '  ']);
// Page title defaults to "New $doctypeString Compliant Page"
$page->setTitle("HTML_Page2 Color Chart example");
$page->setMetaData("author", "Klaus Guenther");
// let's add a Content-Type meta tag
$page->setMetaContentType();
// Objects with toHtml and toString are supported.
$page->addBodyContent($table);
$page->addBodyContent('<p>Copyright 2003 The PHP Group</p>');
// oops, forgot to add the header:
$page->addBodyContent("<h1>Color Chart</h1>", HTML_PAGE2_PREPEND);
// output to browser
$page->display();
// or to a file
//$page->toFile('example.html');
예제 #19
0
        if (!$numRows) {
            $_GET["stage"] = 'client_address';
        }
        unset($sql, $q, $numRows);
    }
}
if ($_GET["stage"]) {
    $stage = $_GET["stage"];
} elseif ($_POST["stage"]) {
    $stage = $_POST["stage"];
} else {
    // default to viewing_address, we no longer need to stages before this as it is all done by client_lookup.php
    $stage = "viewing_address";
}
// start a new page
$page = new HTML_Page2($page_defaults);
switch ($stage) {
    /////////////////////////////////////////////////////////////////////////////
    // client_address
    // only appears if selected client has no address
    /////////////////////////////////////////////////////////////////////////////
    case "client_address":
        // see if we have client's old address on file and display
        $sql = "SELECT cli_oldaddr FROM client WHERE cli_id = {$cli_id}";
        $cli_oldaddr = $db->getOne($sql);
        // we will only have a pro_pro_id in the GET when returning from error message
        // so build a form that is read-only populated with the data, and give button to change, which shows ajax screen again
        if ($_GET["pro_pro_id"]) {
            $sqlP = "SELECT * FROM property WHERE pro_id = " . $_GET["pro_pro_id"] . " LIMIT 1";
            $qP = $db->query($sqlP);
            if (DB::isError($qP)) {
예제 #20
0
    $stage = "valuation_address";
}
// this page cannot be used without a cli_id
if (!$_GET["cli_id"]) {
    header("Location:client_lookup.php?dest=import");
    exit;
} else {
    $cli_id = $_GET["cli_id"];
}
if ($_SESSION["auth"]["default_scope"] == 'Lettings') {
    $owner = 'Landlord';
} else {
    $owner = 'Vendor';
}
// 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()) {
예제 #21
0
	if (now - lastEvent > threshold){
		window.location.reload(true);
		}
	}
document.body.onmousemove=function(){
	lastEvent = (new Date()).getTime();
	};
window.setInterval(doReload, ' . $calendar_reload_delay . ');

window.onLoad = ' . $onLoad . '



// -->
</script>';
$page = new HTML_Page2($page_defaults);
$page->setTitle('Calendar');
$page->addStyleSheet(getDefaultCss());
$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();
<?php

require_once "inx/global.inc.php";
if (!$_GET["stage"]) {
    $stage = 1;
} else {
    $stage = $_GET["stage"];
}
// start a new page
$page = new HTML_Page2($page_defaults);
switch ($stage) {
    ###########################################################
    # stage 1 - applicant details
    ###########################################################
    case 1:
        // must have cli_id, obtained from client_lookup.php
        if (!$_GET["cli_id"]) {
            header("Location:client_lookup.php");
            exit;
        }
        // default scope
        if (!$_GET["cli_sales"] && $_SESSION["auth"]["default_scope"] == 'Sales') {
            $_GET["cli_sales"] = 'Yes';
        }
        if (!$_GET["cli_lettings"] && $_SESSION["auth"]["default_scope"] == 'Lettings') {
            $_GET["cli_lettings"] = 'Yes';
        }
        foreach ($_GET as $key => $val) {
            ${$key} = trim($val);
        }
        // returns an array for the multi-dropdown source fields
예제 #23
0
    $form->addHtml('<div class="block-header">Address</div>');
    $form->addHtml('<div id="' . $formName . '">');
    // show old address from import
    if ($con_oldaddr && !$render_addresses) {
        $form->addHtml($form->addRow('textarea', 'con_oldaddr', 'Old Address', $con_oldaddr, array('style' => 'width:400px', 'readonly' => 'readonly'), '', 'Please re-enter this address into the form below'));
    }
    // add address table
    $form->addHtml($render_addresses);
    // add new address
    $form->addRow('radio', 'p2c_type', 'Type', 'Home', '', db_enum("pro2con", "p2c_type", "array"));
    $form->ajaxPostcode("by_freetext", "pro");
    $form->addHtml("</div>\n");
    $form->addHtml("</fieldset>\n");
    $onLoad .= 'showForm(' . $viewForm . ');self.focus; ';
    // start a new page
    $page = new HTML_Page2($page_defaults);
    $additional_js = '
if (!previousID) {
	var previousID = "form' . $viewForm . '";
	}

';
    if ($_GET["msg"]) {
        $onLoad .= 'javascript:hideMsg();';
        $msg = '
	<script type="text/javascript" language="javascript">
	<!--
	function hideMsg(){
		setTimeout("hideMsgDiv()",1500);
		}
	function hideMsgDiv() {
</div>
';
    $results = '
<table>
  <tr>
    ' . columnHeader(array(array('title' => 'Name', 'column' => 'cli_name', 'colspan' => '2'), array('title' => 'Email', 'column' => 'cli_email'), array('title' => 'Address', 'column' => 'cli_addr'), array('title' => 'Telephone', 'column' => 'tel_number'), array('title' => 'First Reg\'d', 'column' => 'cli_created'), array('title' => 'Last Updated', 'column' => 'cli_timestamp'), array('title' => '&nbsp;')), $_SERVER["QUERY_STRING"]) . '
  </tr>';
    foreach ($data as $output) {
        $results .= $output;
    }
    $results .= '</table>
';
} else {
    $results = '&nbsp;&nbsp;No pending clients found';
}
$page = new HTML_Page2($page_defaults);
$form = new Form();
$form->addHtml("<div id=\"standard_form\">\n");
$form->addForm("", "get", "client_contact.php");
$form->addHtml("<fieldset>\n");
$form->addHtml('<div class="block-header">Pending Lettings</div>');
$form->addHtml('<div id="results_table">');
$form->addHtml($header);
$form->addHtml($results);
$form->addHtml($footer);
$form->addHtml('</div>');
$form->addHtml("</fieldset>\n");
$navbar_array = array('back' => array('title' => 'Back', 'label' => 'Back', 'link' => $returnLink), 'search' => array('title' => 'Client Search', 'label' => 'Client Search', 'link' => 'client_search.php'));
$navbar = navbar2($navbar_array);
$page->setTitle("Client > New Pending Clients");
$page->addStyleSheet(getDefaultCss());
예제 #25
0
    function _renderForm(&$page)
    {
        $pageName = $page->getAttribute('name');
        $tabPreview = array_slice($page->controller->_tabs, -2, 1);
        $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');
        $styles = '
body {
  background-color: #7B7B88;
  font-family: Verdana, Arial, helvetica;
  font-size: 10pt;
}

h1 {
  color: #FFC;
  text-align: center;
}

.maintable {
  width: 100%;
  border-width: 0;
  border-style: thin dashed;
  border-color: #D0D0D0;
  background-color: #EEE;
  cellspacing: 2;
  cellspadding: 3;
}

th {
  text-align: center;
  color: #FFC;
  background-color: #AAA;
  white-space: nowrap;
}

input {
  font-family: Verdana, Arial, helvetica;
}

input.flat {
  border-style: solid;
  border-width: 2px 2px 0 2px;
  border-color: #996;
}
';
        // on preview tab, add progress bar javascript and stylesheet
        if ($pageName == $tabPreview[0][0]) {
            $pb = $page->controller->createProgressBar();
            $pb->setTab($tab);
            $p->addStyleDeclaration($styles . $pb->getStyle());
            $p->addScriptDeclaration($pb->getScript());
            $pbElement =& $page->getElement('progressBar');
            $pbElement->setText($pb->toHtml() . '<br /><br />');
        } else {
            $p->addStyleDeclaration($styles);
        }
        $formTemplate = "\n<form{attributes}>" . "\n<table style=\"font-size: 8pt;\" class=\"maintable\">" . "\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\t<tr>" . "\n\t\t<td align=\"right\" valign=\"top\" width=\"30%\">" . "<!-- BEGIN required --><span style=\"color: #ff0000\">*</span><!-- END required -->" . "<b>{label}</b></td>" . "\n\t\t<td valign=\"top\" align=\"left\">" . "<!-- BEGIN error --><span style=\"color: #ff0000\">{error}</span><br /><!-- END error -->" . "\t{element}</td>" . "\n\t</tr>";
        $groupTemplate = "<table><tr>{content}</tr></table>";
        $groupElementTemplate = "<td>{element}<br />" . "<span style=\"font-size:10px;\">" . "<span class=\"label\">{label}</span>" . "</span></td>";
        $renderer =& $page->defaultRenderer();
        $renderer->setFormTemplate($formTemplate);
        $renderer->setHeaderTemplate($headerTemplate);
        $renderer->setElementTemplate($elementTemplate);
        $renderer->setGroupTemplate($groupTemplate, 'name');
        $renderer->setGroupElementTemplate($groupElementTemplate, 'name');
        $page->accept($renderer);
        $p->addBodyContent($renderer->toHtml());
        $p->display();
    }
예제 #26
0
	  </tr>
	  <tr>
		<td><a href="appointment_search.php?action=advanced_search&status=Active&branch=' . $to_pass["branch"] . '&date_from=' . date('d/m/Y') . '&date_to=' . date('d/m/Y') . '&searchLink=' . $_SERVER['PHP_SELF'] . urlencode('?' . $_SERVER['QUERY_STRING']) . '">Active: ' . $countActive . '</a></td>
	  </tr>
	  <tr>
		<td><a href="appointment_search.php?action=advanced_search&status=Cancelled&branch=' . $to_pass["branch"] . '&date_from=' . date('d/m/Y') . '&date_to=' . date('d/m/Y') . '&searchLink=' . $_SERVER['PHP_SELF'] . urlencode('?' . $_SERVER['QUERY_STRING']) . '">Cancelled: ' . $countCancelled . '</a></td>
	  </tr>
	  <tr>
		<td><a href="appointment_search.php?action=advanced_search&status=Deleted&branch=' . $to_pass["branch"] . '&date_from=' . date('d/m/Y') . '&date_to=' . date('d/m/Y') . '&searchLink=' . $_SERVER['PHP_SELF'] . urlencode('?' . $_SERVER['QUERY_STRING']) . '">Deleted: ' . $countDeleted . '</a></td>
	  </tr>
	</table>
	</div>
	';
$render .= '</td>
</tr>
</table>';
$onLoad = 'writeCalHeight(\'cal_iframe\',\'' . $allDayDivHeight . '\');';
$onResize = 'writeCalHeight(\'cal_iframe\',\'' . $allDayDivHeight . '\');';
$page = new HTML_Page2($page_defaults);
$page->setTitle("Calendar");
$page->addStyleSheet(getDefaultCss());
$page->addScript('js/global.js');
$page->addScript(GLOBAL_URL . 'js/overlib/overlibmws.js');
$page->setBodyAttributes(array('onResize' => $onResize));
//'onLoad'=>$onLoad,
$page->addBodyContent($header_and_menu);
$page->addBodyContent('<div id="content_cal">');
$page->addBodyContent($render);
$page->addBodyContent('</div>');
$page->addBodyContent('<script type="text/javascript"> window.onLoad = ' . $onLoad . ' </script>');
$page->display();
예제 #27
0
													map      : map,
													position : latlng
												});
			google.maps.event.addListener(map, "click", function (event)
			{
				marker.setPosition(event.latLng);
				document.getElementById("pro_latitude").value = event.latLng.lat();
				document.getElementById("pro_longitude").value = event.latLng.lng();
			});
}


</script>');
    $navbar_array = array('back' => array('title' => 'Back', 'label' => 'Back', 'link' => $searchLink), 'search' => array('title' => 'Client Search', 'label' => 'Client Search', 'link' => 'client_search.php'));
    $navbar = navbar2($navbar_array);
    $page = new HTML_Page2($page_defaults);
    $page->setTitle("Edit Address");
    $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($form->renderForm());
    $page->addBodyContent('</div>');
    $page->display();
} else {
    // update
    // if making a change to a property record, we should remove pcid and dump data as it will be incorrect
    $result = new Validate();
    $results = $result->process($formData1, $_GET);
    $db_data = $results['Results'];
예제 #28
0
<?php

require_once "inx/global.inc.php";
// only accesible to SuperAdmin and Administrator
pageAccess($_SESSION["auth"]["roles"], array('SuperAdmin', 'Administrator'));
$page = new HTML_Page2($page_defaults);
$sql = "SELECT use_id,use_fname,use_sname FROM user";
$q = $db->query($sql);
if (DB::isError($q)) {
    die("db error: " . $q->getMessage());
}
while ($row = $q->fetchRow()) {
    $users[$row["use_id"]] = $row["use_fname"] . ' ' . $row["use_sname"];
}
$formData1 = array('use_id' => array('type' => 'select', 'label' => 'User', 'value' => $use_id, 'options' => $users, 'attributes' => array('class' => 'addr'), 'required' => 2), 'use_password' => array('type' => 'text', 'label' => 'Password', 'value' => $use_password, 'attributes' => array('class' => 'addr'), 'required' => 2, 'tooltip' => 'Passwords must be at least 8 characters, and contain at least one number and one UPPER CASE letter'));
if (!$_GET["action"]) {
    $form = new Form();
    $form->addForm("", "get", $PHP_SELF);
    $form->addHtml("<div id=\"standard_form\">\n");
    $form->addField("hidden", "action", "", "reset");
    /////////////////////////////////////////////////////////////////////////////////
    $form->addHtml("<fieldset>\n");
    $form->addHtml('<div class="block-header">Reset Password</div>');
    $form->addData($formData1, $_GET);
    $form->addHtml($form->addDiv($form->makeField("submit", "", "", "Save Changes", array('class' => 'submit'))));
    $form->addHtml("</fieldset>\n");
    $form->addHtml('<pre>');
    for ($i = 1; $i <= 5; ++$i) {
        $form->addHtml(random_string(16, 'safe') . "\n");
    }
    $form->addHtml('</pre>');
예제 #29
0
    $form->addHtml('<div class="block-header"><u>A</u>ddress</div>');
    $form->addHtml('<div id="' . $formName . '">');
    // show old address from import
    if ($con_oldaddr && !$render_addresses) {
        $form->addHtml($form->addRow('textarea', 'con_oldaddr', 'Old Address', $con_oldaddr, array('style' => 'width:400px', 'readonly' => 'readonly'), '', 'Please re-enter this address into the form below'));
    }
    // add address table
    $form->addHtml($render_addresses);
    // add new address
    $form->addRow('radio', 'p2c_type', 'Type', 'Home', '', db_enum("pro2con", "p2c_type", "array"));
    $form->ajaxPostcode("by_freetext", "pro");
    $form->addHtml("</div>\n");
    $form->addHtml("</fieldset>\n");
    $onLoad .= 'showForm(' . $viewForm . ');self.focus; ';
    // start a new page
    $page = new HTML_Page2($page_defaults);
    $additional_js = '
if (!previousID) {
	var previousID = "form' . $viewForm . '";
	}

';
    if ($_GET["msg"]) {
        $onLoad .= 'javascript:hideMsg();';
        $msg = '
	<script type="text/javascript" language="javascript">
	<!--
	function hideMsg(){
		setTimeout("hideMsgDiv()",1500);
		}
	function hideMsgDiv() {
예제 #30
0
<?php

require_once "inx/global.inc.php";
if (!$_GET["stage"]) {
    $stage = 1;
} else {
    $stage = $_GET["stage"];
}
# go to client add form if client is NOT found
$goto_notfound = "client_add.php";
# go to client add form if client is found
$goto_found = "client_edit.php";
// start a new page
$page = new HTML_Page2($page_defaults);
switch ($stage) {
    ###########################################################
    # stage 1 - detailed search
    ###########################################################
    case 1:
        # advanced client search
        # detailed search of client database
        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');
            }