Example #1
0
 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('Данные успешно сохранены');
             }
         }
     }
 }
 public function initialize()
 {
     parent::initialize();
     //加载js
     $this->assets->addJs('backend/js/nestable/jquery.nestable.min.js');
     $this->assets->addJs('backend/mt-js/specialty.js');
 }
 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");
 }
Example #4
0
 public function initialize()
 {
     $this->view->setTemplateAfter('main');
     $this->view->hdr = 'Заказы';
     Tag::setTitle('Orders Panel');
     parent::initialize();
 }
Example #5
0
 public function initialize()
 {
     $this->tag->setTitle('全国统一预约挂号平台');
     parent::initialize();
     $this->assets->addCss('css/slider.css');
     $this->assets->addJs('js/power-slider.js');
 }
 public function initialize()
 {
     parent::initialize();
     $this->view->setLayout('train');
     //加载js
     $this->assets->addJs('backend/mt-js/trateacher.js');
 }
Example #7
0
 public function initialize()
 {
     $this->view->setTemplateAfter('main');
     Phalcon\Tag::setTitle('Downloads');
     $this->loadCustomTrans("downloads");
     parent::initialize();
 }
 public function initialize()
 {
     $this->view->setTemplateAfter('main');
     $this->view->hdr = 'Мастера';
     Tag::setTitle('Makers Panel');
     parent::initialize();
 }
Example #9
0
 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();
 }
Example #11
0
 public function initialize()
 {
     // $this->view->setTemplateAfter('main');
     Resource::init($this->assets);
     Tag::setTitle('Welcome');
     parent::initialize();
 }
Example #12
0
 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());
 }
Example #13
0
 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();
 }
Example #14
0
 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");
 }
 public function initialize()
 {
     $this->tag->setTitle('Документация');
     parent::initialize();
     ini_set('display_errors', 0);
     ini_set('display_startup_errors', 0);
 }
Example #16
0
 public function initialize()
 {
     $this->view->setTemplateAfter('main');
     $this->view->hdr = 'Купоны';
     Tag::setTitle('Coupons Panel');
     parent::initialize();
 }
Example #17
0
 public function initialize()
 {
     $this->view->setTemplateAfter('main');
     $this->view->hdr = 'Интер.';
     Tag::setTitle('Internationalization Panel');
     parent::initialize();
 }
 public function initialize()
 {
     parent::initialize();
     $this->view->setLayout('college');
     //加载js
     $this->assets->addJs('backend/mt-js/colalumnus.js');
 }
Example #19
0
 /**
  * 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');
 }
Example #20
0
 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");
 }
Example #21
0
 public function initialize()
 {
     $this->view->setTemplateAfter('main');
     Phalcon\Tag::setTitle('Hypertext Preprocesor');
     $this->loadCustomTrans('index');
     parent::initialize();
 }
 public function initialize()
 {
     $this->modelService = new ProdInfoService();
     $this->view->setTemplateAfter('main');
     $this->view->hdr = 'Переоценка';
     Tag::setTitle('Revaluation Panel');
     parent::initialize();
 }
 public function initialize()
 {
     $this->persistent->parameters = null;
     $phql = "SELECT id, CONCAT(acronyme,\" - \",nom) as  nom FROM  IgoOrganismeResponsable order by acronyme";
     $organisme_desc = $this->modelsManager->executeQuery($phql);
     $this->view->setVar("organisme_desc", $organisme_desc);
     parent::initialize();
 }
 public function initialize()
 {
     $this->modelService = new ProdInfoService();
     $this->view->setTemplateAfter('main');
     $this->view->hdr = 'Курсы валют';
     Tag::setTitle('Currency Rates Panel');
     parent::initialize();
 }
Example #25
0
 public function initialize()
 {
     parent::initialize();
     //        $this->end('ok');
     $this->tag->setTitle('高等院校库-51升学网');
     $this->assets->addCss("fontend/css/school/college-list.css");
     $this->assets->addJs("fontend/js/school_college_list.js");
 }
Example #26
0
 public function initialize()
 {
     $this->modelService = new ProdInfoService();
     $this->view->setTemplateAfter('main');
     $this->view->hdr = 'Вирт. магазины';
     Tag::setTitle('Seller Panel');
     parent::initialize();
 }
 public function initialize()
 {
     parent::initialize();
     // Add import css
     $this->assets->addCss("https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css")->addCss("AdminLTE/dist/css/skins/_all-skins.min.css")->addCss("AdminLTE/plugins/iCheck/flat/blue.css")->addCss("AdminLTE/plugins/morris/morris.css")->addCss("AdminLTE/plugins/jvectormap/jquery-jvectormap-1.2.2.css")->addCss("AdminLTE/plugins/datepicker/datepicker3.css")->addCss("AdminLTE/plugins/daterangepicker/daterangepicker-bs3.css")->addCss("AdminLTE/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css");
     // Add include js
     $this->assets->addJs("AdminLTE/plugins/slimScroll/jquery.slimscroll.min.js")->addJs("AdminLTE/plugins/fastclick/fastclick.min.js")->addJs("https://code.jquery.com/ui/1.11.4/jquery-ui.min.js")->addJs("https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js")->addJs("AdminLTE/plugins/morris/morris.min.js")->addJs("AdminLTE/plugins/sparkline/jquery.sparkline.min.js")->addJs("AdminLTE/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js")->addJs("AdminLTE/plugins/jvectormap/jquery-jvectormap-world-mill-en.js")->addJs("AdminLTE/plugins/knob/jquery.knob.js")->addJs("https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.2/moment.min.js")->addJs("AdminLTE/plugins/daterangepicker/daterangepicker.js")->addJs("AdminLTE/plugins/datepicker/bootstrap-datepicker.js")->addJs("AdminLTE/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js")->addJs("AdminLTE/dist/js/app.min.js")->addJs("AdminLTE/dist/js/demo.js");
 }
Example #28
0
 public function initialize()
 {
     parent::initialize();
     // Start socket server if it is not already started
     //        shell_exec('php ' . __DIR__ . '/../console.sh chat 2>/dev/null >/dev/null &');
     // Set common variables
     $this->view->setVars(['chat_user' => $this->auth, 'chat_messages_hdr' => 'Сообщения', 'socket_host' => $this->request->getServer('SERVER_ADDR'), 'socket_port' => $this->config->socket->port, 'messages_to_show' => self::MESSAGES_TO_SHOW]);
 }
 public function initialize()
 {
     $this->modelService = new ProdInfoService();
     $this->view->setTemplateAfter('main');
     $this->view->hdr = 'Категории';
     Tag::setTitle('Categories Panel');
     parent::initialize();
 }
 public function initialize()
 {
     $this->persistent->parameters = null;
     $phql = "SELECT c.id, CONCAT(c.nom,\" , \",c.prenom) as  nom FROM  IgoContact c, IgoOrganismeResponsable o where o.contact_id=c.id  order by nom";
     $contact_desc = $this->modelsManager->executeQuery($phql);
     $this->view->setVar("contact_desc", $contact_desc);
     parent::initialize();
 }