当前位置: 首页>>代码示例>>PHP>>正文


PHP Room::getIdList方法代码示例

本文整理汇总了PHP中Room::getIdList方法的典型用法代码示例。如果您正苦于以下问题:PHP Room::getIdList方法的具体用法?PHP Room::getIdList怎么用?PHP Room::getIdList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Room的用法示例。


在下文中一共展示了Room::getIdList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: showCal

 public function showCal()
 {
     $this->mBasePage = "cal.tpl";
     global $cWebPath;
     $startdate = new DateTime(WebRequest::post("qbCheckin"));
     $enddate = new DateTime(WebRequest::post("qbCheckout"));
     $idlist = Room::getIdList();
     $dates = array();
     for ($date = $startdate; $date < $enddate; $date->modify("+1 day")) {
         $dates[] = clone $date;
     }
     $availabilityMatrix = array();
     $roomlist = array();
     foreach ($idlist as $id) {
         $r = Room::getById($id);
         $roomlist[$id] = $r;
         $availabilityMatrix[$id] = array();
         foreach ($dates as $d) {
             $availabilityMatrix[$id][array_search($d, $dates)] = !$r->isAvailable($d);
         }
     }
     $this->mSmarty->assign("availmatrix", $availabilityMatrix);
     $this->mSmarty->assign("datelist", $dates);
     $this->mSmarty->assign("roomlist", $roomlist);
     $this->mSmarty->assign("valQbCheckin", WebRequest::postString("qbCheckin"));
     $this->mSmarty->assign("valQbCheckout", WebRequest::postString("qbCheckout"));
     $this->mSmarty->assign("valQbAdults", WebRequest::postInt("qbAdults"));
     $this->mSmarty->assign("valQbChildren", WebRequest::postInt("qbChildren"));
     $this->mSmarty->assign("valQbPromoCode", WebRequest::postString("qbPromoCode"));
     $this->mSmarty->assign("valQbTitle", WebRequest::post("qbTitle"));
     $this->mSmarty->assign("valQbFirstname", WebRequest::post("qbFirstname"));
     $this->mSmarty->assign("valQbLastname", WebRequest::post("qbLastname"));
     $this->mSmarty->assign("valQbAddress", WebRequest::post("qbAddress"));
     $this->mSmarty->assign("valQbCity", WebRequest::post("qbCity"));
     $this->mSmarty->assign("valQbPostcode", WebRequest::post("qbPostcode"));
     $this->mSmarty->assign("valQbCountry", WebRequest::post("qbCountry"));
     $this->mSmarty->assign("valQbEmail", WebRequest::post("qbEmail"));
 }
开发者ID:vulnerabilityCode,项目名称:hotel-system,代码行数:38,代码来源:PageCalendar.php

示例2: showListRoomPage

 private function showListRoomPage()
 {
     $idList = Room::getIdList();
     $roomList = array();
     foreach ($idList as $id) {
         $roomList[] = Room::getById($id);
     }
     $this->mSmarty->assign("roomlist", $roomList);
     $this->mBasePage = "mgmt/roomList.tpl";
 }
开发者ID:vulnerabilityCode,项目名称:hotel-system,代码行数:10,代码来源:MPageRooms.php


注:本文中的Room::getIdList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。