2 /************************************************************************/
4 /************************************************************************/
5 /* Copyright (c) 2002-2008 by Greg Gay, Joel Kronenberg & Heidi Hazelton*/
6 /* Adaptive Technology Resource Centre / University of Toronto */
9 /* This program is free software. You can redistribute it and/or */
10 /* modify it under the terms of the GNU General Public License */
11 /* as published by the Free Software Foundation. */
12 /************************************************************************/
15 if (!defined('AT_INCLUDE_PATH')) { exit; }
21 //these are the _AT(x) variable names and their include file
22 /* tabs[tab_id] = array(tab_name, file_name, accesskey) */
23 $tabs[0] = array('atutor_settings', 'atutor_settings.inc.php', 'n');
24 $tabs[1] = array('display_settings', 'display_settings.inc.php', 'p');
26 if(!$_config['just_social']){
27 $tabs[2] = array('content_settings', 'content_settings.inc.php', 'g');
28 $tabs[3] = array('tool_settings', 'tool_settings.inc.php', 'r');
29 $tabs[4] = array('control_settings', 'control_settings.inc.php', 'a');
34 function output_tabs($current_tab, $changes) {
37 $num_tabs = count($tabs);
39 <table class="etabbed-table" border="0" cellpadding="0" cellspacing="0">
42 for ($i=0; $i < $num_tabs; $i++):
43 if ($current_tab == $i):?>
44 <td class="selected" style="white-space: nowrap">
45 <?php if ($changes[$i]): ?>
46 <img src="<?php echo $_base_path; ?>images/changes_bullet.gif" alt="<?php echo _AT('usaved_changes_made'); ?>" height="12" width="15" />
47 <?php echo '<input type="submit" name="button_'.$i.'" value="'._AT($tabs[$i][0]).'" title="'._AT($tabs[$i][0]).' - alt '.$tabs[$i][2].'" class="buttontab" accesskey="'.$tabs[$i][2].'" onmouseover="this.style.cursor=\'pointer\';" '.$clickEvent.' />'; ?>
49 <?php echo _AT($tabs[$i][0]); ?>
51 <td class="tab-spacer"> </td>
53 <td class="tab" style="white-space: nowrap">
54 <?php if ($changes[$i]): ?>
55 <img src="<?php echo $_base_path; ?>images/changes_bullet.gif" alt="<?php echo _AT('usaved_changes_made'); ?>" height="12" width="15" />
58 <?php echo '<input type="submit" name="button_'.$i.'" value="'._AT($tabs[$i][0]).'" title="'._AT($tabs[$i][0]).' - alt '.$tabs[$i][2].'" class="buttontab" accesskey="'.$tabs[$i][2].'" onmouseover="this.style.cursor=\'pointer\';" '.$clickEvent.' />'; ?>
60 <td class="tab-spacer"> </td>
68 // returns given $languges in html <option> tag
69 function output_language_options($languages, $selected_lang)
71 foreach ($languages as $codes)
73 $language = current($codes);
75 $lang_code = $language->getCode();
76 $lang_native_name = $language->getNativeName();
77 $lang_english_name = $language->getEnglishName()
79 <option value="<?php echo $lang_code ?>" <?php if ($selected_lang == $lang_code) echo 'selected="selected"'; ?>><?php echo $lang_english_name . ' - '. $lang_native_name; ?></option>