/**
  * VCSDBDriverTour クラスのインスタンスに、フォームに設定されていた
  * パラメータを指定します。
  * 
  * @param VCSDBDriverTour $tour オブジェクト 
  */
 public function assignParams($tour)
 {
     parent::assignParams($tour);
     if ($this->dept_city_cd) {
         $tour->setParam('dept_city_cd', $this->dept_city_cd);
     }
     if ($this->region_cd) {
         $tour->setParam('region_cd', $this->region_cd);
     }
     if ($this->ctry_cd) {
         $tour->setParam('ctry_cd', $this->ctry_cd);
     }
     if ($this->dept_time_cd) {
         $tour->setParam('dept_time_cd', $this->dept_time_cd);
     }
     if ($this->term_max) {
         $tour->setParam('term_max', $this->term_max);
     }
     if ($this->online_book) {
         $tour->setParam('ticket_kodawari', 'online_book');
     }
     if ($this->mile) {
         $tour->setParam('ticket_kodawari', 'mile');
     }
     if ($this->transp_serv) {
         $tour->setParam('tour_kodawari', 'transp_serv');
     }
     if ($this->child_disc) {
         $tour->setParam('tour_kodawari', 'child_disc');
     }
 }
 /**
  * VCSDBDriverAirTicket クラスのインスタンスに、フォームに設定されていた
  * パラメータを指定します。
  * 
  * @param VCSDBDriverAirTicket $airTicket オブジェクト 
  */
 public function assignParams($airTicket)
 {
     parent::assignParams($airTicket);
     if ($this->dept_aprt_cd) {
         $airTicket->setParam('dept_aprt_cd', $this->dept_aprt_cd);
     }
     if ($this->region_cd) {
         $airTicket->setParam('region_cd', $this->region_cd);
     }
     if ($this->ctry_cd) {
         $airTicket->setParam('ctry_cd', $this->ctry_cd);
     }
     // Set for one way only, both way is default
     if ($this->trip_type && $this->trip_type == 2) {
         $airTicket->setParam('ticket_type_cd', '4');
     }
     if ($this->open_ticket) {
         $airTicket->setParam('ticket_kodawari', 'openjaw');
     }
     if ($this->online_book) {
         $airTicket->setParam('ticket_kodawari', 'online_book');
     }
     if ($this->mile) {
         $airTicket->setParam('ticket_kodawari', 'mile');
     }
     if ($this->direct_flight) {
         $airTicket->setParam('ticket_kodawari', 'direct');
     }
 }
 /**
  * VCSDBDriverHotel クラスのインスタンスに、フォームに設定されていた
  * パラメータを指定します。
  * 
  * @param VCSDBDriverHotel $hotel オブジェクト 
  */
 public function assignParams($hotel)
 {
     parent::assignParams($hotel);
     /*
      * ホテルの形式
      */
     if ($this->hotel_type) {
         $hotel->setParam('hotel_type', $this->hotel_type);
     }
 }
 /**
  * VCPDBDriver クラスのインスタンスに、フォームに設定されていた
  * パラメータを指定します。
  * 
  * @param VCPDBDriver $api 商品API オブジェクト 
  */
 public function assignParams($api)
 {
     parent::assignParams($api);
     global $_GET;
     /*
      * ソート種別
      */
     if ($this->sort_by) {
         $api->setParam('sort_by', $this->sort_by);
     }
     /*
      * ソート順
      */
     if ($this->sort_order) {
         $api->setParam('sort_order', $this->sort_order);
     }
     /*
      * カテゴリ
      */
     if ($this->category) {
         $api->setParam('category', $this->category);
     }
 }
/*
 * このサンプルでは内部エンコーディングはUTF-8です。
 */
mb_internal_encoding("UTF-8");
/*
 * VCPDBDriverクラスのインスタンスを生成します。
 */
$api = new VCPDBDriver(VCPDBDRIVER_API_URL);
/*
 * ページヘッダ部分(検索フォーム)を生成します。
 */
$pageHeader = new PageHeader('Views/PdbSearchForm.html');
/*
 * 商品APIへのパラメータは、フォームで指定するので、フォームのあるページヘッダで設定します。
 */
$pageHeader->assignParams($api);
/*
 * リストパネルの生成、エラーコードが渡された場合は、空のリストが返るのでそのままそれをshow()しても差し支えありません。
 */
$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-F02</title> 
 
		<link href="css/vc_default.css" rel="stylesheet" type="text/css" /> 
	</head>
 
 /**
  * VCSDBDriverHotel クラスのインスタンスに、フォームに設定されていた
  * パラメータを指定します。
  * 
  * @param VCSDBDriverHotel $hotel オブジェクト 
  */
 public function assignNearParams($hotel)
 {
     parent::assignParams($hotel);
     /*
      * 不要パラメータ初期化
      */
     $hotel->setParam('serv_id', '');
     $hotel->setParam('larea_cd', '');
     /*
      * ホテルの形式
      */
     if ($this->hotel_type) {
         $hotel->setParam('hotel_type', $this->hotel_type);
     }
     /*
      * パラメータセット
      */
     $hotel->setParam('sort_by', 'distance');
     $hotel->setParam('results_per_page', $this->near_results_per_page + 1);
     // +1は出力時に中心ホテルの情報を後で除外するため
     $hotel->setParam('lat', $_SESSION['LAT_DETAIL']);
     $hotel->setParam('lng', $_SESSION['LNG_DETAIL']);
     $hotel->setParam('ladius', '100000');
 }