本文整理汇总了PHP中Request::quoted方法的典型用法代码示例。如果您正苦于以下问题:PHP Request::quoted方法的具体用法?PHP Request::quoted怎么用?PHP Request::quoted使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Request
的用法示例。
在下文中一共展示了Request::quoted方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show_action
/**
* show and search log events
*/
function show_action()
{
$this->action_id = Request::option('action_id');
$this->object_id = Request::option('object_id');
$this->log_actions = $this->event_log->get_used_log_actions();
$this->types = $this->event_log->get_object_types();
// restrict log events to object scope
if (Request::get('search') && Request::get('search') != '') {
$this->type = Request::get('type');
$this->search = Request::get('search');
$objects = $this->event_log->find_objects($this->type, $this->search, $this->action_id);
if (count($objects) > 0) {
$this->objects = $objects;
} else {
$this->error_msg = _('Kein passendes Objekt gefunden.');
}
}
// find all matching log events
if (Request::get('search') === '' || isset($this->object_id)) {
$this->start = (int) Request::int('start');
$this->format = Request::quoted('format');
$this->num_entries = $this->event_log->count_log_events($this->action_id, $this->object_id);
if (Request::get('back') || Request::submitted('back')) {
$this->start = max(0, $this->start - 50);
} else {
if (Request::get('forward') || Request::submitted('forward')) {
$this->start = min($this->num_entries, $this->start + 50);
}
}
$this->log_events = $this->event_log->get_log_events($this->action_id, $this->object_id, $this->start);
}
}
示例2: before_filter
/**
* Before filter, set up the page by initializing the session and checking
* all conditions.
*
* @param String $action Name of the action to be invoked
* @param Array $args Arguments to be passed to the action method
*/
public function before_filter(&$action, &$args)
{
parent::before_filter($action, $args);
if (!Config::Get()->ELEARNING_INTERFACE_ENABLE) {
throw new AccessDeniedException(_('Elearning-Interface ist nicht aktiviert.'));
} else {
$this->elearning_active = true;
}
PageLayout::setHelpKeyword('Basis.Ilias');
PageLayout::setTitle($_SESSION['SessSemName']["header_line"] . " - " . _("Lernmodule"));
checkObject();
// do we have an open object?
checkObjectModule('elearning_interface');
object_set_visit_module('elearning_interface');
$this->search_key = Request::get('search_key');
$GLOBALS['search_key'] = $this->search_key;
$this->cms_select = Request::quoted('cms_select');
$GLOBALS['cms_select'] = $this->cms_select;
$this->open_all = Request::get('open_all');
$this->close_all = Request::get('close_all');
$this->new_account_cms = Request::get('new_account_cms');
$this->module_system_type = Request::get('module_system_type');
$this->module_id = Request::get('module_id');
$this->module_type = Request::get('module_type');
$this->anker_target = Request::get('anker_target');
$this->seminar_id = $_SESSION['SessSemName'][1];
$this->rechte = $GLOBALS['perm']->have_studip_perm('tutor', $this->seminar_id);
if (!isset($GLOBALS['ELEARNING_INTERFACE_MODULES'][$this->new_account_cms])) {
unset($this->new_account_cms);
}
if (!isset($GLOBALS['ELEARNING_INTERFACE_MODULES'][$this->cms_select])) {
unset($this->cms_select);
}
if ($this->seminar_id != $_SESSION['elearning_open_close']["id"]) {
unset($_SESSION['cache_data']);
unset($_SESSION['elearning_open_close']);
}
if ($this->open_all != "") {
$_SESSION['elearning_open_close']["all open"] = true;
} elseif ($this->close_all != "") {
$_SESSION['elearning_open_close']["all open"] = "";
}
$_SESSION['elearning_open_close']["type"] = "seminar";
$_SESSION['elearning_open_close']["id"] = $this->seminar_id;
if (Request::get('do_open')) {
$this->anker_target = Request::get('do_open');
$_SESSION['elearning_open_close'][Request::get('do_open')] = true;
} elseif (Request::get('do_close')) {
$this->anker_target = Request::get('do_close');
$_SESSION['elearning_open_close'][Request::get('do_close')] = false;
}
$this->sidebar = Sidebar::get();
$this->sidebar->setImage('sidebar/learnmodule-sidebar.png');
$this->sidebar->setContextAvatar(CourseAvatar::getAvatar($this->seminar_id));
}
示例3: testStringParam
public function testStringParam()
{
$this->assertNull(Request::get('null'));
$this->assertSame(Request::get('null', 'foo'), 'foo');
$this->assertSame(Request::get('a'), 'test');
$this->assertSame(Request::get('b'), '\\h1"');
$this->assertSame(Request::get('c'), '-23');
$this->assertSame(Request::get('d'), '12.7');
$this->assertNull(Request::get('v2'));
$this->assertNull(Request::quoted('null'));
$this->assertSame(Request::quoted('null', 'foo'), 'foo');
$this->assertSame(Request::quoted('b'), '\\\\h1\\"');
$this->assertNull(Request::quoted('v2'));
}
示例4: print_lit_import_dlg
function print_lit_import_dlg()
{
global $username, $_range_id, $plugin_name, $LIT_IMPORT_PLUGINS;
$plugin_name = Request::quoted('plugin_name');
if (!$plugin_name) {
$plugin_name = "EndNote";
}
$plugin = array();
if ($plugin_name) {
foreach ($LIT_IMPORT_PLUGINS as $p) {
if ($p["name"] == $plugin_name) {
$plugin = $p;
break;
}
}
}
$template = $GLOBALS['template_factory']->open('literatur/import_lit_list');
$template->set_attribute('plugin_name', $plugin_name);
$template->set_attribute('plugin', $plugin);
$template->set_attribute('_range_id', $_range_id);
$template->set_attribute('username', Request::quoted('username'));
echo $template->render();
}
示例5: index_action
function index_action()
{
if (!$GLOBALS['perm']->have_perm("admin")) {
throw new AccessDeniedException(_("Sie sind nicht berechtigt, dieses Plugin zu benutzen."));
}
$db = DBManager::get();
if (Request::submitted('do_search_source')) {
$result = search_range(Request::quoted('search_source'));
if (is_array($result)) {
$result = array_filter($result, function ($r) {
return $r["type"] == "sem";
});
if (count($result)) {
PageLayout::postMessage(MessageBox::success(sprintf(_("Ihre Sucher ergab %s Treffer."), count($result))));
$show_source_result = true;
}
} else {
PageLayout::postMessage(MessageBox::info(_("Ihre Suche ergab keine Treffer.")));
}
}
if (Request::submitted('do_choose_source')) {
$source_id = Request::option('search_source_result');
$copy_count = 5;
Request::set('to_copy', null);
} else {
if (Request::submitted('source_id')) {
$source_id = Request::option('source_id');
$copy_count = Request::int('copy_count');
if ($copy_count < 1) {
$copy_count = 1;
}
}
}
if ($source_id) {
$source = Seminar::getInstance($source_id);
$source_name = $source->getName() . ' (' . $source->getStartSemesterName() . ')';
$copy_type = Request::int('copy_type', $source->status);
if (SeminarCategories::getByTypeId($copy_type)->course_creation_forbidden) {
$copy_type = 0;
}
if (SeminarCategories::getByTypeId($source->status)->only_inst_user) {
$search_template = "user_inst";
} else {
$search_template = "user";
}
$bet_inst = $db->query("SELECT institut_id FROM seminar_inst WHERE seminar_id=" . $db->quote($source_id))->fetchAll(PDO::FETCH_COLUMN);
$source_dozenten = array_keys($source->getMembers('dozent'));
if ($copy_count) {
$r = Request::getArray('to_copy');
$delete_lecturer = Request::getArray('delete_lecturer');
$add_lecturer = count(Request::getArray('add_lecturer')) ? (int) key(Request::getArray('add_lecturer')) : null;
for ($i = 0; $i < $copy_count; $i++) {
$to_copy['nr'][$i] = isset($r['nr'][$i]) ? $r['nr'][$i] : $source->getNumber();
$to_copy['name'][$i] = isset($r['name'][$i]) ? $r['name'][$i] : $source->getName();
$to_copy['participants'][$i] = isset($r['participants'][$i]) ? 1 : 0;
$to_copy['lecturers'][$i] = $r['lecturers'][$i];
if (empty($to_copy['lecturers'][$i])) {
$to_copy['lecturers'][$i] = $source_dozenten;
} else {
if (isset($delete_lecturer[$i]) && count($to_copy['lecturers'][$i]) > 1) {
$to_delete = array_search(key($delete_lecturer[$i]), $to_copy['lecturers'][$i]);
if ($to_delete !== false) {
unset($to_copy['lecturers'][$i][$to_delete]);
}
}
}
if ($add_lecturer === $i && Request::option('add_doz_' . $add_lecturer)) {
$to_copy['lecturers'][$i][] = Request::option('add_doz_' . $add_lecturer);
}
$to_copy['search_lecturer'][$i] = new PermissionSearch($search_template, sprintf(_("%s auswählen"), get_title_for_status('dozent', 1, $source->status)), "user_id", array('permission' => 'dozent', 'exclude_user' => $to_copy['lecturers'][$i], 'institute' => $bet_inst));
}
}
if (Request::submitted('do_copy') && count($to_copy)) {
$copied = array();
$lecturer_insert = $db->prepare("INSERT INTO seminar_user (seminar_id,user_id,status,position,gruppe,comment,visible,mkdate) VALUES (?,?,'dozent',?,?,'','yes',UNIX_TIMESTAMP())");
$copy_seminar_inst = $db->prepare("INSERT INTO seminar_inst (seminar_id,institut_id) SELECT ?,institut_id FROM seminar_inst WHERE seminar_id=?");
$copy_seminar_sem_tree = $db->prepare("INSERT INTO seminar_sem_tree (seminar_id,sem_tree_id) SELECT ?,sem_tree_id FROM seminar_sem_tree WHERE seminar_id=?");
$copy_seminar_user = $db->prepare("INSERT IGNORE INTO seminar_user (seminar_id,user_id,status,gruppe, mkdate,comment,position) SELECT ?,user_id,status,gruppe,UNIX_TIMESTAMP(),'',0 FROM seminar_user WHERE status IN ('user','autor','tutor') AND seminar_id=?");
$copy_seminar_userdomains = $db->prepare("INSERT INTO seminar_userdomains (seminar_id,userdomain_id) SELECT ?,userdomain_id FROM seminar_userdomains WHERE seminar_id=?");
$copy_statusgruppen = $db->prepare("INSERT INTO statusgruppen (statusgruppe_id,name,range_id,position,size,selfassign,mkdate) SELECT MD5(CONCAT(statusgruppe_id, ?)),name,?,position,size,selfassign,UNIX_TIMESTAMP() FROM statusgruppen WHERE range_id=?");
$copy_statusgruppe_user = $db->prepare("INSERT INTO statusgruppe_user (statusgruppe_id,user_id,position) SELECT MD5(CONCAT(statusgruppe_user.statusgruppe_id, ?)),user_id,statusgruppe_user.position FROM statusgruppen INNER JOIN statusgruppe_user USING(statusgruppe_id) WHERE range_id=?");
for ($i = 0; $i < $copy_count; $i++) {
$new_sem = Course::build($source->toArray());
$new_sem->setId($new_sem->getNewId());
$new_sem_id = $new_sem->id;
$new_sem->status = Request::int('copy_type', 1);
$new_sem->name = $to_copy['name'][$i];
$new_sem->veranstaltungsnummer = $to_copy['nr'][$i];
$new_sem->store();
if (!$new_sem->isNew()) {
log_event("SEM_CREATE", $new_sem_id);
$gruppe = (int) select_group($new_sem->start_time);
$position = 1;
foreach ($to_copy['lecturers'][$i] as $lecturer) {
$lecturer_insert->execute(array($new_sem_id, $lecturer, $position, $gruppe));
}
$copy_seminar_inst->execute(array($new_sem_id, $source_id));
$copy_seminar_sem_tree->execute(array($new_sem_id, $source_id));
$copy_seminar_userdomains->execute(array($new_sem_id, $source_id));
if ($to_copy['participants'][$i]) {
//.........这里部分代码省略.........
示例6: ob_start
// +---------------------------------------------------------------------------+
require '../lib/bootstrap.php';
ob_start();
page_open(array("sess" => "Seminar_Session", "auth" => "Seminar_Default_Auth", "perm" => "Seminar_Perm", "user" => "Seminar_User"));
$o_mode = Request::option('o_mode');
$xml_file_id = Request::option('xml_file_id',"");
$xslt_filename = Request::quoted('xslt_filename');
$page = Request::option('page');
$filter = Request::option('filter');
$ex_type = Request::quoted('ex_type');
$ex_sem = Request::option('ex_sem');
$format = Request::option('format');
$choose = Request::quoted('choose');
$range_id = Request::option('range_id');
$sidebar = Sidebar::Get();
$sidebar->setImage('sidebar/export-sidebar.png');
if (($o_mode != "direct") AND ($o_mode != "passthrough"))
{
$perm->check("tutor");
include ('lib/seminar_open.php'); // initialise Stud.IP-Session
}
//$i_page = "my_courses.php";
//$EXPORT_ENABLE = TRUE;
//$PATH_EXPORT = "export";
// -- here you have to put initialisations for the current page
示例7: checkData
function checkData()
{
global $invalidEntries;
// check the standard role data
if (!Request::get('new_name') && Request::get('presetName') != 'none') {
$this->name = remove_magic_quotes(Request::get('presetName'));
} else {
$this->name = remove_magic_quotes(Request::get('new_name'));
}
$this->size = (int) Request::int('new_size');
// check if we have to remove the self_assign_exclusive-flag
$this->selfassign = SetSelfAssign($this->statusgruppe_id, Request::quoted('new_selfassign') ? 1 : 0);
/*if (Request::quoted('new_selfassign')) {
if ($this->selfassign == 0) {
$this->selfassign = 1;
}
} else {
if ($this->selfassign == 2) {
if ($GLOBALS['SessSemName']) {
SetSelfAssignExclusive($GLOBALS['SessSemName'][1], false);
}
}
$this->selfassign = 0;
}*/
if (Request::get('groupfolder')) {
// check if there already exists a folder
$stmt = DBManager::get()->prepare("SELECT COUNT(*) as c FROM folder WHERE range_id = ?");
$stmt->execute(array($this->statusgruppe_id));
if ($folder = $stmt->fetch(PDO::FETCH_ASSOC)) {
if ($folder['c'] == 0) {
// if no folder exists, we create one
$title = _("Dateiordner der Gruppe:") . ' ' . $this->name;
$description = _("Ablage für Ordner und Dokumente dieser Gruppe");
$permission = 15;
create_folder(addslashes($title), $description, $this->statusgruppe_id, $permission);
$this->messages['msg'][] = _("Es wurde ein Gruppenordner angelegt.");
}
}
}
if (!$this->isSeminar()) {
// check the datafields
foreach (Request::quotedArray('datafields') as $id => $data) {
$struct = DataField::find($id);
$entry = DataFieldEntry::createDataFieldEntry($struct, array($this->range_id, $this->statusgruppe_id));
$entry->setValueFromSubmit($data);
if ($entry->isValid()) {
$entry->store();
} else {
$invalidEntries[$struct->id] = $entry;
}
}
// a group cannot be its own vather!
if (Request::get('vather') == $this->statusgruppe_id) {
$this->messages['error'][] = _("Sie könne diese Gruppe nicht sich selbst unterordnen!");
} else {
// check if the group shall be moved
if (Request::get('vather') != 'nochange') {
if (Request::option('vather') == 'root') {
$vather_id = $GLOBALS['range_id'];
} else {
$vather_id = Request::option('vather');
}
if (!isVatherDaughterRelation($this->statusgruppe_id, $vather_id)) {
$this->range_id = $vather_id;
//$db->query("UPDATE statusgruppen SET range_id = '$vather_id' WHERE statusgruppe_id = '{$this->statusgruppe_id}'");
} else {
$this->messages['error'][] = _("Sie können diese Gruppe nicht einer ihr untergeordneten Gruppe zuweisen!");
}
}
}
}
if (!$this->isSeminar() && is_array($invalidEntries)) {
$this->messages['error'][] = _("Korrigieren Sie die fehlerhaften Eingaben!");
return false;
}
return true;
}
示例8: getContent
function getContent ($args) {
global $_fullname_sql;
$content = array();
$dbv = DbView::getView('literatur');
if (is_array($args) && isset($args['user_id'])) {
$tree = TreeAbstract::GetInstance("StudipLitList", $args['user_id']);
} else {
preg_match(':^([a-z_-]{0,50})$:i', Request::quoted('username'), $matches);
$tree = TreeAbstract::GetInstance("StudipLitList", get_userid($matches[1]));
}
if ($lists = $tree->getVisibleListIds()) {
for ($i = 0; $i < count($lists); ++$i) {
if ($this->config->getValue($this->name, 'showlastchange')) {
// && ($tree->tree_data[$lists[$i]]['chdate'] > $last_modified_since) ){
$content['LITLISTS']['LITLIST'][$i]['LITLIST_CHANGE-DATE'] = strftime($this->config->getValue('Main', 'dateformat'),
$tree->tree_data[$lists[$i]]['chdate']);
$content['LITLISTS']['LITLIST'][$i]['LITLIST_FULLNAME'] = $tree->tree_data[$lists[$i]]['fullname'];
$content['LITLISTS']['LITLIST'][$i]['LITLIST_NAME'] = $tree->tree_data[$lists[$i]]['name'];
} else {
$content['LITLISTS']['LITLIST'][$i]['LITLIST_NAME'] = $tree->tree_data[$lists[$i]]['name'];
}
if ($tree->hasKids($lists[$i])){
$dbv->params[0] = $lists[$i];
$rs = $dbv->get_query("view:LIT_LIST_GET_ELEMENTS");
$j = 0;
while ($rs->next_record()){
if ( ($this->config->getValue($this->name, 'showlastchange'))) {
// && ($tree->tree_data[$rs->f('list_element_id')]['chdate'] > $last_modified_since) ){
$content['LITLISTS']['LITLIST'][$i]['LITLIST_ITEM'][$j]['LITLIST_ITEM_CHANGE-DATE'] = strftime($this->config->getValue('Main', 'dateformat'),
$tree->tree_data[$rs->f('list_element_id')]['chdate']);
$content['LITLISTS']['LITLIST'][$i]['LITLIST_ITEM'][$j]['LITLIST_ITEM_FULLNAME'] = $tree->tree_data[$rs->f('list_element_id')]['fullname'];
}
$content['LITLISTS']['LITLIST'][$i]['LITLIST_ITEM'][$j]['LITLIST_ITEM_ELEMENT'] = ExternModule::ExtFormatReady($tree->getFormattedEntry($rs->f('list_element_id'), $rs->Record));
$j++;
}
}
}
}
return $content;
}
示例9: SemesterData
$_SESSION['_lit_data_id'] = Request::option('_lit_data_id');
}
$_check_list = Request::optionArray('_check_list');
if (!empty($_check_list)) {
$_SESSION['_check_list'] = Request::optionArray('_check_list');
}
if (Request::option('_check_plugin')) {
$_SESSION['_check_plugin'] = Request::option('_check_plugin');
}
$_semester = new SemesterData();
$element = new StudipLitCatElement();
if (Request::option('cmd') == 'check' && !isset($_check_list)) {
Request::set('_check_list', array());
}
//my_session_var(array('_semester_id','_inst_id','_anker_id','_open','_lit_data','_lit_data_id','_check_list','_check_plugin'));
if (Request::quoted('send')) {
$_SESSION['_anker_id'] = null;
$_SESSION['_open'] = null;
$_SESSION['_lit_data'] = null;
$_SESSION['_lit_data_id'] = null;
$_SESSION['_check_list'] = null;
}
if (Request::get('open_element')) {
$_SESSION['_open'][Request::option('open_element')] = true;
$_anker_id = Request::option('open_element');
}
if (Request::get('close_element')) {
unset($_SESSION['_open'][Request::option('close_element')]);
$_SESSION['_anker_id'] = Request::option('close_element');
}
if (Request::option('_catalog_id')) {
示例10: savemodules_action
/**
* sets the global module and plugin settings for studygroups
*
* @return void
*/
function savemodules_action()
{
global $perm;
$perm->check("root");
PageLayout::setHelpKeyword('Admin.Studiengruppen');
if (Request::quoted('institute') == 'invalid') {
$errors[] = _("Bitte wählen Sie eine Einrichtung aus, der die Studiengruppen zugeordnet werden sollen!");
}
if (!Request::quoted('terms') || Request::quoted('terms') == 'invalid') {
$errors[] = _("Bitte tragen Sie Nutzungsbedingungen ein!");
}
if ($errors) {
$this->flash['messages'] = array('error' => array('title' => 'Die Studiengruppen konnten nicht aktiviert werden!', 'details' => $errors));
$this->flash['institute'] = Request::get('institute');
$this->flash['terms'] = Request::get('terms');
}
if (!$errors) {
$cfg = Config::get();
if ($cfg->STUDYGROUPS_ENABLE == false && count(studygroup_sem_types()) > 0) {
$cfg->store("STUDYGROUPS_ENABLE", true);
$this->flash['success'] = _("Die Studiengruppen wurden aktiviert.");
}
if (Request::get('institute')) {
$cfg->store('STUDYGROUP_DEFAULT_INST', Request::quoted('institute'));
$cfg->store('STUDYGROUP_TERMS', Request::quoted('terms'));
$this->flash['success'] = _("Die Einstellungen wurden gespeichert!");
} else {
$this->flash['error'] = _("Fehler beim Speichern der Einstellung!");
}
}
$this->redirect('course/studygroup/globalmodules');
}
示例11: while
while ($rs->next_record()) {
$found_items[] = htmlReady($the_tree->tree->getItemPath($rs->f("item_id")));
$the_tree->openItem($rs->f("item_id"));
}
}
if (Request::get('search_user') && strlen(Request::get('search_user')) > 1) {
$view->params[0] = "%" . Request::quoted('search_user') . "%";
$view->params[1] = "%" . Request::quoted('search_user') . "%";
$rs = $view->get_query("view:TREE_SEARCH_USER");
while ($rs->next_record()) {
$found_items[] = htmlReady($the_tree->tree->getItemPath($rs->f("item_id")));
$the_tree->openItem($rs->f("item_id"));
}
}
if (Request::get('search_sem') && strlen(Request::get('search_sem')) > 1) {
$view->params[0] = "%" . Request::quoted('search_sem') . "%";
$rs = $view->get_query("view:TREE_SEARCH_SEM");
while ($rs->next_record()) {
$found_items[] = htmlReady($the_tree->tree->getItemPath($rs->f("item_id")));
$the_tree->openItem($rs->f("item_id"));
}
}
if (count($found_items)) {
$message = MessageBox::info(_('Gefundene Einrichtungen:'), $found_items);
} else {
$message = MessageBox::info(_('Es konnte keine Einrichtung gefunden werden, die Ihrer Suchanfrage entspricht.'));
}
PageLayout::postMessage($message);
}
?>
<h1><?php
示例12: display_folder_body
}
}
//Frage den Ordnerkörper ab
if (Request::quoted("getfolderbody")) {
if ($folder_tree->isExecutable(Request::quoted("getfolderbody") , $user->id)) {
display_folder_body(Request::quoted("getfolderbody"), $folder_system_data["open"], null, $folder_system_data["move"], null, null, null, null);
}
}
//Dateien eines Ordners sollen sortiert werden nach einem Array
if (Request::quoted("folder_sort")) {
if (($rechte) && (Request::quoted("folder_sort") == "root")) {
} else {
if (($rechte) || ($folder_tree->isWriteable(Request::quoted("folder_sort") , $user->id))) {
$file_order = explode(",", Request::get('file_order'));
$sorttype = "";
if ($file_order) {
$query = "SELECT 1 FROM dokumente WHERE dokument_id = ?";
$statement = DBManager::get()->prepare($query);
$statement->execute(array($file_order[0]));
$result = $statement->fetchColumn();
if ($result) {
$sorttype = 'file';
} else {
$query = "SELECT 1 FROM folder WHERE folder_id = ?";
$statement = DBManager::get()->prepare($query);
$statement->execute(array($file_order[0]));
$result = $statement->fetchColumn();
if ($result) {
示例13: page_open
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// +---------------------------------------------------------------------------+
require '../lib/bootstrap.php';
page_open(array("sess" => "Seminar_Session", "auth" => "Seminar_Auth", "perm" => "Seminar_Perm", 'user' => "Seminar_User"));
$perm->check("autor");
$search_key = Request::quoted('search_key');
$cms_select = Request::quoted('cms_select');
$new_account_cms = Request::quoted('new_account_cms');
include ('lib/seminar_open.php'); // initialise Stud.IP-Session
require_once ('lib/messaging.inc.php');
PageLayout::setTitle(_("Lernmodulsuche"));
if (Request::option('do_open'))
$_SESSION['print_open_search'][Request::option('do_open')] = true;
elseif (Request::option('do_close'))
$_SESSION['print_open_search'][Request::option('do_close')] = false;
if (Config::get()->ELEARNING_INTERFACE_ENABLE)
{
include_once ($RELATIVE_PATH_ELEARNING_INTERFACE ."/" . "ELearningUtils.class.php");
示例14: execCommandMarkSem
function execCommandMarkSem(){
$item_id = Request::option('item_id');
$marked_sem_array = Request::quotedArray('marked_sem');
$marked_sem = array_values(array_unique($marked_sem_array));
$sem_aktion = explode("_",Request::quoted('sem_aktion'));
if (($sem_aktion[0] == 'mark' || $sem_aktion[1] == 'mark') && count($marked_sem)){
$count_mark = 0;
for ($i = 0; $i < count($marked_sem); ++$i){
if (!isset($this->marked_sem[$marked_sem[$i]])){
++$count_mark;
$this->marked_sem[$marked_sem[$i]] = true;
}
}
if ($count_mark){
$this->msg[$item_id] = "msg§" . sprintf(_("Es wurde(n) %s Veranstaltung(en) der Merkliste hinzugefügt."),$count_mark);
}
}
if ($this->isItemAdmin($item_id)){
if (($sem_aktion[0] == 'del' || $sem_aktion[1] == 'del') && count($marked_sem)){
$not_deleted = array();
foreach($marked_sem as $key => $seminar_id){
$seminar = new Seminar($seminar_id);
if(count($seminar->getStudyAreas()) == 1){
$not_deleted[] = $seminar->getName();
unset($marked_sem[$key]);
}
}
if ($this->msg[$item_id]){
$this->msg[$item_id] .= "<br>";
} else {
$this->msg[$item_id] = "msg§";
}
if(count($marked_sem)){
$count_del = $this->tree->DeleteSemEntries($item_id, $marked_sem);
$this->msg[$item_id] .= sprintf(_("%s Veranstaltungszuordnung(en) wurde(n) aufgehoben."),$count_del);
}
if(count($not_deleted)){
$this->msg[$item_id] .= '<br>'
. sprintf(_("Für folgende Veranstaltungen wurde die Zuordnung nicht aufgehoben, da es die einzige Zuordnung ist: %s")
, '<br>'.htmlready(join(', ', $not_deleted)));
}
}
$this->anchor = $item_id;
$this->open_items[$item_id] = true;
return true;
}
return false;
}
示例15: page_open
* @author Peter Thienel <thienel@data-quest.de>, Suchi & Berg GmbH <info@data-quest.de>
* @author Jens Schmelzer <jens.schmelzer@fh-jena.de>
* @license http://www.gnu.org/licenses/gpl-2.0.html GPL version 2
* @category Stud.IP
* @package calendar
*/
use Studip\Button, Studip\LinkButton;
page_open(array("sess" => "Seminar_Session", "auth" => "Seminar_Auth", "perm" => "Seminar_Perm", "user" => "Seminar_User"));
include ('lib/seminar_open.php'); // initialise Stud.IP-Session
$atime = Request::int('atime');
$element_switch = Request::get('element_switch', 0); // Wert für Auswahl der Feldbezeichner
$element_depending = (!is_null(Request::get('element_depending')) && preg_match('!^[0-9a-z_-]{2,40}$!i', Request::get('element_depending'))) ? Request::get('element_depending') : '';
$form_name = (!is_null(Request::get('form_name')) && preg_match('!^[0-9a-z_-]{2,40}$!i', Request::get('form_name'))) ? Request::quoted('form_name') : '';
$submit = Request::int('submit');
$c = !is_null(Request::get('c')) ? Request::get('c') : 0; // Zaehler wenn mehrere gleiche Eingabefelder im Zielformular
$mcount = Request::get('mcount', 1); // Anzahl der anzuzeigenden Monate
$ss = Request::int('ss', ''); // Startstunde
$sm = Request::int('sm', ''); // Startminute
$es = Request::int('es', ''); // Endstunde
$em = Request::int('em', ''); // Endminute
$q = ($ss !== '') ? "&ss=$ss&sm=$sm&es=$es&em=$em" : '';
// Array mit Standardzeiten vorhanden?
if (isset($GLOBALS['TIME_PRESETS']) && is_array($GLOBALS['TIME_PRESETS']) && count($GLOBALS['TIME_PRESETS']) > 0) {
$zz = $GLOBALS['TIME_PRESETS'];
$preset_error = '';
} else {
include_once('lib/msg.inc.php');