/** * Process labels form data depending on $action. * * @access public * @return void */ public function process() { $action = returnGlobal('action'); Yii::app()->loadHelper('admin/label'); $lid = returnGlobal('lid'); if ($action == "updateset" && Permission::model()->hasGlobalPermission('labelsets', 'update')) { updateset($lid); Yii::app()->setFlashMessage(gT("Label set properties sucessfully updated."), 'success'); } if ($action == "insertlabelset" && Permission::model()->hasGlobalPermission('labelsets', 'create')) { $lid = insertlabelset(); } if (($action == "modlabelsetanswers" || $action == "ajaxmodlabelsetanswers") && Permission::model()->hasGlobalPermission('labelsets', 'update')) { modlabelsetanswers($lid); } if ($action == "deletelabelset" && Permission::model()->hasGlobalPermission('labelsets', 'delete')) { if (deletelabelset($lid)) { Yii::app()->setFlashMessage(gT("Label set sucessfully deleted."), 'success'); $lid = 0; } } if ($lid) { $this->getController()->redirect(array("admin/labels/sa/view/lid/" . $lid)); } else { $this->getController()->redirect(array("admin/labels/sa/view")); } }
} $labelsoutput=''; if($_SESSION['USER_RIGHT_SUPERADMIN'] == 1 || $_SESSION['USER_RIGHT_MANAGE_LABEL'] == 1) { $js_admin_includes[]='scripts/labels.js'; if (isset($_POST['sortorder'])) {$postsortorder=sanitize_int($_POST['sortorder']);} if (!isset($action)) {$action=returnglobal('action');} if (!isset($lid)) {$lid=returnglobal('lid');} //DO DATABASE UPDATESTUFF if ($action == "updateset") {updateset($lid);} if ($action == "insertlabelset") {$lid=insertlabelset();} if ($action == "modlabelsetanswers") {modlabelsetanswers($lid);} if ($action == "deletelabelset") {if (deletelabelset($lid)) {$lid=0;}} if ($action == "importlabels") { include("importlabel.php"); } if ($action == "importlabelresources") { include("import_resources_zip.php"); if (isset($importlabelresourcesoutput)) {$labelsoutput.= $importlabelresourcesoutput;} return; } $labelsoutput= "<div class='menubar'>\n" ."\t\t<div class='menubar-title ui-widget-header'>\n"
} if (!isset($action)) { $action = returnglobal('action'); } if (!isset($lid)) { $lid = returnglobal('lid'); } //DO DATABASE UPDATESTUFF if ($action == "updateset") { updateset($lid); } if ($action == "insertlabelset") { $lid = insertlabelset(); } if ($action == "modlabelsetanswers" || $action == "ajaxmodlabelsetanswers") { modlabelsetanswers($lid); } if ($action == "deletelabelset") { if (deletelabelset($lid)) { $lid = 0; } } if ($action == "importlabels") { include "importlabel.php"; } if ($action == "importlabelresources") { include "import_resources_zip.php"; if (isset($importlabelresourcesoutput)) { $labelsoutput .= $importlabelresourcesoutput; } return;
/** * Process labels form data depending on $action. * * @access public * @return void */ public function process() { if (Yii::app()->session['USER_RIGHT_SUPERADMIN'] == 1 || Yii::app()->session['USER_RIGHT_MANAGE_LABEL'] == 1) { if (isset($_POST['method']) && get_magic_quotes_gpc()) { $_POST['method'] = stripslashes($_POST['method']); } $action = returnGlobal('action'); Yii::app()->loadHelper('admin/label'); $lid = returnGlobal('lid'); if ($action == "updateset") { updateset($lid); Yii::app()->session['flashmessage'] = Yii::app()->lang->gT("Label set properties sucessfully updated."); } if ($action == "insertlabelset") { $lid = insertlabelset(); } if ($action == "modlabelsetanswers" || $action == "ajaxmodlabelsetanswers") { modlabelsetanswers($lid); } if ($action == "deletelabelset") { if (deletelabelset($lid)) { Yii::app()->session['flashmessage'] = Yii::app()->lang->gT("Label set sucessfully deleted."); $lid = 0; } } if ($lid) { $this->getController()->redirect($this->getController()->createUrl("admin/labels/sa/view/lid/" . $lid)); } else { $this->getController()->redirect($this->getController()->createUrl("admin/labels/sa/view")); } } }
/** * Process labels form data depending on $action. * * @access public * @return void */ public function process() { if (Permission::model()->hasGlobalPermission('labelsets', 'update')) { if (isset($_POST['method']) && get_magic_quotes_gpc()) { $_POST['method'] = stripslashes($_POST['method']); } $action = returnGlobal('action'); Yii::app()->loadHelper('admin/label'); $lid = returnGlobal('lid'); if ($action == "updateset") { updateset($lid); Yii::app()->setFlashMessage(Yii::app()->lang->gT("Label set properties sucessfully updated."), 'success'); } if ($action == "insertlabelset") { $lid = insertlabelset(); } if ($action == "modlabelsetanswers" || $action == "ajaxmodlabelsetanswers") { modlabelsetanswers($lid); } if ($action == "deletelabelset") { if (deletelabelset($lid)) { Yii::app()->setFlashMessage(Yii::app()->lang->gT("Label set sucessfully deleted."), 'success'); $lid = 0; } } if ($lid) { $this->getController()->redirect(array("admin/labels/sa/view/lid/" . $lid)); } else { $this->getController()->redirect(array("admin/labels/sa/view")); } } }