• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP format4Datepicker函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中format4Datepicker函数的典型用法代码示例。如果您正苦于以下问题:PHP format4Datepicker函数的具体用法?PHP format4Datepicker怎么用?PHP format4Datepicker使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: main

 public function main()
 {
     //init controller data
     $this->extensions->hk_InitData($this, __FUNCTION__);
     $grid_settings = array('table_id' => 'report_sales_grid', 'url' => $this->html->getSecureURL('listing_grid/report_sale'), 'sortname' => 'date_end', 'columns_search' => false, 'multiselect' => 'false');
     $form = new AForm();
     $form->setForm(array('form_name' => 'report_sales_grid_search'));
     $this->data['grid_search_form'] = array();
     $this->data['grid_search_form']['id'] = 'report_sales_grid_search';
     $this->data['grid_search_form']['form_open'] = $form->getFieldHtml(array('type' => 'form', 'name' => 'report_sales_grid_search', 'action' => ''));
     $this->data['grid_search_form']['submit'] = $form->getFieldHtml(array('type' => 'button', 'name' => 'submit', 'text' => $this->language->get('button_go'), 'style' => 'button1'));
     $this->data['grid_search_form']['reset'] = $form->getFieldHtml(array('type' => 'button', 'name' => 'reset', 'text' => $this->language->get('button_reset'), 'style' => 'button2'));
     $this->view->assign('js_date_format', format4Datepicker($this->language->get('date_format_short')));
     $this->data['grid_search_form']['fields']['date_start'] = $form->getFieldHtml(array('type' => 'input', 'name' => 'date_start', 'default' => dateInt2Display(strtotime('-7 day'))));
     $this->data['grid_search_form']['fields']['date_end'] = $form->getFieldHtml(array('type' => 'input', 'name' => 'date_end', 'default' => dateInt2Display(time())));
     $groups = array();
     $groups['year'] = $this->language->get('text_year');
     $groups['month'] = $this->language->get('text_month');
     $groups['week'] = $this->language->get('text_week');
     $groups['day'] = $this->language->get('text_day');
     $this->data['grid_search_form']['fields']['status'] = $form->getFieldHtml(array('type' => 'selectbox', 'name' => 'group', 'options' => $groups, 'value' => "week"));
     $grid_settings['search_form'] = true;
     $grid_settings['colNames'] = array($this->language->get('column_date_start'), $this->language->get('column_date_end'), $this->language->get('column_orders'), $this->language->get('column_total'));
     $grid_settings['colModel'] = array(array('name' => 'date_start', 'index' => 'date_start', 'width' => 100, 'align' => 'center', 'sorttype' => 'string'), array('name' => 'date_end', 'index' => 'date_end', 'width' => 100, 'align' => 'center', 'sorttype' => 'string'), array('name' => 'orders', 'index' => 'orders', 'width' => 100, 'align' => 'center', 'sorttype' => 'string'), array('name' => 'total', 'index' => 'total', 'width' => 110, 'align' => 'right'));
     $grid = $this->dispatch('common/listing_grid', array($grid_settings));
     $this->view->assign('listing_grid', $grid->dispatchGetOutput());
     $this->view->assign('search_form', $this->data['grid_search_form']);
     $this->document->setTitle($this->language->get('heading_title'));
     $this->document->initBreadcrumb(array('href' => $this->html->getSecureURL('index/home'), 'text' => $this->language->get('text_home'), 'separator' => FALSE));
     $this->document->addBreadcrumb(array('href' => $this->html->getSecureURL('report/viewed'), 'text' => $this->language->get('heading_title'), 'separator' => ' :: '));
     $this->document->addScript(RDIR_TEMPLATE . 'javascript/jquery/ui/jquery.ui.datepicker.js');
     $this->processTemplate('pages/report/sale.tpl');
     //update controller data
     $this->extensions->hk_UpdateData($this, __FUNCTION__);
 }
开发者ID:harshzalavadiya,项目名称:fatak,代码行数:35,代码来源:sale.php


示例2: main

 public function main()
 {
     //init controller data
     $this->extensions->hk_InitData($this, __FUNCTION__);
     $grid_settings = array('table_id' => 'report_purchased_grid', 'url' => $this->html->getSecureURL('listing_grid/report_purchased'), 'sortname' => 'quantity', 'columns_search' => false, 'multiselect' => 'false', 'search_form' => true);
     $grid_settings['colNames'] = array($this->language->get('column_name'), $this->language->get('column_model'), $this->language->get('column_quantity'), $this->language->get('column_total'));
     $grid_settings['colModel'] = array(array('name' => 'name', 'index' => 'name', 'width' => 300, 'align' => 'left', 'sortable' => false), array('name' => 'model', 'index' => 'model', 'width' => 80, 'align' => 'center', 'sortable' => false), array('name' => 'quantity', 'index' => 'quantity', 'width' => 50, 'align' => 'center', 'sortable' => false), array('name' => 'total', 'index' => 'total', 'width' => 90, 'align' => 'center', 'sortable' => false));
     $grid = $this->dispatch('common/listing_grid', array($grid_settings));
     $this->view->assign('listing_grid', $grid->dispatchGetOutput());
     //prepare the filter form
     //Note: External search form needs to be named [grid_name]_search
     //		In this case it will be auto submited to filter grid
     $form = new AForm();
     $form->setForm(array('form_name' => 'report_purchased_grid_search'));
     $this->data['grid_search_form'] = array();
     $this->data['grid_search_form']['id'] = 'report_purchased_grid_search';
     $this->data['grid_search_form']['form_open'] = $form->getFieldHtml(array('type' => 'form', 'name' => 'report_purchased_grid_search', 'action' => ''));
     $this->data['grid_search_form']['submit'] = $form->getFieldHtml(array('type' => 'button', 'name' => 'submit', 'text' => $this->language->get('button_go'), 'style' => 'button1'));
     $this->view->assign('js_date_format', format4Datepicker($this->language->get('date_format_short')));
     $this->data['grid_search_form']['fields']['date_start'] = $form->getFieldHtml(array('type' => 'input', 'name' => 'date_start', 'default' => dateInt2Display(strtotime('-30 day'))));
     $this->data['grid_search_form']['fields']['date_end'] = $form->getFieldHtml(array('type' => 'input', 'name' => 'date_end', 'default' => dateInt2Display(time())));
     $this->view->assign('search_form', $this->data['grid_search_form']);
     $this->document->initBreadcrumb(array('href' => $this->html->getSecureURL('index/home'), 'text' => $this->language->get('text_home'), 'separator' => FALSE));
     $this->document->addBreadcrumb(array('href' => $this->html->getSecureURL('report/purchased'), 'text' => $this->language->get('heading_title'), 'separator' => ' :: ', 'current' => true));
     $this->document->setTitle($this->language->get('heading_title'));
     $this->processTemplate('pages/report/purchased.tpl');
     //update controller data
     $this->extensions->hk_UpdateData($this, __FUNCTION__);
 }
开发者ID:siddht1,项目名称:abantecart-src,代码行数:29,代码来源:purchased.php


示例3: main

 public function main()
 {
     //init controller data
     $this->extensions->hk_InitData($this, __FUNCTION__);
     $grid_settings = array('table_id' => 'report_shipping_grid', 'url' => $this->html->getSecureURL('listing_grid/report_sale/shipping'), 'sortname' => 'date_end', 'columns_search' => false, 'multiselect' => 'false');
     $form = new AForm();
     $form->setForm(array('form_name' => 'report_shipping_grid_search'));
     $this->data['grid_search_form'] = array();
     $this->data['grid_search_form']['id'] = 'report_shipping_grid_search';
     $this->data['grid_search_form']['form_open'] = $form->getFieldHtml(array('type' => 'form', 'name' => 'report_shipping_grid_search', 'action' => ''));
     $this->data['grid_search_form']['submit'] = $form->getFieldHtml(array('type' => 'button', 'name' => 'submit', 'text' => $this->language->get('button_go'), 'style' => 'button1'));
     $this->view->assign('js_date_format', format4Datepicker($this->language->get('date_format_short')));
     $this->data['grid_search_form']['fields']['date_start'] = $form->getFieldHtml(array('type' => 'input', 'name' => 'date_start', 'default' => dateInt2Display(strtotime('-7 day'))));
     $this->data['grid_search_form']['fields']['date_end'] = $form->getFieldHtml(array('type' => 'input', 'name' => 'date_end', 'default' => dateInt2Display(time())));
     $groups = array();
     $groups['year'] = $this->language->get('text_year');
     $groups['month'] = $this->language->get('text_month');
     $groups['week'] = $this->language->get('text_week');
     $groups['day'] = $this->language->get('text_day');
     $this->data['grid_search_form']['fields']['group'] = $form->getFieldHtml(array('type' => 'selectbox', 'name' => 'group', 'options' => $groups, 'value' => "week"));
     $this->loadModel('localisation/order_status');
     $results = $this->model_localisation_order_status->getOrderStatuses();
     $statuses = array('' => $this->language->get('text_all_orders'));
     foreach ($results as $item) {
         $statuses[$item['order_status_id']] = $item['name'];
     }
     $this->data['grid_search_form']['fields']['status'] = $form->getFieldHtml(array('type' => 'selectbox', 'name' => 'order_status', 'options' => $statuses, 'placeholder' => $this->language->get('text_select_status')));
     $grid_settings['search_form'] = true;
     $grid_settings['colNames'] = array($this->language->get('column_date_start'), $this->language->get('column_date_end'), $this->language->get('column_orders'), $this->language->get('column_total'));
     $grid_settings['colModel'] = array(array('name' => 'date_start', 'index' => 'date_start', 'width' => 100, 'align' => 'center', 'sorttype' => 'string'), array('name' => 'date_end', 'index' => 'date_end', 'width' => 100, 'align' => 'center', 'sorttype' => 'string'), array('name' => 'orders', 'index' => 'orders', 'width' => 100, 'align' => 'center'), array('name' => 'total', 'index' => 'total', 'width' => 110, 'align' => 'center'));
     $grid = $this->dispatch('common/listing_grid', array($grid_settings));
     $this->view->assign('listing_grid', $grid->dispatchGetOutput());
     $this->view->assign('search_form', $this->data['grid_search_form']);
     $this->document->setTitle($this->language->get('heading_title'));
     $this->document->initBreadcrumb(array('href' => $this->html->getSecureURL('index/home'), 'text' => $this->language->get('text_home'), 'separator' => FALSE));
     $this->document->addBreadcrumb(array('href' => $this->html->getSecureURL('report/sale/shipping'), 'text' => $this->language->get('heading_title'), 'separator' => ' :: ', 'current' => true));
     $this->processTemplate('pages/report/sale/shipping.tpl');
     //update controller data
     $this->extensions->hk_UpdateData($this, __FUNCTION__);
 }
开发者ID:InquisitiveQuail,项目名称:abantecart-src,代码行数:40,代码来源:shipping.php


示例4: files


//.........这里部分代码省略.........
     }
     if (empty($order_info)) {
         $this->session->data['error'] = $this->language->get('error_order_load');
         $this->redirect($this->html->getSecureURL('sale/order'));
     }
     $this->document->initBreadcrumb(array('href' => $this->html->getSecureURL('index/home'), 'text' => $this->language->get('text_home'), 'separator' => FALSE));
     $this->document->addBreadcrumb(array('href' => $this->html->getSecureURL('sale/order'), 'text' => $this->language->get('heading_title'), 'separator' => ' :: '));
     $this->document->addBreadcrumb(array('href' => $this->html->getSecureURL('sale/order/files', '&order_id=' . $this->request->get['order_id']), 'text' => $this->language->get('heading_title') . ' #' . $order_info['order_id'], 'separator' => ' :: '));
     if (isset($this->session->data['success'])) {
         $this->data['success'] = $this->session->data['success'];
         unset($this->session->data['success']);
     } else {
         $this->data['success'] = '';
     }
     $this->data['heading_title'] = $this->language->get('heading_title') . ' #' . $order_info['order_id'];
     $this->data['token'] = $this->session->data['token'];
     $this->data['invoice'] = $this->html->getSecureURL('sale/invoice', '&order_id=' . (int) $this->request->get['order_id']);
     $this->data['button_invoice'] = $this->html->buildButton(array('name' => 'btn_invoice', 'text' => $this->language->get('text_invoice'), 'style' => 'button3'));
     $this->data['invoice_generate'] = $this->html->getSecureURL('sale/invoice/generate');
     $this->data['category_products'] = $this->html->getSecureURL('product/product/category');
     $this->data['product_update'] = $this->html->getSecureURL('catalog/product/update');
     $this->data['order_id'] = $this->request->get['order_id'];
     $this->data['action'] = $this->html->getSecureURL('sale/order/files', '&order_id=' . $this->request->get['order_id']);
     $this->data['cancel'] = $this->html->getSecureURL('sale/order');
     $this->_initTabs('files');
     $this->loadModel('localisation/order_status');
     $status = $this->model_localisation_order_status->getOrderStatus($order_info['order_status_id']);
     if ($status) {
         $this->data['order_status'] = $status['name'];
     } else {
         $this->data['order_status'] = '';
     }
     $this->loadModel('sale/customer_group');
     $customer_group_info = $this->model_sale_customer_group->getCustomerGroup($order_info['customer_group_id']);
     if ($customer_group_info) {
         $this->data['customer_group'] = $customer_group_info['name'];
     } else {
         $this->data['customer_group'] = '';
     }
     $this->data['form_title'] = $this->language->get('edit_title_files');
     $this->data['update'] = $this->html->getSecureURL('listing_grid/order/update_field', '&id=' . $this->request->get['order_id']);
     $form = new AForm('HS');
     $form->setForm(array('form_name' => 'orderFrm', 'update' => $this->data['update']));
     $this->data['form']['id'] = 'orderFrm';
     $this->data['form']['form_open'] = $form->getFieldHtml(array('type' => 'form', 'name' => 'orderFrm', 'attr' => 'confirm-exit="true"', 'action' => $this->data['action']));
     $this->data['form']['submit'] = $form->getFieldHtml(array('type' => 'button', 'name' => 'submit', 'text' => $this->language->get('button_save'), 'style' => 'button1'));
     $this->data['form']['cancel'] = $form->getFieldHtml(array('type' => 'button', 'name' => 'cancel', 'text' => $this->language->get('button_cancel'), 'style' => 'button2'));
     $this->addChild('pages/sale/order_summary', 'summary_form', 'pages/sale/order_summary.tpl');
     /** ORDER DOWNLOADS */
     $this->data['downloads'] = array();
     $order_downloads = $this->model_sale_order->getOrderDownloads($this->request->get['order_id']);
     if ($order_downloads) {
         $rl = new AResource('image');
         if (!$this->registry->has('jqgrid_script')) {
             $locale = $this->session->data['language'];
             if (!file_exists(DIR_ROOT . '/' . RDIR_TEMPLATE . 'javascript/jqgrid/js/i18n/grid.locale-' . $locale . '.js')) {
                 $locale = 'en';
             }
             $this->document->addScript(RDIR_TEMPLATE . 'javascript/jqgrid/js/i18n/grid.locale-' . $locale . '.js');
             $this->document->addScript(RDIR_TEMPLATE . 'javascript/jqgrid/js/jquery.jqGrid.min.js');
             $this->document->addScript(RDIR_TEMPLATE . 'javascript/jqgrid/plugins/jquery.grid.fluid.js');
             $this->document->addScript(RDIR_TEMPLATE . 'javascript/jqgrid/js/jquery.ba-bbq.min.js');
             $this->document->addScript(RDIR_TEMPLATE . 'javascript/jqgrid/js/grid.history.js');
             //set flag to not include scripts/css twice
             $this->registry->set('jqgrid_script', true);
         }
         $this->session->data['multivalue_excludes'] = array();
         $this->loadModel('catalog/download');
         foreach ($order_downloads as $product_id => $order_download) {
             $downloads = (array) $order_download['downloads'];
             $this->data['order_downloads'][$product_id]['product_name'] = $order_download['product_name'];
             $this->data['order_downloads'][$product_id]['product_thumbnail'] = $rl->getMainThumb('products', $product_id, $this->config->get('config_image_grid_width'), $this->config->get('config_image_grid_height'));
             foreach ($downloads as $download_info) {
                 $download_info['order_status_id'] = $order_info['order_status_id'];
                 $attributes = $this->download->getDownloadAttributesValuesForDisplay($download_info['download_id']);
                 $order_product_id = $download_info['order_product_id'];
                 $is_file = $this->download->isFileAvailable($download_info['filename']);
                 foreach ($download_info['download_history'] as &$h) {
                     $h['time'] = dateISO2Display($h['time'], $this->language->get('date_format_short') . ' ' . $this->language->get('time_format'));
                 }
                 unset($h);
                 $status_text = $this->model_catalog_download->getTextStatusForOrderDownload($download_info);
                 if ($status_text) {
                     $status = $status_text;
                 } else {
                     $status = $form->getFieldHtml(array('type' => 'checkbox', 'name' => 'downloads[' . (int) $download_info['order_download_id'] . '][status]', 'value' => $download_info['status'], 'style' => 'btn_switch'));
                 }
                 $this->data['order_downloads'][$product_id]['downloads'][] = array('name' => $download_info['name'], 'attributes' => $attributes, 'href' => $this->html->getSecureURL('catalog/product_files', '&product_id=' . $product_id . '&download_id=' . $download_info['download_id']), 'resource' => $download_info['filename'], 'is_file' => $is_file, 'mask' => $download_info['mask'], 'status' => $status, 'remaining' => $form->getFieldHtml(array('type' => 'input', 'name' => 'downloads[' . (int) $download_info['order_download_id'] . '][remaining_count]', 'value' => $download_info['remaining_count'], 'placeholder' => '-', 'style' => 'small-field')), 'expire_date' => $form->getFieldHtml(array('type' => 'date', 'name' => 'downloads[' . (int) $download_info['order_download_id'] . '][expire_date]', 'value' => $download_info['expire_date'] ? dateISO2Display($download_info['expire_date']) : '', 'default' => '', 'dateformat' => format4Datepicker($this->language->get('date_format_short')), 'highlight' => 'future', 'style' => 'medium-field')), 'download_history' => $download_info['download_history']);
                 // exclude downloads from multivalue list. why we need relate recursion?
                 $this->session->data['multivalue_excludes'][] = $download_info['download_id'];
             }
             $this->data['order_downloads'][$product_id]['push'] = $form->getFieldHtml(array('id' => 'popup' . $product_id, 'type' => 'multivalue', 'name' => 'popup' . $product_id, 'title' => $this->language->get('text_select_from_list'), 'selected_name' => 'push[' . $order_product_id . ']', 'selected' => "{}", 'content_url' => $this->html->getSecureUrl('catalog/download_listing', '&form_name=orderFrm&multivalue_hidden_id=popup' . $product_id), 'postvars' => '', 'return_to' => '', 'popup_height' => 708, 'text' => array('selected' => $this->language->get('text_count_selected'), 'edit' => $this->language->get('text_save_edit'), 'apply' => $this->language->get('text_apply'), 'save' => $this->language->get('text_add'), 'reset' => $this->language->get('button_reset'))));
         }
     }
     $this->view->batchAssign($this->data);
     $this->view->assign('help_url', $this->gen_help_url('order_files'));
     $this->processTemplate('pages/sale/order_files.tpl');
     //update controller data
     $this->extensions->hk_UpdateData($this, __FUNCTION__);
 }
开发者ID:harshzalavadiya,项目名称:fatak,代码行数:101,代码来源:order.php


示例5: _getForm

 private function _getForm()
 {
     if (isset($this->session->data['warning'])) {
         $this->data['error_warning'] = $this->session->data['warning'];
         $this->session->data['warning'] = '';
     } else {
         $this->data['error_warning'] = '';
     }
     $this->view->assign('success', $this->session->data['success']);
     if (isset($this->session->data['success'])) {
         unset($this->session->data['success']);
     }
     $this->document->initBreadcrumb(array('href' => $this->html->getSecureURL('index/home'), 'text' => $this->language->get('text_home'), 'separator' => FALSE));
     $this->document->addBreadcrumb(array('href' => $this->html->getSecureURL('extension/banner_manager'), 'text' => $this->language->get('banner_manager_name'), 'separator' => ' :: '));
     $this->data['cancel'] = $this->html->getSecureURL('extension/banner_manager');
     $banner_type = 1;
     if (!isset($this->request->get['banner_id'])) {
         if ($this->request->get['banner_type']) {
             $banner_type = $this->request->get['banner_type'];
         } elseif ($this->request->post['banner_type']) {
             $banner_type = $this->request->post['banner_type'];
         }
         $this->data['action'] = $this->html->getSecureURL('extension/banner_manager/insert');
         $this->data['form_title'] = $this->language->get('text_create');
         $this->data['update'] = '';
         $form = new AForm('ST');
     } else {
         $this->data['action'] = $this->html->getSecureURL('extension/banner_manager/edit', '&banner_id=' . $this->request->get['banner_id']);
         $this->data['form_title'] = $this->language->get('text_edit') . ' ' . $this->data['name'];
         $this->data['update'] = $this->html->getSecureURL('listing_grid/banner_manager/update_field', '&banner_id=' . $this->request->get['banner_id']);
         $form = new AForm('HS');
         $this->data['button_details'] = $this->html->buildElement(array('type' => 'button', 'name' => 'btn_details', 'href' => $this->html->getSecureUrl('extension/banner_manager_stat/details', '&banner_id=' . $this->request->get['banner_id']), 'text' => $this->language->get('text_view_stat')));
         $banner_type = $this->data['banner_type'];
     }
     if ($banner_type == 1) {
         $this->data['banner_types'] = array('text' => $this->language->get('text_graphic_banner'), 'icon' => '<i class="fa fa-file-image-o fa-fw"></i>');
     } else {
         $this->data['banner_types'] = array('text' => $this->language->get('text_text_banner'), 'icon' => '<i class="fa fa-file-text-o fa-fw"></i>');
     }
     $this->document->addBreadcrumb(array('href' => $this->data['action'], 'text' => $this->data['form_title'], 'separator' => ' :: ', 'current' => true));
     $form->setForm(array('form_name' => 'BannerFrm', 'update' => $this->data['update']));
     $this->data['form']['form_open'] = $form->getFieldHtml(array('type' => 'form', 'name' => 'BannerFrm', 'attr' => 'data-confirm-exit="true" class="aform form-horizontal"', 'action' => $this->data['action']));
     $this->data['form']['hidden_fields']['type'] = $form->getFieldHtml(array('type' => 'hidden', 'name' => 'banner_type', 'value' => $banner_type));
     $this->data['form']['submit'] = $form->getFieldHtml(array('type' => 'button', 'name' => 'submit', 'text' => $this->language->get('button_save')));
     $this->data['form']['cancel'] = $form->getFieldHtml(array('type' => 'button', 'name' => 'cancel', 'text' => $this->language->get('button_cancel')));
     //check if banner is active based on dates and update status
     $now = time();
     if (dateISO2Int($this->data['start_date']) > $now) {
         $this->data['status'] = 0;
     }
     $stop = dateISO2Int($this->data['end_date']);
     if ($stop > 0 && $stop < $now) {
         $this->data['status'] = 0;
     }
     $this->data['form']['fields']['status'] = $form->getFieldHtml(array('type' => 'checkbox', 'name' => 'status', 'value' => $this->data['status'], 'style' => 'btn_switch'));
     $this->data['form']['text']['status'] = $this->language->get('entry_banner_status');
     $this->data['form']['fields']['name'] = $form->getFieldHtml(array('type' => 'input', 'name' => 'name', 'value' => $this->data['name'], 'required' => true));
     $this->data['form']['text']['name'] = $this->language->get('entry_banner_name');
     // groups of banners
     $this->loadModel('extension/banner_manager');
     $result = $this->model_extension_banner_manager->getBannerGroups();
     $groups = array('0' => $this->language->get('text_select'), 'new' => $this->language->get('text_add_new_group'));
     if ($result) {
         foreach ($result as $row) {
             $groups[$row['banner_group_name']] = $row['banner_group_name'];
         }
     }
     $value = $this->data['banner_group_name'][0];
     if (!$value && sizeof($groups) == 2) {
         $value = 'new';
     }
     $this->data['form']['fields']['banner_group_name'] = $form->getFieldHtml(array('type' => 'selectbox', 'name' => 'banner_group_name[0]', 'options' => $groups, 'value' => $value, 'required' => true, 'style' => 'no-save'));
     $this->data['form']['text']['banner_group_name'] = $this->language->get('entry_banner_group_name');
     $this->data['form']['fields']['new_banner_group'] = $form->getFieldHtml(array('type' => 'input', 'name' => 'banner_group_name[1]', 'value' => !in_array($this->data['banner_group_name'][1], $groups) ? $this->data['banner_group_name'][1] : '', 'placeholder' => $this->language->get('text_put_new_group'), 'style' => 'no-save'));
     $this->data['new_group_hint'] = $this->language->get('text_put_new_group');
     $this->data['form']['fields']['sort_order'] = $form->getFieldHtml(array('type' => 'input', 'name' => 'sort_order', 'value' => $this->data['sort_order'], 'style' => 'small-field', ''));
     $this->data['form']['text']['sort_order'] = $this->language->get('entry_banner_sort_order');
     if ($banner_type == 1) {
         $this->data['form']['fields']['url'] = $form->getFieldHtml(array('type' => 'input', 'name' => 'target_url', 'value' => $this->data['target_url'], 'required' => true));
         $this->data['form']['text']['url'] = $this->language->get('entry_banner_url');
         $this->data['form']['fields']['blank'] = $form->getFieldHtml(array('type' => 'checkbox', 'name' => 'blank', 'value' => $this->data['blank'], 'style' => 'btn_switch'));
         $this->data['form']['text']['blank'] = $this->language->get('entry_banner_blank');
     }
     $this->data['form']['fields']['date_start'] = $form->getFieldHtml(array('type' => 'date', 'name' => 'start_date', 'value' => dateISO2Display($this->data['start_date']), 'default' => dateNowDisplay(), 'dateformat' => format4Datepicker($this->language->get('date_format_short')), 'highlight' => 'future', 'style' => 'small-field'));
     $this->data['form']['text']['date_start'] = $this->language->get('entry_banner_date_start');
     $this->data['form']['fields']['date_end'] = $form->getFieldHtml(array('type' => 'date', 'name' => 'end_date', 'value' => dateISO2Display($this->data['end_date']), 'default' => '', 'dateformat' => format4Datepicker($this->language->get('date_format_short')), 'highlight' => 'pased', 'style' => 'small-field'));
     $this->data['form']['text']['date_end'] = $this->language->get('entry_banner_date_end');
     $this->data['banner_id'] = $this->request->get['banner_id'] ? $this->request->get['banner_id'] : '-1';
     if ($banner_type == 1) {
         $this->data['form']['fields']['meta'] = $form->getFieldHtml(array('type' => 'textarea', 'name' => 'meta', 'value' => $this->data['meta'], 'attr' => ' style="height: 50px;"'));
         $this->data['form']['text']['meta'] = $this->language->get('entry_banner_meta');
         $this->addChild('responses/common/resource_library/get_resources_html', 'resources_html', 'responses/common/resource_library_scripts.tpl');
         $resources_scripts = $this->dispatch('responses/common/resource_library/get_resources_scripts', array('object_name' => 'banners', 'object_id' => $this->data['banner_id'], 'types' => array('image')));
         $this->view->assign('current_url', $this->html->currentURL());
         $this->view->assign('resources_scripts', $resources_scripts->dispatchGetOutput());
         $this->view->assign('rl', $this->html->getSecureURL('common/resource_library', '&object_name=banners&type=image'));
     } else {
         $this->data['form']['fields']['description'] = $form->getFieldHtml(array('type' => 'textarea', 'name' => 'description', 'value' => $this->data['description'], 'attr' => ''));
         $this->data['form']['text']['description'] = $this->language->get('entry_banner_html');
     }
//.........这里部分代码省略.........
开发者ID:Cali-gula,项目名称:abantecart-src,代码行数:101,代码来源:banner_manager.php


示例6: getHtml

 public function getHtml()
 {
     if (!isset($this->default)) {
         $this->default = '';
     }
     if ($this->value == '' && !empty($this->default)) {
         $this->value = $this->default;
     }
     $this->element_id = preg_replace('/[\\[+\\]+]/', '_', $this->element_id);
     $this->view->batchAssign(array('name' => $this->name, 'id' => $this->element_id, 'type' => 'text', 'value' => str_replace('"', '&quot;', $this->value), 'default' => $this->default, 'attr' => 'aform_field_type="date" ' . $this->attr . ' data-aform-field-type="captcha"', 'required' => $this->required, 'style' => $this->style, 'dateformat' => $this->dateformat ? $this->dateformat : format4Datepicker($this->data['registry']->get('language')->get('date_format_short')), 'highlight' => $this->highlight));
     if (!empty($this->help_url)) {
         $this->view->assign('help_url', $this->help_url);
     }
     $return = $this->view->fetch('form/date.tpl');
     return $return;
 }
开发者ID:harshzalavadiya,项目名称:fatak,代码行数:16,代码来源:html.php


示例7: main

 public function main()
 {
     //init controller data
     $this->extensions->hk_InitData($this, __FUNCTION__);
     $this->loadLanguage('sale/customer');
     $this->loadModel('sale/customer_transaction');
     $this->loadModel('sale/customer');
     $customer_info = $this->model_sale_customer->getCustomer($this->request->get['customer_id']);
     $this->document->setTitle($this->language->get('heading_title_transactions'));
     $this->document->initBreadcrumb(array('href' => $this->html->getSecureURL('index/home'), 'text' => $this->language->get('text_home'), 'separator' => FALSE));
     $this->document->addBreadcrumb(array('href' => $this->html->getSecureURL('sale/customer'), 'text' => $this->language->get('heading_title'), 'separator' => ' :: '));
     $this->document->addBreadcrumb(array('href' => $this->html->getSecureURL('sale/customer/update', '&customer_id=' . $this->request->get['customer_id']), 'text' => $this->language->get('text_edit') . ' ' . $this->language->get('text_customer') . ' - ' . $customer_info['firstname'] . ' ' . $customer_info['lastname'], 'separator' => ' :: '));
     $this->document->addBreadcrumb(array('href' => $this->html->getSecureURL('sale/customer_transaction', '&customer_id=' . $this->request->get['customer_id']), 'text' => $this->language->get('heading_title_transactions'), 'separator' => ' :: '));
     if (isset($this->session->data['error'])) {
         $this->data['error_warning'] = $this->session->data['error'];
         unset($this->session->data['error']);
     } elseif (isset($this->error['warning'])) {
         $this->data['error_warning'] = $this->error['warning'];
     } else {
         $this->data['error_warning'] = '';
     }
     if (isset($this->session->data['success'])) {
         $this->data['success'] = $this->session->data['success'];
         unset($this->session->data['success']);
     } else {
         $this->data['success'] = '';
     }
     $this->data['grid_settings'] = array('table_id' => 'transactions_grid', 'url' => $this->html->getSecureURL('listing_grid/customer_transaction', '&customer_id=' . $this->request->get['customer_id']), 'sortname' => 'create_date', 'sortorder' => 'desc', 'multiselect' => 'false', 'actions' => array('view' => array('text' => $this->language->get('button_view'), 'href' => 'Javascript:void(0);')));
     $this->data['grid_settings']['colNames'] = array($this->language->get('column_create_date'), $this->language->get('column_created_by'), $this->language->get('column_debit'), $this->language->get('column_credit'), $this->language->get('column_transaction_type'));
     $this->data['grid_settings']['colModel'] = array(array('name' => 'create_date', 'index' => 'create_date', 'width' => 120, 'align' => 'center', 'search' => false), array('name' => 'user', 'index' => 'user', 'width' => 140, 'align' => 'left'), array('name' => 'debit', 'index' => 'debit', 'width' => 50, 'align' => 'center'), array('name' => 'credit', 'index' => 'credit', 'width' => 50, 'align' => 'center'), array('name' => 'transaction_type', 'index' => 'transaction_type', 'width' => 110, 'align' => 'center'));
     $form = new AForm();
     $form->setForm(array('form_name' => 'transactions_grid_search'));
     $this->data['grid_search_form'] = array();
     $this->data['grid_search_form']['id'] = 'transactions_grid_search';
     $this->data['grid_search_form']['form_open'] = $form->getFieldHtml(array('type' => 'form', 'name' => 'transactions_grid_search', 'action' => ''));
     $this->data['grid_search_form']['submit'] = $form->getFieldHtml(array('type' => 'button', 'name' => 'submit', 'text' => $this->language->get('button_go'), 'style' => 'button1'));
     $this->data['grid_search_form']['reset'] = $form->getFieldHtml(array('type' => 'button', 'name' => 'reset', 'text' => $this->language->get('button_reset'), 'style' => 'button2'));
     $this->data['js_date_format'] = format4Datepicker($this->language->get('date_format_short'));
     $this->data['grid_search_form']['fields']['date_start'] = $form->getFieldHtml(array('type' => 'input', 'name' => 'date_start', 'default' => dateInt2Display(time())));
     $this->data['grid_search_form']['fields']['date_end'] = $form->getFieldHtml(array('type' => 'input', 'name' => 'date_end', 'default' => dateInt2Display(time())));
     $this->data['grid_settings']['search_form'] = true;
     $grid = $this->dispatch('common/listing_grid', array($this->data['grid_settings']));
     $this->view->assign('listing_grid', $grid->dispatchGetOutput());
     $this->view->assign('search_form', $this->data['grid_search_form']);
     $this->document->setTitle($this->language->get('heading_title_transactions'));
     $this->view->assign('popup_action', $this->html->getSecureURL('listing_grid/customer_transaction/get_transaction_info'));
     $this->view->assign('popup_action_save', $this->html->getSecureURL('listing_grid/customer_transaction/savetransaction'));
     $form = new AForm('HT');
     $form->setForm(array('form_name' => 'transaction_form'));
     $this->data['ajax_form_open'] = (string) $form->getFieldHtml(array('type' => 'form', 'name' => 'transaction_form', 'action' => $this->html->getSecureURL('listing_grid/customer_transaction/savetransaction', '&customer_id=' . $this->request->get['customer_id'])));
     $this->view->assign('help_url', $this->gen_help_url('customer_transactions_listing'));
     $balance = $this->model_sale_customer_transaction->getBalance($this->request->get['customer_id']);
     $currency = $this->currency->getCurrency($this->config->get('config_currency'));
     $this->data['balance'] = $this->language->get('text_balance') . ' ' . $currency['symbol_left'] . round($balance, 2) . $currency['symbol_right'];
     $this->data['button_actas'] = $this->html->buildButton(array('text' => $this->language->get('button_actas'), 'style' => 'button1', 'href' => $this->html->getSecureURL('sale/customer/actonbehalf', '&customer_id=' . $this->request->get['customer_id']), 'target' => 'new'));
     if (has_value($customer_info['orders_count']) && $this->request->get['customer_id']) {
         $this->data['button_orders_count'] = $this->html->buildButton(array('name' => 'view orders', 'text' => $this->language->get('text_order') . ': ' . $customer_info['orders_count'], 'style' => 'button2', 'href' => $this->html->getSecureURL('sale/order', '&customer_id=' . $this->request->get['customer_id']), 'title' => $this->language->get('text_view') . ' ' . $this->language->get('tab_history')));
     }
     $this->view->batchAssign($this->data);
     $this->processTemplate('pages/sale/customer_transaction.tpl');
     //update controller data
     $this->extensions->hk_UpdateData($this, __FUNCTION__);
 }
开发者ID:harshzalavadiya,项目名称:fatak,代码行数:63,代码来源:customer_transaction.php


示例8: _getForm

 private function _getForm()
 {
     $this->data['token'] = $this->session->data['token'];
     $this->data['cancel'] = $this->html->getSecureURL('sale/coupon');
     $this->data['error'] = $this->error;
     $cont_lang_id = $this->language->getContentLanguageID();
     $this->view->assign('category_products_url', $this->html->getSecureURL('r/product/product/category', '&language_id=' . $cont_lang_id));
     $this->document->initBreadcrumb(array('href' => $this->html->getSecureURL('index/home'), 'text' => $this->language->get('text_home'), 'separator' => FALSE));
     $this->document->addBreadcrumb(array('href' => $this->html->getSecureURL('sale/coupon'), 'text' => $this->language->get('heading_title'), 'separator' => ' :: '));
     if (has_value($this->request->get['coupon_id']) && $this->request->is_GET()) {
         $coupon_info = $this->model_sale_coupon->getCouponByID($this->request->get['coupon_id']);
     }
     $this->data['languages'] = $this->language->getAvailableLanguages();
     foreach ($this->fields as $f) {
         if (isset($this->request->post[$f])) {
             $this->data[$f] = $this->request->post[$f];
         } elseif (isset($coupon_info) && isset($coupon_info[$f])) {
             $this->data[$f] = $coupon_info[$f];
         } else {
             $this->data[$f] = '';
         }
     }
     if (!is_array($this->data['coupon_description'])) {
         if (isset($this->request->get['coupon_id'])) {
             $this->data['coupon_description'] = $this->model_sale_coupon->getCouponDescriptions($this->request->get['coupon_id']);
         } else {
             $this->data['coupon_description'] = array();
         }
     }
     if (!is_array($this->data['coupon_product'])) {
         if (isset($coupon_info)) {
             $this->data['coupon_product'] = $this->model_sale_coupon->getCouponProducts($this->request->get['coupon_id']);
         } else {
             $this->data['coupon_product'] = array();
         }
     }
     //check if coupon is active based on dates and update status
     $now = time();
     if ($this->data['date_start'] && dateISO2Int($this->data['date_start']) > $now || $this->data['date_end'] && dateISO2Int($this->data['date_end']) < $now) {
         $this->data['status'] = 0;
     }
     if (isset($this->request->post['date_start'])) {
         $this->data['date_start'] = dateDisplay2ISO($this->request->post['date_start'], $this->language->get('date_format_short'));
     } elseif (isset($coupon_info)) {
         $this->data['date_start'] = dateISO2Display($coupon_info['date_start'], $this->language->get('date_format_short'));
     } else {
         $this->data['date_start'] = dateInt2Display(time(), $this->language->get('date_format_short'));
     }
     if (isset($this->request->post['date_end'])) {
         $this->data['date_end'] = dateDisplay2ISO($this->request->post['date_end'], $this->language->get('date_format_short'));
     } elseif (isset($coupon_info)) {
         $this->data['date_end'] = dateISO2Display($coupon_info['date_end'], $this->language->get('date_format_short'));
     } else {
         $this->data['date_end'] = '';
     }
     if (isset($this->data['uses_total']) && $this->data['uses_total'] == -1) {
         $this->data['uses_total'] = '';
     } elseif (isset($this->data['uses_total']) && $this->data['uses_total'] == '') {
         $this->data['uses_total'] = 1;
     }
     if (isset($this->data['uses_customer']) && $this->data['uses_customer'] == -1) {
         $this->data['uses_customer'] = '';
     } elseif (isset($this->data['uses_customer']) && $this->data['uses_customer'] == '') {
         $this->data['uses_customer'] = 1;
     }
     if (!has_value($this->data['status'])) {
         $this->data['status'] = 1;
     }
     if (!has_value($this->request->get['coupon_id'])) {
         $this->data['action'] = $this->html->getSecureURL('sale/coupon/insert');
         $this->data['heading_title'] = $this->language->get('text_insert') . ' ' . $this->language->get('text_coupon');
         $this->data['update'] = '';
         $form = new AForm('ST');
     } else {
         $this->data['action'] = $this->html->getSecureURL('sale/coupon/update', '&coupon_id=' . $this->request->get['coupon_id']);
         $this->data['heading_title'] = $this->language->get('text_edit') . ' ' . $this->language->get('text_coupon') . ' - ' . $this->data['coupon_description'][$cont_lang_id]['name'];
         $this->data['update'] = $this->html->getSecureURL('listing_grid/coupon/update_field', '&id=' . $this->request->get['coupon_id']);
         $form = new AForm('HS');
     }
     $this->document->addBreadcrumb(array('href' => $this->data['action'], 'text' => $this->data['heading_title'], 'separator' => ' :: ', 'current' => true));
     $form->setForm(array('form_name' => 'couponFrm', 'update' => $this->data['update']));
     $this->data['form']['id'] = 'couponFrm';
     $this->data['form']['form_open'] = $form->getFieldHtml(array('type' => 'form', 'name' => 'couponFrm', 'attr' => 'data-confirm-exit="true"  class="aform form-horizontal"', 'action' => $this->data['action']));
     $this->data['form']['submit'] = $form->getFieldHtml(array('type' => 'button', 'name' => 'submit', 'text' => $this->language->get('button_save'), 'style' => 'button1'));
     $this->data['form']['cancel'] = $form->getFieldHtml(array('type' => 'button', 'name' => 'cancel', 'text' => $this->language->get('button_cancel'), 'style' => 'button2'));
     $this->data['form']['fields']['status'] = $form->getFieldHtml(array('type' => 'checkbox', 'name' => 'status', 'value' => $this->data['status'], 'style' => 'btn_switch'));
     $this->data['form']['fields']['name'] = $form->getFieldHtml(array('type' => 'input', 'name' => 'coupon_description[' . $cont_lang_id . '][name]', 'value' => $this->data['coupon_description'][$cont_lang_id]['name'], 'required' => true, 'style' => 'large-field'));
     $this->data['form']['fields']['description'] = $form->getFieldHtml(array('type' => 'textarea', 'name' => 'coupon_description[' . $cont_lang_id . '][description]', 'value' => $this->data['coupon_description'][$cont_lang_id]['description'], 'required' => true, 'style' => 'large-field'));
     $this->data['form']['fields']['code'] = $form->getFieldHtml(array('type' => 'input', 'name' => 'code', 'value' => $this->data['code'], 'required' => true));
     $this->data['form']['fields']['type'] = $form->getFieldHtml(array('type' => 'selectbox', 'name' => 'type', 'value' => $this->data['type'], 'options' => array('P' => $this->language->get('text_percent'), 'F' => $this->language->get('text_amount'))));
     $this->data['form']['fields']['discount'] = $form->getFieldHtml(array('type' => 'input', 'name' => 'discount', 'value' => moneyDisplayFormat($this->data['discount'])));
     $this->data['form']['fields']['total'] = $form->getFieldHtml(array('type' => 'input', 'name' => 'total', 'value' => moneyDisplayFormat($this->data['total'])));
     $this->data['form']['fields']['logged'] = $form->getFieldHtml(array('type' => 'selectbox', 'name' => 'logged', 'value' => $this->data['logged'], 'options' => array(1 => $this->language->get('text_yes'), 0 => $this->language->get('text_no'))));
     $this->data['form']['fields']['shipping'] = $form->getFieldHtml(array('type' => 'selectbox', 'name' => 'shipping', 'value' => $this->data['shipping'], 'options' => array(1 => $this->language->get('text_yes'), 0 => $this->language->get('text_no'))));
     $this->data['form']['fields']['date_start'] = $form->getFieldHtml(array('type' => 'date', 'name' => 'date_start', 'value' => $this->data['date_start'], 'default' => dateNowDisplay(), 'dateformat' => format4Datepicker($this->language->get('date_format_short')), 'highlight' => 'future', 'required' => true));
     $this->data['form']['fields']['date_end'] = $form->getFieldHtml(array('type' => 'date', 'name' => 'date_end', 'value' => $this->data['date_end'], 'default' => '', 'dateformat' => format4Datepicker($this->language->get('date_format_short')), 'highlight' => 'pased', 'required' => true));
     $this->data['form']['fields']['uses_total'] = $form->getFieldHtml(array('type' => 'input', 'name' => 'uses_total', 'value' => $this->data['uses_total']));
     $this->data['form']['fields']['uses_customer'] = $form->getFieldHtml(array('type' => 'input', 'name' => 'uses_customer', 'value' => $this->data['uses_customer']));
     if ($this->request->get['coupon_id']) {
         $this->loadModel('sale/order');
//.........这里部分代码省略.........
开发者ID:InquisitiveQuail,项目名称:abantecart-src,代码行数:101,代码来源:coupon.php


示例9: files


//.........这里部分代码省略.........
         $this->redirect($this->html->getSecureURL('sale/order/files', '&order_id=' . $this->request->get['order_id']));
     }
     $order_info = $this->model_sale_order->getOrder($order_id);
     $this->data['order_info'] = $order_info;
     //set content language to order language ID.
     if ($this->language->getContentLanguageID() != $order_info['language_id']) {
         //reset content language
         $this->language->setCurrentContentLanguage($order_info['language_id']);
     }
     if (empty($order_info)) {
         $this->session->data['error'] = $this->language->get('error_order_load');
         $this->redirect($this->html->getSecureURL('sale/order'));
     }
     $this->document->initBreadcrumb(array('href' => $this->html->getSecureURL('index/home'), 'text' => $this->language->get('text_home'), 'separator' => false));
     $this->document->addBreadcrumb(array('href' => $this->html->getSecureURL('sale/order'), 'text' => $this->language->get('heading_title'), 'separator' => ' :: '));
     $this->document->addBreadcrumb(array('href' => $this->html->getSecureURL('sale/order/files', '&order_id=' . $this->request->get['order_id']), 'text' => $this->language->get('heading_title') . ' #' . $order_info['order_id'], 'separator' => ' :: ', 'current' => true));
     if (isset($this->session->data['success'])) {
         $this->data['success'] = $this->session->data['success'];
         unset($this->session->data['success']);
     } else {
         $this->data['success'] = '';
     }
     $this->data['heading_title'] = $this->language->get('heading_title') . ' #' . $order_info['order_id'];
     $this->data['token'] = $this->session->data['token'];
     $this->data['invoice_url'] = $this->html->getSecureURL('sale/invoice', '&order_id=' . (int) $this->request->get['order_id']);
     $this->data['button_invoice'] = $this->html->buildButton(array('name' => 'btn_invoice', 'text' => $this->language->get('text_invoice')));
     $this->data['invoice_generate'] = $this->html->getSecureURL('sale/invoice/generate');
     $this->data['category_products'] = $this->html->getSecureURL( 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP formatBytes函数代码示例发布时间:2022-05-15
下一篇:
PHP format函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap