本文整理汇总了PHP中Display::display_header方法的典型用法代码示例。如果您正苦于以下问题:PHP Display::display_header方法的具体用法?PHP Display::display_header怎么用?PHP Display::display_header使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Display
的用法示例。
在下文中一共展示了Display::display_header方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
if ($surveyCode != "") {
// Firstly we check if this survey is ready for anonymous use:
$sql = "SELECT anonymous FROM $table_survey
WHERE c_id = $course_id AND code ='".$surveyCode."'";
$resultAnonymous = Database::query($sql);
$rowAnonymous = Database::fetch_array($resultAnonymous, 'ASSOC');
// If is anonymous and is not allowed to take the survey to anonymous users, forbid access:
if (!isset($rowAnonymous['anonymous']) || ($rowAnonymous['anonymous'] == 0 && api_is_anonymous()) || count($rowAnonymous) == 0) {
api_not_allowed(true);
}
// If is anonymous and it is allowed to take the survey as anonymous, mark survey as anonymous.
}
// Header
Display :: display_header(get_lang('ToolSurvey'));
// First we check if the needed parameters are present
if ((!isset($_GET['course']) || !isset($_GET['invitationcode'])) && !isset($_GET['user_id'])) {
Display :: display_error_message(get_lang('SurveyParametersMissingUseCopyPaste'), false);
Display :: display_footer();
exit;
}
$invitationcode = $_GET['invitationcode'];
// Start auto-invitation feature FS#3403 (all-users-can-do-the-survey-URL handling)
if ($invitationcode == 'auto' && isset($_GET['scode'])) {
$userid = $_user['user_id'];
// Survey_code of the survey
$surveyCode = Database::escape_string($_GET['scode']);
示例2: header
if (isset($_POST['group_members']) && count($_POST['group_members']) > $max_member && $max_member != GroupManager::MEMBER_PER_GROUP_NO_LIMIT) {
Display::addFlash(Display::return_message(get_lang('GroupTooMuchMembers'), 'warning'));
header('Location: group.php?' . api_get_cidreq(true, false));
} else {
Display::addFlash(Display::return_message(get_lang('GroupSettingsModified'), 'success'));
header('Location: group.php?' . api_get_cidreq(true, false) . '&category=' . $cat['id']);
}
exit;
}
$action = isset($_GET['action']) ? $_GET['action'] : null;
switch ($action) {
case 'empty':
if (api_is_allowed_to_edit(false, true)) {
GroupManager::unsubscribe_all_users($group_id);
Display::display_confirmation_message(get_lang('GroupEmptied'));
}
break;
}
$defaults = $current_group;
$defaults['group_members'] = $selected_users;
$action = isset($_GET['action']) ? $_GET['action'] : '';
$defaults['action'] = $action;
if (!empty($_GET['keyword']) && !empty($_GET['submit'])) {
$keyword_name = Security::remove_XSS($_GET['keyword']);
echo '<br/>' . get_lang('SearchResultsFor') . ' <span style="font-style: italic ;"> ' . $keyword_name . ' </span><br>';
}
Display::display_header($nameTools, 'Group');
$form->setDefaults($defaults);
echo GroupManager::getSettingBar('member');
$form->display();
Display::display_footer();
示例3: explode
Display::display_header($nameTools, 'Doc');
Display::display_error_message(get_lang('Impossible'));
Display::display_footer();
}
} else {
// Interbreadcrumb for the current directory root path
// Copied from document.php
$dir_array = explode('/', $dir);
$array_len = count($dir_array);
// Interbreadcrumb for the current directory root path
if (empty($document_data['parents'])) {
$interbreadcrumb[] = array('url' => '#', 'name' => $document_data['title']);
} else {
foreach ($document_data['parents'] as $document_sub_data) {
$interbreadcrumb[] = array('url' => $document_sub_data['document_url'], 'name' => $document_sub_data['title']);
}
}
$interbreadcrumb[] = array('url' => '#', 'name' => $nameTools);
Display::display_header($nameTools, "Doc");
if ($is_certificate_mode) {
$all_information_by_create_certificate = DocumentManager::get_all_info_to_certificate(api_get_user_id(), api_get_course_id());
$str_info = '';
foreach ($all_information_by_create_certificate[0] as $info_value) {
$str_info .= $info_value . '<br/>';
}
$create_certificate = get_lang('CreateCertificateWithTags');
Display::display_normal_message($create_certificate . ': <br /><br/>' . $str_info, false);
}
echo $form->return_form();
Display::display_footer();
}
示例4: ob_start
<?php
/* For licensing terms, see /license.txt */
/**
* Sessions reporting
* @package chamilo.reporting
*/
ob_start();
$cidReset = true;
//quire_once '../inc/global.inc.php';
api_block_anonymous_users();
$this_section = SECTION_TRACKING;
api_block_anonymous_users();
$htmlHeadXtra[] = api_get_jqgrid_js();
$interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('MySpace'));
Display::display_header(get_lang('Sessions'));
$export_csv = false;
if (isset($_GET['export']) && $_GET['export'] == 'csv') {
$export_csv = true;
}
/* MAIN CODE */
if (isset($_GET['id_coach']) && $_GET['id_coach'] != '') {
$id_coach = intval($_GET['id_coach']);
} else {
$id_coach = api_get_user_id();
}
if (api_is_drh() || api_is_session_admin() || api_is_platform_admin()) {
$a_sessions = SessionManager::get_sessions_followed_by_drh(api_get_user_id());
if (!api_is_session_admin()) {
$menu_items[] = Display::url(Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH) . "auth/my_progress.php");
$menu_items[] = Display::url(Display::return_icon('user.png', get_lang('Students'), array(), ICON_SIZE_MEDIUM), "index.php?view=drh_students&display=yourstudents");
示例5: api_get_course_int_id
$form->addElement('hidden', 'action', 'add_lp_category');
$form->addElement('hidden', 'c_id', api_get_course_int_id());
$form->addElement('hidden', 'id', 0);
$form->addButtonSave(get_lang('Save'));
if ($form->validate()) {
$values = $form->getSubmitValues();
if (!empty($values['id'])) {
learnpath::updateCategory($values);
$url = api_get_self() . '?action=list&' . api_get_cidreq();
header('Location: ' . $url);
exit;
} else {
learnpath::createCategory($values);
$url = api_get_self() . '?action=list&' . api_get_cidreq();
header('Location: ' . $url);
exit;
}
} else {
$id = isset($_REQUEST['id']) ? $_REQUEST['id'] : null;
if ($id) {
$item = learnpath::getCategory($id);
$defaults = array('id' => $item->getId(), 'name' => $item->getName());
$form->setDefaults($defaults);
}
}
Display::display_header(get_lang('LearnpathAddLearnpath'), 'Path');
echo '<div class="actions">';
echo '<a href="lp_controller.php?' . api_get_cidreq() . '">' . Display::return_icon('back.png', get_lang('ReturnToLearningPaths'), '', ICON_SIZE_MEDIUM) . '</a>';
echo '</div>';
$form->display();
Display::display_footer();
示例6: header
if (!empty($exercise_stat_info) && isset($exercise_stat_info['exe_exo_id'])) {
header("Location: overview.php?exerciseId=" . $exercise_stat_info['exe_exo_id']);
exit;
}
api_not_allowed();
}
if (api_is_in_gradebook()) {
$interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH) . 'gradebook/index.php?' . api_get_cidreq(), 'name' => get_lang('ToolGradebook'));
}
$nameTools = get_lang('Exercises');
$interbreadcrumb[] = array("url" => "exercise.php?" . api_get_cidreq(), "name" => get_lang('Exercises'));
$htmlHeadXtra[] = '<script src="' . api_get_path(WEB_LIBRARY_JS_PATH) . 'hotspot/js/hotspot.js"></script>';
$htmlHeadXtra[] = '<link rel="stylesheet" href="' . api_get_path(WEB_LIBRARY_JS_PATH) . 'hotspot/css/hotspot.css">';
if ($origin != 'learnpath') {
// So we are not in learnpath tool
Display::display_header($nameTools, get_lang('Exercise'));
} else {
$htmlHeadXtra[] = "\n <style>\n body { background: none;}\n </style>\n ";
Display::display_reduced_header();
}
/* DISPLAY AND MAIN PROCESS */
// I'm in a preview mode as course admin. Display the action menu.
if (api_is_course_admin() && $origin != 'learnpath') {
echo '<div class="actions">';
echo '<a href="admin.php?' . api_get_cidreq() . '&exerciseId=' . $objExercise->id . '">' . Display::return_icon('back.png', get_lang('GoBackToQuestionList'), array(), 32) . '</a>';
echo '<a href="exercise_admin.php?' . api_get_cidreq() . '&modifyExercise=yes&exerciseId=' . $objExercise->id . '">' . Display::return_icon('edit.png', get_lang('ModifyExercise'), array(), 32) . '</a>';
echo '</div>';
}
$feedback_type = $objExercise->feedback_type;
$exercise_stat_info = $objExercise->get_stat_track_exercise_info_by_exe_id($exe_id);
if (!empty($exercise_stat_info['data_tracking'])) {
示例7: api_protect_course_script
$this_section = SECTION_COURSES;
$current_course_tool = TOOL_COURSE_MAINTENANCE;
api_protect_course_script(true);
$_course = api_get_course_info();
$current_course_code = $_course['official_code'];
$current_course_name = $_course['name'];
if (!api_is_allowed_to_edit()) {
api_not_allowed(true);
}
$tool_name = get_lang('DelCourse');
if (isset($_GET['delete']) && $_GET['delete'] == 'yes') {
CourseManager::delete_course($_course['sysCode']);
$obj_cat = new Category();
$obj_cat->update_category_delete($_course['sysCode']);
// DELETE CONFIRMATION MESSAGE
Session::erase('_cid');
Session::erase('_real_cid');
$noPHP_SELF = true;
$message = '<h2>' . get_lang('Course') . ' : ' . $current_course_name . ' (' . $current_course_code . ') </h2>';
$message .= get_lang('HasDel');
$message .= '<br /><br /><a href="../../index.php">' . get_lang('BackHome') . ' ' . api_get_setting('platform.site_name') . '</a>';
} else {
$message = '<h3>' . get_lang('Course') . ' : ' . $current_course_name . ' (' . $current_course_code . ') </h3>';
$message .= '<p>' . get_lang('ByDel') . '</p>';
$message .= '<p><a class="btn btn-primary" href="' . api_get_path(WEB_CODE_PATH) . 'course_info/maintenance.php?' . api_get_cidreq() . '">' . get_lang('No') . '</a> <a class="btn" href="' . api_get_self() . '?delete=yes&' . api_get_cidreq() . '">' . get_lang('Yes') . '</a></p>';
$interbreadcrumb[] = array('url' => 'maintenance.php', 'name' => get_lang('Maintenance'));
}
Display::display_header($tool_name, 'Settings');
echo Display::page_header($tool_name);
Display::display_warning_message($message, false);
Display::display_footer();
示例8: explode
$display_dir = $dir;
if (isset($group)) {
$display_dir = explode('/', $dir);
unset($display_dir[0]);
unset($display_dir[1]);
$display_dir = implode('/', $display_dir);
}
// Interbreadcrumb for the current directory root path
if (empty($document_data['parents'])) {
$interbreadcrumb[] = array('url' => '#', 'name' => $document_data['title']);
} else {
foreach ($document_data['parents'] as $document_sub_data) {
$interbreadcrumb[] = array('url' => $document_sub_data['document_url'], 'name' => $document_sub_data['title']);
}
}
Display::display_header($nameTools, 'Doc');
echo '<div class="actions">';
echo '<a href="document.php?id=' . $document_id . '">' . Display::return_icon('back.png', get_lang('BackTo') . ' ' . get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM) . '</a>';
echo '</div>';
///pixlr
// max size 1 Mb ??
$title = urlencode(utf8_encode(get_lang('NewImage')));
//TODO:check
//
$image = api_get_path(WEB_IMG_PATH) . 'canvas1024x768.png';
//
$pixlr_code_translation_table = array('' => 'en', 'pt' => 'pt-Pt', 'sr' => 'sr_latn');
$langpixlr = api_get_language_isocode();
$langpixlr = isset($pixlr_code_translation_table[$langpixlr]) ? $pixlredit_code_translation_table[$langpixlr] : $langpixlr;
$loc = $langpixlr;
// deprecated ?? TODO:check pixlr read user browser
示例9: display_header
$actions .= '</div>';
// Checking if it is a valid type
if (!in_array($_GET['type'], $possible_types)) {
Display :: display_header($tool_name,'Survey');
echo $actions;
Display :: display_error_message(get_lang('TypeDoesNotExist'), false);
Display :: display_footer();
}
$error_message = '';
// Displaying the form for adding or editing the question
if (empty($_POST['save_question']) && in_array($_GET['type'], $possible_types)) {
if (!isset($_POST['save_question'])) {
// Displaying the header
Display::display_header($tool_name, 'Survey');
echo $actions;
// Displys message if exists
if (isset($_SESSION['temp_sys_message'])) {
$error_message = $_SESSION['temp_sys_message'];
unset($_SESSION['temp_sys_message']);
if ($error_message == 'PleaseEnterAQuestion' ||
$error_message == 'PleasFillAllAnswer'||
$error_message == 'PleaseChooseACondition'||
$error_message == 'ChooseDifferentCategories'
) {
Display::display_error_message(get_lang($error_message), true);
}
}
}
$ch_type = 'ch_'.$_GET['type'];
示例10: api_not_allowed
return false;
}
}
</script>';
$nameTools = "";
require_once '../inc/global.inc.php';
$this_section = SECTION_COURSES;
if (!api_is_allowed_to_edit()) {
api_not_allowed(true);
}
$category = new TestCategory();
$courseId = api_get_course_int_id();
$sessionId = api_get_session_id();
// breadcrumbs
$interbreadcrumb[] = array("url" => "exercise.php?" . api_get_cidreq(), "name" => get_lang('Exercises'));
Display::display_header(get_lang('Category'));
// Action handling: add, edit and remove
if (isset($_GET['action']) && $_GET['action'] == 'addcategory') {
add_category_form($_GET['action']);
display_add_category();
} else {
if (isset($_GET['action']) && $_GET['action'] == 'editcategory') {
edit_category_form($_GET['action']);
} else {
if (isset($_GET['action']) && $_GET['action'] == 'deletecategory') {
delete_category_form($_GET['action']);
display_add_category();
} else {
display_add_category();
}
}
示例11: get_courses_list_by_user_id_based_in_exercises
</script>';
function get_courses_list_by_user_id_based_in_exercises($user_id)
{
$TABLETRACK_EXERCICES = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
$user_id = intval($user_id);
$sql = "SELECT DISTINCT exe_user_id, c_id, session_id\n FROM {$TABLETRACK_EXERCICES}\n WHERE exe_user_id = {$user_id}\n ORDER by exe_user_id, c_id ASC";
$res = Database::query($sql);
$course_list = array();
while ($row = Database::fetch_array($res, 'ASSOC')) {
$course_list[] = $row;
}
return $course_list;
}
Display::display_header(get_lang('MoveUserStats'));
echo '<div class="actions">';
echo '<a href="../admin/index.php">' . Display::return_icon('back.png', get_lang('BackTo') . ' ' . get_lang('PlatformAdmin'), '', ICON_SIZE_MEDIUM) . '</a>';
echo '</div>';
echo Display::display_normal_message(get_lang('CompareUserResultsBetweenCoursesAndCoursesInASession'), false);
// Some pagination
$page = 1;
if (isset($_GET['page']) && !empty($_GET['page'])) {
$page = intval($_GET['page']);
}
$default = 20;
$count = UserManager::get_number_of_users();
$nro_pages = round($count / $default) + 1;
$begin = $default * ($page - 1);
$end = $default * $page;
$navigation = "{$begin} - {$end} / {$count}<br />";
示例12: get_lang
$table->set_header($header_nr++, get_lang('Action'), false);
$table->set_column_filter($header_nr - 1, 'modify_filter');
}
}
/* Header */
if (isset($origin) && $origin == 'learnpath') {
Display::display_reduced_header();
} else {
if (isset($_GET['keyword']) && !empty($_GET['keyword'])) {
$interbreadcrumb[] = array("url" => "user.php?" . api_get_cidreq(), "name" => get_lang("Users"));
$tool_name = get_lang('SearchResults');
} else {
$tool_name = get_lang('Users');
$origin = 'users';
}
Display::display_header($tool_name, "User");
}
/* Setting the permissions for this page */
$is_allowed_to_track = $is_courseAdmin || $is_courseTutor;
// Tool introduction
Display::display_introduction_section(TOOL_USER, 'left');
$actions = '';
$type = isset($_REQUEST['type']) ? intval($_REQUEST['type']) : STUDENT;
$selectedTab = 1;
if (api_is_allowed_to_edit(null, true)) {
echo '<div class="actions">';
switch ($type) {
case STUDENT:
$selectedTab = 1;
$url = api_get_path(WEB_CODE_PATH) . 'user/subscribe_user.php?' . api_get_cidreq() . '&type=' . STUDENT;
break;
示例13: header
if (count($users) == 0) {
header('Location: ' . api_get_self() . '?erroroneuser=&selecteval=' . Security::remove_XSS($_GET['selecteval']));
exit;
} else {
foreach ($users as $user_id) {
$result = new Result();
$result->set_user_id($user_id);
$result->set_evaluation_id($_GET['selecteval']);
$result->add();
}
}
header('Location: gradebook_view_result.php?adduser=&selecteval=' . Security::remove_XSS($_GET['selecteval']));
exit;
} elseif ($_POST['firstLetterUser']) {
$firstletter = $_POST['firstLetterUser'];
if (!empty($firstletter)) {
header('Location: ' . api_get_self() . '?firstletter=' . Security::remove_XSS($firstletter) . '&selecteval=' . Security::remove_XSS($_GET['selecteval']));
exit;
}
}
$interbreadcrumb[] = array('url' => Security::remove_XSS($_SESSION['gradebook_dest']), 'name' => get_lang('Gradebook'));
$interbreadcrumb[] = array('url' => 'gradebook_view_result.php?selecteval=' . Security::remove_XSS($_GET['selecteval']), 'name' => get_lang('ViewResult'));
Display::display_header(get_lang('AddUserToEval'));
if (isset($_GET['erroroneuser'])) {
Display::display_warning_message(get_lang('AtLeastOneUser'), false);
}
DisplayGradebook::display_header_result($evaluation[0], null, 0, 0);
echo '<div class="main">';
echo $add_user_form->toHtml();
echo '</div>';
Display::display_footer();
示例14: GradeBookResult
break;
case 'csv':
default:
$export = new GradeBookResult();
$export->exportCompleteReportCSV($printable_data);
exit;
break;
}
} else {
api_not_allowed(true);
}
}
$this_section = SECTION_COURSES;
if (isset($_GET['exportpdf'])) {
$export_pdf_form->display();
} else {
Display::display_header(get_lang('FlatView'));
}
if (isset($_GET['isStudentView']) && $_GET['isStudentView'] == 'false') {
DisplayGradebook::display_header_reduce_flatview($cat[0], $showeval, $showlink, $simple_search_form);
$flatviewtable->display();
} elseif (isset($_GET['selectcat']) && $_SESSION['studentview'] == 'teacherview') {
DisplayGradebook::display_header_reduce_flatview($cat[0], $showeval, $showlink, $simple_search_form);
// Table
$flatviewtable->display();
//@todo load images with jquery
echo '<div id="contentArea" style="text-align: center;" >';
$flatviewtable->display_graph_by_resource();
echo '</div>';
}
Display::display_footer();
示例15: api_not_allowed
// you are not a teacher
$show_work = GroupManager::user_has_access($user_id, $group_id, GroupManager::GROUP_TOOL_WORK);
}
if (!$show_work) {
api_not_allowed();
}
$interbreadcrumb[] = array('url' => '../group/group.php', 'name' => get_lang('Groups'));
$interbreadcrumb[] = array('url' => '../group/group_space.php?gidReq=' . $group_id, 'name' => get_lang('GroupSpace') . ' ' . $group_properties['name']);
} else {
if (!api_is_allowed_to_edit(false, true)) {
api_not_allowed(true);
}
}
$interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH) . 'work/work.php?' . api_get_cidreq(), 'name' => get_lang('StudentPublications'));
$interbreadcrumb[] = array('url' => '#', 'name' => $userInfo['complete_name']);
Display::display_header(null);
echo '<div class="actions">';
echo '<a href="' . api_get_path(WEB_CODE_PATH) . 'work/work.php?' . api_get_cidreq() . '&origin=' . $origin . '&gradebook=' . $gradebook . '">' . Display::return_icon('back.png', get_lang('BackToWorksList'), '', ICON_SIZE_MEDIUM) . '</a>';
echo '</div>';
$workPerUser = getWorkPerUser($studentId);
$table = new HTML_Table(array('class' => 'data_table'));
$column = 0;
$row = 0;
$headers = array(get_lang('Title'), get_lang('HandedOutDate'), get_lang('HandOutDateLimit'), get_lang('Score'), get_lang('Actions'));
foreach ($headers as $header) {
$table->setHeaderContents($row, $column, $header);
$column++;
}
$row++;
$column = 0;
foreach ($workPerUser as $work) {