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


PHP ilDateTimeInputGUI::setPostVar方法代码示例

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


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

示例1: showStatistics

 public function showStatistics()
 {
     global $rbacsystem, $ilToolbar, $ilObjDataCache;
     // MINIMUM ACCESS LEVEL = 'read'
     /*	if(!$rbacsystem->checkAccess('read', $this->getRefId()))
     		{
     			$this->ilias->raiseError($this->lng->txt('msg_no_perm_read'),$this->ilias->error_obj->MESSAGE);
     		}
     	*/
     $ilToolbar->addButton($this->lng->txt('paya_add_customer'), $this->ctrl->getLinkTarget($this, 'showObjectSelector'));
     if (!$_POST['show_filter'] && $_POST['updateView'] == '1') {
         $this->resetFilter();
     } else {
         if ($_POST['updateView'] == 1) {
             $_SESSION['pay_statistics']['show_filter'] = $_POST['show_filter'];
             $_SESSION['pay_statistics']['updateView'] = true;
             $_SESSION['pay_statistics']['until_check'] = $_POST['until_check'];
             $_SESSION['pay_statistics']['from_check'] = $_POST['from_check'];
             $_SESSION['pay_statistics']['transaction_type'] = isset($_POST['transaction_type']) ? $_POST['transaction_type'] : '';
             $_SESSION['pay_statistics']['transaction_value'] = isset($_POST['transaction_value']) ? $_POST['transaction_value'] : '';
             $_SESSION['pay_statistics']['filter_title_id'] = (int) $_POST['filter_title_id'];
             if ($_SESSION['pay_statistics']['from_check'] == '1') {
                 $_SESSION['pay_statistics']['from']['date']['d'] = $_POST['from']['date']['d'];
                 $_SESSION['pay_statistics']['from']['date']['m'] = $_POST['from']['date']['m'];
                 $_SESSION['pay_statistics']['from']['date']['y'] = $_POST['from']['date']['y'];
             } else {
                 $_SESSION['pay_statistics']['from']['date']['d'] = '';
                 $_SESSION['pay_statistics']['from']['date']['m'] = '';
                 $_SESSION['pay_statistics']['from']['date']['y'] = '';
             }
             if ($_SESSION['pay_statistics']['until_check'] == '1') {
                 $_SESSION['pay_statistics']['til']['date']['d'] = $_POST['til']['date']['d'];
                 $_SESSION['pay_statistics']['til']['date']['m'] = $_POST['til']['date']['m'];
                 $_SESSION['pay_statistics']['til']['date']['y'] = $_POST['til']['date']['y'];
             } else {
                 $_SESSION['pay_statistics']['til']['date']['d'] = '';
                 $_SESSION['pay_statistics']['til']['date']['m'] = '';
                 $_SESSION['pay_statistics']['til']['date']['y'] = '';
             }
             $_SESSION['pay_statistics']['payed'] = $_POST['payed'];
             $_SESSION['pay_statistics']['access'] = $_POST['access'];
             $_SESSION['pay_statistics']['pay_method'] = $_POST['pay_method'];
             $_SESSION['pay_statistics']['customer'] = isset($_POST['customer']) ? $_POST['customer'] : '';
             $_SESSION['pay_statistics']['vendor'] = isset($_POST['vendor']) ? $_POST['vendor'] : '';
         }
     }
     $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment');
     include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     // FILTER FORM
     $filter_form = new ilPropertyFormGUI();
     $filter_form->setFormAction($this->ctrl->getFormAction($this));
     $filter_form->setTitle($this->lng->txt('pay_filter'));
     $filter_form->setId('formular');
     $filter_form->setTableWidth('100 %');
     $o_hide_check = new ilCheckBoxInputGUI($this->lng->txt('show_filter'), 'show_filter');
     $o_hide_check->setValue(1);
     $o_hide_check->setChecked($_SESSION['pay_statistics']['show_filter'] ? 1 : 0);
     $o_hidden = new ilHiddenInputGUI('updateView');
     $o_hidden->setValue(1);
     $o_hidden->setPostVar('updateView');
     $o_hide_check->addSubItem($o_hidden);
     $o_transaction_type = new ilSelectInputGUI();
     $trans_option = array($this->lng->txt('pay_starting'), $this->lng->txt('pay_ending'));
     $trans_value = array('0', '1');
     $o_transaction_type->setTitle($this->lng->txt('paya_transaction'));
     $o_transaction_type->setOptions($trans_option);
     $o_transaction_type->setValue($_SESSION['pay_statistics']['transaction_type']);
     $o_transaction_type->setPostVar('transaction_type');
     $o_hide_check->addSubItem($o_transaction_type);
     $o_transaction_val = new ilTextInputGUI();
     $o_transaction_val->setValue($_SESSION['pay_statistics']['transaction_value']);
     $o_transaction_val->setPostVar('transaction_value');
     $o_hide_check->addSubItem($o_transaction_val);
     $o_customer = new ilTextInputGUI();
     $o_customer->setTitle($this->lng->txt('paya_customer'));
     $o_customer->setValue($_SESSION['pay_statistics']['customer']);
     $o_customer->setPostVar('customer');
     $o_hide_check->addSubItem($o_customer);
     $o_vendor = new ilTextInputGUI();
     $o_vendor->setTitle($this->lng->txt('paya_vendor'));
     $o_vendor->setValue($_SESSION['pay_statistics']['vendor']);
     $o_vendor->setPostVar('vendor');
     $o_hide_check->addSubItem($o_vendor);
     $o_from_check = new ilCheckBoxInputGUI($this->lng->txt('pay_order_date_from'), 'from_check');
     $o_from_check->setValue(1);
     $o_from_check->setChecked($_SESSION['pay_statistics']['from_check'] ? 1 : 0);
     $o_date_from = new ilDateTimeInputGUI();
     $o_date_from->setPostVar('from');
     $_POST['from'] = $_SESSION['pay_statistics']['from'];
     if ($_SESSION['pay_statistics']['from_check'] == '1') {
         $o_date_from->checkInput();
     }
     $o_from_check->addSubItem($o_date_from);
     $o_hide_check->addSubItem($o_from_check);
     $o_until_check = new ilCheckBoxInputGUI($this->lng->txt('pay_order_date_til'), 'until_check');
     $o_until_check->setValue(1);
     $o_until_check->setChecked($_SESSION['pay_statistics']['until_check'] ? 1 : 0);
     $o_date_until = new ilDateTimeInputGUI();
     $o_date_until->setPostVar('til');
     $_POST['til'] = $_SESSION['pay_statistics']['til'];
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilPaymentStatisticGUI.php

示例2: editPriceObject

 public function editPriceObject()
 {
     $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment');
     $price_id = $_GET['price_id'] ? $_GET['price_id'] : $_POST['price_id'];
     $price = ilPaymentPrices::_getPrice($price_id);
     $this->ctrl->setParameter($this, 'pobject_id', (int) $_GET['pobject_id']);
     $tmp_pobject = ilPaymentObject::_getObjectData($_GET['pobject_id']);
     include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this));
     $tmp_obj = ilObjectFactory::getInstanceByRefId($tmp_pobject['ref_id'], false);
     if ($tmp_obj) {
         $form->setTitle($tmp_obj->getTitle());
     } else {
         $form->setTitle($this->lng->txt('object_not_found'));
     }
     //price_type
     $radio_group = new ilRadioGroupInputGUI('', 'price_type');
     $radio_group->setTitle($this->lng->txt('duration'));
     $radio_group->setRequired(true);
     $radio_group->setValue($price['price_type']);
     $radio_group->setPostVar('price_type');
     $radio_option_1 = new ilRadioOption($this->lng->txt('duration_month'), ilPaymentPrices::TYPE_DURATION_MONTH);
     // duration month
     $oDuration = new ilNumberInputGUI();
     $oDuration->setTitle($this->lng->txt('paya_months'));
     $oDuration->setSize('20%');
     $oDuration->setValue($price['duration']);
     $oDuration->setPostVar('duration_month');
     $radio_option_1->addSubItem($oDuration);
     $radio_group->addOption($radio_option_1);
     $radio_option_3 = new ilRadioOption($this->lng->txt('duration_date'), ilPaymentPrices::TYPE_DURATION_DATE);
     // duration_date from
     $o_date_from = new ilDateTimeInputGUI();
     $o_date_from->setTitle($this->lng->txt('cal_from'));
     $o_date_from->setDate(new ilDate($price['duration_from'], IL_CAL_DATE));
     $o_date_from->setPostVar('duration_date_from');
     $radio_option_3->addSubItem($o_date_from);
     // duration_date until
     $o_date_until = new ilDateTimeInputGUI();
     $o_date_until->setTitle($this->lng->txt('cal_until'));
     $o_date_until->setDate(new ilDate($price['duration_until'], IL_CAL_DATE));
     $o_date_until->setPostVar('duration_date_until');
     $radio_option_3->addSubItem($o_date_until);
     $radio_group->addOption($radio_option_3);
     $radio_option_2 = new ilRadioOption($this->lng->txt('unlimited_duration'), ilPaymentPrices::TYPE_UNLIMITED_DURATION);
     $radio_group->addOption($radio_option_2);
     $form->addItem($radio_group);
     // description
     $oDescription = new ilTextAreaInputGUI($this->lng->txt('description'), 'description');
     $oDescription->setRows(4);
     $oDescription->setCols(35);
     $oDescription->setValue($price['description']);
     $form->addItem($oDescription);
     // price
     $oPrice = new ilNumberInputGUI();
     $oPrice->setTitle($this->lng->txt('price_a'));
     $oPrice->setSize('20%');
     $oPrice->setRequired(true);
     $oPrice->setValue($price['price']);
     include_once './Services/Payment/classes/class.ilPaymentSettings.php';
     $genSet = ilPaymentSettings::_getInstance();
     $oPrice->setInfo($genSet->get('currency_unit'));
     $oPrice->setPostVar('price');
     $oPrice->allowDecimals(true);
     $form->addItem($oPrice);
     //extension
     $oExtension = new ilCheckboxInputGUI($this->lng->txt('extension_price'), 'extension');
     $oExtension->setChecked($price['extension']);
     $form->addItem($oExtension);
     $o_hidden_1 = new ilHiddenInputGUI('pobject_id');
     $o_hidden_1->setValue((int) $_GET['pobject_id']);
     $o_hidden_1->setPostVar('pobject_id');
     $o_hidden_2 = new ilHiddenInputGUI('price_id');
     $o_hidden_2->setValue((int) $_GET['price_id']);
     $o_hidden_2->setPostVar('price_id');
     $form->addItem($o_hidden_1);
     $form->addItem($o_hidden_2);
     $form->addCommandButton('updatePrice', $this->lng->txt('save'));
     $form->addCommandButton('editPrices', $this->lng->txt('cancel'));
     $this->tpl->setVariable('FORM', $form->getHTML());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:82,代码来源:class.ilObjPaymentSettingsGUI.php

示例3: addCoupon

 public function addCoupon()
 {
     $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment');
     if (isset($_GET['coupon_id'])) {
         if ($this->error == '') {
             $this->coupon_obj->getCouponById($_GET['coupon_id']);
         }
         $this->ctrl->setParameter($this, 'coupon_id', $this->coupon_obj->getId());
         $this->__showButtons();
     }
     $oForm = new ilPropertyFormGUI();
     $oForm->setId('frm_add_coupon');
     $oForm->setFormAction($this->ctrl->getFormAction($this, 'saveCouponForm'));
     $oForm->setTitle($this->coupon_obj->getId() ? $this->lng->txt('paya_coupons_edit') : $this->lng->txt('paya_coupons_add'));
     // Title
     $oTitle = new ilTextInputGUI($this->lng->txt(paya_coupons_title), 'title');
     $oTitle->setValue($this->coupon_obj->getTitle());
     $oTitle->setRequired(true);
     $oForm->addItem($oTitle);
     // Description
     $oDescription = new ilTextAreaInputGUI($this->lng->txt(paya_coupons_description), 'description');
     $oDescription->setValue($this->coupon_obj->getDescription());
     $oForm->addItem($oDescription);
     // Type
     $o_coupon_type = new ilSelectInputGUI();
     $coupon_option = array('fix' => $this->lng->txt('paya_coupons_fix'), 'percent' => $this->lng->txt('paya_coupons_percentaged'));
     $o_coupon_type->setTitle($this->lng->txt('coupon_type'));
     $o_coupon_type->setOptions($coupon_option);
     $o_coupon_type->setValue($this->coupon_obj->getType());
     $o_coupon_type->setRequired(true);
     $o_coupon_type->setPostVar('coupon_type');
     $oForm->addItem($o_coupon_type);
     // Value
     $o_coupon_value = new ilNumberInputGUI($this->lng->txt('paya_coupons_value'), 'coupon_value');
     $o_coupon_value->setSize(5);
     $o_coupon_value->allowDecimals(true);
     $o_coupon_value->setValue($this->coupon_obj->getValue());
     $o_coupon_value->setRequired(true);
     $oForm->addItem($o_coupon_value);
     // Date Valid From
     $o_from_check = new ilCheckBoxInputGUI($this->lng->txt('paya_coupons_from'), 'from_check');
     $o_from_check->setValue(1);
     $o_from_check->setChecked($this->coupon_obj->getFromDateEnabled() ? 1 : 0);
     $o_date_from = new ilDateTimeInputGUI();
     $o_date_from->setPostVar('from');
     $from_date = explode('-', $this->coupon_obj->getFromDate());
     $date_f['from']['date']['d'] = $from_date[2] != '00' ? $from_date[2] : '';
     $date_f['from']['date']['m'] = $from_date[1] != '00' ? $from_date[1] : '';
     $date_f['from']['date']['y'] = $from_date[0] != '0000' ? $from_date[0] : '';
     $_POST['from'] = $date_f['from'];
     if ($this->coupon_obj->getFromDateEnabled() == '1') {
         $o_date_from->checkInput();
     }
     $o_from_check->addSubItem($o_date_from);
     $oForm->addItem($o_from_check);
     // Date Valid Until
     $o_until_check = new ilCheckBoxInputGUI($this->lng->txt('paya_coupons_till'), 'until_check');
     $o_until_check->setValue(1);
     $o_until_check->setChecked($this->coupon_obj->getTillDateEnabled() ? 1 : 0);
     $o_date_until = new ilDateTimeInputGUI();
     $o_date_until->setPostVar('til');
     $till_date = explode('-', $this->coupon_obj->getTillDate());
     $date_t['til']['date']['d'] = $till_date[2] != '00' ? $till_date[2] : '';
     $date_t['til']['date']['m'] = $till_date[1] != '00' ? $till_date[1] : '';
     $date_t['til']['date']['y'] = $till_date[0] != '0000' ? $till_date[0] : '';
     $_POST['til'] = $date_t['til'];
     if ($this->coupon_obj->getTillDateEnabled() == '1') {
         $o_date_until->checkInput();
     }
     $o_until_check->addSubItem($o_date_until);
     $oForm->addItem($o_until_check);
     $o_usage = new ilNumberInputGUI($this->lng->txt('paya_coupons_availability'), 'usage');
     $o_usage->setSize(5);
     $o_usage->setValue($this->coupon_obj->getUses());
     $oForm->addItem($o_usage);
     $oForm->addCommandButton('saveCouponForm', $this->lng->txt('save'));
     $oForm->addCommandButton('showCoupons', $this->lng->txt('cancel'));
     $this->tpl->setVariable('FORM', $oForm->getHTML());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:79,代码来源:class.ilPaymentCouponGUI.php


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