public function actionSave() { $quest = new CQuestion(); $quest->setAttributes(CRequest::getArray($quest::getClassName())); if ($quest->validate()) { if (!CSession::isAuth()) { $user = ""; } else { $user = CStaffManager::getUser(CSession::getCurrentUser()->getId())->getName(); } $quest->contact_info .= " " . $user . '; ip ' . $_SERVER["REMOTE_ADDR"]; if ($quest->answer_text != '') { $quest->datetime_answ = date("Y-d-m H:i:s", time()); } $quest->save(); if ($this->continueEdit()) { $this->redirect("?action=edit&id=" . $quest->getId()); } else { $this->redirect(WEB_ROOT); } return true; } $this->setData("quest", $quest); $this->renderView("__public/_question_add/edit.tpl"); }
public function __construct() { if (!CSession::isAuth()) { //$this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Справочник видов работ"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Справочная система Портала"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Индивидуальные учебные планы"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Класс-описатели полей"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Управление моделями данных"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Генерация кода по шаблону"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { //$this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Управление валидаторами полей"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Вопросы к ГОС экзаменам"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Управление наборами шаблонов"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Личные сообщения"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Управление приказами УГАТУ и кафедры"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Генератор контроллеров"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Управление доступом пользователей"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { if (!in_array(CRequest::getString("action"), $this->allowedAnonymous)) { $this->redirectNoAccess(); } } $this->_smartyEnabled = true; $this->setPageTitle("Управление таблицами доступа"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { if (!in_array(CRequest::getString("action"), $this->allowedAnonymous)) { $this->redirectNoAccess(); } } $this->_smartyEnabled = true; $this->setPageTitle("Подсистема архивирования"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { if (!in_array(CRequest::getString("action"), $this->allowedAnonymous)) { $this->redirectNoAccess(); } } $this->_smartyEnabled = true; $this->setPageTitle("Учебные группы студентов"); $this->_useDojo = true; parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $this->redirectNoAccess(); } if (CSession::getCurrentUser()->getLevelForCurrentTask() == ACCESS_LEVEL_NO_ACCESS) { $this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Учебная нагрузка"); parent::__construct(); }
public function actionIndex() { $parent = 0; $title = "Нормативные документы"; if (CRequest::getInt("parent")) { $parent = CRequest::getInt("parent"); $parentFolder = CDocumentsManager::getFolder($parent); if (!is_null($parentFolder)) { $title = $parentFolder->title; } } // извлекаем все папки с учетом иерархии $query = new CQuery(); $query->select("f.*")->from(TABLE_DOCUMENT_FOLDERS . " as f")->condition("f.parent_id = " . $parent)->order("f.title asc"); $objects = new CArrayList(); foreach ($query->execute()->getItems() as $ar) { $folder = new CDocumentFolder(new CActiveRecord($ar)); $objects->add($objects->getCount(), $folder); } // теперь извлекаем все файлы $query = new CQuery(); $query->select("f.*")->from(TABLE_DOCUMENTS . " as f")->condition("f.folder_id = " . $parent . " and f.nameFolder like 'gost%'")->order("f.browserFile asc"); foreach ($query->execute()->getItems() as $ar) { $file = new CDocumentFile(new CDocumentActiveRecord($ar)); $objects->add($objects->getCount(), $file); } $this->setData("title", $title); $this->setData("objects", $objects); /** * Генерация меню */ // если есть родительская папка, то переходим в нее if ($parent != 0) { $parentFolder = CDocumentsManager::getFolder($parent); if (!is_null($parentFolder)) { $this->addActionsMenuItem(array("title" => "Назад", "link" => "index.php?action=index&parent=" . $parentFolder->parent_id, "icon" => "actions/edit-undo.png")); } } // если пользователь может чего-нибудь добавлять, то пусть добавит $this->setData("canEdit", false); if (CSession::isAuth()) { if (CSession::getCurrentUser()->getLevelForCurrentTask() == ACCESS_LEVEL_WRITE_ALL || CSession::getCurrentUser()->getLevelForCurrentTask() == ACCESS_LEVEL_WRITE_OWN_ONLY) { $this->addActionsMenuItem(array("title" => "Создать папку", "link" => "index.php?action=add&parent=" . $parent, "icon" => "actions/folder-new.png")); $this->addActionsMenuItem(array("title" => "Загрузить файл", "link" => "files.php?action=add&parent=" . $parent, "icon" => "actions/bookmark-new.png")); $this->setData("canEdit", true); } } /** * Отображение представления */ $this->addCSSInclude("_modules/_documents/style.css"); $this->renderView("_documents/_folder/index.tpl"); }
public function __construct() { if (!CSession::isAuth()) { $action = CRequest::getString("action"); if ($action == "") { $action = "index"; } if (!in_array($action, $this->allowedAnonymous)) { $this->redirectNoAccess(); } } $this->_smartyEnabled = true; $this->setPageTitle("Редактирование страниц портала"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $action = CRequest::getString("action"); if ($action == "") { $action = "index"; } if (!in_array($action, $this->allowedAnonymous)) { $this->redirectNoAccess(); } } $this->_smartyEnabled = true; $this->setPageTitle("Содержание разделов дисциплины"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $action = CRequest::getString("action"); if ($action == "") { $action = "index"; } if (!in_array(CRequest::getString("action"), $this->allowedAnonymous)) { $this->redirectNoAccess(); } } $this->_smartyEnabled = true; $this->setPageTitle("Предзащита ВКР - студенты"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $action = CRequest::getString("action"); if ($action == "") { $action = "index"; } if (!in_array($action, $this->allowedAnonymous)) { $this->redirectNoAccess(); } } $this->_smartyEnabled = true; $this->setPageTitle("Управление сотрудниками кафедры"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $action = CRequest::getString("action"); if ($action == "") { $action = "index"; } if (!in_array($action, $this->allowedAnonymous)) { $this->redirectNoAccess(); } } $this->_smartyEnabled = true; $this->setPageTitle("Рейтинг преподавателей по публикациям"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $action = CRequest::getString("action"); if ($action == "") { $action = "index"; } if (!in_array($action, $this->allowedAnonymous)) { $this->redirectNoAccess(); } } $this->_useDojo = true; $this->_smartyEnabled = true; $this->setPageTitle("Комиссии ГАК"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $action = CRequest::getString("action"); if ($action == "") { $action = "index"; } if (!in_array($action, $this->allowedAnonymous)) { $this->redirectNoAccess(); } } else { if (CSession::getCurrentUser()->getLevelForCurrentTask() == ACCESS_LEVEL_NO_ACCESS) { $this->redirectNoAccess(); } } $this->_smartyEnabled = true; $this->setPageTitle("Новости портала кафедры АСУ"); parent::__construct(); }
public function getAuthorName() { $result = ""; /** * Если включена защита персональных данных и * пользователь не авторизован, то не показываем ссылку */ if (CSettingsManager::getSettingValue("hide_personal_data")) { if (!CSession::isAuth()) { return $result; } } if (!is_null($this->document)) { if (!is_null($this->document->person)) { $result = $this->document->person->getName(); } } return $result; }
public function actionViewFiles() { $files = CLibraryManager::getFilesByFolder(CRequest::getInt("id")); if (!is_null(CRequest::getFilter("author"))) { $author = CRequest::getFilter("author"); } else { $author = CSession::getCurrentUser()->getId(); } $this->addActionsMenuItem(array(array("title" => "Назад", "link" => WEB_ROOT . "_modules/_library/index.php?action=view&filter=author:" . CRequest::getFilter("author"), "icon" => "actions/edit-undo.png"))); if (CSession::isAuth() and (CSession::getCurrentUser()->getLevelForCurrentTask() == ACCESS_LEVEL_WRITE_OWN_ONLY or CSession::getCurrentUser()->getLevelForCurrentTask() == ACCESS_LEVEL_WRITE_ALL)) { $this->addActionsMenuItem(array(array("title" => "Добавить файл", "link" => WEB_ROOT . "_modules/_library/index.php?action=addFile&id=" . CRequest::getInt("id") . "&filter=author:" . CRequest::getFilter("author"), "icon" => "actions/list-add.png"))); } $this->setData("files", $files); $this->renderView("_library/viewFiles.tpl"); }
public function actionSaveCalendar() { if (!CSession::isAuth()) { $this->redirectNoAccess(); } $cal = CFactory::createCalendar(); $cal->setName(CRequest::getString("name")); $cal->setDescription(CRequest::getString("description")); $cal->setDefault(false); $cal->setResource(CSession::getCurrentPerson()->getResource()); $cal->save(); $this->redirect(WEB_ROOT . "_modules/_calendar/"); }
/** * ФИО автора * * @return string */ public function getAuthorName() { /** * Если включена защита персональных данных, то не показываем * ФИО. Также не показываем ее если пользователь не авторизован */ if (CSettingsManager::getSettingValue("hide_personal_data")) { if (CSession::isAuth()) { if (is_null($this->author)) { return ""; } else { if (is_null($this->author->getPerson())) { return ""; } else { return $this->author->getPerson()->getName(); } } } } else { if (is_null($this->author)) { return ""; } else { if (is_null($this->author->getPerson())) { return ""; } else { return $this->author->getPerson()->getName(); } } } }