2 function print_theme_selectbox($theme_list, $selected_theme, $type) {
3 if (!is_array($theme_list) || count($theme_list) == 0) return ;
6 <label for="<?php if ($type == DESKTOP_DEVICE) echo "theme"; else echo "mobile_theme"; ?>"><?php if ($type == DESKTOP_DEVICE) echo _AT('desktop_theme'); else echo _AT('mobile_theme'); ?></label><br />
7 <select name="<?php if ($type == DESKTOP_DEVICE) echo "theme"; else echo "mobile_theme"; ?>" id="<?php if ($type == DESKTOP_DEVICE) echo "theme"; else echo "mobile_theme"; ?>"><?php
8 foreach ($theme_list as $theme) {
13 $theme_fldr = get_folder($theme);
15 if ($theme_fldr == $selected_theme) {
16 echo '<option value="'.$theme_fldr.'" selected="selected">'.$theme.'</option>';
18 echo '<option value="'.$theme_fldr.'">'.$theme.'</option>';
26 <legend><strong><?php echo _AT("atutor_settings"); ?></strong> </legend>
27 <div id="feedback" style="width:90%;">
28 <?php echo _AT('prefs_set_atutor'); ?>
30 <?php if (defined('AT_ENABLE_CATEGORY_THEMES') && AT_ENABLE_CATEGORY_THEMES){
31 echo _AT('themes_disabled');
33 if (isset($_POST['theme']))
34 $selected_theme = $_POST['theme'];
36 $selected_theme = $_SESSION['prefs']['PREF_THEME'];
38 $_themes = get_enabled_themes(DESKTOP_DEVICE);
39 print_theme_selectbox($_themes, $selected_theme, DESKTOP_DEVICE);
41 if (isset($_POST['mobile_theme']))
42 $selected_theme = $_POST['mobile_theme'];
44 $selected_theme = $_SESSION['prefs']['PREF_MOBILE_THEME'];
46 $_themes = get_enabled_themes(MOBILE_DEVICE);
47 print_theme_selectbox($_themes, $selected_theme, MOBILE_DEVICE);
52 <?php echo _AT('time_zone'); ?><br />
56 // Replace this hack to use the PHP timezone functions when the PHP requirement is raised to 5.2
57 global $utc_timezones; // set in include/lib/constants.inc.php
58 $local_offset = (((date(Z)/3600)+$_config['time_zone']));
59 echo '<select name="time_zone">';
60 echo '<option value="0">'._AT('none').'</option>';
61 foreach ($utc_timezones as $zone => $offset){
62 if(($offset[1]) == $_SESSION['prefs']['PREF_TIMEZONE']){
63 echo '<option value="'.($offset[1]).'" selected="selected">'.$offset[0].'</option>';
65 echo '<option value="'.($offset[1]).'">'.$offset[0].'</option>';
71 echo " ".AT_date(_AT('server_date_format'), '', AT_DATE_MYSQL_DATETIME);
76 <?php echo _AT('inbox_notification'); ?><br />
80 if (isset($_POST["mnot"]))
81 $selected_mnot = $_POST["mnot"];
83 $selected_mnot = $this->notify;
85 if ($selected_mnot == 1) {
86 $yes = ' checked="checked"';
88 $no = ' checked="checked"';
91 <input type="radio" name="mnot" id="mnot_yes" value="1" <?php echo $yes; ?> /><label for="mnot_yes"><?php echo _AT('enable'); ?></label>
92 <input type="radio" name="mnot" id="mnot_no" value="0" <?php echo $no; ?> /><label for="mnot_no"><?php echo _AT('disable'); ?></label>
96 <?php echo _AT('show_numbers'); ?><br />
98 if (isset($_POST['numbering']))
99 $selected_numbering = $_POST['numbering'];
101 $selected_numbering = $_SESSION['prefs']['PREF_NUMBERING'];
104 if ($selected_numbering == 1) {
105 $num = ' checked="checked"';
107 $num2 = ' checked="checked"';
109 ?><input type="radio" name ="numbering" id="num_en" value="1" <?php echo $num; ?> /><label for="num_en"><?php echo _AT('enable'); ?></label>
110 <input type="radio" name ="numbering" id="num_dis" value="0" <?php echo $num2; ?> /><label for="num_dis"><?php echo _AT('disable'); ?></label>
114 <?php echo _AT('jump_redirect'); ?><br />
116 if (isset($_POST['use_jump_redirect']))
117 $selected_numbering = $_POST['use_jump_redirect'];
119 $selected_numbering = $_SESSION['prefs']['PREF_JUMP_REDIRECT'];
122 if ($selected_numbering == 1) {
123 $num = ' checked="checked"';
125 $num2 = ' checked="checked"';
127 ?><input type="radio" name ="use_jump_redirect" id="jump_en" value="1" <?php echo $num; ?> /><label for="jump_en"><?php echo _AT('enable'); ?></label>
128 <input type="radio" name ="use_jump_redirect" id="jump_dis" value="0" <?php echo $num2; ?> /><label for="jump_dis"><?php echo _AT('disable'); ?></label>
132 <?php echo _AT('auto_login1'); ?><br /><?php
133 $auto_en = $auto_dis = '';
135 // Check flag $is_auto_login instead of session vars !empty($_SESSION['ATLogin']) is because
136 // the set cookies are only accessible at the next page reload
137 if ( $this->is_auto_login == "enable") {
138 $auto_en = 'checked="checked"';
140 $auto_dis = 'checked="checked"';
142 ?><input type="radio" name ="auto" id="auto_en" value="enable" <?php echo $auto_en; ?> /><label for="auto_en"><?php echo _AT('enable'); ?></label>
143 <input type="radio" name ="auto" id="auto_dis" value="disable" <?php echo $auto_dis; ?> /><label for="auto_dis"><?php echo _AT('disable'); ?></label>
147 <?php echo _AT('form_focus'); ?><br />
149 if (isset($_POST['form_focus']))
150 $selected_form_focus = $_POST['form_focus'];
152 $selected_form_focus = $_SESSION['prefs']['PREF_FORM_FOCUS'];
155 if ($selected_form_focus == 1) {
156 $num = ' checked="checked"';
158 $num2 = ' checked="checked"';
160 ?><input type="radio" name ="form_focus" id="focus_on" value="1" <?php echo $num; ?> /><label for="focus_on"><?php echo _AT('enable'); ?></label>
161 <input type="radio" name ="form_focus" id="focus_off" value="0" <?php echo $num2; ?> /><label for="focus_off"><?php echo _AT('disable'); ?></label>
165 <?php echo _AT('show_guide'); ?><br />
167 if (isset($_POST['show_guide']))
168 $selected_show_guide = $_POST['show_guide'];
169 else if (isset($_SESSION['prefs']['PREF_SHOW_GUIDE']))
170 $selected_show_guide = $_SESSION['prefs']['PREF_SHOW_GUIDE'];
172 $selected_show_guide = 1;
175 if ($selected_show_guide == 1) {
176 $num = ' checked="checked"';
178 $num2 = ' checked="checked"';
180 ?><input type="radio" name ="show_guide" id="show_guide_on" value="1" <?php echo $num; ?> /><label for="show_guide_on"><?php echo _AT('enable'); ?></label>
181 <input type="radio" name ="show_guide" id="show_guide_off" value="0" <?php echo $num2; ?> /><label for="show_guide_off"><?php echo _AT('disable'); ?></label>
186 if (isset($_POST['content_editor']))
187 $selected_content_editor = $_POST['content_editor'];
189 $selected_content_editor = $_SESSION['prefs']['PREF_CONTENT_EDITOR'];
191 $num0 = $num1 = $num2 = '';
192 if ($selected_content_editor == 1) {
193 $num1 = ' checked="checked"';
194 } else if ($_SESSION['prefs']['PREF_CONTENT_EDITOR'] == 2) {
195 $num2 = ' checked="checked"';
197 $num0 = ' checked="checked"';
200 <?php echo _AT('content_editor'); ?><br />
201 <input type="radio" name="content_editor" id="ce_0" value="0" <?php echo $num0; ?>/><label for="ce_0"><?php echo _AT('plain_text');?></label>
202 <input type="radio" name="content_editor" id="ce_1" value="1" <?php echo $num1; ?>/><label for="ce_1"><?php echo _AT('html'); ?></label>
203 <input type="radio" name="content_editor" id="ce_2" value="2" <?php echo $num2; ?>/><label for="ce_2"><?php echo _AT('html') . ' - '. _AT('visual_editor'); ?></label>