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


PHP FrontController::getSearchWhere方法代码示例

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


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

示例1: process

 public function process()
 {
     global $cookie;
     parent::process();
     $swhere = parent::getSearchWhere();
     $featureCount = HotelFeature::getFeatureCount($swhere);
     $this->pagination($featureCount);
     $hotelList = HotelFeature::getFeatureList($swhere, $this->p, $this->n);
     self::$smarty->assign("listData", $hotelList);
     self::$smarty->assign("featureList", $this->FeatureType);
 }
开发者ID:khuyennd,项目名称:dev-tasagent,代码行数:11,代码来源:FeatureManageController.php

示例2: process

 public function process()
 {
     global $cookie;
     parent::process();
     $member = new Member();
     $member->getByLoginUserName($cookie->LoginUserName);
     $swhere = parent::getSearchWhere();
     $agentCount = $member->getAdminCount($swhere);
     $this->pagination($agentCount);
     $hotelList = $member->getAdminList($swhere, $this->p, $this->n);
     self::$smarty->assign("listData", $hotelList);
 }
开发者ID:khuyennd,项目名称:dev-tasagent,代码行数:12,代码来源:AdminListController.php

示例3: process

 public function process()
 {
     global $cookie;
     parent::process();
     $iso = Language::getIsoById((int) $cookie->LanguageID);
     $member = new Member();
     $member->getByLoginUserName($cookie->LoginUserName);
     $swhere = parent::getSearchWhere();
     if ($swhere == "") {
         $swhere .= " 1 = 1 ";
     }
     if (Tools::getValue("HotelName") != "") {
         $swhere .= " AND HotelName_" . $iso . " like '%" . Tools::getValue("HotelName") . "%'";
     }
     $hotelCount = $member->getHotelCount($swhere);
     $this->pagination($hotelCount);
     $hotelList = $member->getHotelList($swhere, $this->p, $this->n);
     self::$smarty->assign("listData", $hotelList);
 }
开发者ID:khuyennd,项目名称:dev-tasagent,代码行数:19,代码来源:HotelListController.php

示例4: process

 public function process()
 {
     parent::process();
     $type = $this->type;
     $swhere = parent::getSearchWhere();
     //if not admin, add date condition
     /*
     		if(self::$cookie -> RoleID <= 3 ){
     			$swhere.= ($swhere=='')?'':" AND ";
     			$swhere.= " (CURDATE() BETWEEN A.`StaDate` AND A.`EndDate`) ";
     		}*/
     $promotionCount = Promotion::getPromotionCount($type, $swhere);
     $this->pagination($promotionCount);
     $promotionList = Promotion::getPromotionList($type, $swhere, $this->p, $this->n);
     self::$smarty->assign("listData", $promotionList);
     self::$smarty->assign("areaList", Tools::getJapanAreas());
     self::$smarty->assign("count", $promotionCount);
 }
开发者ID:khuyennd,项目名称:dev-tasagent,代码行数:18,代码来源:PromotionListController.php

示例5: process

 public function process()
 {
     global $cookie;
     $iso = Language::getIsoById((int) $cookie->LanguageID);
     parent::process();
     $swhere = parent::getSearchWhere();
     if ($swhere == "") {
         $swhere .= " 1 = 1 ";
     }
     if (Tools::getValue("HotelName") != "") {
         $swhere .= " AND HotelName_" . $iso . " like '" . Tools::getValue("HotelName") . "'";
     }
     $OrderStatusId = Tools::getValue("OrderStatusId");
     if (!empty($OrderStatusId)) {
         if (self::$cookie->RoleID != 1) {
             if (Tools::getValue("OrderStatusId") == 4) {
                 $swhere .= " AND OrderStatusId in ('4', '10') ";
             } else {
                 $swhere .= " AND OrderStatusId = '" . Tools::getValue("OrderStatusId") . "'";
             }
         } else {
             if (Tools::getValue("OrderStatusId") == 3) {
                 $swhere .= " AND OrderStatusId in ('3','4','8','9','10') ";
             } else {
                 $swhere .= " AND OrderStatusId = '" . Tools::getValue("OrderStatusId") . "'";
             }
         }
     }
     if (Tools::getValue("CheckInDate") != "") {
         $swhere .= " AND CheckInDate = '" . Tools::getValue("CheckInDate") . "'";
     }
     if (Tools::getValue("CheckOutDate") != "") {
         $swhere .= " AND CheckOutDate <= '" . Tools::getValue("CheckOutDate") . "'";
     }
     if (Tools::getValue("DueDate") != "") {
         $swhere .= " AND DATE_SUB(CheckOutDate,INTERVAL 5 DAY)  = '" . Tools::getValue("DueDate") . "'";
     }
     if (Tools::getValue("CheckInDateFrom") != "") {
         $CheckInDateFrom = Tools::getValue("CheckInDateFrom");
         $swhere .= " AND CheckInDate >= '" . Tools::getValue("CheckInDateFrom") . "'";
     }
     if (Tools::getValue("CheckInDateTo") != "") {
         $CheckInDateTo = Tools::getValue("CheckInDateTo");
         $swhere .= " AND CheckInDate <= '" . Tools::getValue("CheckInDateTo") . "'";
     }
     if ((Tools::getValue("CheckInDateFrom") == "" || Tools::getValue("CheckInDateTo") == "") && self::$cookie->RoleID == 1) {
         $CheckInDateTo = date("Y-m-d");
         $CheckInDateFrom = date("Y-m-d", mktime(0, 0, 0, date("m") - 2, date("d"), date("Y")));
         $swhere .= " AND '{$CheckInDateFrom} 00:00:00' <= OrderedDate AND OrderedDate <= '{$CheckInDateTo} 23:59:59'";
     }
     if (self::$cookie->RoleID != 1) {
         if (Tools::getValue("OrderEndDate") != "") {
             $OrderEndDate = Tools::getValue("OrderEndDate");
         } else {
             $OrderEndDate = date("Y-m-d");
         }
         if (Tools::getValue("OrderStartDate") != "") {
             $OrderStartDate = Tools::getValue("OrderStartDate");
         } else {
             $OrderStartDate = date("Y-m-d", mktime(0, 0, 0, date("m") - 2, date("d"), date("Y")));
         }
         //$swhere .= " AND '{$OrderStartDate} 00:00:00' <= OrderedDate AND OrderedDate <= '{$OrderEndDate} 23:59:59'";
     }
     $paymentMethod = 1;
     if (self::$cookie->RoleID == 3) {
         $swhere .= " AND HT_Company.CompanyId = " . self::$cookie->CompanyID;
         $paymentMethod = Member::getPaymentMethod(self::$cookie->CompanyID);
     } else {
         if (self::$cookie->RoleID == 2) {
             $swhere .= " AND OrderUserId = " . self::$cookie->UserID;
             $paymentMethod = Member::getPaymentMethod(self::$cookie->CompanyID);
         } else {
             if (self::$cookie->RoleID == 1) {
                 $swhere .= " AND HT_Hotel.HotelId = " . self::$cookie->HotelID;
                 $paymentMethod = Member::getPaymentMethod(self::$cookie->CompanyID);
             }
         }
     }
     $settle = Tools::getValue("settle");
     if ($settle == 1) {
         $swhere .= " AND (OrderStatusId = 3 OR OrderStatusId = 4)";
     }
     $bookingCount = Booking::getBookingCount($swhere);
     $this->pagination($bookingCount);
     $bookingList = Booking::getBookingList($swhere, $this->p, $this->n);
     foreach ($bookingList as $key => $value) {
         if (self::$cookie->RoleID > 3) {
             if ($value['CheckInDate'] >= date('Y-m-d')) {
                 $bookingList[$key]['isCancell'] = 1;
             } else {
                 $bookingList[$key]['isCancell'] = 0;
             }
         }
         if ($value['CheckInDate'] < date('Y-m-d')) {
             $bookingList[$key]['exp'] = 1;
         } else {
             $bookingList[$key]['exp'] = 0;
         }
         $bookingList[$key]['money'] = $value['TotalPrice'] - $value['otherPrice'];
     }
//.........这里部分代码省略.........
开发者ID:khuyennd,项目名称:dev-tasagent,代码行数:101,代码来源:BookingListController.php

示例6: process

 public function process()
 {
     global $cookie;
     parent::process();
     $member = new Member();
     $member->getByLoginUserName($cookie->LoginUserName);
     $swhere = parent::getSearchWhere();
     if ($member->RoleID < 4) {
         if ($swhere != "") {
             $swhere .= " AND ";
         }
         $swhere = "A.CompanyID = " . $member->CompanyID;
     }
     $agentCount = $member->getAgentCount($swhere);
     $this->pagination($agentCount);
     $hotelList = $member->getAgentList($swhere, $this->p, $this->n);
     self::$smarty->assign("listData", $hotelList);
 }
开发者ID:khuyennd,项目名称:dev-tasagent,代码行数:18,代码来源:AgentListController.php


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