Ejemplo n.º 1
0
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
$message = $error ? "<p class=\"feedback_negative\">{$error}</p>" : ($message ? "<p class=\"feedback_positive\">{$message}</p>" : "");
$jsExtra = JsWriter::scriptLink("js/bookings.js") . "\n" . JsWriter::scriptLink("js/datetimepicker_css.js");
$t = new Template("templates/page.tpl.html");
$tt = new Template("templates/bookings.tpl.html");
$tt->insertSlot("MESSAGE", $message);
if ($submitSuccess) {
    $tt->insertBlock("FORM_CONTENT", "");
} else {
    $tt->insertSlot("FIRSTNAME_LABEL", FormFieldTexts::FIRST_NAME);
    $tt->insertSlot("FIRSTNAME_VALUE", $first_name);
    $tt->insertSlot("LASTNAME_LABEL", FormFieldTexts::LAST_NAME);
    $tt->insertSlot("LASTNAME_VALUE", $last_name);
    $tt->insertSlot("EMAIL_LABEL", FormFieldTexts::EMAIL);
    $tt->insertSlot("EMAIL_VALUE", $email);
    $tt->insertSlot("PHONE_LABEL", FormFieldTexts::PHONE);
    $tt->insertSlot("PHONE_VALUE", $phone);
    $tt->insertSlot("MAKE_LABEL", FormFieldTexts::MAKE);
Ejemplo n.º 2
0
$wincfg = new Ext_Window_Config();
$jswin = new Ext_Window($wincfg->layout('fit')->width(300)->height(150)->closable(false)->resizable(false)->plain(true)->items($login));
$win = new JsVariable('win', $jswin);
$win->show();
$cfg = new Ext_Panel_Config();
$tabactions = new Ext_Panel($cfg->frame(true)->title('Actions')->collapsible(true)->contentEl('actions')->titleCollapse(true));
$cfg = new Ext_Panel_Config();
$actionpanel = new Ext_Panel($cfg->id('action-panel')->collapsible(true)->width(340)->border(false)->baseCls('x-plain')->items($tabactions)->associate('region', 'west')->associate('split', true)->associate('collapseMode', 'mini')->associate('minWidth', 150));
$cfg = new Ext_TabPanel_Config();
$jstabpanel = new Ext_TabPanel($cfg->deferredRender(false)->autoScroll(true)->activeTab(0)->items(array(array('id' => 'tab1', 'contentEl' => 'tabs', 'title' => 'Button', 'closable' => false, 'autoScroll' => true), array('id' => 'tab2', 'contentEl' => 'tabs', 'title' => 'Grid Panel', 'closable' => false, 'autoScroll' => true)))->associate('region', 'center')->associate('margins', '0 4 4 0')->associate('title', 'Main')->associate('closable', false));
$tabpanel = new JsVariable('tabpanel', $jstabpanel);
$cfg = new Ext_Viewport_Config();
$viewport = new Ext_Viewport($cfg->layout('border')->items(array($actionpanel, $tabpanel->name())));
$viewport->jsrender();
$tabpanel->add(array('title' => 'New Tab', 'iconCls' => 'tabs', 'autoLoad' => array('url' => 'extphptest.php?content1'), 'closable' => true));
new JsReady(JsWriter::get());
?>
</script>
Click the button: <div id='button1-div'></div>
<br />
A Grid Panel: <div id='grid1-div'></div>

<ul id="actions" class="x-hidden">
	<li>
		<a id="use" href="#">Bogus Item #1</a>
	</li>
	<li>
		<a id="create" href="#">Bogus Item #2</a>
	</li>
</ul>
 
Ejemplo n.º 3
0
                $printRow .= "<a href=\"edit_booking.php?id={$bid}\">edit</a><br />";
            }
            $printRow .= "<a href=\"edit_booking.php?id={$bid}&clone=1\">clone</a>";
            $results .= sprintf($rowTemplate, $n % 2 == 0 ? "even" : "odd", $n, $bid, $row["surname"] . ", " . $row["name"], $emailImg . $email . "<br />" . $phoneImg . $row["phone"], $row["vehicle"] . " \"" . $row["reg"] . "\"", $row["flight"], "", $depart, "", $meet, "", $arrive, $row["payment"], $combo, $cdate, $printRow);
        }
        $results .= "</table>\n";
    }
    $message = "";
}
$tt->insertSlot("RESULTS", $results);
$tt->insertSlot("SEARCH_TEXT", $search_text);
$tt->insertSlot("NAME_STATUS", $name_status);
$tt->insertSlot("EMAIL_STATUS", $email_status);
$tt->insertSlot("PHONE_STATUS", $phone_status);
$tt->insertSlot("AMOUNT_STATUS", $amount_status);
$tt->insertSlot("COMMENT_STATUS", $comment_status);
$tt->insertSlot("MAKE_STATUS", $make_status);
$tt->insertSlot("PARKING_POINTS_STATUS", $parking_points_status);
$tt->insertSlot("REG_STATUS", $reg_status);
$tt->insertSlot("COLOUR_STATUS", $colour_status);
$tt->insertSlot("FLIGHT_STATUS", $flight_status);
$tt->insertSlot("DROPOFF_STATUS", $dropoff_status);
$tt->insertSlot("PICKUP_STATUS", $pickup_status);
$tt->insertSlot("RANGE_START_VALUE", $_POST ? $range_start : "");
$tt->insertSlot("RANGE_END_VALUE", $_POST ? $range_end : "");
$tt->insertSlot("MESSAGE", $error ? "<span class=\"feedback_negative\">{$error}</span>" : "<span class=\"feedback_positive\">{$message}</span>");
$tt->insertSlot("FOCUS_ID", $focusId);
// output
$jsExtra = JsWriter::scriptLink("js/jquery-1.4.2.min.js") . "\n" . JsWriter::scriptLink("js/report_search.js") . "\n" . JsWriter::scriptLink("js/datetimepicker_css.js");
TemplateHelper::configurePage($t, Constants::SITE_NAME . " - Report - search", $tt->output(), $jsExtra);
echo $t->output();
Ejemplo n.º 4
0
<?php

require_once "classes/jswriter.class.php";
require_once "classes/datetimewrapper.class.php";
require_once "classes/validationhelper.class.php";
require_once "classes/template.class.php";
require_once "classes/templatehelper.class.php";
$jsExtra = JsWriter::scriptLink("js/datetimepicker_css.js");
$t = new Template("templates/page.tpl.html");
$tt = new Template("templates/rates.tpl.html");
$error = "";
$bookings_data = "";
$arrival_value = "";
$departure_value = "";
$submit_label = "Calculate";
$quote = 0;
if ($_POST) {
    $submit_label = "Recalculate";
    $arrival_value = $_POST['arrive'];
    $departure_value = $_POST['depart'];
    $valid_arrival = ValidationHelper::isMySqlDateTime($arrival_value, true);
    $valid_departure = ValidationHelper::isMySqlDateTime($departure_value, true);
    if ($valid_arrival !== true) {
        $error = $valid_arrival;
    } else {
        if ($valid_departure !== true) {
            $error = $valid_departure;
        } else {
            $bookings_data = '?' . http_build_query(array('arrive' => $arrival_value, 'depart' => $departure_value));
            $arr = new DateTimeWrapper(0, $arrival_value);
            $dep = new DateTimeWrapper(0, $departure_value);