예제 #1
0
 protected function build(PageBody &$body, SubMenu &$submenu)
 {
     $submenu->addLink("Sign in", "#", TRUE);
     $submenu->addLink("Sign up", "#");
     $submenu->addLink("Forget Password", "#");
     $loginForm = new Form("login");
     $loginForm->addInput(Input::textInput("email", "Enter your Email:"));
     $loginForm->addInput(Input::textInput("password", "Enter your Password:"));
     $body->addToCenter($loginForm);
 }
예제 #2
0
 protected function build(PageBody &$body, SubMenu &$submenu)
 {
     $this->pageName = "New Event";
     $form = new Form("Event");
     $form->addInput(Input::textInput("eventName", "Event Name"));
     $form->addInput(Input::textareaInput("eventAddress", "Address"));
     $form->addInput(Input::createGroupInput([Input::dateInput("eventDay", "Day"), Input::timeInput("eventTime", "time")]));
     $form->addInput(Input::createGroupInput([Input::dateInput("eventDeadline", "Registration Deadline"), Input::timeInput("eventDeadlineTime", "Registration Deadline Time")]));
     $form->addInput(Input::textInput("eventFee", "Registration Fee"));
     $form->addInput(Input::textInput("eventStuFee", "Student Fee"));
     $form->addInput(Input::tokenInput("organizations", "Organizations"));
     $body->addToCenter($form);
 }
예제 #3
0
    protected function build(PageBody &$body, SubMenu &$submenu)
    {
        $c = new CustomHTML('
<div class="jumbotron">
  <h1>This is the home page!</h1>
  <p>Join S2ERC and register now</p>
  <p><a href="?page=login" class="btn btn-primary btn-lg" role="button">Register</a></p>
</div>
');
        $body->addToCenter($c);
        $body->addToTop(new Message("This is the home page", Message::WARNING));
        $body->addToTop(new Message("You have to login", Message::DANGER));
    }
예제 #4
0
 protected function build(PageBody &$body, SubMenu &$submenu)
 {
     $this->pageName = "Event List";
     $submenu->addLink("Add new Event", "#");
     $submenu->addLink("Show Event", "#");
     $submenu->addLink("Edit", "#");
     $submenu->addLink("Delete", "#");
     // show a list of events on a table
     $events = Database::get("Event");
     if (isset($events)) {
         $table = new HtmlTable();
         $table->setHead(["#", "Name", "Info"]);
         foreach ($events as $id => $event) {
             $table->addRow([$id, '<a href="?page=Event&event=' . $id . '">' . $event->name . '</a>', $event->address]);
         }
         $body->addToCenter($table);
     } else {
         $body->addToCenter(new Message("There is no event to show", Message::INFO));
     }
 }
예제 #5
0
 protected function build(PageBody &$body, SubMenu &$submenu)
 {
     //var_dump($_SESSION['db']);
     $subPage = isset($_GET['subpage']) ? $_GET['subpage'] : '';
     if (isset($_GET['event'])) {
         $this->event = Database::getRow('Event', $_GET['event']);
         $this->event->id = $_GET['event'];
         // for testing
         $this->pageName = $this->event->name;
         //var_dump($this->event);
     }
     if ($this->event == null) {
         $body->addToTop(new Message("No Event", Message::DANGER));
     }
     $submenu->addLink("Event Details", "?page=Event&event=" . $this->event->id, $subPage == '');
     $submenu->addLink("Update Event", "?page=Event&event=" . $this->event->id . "&subpage=update", $subPage == 'update');
     $submenu->addSplitter();
     $submenu->addLink("Send Email Invitation", "?page=Event&event=" . $this->event->id . "&subpage=send", $subPage == 'send');
     $submenu->addLink("Add VIP Participant", "#");
     $submenu->addSplitter();
     $submenu->addLink("Show All Participants", "#", false, false, 100);
     $submenu->addLink("Show Missing Participants", "#", false, false, 90);
     $submenu->addLink("Show Event Attendances", "#", false, false, 10);
     $submenu->addSplitter();
     $submenu->addLink("Build Schedule", "#");
     $submenu->addLink("Send Schedule", "#");
     $submenu->addLink("Start Timer", "#");
     $submenu->addSplitter();
     $submenu->addDangerLink("Delete Event", "#");
     $body->addToTop(new CustomHTML("\n            <div class='page-header'>\n                <h1> " . $this->event->name . " <small>" . $this->event->address . "</small></h1>\n            </div>\n        "));
     if ($subPage == '') {
         $body->addToCenter(new CustomHTML("\n                <dl class='dl-horizontal' style='font-size:18px'>\n                    <dt>Name</dt>\n                    <dd>" . $this->event->name . "</dd>\n                    <dt>Address</dt>\n                    <dd>" . $this->event->address . "</dd>\n                </dl>\n            "));
     } else {
         if ($subPage == 'update') {
             $form = new Form("Event");
             $form->addInput(Input::textInput("eventName", "Event Name", $this->event->name));
             $form->addInput(Input::textareaInput("eventAddress", "Event Address", $this->event->address));
             $body->addToCenter($form);
         } else {
             if ($subPage == 'send') {
                 $form = new Form("Event");
                 $form->addInput(Input::tokenInput("emails", "Send To:"));
                 $form->addInput(Input::textInput("subject", "Subject", "Invitation to " . $this->event->name));
                 $form->addInput(Input::textareaInput("message", "Message"));
                 $body->addToCenter($form);
             }
         }
     }
     //        $table = new HtmlTable();
     //        $table->addRow(["Name",  $this->event->name]);
     //        $table->addRow(["Address",  $this->event->address]);
     //
     //        $body->addToCenter($table);
 }
예제 #6
0
    protected function build(PageBody &$body, SubMenu &$submenu)
    {
        $form = new Form("Test");
        //$form->addInput("list1", "list", "Exsample List:", ["1", "2", "3"]);
        $form->addInput(Input::textInput("input1", "Enter your name: "));
        $form->addInput(Input::selectInput("list1", "Example List:", ["A", "B", "C"]));
        //$form->addInput(Input::dateInput("date", "choose a date: "));
        $left = new CustomHTML('
<div class="list-group">
  <a href="#" class="list-group-item active">Home</a>
  <a href="#" class="list-group-item">Profile</a>
  <a href="#" class="list-group-item">Messages</a>
</div>');
        $submenu->addLink("Home", "?page=home");
        $submenu->addLink("Login", "?page=login");
        $submenu->addLink("Top", "#top");
        $submenu->addLink("Down", "#down");
        $right = new CustomHTML('
<div class="panel panel-default">
  <div class="panel-heading">Panel heading without title</div>
  <div class="panel-body">
    Panel content
  </div>
</div>

<div class="panel panel-default">
  <div class="panel-heading">
    <h3 class="panel-title">Panel title</h3>
  </div>
  <div class="panel-body">
    Panel content
  </div>
</div>');
        $body->addToLeft($left);
        $body->addToRight($right);
        $body->addToCenter($form);
        $body->addToTop(new Message("This is a test page", Message::INFO));
        if (isset($_POST['list1'])) {
            $body->addToTop(new Message("the value of list1=" . $_POST['list1'], Message::SUCCESS));
        }
    }
     */
    $pageFrame->setHotelRecommendationHTML($pageBodyRecommend->render());
}
/*
 * ホテル検索結果一覧の設置
 */
if ($pageFrame->isHotelSearchResultsFlag() === true) {
    /*
     * VCSDBDriverHotelクラスのインスタンスを生成します。
     */
    $hotel = new VCSDBDriverHotel();
    /*
     * ページヘッダ部分(検索フォーム)を生成します。
     */
    $pageHeader = new AdvancedHotelSearchPageHeader('Views/AdvancedSearchForm.html');
    /*
     * トラベルAPIへのパラメータは、フォームで指定するので、フォームのあるページヘッダで設定します。
     */
    $pageHeader->assignParams($hotel);
    /*
     * APIへの問い合わせ実行、パラメータが設定されていない場合は、エラーコードが返ります。
     */
    $response = $hotel->executeQuery();
    /*
     * リストパネルの生成
     */
    $pageBody = new PageBody('Views/Pagination.html', 'Views/AdvancedFormattedHotelList.html', 10, $response);
    $pageFrame->setHotelSearchResultsHTML($pageBody->render());
}
// ページ全体の表示
$pageFrame->show();
$api = new VCPDBDriver(VCPDBDRIVER_API_URL);
/*
 * このサンプルではキーワードは固定です。
 */
$api->setParam('keyword', 'iPad');
/*
 * page パラメータが存在することと、pageパラメータの値が数値であることを確認してから、
 * パラメータに収めます。
 */
if (array_key_exists('page', $_GET) && is_numeric($_GET['page'])) {
    $api->setParam('page', $_GET['page']);
}
/*
 * ページ本体の生成
 */
$pageBody = new PageBody('Views/Pagination.html', 'Views/FormattedItem.html', 10, $api);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> 
		<meta id='keywords' name='keywords' content='overview' /> 
		<title>ValueCommerce - HTML Framework - PDB-F01</title> 
		<link href="css/vc_default.css" rel="stylesheet" type="text/css" /> 
	</head>
 
	<body style="margin:15px;"> 
		<div id="vc_container"> 
			<h1 class="vc_title">検索結果</h1> 
		   	<?php 
/*
/*
 * ページヘッダ部分(検索フォーム)を生成します。
 */
$pageHeader = new TourSearchPageHeader('Views/TourSearchForm.html');
/*
 * トラベルAPIへのパラメータは、フォームで指定するので、フォームのあるページヘッダで設定します。
 */
$pageHeader->assignParams($tour);
/*
 * APIへの問い合わせ実行
 */
$response = $tour->executeQuery();
/*
 * ページ本体の生成
 */
$pageBody = new PageBody('Views/Pagination.html', 'Views/FormattedTour.html', 10, $response);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> 
		<meta id='keywords' name='keywords' content='overview' /> 
		<title>ValueCommerce - ツアー検索</title> 
		<link href="css/vc_default.css" rel="stylesheet" type="text/css" /> 
	</head>
 
	<body style="margin:15px;"> 
		<div id="vc_container"> 
		   	<?php 
/* ここで ヘッダ部分を表示します。*/
$pageHeader->show();