<?php if (!defined('AT_INCLUDE_PATH')) { exit; } if (!isset($this) || (isset($this) && (strtolower(get_class($this)) != 'module'))) { exit(__FILE__ . ' is not a Module'); } define('AT_ADMIN_PRIV_MODULES', $this->getAdminPrivilege()); //admin pages if (admin_authenticate(AT_ADMIN_PRIV_MODULES, TRUE) || admin_authenticate(AT_ADMIN_PRIV_ADMIN, TRUE)) { $this->_pages[AT_NAV_ADMIN] = array('mods/_core/modules/index.php'); $this->_pages['mods/_core/modules/index.php']['parent'] = AT_NAV_ADMIN; $this->_pages['mods/_core/modules/index.php']['title_var'] = 'modules'; $this->_pages['mods/_core/modules/index.php']['guide'] = 'admin/?p=modules.php'; $this->_pages['mods/_core/modules/index.php']['children'] = array('mods/_core/modules/install_modules.php'); $this->_pages['mods/_core/modules/details.php']['title_var'] = 'details'; $this->_pages['mods/_core/modules/details.php']['parent'] = 'mods/_core/modules/index.php'; $this->_pages['mods/_core/modules/module_uninstall_step_1.php']['title_var'] = 'module_uninstall'; $this->_pages['mods/_core/modules/module_uninstall_step_1.php']['parent'] = 'mods/_core/modules/index.php'; $this->_pages['mods/_core/modules/module_uninstall_step_1.php']['avail_in_mobile'] = false; $this->_pages['mods/_core/modules/module_uninstall_step_2.php']['title_var'] = 'module_uninstall'; $this->_pages['mods/_core/modules/module_uninstall_step_2.php']['parent'] = 'mods/_core/modules/index.php'; $this->_pages['mods/_core/modules/module_uninstall_step_2.php']['avail_in_mobile'] = false; $this->_pages['mods/_core/modules/module_uninstall_step_3.php']['title_var'] = 'module_uninstall'; $this->_pages['mods/_core/modules/module_uninstall_step_3.php']['parent'] = 'mods/_core/modules/index.php'; $this->_pages['mods/_core/modules/module_uninstall_step_3.php']['avail_in_mobile'] = false;
<?php /************************************************************************/ /* ATutor */ /************************************************************************/ /* Copyright (c) 2002-2010 */ /* Inclusive Design Institute */ /* http://atutor.ca */ /* This program is free software. You can redistribute it and/or */ /* modify it under the terms of the GNU General Public License */ /* as published by the Free Software Foundation. */ /************************************************************************/ // $Id$ $ define('AT_INCLUDE_PATH', '../../../../include/'); require AT_INCLUDE_PATH . 'vitals.inc.php'; admin_authenticate(AT_ADMIN_PRIV_ADMIN); if (isset($_POST['cancel'])) { $msg->addFeedback('CANCELLED'); header('Location: courses.php'); exit; } if (isset($_POST['submit'])) { $side_menu = ''; $_stack_names = array(); foreach ($_stacks as $name => $file) { $_stack_names[] = $name; } $_POST['stack'] = array_unique($_POST['stack']); $_POST['stack'] = array_intersect($_POST['stack'], $_stack_names); foreach ($_POST['stack'] as $dropdown) { if ($dropdown != '') {
<?php } ?> </ul> </div> </div> <div class="logoutbar"> <div id="userlinks"> <?php if (isset($_SESSION['valid_user']) && $_SESSION['valid_user']) { ?> <?php $path_parts = explode("/", $this->current_top_level_page); $last_path_part = $path_parts[sizeof($path_parts) - 1]; if (!admin_authenticate(AT_ADMIN_PRIV_ADMIN, AT_PRIV_RETURN) && $last_path_part != 'preferences.php') { ?> <a href="" class="pref_wiz_launcher"><img alt="<?php echo _AT('preferences') . ' - ' . _AT('new_window'); ?> " title="<?php echo _AT('preferences') . ' - ' . _AT('new_window'); ?> " src="<?php echo $this->img; ?> wand.png" class="img1616" style="margin-bottom:-.5em;"/></a> | <?php } ?>
/****************************************************************************/ /* ATutor */ /****************************************************************************/ /* Copyright (c) 2002-2010 */ /* Inclusive Design Institute */ /* http://atutor.ca */ /* */ /* This program is free software. You can redistribute it and/or */ /* modify it under the terms of the GNU General Public License */ /* as published by the Free Software Foundation. */ /****************************************************************************/ // $Id$ define('AT_INCLUDE_PATH', '../../../../include/'); require AT_INCLUDE_PATH . 'vitals.inc.php'; require AT_INCLUDE_PATH . '../mods/_core/themes/lib/themes.inc.php'; admin_authenticate(AT_ADMIN_PRIV_CATEGORIES); require AT_INCLUDE_PATH . '../mods/_core/cats_categories/lib/admin_categories.inc.php'; if (isset($_POST['submit'])) { /* insert or update a category */ $cat_id = intval($_POST['cat_id']); $cat_parent_id = intval($_POST['cat_parent_id']); $cat_name = trim($_POST['cat_name']); $cat_name = $addslashes($cat_name); $cat_theme = $addslashes($_POST['cat_theme']); if ($cat_name == '') { $msg->addError(array('EMPTY_FIELDS', _AT('title'))); } $cat_name = validate_length($cat_name, 100); if ($_POST['theme_parent']) { $sql = "SELECT theme FROM " . TABLE_PREFIX . "course_cats WHERE cat_id={$cat_parent_id}"; $result = mysql_query($sql, $db);
/* Inclusive Design Institute */ /* http://atutor.ca */ /* */ /* This program is free software. You can redistribute it and/or*/ /* modify it under the terms of the GNU General Public License */ /* as published by the Free Software Foundation. */ /****************************************************************/ // $Id$ $_user_location = 'admin'; define('AT_INCLUDE_PATH', '../../../include/'); require(AT_INCLUDE_PATH.'vitals.inc.php'); require(AT_INCLUDE_PATH.'../mods/_core/themes/lib/themes.inc.php'); admin_authenticate(AT_ADMIN_PRIV_THEMES); $theme = $addslashes($_GET['theme_dir']); $version = $addslashes($_GET[$theme.'_version']); if (isset($_GET['export'], $_GET['theme_dir'])) { export_theme($theme); } else if (isset($_GET['delete'], $_GET['theme_dir'])) { header('Location: delete.php?theme_code='.urlencode($theme)); exit; } else if (isset($_GET['default'], $_GET['theme_dir'])) { set_theme_as_default($theme, $_GET['type']); $_config['pref_defaults'] = unserialize($_config['pref_defaults']); if ($_GET['type']==MOBILE_DEVICE) { $_config['pref_defaults']['PREF_MOBILE_THEME'] = $theme; } else {
<?php /****************************************************************/ /* ATutor */ /****************************************************************/ /* Copyright (c) 2002-2010 */ /* Inclusive Design Institute */ /* http://atutor.ca */ /* */ /* This program is free software. You can redistribute it and/or*/ /* modify it under the terms of the GNU General Public License */ /* as published by the Free Software Foundation. */ /****************************************************************/ // $Id$ define('AT_INCLUDE_PATH', '../../../../include/'); require AT_INCLUDE_PATH . 'vitals.inc.php'; admin_authenticate(AT_ADMIN_PRIV_ENROLLMENT); $course_id = intval($_REQUEST['course_id']); require AT_INCLUDE_PATH . '../mods/_core/enrolment/html/privileges.inc.php'; exit;
/** * If pretty URL within admin config is switched on. We will apply pretty URL * to all the links in ATutor. This function will authenticate itself towards the current pages. * In our definition, admins, login, registration pages shouldn't have pretty url applied. However, * if one want to use url_rewrite on these pages, please force it by using the third parameter. * Note: If system config has turned off this feature, $force will have no effect. * @param string the Url should be a relative link, have to improve this later on, to check if * it's a relative link, if not, truncate it. * @param boolean Available values are AT_PRETTY_URL_IS_HEADER, AT_PRETTY_URL_NOT_HEADER(default) * use AT_PRETTY_URL_IS_HEADER if url_rewrite is used in php header('Location:..'), absolute path is needed for this. * @param boolean true to force the url_rewrite, false otheriwse. False is the default. * @author Harris Wong */ function url_rewrite($url, $is_rewriting_header = AT_PRETTY_URL_NOT_HEADER, $force = false) { global $_config, $db; $url_parser = new UrlParser(); $pathinfo = $url_parser->getPathArray(); /* If this is any kind of admins, don't prettify the url * $_SESSION['is_guest'] is used to check against login/register/browse page, the links on this page will * only be prettified when a user has logged in. * Had used $_SESSION[valid_user] before but it created this problem: * http://www.atutor.ca/atutor/mantis/view.php?id=3426 */ if ($force || isset($_SESSION['course_id']) && $_SESSION['course_id'] > 0) { //if course id is defined, apply pretty url. } else { if (admin_authenticate(AT_ADMIN_PRIV_ADMIN, AT_PRIV_RETURN) || isset($_SESSION['privileges']) && admin_authenticate($_SESSION['privileges'], AT_PRIV_RETURN) || isset($_SESSION['is_guest']) && $_SESSION['is_guest'] == 1) { return $url; } } //if we allow pretty url in the system if ($_config['pretty_url'] > 0) { $course_id = 0; //If we allow course dir name from sys perf if ($_config['course_dir_name'] > 0) { if (preg_match('/bounce.php\\?course=([\\d]+)$/', $url, $matches) == 1) { // bounce has the highest priority, even if session is set, work on // bounce first. $course_id = $url_parser->getCourseDirName($matches[1]); } elseif (isset($_REQUEST['course'])) { //jump menu $course_id = $url_parser->getCourseDirName($_REQUEST['course']); } elseif (isset($_REQUEST['p_course'])) { // is set when guests access public course. @see bounce.php $course_id = $url_parser->getCourseDirName($_REQUEST['p_course']); } elseif (isset($_SESSION['course_id']) && $_SESSION['course_id'] > 0) { $course_id = $url_parser->getCourseDirName($_SESSION['course_id']); } } else { if (isset($_SESSION['course_id'])) { $course_id = $_SESSION['course_id']; } } $url = $pathinfo[1]->convertToPrettyUrl($course_id, $url); } elseif ($_config['course_dir_name'] > 0) { //enabled course directory name, disabled pretty url if (preg_match('/bounce.php\\?course=([\\d]+)$/', $url, $matches) == 1) { // bounce has the highest priority, even if session is set, work on // bounce first. $course_id = $url_parser->getCourseDirName($matches[1]); } elseif (isset($_REQUEST['course'])) { $course_id = $url_parser->getCourseDirName($_REQUEST['course']); } elseif (isset($_REQUEST['p_course'])) { // is set when guests access public course. @see bounce.php $course_id = $url_parser->getCourseDirName($_REQUEST['p_course']); } elseif (isset($_SESSION['course_id']) && $_SESSION['course_id'] > 0) { $course_id = $url_parser->getCourseDirName($_SESSION['course_id']); } $url = $pathinfo[1]->convertToPrettyUrl($course_id, $url); } //instead of putting AT_BASE_HREF in all the headers location, we will put it here. //Abs paths are required for pretty url because otherwise the url location will be appeneded. //ie. ATutor_161/blogs/CoURSe_rOAd/blogs/view.php/ot/1/oid/1/ instead of // ATutor_161/CoURSe_rOAd/blogs/view.php/ot/1/oid/1/ if ($is_rewriting_header == true) { return AT_BASE_HREF . $url; } return $url; }
// ** possible alternative: ** // $this->addStack('social', array('title_var' => 'social', 'file' => './side_menu.inc.php'); /******* * if this module is to be made available to students on the Home or Main Navigation. */ $_group_tool = $_student_tool = AT_SOCIAL_BASENAME.AT_SOCIAL_INDEX; $this->_list['social'] = array('title_var'=>'social','file'=>'mods/_standard/social/sublinks.php'); $this->_pages[AT_SOCIAL_BASENAME.'index.php']['icon'] = 'images/home-directory_sm.png'; /******* * add the admin pages when needed. */ if (admin_authenticate(AT_ADMIN_PRIV_SOCIAL, TRUE) || admin_authenticate(AT_ADMIN_PRIV_ADMIN, TRUE)) { //$this->_pages[AT_NAV_ADMIN] = array('mods/_standard/social/index_admin.php'); $this->_pages[AT_SOCIAL_BASENAME.'index_admin.php']['title_var'] = 'social'; $this->_pages[AT_SOCIAL_BASENAME.'index_admin.php']['parent'] = 'admin/config_edit.php'; $this->_pages[AT_SOCIAL_BASENAME.'index_admin.php']['children'] = array(AT_SOCIAL_BASENAME.'admin/delete_applications.php'); $this->_pages[AT_SOCIAL_BASENAME.'admin/delete_applications.php']['title_var'] = 'delete_applications'; $this->_pages[AT_SOCIAL_BASENAME.'admin/delete_applications.php']['parent'] = AT_SOCIAL_BASENAME.'index_admin.php'; } /******* * instructor Manage section: */ //$this->_pages[AT_SOCIAL_BASENAME.'index_instructor.php']['title_var'] = 'social'; //$this->_pages[AT_SOCIAL_BASENAME.'index_instructor.php']['parent'] = 'tools/index.php';
<?php if (!defined('AT_INCLUDE_PATH')) { exit; } if (!isset($this) || isset($this) && strtolower(get_class($this)) != 'module') { exit(__FILE__ . ' is not a Module'); } define('AT_PRIV_ENROLLMENT', $this->getPrivilege()); define('AT_ADMIN_PRIV_ENROLLMENT', $this->getAdminPrivilege()); $this->_stacks['users_online'] = array('title_var' => 'users_online', 'file' => AT_INCLUDE_PATH . 'html/dropdowns/users_online.inc.php'); if (admin_authenticate(AT_ADMIN_PRIV_ENROLLMENT, TRUE) || admin_authenticate(AT_ADMIN_PRIV_ADMIN, TRUE)) { //$this->_pages[AT_NAV_ADMIN] = array('mods/_core/enrolment/admin/index.php'); $this->_pages['mods/_core/enrolment/admin/index.php']['parent'] = 'mods/_core/courses/admin/courses.php'; $this->_pages['mods/_core/enrolment/admin/index.php']['title_var'] = 'enrollment'; $this->_pages['mods/_core/enrolment/admin/index.php']['parent'] = 'mods/_core/courses/admin/courses.php'; $this->_pages['mods/_core/enrolment/admin/index.php']['guide'] = 'admin/?p=enrollment.php'; $this->_pages['mods/_core/enrolment/admin/enroll_edit.php']['title_var'] = 'enrollment'; $this->_pages['mods/_core/enrolment/admin/enroll_edit.php']['parent'] = 'mods/_core/enrolment/admin/index.php'; $this->_pages['mods/_core/enrolment/admin/privileges.php']['title_var'] = 'privileges'; $this->_pages['mods/_core/enrolment/admin/privileges.php']['parent'] = 'mods/_core/enrolment/admin/index.php'; $this->_pages['mods/_core/enrolment/admin/privileges.php']['guide'] = 'admin/?p=enrollment_privileges.php'; $this->_pages['mods/_core/enrolment/admin/privileges.php']['avail_in_mobile'] = false; // linked from users.php $this->_pages['admin/user_enrollment.php']['title_var'] = 'enrollment'; $this->_pages['admin/user_enrollment.php']['parent'] = 'admin/users.php'; } $this->_pages['mods/_core/enrolment/index.php']['title_var'] = 'enrollment'; $this->_pages['mods/_core/enrolment/index.php']['parent'] = 'tools/index.php'; $this->_pages['mods/_core/enrolment/index.php']['guide'] = 'instructor/?p=enrollment.php'; $this->_pages['mods/_core/enrolment/index.php']['children'] = array('mods/_core/enrolment/export_course_list.php', 'mods/_core/enrolment/import_course_list.php', 'mods/_core/enrolment/create_course_list.php');
* and feedback messages, respectively. Why use "_c" as the prefix? * because it comes before "_t" and _m" in the alphabet. This lets us * sort the language by `variable` and limit it to one result. That is * how the custom language terms are retrieved in place of default * language. * * another oddity is that although custom language text isn't deleted * upon upgrades, the language definitions are, which means those terms * cannot be edited until after the language pack is reinstalled. * this also means that if a term has changed the system might be unaware * of new replacement tokens and could break. * */ define('AT_INCLUDE_PATH', '../../../include/'); require AT_INCLUDE_PATH . 'vitals.inc.php'; admin_authenticate(AT_ADMIN_PRIV_LANGUAGES); if (defined('AT_DEVEL_TRANSLATE') && AT_DEVEL_TRANSLATE) { $msg->addWarning('TRANSLATE_ON'); require AT_INCLUDE_PATH . 'header.inc.php'; require AT_INCLUDE_PATH . 'footer.inc.php'; exit; } require AT_INCLUDE_PATH . 'header.inc.php'; $_variables = array('template' => '_template', 'feedback' => '_msgs'); $_c_variables = array('template' => '_c_template', 'feedback' => '_c_msgs'); $sql_search = ''; if (isset($_GET['filter'], $_GET['search'])) { $_GET['search'] = trim($addslashes($_GET['search'])); $words = explode(' ', $_GET['search']); foreach ($words as $key => $word) { // search `term` and `text` only
<tfoot> <tr> <td colspan="<?php echo 9 + $col_counts; ?> "> <input type="submit" name="edit" value="<?php echo _AT('edit'); ?> " /> <input type="submit" name="password" value="<?php echo _AT('password'); ?> " /> <?php if (admin_authenticate(AT_ADMIN_PRIV_ENROLLMENT, true)) { ?> <input type="submit" name="enrollment" value="<?php echo _AT('enrollment'); ?> " /> <?php } ?> <label for="change_status"><?php echo _AT('more_options'); ?> </label> <select name="change_status" id="change_status"> <!-- REMOVED FOR MOBILE <option value="-2"><?php
if (!defined('AT_INCLUDE_PATH')) { exit; } if (!isset($this) || isset($this) && strtolower(get_class($this)) != 'module') { exit(__FILE__ . ' is not a Module'); } if (!defined('AT_PRIV_ADMIN')) { define('AT_PRIV_ADMIN', $this->getPrivilege()); } if (!defined('AT_ADMIN_PRIV_COURSES')) { define('AT_ADMIN_PRIV_COURSES', $this->getAdminPrivilege()); } global $_config, $db; // for admin if (admin_authenticate(AT_ADMIN_PRIV_COURSES, TRUE) || admin_authenticate(AT_ADMIN_PRIV_ADMIN, TRUE)) { //$sql = "SELECT * from ".TABLE_PREFIX."modules WHERE dir_name = '_core/services' && status ='2'"; $sql = "SELECT * from %smodules WHERE dir_name = '_core/services' && status ='2'"; $result = queryDB($sql, array(TABLE_PREFIX), TRUE); if (count($result) > 0) { $service_installed = count($result); } $this->_pages[AT_NAV_ADMIN] = array('mods/_core/courses/admin/courses.php'); $this->_pages['mods/_core/courses/admin/courses.php']['title_var'] = 'courses'; $this->_pages['mods/_core/courses/admin/courses.php']['parent'] = AT_NAV_ADMIN; $this->_pages['mods/_core/courses/admin/courses.php']['guide'] = 'admin/?p=courses.php'; if (!$service_installed) { $this->_pages['mods/_core/courses/admin/courses.php']['children'] = array('mods/_core/enrolment/admin/index.php', 'mods/_core/courses/admin/default_mods.php', 'mods/_core/courses/admin/default_side.php', 'mods/_core/courses/admin/auto_enroll.php', 'mods/_core/courses/admin/create_course.php'); } else { $this->_pages['mods/_core/courses/admin/courses.php']['children'] = array('mods/_core/enrolment/admin/index.php', 'mods/_core/courses/admin/default_mods.php', 'mods/_core/courses/admin/default_side.php', 'mods/_core/courses/admin/auto_enroll.php'); }
<?php /****************************************************************/ /* BigBlueButton module for ATutor */ /* https://github.com/nishant1000/BigBlueButton-module-for-ATutor*/ /* */ /* This module allows to search OpenLearn for educational */ /* content. */ /* Author: Nishant Kumar */ /* This program is free software. You can redistribute it and/or*/ /* modify it under the terms of the GNU General Public License */ /* as published by the Free Software Foundation. */ /****************************************************************/ // $Id$ define('AT_INCLUDE_PATH', '../../include/'); require (AT_INCLUDE_PATH.'vitals.inc.php'); admin_authenticate(AT_ADMIN_PRIV_BIGBLUEBUTTON); require (AT_INCLUDE_PATH.'header.inc.php'); global $_base_href; ?> <h3><?php echo _AT('bbb_admin_setup'); ?> </h3><br /> <div class="input-form" style="padding:.5em;"> <p><?php echo _AT('bbb_config_text'); ?></p> <form name="form" action="<?php echo $_base_href; ?>mods/bigbluebutton/change_admin.php" method="post"> <label for="url"><?php echo _AT('bbb_url'); ?></label><br /> <input type="text" name="bbb_url" id="url" class="input" maxlength="60" size="40" value="<?php echo $_config['bbb_url'] ?>" /><br /> <label for="url"><?php echo _AT('bbb_salt'); ?></label><br />
*/ if (!isset($this) || isset($this) && strtolower(get_class($this)) != 'module') { exit(__FILE__ . ' is not a Module'); } if (defined('IS_SUBSITE') && IS_SUBSITE) { return; } /******* * assign the instructor and admin privileges to the constants. */ define('AT_PRIV_PATCHER', $this->getPrivilege()); define('AT_ADMIN_PRIV_PATCHER', $this->getAdminPrivilege()); /******* * add the admin pages when needed. */ if (admin_authenticate(AT_ADMIN_PRIV_PATCHER, TRUE) || admin_authenticate(AT_ADMIN_PRIV_ADMIN, TRUE)) { $this->_pages[AT_NAV_ADMIN] = array('mods/_standard/patcher/index_admin.php'); $this->_pages['mods/_standard/patcher/index_admin.php']['title_var'] = 'patcher'; $this->_pages['mods/_standard/patcher/index_admin.php']['parent'] = AT_NAV_ADMIN; $this->_pages['mods/_standard/patcher/index_admin.php']['avail_in_mobile'] = false; $this->_pages['mods/_standard/patcher/index_admin.php']['children'] = array('mods/_standard/patcher/myown_patches.php', 'mods/_standard/patcher/patch_create.php'); $this->_pages['mods/_standard/patcher/myown_patches.php']['title_var'] = 'myown_patches'; $this->_pages['mods/_standard/patcher/myown_patches.php']['parent'] = 'mods/_standard/patcher/index_admin.php'; $this->_pages['mods/_standard/patcher/myown_patches.php']['children'] = array('mods/_standard/patcher/patch_create.php'); $this->_pages['mods/_standard/patcher/patch_create.php']['title_var'] = 'create_patch'; $this->_pages['mods/_standard/patcher/patch_create.php']['parent'] = 'mods/_standard/patcher/myown_patches.php'; $this->_pages['mods/_standard/patcher/patch_edit.php']['title_var'] = 'edit_patch'; $this->_pages['mods/_standard/patcher/patch_edit.php']['parent'] = 'mods/_standard/patcher/myown_patches.php'; $this->_pages['mods/_standard/patcher/patch_delete.php']['title_var'] = 'delete_patch'; $this->_pages['mods/_standard/patcher/patch_delete.php']['parent'] = 'mods/_standard/patcher/myown_patches.php'; }
<?php define('AT_INCLUDE_PATH', '../../../../include/'); require AT_INCLUDE_PATH . 'vitals.inc.php'; admin_authenticate(AT_ADMIN_PRIV_BASICLTI); require_once 'forms.php'; if ($_POST['submit']) { // filter all POST data $_POST['form_basiclti'] = $addslashes($_POST['form_basiclti']); $_POST['title'] = $addslashes($_POST['title']); $_POST['toolid'] = $addslashes($_POST['toolid']); $_POST['description'] = $addslashes($_POST['description']); $_POST['toolurl'] = $addslashes($_POST['toolurl']); $_POST['resourcekey'] = $addslashes($_POST['resourcekey']); $_POST['password'] = $addslashes($_POST['password']); $_POST['preferheight'] = intval($_POST['preferheight']); $_POST['allowpreferheight'] = intval($_POST['allowpreferheight']); $_POST['launchinpopup'] = intval($_POST['launchinpopup']); $_POST['debuglaunch'] = intval($_POST['debuglaunch']); $_POST['sendname'] = intval($_POST['sendname']); $_POST['sendemailaddr'] = intval($_POST['sendemailaddr']); $_POST['acceptgrades'] = intval($_POST['acceptgrades']); $_POST['allowroster'] = intval($_POST['allowroster']); $_POST['allowsetting'] = intval($_POST['allowsetting']); $_POST['allowcustomparameters'] = intval($_POST['allowcustomparameters']); $_POST['customparameters'] = str_replace('\\r\\n', "\r\n", $addslashes($_POST['customparameters'])); $_POST['organizationid'] = $addslashes($_POST['organizationid']); $_POST['organizationurl'] = $addslashes($_POST['organizationurl']); // $_POST['organizationdescr'] = $addslashes($_POST['organizationdescr']); $_POST['submit'] = $addslashes($_POST['submit']); }
/* ATutor */ /***********************************************************************/ /* Copyright (c) 2002-2009 */ /* Adaptive Technology Resource Centre / Inclusive Design Institute */ /* http://atutor.ca */ /* */ /* This program is free software. You can redistribute it and/or */ /* modify it under the terms of the GNU General Public License */ /* as published by the Free Software Foundation. */ /***********************************************************************/ // $Id$ define('AT_INCLUDE_PATH', '../../include/'); require AT_INCLUDE_PATH . 'vitals.inc.php'; include AT_JB_INCLUDE . 'classes/Job.class.php'; include AT_JB_INCLUDE . 'classes/Employer.class.php'; admin_authenticate(AT_ADMIN_PRIV_JOB_BOARD); //init $job = new Job(); $page = intval($_GET['p']); $page = $page == 0 ? 1 : $page; $all_job_posts = $job->getAllJobs($_GET['col'], $_GET['order'], true); //handle pages if ($page > 0) { $offset = ($page - 1) * AT_JB_ROWS_PER_PAGE; } else { $offset = 0; } $current_job_posts = array_slice($all_job_posts, $offset, AT_JB_ROWS_PER_PAGE); //handle order if ($_GET['order'] == '') { $order = 'DESC';
} ?> </fieldset> <fieldset class="group_form"><legend class="group_form"><?php echo _AT('personal_information'); ?> </legend> <div class="row"> <h3><?php echo _AT('personal_information') . ' (' . _AT('optional') . ')'; ?> </h3> </div> <?php if (admin_authenticate(AT_ADMIN_PRIV_USERS, TRUE) && defined('AT_MASTER_LIST') && AT_MASTER_LIST) { ?> <div class="row"> <label for="student_id"><?php echo _AT('student_id'); ?> </label><br /> <input type="text" name="student_id" value="<?php echo $_POST['student_id']; ?> " size="20" /><br /> </div> <div class="row"> <label for="student_pin"><?php echo _AT('student_pin'); ?>
/************************************************************************/ /* ATutor */ /************************************************************************/ /* Copyright (c) 2002-2010 */ /* Inclusive Design Institute */ /* http://atutor.ca */ /* */ /* This program is free software. You can redistribute it and/or */ /* modify it under the terms of the GNU General Public License */ /* as published by the Free Software Foundation. */ /************************************************************************/ // $Id$ define('AT_INCLUDE_PATH', '../../../include/'); require (AT_INCLUDE_PATH.'vitals.inc.php'); admin_authenticate(AT_ADMIN_PRIV_PATCHER); if (isset($_POST['remove'], $_POST['myown_patch_id'])) { header('Location: patch_delete.php?myown_patch_id='.$_POST['myown_patch_id']); exit; } else if (isset($_POST['edit'], $_POST['myown_patch_id'])) { header('Location: patch_edit.php?myown_patch_id='.$_POST['myown_patch_id']); exit; } else if (!empty($_POST) && !isset($_POST['myown_patch_id'])) { $msg->addError('NO_ITEM_SELECTED'); }
/****************************************************************************/ /* ATutor */ /****************************************************************************/ /* Copyright (c) 2002-2010 */ /* Inclusive Design Institute */ /* http://atutor.ca */ /* */ /* This program is free software. You can redistribute it and/or */ /* modify it under the terms of the GNU General Public License */ /* as published by the Free Software Foundation. */ /****************************************************************************/ // $Id$ define('AT_INCLUDE_PATH', '../../../../include/'); require AT_INCLUDE_PATH . 'vitals.inc.php'; admin_authenticate(AT_ADMIN_PRIV_COURSES); if (isset($_GET['view'], $_GET['id'])) { header('Location:instructor_login.php?course=' . $_GET['id']); exit; } else { if (isset($_GET['edit'], $_GET['id'])) { header('Location: ../../properties/admin/edit_course.php?course=' . $_GET['id']); exit; } else { if (isset($_GET['backups'], $_GET['id'])) { header('Location: ../../backups/admin/index.php?course=' . $_GET['id']); exit; } else { if (isset($_GET['delete'], $_GET['id'])) { header('Location: ../../properties/admin/delete_course.php?course=' . $_GET['id']); exit;
$result = $pa->editAlbum($_POST['album_name'], $_POST['album_location'], $_POST['album_description'], $album_type, $album_permission); if (!$result) { $msg->addError('PA_EDIT_ALBUM_FAILED'); } } else { //album name can't be empty $msg->addError('EMPTY_ALBUM_NAME'); } $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY'); if (admin_authenticate(AT_ADMIN_PRIV_PHOTO_ALBUM, true)) { //if admin header('Location: index_admin.php'); exit; } //header('Location: albums.php?id='.intval($_POST['aid'])); header('Location: index.php'); exit; } elseif (isset($_POST['cancel'])) { $msg->addFeedback('CANCELLED'); if (admin_authenticate(AT_ADMIN_PRIV_PHOTO_ALBUM, true)) { //if admin header('Location: index_admin.php'); exit; } header('Location: ' . AT_PA_BASE); exit; } include AT_INCLUDE_PATH . 'header.inc.php'; $savant->assign('album_info', $album_info); $savant->display('photos/pa_edit_album.tmpl.php'); include AT_INCLUDE_PATH . 'footer.inc.php';
/************************************************************************/ /* ATutor */ /************************************************************************/ /* Copyright (c) 2002-2010 */ /* Inclusive Design Institute */ /* http://atutor.ca */ /* */ /* This program is free software. You can redistribute it and/or */ /* modify it under the terms of the GNU General Public License */ /* as published by the Free Software Foundation. */ /************************************************************************/ // $Id: define('AT_INCLUDE_PATH', '../../../include/'); require(AT_INCLUDE_PATH.'vitals.inc.php'); admin_authenticate(AT_ADMIN_PRIV_MODULES); $module_folder = '../../../mods/'; if (isset($_REQUEST['cancelled'])) $cancelled = $_REQUEST['cancelled']; else if (isset($_POST['cancelled'])) $cancelled = $_POST['cancelled']; if (isset($_REQUEST['installed'])) $installed = $_REQUEST['installed']; else if (isset($_POST['installed'])) $installed = $_POST['installed']; if (!is_writable($module_folder) && isset($_POST['submit_yes'])) {
<?php /***********************************************************************/ /* ATutor */ /***********************************************************************/ /* Copyright (c) 2002-2010 */ /* Inclusive Design Institute */ /* http://atutor.ca */ /* */ /* This program is free software. You can redistribute it and/or */ /* modify it under the terms of the GNU General Public License */ /* as published by the Free Software Foundation. */ /***********************************************************************/ // $Id$ define('AT_INCLUDE_PATH', '../../../../include/'); require AT_INCLUDE_PATH . 'vitals.inc.php'; admin_authenticate(AT_ADMIN_PRIV_PHOTO_ALBUM); $isadmin = TRUE; //printer header iff this is not a POST request //a hack to avoid 'header already sent...' error. if (!isset($_POST['submit']) && !isset($_POST['cancel'])) { //$_custom_css = $_base_path . AT_PA_BASENAME . 'module.css'; // use a custom stylesheet require AT_INCLUDE_PATH . 'header.inc.php'; $msg->printAll(); } require AT_PA_INCLUDE . 'edit_album.inc.php'; require AT_INCLUDE_PATH . 'footer.inc.php';
/****************************************************************************/ /* ATutor */ /****************************************************************************/ /* Copyright (c) 2002-2010 */ /* Inclusive Design Institute */ /* http://atutor.ca */ /* */ /* This program is free software. You can redistribute it and/or */ /* modify it under the terms of the GNU General Public License */ /* as published by the Free Software Foundation. */ /****************************************************************************/ // $Id$ define('AT_INCLUDE_PATH', '../../../../include/'); require AT_INCLUDE_PATH . 'vitals.inc.php'; admin_authenticate(AT_ADMIN_PRIV_BACKUPS); require AT_INCLUDE_PATH . '../mods/_core/backups/classes/Backup.class.php'; require_once AT_INCLUDE_PATH . '../mods/_core/file_manager/filemanager.inc.php'; if (isset($_POST['backup_id'])) { $ids = explode('_', $_POST['backup_id']); $backup_id = $ids[0]; $course = $ids[1]; } if (isset($_POST['restore'], $backup_id)) { header('Location: restore.php?backup_id=' . $backup_id . SEP . 'course=' . $course); exit; } else { if (isset($_POST['download'], $backup_id)) { $Backup = new Backup($db, $course); $Backup->download($backup_id); exit;
/** * Get the owner of this album * @param int album_id * @param int member_id * @return True if the given user has the privilege to delete/edit. */ function checkAlbumPriv($member_id) { $album_id = $this->id; //if admin if (admin_authenticate(AT_ADMIN_PRIV_PHOTO_ALBUM, true)) { return true; } $sql = "SELECT member_id FROM %spa_albums WHERE id=%d"; $row = queryDB($sql, array(TABLE_PREFIX, $album_id), TRUE); if (count($row) > 0) { return $row['member_id'] == $member_id; } return false; }
$_pages['admin/config_edit.php']['guide'] = 'admin/?p=system_preferences.php'; $_pages['admin/config_edit.php']['children'] = array_merge((array) $_pages['admin/config_edit.php']['children'], array('admin/error_logging.php', 'mods/_standard/social/index_admin.php')); } $_pages['admin/error_logging.php']['title_var'] = 'error_logging'; $_pages['admin/error_logging.php']['parent'] = 'admin/config_edit.php'; $_pages['admin/error_logging.php']['guide'] = 'admin/?p=error_logging.php'; $_pages['admin/error_logging.php']['children'] = array_merge(array('admin/error_logging_bundle.php', 'admin/error_logging_reset.php'), isset($_pages['admin/error_logging.php']['children']) ? $_pages['admin/error_logging.php']['children'] : array()); $_pages['admin/error_logging_reset.php']['title_var'] = 'reset_log'; $_pages['admin/error_logging_reset.php']['parent'] = 'admin/error_logging.php'; $_pages['admin/error_logging_bundle.php']['title_var'] = 'report_errors'; $_pages['admin/error_logging_bundle.php']['parent'] = 'admin/error_logging.php'; $_pages['admin/error_logging_details.php']['title_var'] = 'viewing_profile_bugs'; $_pages['admin/error_logging_details.php']['parent'] = 'admin/error_logging.php'; $_pages['admin/error_logging_view.php']['title_var'] = 'viewing_errors'; $_pages['admin/error_logging_view.php']['parent'] = 'admin/error_logging_details.php'; if (admin_authenticate(AT_ADMIN_PRIV_ADMIN, TRUE)) { // hide modules from non-super admins $_pages['admin/cron_config.php']['title_var'] = 'cron_config'; $_pages['admin/cron_config.php']['parent'] = 'admin/config_edit.php'; $_pages['admin/cron_config.php']['guide'] = 'admin/?p=cron_setup.php'; $_pages['admin/config_edit.php']['children'] = array_merge((array) $_pages['admin/config_edit.php']['children'], array('admin/cron_config.php')); } } } /* global pages */ $_pages['about.php']['title_var'] = 'about_atutor'; $_pages['404.php']['title_var'] = '404'; $_pages['help/index.php']['title_var'] = 'help'; $_pages['help/index.php']['children'] = array_merge(array('help/accessibility.php', 'help/contact_support.php'), isset($_pages['help/index.php']['children']) ? $_pages['help/index.php']['children'] : array()); $_pages['help/accessibility.php']['title_var'] = 'accessibility'; $_pages['help/accessibility.php']['parent'] = 'help/index.php';
/************************************************************************/ /* ATutor */ /************************************************************************/ /* Copyright (c) 2002-2010 */ /* Inclusive Design Institute */ /* http://atutor.ca */ /* */ /* This program is free software. You can redistribute it and/or */ /* modify it under the terms of the GNU General Public License */ /* as published by the Free Software Foundation. */ /************************************************************************/ // $Id$ define('AT_INCLUDE_PATH', '../../../../include/'); require AT_INCLUDE_PATH . 'vitals.inc.php'; admin_authenticate(AT_ADMIN_PRIV_FORUMS); if (isset($_GET['edit'], $_GET['id'])) { header('Location: forum_edit.php?forum=' . $_GET['id']); exit; } else { if (isset($_GET['delete'], $_GET['id'])) { header('Location: forum_delete.php?forum=' . $_GET['id']); exit; } else { if (isset($_GET['delete']) || isset($_GET['edit'])) { $msg->addError('NO_ITEM_SELECTED'); } } } include AT_INCLUDE_PATH . '../mods/_standard/forums/lib/forums.inc.php'; require AT_INCLUDE_PATH . 'header.inc.php';
/* ATutor */ /************************************************************************/ /* Copyright (c) 2002-2010 */ /* Inclusive Design Institute */ /* http://atutor.ca */ /* */ /* This program is free software. You can redistribute it and/or */ /* modify it under the terms of the GNU General Public License */ /* as published by the Free Software Foundation. */ /************************************************************************/ // $Id$ define('AT_INCLUDE_PATH', '../../../include/'); require(AT_INCLUDE_PATH . 'vitals.inc.php'); admin_authenticate(AT_ADMIN_PRIV_RSS); if (isset($_POST['cancel'])) { $msg->addFeedback('CANCELLED'); header("Location: index_admin.php"); exit; } else if (isset($_POST['submit'])) { $missing_fields = array(); if (trim($_POST['title']) == '') { $missing_fields[] = _AT('title'); } if (trim($_POST['url']) == '') { $missing_fields[] = _AT('url'); } if ($missing_fields) {
<?php /****************************************************************/ /* ATutor */ /****************************************************************/ /* Copyright (c) 2002-2009 */ /* Inclusive Design Institute */ /* http://atutor.ca */ /* */ /* This program is free software. You can redistribute it and/or*/ /* modify it under the terms of the GNU General Public License */ /* as published by the Free Software Foundation. */ /****************************************************************/ // $Id$ define('AT_INCLUDE_PATH', '../../../include/'); require AT_INCLUDE_PATH . 'vitals.inc.php'; admin_authenticate(AT_ADMIN_PRIV_SOCIAL); if ($_POST['save']) { $shindig_url = $addslashes($_POST['shindig_url']); $sql = "REPLACE into " . TABLE_PREFIX . "config (name,value) VALUES('shindig_url','{$shindig_url}')"; if ($result = mysql_query($sql, $db)) { $msg->addFeedback('SOCIAL_SETTINGS_SAVED'); } else { $msg->addError('SOCIAL_SETTINGS_NOT_SAVED'); } header("Location: " . $_SERVER['PHP_SELF']); exit; } require AT_INCLUDE_PATH . 'header.inc.php'; $savant->display('admin/system_preferences/index_admin.tmpl.php'); require AT_INCLUDE_PATH . 'footer.inc.php';
/* Copyright (c) 2002-2010 */ /* Inclusive Design Institute */ /* http://atutor.ca */ /* */ /* This program is free software. You can redistribute it and/or*/ /* modify it under the terms of the GNU General Public License */ /* as published by the Free Software Foundation. */ /****************************************************************/ /* linked from admin/users.php */ /* deletes a user from the system. */ /****************************************************************/ // $Id$ define('AT_INCLUDE_PATH', '../../../include/'); require AT_INCLUDE_PATH . 'vitals.inc.php'; require AT_INCLUDE_PATH . '../mods/_standard/file_storage/file_storage.inc.php'; admin_authenticate(AT_ADMIN_PRIV_USERS); function delete_user($id) { global $db, $msg; //make sure not instructor of a course $sql = "SELECT course_id FROM " . TABLE_PREFIX . "courses WHERE member_id={$id}"; $result = mysql_query($sql, $db); if ($row = mysql_fetch_assoc($result)) { /*$msg->addError('NODELETE_USER'); header('Location: '.AT_BASE_HREF.'users.php'); exit;*/ return; } $sql = "DELETE FROM " . TABLE_PREFIX . "course_enrollment WHERE member_id={$id}"; mysql_query($sql, $db); write_to_log(AT_ADMIN_LOG_DELETE, 'course_enrollment', mysql_affected_rows($db), $sql);
/* http://atutoropenlearn.wordpress.com */ /* */ /* This module allows to search OpenLearn for educational */ /* content. */ /* Author: Herat Gandhi */ /* This program is free software. You can redistribute it and/or*/ /* modify it under the terms of the GNU General Public License */ /* as published by the Free Software Foundation. */ /****************************************************************/ /** * This php file is backend code needed for admin panel. * It is used for changing module settings by admin. */ define('AT_INCLUDE_PATH', '../../include/'); require AT_INCLUDE_PATH . 'vitals.inc.php'; admin_authenticate(AT_ADMIN_PRIV_OL_SEARCH_OPEN_LEARN); //Include message class for providing feedback to the admin. require_once AT_INCLUDE_PATH . '/classes/Message/Message.class.php'; global $savant; $msg = new Message($savant); ?> <?php $url_r = trim($_POST['url']); //get repository URL $cron_v = intval(trim($_POST['cron'])); //get CRON interval //if cron interval is negative or repository URL is blank then return //error and redirect to admin panel. if ($cron_v < 0) { $msg->addError('OL_CRON_NOT_VAL');