public function __construct() { parent::__construct(); $this->_view->setTemplate('default'); // Cambiamos el template // $this->_nicks = $this->loadModel('index'); $this->_view->setWidgetOptions('menu-top', array('top', 'top', 'true')); }
public function renderForm() { if (!$this->loadObject(true)) { return; } $checkVersion = version_compare(_PS_VERSION_, '1.6'); $this->isPS6 = false; if ($checkVersion >= 0) { $this->isPS6 = true; } if (Validate::isLoadedObject($this->object)) { $this->display = 'edit'; } else { $this->display = 'add'; } if (!$this->isPS6) { //ps5 $this->toolbar_btn['save-and-preview'] = array('href' => '#', 'desc' => $this->l('Save and preview')); $this->toolbar_btn['save-and-stay'] = array('short' => 'SaveAndStay', 'href' => '#', 'desc' => $this->l('Save and stay')); } $this->initToolbar(); if ($this->isPS6) { //ps6 $this->initPageHeaderToolbar(); } $categories = CMSCategory::getCategories($this->context->language->id, false); $html_categories = CMSCategory::recurseCMSCategory($categories, $categories[0][1], 1, $this->getFieldValue($this->object, 'id_cms_category'), 1); $galleries = $this->getSliders(); $this->fields_form = array('tinymce' => true, 'legend' => array('title' => $this->l('CMS Page'), 'image' => '../img/admin/tab-categories.gif', 'icon' => 'icon-folder-close'), 'input' => array(array('type' => 'select_category', 'label' => $this->l('CMS Category'), 'name' => 'id_cms_category', 'options' => array('html' => $html_categories)), array('type' => 'text', 'label' => $this->l('Meta title:'), 'name' => 'meta_title', 'id' => 'name', 'lang' => true, 'required' => true, 'class' => 'copy2friendlyUrl copyMeta2friendlyURL', 'hint' => $this->l('Invalid characters:') . ' <>;=#{}'), array('type' => 'select_category', 'label' => $this->l('Slider'), 'name' => 'proslider', 'empty_message' => $this->l('None'), 'options' => array('html' => $galleries)), array('type' => 'text', 'label' => $this->l('Meta description'), 'name' => 'meta_description', 'lang' => true, 'hint' => $this->l('Invalid characters:') . ' <>;=#{}'), array('type' => 'tags', 'label' => $this->l('Meta keywords'), 'name' => 'meta_keywords', 'lang' => true, 'hint' => $this->l('Invalid characters:') . ' <>;=#{}', 'desc' => $this->l('To add "tags" click in the field, write something, and then press "Enter."')), array('type' => 'text', 'label' => $this->l('Friendly URL'), 'name' => 'link_rewrite', 'required' => true, 'lang' => true, 'hint' => $this->l('Only letters and the minus (-) character are allowed')), array('type' => 'textarea', 'label' => $this->l('Page content'), 'name' => 'content', 'autoload_rte' => true, 'lang' => true, 'rows' => 5, 'cols' => 40, 'hint' => $this->l('Invalid characters:') . ' <>;=#{}'), array('type' => $this->isPS6 ? 'switch' : 'hidden', 'label' => $this->l('Indexation by search engines'), 'name' => 'indexation', 'required' => false, 'class' => 't', 'is_bool' => true, 'values' => array(array('id' => 'indexation_on', 'value' => 1, 'label' => $this->l('Enabled')), array('id' => 'indexation_off', 'value' => 0, 'label' => $this->l('Disabled')))), array('type' => $this->isPS6 ? 'switch' : 'radio', 'label' => $this->l('Displayed:'), 'name' => 'active', 'required' => false, 'class' => 't', 'is_bool' => true, 'values' => array(array('id' => 'active_on', 'value' => 1, 'label' => $this->l('Enabled')), array('id' => 'active_off', 'value' => 0, 'label' => $this->l('Disabled'))))), 'submit' => array('title' => $this->l('Save'), 'class' => 'button btn btn-default')); if ($this->isPS6) { $this->fields_form['buttons'] = array('save_and_preview' => array('name' => 'viewcms', 'type' => 'submit', 'title' => $this->l('Save and preview'), 'class' => 'btn btn-default pull-right', 'icon' => 'process-icon-preview')); } $this->fields_form['submit'] = array('title' => $this->l('Save'), 'class' => 'button btn btn-default pull-right'); if (Shop::isFeatureActive()) { $this->fields_form['input'][] = array('type' => 'shop', 'label' => $this->l('Shop association:'), 'name' => 'checkBoxShopAsso'); } if ($this->isPS6) { if (Validate::isLoadedObject($this->object)) { $this->context->smarty->assign('url_prev', $this->getPreviewUrl($this->object)); } } $this->tpl_form_vars = array('active' => $this->object->active, 'PS_ALLOW_ACCENTED_CHARS_URL', (int) Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL')); return adminController::renderForm(); }
<HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> </HEAD> <BODY> <?php //打印用户列表 include("..\..\controller\adminController.php"); $adminCon=new adminController(); $result=$adminCon->getAllAccount(); // 获取查询结果 $row=mysql_fetch_row($result); echo '<font face="verdana">'; echo '<table border="2" cellpadding="2" cellspacing="0">'; // 显示字段名称 echo "\n<tr>\n"; for ($i=0; $i<mysql_num_fields($result); $i++) { echo "<td><b><font size='1'>". mysql_field_name($result, $i); echo "</font></b></td>\n"; } echo "</tr>\n"; // 定位到第一条记录 mysql_data_seek($result, 0); // 循环取出记录 while ($row=mysql_fetch_row($result)) { echo "<tr>\n";
function __construct() { parent::__construct(''); }
public function __construct() { parent::__construct(); $this->shopObj = new shopModel(); }
public function __construct() { parent::__construct(); $this->systemProductService = new systemProductService(); $this->productService = new productService(); }
public function __construct() { parent::__construct(); $this->homeService = utils::getService('home'); $this->homeModel = $this->homeService->model; }
public function __construct() { parent::__construct(); $this->userApplicationObj = new userApplicationModel(); $this->menuTitle = '商家申请'; }
public function __construct() { parent::__construct(); $this->addressObj = new addressModel(); }
<?php include("..\controller\adminController.php"); $adminCon=new adminController(); $name = $_POST["name"]; $pwd = $_POST["pwd"]; $result=$adminCon->login($name,$pwd); //将网页重新定向到各自工作页面 if($result=="false") header("location:login.php?Error"); else header("location:{$result[2]}.php?id={$result[3]}"); ?>
<?php include '../app/controllers/adminController.php'; include '../app/controllers/helperController.php'; $admin = new adminController(); $helper = new helperController(); ?> <script type="text/javascript"> </script> <!--START MODAL--> <div class="fixed-action-btn"> <a class="btn-floating btn-large waves-effect waves-light red modal-trigger" data-target="modal1"><i class="material-icons">add</i></a> </div> <div id="modal1" class="modal modal-fixed-footer"> <div class="modal-content"> <div class="row"> <div class="input-field col s12"> <input id="testname" type="text" class="validate"> <label for="testname">Название теста</label> </div> </div> <div class="row"> <div class="input-field col s12"> <select id="level"> <option value="" disabled selected>Уровень теста</option> <?php foreach ($helper->getLevel() as $level) { echo '<option value="' . $level['id'] . '">' . $level['level'] . '</option>'; } ?> </select>
<?php include '../app/controllers/adminController.php'; $admin = new adminController(); $model = $admin->getUserTop(); ?> <table class="hoverable"> <thead> <tr> <th data-field="id">Name</th> <th data-field="name">Item Name</th> <th data-field="price">Item Price</th> </tr> </thead> <tbody> <?php foreach ($model as $row) { ?> <tr> <td><?php echo $row['name']; ?> </td> <td><?php echo $row['rate']; ?> </td> <td><?php echo $row['email']; ?>
public function __construct() { $this->adminUserObj = new adminUserModel(); parent::__construct(); $this->menuTitle = '管理员用户'; }
public function __construct() { parent::__construct(); $this->userObj = new userModel(); $this->menuTitle = '用户管理'; }
public function __construct() { parent::__construct(); $this->orderObj = utils::getService('order')->model; }
public function __construct() { parent::__construct(); $this->adminMenuObj = new adminMenuModel(); }
public function __construct() { parent::__construct(); $this->showCategoryModel = new showCategoryModel(); }
public function __construct() { parent::__construct(); }
<?php include "include/db_connect.php"; include "controllers/adminController.php"; $home = new adminController(); $home->view();