コード例 #1
0
ファイル: HTMLPage2.php プロジェクト: J-P-Hanafin/TimeTrex-1
    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();
    }
コード例 #2
0
ファイル: stats.php プロジェクト: jankichaudhari/yii-site
#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();
コード例 #3
0
     <td><input type="text" name="pro_postcode" value="' . $row["pro_postcode"] . '"></td>
   </tr>
 </table>


';
        $map = new Map();
        $map->drawMap($row["pro_east"], $row["pro_north"]);
        $map->addLocator($row["pro_east"], $row["pro_north"]);
        $render .= $map->renderMap();
    }
}
$page = new HTML_Page2($page_defaults);
$page->setTitle("Postcode Tools");
$page->addStyleSheet(getDefaultCss());
$page->addStyleDeclaration('pre { color:#000000; }');
$page->addScript('js/global.js');
$page->addScript('js/scriptaculous/prototype.js');
$page->addBodyContent($header_and_menu);
$page->addBodyContent('<div id="home">');
$page->addBodyContent('<h4>Address Tools</h4>');
/*
$page->addBodyContent('<p>This page is for editing and correcting manually added addresses, and for replacing incorrectoly chosen
addresses for property we are marketing, client addresses, and contact addresses.</p>
<p>You should see the address record below, this address will either be obtained from the Royal Mail, or be manually entered.</p>
<p>Addresses are entered manually becuase either the correct address is not in the Royal Mail database, or the user is too lazy to
make an effort. Every manually entered address needs to be searched again to see if it is present in the Royal Mail database, and
if it is, the Royal Mail address should be used instead of the manually entered one. If the address is not present, then we need
to enter the map location, and to do this we find the nearest property and use that map location.</p>
<p>Step 1: the address shown immediately below is the one we are working on. Please use the form to try and find that address in
the royal Mail database. If you find it, click the save changes button, and then click the link entitled "Replace Deal Property"
コード例 #4
0
ファイル: HTMLPage2.php プロジェクト: Rem122/Uthando-CMS
 /**
  * Outputs the form.
  *
  * @param object &$page the page being processed
  *
  * @return void
  * @access public
  * @since  version 2.0.0RC1 (2005-06-23)
  */
 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();
 }
コード例 #5
0
    $form->addHtml("</fieldset>\n");
    $form->addHtml("<fieldset>\n");
    $form->addHtml('<div class="block-header">Office Use</div>');
    $form->addHtml('<div>');
    $form->addData($form6, $_POST);
    $form->addHtml("</div>\n");
    $form->addHtml("</fieldset>\n");
    $buttons = $form->makeField("submit", 'activate', "", "Save Changes and Activate", array('class' => 'submit', 'style' => 'color:red;font-size:14px;font-weight:bold;margin-left:223px'));
    //$buttons .= $form->makeField("submit",'save',"","Save Changes and Leave in Pending",array('class'=>'button'));
    $form->addHtml($buttons);
    $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 = new HTML_Page2($page_defaults);
    $page->setTitle("Client > New Client Questionaire");
    $page->addStyleSheet(getDefaultCss());
    $page->addStyleDeclaration('#standard_form .formLabel { width:200px; } #standard_form .required label input { vertical-align:middle; }');
    $page->addScript('js/global.js');
    $page->addBodyContent($header_and_menu);
    $page->addBodyContent('<div id="content">');
    $page->addBodyContent($navbar);
    $page->addBodyContent($form->renderForm());
    $page->addBodyContent('</div><!--' . $sql . '-->');
    $page->display();
} else {
    $result = new Validate();
    if ($_POST["cli_notes"]) {
        $notes = $_POST["cli_notes"];
        $db_data_note = array('not_blurb' => $notes, 'not_row' => $cli_id, 'not_type' => 'client_general', 'not_user' => $_SESSION["auth"]["use_id"], 'not_date' => $date_mysql);
        db_query($db_data_note, "INSERT", "note", "not_id");
    }
    unset($form6["cli_notes"]);