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

display_sdb_results.php

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

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