本文整理汇总了PHP中Session::Messages方法的典型用法代码示例。如果您正苦于以下问题:PHP Session::Messages方法的具体用法?PHP Session::Messages怎么用?PHP Session::Messages使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Session
的用法示例。
在下文中一共展示了Session::Messages方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show_edit_form
function show_edit_form($id, $sid, $assign)
{
global $m, $langGradeOk, $tool_content, $course_code;
$sub = Database::get()->querySingle("SELECT * FROM assignment_submit WHERE id = ?d", $sid);
if (count($sub) > 0) {
$uid_2_name = display_user($sub->uid);
if (!empty($sub->group_id)) {
$group_submission = "({$m['groupsubmit']} " . "<a href='../group/group_space.php?course={$course_code}&group_id={$sub->group_id}'>" . "{$m['ofgroup']} " . gid_to_name($sub->group_id) . "</a>)";
} else {
$group_submission = '';
}
$tool_content .= "\n <form method='post' action='index.php?course={$course_code}'>\n <input type='hidden' name='assignment' value='{$id}'>\n <input type='hidden' name='submission' value='{$sid}'>\n <fieldset>\n <legend>{$m['addgradecomments']}</legend>\n <table width='99%' class='tbl'>\n <tr>\n <th class='left' width='180'>{$m['username']}:</th>\n <td>{$uid_2_name} " . q($group_submission) . "</td>\n </tr>\n <tr>\n <th class='left'>{$m['sub_date']}:</th>\n <td>" . q($sub->submission_date) . "</td></tr>\n <tr>\n <th class='left'>{$m['filename']}:</th>\n <td><a href='index.php?course={$course_code}&get={$sub->id}'>" . q($sub->file_name) . "</a></td>\n </tr>\n <tr>\n <th class='left'>{$m['grade']}:</th>\n <td><input type='text' name='grade' maxlength='3' size='3' value='" . q($sub->grade) . "'></td></tr>\n <tr>\n <th class='left'>{$m['gradecomments']}:</th>\n <td><textarea cols='60' rows='3' name='comments'>" . q($sub->grade_comments) . "</textarea></td>\n </tr>\n <tr>\n <th><label for='email_button'>{$m['email_users']}:</label></th>\n <td><input type='checkbox' value='1' id='email_button' name='email'></td>\n </tr>\n <tr>\n <th class='left'> </th>\n <td><input class='btn btn-primary' type='submit' name='grade_comments' value='{$langGradeOk}'></td>\n </tr>\n </table>\n </fieldset>\n </form><br>";
} else {
Session::Messages($m['WorkNoSubmission'], 'alert-danger');
redirect_to_home_page('modules/work/index.php?course=' . $course_code . '&id=' . $id);
}
}
示例2: foreach
$activeUsers = Database::get()->queryArray("SELECT uid as userID FROM attendance_users WHERE attendance_id = ?d", $attendance_id);
if ($activeUsers) {
foreach ($activeUsers as $result) {
$userInp = intval(@$_POST[$result->userID]);
//get the record from the teacher (input name is the user id)
// //check if there is record for the user for this activity
$checkForBook = Database::get()->querySingle("SELECT COUNT(id) as count, id FROM attendance_book WHERE attendance_activity_id = ?d AND uid = ?d", $actID, $result->userID);
if ($checkForBook->count) {
//update
Database::get()->query("UPDATE attendance_book SET attend = ?d WHERE id = ?d ", $userInp, $checkForBook->id);
} else {
//insert
Database::get()->query("INSERT INTO attendance_book SET uid = ?d, attendance_activity_id = ?d, attend = ?d, comments = ?s", $result->userID, $actID, $userInp, '');
}
}
Session::Messages($langAttendanceEdit, "alert-success");
redirect_to_home_page("modules/attendance/index.php");
}
}
//display the form and the list
$result = Database::get()->querySingle("SELECT * FROM attendance_activities WHERE id = ?d", $actID);
$tool_content .= "<div class='alert alert-info'>" . $result->title . "</div>";
//show all the students
$resultUsers = Database::get()->queryArray("SELECT attendance_users.id as recID, attendance_users.uid as userID, user.surname as surname, user.givenname as name, user.am as am, course_user.reg_date as reg_date FROM attendance_users, user, course_user WHERE attendance_id = ?d AND attendance_users.uid = user.id AND `user`.id = `course_user`.`user_id` AND `course_user`.`course_id` = ?d ", $attendance_id, $course_id);
if ($resultUsers) {
//table to display the users
$tool_content .= "\n <form method='post' action='{$_SERVER['SCRIPT_NAME']}?course={$course_code}&ins=" . $actID . "'>\n <table id='users_table{$course_id}' class='table-default custom_list_order'>\n <thead>\n <tr>\n <th width='1'>{$langID}</th>\n <th><div align='left' width='100'>{$langName} {$langSurname}</div></th>\n <th class='center' width='80'>{$langRegistrationDateShort}</th>\n <th class='center'>{$langAttendanceAbsences}</th>\n <th class='center'>{$langActions}</th>\n </tr>\n </thead>\n <tbody>";
$cnt = 0;
foreach ($resultUsers as $resultUser) {
$cnt++;
$tool_content .= "\n <tr>\n <td>{$cnt}</td>\n <td> " . display_user($resultUser->userID) . " ({$langAm}: {$resultUser->am})</td>\n <td>" . nice_format($resultUser->reg_date) . "</td>\n <td>" . userAttendTotal($attendance_id, $resultUser->userID) . "/" . $attendance_limit . "</td>\n <td class='center'>\n <input class='form-control' type='checkbox' value='1' name='" . $resultUser->userID . "'";
示例3: get_total_topics
}
}
Indexer::queueAsync(Indexer::REQUEST_REMOVEBYTOPIC, Indexer::RESOURCE_FORUMPOST, $topic_id);
$number_of_topics = get_total_topics($forum_id);
$num_topics = $number_of_topics - 1;
if ($number_of_topics < 0) {
$num_topics = 0;
}
Database::get()->query("DELETE FROM forum_topic WHERE id = ?d AND forum_id = ?d", $topic_id, $forum_id);
Indexer::queueAsync(Indexer::REQUEST_REMOVE, Indexer::RESOURCE_FORUMTOPIC, $topic_id);
Database::get()->query("UPDATE forum SET num_topics = ?d,
num_posts = num_posts-$number_of_posts
WHERE id = ?d
AND course_id = ?d", $num_topics, $forum_id, $course_id);
Database::get()->query("DELETE FROM forum_notify WHERE topic_id = ?d AND course_id = ?d", $topic_id, $course_id);
Session::Messages($langDeletedMessage, 'alert-success');
redirect_to_home_page("modules/forum/viewforum.php?course=$course_code&forum=$forum_id");
}
// modify topic notification
if (isset($_GET['topicnotify'])) {
if (isset($_GET['topic_id'])) {
$topic_id = intval($_GET['topic_id']);
}
$rows = Database::get()->querySingle("SELECT COUNT(*) AS count FROM forum_notify
WHERE user_id = ?d AND topic_id = ?d AND course_id = ?d", $uid, $topic_id, $course_id);
if ($rows->count > 0) {
Database::get()->query("UPDATE forum_notify SET notify_sent = ?d
WHERE user_id = ?d AND topic_id = ?d AND course_id = ?d", $_GET['topicnotify'], $uid, $topic_id, $course_id);
} else {
Database::get()->query("INSERT INTO forum_notify SET user_id = ?d,
示例4: elseif
} elseif (isset($_GET['modifyCat']) || isset($_GET['newCat'])) {
$pageName = isset($_GET['newCat']) ? $langNewCat : $langEditCat;
$navigation = array(array("url" => "index.php?course={$course_code}", "name" => $langExercices), array("url" => "question_categories.php?course={$course_code}", "name" => $langQuestionCats));
$form_action_url = "{$_SERVER['SCRIPT_NAME']}?course={$course_code}";
$form_action_url .= isset($_GET['modifyCat']) ? "&modifyCat=" . intval($_GET['modifyCat']) : "&newCat=yes";
if (isset($_GET['modifyCat'])) {
$q_cat = Database::get()->querySingle("SELECT * FROM exercise_question_cats WHERE question_cat_id = ?d", $_GET['modifyCat']);
}
$questionCatName = Session::has('questionCatName') ? Session::get('questionCatName') : (isset($q_cat) ? $q_cat->question_cat_name : '');
$tool_content .= action_bar(array(array('title' => $langBack, 'level' => 'primary-label', 'icon' => 'fa-reply', 'url' => "question_categories.php?course={$course_code}")));
$tool_content .= "\n <div class='form-wrapper'>\n <form class='form-horizontal' role='form' action='{$form_action_url}' method='post'>\n <div class='form-group " . (Session::getError('questionCatName') ? "has-error" : "") . "'>\n <label for='questionCatName' class='col-sm-2 control-label'>{$langTitle}:</label>\n <div class='col-sm-10'>\n <input name='questionCatName' type='text' class='form-control' id='questionCatName' placeholder='{$langTitle}' value='{$questionCatName}'>\n <span class='help-block'>" . Session::getError('questionCatName') . "</span>\n </div>\n </div>\n <div class='form-group'>\n <div class='col-sm-10 col-sm-offset-2'>\n <input class='btn btn-primary' name='submitCat' type='submit' value='{$langSubmit}'>\n <a href='question_categories.php?course={$course_code}' class='btn btn-default'>{$langCancel}</a>\n </div>\n </div> \n </form>\n </div>";
} elseif (isset($_GET['deleteCat'])) {
$q_cat_id = $_GET['deleteCat'];
if (Database::get()->query("DELETE FROM exercise_question_cats WHERE question_cat_id = ?d AND course_id = ?d", $q_cat_id, $course_id)->affectedRows > 0) {
Database::get()->query("UPDATE exercise_question SET category = ?d WHERE category = ?d AND course_id = ?d", 0, $q_cat_id, $course_id);
Session::Messages($langDelCatSuccess, 'alert-success');
}
redirect_to_home_page("modules/exercise/question_categories.php?course={$course_code}");
} else {
$pageName = $langQuestionCats;
$navigation[] = array("url" => "index.php?course={$course_code}", "name" => $langExercices);
$tool_content .= action_bar(array(array('title' => $langNewCat, 'level' => 'primary-label', 'icon' => 'fa-plus-circle', 'url' => "question_categories.php?course={$course_code}&newCat=yes", 'button-class' => 'btn-success'), array('title' => $langBack, 'level' => 'primary', 'icon' => 'fa-reply', 'url' => "index.php?course={$course_code}")));
$q_cats = Database::get()->queryArray("SELECT * FROM exercise_question_cats WHERE course_id = ?d", $course_id);
if (count($q_cats) > 0) {
$tool_content .= "\n <div class='table-responsive'>\n <table class='table-default'>\n <tbody>\n <tr>\n <th>{$langTitle}</th>\n <th class='text-center'>" . icon('fa-gears') . "</th>\n </tr> \n ";
foreach ($q_cats as $q_cat) {
$action_button = action_button(array(array('title' => $langEdit, 'url' => "question_categories.php?course={$course_code}&modifyCat={$q_cat->question_cat_id}", 'icon' => 'fa-edit'), array('title' => $langDelete, 'url' => "question_categories.php?course={$course_code}&deleteCat={$q_cat->question_cat_id}", 'icon' => 'fa-times', 'confirm' => $langQuestionCatDelConfirrm, 'class' => 'delete')));
$tool_content .= "\n <tr>\n <td>{$q_cat->question_cat_name}</td>\n <td class='option-btn-cell'>{$action_button}</td>\n </tr>";
}
$tool_content .= " \n </tbody>\n </table>\n </div>";
} else {
示例5: array
// Disable modules admin page
$require_admin = true;
require_once '../../include/baseTheme.php';
$navigation[] = array('url' => 'index.php', 'name' => $langAdmin);
$pageName = $langDisableModules;
if (isset($_POST['submit'])) {
Database::get()->query('DELETE FROM module_disable');
if (isset($_POST['moduleDisable'])) {
$optArray = implode(', ', array_fill(0, count($_POST['moduleDisable']), '(?d)'));
Database::get()->query('INSERT INTO module_disable (module_id) VALUES ' . $optArray,
array_keys($_POST['moduleDisable']));
}
Session::Messages($langWikiEditionSucceed, 'alert-success');
redirect_to_home_page('modules/admin/modules.php');
} else {
$disabled = array();
foreach (Database::get()->queryArray('SELECT module_id FROM module_disable') as $item) {
$disabled[] = $item->module_id;
}
$tool_content .= action_bar(array(
array('title' => $langBack,
'url' => $urlAppend . 'modules/admin/index.php',
'icon' => 'fa-reply',
'level' => 'primary-label')), false) .
"<div class='alert alert-warning'>$langDisableModulesHelp</div>
<div class='form-wrapper'>
<form class='form-horizontal' role='form' action='modules.php' method='post'>";
示例6: foreach
}
// indexing was previously on, but now set to off, need to empty it
if (get_config('enable_indexing') && !$enable_indexing) {
require_once 'modules/search/indexer.class.php';
Indexer::deleteAll();
}
// update table `config`
foreach ($config_vars as $varname => $what) {
set_config($varname, $GLOBALS[$varname]);
}
// Display result message
Session::flash('scheduleIndexing', $scheduleIndexing);
Session::Messages($langFileUpdatedSuccess, 'alert-success');
redirect_to_home_page('modules/admin/eclassconf.php');
} // end of if($submit)
else {
// Display config.php edit form
$head_content .= "
<script>
$(function() {
$('body').scrollspy({ target: '#affixedSideNav' });
});
</script>
";
// Display link to index.php
$tool_content .= action_bar(array(
array('title' => $langBack,
示例7: array
$recursion = array('unit' => $_POST['frequencyperiod'], 'repeat' => $_POST['frequencynumber'], 'end' => $_POST['enddate']);
}
$ev = add_event($event_title, $content, $startdate, $duration, $recursion);
foreach($ev['event'] as $id) {
$agdx->store($id);
}
}
Session::Messages($langStoredOK, 'alert-success');
redirect_to_home_page("modules/agenda/index.php?course=$course_code");
} elseif (isset($_GET['delete']) && $_GET['delete'] == 'yes') {
$resp = (isset($_GET['rep']) && $_GET['rep'] == 'yes')? delete_recursive_event($id):delete_event($id);
$agdx->remove($id);
$msgresp = ($resp['success'])? $langDeleteOK : $langDeleteError.": ".$resp['message'];
$alerttype = ($resp['success'])? 'alert-success' : 'alert-error';
Session::Messages($msgresp, $alerttype);
redirect_to_home_page("modules/agenda/index.php?course=$course_code");
}
$is_recursive_event = false;
if (isset($_GET['addEvent']) or isset($_GET['edit'])) {
$pageName = $langAddEvent;
$tool_content .= action_bar(array(
array('title' => $langBack,
'url' => "$_SERVER[SCRIPT_NAME]?course=$course_code",
'icon' => 'fa-reply',
'level' => 'primary-label',
'show' => $is_editor)));
$navigation[] = array("url" => $_SERVER['SCRIPT_NAME'] . "?course=$course_code", "name" => $langAgenda);
$applytogroup = '';
if (isset($id) && $id) {
示例8: header
}
if (isset($_GET['mod_pw'])) {
header('Location: ' . bbb_join_moderator($_GET['meeting_id'], $_GET['mod_pw'], $_GET['att_pw'], $_SESSION['surname'], $_SESSION['givenname']));
} else {
# Get session capacity
$c = Database::get()->querySingle("SELECT sessionUsers FROM bbb_session where meeting_id=?s", $_GET['meeting_id']);
$sess = Database::get()->querySingle("SELECT * FROM bbb_session WHERE meeting_id=?s", $_GET['meeting_id']);
$serv = Database::get()->querySingle("SELECT * FROM bbb_servers WHERE id=?d", $sess->running_at);
if ($c->sessionUsers > 0 && $c->sessionUsers < get_meeting_users($serv->server_key, $serv->api_url, $_GET['meeting_id'], $sess->mod_pw)) {
$tool_content .= "<p class='noteit'><b>{$langNote}</b>:<br />{$langBBBMaxUsersJoinError}</p>";
break;
} else {
header('Location: ' . bbb_join_user($_GET['meeting_id'], $_GET['att_pw'], $_SESSION['surname'], $_SESSION['givenname']));
}
}
break;
case 'import_video':
publish_video_recordings($course_code, $_GET['id']);
break;
}
} elseif (isset($_POST['new_bbb_session'])) {
$startDate_obj = DateTime::createFromFormat('d-m-Y H:i', $_POST['start_session']);
$start = $startDate_obj->format('Y-m-d H:i:s');
add_bbb_session($course_id, $_POST['title'], $_POST['desc'], $start, $_POST['type'], $_POST['status'], isset($_POST['notifyUsers']) ? '1' : '0', $_POST['minutes_before'], $_POST['external_users'], $_POST['record'], $_POST['sessionUsers']);
Session::Messages($langBBBAddSuccessful, 'alert-success');
redirect_to_home_page("modules/bbb/index.php?course={$course_code}");
} else {
bbb_session_details();
}
add_units_navigation(TRUE);
draw($tool_content, 2, null, $head_content);
示例9: isset
$actDate = !empty($_POST['date']) ? $_POST['date'] : null;
$visible = isset($_POST['visible']) ? 1 : 0;
if ($_POST['id']) {
//update
$id = $_POST['id'];
Database::get()->query("UPDATE attendance_activities SET `title` = ?s, date = ?t,
description = ?s, `auto` = ?d
WHERE id = ?d", $actTitle, $actDate, $actDesc, $auto, $id);
Session::Messages("$langGradebookEdit", "alert-success");
redirect_to_home_page("modules/attendance/index.php?course=$course_code&attendance_id=$attendance_id");
} else {
//insert
$insertAct = Database::get()->query("INSERT INTO attendance_activities SET attendance_id = ?d, title = ?s,
`date` = ?t, description = ?s",
$attendance_id, $actTitle, $actDate, $actDesc);
Session::Messages("$langGradebookSucInsert","alert-success");
redirect_to_home_page("modules/attendance/index.php?course=$course_code&attendance_id=$attendance_id");
}
} else {
Session::flashPost()->Messages($langFormErrors)->Errors($v->errors());
$new_or_edit = $_POST['id'] ? "&modify=".getIndirectReference($_POST['id']) : "&addActivity=1";
redirect_to_home_page("modules/attendance/index.php?course=$course_code&attendance_id=".$attendance_id.$new_or_edit);
}
}
elseif (isset($_GET['delete'])) {
delete_attendance_activity($attendance_id, getDirectReference($_GET['delete']));
redirect_to_home_page("modules/attendance/index.php?course=$course_code&attendance_id=$attendance_id");
// delete attendance
} elseif (isset($_GET['delete_at'])) {
示例10: commenting_add_js
</div>";
if ($comments_enabled) {
if ($post->getCommenting() == 1) {
commenting_add_js(); //add js files needed for comments
$comm = new Commenting('blogpost', $post->getId());
if ($blog_type == 'course_blog') {
$tool_content .= $comm->put($course_code, $is_editor, $uid, true);
} elseif ($blog_type == 'perso_blog') {
$tool_content .= $comm->put(NULL, $is_blog_editor, $uid, true);
}
}
}
} else {
Session::Messages($langBlogPostNotFound);
redirect_to_home_page("modules/blog/index.php?$url_params");
}
}
//show all blog posts
if ($action == "showBlog") {
if ($blog_type == 'course_blog') {
$allow_to_create = $blog->permCreate($is_editor, $stud_allow_create, $uid);
} elseif ($blog_type == 'perso_blog') {
$allow_to_create = $is_blog_editor;
}
$tool_content .= action_bar(array(
array('title' => $langBlogAddPost,
'url' => "$_SERVER[SCRIPT_NAME]?$url_params&action=createPost",
示例11: urlencode
<div class='col-sm-offset-3 col-sm-9'>
<input class='btn btn-primary' type='submit' name='changePass' value='$langModify'>
<a class='btn btn-default' href='{$urlServer}modules/admin/edituser.php?u=" . urlencode($_REQUEST['userid']) . "'>$langCancel</a>
</div>
</fieldset>
". generate_csrf_token_form_field() ."
</form>
</div>";
} else {
$userid = intval($_POST['userid']);
if (!isset($_POST['token']) || !validate_csrf_token($_POST['token'])) csrf_token_error();
if (empty($_POST['password_form']) || empty($_POST['password_form1'])) {
Session::Messages($langFieldsMissing);
redirect_to_home_page("modules/admin/password.php?userid=" . urlencode($userid));
}
if ($_POST['password_form1'] !== $_POST['password_form']) {
Session::Messages($langPassTwo);
redirect_to_home_page("modules/admin/password.php?userid=" . urlencode($userid));
}
// All checks ok. Change password!
$hasher = new PasswordHash(8, false);
$new_pass = $hasher->HashPassword($_POST['password_form']);
Database::get()->query("UPDATE `user` SET `password` = ?s WHERE `id` = ?d", $new_pass, $userid);
Session::Messages($langPassChanged);
redirect_to_home_page("modules/admin/edituser.php?u=" . urlencode($userid));
}
draw($tool_content, 3, null, $head_content);
示例12: array
*
* @abstract This component is the core of eclass. Each and every file that
* requires output to the user's browser must include this file and use
* the draw method to output the UI to the user's browser.
*
* An exception of this scenario is when the user uses the personalised
* interface. In that case function drawPerso needs to be called.
*
*/
$navigation = array();
$sectionName = '';
$pageName = '';
$toolName = '';
require_once 'init.php';
if (isset($toolContent_ErrorExists)) {
Session::Messages($toolContent_ErrorExists);
if (!$uid) {
$next = str_replace($urlAppend, '/', $_SERVER['REQUEST_URI']);
header("Location:" . $urlServer . "main/login_form.php?next=" . urlencode($next));
} else {
header("Location:" . $urlServer . "index.php");
}
exit;
}
require_once 'template/template.inc.php';
require_once 'tools.php';
/**
* Function draw
*
* This method processes all data to render the display. It is executed by
* each tool. Is in charge of generating the interface and parse it to the user's browser.
示例13: array
$hits3 = array();
foreach ($hits2 as $hit2) {
if (in_array($hit2->pkid, $subscribed)) {
$hits3[] = $hit2;
}
}
$hits = array_merge($hits1, $hits3);
// eponymous user can also search for his subscribed courses
}
} else {
$hits = $hits1;
// anonymous can only access with visible 1 or 2
}
// exit if not results
if (count($hits) <= 0) {
Session::Messages($langNoResult);
redirect_to_home_page('modules/search/search.php');
}
//////// PRINT RESULTS ////////
$tool_content .= action_bar(array(array('title' => $langNewSearch, 'url' => "search.php", 'icon' => 'fa-plus-circle', 'level' => 'primary-label', 'button-class' => 'btn-success')));
$tool_content .= "\n <div class='alert alert-info'>{$langDoSearch}: <label>" . count($hits) . " {$langResults2}</label></div>\n <table class='table-default'>\n <tr> \n <th class='text-left'>" . $langCourse . " ({$langCode})</th>\n <th class='text-left'>{$langTeacher}</th>\n <th class='text-left'>{$langKeywords}</th>\n </tr>";
foreach ($hits as $hit) {
$course = Database::get()->querySingle("SELECT code, title, public_code, prof_names, keywords FROM course WHERE id = ?d", $hit->pkid);
// search in-course: Commented out @ 2014-11-24 because too costly to run 11 index sub-queries for each hit result
$urlParam = '';
//if (isset($_POST['search_terms']) && search_in_course($_POST['search_terms'], $hit->pkid, $anonymous)) {
// $urlParam = '?from_search=' . urlencode($_POST['search_terms']);
//}
$tool_content .= "<tr><td>\n <a href='../../courses/" . q($course->code) . "/" . $urlParam . "'>" . q($course->title) . "\n </a> (" . q($course->public_code) . ")</td>\n <td>" . q($course->prof_names) . "</td>\n <td>" . q($course->keywords) . "</td></tr>";
}
$tool_content .= "</table>";
示例14: initialize_group_id
initialize_group_id();
initialize_group_info($group_id);
$toolName = $langGroups;
$pageName = $group_name;
$navigation[] = array('url' => 'index.php?course=' . $course_code, 'name' => $langGroups);
if (isset($_GET['selfReg'])) {
if (!$is_member and $status != USER_GUEST and ($max_members == 0 or $member_count < $max_members)) {
$id = Database::get()->query("INSERT INTO group_members SET user_id = ?d, group_id = ?d, description = ''", $uid, $group_id);
$group = gid_to_name($group_id);
Log::record($course_id, MODULE_ID_GROUPS, LOG_MODIFY, array('id' => $id,
'uid' => $uid,
'name' => $group));
Session::Messages($langGroupNowMember, 'alert-success');
redirect_to_home_page("modules/group/group_space.php?course=$course_code&group_id=$group_id");
} else {
$tool_content .= "<div class='alert alert-danger'>$langForbidden</div>";
draw($tool_content, 2);
exit;
}
}
if (!$is_member and !$is_editor) {
$tool_content .= "<div class='alert alert-danger'>$langForbidden</div>";
draw($tool_content, 2);
exit;
}
if (isset($_GET['group_as'])) {
$group_id = $_GET['group_id'];
示例15: error
function error($message)
{
global $urlServer;
Session::Messages($message, 'alert-danger');
session_write_close();
header("Location: {$urlServer}");
exit;
}