Exemplo n.º 1
0
 /**
  * form_room_type constructor.
  * @param $RoomType
  */
 public function __construct(&$RoomType)
 {
     $this->Obj =& $RoomType;
     parent::__construct(_AM_MARTIN_HOTEL_ROOM_CATEGORY, "op", xoops_getenv('PHP_SELF') . "?action=typesave&typeid=" . $RoomType['room_type_id']);
     $this->setExtra('enctype="multipart/form-data"');
     $this->createElements();
     $this->createButtons();
 }
 /**
  * form_hotel_service_type constructor.
  * @param $HotelServiceTypeObj
  */
 public function __construct(&$HotelServiceTypeObj)
 {
     $this->Obj =& $HotelServiceTypeObj;
     parent::__construct(_AM_MARTIN_SERVICE_CATEGORY, "op", xoops_getenv('PHP_SELF') . "?action=typesave");
     $this->setExtra('enctype="multipart/form-data"');
     $this->createElements();
     $this->createButtons();
 }
Exemplo n.º 3
0
 /**
  * form_hotel_city constructor.
  * @param $HotelCityObj
  */
 public function __construct(&$HotelCityObj)
 {
     $this->Obj =& $HotelCityObj;
     parent::__construct(_AM_MARTIN_HOTEL_CITY, "op", xoops_getenv('PHP_SELF') . "?action=save");
     $this->setExtra('enctype="multipart/form-data"');
     $this->createElements();
     $this->createButtons();
 }
Exemplo n.º 4
0
 /**
  * form_hotel_service constructor.
  * @param $HotelServiceObj
  * @param $TypeList
  */
 public function __construct(&$HotelServiceObj, &$TypeList)
 {
     $this->Obj =& $HotelServiceObj;
     $this->TypeList =& $TypeList;
     parent::__construct(_AM_MARTIN_HOTEL_SERVICE, "op", xoops_getenv('PHP_SELF') . "?action=save");
     $this->setExtra('enctype="multipart/form-data"');
     $this->createElements();
     $this->createButtons();
 }
Exemplo n.º 5
0
 /**
  * @param $target
  */
 public function __construct(&$target)
 {
     $this->publisher =& PublisherPublisher::getInstance();
     $this->targetObject =& $target;
     parent::__construct(_AM_PUBLISHER_UPLOAD_FILE, 'form', xoops_getenv('PHP_SELF'));
     $this->setExtra('enctype="multipart/form-data"');
     $this->createElements();
     $this->createButtons();
 }
Exemplo n.º 6
0
 /**
  * form_room_price constructor.
  * @param $RoomPriceObj
  * @param $RoomList
  */
 public function __construct(&$RoomPriceObj, &$RoomList)
 {
     $this->Obj =& $RoomPriceObj;
     $this->RoomList =& $RoomList;
     parent::__construct(_AM_MARTIN_HOTEL_ROOM_RATES, "op", xoops_getenv('PHP_SELF') . "?action=pricesave&room_id=" . @$RoomPriceObj['room_id'] . "&room_date=" . date('Y-m-d', @$RoomPriceObj['room_date']));
     $this->setExtra('enctype="multipart/form-data"');
     $this->createElements();
     $this->createButtons();
 }
Exemplo n.º 7
0
 /**
  * form_auction constructor.
  * @param $AuctionObj
  * @param $RoomList
  * @param $HotelList
  */
 public function __construct(&$AuctionObj, &$RoomList, &$HotelList)
 {
     $this->Obj =& $AuctionObj;
     $this->RoomList =& $RoomList;
     $this->HotelList =& $HotelList;
     parent::__construct(_AM_MARTIN_HOTEL_BIDDING, "op", xoops_getenv('PHP_SELF') . "?action=save");
     $this->setExtra('enctype="multipart/form-data"');
     $this->createElements();
     $this->createButtons();
 }
 /**
  * form_hotel_service_relation constructor.
  * @param $Relation
  * @param $serviceList
  * @param $hotelList
  */
 public function __construct(&$Relation, &$serviceList, &$hotelList)
 {
     $this->Obj =& $Relation;
     $this->serviceList =& $serviceList;
     $this->hotelList =& $hotelList;
     parent::__construct(_AM_MARTIN_HOTEL_ASSOCIATION, "op", xoops_getenv('PHP_SELF') . "?action=hotelsave&hotel_id={$Relation['hotel_id']}&service_id={$Relation['service_id']}");
     $this->setExtra('enctype="multipart/form-data"');
     $this->createElements();
     $this->createButtons();
 }
Exemplo n.º 9
0
 /**
  * form_room constructor.
  * @param $RoomObj
  * @param $hotelList
  * @param $TypeList
  */
 public function __construct(&$RoomObj, &$hotelList, &$TypeList)
 {
     $this->Obj =& $RoomObj;
     $this->hotelList =& $hotelList;
     $this->TypeList =& $TypeList;
     $this->RoomBedTypeList = getModuleArray('room_bed_type', 'order_type', true);
     parent::__construct(_AM_MARTIN_HOTEL_ROOMS, "op", xoops_getenv('PHP_SELF') . "?action=save");
     $this->setExtra('enctype="multipart/form-data"');
     $this->createElements();
     $this->createButtons();
 }
Exemplo n.º 10
0
 function __construct(&$target, $subCatsCount = 4)
 {
     $this->publisher = PublisherPublisher::getInstance();
     $this->targetObject = $target;
     $this->subCatsCount = $subCatsCount;
     $member_handler = xoops_gethandler('member');
     $this->userGroups = $member_handler->getGroupList();
     parent::__construct(_AM_PUBLISHER_CATEGORY, "form", xoops_getenv('PHP_SELF'));
     $this->setExtra('enctype="multipart/form-data"');
     $this->createElements();
     $this->createButtons();
 }
Exemplo n.º 11
0
 /**
  * form_order constructor.
  * @param $OrderObj
  */
 public function __construct(&$OrderObj)
 {
     //array
     $this->OrderType = getModuleArray('order_type', 'order_type', true);
     $this->OrderMode = getModuleArray('order_mode', 'order_mode', true);
     $this->OrderPayMethod = getModuleArray('order_pay_method', 'order_pay_method', true);
     $this->OrderStatus = getModuleArray('order_status', 'order_status', true);
     $this->OrderDocumentType = getModuleArray('order_document_type', 'order_document_type', true);
     //print_r($this->OrderStatus);exit;
     $this->Obj =& $OrderObj;
     parent::__construct(_AM_MARTIN_ORDER_INFORMATION, "op", xoops_getenv('PHP_SELF') . "?action=save");
     $this->setExtra('enctype="multipart/form-data"');
     $this->createElements();
     $this->createButtons();
 }
Exemplo n.º 12
0
 public function alumni_getSearchFrom($andor, $queries, $mids, $mid, $bycat)
 {
     $xoops = Xoops::getInstance();
     $alumni = Alumni::getInstance();
     // create form
     parent::__construct(XoopsLocale::SEARCH, 'alumni', 'search.php', 'get');
     // create form elements
     $this->addElement(new XoopsFormText(XoopsLocale::KEYWORDS, 'query', 30, 255, htmlspecialchars(stripslashes(implode(' ', $queries)), ENT_QUOTES)), true);
     $type_select = new XoopsFormSelect(XoopsLocale::TYPE, 'andor', $andor);
     $type_select->addOptionArray(array('AND' => XoopsLocale::ALL_AND, 'OR' => XoopsLocale::ANY_OR, 'exact' => XoopsLocale::EXACT_MATCH));
     $this->addElement($type_select);
     $by_cat = Request::getInt('by_cat', 0);
     $categoriesHandler = $xoops->getModuleHandler('category', 'alumni');
     $search = Search::getInstance();
     $module_id = $xoops->module->getVar('mid');
     $groups = $xoops->isUser() ? $xoops->user->getGroups() : '3';
     $alumni_ids = $alumni->getGrouppermHandler()->getItemIds('alumni_view', $groups, $module_id);
     $criteria = new CriteriaCompo();
     $criteria->add(new Criteria('cid', '(' . implode(', ', $alumni_ids) . ')', 'IN'));
     $criteria->setOrder($xoops->getModuleConfig('alumni_csortorder'));
     $category_arr = $categoriesHandler->getall($criteria);
     foreach (array_keys($category_arr) as $i) {
         $cid = $category_arr[$i]->getVar('cid');
         $pid = $category_arr[$i]->getVar('pid');
         $title = $category_arr[$i]->getVar('title');
     }
     $categories = $alumni->getCategoryHandler()->getCategoriesForSearch();
     $category_select = new XoopsFormSelect(AlumniLocale::L_ALUMNI_CATEGORIES, 'by_cat', $by_cat);
     foreach ($categories as $cid => $title) {
         $category_select->addOption('0', XoopsLocale::ALL);
         $category_select->addOptionArray(array($cid => $title));
     }
     $this->addElement($category_select);
     if (!empty($mids)) {
         $mods_checkbox = new XoopsFormCheckBox(XoopsLocale::SEARCH_IN, 'mids[]', $mids);
     } else {
         $mods_checkbox = new XoopsFormCheckBox(XoopsLocale::SEARCH_IN, 'mids[]', $mid);
     }
     if (empty($modules)) {
         $gperm_handler = $xoops->getHandlerGroupPermission();
         $available_modules = $gperm_handler->getItemIds('module_read', $xoops->getUserGroups());
         $available_plugins = Xoops\Module\Plugin::getPlugins('search');
         $criteria = new CriteriaCompo();
         $criteria->add(new Criteria('dirname', '(\'' . implode('\',\'', array_keys($available_plugins)) . '\')', 'IN'));
         if (isset($available_modules) && !empty($available_modules)) {
             $criteria->add(new Criteria('mid', '(' . implode(',', $available_modules) . ')', 'IN'));
         }
         $module_handler = $xoops->getHandlerModule();
         $mods_checkbox->addOptionArray($module_handler->getNameList($criteria));
     } else {
         /* @var $module XoopsModule */
         $module_array = array();
         foreach ($modules as $mid => $module) {
             $module_array[$mid] = $module->getVar('name');
         }
         $mods_checkbox->addOptionArray($module_array);
     }
     $this->addElement($mods_checkbox);
     if ($search->getConfig('keyword_min') > 0) {
         $this->addElement(new XoopsFormLabel(XoopsLocale::SEARCH_RULE, sprintf(XoopsLocale::EF_KEYWORDS_MUST_BE_GREATER_THAN, $search->getConfig('keyword_min'))));
     }
     $this->addElement(new XoopsFormHidden('action', 'results'));
     $this->addElement(new XoopsFormHiddenToken('id'));
     $this->addElement(new XoopsFormButton('', 'submit', XoopsLocale::SEARCH, 'submit'));
     return $this;
 }