define('AT_INCLUDE_PATH', '../include/');
require(AT_INCLUDE_PATH.'vitals.inc.php');
-admin_authenticate(AT_ADMIN_PRIV_ADMIN);
+admin_authenticate();
if (defined('AT_DEVEL_TRANSLATE') && AT_DEVEL_TRANSLATE) {
$msg->addWarning('TRANSLATE_ON');
$msg->printFeedbacks('ATUTOR_UPDATE_AVAILABLE');
}
}
-if ($_config['allow_instructor_requests']): ?>
-<?php
- $sql = "SELECT COUNT(*) AS cnt FROM ".TABLE_PREFIX."instructor_approvals";
- $result = mysql_query($sql, $db);
- $row = mysql_fetch_assoc($result);
?>
- <form method="get" action="admin/instructor_requests.php">
- <div class="input-form">
+
+<div style="width: 40%; float: right; padding-top: 4px; padding-left: 10px;">
+
+ <?php if ($_config['allow_instructor_requests'] && admin_authenticate(AT_ADMIN_PRIV_USERS, AT_PRIV_RETURN)): ?>
+ <?php
+ $sql = "SELECT COUNT(*) AS cnt FROM ".TABLE_PREFIX."instructor_approvals";
+ $result = mysql_query($sql, $db);
+ $row = mysql_fetch_assoc($result);
+ ?>
+
+ <div class="input-form" style="width: 98%;">
+ <form method="get" action="admin/instructor_requests.php">
<div class="row">
<h3><?php echo _AT('instructor_requests'); ?></h3>
<p><?php echo _AT('instructor_requests_text', $row['cnt']); ?></strong></p>
<div class="row buttons">
<input type="submit" name="submit" value="<?php echo _AT('view'); ?>" />
</div>
- </div>
- </form>
-<?php endif; ?>
-
-<form method="get" action="http://atutor.ca/check_atutor_version.php" target="_blank">
- <input type="hidden" name="v" value="<?php echo urlencode(VERSION); ?>" />
- <div class="input-form">
- <div class="row">
- <h3><?php echo _AT('atutor_version'); ?></h3>
- <p><?php echo _AT('atutor_version_text', VERSION); ?></strong></p>
- </div>
-
- <div class="row buttons">
- <input type="submit" name="submit" value="<?php echo _AT('submit'); ?>" />
- </div>
+ </form>
</div>
-</form>
-
-<form method="get" action="<?php echo $_base_href; ?>admin/fix_content.php">
- <div class="input-form">
- <div class="row">
- <h3><?php echo _AT('fix_content_ordering'); ?></h3>
- <p><?php echo _AT('fix_content_ordering_text'); ?></p>
- </div>
-
- <div class="row buttons">
- <input type="submit" name="submit" value="<?php echo _AT('submit'); ?>" />
- </div>
+
+ <?php endif; ?>
+
+ <div class="input-form" style="width: 98%;">
+ <form method="get" action="http://atutor.ca/check_atutor_version.php" target="_blank">
+ <input type="hidden" name="v" value="<?php echo urlencode(VERSION); ?>" />
+ <div class="row">
+ <h3><?php echo _AT('atutor_version'); ?></h3>
+ <p><?php echo _AT('atutor_version_text', VERSION); ?></strong></p>
+ </div>
+
+ <div class="row buttons">
+ <input type="submit" name="submit" value="<?php echo _AT('submit'); ?>" />
+ </div>
+ </form>
</div>
-</form>
+ <?php if (admin_authenticate(AT_ADMIN_PRIV_ADMIN, AT_PRIV_RETURN)): ?>
+ <div class="input-form" style="width: 98%;">
+ <form method="get" action="<?php echo $_base_href; ?>admin/fix_content.php">
+ <div class="row">
+ <h3><?php echo _AT('fix_content_ordering'); ?></h3>
+ <p><?php echo _AT('fix_content_ordering_text'); ?></p>
+ </div>
+
+ <div class="row buttons">
+ <input type="submit" name="submit" value="<?php echo _AT('submit'); ?>" />
+ </div>
+ </form>
+ </div>
+ <?php endif; ?>
+</div>
+
+<div style="width: 60%;">
+ <?php
+ $path_length = strlen($_base_path);
+
+ echo '<ol id="tools" style="margin-right: 0px;">';
+ foreach ($_top_level_pages as $page_info) {
+ echo '<li class="top-tool"><a href="' . $page_info['url'] . '">' . $page_info['title'] . '</a>';
+
+ $page_info['url'] = substr($page_info['url'], $path_length);
+
+ if ($_pages[$page_info['url']]['children']) {
+ echo '<ul class="child-top-tool">';
+ foreach ($_pages[$page_info['url']]['children'] as $child) {
+ echo '<li class="child-tool"><a href="'.$child.'">'._AT($_pages[$child]['title_var']).'</li>';
+ }
+ echo '</ul>';
+ }
+ echo '</li>';
+ }
+ echo '</ol>';
+?>
+</div>
<?php require(AT_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
} else if ($_SESSION['course_id'] == -1) {
/* admin pages */
- $_pages['admin/index.php']['title_var'] = 'configuration';
- $_pages['admin/index.php']['parent'] = AT_NAV_ADMIN;
- $_pages['admin/index.php']['guide'] = 'admin/?p=2.0.configuration.php';
- if (isset($_pages['admin/index.php']['children'])) {
- array_unshift($_pages['admin/index.php']['children'], 'admin/admins/my_edit.php', 'admin/config_edit.php', 'admin/error_logging.php');
- } else {
- $_pages['admin/index.php']['children'] = array('admin/admins/my_edit.php', 'admin/config_edit.php', 'admin/error_logging.php');
- }
+ $_pages['admin/index.php']['title_var'] = 'home';
+ $_pages['admin/index.php']['parent'] = AT_NAV_ADMIN;
+ $_pages['admin/index.php']['guide'] = 'admin/?p=2.0.configuration.php';
+ $_pages['admin/index.php']['children'] = array('admin/admins/my_edit.php');
+
+ $_pages['admin/admins/my_edit.php']['title_var'] = 'my_account';
+ $_pages['admin/admins/my_edit.php']['parent'] = 'admin/index.php';
+ $_pages['admin/admins/my_edit.php']['guide'] = 'admin/?p=2.1.my_account.php';
- $_pages['admin/admins/my_edit.php']['title_var'] = 'my_account';
- $_pages['admin/admins/my_edit.php']['parent'] = 'admin/index.php';
- $_pages['admin/admins/my_edit.php']['guide'] = 'admin/?p=2.1.my_account.php';
+ if (admin_authenticate(AT_ADMIN_PRIV_USERS, AT_PRIV_RETURN)) {
+ $_pages[AT_NAV_ADMIN][] = 'admin/config_edit.php';
$_pages['admin/config_edit.php']['title_var'] = 'system_preferences';
- $_pages['admin/config_edit.php']['parent'] = 'admin/index.php';
+ $_pages['admin/config_edit.php']['parent'] = AT_NAV_ADMIN;
$_pages['admin/config_edit.php']['guide'] = 'admin/?p=2.2.system_preferences.php';
-
+ }
$_pages['admin/fix_content.php']['title_var'] = 'fix_content_ordering';
$_pages['admin/fix_content.php']['parent'] = 'admin/index.php';
$_pages['admin/error_logging.php']['title_var'] = 'error_logging';
- $_pages['admin/error_logging.php']['parent'] = 'admin/index.php';
+ $_pages['admin/error_logging.php']['parent'] = 'admin/config_edit.php';
$_pages['admin/error_logging.php']['guide'] = 'admin/?p=2.5.error_logging.php';
$_pages['admin/error_logging.php']['children'] = array('admin/error_logging_bundle.php', 'admin/error_logging_reset.php');
$_pages['profile.php']['parent'] = 'index.php';
-/*
-if (($_SESSION['course_id'] > 0) && isset($_modules)) {
- foreach ($_modules as $module) {
- if (in_array($module, $_pages[AT_NAV_COURSE])) {
- $_pages[$module]['parent'] = AT_NAV_COURSE;
- } else {
- $_pages[$module]['parent'] = 'index.php';
- }
- }
-}
-*/
-
/* global pages */
$_pages['about.php']['title_var'] = 'about_atutor';
$msg->addFeedback('LOGIN_SUCCESS');
- if ($_SESSION['privileges'] == 1) {
- header('Location: admin/index.php');
- } else {
- header('Location: admin/admins/my_edit.php');
- }
+ header('Location: admin/index.php');
exit;
} else {
\r
if (admin_authenticate(AT_ADMIN_PRIV_LANGUAGES, TRUE) || admin_authenticate(AT_ADMIN_PRIV_ADMIN, TRUE)) {\r
if (admin_authenticate(AT_ADMIN_PRIV_ADMIN, TRUE)) {\r
- $this->_pages['admin/index.php']['children'] = array('admin/language.php');\r
- $this->_pages['admin/language.php']['parent'] = 'admin/index.php';\r
+ $this->_pages['admin/config_edit.php']['children'] = array('admin/language.php');\r
+ $this->_pages['admin/language.php']['parent'] = 'admin/config_edit.php';\r
} else {\r
$this->_pages[AT_NAV_ADMIN] = array('admin/language.php');\r
$this->_pages['admin/language.php']['parent'] = AT_NAV_ADMIN;\r
\r
if (admin_authenticate(AT_ADMIN_PRIV_THEMES, TRUE) || admin_authenticate(AT_ADMIN_PRIV_ADMIN, TRUE)) {\r
if (admin_authenticate(AT_ADMIN_PRIV_ADMIN, TRUE)) {\r
- $this->_pages['admin/index.php']['children'] = array('admin/themes/index.php');\r
- $this->_pages['admin/themes/index.php']['parent'] = 'admin/index.php';\r
+ $this->_pages['admin/config_edit.php']['children'] = array('admin/themes/index.php');\r
+ $this->_pages['admin/themes/index.php']['parent'] = 'admin/config_edit.php';\r
} else {\r
$this->_pages[AT_NAV_ADMIN] = array('admin/themes/index.php');\r
$this->_pages['admin/themes/index.php']['parent'] = AT_NAV_ADMIN;\r
$this->_pages['admin/users.php']['title_var'] = 'users';\r
$this->_pages['admin/users.php']['parent'] = AT_NAV_ADMIN;\r
$this->_pages['admin/users.php']['guide'] = 'admin/?p=3.0.users.php';\r
- $this->_pages['admin/users.php']['children'] = array('admin/create_user.php', 'admin/default_preferences.php', 'admin/instructor_requests.php', 'admin/master_list.php', 'admin/admin_email.php', 'admin/admins/index.php');\r
+ $this->_pages['admin/users.php']['children'] = array('admin/create_user.php', 'admin/default_preferences.php', 'admin/instructor_requests.php', 'admin/master_list.php', 'admin/admin_email.php');\r
+\r
+ if (admin_authenticate(AT_ADMIN_PRIV_ADMIN, TRUE)) {\r
+ $this->_pages['admin/users.php']['children'][] = 'admin/admins/index.php';\r
+\r
+ $this->_pages['admin/admins/index.php']['title_var'] = 'administrators';\r
+ $this->_pages['admin/admins/index.php']['parent'] = 'admin/users.php';\r
+ $this->_pages['admin/admins/index.php']['guide'] = 'admin/?p=3.4.administrators.php';\r
+ $this->_pages['admin/admins/index.php']['children'] = array('admin/admins/create.php', 'admin/admins/log.php');\r
+\r
+ $this->_pages['admin/admins/log.php']['title_var'] = 'admin_log';\r
+ $this->_pages['admin/admins/log.php']['parent'] = 'admin/admins/index.php';\r
+ $this->_pages['admin/admins/log.php']['children'] = array('admin/admins/reset_log.php');\r
+\r
+ $this->_pages['admin/admins/reset_log.php']['title_var'] = 'reset_log';\r
+ $this->_pages['admin/admins/reset_log.php']['parent'] = 'admin/admins/log.php';\r
+\r
+ $this->_pages['admin/admins/detail_log.php']['title_var'] = 'details';\r
+ $this->_pages['admin/admins/detail_log.php']['parent'] = 'admin/admins/log.php';\r
+\r
+ $this->_pages['admin/admins/create.php']['title_var'] = 'create_admin';\r
+ $this->_pages['admin/admins/create.php']['parent'] = 'admin/admins/index.php';\r
+\r
+ $this->_pages['admin/admins/edit.php']['title_var'] = 'edit_admin';\r
+ $this->_pages['admin/admins/edit.php']['parent'] = 'admin/admins/index.php';\r
+\r
+ $this->_pages['admin/admins/delete.php']['title_var'] = 'delete_admin';\r
+ $this->_pages['admin/admins/delete.php']['parent'] = 'admin/admins/index.php';\r
+ }\r
\r
$this->_pages['admin/admin_email.php']['title_var'] = 'admin_email';\r
$this->_pages['admin/admin_email.php']['parent'] = 'admin/users.php';\r
$this->_pages['admin/password_user.php']['title_var'] = 'password';\r
$this->_pages['admin/password_user.php']['parent'] = 'admin/users.php';\r
\r
-\r
$this->_pages['admin/instructor_requests.php']['title_var'] = 'instructor_requests';\r
$this->_pages['admin/instructor_requests.php']['parent'] = 'admin/users.php';\r
$this->_pages['admin/instructor_requests.php']['guide'] = 'admin/?p=3.1.instructor_requests.php';\r
$this->_pages['admin/edit_user.php']['title_var'] = 'edit_user';\r
$this->_pages['admin/edit_user.php']['parent'] = 'admin/users.php';\r
\r
- $this->_pages['admin/admin_delete.php']['title_var'] = 'delete_user';\r
- $this->_pages['admin/admin_delete.php']['parent'] = 'admin/users.php';\r
-\r
- $this->_pages['admin/admins/index.php']['title_var'] = 'administrators';\r
- $this->_pages['admin/admins/index.php']['parent'] = 'admin/users.php';\r
- $this->_pages['admin/admins/index.php']['guide'] = 'admin/?p=3.4.administrators.php';\r
- $this->_pages['admin/admins/index.php']['children'] = array('admin/admins/create.php', 'admin/admins/log.php');\r
-\r
- $this->_pages['admin/admins/log.php']['title_var'] = 'admin_log';\r
- $this->_pages['admin/admins/log.php']['parent'] = 'admin/admins/index.php';\r
- $this->_pages['admin/admins/log.php']['children'] = array('admin/admins/reset_log.php');\r
-\r
- $this->_pages['admin/admins/reset_log.php']['title_var'] = 'reset_log';\r
- $this->_pages['admin/admins/reset_log.php']['parent'] = 'admin/admins/log.php';\r
-\r
- $this->_pages['admin/admins/detail_log.php']['title_var'] = 'details';\r
- $this->_pages['admin/admins/detail_log.php']['parent'] = 'admin/admins/log.php';\r
-\r
- $this->_pages['admin/admins/create.php']['title_var'] = 'create_admin';\r
- $this->_pages['admin/admins/create.php']['parent'] = 'admin/admins/index.php';\r
-\r
- $this->_pages['admin/admins/edit.php']['title_var'] = 'edit_admin';\r
- $this->_pages['admin/admins/edit.php']['parent'] = 'admin/admins/index.php';\r
-\r
- $this->_pages['admin/admins/delete.php']['title_var'] = 'delete_admin';\r
- $this->_pages['admin/admins/delete.php']['parent'] = 'admin/admins/index.php';\r
+ $this->_pages['admin/admin_delete.php']['title_var'] = 'delete_user';\r
+ $this->_pages['admin/admin_delete.php']['parent'] = 'admin/users.php';\r
\r
}\r
?>
\ No newline at end of file
if (!defined('AT_INCLUDE_PATH')) { exit; }\r
if (!isset($this) || (isset($this) && (strtolower(get_class($this)) != 'module'))) { exit(__FILE__ . ' is not a Module'); }\r
\r
-$this->_pages['admin/index.php']['children'] = array('google_search/admin/module_prefs.php');\r
+$_student_tool = 'google_search/index.php';\r
+\r
+if (admin_authenticate(AT_ADMIN_PRIV_ADMIN, TRUE)) {\r
+ $this->_pages['admin/config_edit.php']['children'] = array('google_search/admin/module_prefs.php');\r
\r
$this->_pages['google_search/admin/module_prefs.php']['title_var'] = 'google_key';\r
- $this->_pages['google_search/admin/module_prefs.php']['parent'] = 'admin/index.php';\r
+ $this->_pages['google_search/admin/module_prefs.php']['parent'] = 'admin/config_edit.php';\r
+}\r
\r
-$_student_tool = 'google_search/index.php';\r
\r
//side menu\r
$this->_stacks['google_search'] = array('title_var'=>'google_search', 'file'=>dirname(__FILE__).'/side_menu.inc.php');\r
if (admin_authenticate(AT_ADMIN_PRIV_RSS, TRUE) || admin_authenticate(AT_ADMIN_PRIV_ADMIN, TRUE)) {\r
\r
if (admin_authenticate(AT_ADMIN_PRIV_ADMIN, TRUE)) {\r
- $this->_pages['admin/index.php']['children'] = array('admin/rss_feeds/index.php');\r
- $this->_pages['admin/rss_feeds/index.php']['parent'] = 'admin/index.php';\r
+ $this->_pages['admin/config_edit.php']['children'] = array('admin/rss_feeds/index.php');\r
+ $this->_pages['admin/rss_feeds/index.php']['parent'] = 'admin/config_edit.php';\r
} else {\r
$this->_pages[AT_NAV_ADMIN] = array('admin/rss_feeds/index.php');\r
$this->_pages['admin/rss_feeds/index.php']['parent'] = AT_NAV_ADMIN;\r