public function initialize() { $this->tag->setTitle('全国统一预约挂号平台'); parent::initialize(); $this->assets->addCss('css/slider.css'); $this->assets->addJs('js/power-slider.js'); }
public function __construct() { parent::__construct(); $this->AbaAtiva = 29; $this->AbaAtivaMae = 0; $this->debug(); }
public function initialize() { $this->view->setTemplateAfter('main'); $this->view->hdr = 'Мастера'; Tag::setTitle('Makers Panel'); parent::initialize(); }
public function initialize() { $this->view->setTemplateAfter('main'); $this->view->hdr = 'Купоны'; Tag::setTitle('Coupons Panel'); parent::initialize(); }
/** * Extend ControllerBase initialize() */ public function initialize() { parent::initialize(); $this->view->dbs = Db::find(); //list all dbs in the left column $this->view->currentDbId = $this->request->get('id'); }
function __construct($app, $db, array $data = NULL) { parent::__construct($app, $db, $data); $this->showErrorPage = FALSE; $this->actions = ['fetch', 'upload', 'delete', 'descript']; $this->validateRights([USER_REGISTERED]); }
public function initialize() { $this->view->setTemplateAfter('main'); Phalcon\Tag::setTitle('Hypertext Preprocesor'); $this->loadCustomTrans('index'); parent::initialize(); }
public function __construct($wpdb) { parent::__construct($wpdb); $db = new \Tabulate\DB\Database($this->wpdb); $this->table_names = $db->getTableNames(); $this->template = new \Tabulate\Template('grants.html'); }
public function initialize() { parent::initialize(); //加载js $this->assets->addJs('backend/js/nestable/jquery.nestable.min.js'); $this->assets->addJs('backend/mt-js/specialty.js'); }
function __construct($app, $db, array $data = NULL) { parent::__construct($app, $db, $data); $this->showErrorPage = FALSE; $this->useTransactions = FALSE; $this->actions = ['search']; }
public function editAction() { $this->tag->setTitle('Каталог | Изменить товар'); parent::initialize(); $products = Real::findFirst($this->dispatcher->getParams("id")); $auth = $this->session->get('auth'); $profile = $auth['id']; $get_id = $products->user_id; if ($profile != $get_id) { $this->flash->error("Нет прав редактирования!"); $this->view->prof_user = false; } else { $this->view->prof_user = true; $this->view->product = $products; /*Если есть данные, то сохраняем*/ if ($this->request->isPost()) { $products->name = $this->request->getPost('name'); $products->price = $this->request->getPost('price'); $products->cover = $this->request->getPost('cover'); $products->description = $this->request->getPost('description'); $products->img2 = $this->request->getPost('img2'); $products->img3 = $this->request->getPost('img3'); $products->img4 = $this->request->getPost('img4'); if ($products->update() == false) { foreach ($products->getMessages() as $message) { $this->flash->error((string) $message); } } else { $this->flash->success('Данные успешно сохранены'); } } } }
protected function initialize() { parent::initialize(); $this->setModel("Permission_group_privilege"); $this->view->breadcrumb_cat = 'Cấu hình phân quyền'; $this->view->action = array("index" => "Xem", "edit" => "Sửa", "add" => "Thêm", "delete" => "Xóa", "status" => "Trạng thái"); }
public function initialize() { $this->view->setTemplateAfter('main'); $this->view->hdr = 'Заказы'; Tag::setTitle('Orders Panel'); parent::initialize(); }
/** * Searches for operadora */ public function searchAction($yacimientoId = null) { parent::importarJsTable(); $numberPage = 1; if ($yacimientoId != null) { $operadora = Operadora::find(array('operadora_yacimientoId=:yacimiento_id:', 'bind' => array('yacimiento_id' => $yacimientoId))); } else { if ($this->request->isPost()) { $query = Criteria::fromInput($this->di, "Operadora", $_POST); $this->persistent->parameters = $query->getParams(); } else { $numberPage = $this->request->getQuery("page", "int"); } $parameters = $this->persistent->parameters; if (!is_array($parameters)) { $parameters = array(); } $parameters["order"] = "operadora_id"; $operadora = Operadora::find($parameters); } if (count($operadora) == 0) { $this->flash->notice("No se han encontrado resultados"); return $this->dispatcher->forward(array("controller" => "operadora", "action" => "index")); } $paginator = new Paginator(array("data" => $operadora, "limit" => 25, "page" => $numberPage)); $this->view->page = $paginator->getPaginate(); }
public function initialize() { parent::initialize(); $this->view->setRenderLevel(View::LEVEL_ACTION_VIEW); $this->assets->collection('css')->addCss("css/bootstrap.css")->addCss("css/nivo-lightbox.css")->addCss("css/animate.css")->addCss("css/default.css")->addCss("css/font-awesome.css")->addCss("css/style.css")->addCss("css/responsiveness.css")->setTargetPath('css/ugly.css')->join(true)->setTargetUri('css/ugly.css')->addFilter(new Phalcon\Assets\Filters\Cssmin()); $this->assets->collection('js')->addJs("js/jquery.min.js")->addJs("js/jquery-1.11.0.js")->addJs("js/bootstrap.js")->addJs("js/nivo-lightbox.min.js")->addJs("js/skrollr.js")->addJs("js/parallax.js")->addJs("js/wow.min.js")->addJs("js/SmoothScroll.js")->addJs("js/jquery.easing.min.js")->addJs("js/cbpAnimatedHeader.js")->addJs("js/classie.js")->addJs("js/jqBootstrapValidation.js")->addJs("js/contact.js")->addJs("js/main.js")->setTargetPath('js/ugly.js')->join(true)->setTargetUri('js/ugly.js')->addFilter(new Phalcon\Assets\Filters\Jsmin()); }
public function initialize() { parent::initialize(); $this->view->setLayout('train'); //加载js $this->assets->addJs('backend/mt-js/trateacher.js'); }
/** * Buscando las planillas. * SI el usuario tiene rol de administrador podra ver todas las planillas. * Sino se veran las Habilitadas unicamente */ public function searchAction() { parent::importarJsTable(); $numberPage = 1; if ($this->request->isPost()) { $query = Criteria::fromInput($this->di, "Planilla", $_POST); $this->persistent->parameters = $query->getParams(); } else { $numberPage = $this->request->getQuery("page", "int"); } $parameters = $this->persistent->parameters; if (!is_array($parameters)) { $parameters = array(); } $parameters["order"] = "planilla_id DESC"; $planilla = Planilla::find($parameters); if (count($planilla) == 0) { $this->flash->notice("No se encontraron resultados"); return $this->dispatcher->forward(array("controller" => "planilla", "action" => "index")); } $paginator = new Paginator(array("data" => $planilla, "limit" => 10000, "page" => $numberPage)); $this->view->page = $paginator->getPaginate(); $miSesion = $this->session->get('auth'); if ($miSesion['rol_nombre'] == 'ADMIN') { $this->view->admin = 1; } else { $this->view->admin = 0; } }
public function initialize() { $this->tag->setTitle('Документация'); parent::initialize(); ini_set('display_errors', 0); ini_set('display_startup_errors', 0); }
public function initialize() { $this->view->setTemplateAfter('main'); Phalcon\Tag::setTitle('Downloads'); $this->loadCustomTrans("downloads"); parent::initialize(); }
public function initialize() { parent::initialize(); $this->view->dbs = Db::find(); $this->view->currentDbId = $this->request->get('id'); $this->allowRoles(); }
public function initialize() { $this->tag->setTitle('View Products'); parent::initialize(); parent::GetSideCategories(); $this->handleVoteButtons(); }
public function __construct() { parent::__construct(); $this->objPHPExcel = new PHPExcel(); $this->workSheet = $this->objPHPExcel->getActiveSheet(); $this->debug(); }
public function initialize() { $this->view->setTemplateAfter('main'); $this->view->hdr = 'Интер.'; Tag::setTitle('Internationalization Panel'); parent::initialize(); }
public function initialize() { parent::initialize(); $this->tag->setTitle('培训机构库-51升学网'); $this->assets->addCss("fontend/css/train/train-list.css"); $this->assets->addJs("fontend/js/train_list.js"); }
/** * @remotable * @formHandler */ public function saveForm($a) { //capture the param 'staffList' and loop through the array of IDs //echo $a['staffList']; if (strlen($a['staffList'] > 0)) { $orgID = $this->getOrgID(); $staff = $a['staffList']; $q = Doctrine_Manager::getInstance()->getCurrentConnection(); $query = "UPDATE contact_value SET \r\n\t\t\t\t\t\t\tisRedFlag = CASE \r\n\t\t\t\t\t\t\t\t\tWhen id in ({$staff}) \r\n\t\t\t\t\t\t\t\t\t\t THEN 1 \r\n\t\t\t\t\t\t\t\t\tElse 0\r\n\t\t\t\t\t\t\t\t\tend\r\n\t\t\t\t\t\t WHERE orgID={$orgID}"; $result = $q->execute($query); //$q = Doctrine_Manager::getInstance()->getCurrentConnection(); //$query = "UPDATE `contact_value` SET `isRedFlag` = '0' WHERE `orgID` = $orgID;"; //$result = $q->execute($query); //$query = "UPDATE `contact_value` SET `isRedFlag` = '1' WHERE (`contact_value`.`ID` IN ($staff) AND `orgID` = $orgID);"; //$result = $q->execute($query); //$q = Doctrine_Query::create() //->update('ContactValue') //->set('isRedFlag', 0) //->where('ID NOT IN (' . $a['staffList'] . ')') //->andWhere('orgID = '.$orgID.''); //$q->execute(); //echo $q->getSqlQuery(); } return parent::saveForm($a); }
public function newAction($r_controller = null, $r_action = null, $r_id = null) { if ($this->session->has("couche_id")) { $this->tag->setDefault("couche_id", $this->session->get("couche_id")); } parent::newAction($r_controller, $r_action, $r_id); }
public function initialize() { parent::initialize(); $this->view->setLayout('college'); //加载js $this->assets->addJs('backend/mt-js/colalumnus.js'); }
public function initialize() { parent::initialize(); $this->tag->setTitle('幼儿园,幼教学校库-51升学网'); $this->assets->addCss("fontend/css/school/primary-list.css"); $this->assets->addJs("fontend/js/school_primary_list.js"); }
/** * Searches for equipopozo */ public function searchAction($yacimientoId = null) { parent::importarJsTable(); $numberPage = 1; if ($yacimientoId != null) { $equipopozo = Equipopozo::find(array('equipoPozo_yacimientoId=:yacimiento_id:', 'bind' => array('yacimiento_id' => $yacimientoId))); } else { if ($this->request->isPost()) { //$query = parent::fromInput($this->di, 'Equipopozo', $this->request->getPost()); $query = Criteria::fromInput($this->di, "Equipopozo", $_POST); $this->persistent->parameters = $query->getParams(); } else { $numberPage = $this->request->getQuery("page", "int"); } $parameters = $this->persistent->parameters; if (!is_array($parameters)) { $parameters = array(); } $parameters["order"] = "equipoPozo_id"; $equipopozo = Equipopozo::find($parameters); } if (count($equipopozo) == 0) { $this->flash->notice("No se encontraron resultados en la busqueda"); return $this->dispatcher->forward(array("controller" => "equipopozo", "action" => "index")); } $paginator = new Paginator(array("data" => $equipopozo, "limit" => 25, "page" => $numberPage)); $this->view->page = $paginator->getPaginate(); }
public function initialize() { $this->lang = $this->session->get('currentLang'); $this->strings = $this->translation->transl('global', $this->lang); $this->messages = $this->translation->transl('footer', $this->lang); parent::initialize(); }