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


PHP HtmlElementFactory类代码示例

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


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

示例1: main

 public function main()
 {
     //init controller data
     $this->extensions->hk_InitData($this, __FUNCTION__);
     if (!$this->customer->isLogged()) {
         $this->session->data['redirect'] = $this->html->getSecureURL('account/newsletter');
         $this->redirect($this->html->getSecureURL('account/login'));
     }
     $this->document->setTitle($this->language->get('heading_title'));
     if ($this->request->is_POST()) {
         $this->loadModel('account/customer');
         $this->model_account_customer->editNewsletter($this->request->post['newsletter']);
         $this->session->data['success'] = $this->language->get('text_success');
         $this->redirect($this->html->getURL('account/account'));
     }
     $this->document->resetBreadcrumbs();
     $this->document->addBreadcrumb(array('href' => $this->html->getURL('index/home'), 'text' => $this->language->get('text_home'), 'separator' => FALSE));
     $this->document->addBreadcrumb(array('href' => $this->html->getURL('account/account'), 'text' => $this->language->get('text_account'), 'separator' => $this->language->get('text_separator')));
     $this->document->addBreadcrumb(array('href' => $this->html->getURL('account/newsletter'), 'text' => $this->language->get('text_newsletter'), 'separator' => $this->language->get('text_separator')));
     $form = new AForm();
     $form->setForm(array('form_name' => 'newsFrm'));
     $this->data['form']['form_open'] = $form->getFieldHtml(array('type' => 'form', 'name' => 'newsFrm', 'action' => $this->html->getSecureURL('account/newsletter')));
     $this->data['form']['newsletter'] = $form->getFieldHtml(array('type' => 'radio', 'name' => 'newsletter', 'value' => $this->customer->getNewsletter(), 'options' => array('1' => $this->language->get('text_yes'), '0' => $this->language->get('text_no'))));
     $this->data['form']['continue'] = $form->getFieldHtml(array('type' => 'submit', 'icon' => 'fa fa-check', 'name' => $this->language->get('button_continue')));
     $this->data['back'] = $this->html->getURL('account/account');
     $back = HtmlElementFactory::create(array('type' => 'button', 'name' => 'back', 'text' => $this->language->get('button_back'), 'icon' => 'fa fa-arrow-left', 'style' => 'button'));
     $this->data['form']['back'] = $back;
     $this->view->batchAssign($this->data);
     $this->processTemplate('pages/account/newsletter.tpl');
     //init controller data
     $this->extensions->hk_UpdateData($this, __FUNCTION__);
 }
开发者ID:nelkihel,项目名称:abantecart-src,代码行数:32,代码来源:newsletter.php

示例2: main

 public function main()
 {
     $this->loadLanguage('default_pp_pro_uk/default_pp_pro_uk');
     $this->load->model('checkout/order');
     $order_info = $this->model_checkout_order->getOrder($this->session->data['order_id']);
     $data['cc_owner'] = HtmlElementFactory::create(array('type' => 'input', 'name' => 'cc_owner', 'value' => $order_info['payment_firstname'] . ' ' . $order_info['payment_lastname'], 'style' => 'input-medium'));
     $data['cc_owner'] = $data['cc_owner']->getHtml();
     $cards = array('Visa' => 'Visa', 'MasterCard' => 'MasterCard', 'Maestro' => 'Maestro');
     $data['cc_type'] = HtmlElementFactory::create(array('type' => 'selectbox', 'name' => 'cc_type', 'value' => 0, 'options' => $cards, 'style' => 'short input-small'));
     $data['cc_number'] = HtmlElementFactory::create(array('type' => 'input', 'name' => 'cc_number', 'value' => '', 'style' => 'input-medium'));
     $months = array();
     for ($i = 1; $i <= 12; $i++) {
         $months[sprintf('%02d', $i)] = strftime('%B', mktime(0, 0, 0, $i, 1, 2000));
     }
     $data['cc_expire_date_month'] = HtmlElementFactory::create(array('type' => 'selectbox', 'name' => 'cc_expire_date_month', 'value' => sprintf('%02d', date('m')), 'options' => $months, 'style' => 'short input-small'));
     $today = getdate();
     $years = array();
     for ($i = $today['year']; $i < $today['year'] + 11; $i++) {
         $years[strftime('%Y', mktime(0, 0, 0, 1, 1, $i))] = strftime('%Y', mktime(0, 0, 0, 1, 1, $i));
     }
     $data['cc_expire_date_year'] = HtmlElementFactory::create(array('type' => 'selectbox', 'name' => 'cc_expire_date_year', 'value' => sprintf('%02d', date('Y') + 1), 'options' => $years, 'style' => 'short input-small'));
     $data['cc_start_date_month'] = HtmlElementFactory::create(array('type' => 'selectbox', 'name' => 'cc_start_date_month', 'value' => sprintf('%02d', date('m')), 'options' => $months, 'style' => 'short input-small'));
     $years = array();
     for ($i = $today['year'] - 10; $i < $today['year'] + 2; $i++) {
         $years[strftime('%Y', mktime(0, 0, 0, 1, 1, $i))] = strftime('%Y', mktime(0, 0, 0, 1, 1, $i));
     }
     $data['cc_start_date_year'] = HtmlElementFactory::create(array('type' => 'selectbox', 'name' => 'cc_start_date_year', 'value' => sprintf('%02d', date('Y')), 'options' => $years, 'style' => 'short input-small'));
     $data['cc_cvv2'] = HtmlElementFactory::create(array('type' => 'input', 'name' => 'cc_cvv2', 'value' => '', 'style' => 'short', 'attr' => ' size="3" '));
     $data['cc_issue'] = HtmlElementFactory::create(array('type' => 'input', 'name' => 'cc_issue', 'value' => '', 'style' => 'short', 'attr' => ' size="1" '));
     $back = $this->request->get['rt'] != 'checkout/guest_step_3' ? $this->html->getSecureURL('checkout/payment') : $this->html->getSecureURL('checkout/guest_step_2');
     $data['back'] = HtmlElementFactory::create(array('type' => 'button', 'name' => 'back', 'text' => $this->language->get('button_back'), 'style' => 'button', 'href' => $back));
     $data['submit'] = HtmlElementFactory::create(array('type' => 'button', 'name' => 'paypal_button', 'text' => $this->language->get('button_confirm'), 'style' => 'button btn-orange'));
     $this->view->batchAssign($data);
     $this->processTemplate('responses/default_pp_pro_uk.tpl');
 }
开发者ID:harshzalavadiya,项目名称:fatak,代码行数:35,代码来源:default_pp_pro_uk.php

示例3: review

 public function review()
 {
     //init controller data
     $this->extensions->hk_InitData($this, __FUNCTION__);
     $this->loadLanguage('product/product');
     $this->loadModel('catalog/review');
     $this->view->assign('text_no_reviews', $this->language->get('text_no_reviews'));
     if (isset($this->request->get['page'])) {
         $page = $this->request->get['page'];
     } else {
         $page = 1;
     }
     $reviews = array();
     $results = $this->model_catalog_review->getReviewsByProductId($this->request->get['product_id'], ($page - 1) * 5, 5);
     foreach ($results as $result) {
         $reviews[] = array('author' => $result['author'], 'rating' => $result['rating'], 'text' => strip_tags($result['text']), 'stars' => sprintf($this->language->get('text_stars'), $result['rating']), 'date_added' => dateISO2Display($result['date_added'], $this->language->get('date_format_short')));
     }
     $this->data['reviews'] = $reviews;
     $review_total = $this->model_catalog_review->getTotalReviewsByProductId($this->request->get['product_id']);
     $this->data['pagination_bootstrap'] = HtmlElementFactory::create(array('type' => 'Pagination', 'name' => 'pagination', 'text' => $this->language->get('text_pagination'), 'text_limit' => $this->language->get('text_per_page'), 'total' => $review_total, 'page' => $page, 'limit' => 5, 'url' => $this->html->getURL('product/review/review', '&product_id=' . $this->request->get['product_id'] . '&page={page}'), 'style' => 'pagination'));
     $this->view->batchAssign($this->data);
     $this->processTemplate('responses/product/review.tpl');
     //init controller data
     $this->extensions->hk_UpdateData($this, __FUNCTION__);
 }
开发者ID:harshzalavadiya,项目名称:fatak,代码行数:25,代码来源:review.php

示例4: main

 public function main()
 {
     //init controller data
     $this->extensions->hk_InitData($this, __FUNCTION__);
     if (has_value($this->request->get['customer_id']) && (int) $this->request->get['customer_id'] > 0 && has_value($this->request->get['email'])) {
         $this->loadModel('account/customer');
         $customer = $this->model_account_customer->getCustomer((int) $this->request->get['customer_id']);
         //check is customer_id exists and compare his email with given
         if ($customer && $customer['email'] == $this->request->get['email']) {
             $this->model_account_customer->editNewsletter(0, (int) $this->request->get['customer_id']);
         } else {
             //othewise - redirect to index page
             $this->html->redirect($this->html->getSecureURL('index/home'));
         }
     } else {
         $this->html->redirect($this->html->getSecureURL('index/home'));
     }
     $this->document->setTitle($this->language->get('heading_title'));
     $this->document->resetBreadcrumbs();
     $this->document->addBreadcrumb(array('href' => $this->html->getURL('index/home'), 'text' => $this->language->get('text_home'), 'separator' => FALSE));
     $this->data['heading_title'] = $this->language->get('heading_title');
     $this->data['text_message'] = $this->language->get('text_message');
     $this->data['button_continue'] = $this->language->get('button_continue');
     $this->data['continue'] = $this->html->getURL('index/home');
     $continue = HtmlElementFactory::create(array('type' => 'button', 'name' => 'continue_button', 'text' => $this->language->get('button_continue'), 'style' => 'button'));
     $this->data['continue_button'] = $continue;
     $this->view->batchAssign($this->data);
     $this->processTemplate('common/unsubscribe.tpl');
     //init controller data
     $this->extensions->hk_UpdateData($this, __FUNCTION__);
     unset($this->session->data['success']);
 }
开发者ID:harshzalavadiya,项目名称:fatak,代码行数:32,代码来源:unsubscribe.php

示例5: _generar_inputs_form

 private function _generar_inputs_form()
 {
     $campos = $this->_oConfigEntidad->campos;
     //echo "<hr/>" . __FILE__ . " - " . __LINE__ . "<pre>";
     //echo "<hr/><pre>";
     // print_r($this->input->post());
     //echo "</pre><hr/>";
     //die();
     //$config = $this->input->post("campos[id_provincia][config]");
     //        $config_decode = (array) json_decode($config);
     //        print_r($config_decode);
     //        print_r($campos);
     //        echo "</pre><hr/>";
     //die;
     $html = "";
     require_once APPPATH . "/libraries/Crud/HtmlElementFactory.php";
     foreach ($campos as $nombre_campo => $data_campo) {
         if (element($data_campo, "generar_input", 0) > 0) {
             $tipo_input = $data_campo["tipo_campo"];
             $config = $data_campo["config"];
             $html .= "<div class='form-group'>" . PHP_EOL;
             if ($tipo_input !== "hidden") {
                 $html .= "<label>" . element($data_campo, "label", "") . ":</label><br/>" . PHP_EOL;
             }
             $elemento_html = HtmlElementFactory::crear_elemento($tipo_input);
             if (!empty($config)) {
                 $config_decode = (array) json_decode($config);
                 $elemento_html->set_config($config_decode);
             }
             $html .= $elemento_html->render($nombre_campo) . PHP_EOL;
             $html .= "</div>" . PHP_EOL;
         }
     }
     return $html;
 }
开发者ID:rino7,项目名称:ci_crud_generator,代码行数:35,代码来源:Generador_Form.php

示例6: main

 public function main()
 {
     //init controller data
     $this->extensions->hk_InitData($this, __FUNCTION__);
     $this->document->setTitle($this->language->get('heading_title'));
     $this->document->resetBreadcrumbs();
     $this->document->addBreadcrumb(array('href' => $this->html->getURL('index/home'), 'text' => $this->language->get('text_home'), 'separator' => FALSE));
     $this->document->addBreadcrumb(array('href' => $this->html->getURL('account/account'), 'text' => $this->language->get('text_account'), 'separator' => $this->language->get('text_separator')));
     $this->document->addBreadcrumb(array('href' => $this->html->getURL('account/success'), 'text' => $this->language->get('text_success'), 'separator' => $this->language->get('text_separator')));
     $this->view->assign('heading_title', $this->language->get('heading_title'));
     if ($this->config->get('config_customer_email_activation')) {
         $this->view->assign('text_message', sprintf($this->language->get('text_activate'), $this->config->get('store_name'), $this->html->getURL('content/contact')));
     } elseif ($this->config->get('config_customer_approval')) {
         $this->view->assign('text_message', sprintf($this->language->get('text_approval'), $this->config->get('store_name'), $this->html->getURL('content/contact')));
     } else {
         $this->view->assign('text_message', sprintf($this->language->get('text_message'), $this->html->getURL('content/contact')));
     }
     $this->view->assign('button_continue', $this->language->get('button_continue'));
     if ($this->session->data['redirect']) {
         $this->view->assign('continue', $this->session->data['redirect']);
         unset($this->session->data['redirect']);
     } else {
         if ($this->cart->hasProducts()) {
             $this->view->assign('continue', $this->html->getURL('checkout/cart'));
         } else {
             $this->view->assign('continue', $this->html->getURL('account/account'));
         }
     }
     $continue = HtmlElementFactory::create(array('type' => 'button', 'name' => 'continue_button', 'text' => $this->language->get('button_continue'), 'style' => 'button'));
     $this->view->assign('continue_button', $continue);
     $this->processTemplate('common/success.tpl');
     //init controller data
     $this->extensions->hk_UpdateData($this, __FUNCTION__);
     unset($this->session->data['success']);
 }
开发者ID:harshzalavadiya,项目名称:fatak,代码行数:35,代码来源:success.php

示例7: main

 public function main()
 {
     //init controller data
     $this->extensions->hk_InitData($this, __FUNCTION__);
     if (isset($this->session->data['order_id'])) {
         $amount = $this->session->data['used_balance'];
         // in default currency
         if ($amount) {
             $transaction_data = array('order_id' => (int) $this->session->data['order_id'], 'amount' => $amount, 'transaction_type' => 'order', 'created_by' => $this->customer->getId(), 'description' => sprintf($this->language->get('text_applied_balance_to_order'), $this->currency->format($this->currency->convert($amount, $this->config->get('config_currency'), $this->session->data['currency']), $this->session->data['currency'], 1), (int) $this->session->data['order_id']));
             $this->customer->debitTransaction($transaction_data);
         }
         // google analytics data for js-script in footer.tpl
         $order = new AOrder($this->registry);
         $order_data = $order->buildOrderData($this->session->data);
         $order_tax = $order_total = $order_shipping = 0.0;
         foreach ($order_data['totals'] as $total) {
             if ($total['total_type'] == 'total') {
                 $order_total += $total['value'];
             } elseif ($total['total_type'] == 'tax') {
                 $order_tax += $total['value'];
             } elseif ($total['total_type'] == 'shipping') {
                 $order_shipping += $total['value'];
             }
         }
         $this->registry->set('google_analytics_data', array('transaction_id' => (int) $this->session->data['order_id'], 'store_name' => $this->config->get('store_name'), 'currency_code' => $order_data['currency'], 'total' => $order_total, 'tax' => $order_tax, 'shipping' => $order_shipping, 'city' => $order_data['shipping_city'], 'state' => $order_data['shipping_zone'], 'country' => $order_data['shipping_country']));
         $this->cart->clear();
         unset($this->session->data['shipping_method'], $this->session->data['shipping_methods'], $this->session->data['payment_method'], $this->session->data['payment_methods'], $this->session->data['guest'], $this->session->data['comment'], $this->session->data['order_id'], $this->session->data['coupon'], $this->session->data['used_balance'], $this->session->data['used_balance_full']);
         //Redirect back. Fix for clearing shopping cart content
         $this->redirect($this->html->getSecureURL('checkout/success'));
     }
     $this->document->setTitle($this->language->get('heading_title'));
     $this->document->resetBreadcrumbs();
     $this->document->addBreadcrumb(array('href' => $this->html->getURL('index/home'), 'text' => $this->language->get('text_home'), 'separator' => FALSE));
     $this->document->addBreadcrumb(array('href' => $this->html->getURL('checkout/cart'), 'text' => $this->language->get('text_basket'), 'separator' => $this->language->get('text_separator')));
     if ($this->customer->isLogged()) {
         $this->document->addBreadcrumb(array('href' => $this->html->getURL('checkout/shipping'), 'text' => $this->language->get('text_shipping'), 'separator' => $this->language->get('text_separator')));
         $this->document->addBreadcrumb(array('href' => $this->html->getURL('checkout/payment'), 'text' => $this->language->get('text_payment'), 'separator' => $this->language->get('text_separator')));
         $this->document->addBreadcrumb(array('href' => $this->html->getURL('checkout/confirm'), 'text' => $this->language->get('text_confirm'), 'separator' => $this->language->get('text_separator')));
     } else {
         $this->document->addBreadcrumb(array('href' => $this->html->getURL('checkout/guest'), 'text' => $this->language->get('text_guest'), 'separator' => $this->language->get('text_separator')));
         $this->document->addBreadcrumb(array('href' => $this->html->getURL('checkout/guest/confirm'), 'text' => $this->language->get('text_confirm'), 'separator' => $this->language->get('text_separator')));
     }
     $this->document->addBreadcrumb(array('href' => $this->html->getURL('checkout/success'), 'text' => $this->language->get('text_success'), 'separator' => $this->language->get('text_separator')));
     $this->view->assign('heading_title', $this->language->get('heading_title'));
     if ($this->session->data['account'] == 'guest') {
         $this->view->assign('text_message', sprintf($this->language->get('text_message_guest'), $this->html->getURL('content/contact')));
     } else {
         $this->view->assign('text_message', sprintf($this->language->get('text_message'), $this->html->getSecureURL('account/account'), $this->html->getSecureURL('account/history'), $this->html->getURL('content/contact')));
     }
     $this->view->assign('button_continue', $this->language->get('button_continue'));
     $this->view->assign('continue', $this->html->getURL('index/home'));
     $continue = HtmlElementFactory::create(array('type' => 'button', 'name' => 'continue_button', 'text' => $this->language->get('button_continue'), 'style' => 'button'));
     $this->view->assign('continue_button', $continue);
     $this->processTemplate('common/success.tpl');
     //init controller data
     $this->extensions->hk_UpdateData($this, __FUNCTION__);
 }
开发者ID:vglide,项目名称:abantecart-src,代码行数:57,代码来源:success.php

示例8: main

 public function main()
 {
     $this->loadLanguage('default_pp_express/default_pp_express');
     if ($this->request->get['rt'] != 'checkout/guest_step_3') {
         $back = $this->html->getSecureURL('checkout/payment');
     } else {
         $back = $this->html->getSecureURL('checkout/guest_step_2');
     }
     $this->data['button_back'] = $this->html->buildElement(array('type' => 'button', 'name' => 'back', 'text' => $this->language->get('button_back'), 'href' => $back));
     $this->data['button_confirm'] = HtmlElementFactory::create(array('type' => 'submit', 'name' => $this->language->get('button_confirm'), 'style' => 'button', 'href' => $this->html->getSecureURL('r/extension/default_pp_express/confirm')));
     $this->view->batchAssign($this->data);
     $this->processTemplate('responses/default_pp_express.tpl');
 }
开发者ID:siddht1,项目名称:abantecart-src,代码行数:13,代码来源:default_pp_express.php

示例9: main

 /**
  * Main controller function to show order hitory
  */
 public function main()
 {
     //init controller data
     $this->extensions->hk_InitData($this, __FUNCTION__);
     if (!$this->customer->isLogged()) {
         $this->session->data['redirect'] = $this->html->getSecureURL('account/history');
         $this->redirect($this->html->getSecureURL('account/login'));
     }
     $this->document->setTitle($this->language->get('heading_title'));
     $this->document->resetBreadcrumbs();
     $this->document->addBreadcrumb(array('href' => $this->html->getURL('index/home'), 'text' => $this->language->get('text_home'), 'separator' => FALSE));
     $this->document->addBreadcrumb(array('href' => $this->html->getURL('account/account'), 'text' => $this->language->get('text_account'), 'separator' => $this->language->get('text_separator')));
     $this->document->addBreadcrumb(array('href' => $this->html->getURL('account/history'), 'text' => $this->language->get('text_history'), 'separator' => $this->language->get('text_separator')));
     $this->loadModel('account/order');
     $order_total = $this->model_account_order->getTotalOrders();
     if ($order_total) {
         $this->data['action'] = $this->html->getURL('account/history');
         if (isset($this->request->get['page'])) {
             $page = $this->request->get['page'];
         } else {
             $page = 1;
         }
         if (isset($this->request->get['limit'])) {
             $limit = (int) $this->request->get['limit'];
             $limit = $limit > 50 ? 50 : $limit;
         } else {
             $limit = $this->config->get('config_catalog_limit');
         }
         $orders = array();
         $results = $this->model_account_order->getOrders(($page - 1) * $limit, $limit);
         foreach ($results as $result) {
             $product_total = $this->model_account_order->getTotalOrderProductsByOrderId($result['order_id']);
             $button = HtmlElementFactory::create(array('type' => 'button', 'name' => 'button_edit', 'text' => $this->language->get('button_view'), 'style' => 'btn-default', 'icon' => 'fa fa-info', 'attr' => ' onclick = "viewOrder(' . $result['order_id'] . ');" '));
             $orders[] = array('order_id' => $result['order_id'], 'name' => $result['firstname'] . ' ' . $result['lastname'], 'status' => $result['status'], 'date_added' => dateISO2Display($result['date_added'], $this->language->get('date_format_short')), 'products' => $product_total, 'total' => $this->currency->format($result['total'], $result['currency'], $result['value']), 'href' => $this->html->getSecureURL('account/invoice', '&order_id=' . $result['order_id']), 'button' => $button->getHtml());
         }
         $this->data['order_url'] = $this->html->getSecureURL('account/invoice');
         $this->data['orders'] = $orders;
         $this->data['pagination_bootstrap'] = HtmlElementFactory::create(array('type' => 'Pagination', 'name' => 'pagination', 'text' => $this->language->get('text_pagination'), 'text_limit' => $this->language->get('text_per_page'), 'total' => $order_total, 'page' => $page, 'limit' => $limit, 'url' => $this->html->getURL('account/history', '&limit=' . $limit . '&page={page}'), 'style' => 'pagination'));
         $this->data['continue'] = $this->html->getSecureURL('account/account');
         $this->view->setTemplate('pages/account/history.tpl');
     } else {
         $this->data['continue'] = $this->html->getSecureURL('account/account');
         $this->view->setTemplate('pages/error/not_found.tpl');
     }
     $this->data['button_continue'] = HtmlElementFactory::create(array('type' => 'button', 'name' => 'continue_button', 'text' => $this->language->get('button_continue'), 'style' => 'button'));
     $this->view->batchAssign($this->data);
     $this->processTemplate();
     //init controller data
     $this->extensions->hk_UpdateData($this, __FUNCTION__);
 }
开发者ID:nelkihel,项目名称:abantecart-src,代码行数:53,代码来源:history.php

示例10: main

 public function main()
 {
     $item = HtmlElementFactory::create(array('type' => 'button', 'name' => 'back', 'style' => 'button mr10', 'text' => $this->language->get('button_back'), 'icon' => 'fa fa-arrow-left'));
     $this->view->assign('button_back', $item);
     $item = HtmlElementFactory::create(array('type' => 'button', 'name' => 'checkout', 'style' => 'button btn-orange pull-right', 'text' => $this->language->get('button_confirm'), 'icon' => 'fa fa-check'));
     $this->view->assign('button_confirm', $item);
     $this->view->assign('continue', $this->html->getSecureURL('checkout/success'));
     if ($this->request->get['rt'] != 'checkout/guest_step_3') {
         $this->view->assign('back', $this->html->getSecureURL('checkout/cart'));
     } else {
         $this->view->assign('back', $this->html->getSecureURL('checkout/guest_step_2'));
     }
     $this->processTemplate('responses/checkout/no_payment.tpl');
 }
开发者ID:nelkihel,项目名称:abantecart-src,代码行数:14,代码来源:no_payment.php

示例11: main

 /**
  * Main Controller function to show transaction hitory. 
  * Note: Regular orders are considered in the transactions. 
  */
 public function main()
 {
     //init controller data
     $this->extensions->hk_InitData($this, __FUNCTION__);
     if (!$this->customer->isLogged()) {
         $this->session->data['redirect'] = $this->html->getSecureURL('account/transactions');
         $this->redirect($this->html->getSecureURL('account/login'));
     }
     $this->document->setTitle($this->language->get('heading_title'));
     $this->document->resetBreadcrumbs();
     $this->document->addBreadcrumb(array('href' => $this->html->getURL('index/home'), 'text' => $this->language->get('text_home'), 'separator' => FALSE));
     $this->document->addBreadcrumb(array('href' => $this->html->getURL('account/account'), 'text' => $this->language->get('text_account'), 'separator' => $this->language->get('text_separator')));
     $this->document->addBreadcrumb(array('href' => $this->html->getURL('account/transactions'), 'text' => $this->language->get('text_transactions'), 'separator' => $this->language->get('text_separator')));
     $this->loadModel('account/customer');
     $trans_total = $this->model_account_customer->getTotalTransactions();
     $balance = $this->customer->getBalance();
     $this->data['balance_amount'] = $this->currency->format($balance);
     if ($trans_total) {
         $this->data['action'] = $this->html->getURL('account/transactions');
         if (isset($this->request->get['page'])) {
             $page = $this->request->get['page'];
         } else {
             $page = 1;
         }
         if (isset($this->request->get['limit'])) {
             $limit = (int) $this->request->get['limit'];
             $limit = $limit > 50 ? 50 : $limit;
         } else {
             $limit = $this->config->get('config_catalog_limit');
         }
         $trans = array();
         $results = $this->model_account_customer->getTransactions(($page - 1) * $limit, $limit);
         foreach ($results as $result) {
             $trans[] = array('customer_transaction_id' => $result['customer_transaction_id'], 'order_id' => $result['order_id'], 'section' => $result['section'], 'credit' => $this->currency->format($result['credit']), 'debit' => $this->currency->format($result['debit']), 'transaction_type' => $result['transaction_type'], 'description' => $result['description'], 'create_date' => dateISO2Display($result['create_date'], $this->language->get('date_format_short')));
         }
         $this->data['transactions'] = $trans;
         $this->data['pagination_bootstrap'] = HtmlElementFactory::create(array('type' => 'Pagination', 'name' => 'pagination', 'text' => $this->language->get('text_pagination'), 'text_limit' => $this->language->get('text_per_page'), 'total' => $trans_total, 'page' => $page, 'limit' => $limit, 'url' => $this->html->getURL('account/transactions', '&limit=' . $limit . '&page={page}'), 'style' => 'pagination'));
         $this->data['continue'] = $this->html->getSecureURL('account/account');
         $this->view->setTemplate('pages/account/transactions.tpl');
     } else {
         $this->data['continue'] = $this->html->getSecureURL('account/account');
         $this->view->setTemplate('pages/account/transactions.tpl');
     }
     $this->data['button_continue'] = HtmlElementFactory::create(array('type' => 'button', 'name' => 'continue_button', 'text' => $this->language->get('button_continue'), 'style' => 'button'));
     $this->view->batchAssign($this->data);
     $this->processTemplate();
     //init controller data
     $this->extensions->hk_UpdateData($this, __FUNCTION__);
 }
开发者ID:harshzalavadiya,项目名称:fatak,代码行数:53,代码来源:transactions.php

示例12: main

 public function main()
 {
     $item = HtmlElementFactory::create(array('type' => 'button', 'name' => 'back', 'style' => 'button', 'text' => $this->language->get('button_back')));
     $this->view->assign('button_back', $item);
     $item = HtmlElementFactory::create(array('type' => 'button', 'name' => 'checkout', 'style' => 'button btn-primary', 'text' => $this->language->get('button_confirm')));
     $this->view->assign('button_confirm', $item);
     $this->view->assign('continue', $this->html->getSecureURL('checkout/success'));
     if ($this->request->get['rt'] != 'checkout/guest_step_3') {
         $this->view->assign('back', $this->html->getSecureURL('checkout/payment', '&mode=edit', true));
         // to prevent coming back when payment method only one
     } else {
         $this->view->assign('back', $this->html->getSecureURL('checkout/guest_step_2'));
     }
     $this->processTemplate('responses/default_cod.tpl');
 }
开发者ID:InquisitiveQuail,项目名称:abantecart-src,代码行数:15,代码来源:default_cod.php

示例13: main

 public function main()
 {
     $this->loadLanguage('default_pp_pro/default_pp_pro');
     $this->load->model('checkout/order');
     $this->load->model('extension/default_pp_pro');
     $order_info = $this->model_checkout_order->getOrder($this->session->data['order_id']);
     $data['cc_owner'] = HtmlElementFactory::create(array('type' => 'input', 'name' => 'cc_owner', 'value' => $order_info['payment_firstname'] . ' ' . $order_info['payment_lastname'], 'style' => 'input-medium'));
     //load accepted card types
     $cardtypes = $this->model_extension_default_pp_pro->getCreditCardTypes();
     $cards = unserialize($this->config->get('default_pp_pro_creditcard_types'));
     $options = array('');
     foreach ($cards as $card) {
         if ($card && isset($cardtypes[$card])) {
             $options[$card] = $cardtypes[$card];
         }
     }
     $data['accepted_cards'] = $options;
     $data['cc_type'] = HtmlElementFactory::create(array('type' => 'selectbox', 'name' => 'cc_type', 'value' => '', 'options' => $options, 'style' => 'input-medium'));
     $data['cc_number'] = HtmlElementFactory::create(array('type' => 'input', 'name' => 'cc_number', 'value' => '', 'style' => 'input-medium', 'attr' => 'autocomplete="off"'));
     $months = array();
     for ($i = 1; $i <= 12; $i++) {
         $months[sprintf('%02d', $i)] = strftime('%B', mktime(0, 0, 0, $i, 1, 2000));
     }
     $data['cc_expire_date_month'] = HtmlElementFactory::create(array('type' => 'selectbox', 'name' => 'cc_expire_date_month', 'value' => sprintf('%02d', date('m')), 'options' => $months, 'style' => 'short input-small'));
     $today = getdate();
     $years = array();
     for ($i = $today['year']; $i < $today['year'] + 11; $i++) {
         $years[strftime('%Y', mktime(0, 0, 0, 1, 1, $i))] = strftime('%Y', mktime(0, 0, 0, 1, 1, $i));
     }
     $data['cc_expire_date_year'] = HtmlElementFactory::create(array('type' => 'selectbox', 'name' => 'cc_expire_date_year', 'value' => sprintf('%02d', date('Y') + 1), 'options' => $years, 'style' => 'short input-small'));
     $data['cc_start_date_month'] = HtmlElementFactory::create(array('type' => 'selectbox', 'name' => 'cc_start_date_month', 'value' => sprintf('%02d', date('m')), 'options' => $months, 'style' => 'short input-small'));
     $years = array();
     for ($i = $today['year'] - 10; $i < $today['year'] + 2; $i++) {
         $years[strftime('%Y', mktime(0, 0, 0, 1, 1, $i))] = strftime('%Y', mktime(0, 0, 0, 1, 1, $i));
     }
     $data['cc_start_date_year'] = HtmlElementFactory::create(array('type' => 'selectbox', 'name' => 'cc_start_date_year', 'value' => sprintf('%02d', date('Y')), 'options' => $years, 'style' => 'short input-small'));
     $data['cc_cvv2'] = HtmlElementFactory::create(array('type' => 'input', 'name' => 'cc_cvv2', 'value' => '', 'style' => 'short', 'attr' => ' size="3" maxlength="4" autocomplete="off"'));
     $data['cc_issue'] = HtmlElementFactory::create(array('type' => 'input', 'name' => 'cc_issue', 'value' => '', 'style' => 'short', 'attr' => ' size="1" maxlength="2" autocomplete="off"'));
     $back = $this->request->get['rt'] != 'checkout/guest_step_3' ? $this->html->getSecureURL('checkout/payment') : $this->html->getSecureURL('checkout/guest_step_2');
     $data['back'] = HtmlElementFactory::create(array('type' => 'button', 'name' => 'back', 'text' => $this->language->get('button_back'), 'style' => 'button', 'href' => $back));
     $data['submit'] = HtmlElementFactory::create(array('type' => 'button', 'name' => 'paypal_button', 'text' => $this->language->get('button_confirm'), 'style' => 'button btn-orange'));
     //load creditcard input validation
     $this->document->addScriptBottom($this->view->templateResource('/javascript/credit_card_validation.js'));
     $this->view->batchAssign($data);
     $this->processTemplate('responses/default_pp_pro.tpl');
 }
开发者ID:siddht1,项目名称:abantecart-src,代码行数:46,代码来源:default_pp_pro.php

示例14: main

 public function main()
 {
     //init controller data
     $this->extensions->hk_InitData($this, __FUNCTION__);
     if ($this->customer->isLogged() || $this->customer->isUnauthCustomer()) {
         $this->customer->logout();
         $this->cart->clear();
         unset($this->session->data['shipping_address_id']);
         unset($this->session->data['shipping_method']);
         unset($this->session->data['shipping_methods']);
         unset($this->session->data['payment_address_id']);
         unset($this->session->data['payment_method']);
         unset($this->session->data['payment_methods']);
         unset($this->session->data['comment']);
         unset($this->session->data['order_id']);
         unset($this->session->data['coupon']);
         unset($this->session->data['merchant']);
         if ($this->config->get('config_tax_store')) {
             $country_id = $this->config->get('config_country_id');
             $zone_id = $this->config->get('config_zone_id');
         } else {
             $country_id = $zone_id = 0;
         }
         $this->tax->setZone($country_id, $zone_id);
         $this->redirect($this->html->getSecureURL('account/logout'));
     }
     $this->document->setTitle($this->language->get('heading_title'));
     $this->document->resetBreadcrumbs();
     $this->document->addBreadcrumb(array('href' => $this->html->getURL('index/home'), 'text' => $this->language->get('text_home'), 'separator' => FALSE));
     $this->document->addBreadcrumb(array('href' => $this->html->getURL('account/account'), 'text' => $this->language->get('text_account'), 'separator' => $this->language->get('text_separator')));
     $this->document->addBreadcrumb(array('href' => $this->html->getURL('account/logout'), 'text' => $this->language->get('text_logout'), 'separator' => $this->language->get('text_separator')));
     $this->view->assign('continue', $this->html->getURL('index/home'));
     $continue = HtmlElementFactory::create(array('type' => 'button', 'name' => 'continue_button', 'text' => $this->language->get('button_continue'), 'style' => 'button'));
     $this->view->assign('continue_button', $continue);
     if ($this->config->get('embed_mode') == true) {
         //load special headers
         $this->addChild('responses/embed/head', 'head');
         $this->addChild('responses/embed/footer', 'footer');
         $this->processTemplate('embed/common/success.tpl');
     } else {
         $this->processTemplate('common/success.tpl');
     }
     //init controller data
     $this->extensions->hk_UpdateData($this, __FUNCTION__);
 }
开发者ID:InquisitiveQuail,项目名称:abantecart-src,代码行数:45,代码来源:logout.php

示例15: main

 public function main()
 {
     $this->loadLanguage('default_cheque/default_cheque');
     $this->view->batchAssign($this->language->getASet());
     $this->view->assign('payable', $this->config->get('default_cheque_payable'));
     $this->view->assign('address', $this->config->get('config_address'));
     $this->view->assign('continue', $this->html->getSecureURL('checkout/success'));
     $item = HtmlElementFactory::create(array('type' => 'button', 'name' => 'back', 'style' => 'button', 'text' => $this->language->get('button_back')));
     $this->view->assign('button_back', $item);
     $item = HtmlElementFactory::create(array('type' => 'button', 'name' => 'checkout', 'style' => 'button', 'text' => $this->language->get('button_confirm')));
     $this->view->assign('button_confirm', $item);
     if ($this->request->get['rt'] != 'checkout/guest_step_3') {
         $this->view->assign('back', $this->html->getSecureURL('checkout/payment'));
     } else {
         $this->view->assign('back', $this->html->getSecureURL('checkout/guest_step_2'));
     }
     $this->processTemplate('responses/default_cheque.tpl');
 }
开发者ID:harshzalavadiya,项目名称:fatak,代码行数:18,代码来源:default_cheque.php


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