• メインページ
  • データ構造
  • ファイル
  • ファイル一覧

display_tour_results.php

00001 <?php
00002 /*
00003  * display_tour_results.php
00004  * 
00005  * Copyright (c)2010 ValueCommerce,Co.Ltd.
00006  */
00007 
00008 require_once('VCSDBDriver/VCSDBDriverTour.php');
00009 require_once('TourSearchPageHeader.php');
00010 require_once('PageBody.php');
00011 /*
00012  * このサンプルでは内部エンコーディングはUTF-8です。
00013  */
00014 mb_internal_encoding("UTF-8");
00015 
00016 /*
00017  * VCSDBDriverTourクラスのインスタンスを生成します。
00018  */
00019 $tour = new VCSDBDriverTour();
00020 
00021 /*
00022  * page パラメータが存在することと、pageパラメータの値が数値であることを確認してから、
00023  * パラメータに収めます。
00024  */
00025 if (array_key_exists('page',$_GET) && is_numeric($_GET['page'])) {
00026         $tour->setParam('page',$_GET['page']);
00027 }
00028 
00029 /*
00030  * ページヘッダ部分(検索フォーム)を生成します。
00031  */
00032 $pageHeader = new TourSearchPageHeader('Views/TourSearchForm.html');
00033 
00034 /*
00035  * トラベルAPIへのパラメータは、フォームで指定するので、フォームのあるページヘッダで設定します。
00036  */
00037 $pageHeader->assignParams($tour);
00038 
00039 /*
00040  * APIへの問い合わせ実行
00041  */
00042 $response = $tour->executeQuery();
00043 
00044 /*
00045  * ページ本体の生成
00046  */
00047 $pageBody = new PageBody('Views/Pagination.html',
00048                                         'Views/FormattedTour.html', 10, $response);
00049 ?>
00050 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
00051 <html xmlns="http://www.w3.org/1999/xhtml">
00052         <head>
00053                 <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> 
00054                 <meta id='keywords' name='keywords' content='overview' /> 
00055                 <title>ValueCommerce - ツアー検索</title> 
00056                 <link href="css/vc_default.css" rel="stylesheet" type="text/css" /> 
00057         </head>
00058  
00059         <body style="margin:15px;"> 
00060                 <div id="vc_container"> 
00061                         <?php
00062                                 /* ここで ヘッダ部分を表示します。*/
00063                                 $pageHeader->show();
00064                          
00065                                 /*
00066                                  * ここで検索結果を表示します。
00067                                  */
00068                                 $pageBody->show(false);         
00069                         ?>
00070                 </div> 
00071         </body>
00072 </html>

バリューコマース ウェブサービス トラベルAPIサンプル ドキュメンテーションに対してTue Jan 11 2011 19:25:14に生成されました。  doxygen 1.7.2