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


PHP tmsModel::store方法代码示例

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


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

示例1: store

 function store(&$data)
 {
     if (!vmAccess::manager('manufacturercategories')) {
         vmWarn('Insufficient permissions to store manufacturer category');
         return false;
     }
     return parent::store($data);
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:8,代码来源:manufacturercategories.php

示例2: store

 /**
  * Retireve a list of paymentsetting from the database.
  *
  * This is written to get a list for selecting paymentsetting. Therefore it asks for enabled
  * @author Max Milbers
  * @return object List of paymentsetting objects
  */
 function store(&$data)
 {
     if (!vmAccess::manager('paymentsetting')) {
         vmWarn('Insufficient permissions to store paymentsetting');
         return false;
     }
     return parent::store($data);
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:15,代码来源:paymentsetting.php

示例3: store

 /**
  * Retireve a list of general from the database.
  *
  * This is written to get a list for selecting general. Therefore it asks for enabled
  * @author Max Milbers
  * @return object List of general objects
  */
 function store(&$data)
 {
     $tsmart_general_id = $data['tsmart_general_id'];
     if ($tsmart_general_id) {
         $general = $this->getItem($tsmart_general_id);
         $result = array_merge($general->params->toArray(), $data['params']);
         $data['params'] = json_encode($result);
     }
     if (!vmAccess::manager('general')) {
         vmWarn('Insufficient permissions to store general');
         return false;
     }
     return parent::store($data);
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:21,代码来源:general.php

示例4: store

 /**
  * Retireve a list of currencies from the database.
  *
  * This is written to get a list for selecting currencies. Therefore it asks for enabled
  * @author Max Milbers
  * @return object List of currency objects
  */
 function store(&$data)
 {
     if (!vmAccess::manager('supplier')) {
         vmWarn('Insufficient permissions to store supplier');
         return false;
     }
     $tsmart_supplier_id = parent::store($data);
     if ($tsmart_supplier_id) {
         $db = JFactory::getDbo();
     }
     return $tsmart_supplier_id;
     //end insert group size
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:20,代码来源:supplier.php

示例5: store

 /**
  * Retireve a list of currencies from the database.
  *
  * This is written to get a list for selecting currencies. Therefore it asks for enabled
  * @author Max Milbers
  * @return object List of currency objects
  */
 function store(&$data)
 {
     $db = JFactory::getDbo();
     if (!vmAccess::manager('payment')) {
         vmWarn('Insufficient permissions to store payment');
         return false;
     }
     $tsmart_payment_id = parent::store($data);
     if ($tsmart_payment_id) {
         //insert to tour in payment
         $query = $db->getQuery(true);
         $query->delete('#__tsmart_tour_id_payment_id')->where('tsmart_payment_id=' . (int) $tsmart_payment_id);
         $db->setQuery($query)->execute();
         $err = $db->getErrorMsg();
         if (!empty($err)) {
             vmError('can not delete tour in payment', $err);
         }
         $list_tour_id = $data['list_tour_id'];
         foreach ($list_tour_id as $tsmart_product_id) {
             $query->clear()->insert('#__tsmart_tour_id_payment_id')->set('tsmart_product_id=' . (int) $tsmart_product_id)->set('tsmart_payment_id=' . (int) $tsmart_payment_id);
             $db->setQuery($query)->execute();
             $err = $db->getErrorMsg();
             if (!empty($err)) {
                 vmError('can not insert tour in this payment', $err);
             }
         }
         //end insert to tour in payment
         //insert to payment method in payment
         $query = $db->getQuery(true);
         $query->delete('#__tsmart_payment_id_payment_method_id')->where('tsmart_payment_id=' . (int) $tsmart_payment_id);
         $db->setQuery($query)->execute();
         $err = $db->getErrorMsg();
         if (!empty($err)) {
             vmError('can not delete payment method in payment', $err);
         }
         $list_payment_method_id = $data['list_payment_method_id'];
         foreach ($list_payment_method_id as $tsmart_payment_method_id) {
             $query->clear()->insert('#__tsmart_payment_id_payment_method_id')->set('tsmart_payment_method_id=' . (int) $tsmart_payment_method_id)->set('tsmart_payment_id=' . (int) $tsmart_payment_id);
             $db->setQuery($query)->execute();
             $err = $db->getErrorMsg();
             if (!empty($err)) {
                 vmError('can not insert payment method in this payment', $err);
             }
         }
         //end insert to payment method in payment
     }
     return $tsmart_payment_id;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:55,代码来源:payment.php

示例6: store

 /**
  * Retireve a list of currencies from the database.
  *
  * This is written to get a list for selecting currencies. Therefore it asks for enabled
  * @author Max Milbers
  * @return object List of currency objects
  */
 function store(&$data)
 {
     if (!vmAccess::manager('language')) {
         vmWarn('Insufficient permissions to store language');
         return false;
     }
     return parent::store($data);
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:15,代码来源:language.php

示例7: store

 /**
  * Retireve a list of currencies from the database.
  *
  * This is written to get a list for selecting currencies. Therefore it asks for enabled
  * @author Max Milbers
  * @return object List of currency objects
  */
 function store(&$data)
 {
     if (!vmAccess::manager('hotel')) {
         vmWarn('Insufficient permissions to store hotel');
         return false;
     }
     $db = JFactory::getDbo();
     $tsmart_hotel_addon_id = parent::store($data);
     if ($tsmart_hotel_addon_id) {
         //inser to excusionaddon
         $query = $db->getQuery(true);
         $query->delete('#__tsmart_tour_id_hotel_addon_id')->where('tsmart_hotel_addon_id=' . (int) $tsmart_hotel_addon_id);
         $db->setQuery($query)->execute();
         $err = $db->getErrorMsg();
         if (!empty($err)) {
             vmError('can not delete tour in hotel_addon', $err);
         }
         $list_tour_id = $data['list_tour_id'];
         foreach ($list_tour_id as $tsmart_product_id) {
             $query->clear()->insert('#__tsmart_tour_id_hotel_addon_id')->set('tsmart_product_id=' . (int) $tsmart_product_id)->set('tsmart_hotel_addon_id=' . (int) $tsmart_hotel_addon_id);
             $db->setQuery($query)->execute();
             $err = $db->getErrorMsg();
             if (!empty($err)) {
                 vmError('can not insert tour in this hotel_addon', $err);
             }
         }
         $hotel_addon_type = $data['hotel_addon_type'];
         $hotel_addon_date_price_table = $this->getTable('hotel_addon_date_price');
         //end insert group size
         $data_price = $data['data_price'];
         $data_price = base64_decode($data_price);
         require_once JPATH_ROOT . '/libraries/upgradephp-19/upgrade.php';
         $data_price = up_json_decode($data_price, false, 512, JSON_PARSE_JAVASCRIPT);
         $item_mark_up_type = $data_price->item_mark_up_type;
         foreach ($list_tour_id as $tour_id) {
             $vail_from = JFactory::getDate($data['vail_from']);
             $vail_to = JFactory::getDate($data['vail_to']);
             $single_room = $data_price->items->single_room;
             $double_twin_room = $data_price->items->double_twin_room;
             $triple_room = $data_price->items->triple_room;
             while ($vail_from->getTimestamp() <= $vail_to->getTimestamp()) {
                 $date = $vail_from->format('Y-m-d');
                 $hotel_addon_date_price_table->id = 0;
                 $hotel_addon_date_price_table->jload(array('date' => $date, 'tsmart_product_id' => $tour_id, 'hotel_addon_type' => $hotel_addon_type));
                 $hotel_addon_date_price_table->date = $date;
                 $hotel_addon_date_price_table->tsmart_hotel_addon_id = $tsmart_hotel_addon_id;
                 $hotel_addon_date_price_table->tsmart_product_id = $tour_id;
                 $hotel_addon_date_price_table->hotel_addon_type = $hotel_addon_type;
                 $hotel_addon_date_price_table->single_room_net_price = $single_room->net_price;
                 $hotel_addon_date_price_table->doulble_twin_room_net_price = $double_twin_room->net_price;
                 $hotel_addon_date_price_table->triple_room_net_price = $triple_room->net_price;
                 //tax
                 $hotel_addon_date_price_table->single_room_tax = $single_room->tax;
                 $hotel_addon_date_price_table->doulble_twin_room_tax = $double_twin_room->tax;
                 $hotel_addon_date_price_table->triple_room_tax = $triple_room->tax;
                 if ($item_mark_up_type == 'percent') {
                     $hotel_addon_date_price_table->single_room_mark_up_percent = $single_room->mark_up_percent;
                     $hotel_addon_date_price_table->doulble_twin_room_mark_up_percent = $double_twin_room->mark_up_percent;
                     $hotel_addon_date_price_table->triple_room_mark_up_percent = $triple_room->mark_up_percent;
                 } else {
                     $hotel_addon_date_price_table->single_room_mark_up_amout = $single_room->mark_up_amount;
                     $hotel_addon_date_price_table->doulble_twin_room_mark_up_amount = $double_twin_room->mark_up_amount;
                     $hotel_addon_date_price_table->triple_room_mark_up_amout = $triple_room->mark_up_amount;
                 }
                 $ok = $hotel_addon_date_price_table->store();
                 if (!$ok) {
                     throw new Exception($hotel_addon_date_price_table->getError());
                 }
                 $vail_from->modify('+1 day');
             }
         }
     }
     return $tsmart_hotel_addon_id;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:81,代码来源:hoteladdon.php

示例8: store

 /**
  * Retireve a list of currencies from the database.
  *
  * This is written to get a list for selecting currencies. Therefore it asks for enabled
  * @author Max Milbers
  * @return object List of currency objects
  */
 function store(&$data)
 {
     if (!vmAccess::manager('hotel')) {
         vmWarn('Insufficient permissions to store hotel');
         return false;
     }
     $db = JFactory::getDbo();
     $tsmart_coupon_id = parent::store($data);
     return $tsmart_coupon_id;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:17,代码来源:coupon.php

示例9: store

 /**
  * Retireve a list of currencies from the database.
  *
  * This is written to get a list for selecting currencies. Therefore it asks for enabled
  * @author Max Milbers
  * @return object List of currency objects
  */
 function store(&$data)
 {
     $db = JFactory::getDbo();
     if (!vmAccess::manager('transferaddon')) {
         vmWarn('Insufficient permissions to store transferaddon');
         return false;
     }
     $tsmart_transfer_addon_id = parent::store($data);
     if ($tsmart_transfer_addon_id) {
         //inser to excusionaddon
         $query = $db->getQuery(true);
         $query->delete('#__tsmart_tour_id_transfer_addon_id')->where('tsmart_transfer_addon_id=' . (int) $tsmart_transfer_addon_id);
         $db->setQuery($query)->execute();
         $err = $db->getErrorMsg();
         if (!empty($err)) {
             vmError('can not delete tour in transfer_addon', $err);
         }
         $list_tour_id = $data['list_tour_id'];
         foreach ($list_tour_id as $tsmart_product_id) {
             $query->clear()->insert('#__tsmart_tour_id_transfer_addon_id')->set('tsmart_product_id=' . (int) $tsmart_product_id)->set('tsmart_transfer_addon_id=' . (int) $tsmart_transfer_addon_id);
             $db->setQuery($query)->execute();
             $err = $db->getErrorMsg();
             if (!empty($err)) {
                 vmError('can not insert tour in this transfer_addon', $err);
             }
         }
         //end insert group size
     }
     return $tsmart_transfer_addon_id;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:37,代码来源:transferaddon.php

示例10: store

 /**
  * Retireve a list of currencies from the database.
  *
  * This is written to get a list for selecting currencies. Therefore it asks for enabled
  * @author Max Milbers
  * @return object List of currency objects
  */
 function store(&$data)
 {
     $tsmart_promotion_price_id = parent::store($data);
     if ($tsmart_promotion_price_id) {
         $tsmart_product_id = $data['tsmart_product_id'];
         $model_product = $this->getModel('product');
         $product = $model_product->getItem($tsmart_product_id);
         require_once JPATH_ROOT . '/administrator/components/com_tsmart/helpers/tsmgroupsize.php';
         if ($tsmart_promotion_price_id && $product->price_type != tsmGroupSize::FLAT_PRICE) {
             $tour_promotion_price_by_tour_promotion_price_id = $data['tour_promotion_price_by_tour_promotion_price_id'];
             $this->save_promotion_price_group_size_by_promotion_price_id($tour_promotion_price_by_tour_promotion_price_id, $tsmart_promotion_price_id);
             $amount = $data['amount']->markup_promotion_price;
             $percent = $data['percent']->markup_promotion_price;
             $this->save_markup_promotion_price($amount, $percent, $tsmart_promotion_price_id);
             $amount = $data['amount']->net_markup_promotion_price;
             $percent = $data['percent']->net_markup_promotion_price;
             $this->save_net_markup_promotion_price($amount, $percent, $tsmart_promotion_price_id);
         } else {
             $tour_promotion_price_by_tour_promotion_price_id = $data['tour_promotion_price_by_tour_promotion_price_id'];
             $this->save_promotion_price_group_size_by_promotion_price_id_tour_private($tour_promotion_price_by_tour_promotion_price_id, $tsmart_promotion_price_id);
             $amount = $data['amount']->mark_up;
             $percent = $data['percent']->promotion;
             $this->save_markup_promotion_price($amount, $percent, $tsmart_promotion_price_id);
             $amount = $data['amount']->mark_up;
             $percent = $data['percent']->promotion;
             $this->save_net_markup_promotion_price($amount, $percent, $tsmart_promotion_price_id);
         }
     }
     return $tsmart_promotion_price_id;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:37,代码来源:promotion.php

示例11: store

 public function store(&$data)
 {
     $return = parent::store($data);
     // TODO: Change the autogenerated stub
     return $return;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:6,代码来源:dateavailability.php

示例12: store

 /**
  * Retireve a list of currencies from the database.
  *
  * This is written to get a list for selecting currencies. Therefore it asks for enabled
  * @author Max Milbers
  * @return object List of currency objects
  */
 function store(&$data)
 {
     if (!vmAccess::manager('accommodation')) {
         vmWarn('Insufficient permissions to store accommodation');
         return false;
     }
     $tsmart_accommodation_id = parent::store($data);
     if ($tsmart_accommodation_id) {
         $list_hotel_service_class = $data['list_hotel_service_class'];
         foreach ($list_hotel_service_class as $tsmart_service_class_id => $list_hotel) {
             $query = $this->_db->getQuery(true);
             $query->delete('#__tsmart_hotel_id_service_class_id_accommodation_id')->where('tsmart_service_class_id=' . (int) $tsmart_service_class_id)->where('tsmart_accommodation_id=' . (int) $tsmart_accommodation_id);
             $this->_db->setQuery($query);
             $ok = $this->_db->execute();
             if (!$ok) {
                 throw new Exception($this->_db->getErrorMsg());
             }
             foreach ($list_hotel as $key => $tsmart_hotel_id) {
                 if (!is_numeric($key)) {
                     $key = explode(':', $key);
                     $key = $key[1];
                 } else {
                     $key = 0;
                 }
                 $tsmart_service_class_id = $tsmart_service_class_id ? $tsmart_service_class_id : 0;
                 $tsmart_hotel_id = $tsmart_hotel_id ? $tsmart_hotel_id : 0;
                 $table_hotel_id_service_class_id_accommodation_id = $this->getTable('hotel_id_service_class_id_accommodation_id');
                 $table_hotel_id_service_class_id_accommodation_id->tsmart_service_class_id = $tsmart_service_class_id;
                 $table_hotel_id_service_class_id_accommodation_id->tsmart_hotel_id = $tsmart_hotel_id;
                 $table_hotel_id_service_class_id_accommodation_id->tsmart_accommodation_id = $tsmart_accommodation_id;
                 if ($tsmart_hotel_id && $tsmart_service_class_id && $tsmart_accommodation_id) {
                     $table_hotel_id_service_class_id_accommodation_id->store(true);
                 }
                 $errors = $table_hotel_id_service_class_id_accommodation_id->getErrors();
                 if (count($errors)) {
                     throw new Exception($table_hotel_id_service_class_id_accommodation_id->getError());
                 }
             }
         }
     }
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:48,代码来源:accommodation.php


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