• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP event_access_tool函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中event_access_tool函数的典型用法代码示例。如果您正苦于以下问题:PHP event_access_tool函数的具体用法?PHP event_access_tool怎么用?PHP event_access_tool使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了event_access_tool函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: prolog

 /**
  * Prepare the environment. Set up breadcrumps and raise tracking event. 
  */
 protected function prolog()
 {
     global $interbreadcrumb;
     $interbreadcrumb = array();
     $interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('Notebook'));
     global $this_section;
     $this_section = SECTION_COURSES;
     global $current_course_tool;
     $current_course_tool = TOOL_NOTEBOOK;
     // Tracking
     event_access_tool(TOOL_NOTEBOOK);
 }
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:15,代码来源:controller.class.php


示例2: api_protect_course_script

<?php

/* For licensing terms, see /license.txt */
/**
* Layout (principal view) used for structuring other views  
* @author Christian Fasanando <[email protected]>
* @package chamilo.course_description
*/
// protect a course script
api_protect_course_script(true);
// Header
Display::display_header('');
// Introduction section
Display::display_introduction_section(TOOL_COURSE_DESCRIPTION);
// Tracking
event_access_tool(TOOL_COURSE_DESCRIPTION);
// Display
echo $content;
// Footer
Display::display_footer();
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:20,代码来源:layout.php


示例3: prolog

 /**
  * Prepare the environment. Set up breadcrumps and raise tracking event. 
  */
 protected function prolog()
 {
     event_access_tool(TOOL_GLOSSARY);
 }
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:7,代码来源:ajax_controller.class.php


示例4: header

                    }
                }
                header('Location: ../newscorm/lp_controller.php?' . api_get_cidreq() . '&lp_id=' . $o_ppt->lp_id . '&action=view_item&id=' . $first_item_id);
            } else {
                if (!empty($o_ppt->error)) {
                    $errorMessage = $o_ppt->error;
                } else {
                    $errorMessage = get_lang('OogieUnknownError');
                }
            }
        } else {
            $errorMessage = get_lang('OogieBadExtension');
        }
    }
}
event_access_tool(TOOL_UPLOAD);
// check access permissions (edit permission is needed to add a document or a LP)
$is_allowed_to_edit = api_is_allowed_to_edit();
if (!$is_allowed_to_edit) {
    api_not_allowed(true);
}
$interbreadcrumb[] = array("url" => "../newscorm/lp_controller.php?action=list", "name" => get_lang("Doc"));
$nameTools = get_lang("OogieConversionPowerPoint");
Display::display_header($nameTools);
$message = get_lang("WelcomeOogieConverter");
if (!empty($errorMessage)) {
    echo Display::return_message($errorMessage, 'warning', false);
}
$form = new FormValidator('upload_ppt', 'POST', '', '');
$form->addElement('header', get_lang("WelcomeOogieSubtitle"));
$form->addElement('html', Display::return_message($message, 'info', false));
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:upload_ppt.php


示例5: array

}
/*	Header */
if (isset($origin) && $origin == 'learnpath') {
    Display::display_reduced_header();
} else {
    if (isset($_GET['keyword']) && !empty($_GET['keyword'])) {
        $interbreadcrumb[] = array("url" => "user.php", "name" => get_lang("Users"));
        $tool_name = get_lang('SearchResults');
    } else {
        $tool_name = get_lang('Users');
        $origin = 'users';
    }
    Display::display_header($tool_name, "User");
}
//statistics
event_access_tool(TOOL_USER);
/*	Setting the permissions for this page */
$is_allowed_to_track = api_is_course_admin() || $is_courseTutor;
// Tool introduction
Display::display_introduction_section(TOOL_USER, 'left');
$actions = '';
if (api_is_allowed_to_edit(null, true)) {
    echo '<div class="actions">';
    // the action links
    if (api_get_setting('allow_user_course_subscription_by_course_admin') == 'true' or api_is_platform_admin()) {
        $actions .= '<a href="subscribe_user.php?' . api_get_cidreq() . '">' . Display::return_icon('user_subscribe_course.png', get_lang("SubscribeUserToCourse"), '', ICON_SIZE_MEDIUM) . '</a> ';
        $actions .= "<a href=\"subscribe_user.php?" . api_get_cidreq() . "&type=teacher\">" . Display::return_icon('teacher_subscribe_course.png', get_lang("SubscribeUserToCourseAsTeacher"), '', ICON_SIZE_MEDIUM) . "</a> ";
    }
    $actions .= '<a href="user.php?' . api_get_cidreq() . '&action=export&amp;type=csv">' . Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), '', ICON_SIZE_MEDIUM) . '</a> ';
    $actions .= '<a href="user.php?' . api_get_cidreq() . '&action=export&amp;type=xls">' . Display::return_icon('export_excel.png', get_lang('ExportAsXLS'), '', ICON_SIZE_MEDIUM) . '</a> ';
    if (api_get_setting('allow_user_course_subscription_by_course_admin') == 'true' or api_is_platform_admin()) {
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:user.php


示例6: api_get_path

 * @package chamilo.learnpath
 * @author Diego Escalante Urrelo <[email protected]>
 * @author Marco Antonio Villegas Vega <[email protected]>
 * @author Julio Montoya <[email protected]> Lots of bug fixing
 *
 */
/**
 * Code
 */
require api_get_path(LIBRARY_PATH).'search/search_widget.php';
require api_get_path(LIBRARY_PATH).'search/ChamiloQuery.php';
require_once api_get_path(LIBRARY_PATH).'search/IndexableChunk.class.php';
require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';

$htmlHeadXtra[] = '<link rel="stylesheet" type="text/css" href="'. api_get_path(WEB_PATH) .'main/newscorm/lp_list_search.css" />';
event_access_tool(TOOL_SEARCH);

if (isset($_SESSION['gradebook'])){
    $gradebook = $_SESSION['gradebook'];
}

if (!empty($gradebook) && $gradebook == 'view') {
    $interbreadcrumb[]= array (
            'url' => '../gradebook/'.$_SESSION['gradebook_dest'],
            'name' => get_lang('ToolGradebook')
        );
}

$interbreadcrumb[] = array('url' => './index.php', 'name' => get_lang(ucfirst(TOOL_SEARCH)));
search_widget_prepare($htmlHeadXtra);
Display::display_header(null, 'Path');
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:31,代码来源:lp_list_search.php


示例7: get_last_tool_access

/* For licensing terms, see /license.txt */
// The file that contains all the initialisation stuff (and includes all the configuration stuff)
require_once 'dropbox_init.inc.php';
// get the last time the user accessed the tool
if ($_SESSION[$_course['id']]['last_access'][TOOL_DROPBOX] == '') {
    $last_access = get_last_tool_access(TOOL_DROPBOX);
    $_SESSION[$_course['id']]['last_access'][TOOL_DROPBOX] = $last_access;
} else {
    $last_access = $_SESSION[$_course['id']]['last_access'][TOOL_DROPBOX];
}
$postAction = isset($_POST['action']) ? $_POST['action'] : null;
$view = isset($_GET['view']) ? Security::remove_XSS($_GET['view']) : null;
$viewReceivedCategory = isset($_GET['view_received_category']) ? Security::remove_XSS($_GET['view_received_category']) : null;
$viewSentCategory = isset($_GET['view_sent_category']) ? Security::remove_XSS($_GET['view_sent_category']) : null;
// Do the tracking
event_access_tool(TOOL_DROPBOX);
// This var is used to give a unique value to every page request. This is to prevent resubmiting data
$dropbox_unid = md5(uniqid(rand(), true));
/*	DISPLAY SECTION */
Display::display_introduction_section(TOOL_DROPBOX);
// Build URL-parameters for table-sorting
$sort_params = array();
if (isset($_GET['dropbox_column'])) {
    $sort_params[] = 'dropbox_column=' . $_GET['dropbox_column'];
}
if (isset($_GET['dropbox_page_nr'])) {
    $sort_params[] = 'page_nr=' . intval($_GET['page_nr']);
}
if (isset($_GET['dropbox_per_page'])) {
    $sort_params[] = 'dropbox_per_page=' . intval($_GET['dropbox_per_page']);
}
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:index.php


示例8: api_protect_course_script

<?php

/* For licensing terms, see /license.txt */
// protect a course script
api_protect_course_script(true);
Display::display_reduced_header();
// Tracking
event_access_tool($tool);
// Display
echo $content;
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:10,代码来源:layout_no_header.php


示例9: api_get_path

<?php

/* For licensing terms, see /license.txt */
/**
 * Script allowing simple edition of learnpath information (title, description, etc)
 * @package chamilo.learnpath
 * @author Yannick Warnier <[email protected]>
*/
require_once api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php';
global $charset;
$show_description_field = false;
//for now
$nameTools = get_lang('Doc');
$this_section = SECTION_COURSES;
event_access_tool(TOOL_LEARNPATH);
api_protect_course_script();
if (isset($_SESSION['gradebook'])) {
    $gradebook = $_SESSION['gradebook'];
}
if (!empty($gradebook) && $gradebook == 'view') {
    $interbreadcrumb[] = array('url' => '../gradebook/' . $_SESSION['gradebook_dest'], 'name' => get_lang('ToolGradebook'));
}
$interbreadcrumb[] = array('url' => 'lp_controller.php?action=list', 'name' => get_lang('LearningPaths'));
$interbreadcrumb[] = array('url' => api_get_self() . "?action=build&lp_id=" . $_SESSION['oLP']->get_id(), 'name' => $_SESSION['oLP']->get_name());
$htmlHeadXtra[] = '<script>
function activate_start_date() {
	if(document.getElementById(\'start_date_div\').style.display == \'none\') {
		document.getElementById(\'start_date_div\').style.display = \'block\';
	} else {
		document.getElementById(\'start_date_div\').style.display = \'none\';
	}
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:lp_edit.php


示例10: array

// the learning path, we do not include the banner so we have to explicitly
// include the stylesheet, which is normally done in the header
if (!empty($group_id)) {
    $group_properties = GroupManager::get_group_properties($group_id);
    $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']);
    Display::display_header($nameTools, 'Agenda');
} elseif (empty($origin) or $origin != 'learnpath') {
    Display::display_header($nameTools, 'Agenda');
} else {
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"" . api_get_path(WEB_CODE_PATH) . "css/default.css\"/>";
}
/*
 TRACKING
*/
event_access_tool(TOOL_CALENDAR_EVENT);
/*   			SETTING SOME VARIABLES
 */
// Variable definitions
// Defining the shorts for the days. We use camelcase because these are arrays of language variables
$DaysShort = api_get_week_days_short();
// Defining the days of the week to allow translation of the days. We use camelcase because these are arrays of language variables
$DaysLong = api_get_week_days_long();
// Defining the months of the year to allow translation of the months. We use camelcase because these are arrays of language variables
$MonthsLong = api_get_months_long();
// Database table definitions
$TABLEAGENDA = Database::get_course_table(TABLE_AGENDA);
$TABLE_ITEM_PROPERTY = Database::get_course_table(TABLE_ITEM_PROPERTY);
$tbl_user = Database::get_main_table(TABLE_MAIN_USER);
$tbl_courseUser = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$tbl_group = Database::get_course_table(TABLE_GROUP);
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:agenda.php


示例11: api_protect_course_script

// Language file that needs to be included
$language_file = 'survey';
if (!isset($_GET['cidReq'])) {
    $_GET['cidReq'] = 'none';
    // Prevent sql errors
    $cidReset = true;
}
// Including the global initialization file
require_once '../inc/global.inc.php';
$this_section = SECTION_COURSES;
$current_course_tool = TOOL_SURVEY;
api_protect_course_script(true);
// Including additional libraries
require_once 'survey.lib.php';
// Tracking
event_access_tool(TOOL_SURVEY);
/** @todo This has to be moved to a more appropriate place (after the display_header of the code) */
if (!api_is_allowed_to_edit(false, true)) {
    // Coach can see this
    Display::display_header(get_lang('SurveyList'));
    SurveyUtil::survey_list_user($_user['user_id']);
    Display::display_footer();
    exit;
}
$extend_rights_for_coachs = api_get_setting('extend_rights_for_coach_on_survey');
// Database table definitions
$table_survey = Database::get_course_table(TABLE_SURVEY);
$table_survey_question = Database::get_course_table(TABLE_SURVEY_QUESTION);
$table_course = Database::get_main_table(TABLE_MAIN_COURSE);
$table_user = Database::get_main_table(TABLE_MAIN_USER);
// Language variables
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:survey_list.php


示例12: setFocus

// Additional javascript
$htmlHeadXtra[] = NotebookManager::javascript_notebook();
$htmlHeadXtra[] = '<script type="text/javascript">
function setFocus(){
$("#note_title").focus();
}
$(document).ready(function () {
  setFocus();
});
</script>';

// Setting the tool constants
$tool = TOOL_NOTEBOOK;

// Tracking
event_access_tool(TOOL_NOTEBOOK);

// Tool name
if (isset($_GET['action']) && $_GET['action'] == 'addnote') {
	$tool = 'NoteAddNew';
	$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('ToolNotebook'));
}
if (isset($_GET['action']) && $_GET['action'] == 'editnote') {
	$tool = 'ModifyNote';
	$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('ToolNotebook'));
}

// Displaying the header
Display::display_header(get_lang(ucfirst($tool)));

// Tool introduction
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:31,代码来源:index.php


示例13: get_lang

    $("#end_date_toggle").click(function() {
        $("#end_date").toggle();
    });
});

</script>';

/* Constants and variables */
$tool_name = get_lang('ToolWiki');

/* ACCESS */
api_protect_course_script();
api_block_anonymous_users();

/* TRACKING */
event_access_tool(TOOL_WIKI);

if ($groupId) {
    $group_properties = GroupManager::get_group_properties($groupId);
    $interbreadcrumb[] = array(
        "url" => api_get_path(WEB_CODE_PATH)."group/group.php?".api_get_cidreq(),
        "name" => get_lang('Groups')
    );
    $interbreadcrumb[] = array(
        "url" => api_get_path(WEB_CODE_PATH)."group/group_space.php?".api_get_cidreq(),
        "name" => get_lang('GroupSpace').' '.Security::remove_XSS($group_properties['name'])
    );
    //ensure this tool in groups whe it's private or deactivated
    if ($group_properties['wiki_state'] == 0) {
        api_not_allowed();
    } elseif ($group_properties['wiki_state']==2) {
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:31,代码来源:index.php


示例14: get_lang

           handle: ".moved", //only the class "moved"
       });
    });
</script>';
if ($origin != 'learnpath') {
    //so we are not in learnpath tool
    Display::display_header($nameTools, get_lang('Exercise'));
    if (isset($_GET['message'])) {
        if (in_array($_GET['message'], array('ExerciseEdited'))) {
            Display::display_confirmation_message(get_lang($_GET['message']));
        }
    }
} else {
    Display::display_reduced_header();
}
event_access_tool(TOOL_QUIZ);
// Tool introduction
Display::display_introduction_section(TOOL_QUIZ);
HotPotGCt($documentPath, 1, api_get_user_id());
// Only for administrator
if ($is_allowedToEdit) {
    if (!empty($choice)) {
        // Construction of Exercise
        $objExerciseTmp = new Exercise();
        $check = Security::check_token('get');
        $exercise_action_locked = api_resource_is_locked_by_gradebook($exerciseId, LINK_EXERCISE);
        if ($objExerciseTmp->read($exerciseId)) {
            if ($check) {
                switch ($choice) {
                    case 'delete':
                        // deletes an exercise
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:exercice.php


示例15: api_get_course_int_id

$course_id = api_get_course_int_id();
// Create default category if it doesn't exist when group categories aren't allowed
if (api_get_setting('allow_group_categories') == 'false') {
    $cat_table = Database::get_course_table(TABLE_GROUP_CATEGORY);
    $sql = "SELECT * FROM {$cat_table} WHERE c_id = {$course_id} AND id = '" . GroupManager::DEFAULT_GROUP_CATEGORY . "'";
    $res = Database::query($sql);
    $num = Database::num_rows($res);
    if ($num == 0) {
        $sql = "INSERT INTO " . $cat_table . "\n        (c_id, id, title, description, forum_state, wiki_state, max_student, self_reg_allowed, self_unreg_allowed, groups_per_user, display_order)\n        VALUES ({$course_id}, '2', '" . Database::escape_string(get_lang('DefaultGroupCategory')) . "', '', '1', '1', '8', '0', '0', '0', '0');";
        Database::query($sql);
    }
}
/*	Header */
if (!isset($_GET['origin']) || $_GET['origin'] != 'learnpath') {
    // So we are not in learnpath tool
    event_access_tool(TOOL_GROUP);
    if (!$is_allowed_in_course) {
        api_not_allowed(true);
    }
}
Display::display_header(get_lang('Groups'));
// Tool introduction
Display::display_introduction_section(TOOL_GROUP);
/*
 * Self-registration and un-registration
 */
$my_group_id = isset($_GET['group_id']) ? intval($_GET['group_id']) : null;
$my_msg = isset($_GET['msg']) ? Security::remove_XSS($_GET['msg']) : null;
$my_group = isset($_REQUEST['group']) ? Security::remove_XSS($_REQUEST['group']) : null;
$my_get_id1 = isset($_GET['id1']) ? Security::remove_XSS($_GET['id1']) : null;
$my_get_id2 = isset($_GET['id2']) ? Security::remove_XSS($_GET['id2']) : null;
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:group.php


示例16: array

if (isset($_GET['action']) && $_GET['action'] == 'addcategory') {
    $nameTools = '';
    $interbreadcrumb[] = array('url' => 'link.php', 'name' => get_lang('Links'));
    $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('AddCategory'));
}
if (isset($_GET['action']) && $_GET['action'] == 'editlink') {
    $nameTools = '';
    $interbreadcrumb[] = array('url' => 'link.php', 'name' => get_lang('Links'));
    $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('EditLink'));
}
// Database Table definitions
$tbl_link = Database::get_course_table(TABLE_LINK);
$tbl_categories = Database::get_course_table(TABLE_LINK_CATEGORY);
$course_id = api_get_course_int_id();
// Statistics
event_access_tool(TOOL_LINK);
Display::display_header($nameTools, 'Links');
?>
<script type="text/javascript">
/* <![CDATA[ */
function MM_popupMsg(msg) { //v1.0
  confirm(msg);
}
/* ]]> */
</script>

<?php 
/*	Action Handling */
$nameTools = get_lang('Links');
if (isset($_GET['action'])) {
    $check_token = true;
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:link.php


示例17: array

            $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('UploadADocument'));
        }
        if ($action == 'settings') {
            $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('EditToolOptions'));
        }
        if ($action == 'create_dir') {
            $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('CreateAssignment'));
        }
        Display::display_header(null);
    } else {
        //we are in the learnpath tool
        Display::display_reduced_header();
    }
}
//stats
event_access_tool(TOOL_STUDENTPUBLICATION);
$is_allowed_to_edit = api_is_allowed_to_edit();
$student_can_edit_in_session = api_is_allowed_to_session_edit(false, true);
Display::display_introduction_section(TOOL_STUDENTPUBLICATION);
// introduction section
if ($origin == 'learnpath') {
    echo '<div style="height:15px">&nbsp;</div>';
}
/*	Display links to upload form and tool options */
if (!in_array($action, array('add', 'create_dir'))) {
    $token = Security::get_token();
}
display_action_links($work_id, $curdirpath, $action);
// for teachers
switch ($action) {
    case 'settings':
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:work.php


示例18: isset

    //if is called from a learning path lp_id
    $lp_id = isset($_REQUEST['lp_id']) ? Security::remove_XSS($_REQUEST['lp_id']) : null;
    handle_forum_and_forumcategories($lp_id);
}
// Notification
if ($actions == 'notify' && isset($_GET['content']) && isset($_GET['id'])) {
    if (api_get_session_id() != 0 && api_is_allowed_to_session_edit(false, true) == false) {
        api_not_allowed();
    }
    $return_message = set_notification($_GET['content'], $_GET['id']);
    Display::display_confirmation_message($return_message, false);
}
get_whats_new();
$whatsnew_post_info = Session::read('whatsnew_post_info');
/* TRACKING */
event_access_tool(TOOL_FORUM);
/*
    RETRIEVING ALL THE FORUM CATEGORIES AND FORUMS
    note: we do this here just after het handling of the actions to be sure that we already incorporate the
    latest changes
*/
// Step 1: We store all the forum categories in an array $forum_categories.
$forumCategories = get_forum_categories();
// Step 2: We find all the forums (only the visible ones if it is a student).
// display group forum in general forum tool depending to configuration option
$forum_list = get_forums('', '', apiGetDisplayGroupsForumInGeneralTool());
$user_id = api_get_user_id();
/* RETRIEVING ALL GROUPS AND THOSE OF THE USER */
// The groups of the user.
$groups_of_user = array();
$groups_of_user = GroupManager::get_group_ids($_course['real_id'], $user_id);
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:31,代码来源:index.php


示例19: api_get_path

$tbl_sessions = Database::get_main_table(TABLE_MAIN_SESSION);
$tbl_announcement = Database::get_course_table(TABLE_ANNOUNCEMENT);
$tbl_item_property = Database::get_course_table(TABLE_ITEM_PROPERTY);
/*	Libraries	*/
$lib = api_get_path(LIBRARY_PATH);
//avoid useless function calls
require_once $lib . 'groupmanager.lib.php';
require_once $lib . 'mail.lib.inc.php';
require_once $lib . 'tracking.lib.php';
require_once $lib . 'fckeditor/fckeditor.php';
require_once $lib . 'fileUpload.lib.php';
require_once 'announcements.inc.php';
$course_id = api_get_course_int_id();
$_course = api_get_course_info();
/*	Tracking	*/
event_access_tool(TOOL_ANNOUNCEMENT);
/*	POST TO	*/
$safe_emailTitle = isset($_POST['emailTitle']) ? $_POST['emailTitle'] : null;
$safe_newContent = isset($_POST['newContent']) ? $_POST['newContent'] : null;
$content_to_modify = $title_to_modify = '';
if (!empty($_POST['To'])) {
    if (api_get_session_id() != 0 && api_is_allowed_to_session_edit(false, true) == false) {
        api_not_allowed(true);
    }
    $display_form = true;
    $form_elements = array('emailTitle' => $safe_emailTitle, 'newContent' => $safe_newContent, 'id' => $_POST['id'], 'emailoption' => $_POST['email_ann']);
    $_SESSION['formelements'] = $form_elements;
    $form_elements = $_SESSION['formelements'];
    $title_to_modify = $form_elements["emailTitle"];
    $content_to_modify = $form_elements["newContent"];
    $announcement_to_modify = $form_elements["id"];
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:31,代码来源:announcements.php


示例20: array

 */
$language_file = array('chat');
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_CHAT;
$this_section = SECTION_COURSES;
$nameTools = get_lang('ToolChat');
if ($_GET["origin"] != 'whoisonline') {
    api_protect_course_script(true);
} else {
    $origin = $_SESSION['origin'];
    $target = $_SESSION['target'];
    $_SESSION['origin'] = Security::remove_XSS($_GET["origin"]);
    $_SESSION['target'] = Security::remove_XSS($_GET["target"]);
}
/*  TRACKING */
event_access_tool(TOOL_CHAT);
header('Content-Type: text/html; charset=' . api_get_system_encoding());
/*
 * Choose CSS style (platform's, user's, or course's)
 */
$my_style = api_get_visual_theme();
$mycourseid = api_get_course_id();
if (!empty($mycourseid) && $mycourseid != -1) {
    $open_chat_window = api_get_course_setting('allow_open_chat_window');
}
$cidreq = Security::remove_XSS($_GET['cidReq']);
$toolgroup = Security::remove_XSS($_GET['toolgroup']);
//fix when change by vertical or horizontal menu from a chat group to chat course.
if (empty($toolgroup) && empty($open_chat_window)) {
    unset($_SESSION['_gid']);
}
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:chat.php



注:本文中的event_access_tool函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP event_add函数代码示例发布时间:2022-05-15
下一篇:
PHP event函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap