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

hotels.php

00001 <?php
00002 /*
00003  * hotels.php
00004  *
00005  * Copyright (c)2010 ValueCommerce, Co. Ltd.
00006  */
00007 ini_set( 'display_errors', 1 ); 
00008 /*
00009  * このページで上級クラスのホテル検索:TOPページをつくります
00010  */
00011 
00012 // 地域別・施設別の検索フォームの置換セット
00013 // トラベルAPIサンプル!
00014 require_once('VCSDBDriver/VCSDBDriverHotel.php');
00015 require_once('AdvancedHotelSearchPageHeader.php');
00016 require_once('PageFrame.php');
00017 require_once('PageBody.php');
00018 require_once('PageBodyRecommend.php');
00019 
00020 /*
00021  * このサンプルでは内部エンコーディングはUTF-8です。
00022  */
00023 mb_internal_encoding("UTF-8");
00024 
00025 /*
00026  * ページ本体の生成
00027  */
00028 $pageFrame = new PageFrame('templates/hotels.html');
00029 
00030 /*
00031  * ホテル検索フォームの設置
00032  */
00033 if($pageFrame->isHotelSearchFormFlag() === true){
00034 
00035         /*
00036          * VCSDBDriverHotelクラスのインスタンスを生成します。
00037          */
00038         $hotel = new VCSDBDriverHotel();
00039         
00040         /*
00041          * ページヘッダ部分(検索フォーム)を生成します。
00042          */
00043         $pageSearchForm = new AdvancedHotelSearchPageHeader('Views/AdvancedSearchForm.html');
00044         /*
00045          * トラベルAPIへのパラメータは、フォームで指定するので、フォームのあるページヘッダで設定します。
00046          */
00047         $pageSearchForm->assignParams($hotel);
00048         /*
00049          * ページ本体にホテル検索フォームを設置します。
00050          */
00051         $pageFrame->setHotelSearchFormHTML($pageSearchForm->render());
00052         
00053 }
00054 
00055 
00056 /*
00057  *  今話題のおすすめ!の設置
00058  */
00059 if($pageFrame->isHotelRecommendationFlag() === true){
00060 
00061         /*
00062          * VCSDBDriverHotelクラスのインスタンスを生成します。
00063          */
00064         $recommend_hotel = new VCSDBDriverHotel();
00065         
00066         /*
00067          * おすすめホテルを検索するためのオブジェクト生成します。
00068          */
00069         $pageHeaderRecommend = new AdvancedHotelSearchPageHeader('Views/AdvancedSearchForm.html');
00070         
00071         /*
00072          * トラベルAPIへのパラメータは、フォームで指定するので、フォームのあるページヘッダで設定します。
00073          */
00074         $pageHeaderRecommend->assignParams($recommend_hotel, true);
00075         
00076         /*
00077          * APIへの問い合わせ実行、パラメータが設定されていない場合は、エラーコードが返ります。
00078          */
00079         $response = $recommend_hotel->executeQuery();
00080 
00081         /*
00082          * リストパネルの生成
00083          */
00084         $pageBodyRecommend = new PageBodyRecommend('Views/Pagination.html','Views/AdvancedFormattedHotelRecommend.html', 5, $response); 
00085         
00086         /*
00087          * ページ本体におすすめホテル情報を設置します。
00088          */
00089         $pageFrame->setHotelRecommendationHTML($pageBodyRecommend->render());
00090 }
00091 
00092 
00093 // ページ全体の表示
00094 $pageFrame->show();
00095 
00096 
00097 ?>

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