PATH:
home
/
letacommog
/
letaweb
/
protected
/
modules
/
admin
/
controllers
<?php class ModulecategoryController extends PController { public $layout = 'admin_column'; public function filters() { return array( 'accessControl', ); } public function accesssRules() { $module = $this->getModule(); return array( array('allow', 'actions' => array( 'ajaxupdate','index','create','view','delete','update', ), 'roles' => array($module->templateManagerRole), ), array('deny', // deny all users 'users' => array('*'), ), ); } public function actionIndex() { $this->breadcrumbs = array( Yii::t('admin', 'Module Category'), ); $model = new ModuleCategory('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['ModuleCategory'])) { $model->attributes = $_GET['ModuleCategory']; } $this->render('index', array( //'filtersForm' => $filtersForm, 'model' => $model, )); } public function actionUpdate() { $model = new ModuleCategoryForm('update'); if (isset($_POST['ModuleCategoryForm'])) { $model->attributes = $_POST['ModuleCategoryForm']; if ($model->save()) { $url = $this->createUrl('index'); $this->redirect($url); } } if (!isset($_REQUEST['id'])) { $url = $this->createUrl('index'); $this->redirect($url); } $id = $_REQUEST['id']; $t = ModuleCategory::model()->findByPk((int) $id); if ($t == null) { $url = $this->createUrl('index'); $this->redirect($url); } $this->breadcrumbs = array( Yii::t('admin', 'Module Category') => array('modulecategory/index'), $t->name, ); $attributes = array(); foreach ($model->getAttributes() as $name => $value) { $model->$name = $t->$name; } $this->render('update', array('model' => $model)); } public function actionDelete() { if (!isset($_REQUEST['id'])) { $url = $this->createUrl('index'); $this->redirect($url); } $id = $_REQUEST['id']; $t = ModuleCategory::model()->findByPk((int) $id); if ($t == null) { $url = $this->createUrl('index'); $this->redirect($url); } $t->delete(); } public function actionAjaxUpdate() { $act = $_GET['act']; $autoIdAll = array(); if (isset($_POST['autoId'])) { $autoIdAll = $_POST['autoId']; } if (count($autoIdAll) > 0) { foreach ($autoIdAll as $autoId) { $model = ModuleCategory::model()->findByPk((int) $autoId); if ($act == 'doDelete') { $model->delete(); } if ($model->save()) { echo 'ok'; } else { throw new Exception('Sorry', 500); } } } } public function actionCreate() { $this->breadcrumbs = array( Yii::t('admin', 'Module Category') => array('modulecategory/index'), Yii::t('admin', 'Create'), ); $model = new ModuleCategoryForm('create'); if (isset($_POST['ModuleCategoryForm'])) { $model->attributes = $_POST['ModuleCategoryForm']; if ($model->save()) { $url = $this->createUrl('index'); $this->redirect($url); } } $this->render('create', array('model' => $model)); } }
[+]
..
[-] TemplateController.php
[edit]
[-] PlanController.php
[edit]
[-] DomainController.php
[edit]
[-] WebsiteController.php
[edit]
[-] ConfigController.php
[edit]
[-] TransactionController.php
[edit]
[-] MailtemplateController.php
[edit]
[-] DefaultController.php
[edit]
[-] CategoryController.php
[edit]
[-] DashboardController.php
[edit]
[-] UserController.php
[edit]
[-] LanguageController.php
[edit]
[-] ModuleController.php
[edit]
[-] ModulecategoryController.php
[edit]
[-] PlanDescriptionController.php
[edit]
[-] TermController.php
[edit]
[-] SubscriptionController.php
[edit]
[-] InterfaceController.php
[edit]
[-] ColorController.php
[edit]
[-] ShareButtonController.php
[edit]
[-] SkinpresetController.php
[edit]
[-] ContentController.php
[edit]
[-] LogController.php
[edit]
[-] ProfileController.php
[edit]