AC_4897, AC_4898, AC_4899: Multifile uploader fixes.
[acontent.git] / themes / default / system / index.tmpl.php
1 <?php 
2 /************************************************************************/
3 /* AContent                                                             */
4 /************************************************************************/
5 /* Copyright (c) 2010                                                   */
6 /* Inclusive Design Institute                                           */
7 /*                                                                      */
8 /* This program is free software. You can redistribute it and/or        */
9 /* modify it under the terms of the GNU General Public License          */
10 /* as published by the Free Software Foundation.                        */
11 /************************************************************************/
12
13 /*
14  * Called by "system/index.php"
15  * 
16  * Accept parameters:
17  * 
18  * show_user_group: true/false. Indicates whether show section "User Group"
19  *                  Set to true when admin creates/edits user; set to false at new registration.
20  *                  The new user registered via registration form is automatically set into group "User" 
21  * show_password:  true/false. Indicates whether show section "Password" & "Password Again"
22  *                 Set to true when admin creates new user or new user registration; 
23  *                 Set to false when admin edits existing user.
24  * show_status: true/false. Indicates whether show section "status"
25  *              Set to true when admin creates/edits user; set to false at new registration.
26  * user_row: only need when edit existing user.
27  * all_user_groups: display selections in dropdown list box "User Group"
28  * title: page title
29  * submit_button_text: button text for submit button. "Register" at registration, "Save" at admin creating/editing user
30  */
31
32 global $onload, $_config;
33 $onload = 'document.form.site_name.focus();';
34
35 require(TR_INCLUDE_PATH.'header.inc.php'); 
36 ?>
37
38 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" name="form">
39
40 <div class="input-form">
41 <fieldset class="group_form"><legend class="group_form"><?php echo  _AT("system_settings"); ?></legend>
42
43         <table class="form-data" align="center">
44                 <tr>
45                         <td colspan="2" align="left"><br/><?php echo _AT('required_field_text') ;?></td>
46                 </tr>
47
48                 <tr>
49                         <td align="left"><span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="site_name"><?php echo _AT('site_name'); ?></label>:</td>
50                         <td align="left"><input id="site_name" name="site_name" type="text" maxlength="20" size="30" value="<?php if (isset($_POST['site_name'])) echo stripslashes(htmlspecialchars($_POST['site_name'])); else echo stripslashes(htmlspecialchars($this->config['site_name'])); ?>" /></td>
51                 </tr>
52
53                 <tr>
54                         <td align="left"><span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="contact_email"><?php echo _AT('contact_email'); ?></label>:</td>
55                         <td align="left"><input id="contact_email" name="contact_email" type="text" size="50" maxlength="50" value="<?php if (isset($_POST['contact_email'])) echo stripslashes(htmlspecialchars($_POST['contact_email'])); else echo stripslashes(htmlspecialchars($this->config['contact_email'])); ?>" /></td>
56                 </tr>
57
58                 <tr>
59                         <td align="left"><label for="theme"><?php echo _AT('theme'); ?></label>:</td>
60                         <td align="left">
61                                 <select name="theme" id="theme"><?php
62                                         if (isset($_POST['theme']))
63                                                 $selected_theme = $_POST['theme'];
64                                         else
65                                                 $selected_theme = $_SESSION['prefs']['PREF_THEME'];
66                                                 
67                                         foreach ($this->enabled_themes as $theme) {
68                                                 if (!$theme) {
69                                                         continue;
70                                                 }
71
72                                                 if ($theme_fldr == $selected_theme) {
73                                                         echo '<option value="'.$theme['dir_name'].'" selected="selected">'.$theme['title'].'</option>';
74                                                 } else {
75                                                         echo '<option value="'.$theme['dir_name'].'">'.$theme['title'].'</option>';
76                                                 }
77                                         }
78                                 ?>
79                                 </select>
80                         </td>
81                 </tr>
82
83                 <tr>
84                         <td align="left"><label for="default_language"><?php echo _AT('default_language'); ?></label>:</td>
85                         <td align="left">
86                 <?php if (!empty($_POST['default_language'])) { 
87                                 $select_lang = $_POST['default_language']; 
88                         } else { 
89                                 $select_lang = $_config['default_language'];
90                         }
91                         $this->languageManager->printDropdown($select_lang, 'default_language', 'default_language'); ?>
92                         </td>
93                 </tr>
94
95                 <tr>
96                         <td align="left"><?php echo _AT('use_captcha'); ?>:</td>
97                         <td align="left">
98                                 <input type="radio" name="use_captcha" id="statusD" value="<?php echo TR_STATUS_DISABLED; ?>" <?php if ((isset($_POST['use_captcha']) && $_POST['use_captcha']==TR_STATUS_DISABLED) || (!isset($_POST['use_captcha']) && $this->config['use_captcha']==TR_STATUS_DISABLED)) echo 'checked="checked"'; ?> /><label for="statusD"><?php echo _AT('disabled'); ?></label> 
99                                 <input type="radio" name="use_captcha" id="statusE" value="<?php echo TR_STATUS_ENABLED; ?>" <?php if ((isset($_POST['use_captcha']) && $_POST['use_captcha']==TR_STATUS_ENABLED) || (!isset($_POST['use_captcha']) && $this->config['use_captcha']==TR_STATUS_ENABLED)) echo 'checked="checked"'; ?> /><label for="statusE"><?php echo _AT('enabled'); ?></label>
100                         </td>
101                 </tr>
102                 
103                 <tr>
104                         <td align="left" colspan="2">
105                                 <small>&middot; <?php echo _AT('default_use_captcha'); ?></small>
106                         </td>
107                 </tr>
108                 
109                 <tr>
110                         <td align="left"><label for="max_file_size"><?php echo _AT('max_file_size'); ?></label>:</td>
111                         <td align="left"><input id="max_file_size" name="max_file_size" type="text" value="<?php if (isset($_POST['max_file_size'])) echo stripslashes(htmlspecialchars($_POST['max_file_size'])); else echo stripslashes(htmlspecialchars($this->config['max_file_size'])); ?>" /></td>
112                 </tr>
113
114                 <tr>
115                         <td align="left" colspan="2">
116                                 <small>&middot; <?php echo _AT('default_max_file_size'); ?></small>
117                         </td>
118                 </tr>
119                 
120                 <tr>
121                         <td align="left"><label for="illegal_extentions"><?php echo _AT('illegal_extentions'); ?></label>:</td>
122                         <td align="left"><textarea name="illegal_extentions" cols="50" id="illegal_extentions" rows="2" class="formfield" ><?php if ($this->config['illegal_extentions']) { echo str_replace('|',' ',$this->config['illegal_extentions']); }?></textarea></td>
123                 </tr>
124
125                 <tr>
126                         <td align="left"><label for="latex_server"><?php echo _AT('latex_server'); ?></label>:</td>
127                         <td align="left"><input id="latex_server" name="latex_server" size="50" type="text" value="<?php if (isset($_POST['latex_server'])) echo stripslashes(htmlspecialchars($_POST['latex_server'])); else echo stripslashes(htmlspecialchars($this->config['latex_server'])); ?>" /></td>
128                 </tr>
129
130                 <tr>
131                         <td align="left" colspan="2">
132                                 <small>&middot; <?php echo _AT('latex_server_info'); ?></small>
133                         </td>
134                 </tr>
135                 
136                 <tr>
137                         <td colspan="2">
138                         <p class="submit_button">
139                                 <input type="submit" name="submit" value="<?php echo _AT('submit'); ?>" class="submit" /> 
140                                 <input type="submit" name="cancel" value=" <?php echo _AT('cancel'); ?> "  class="submit" />
141                                 <input type="submit" name="factory_default" value=" <?php echo _AT('factory_default'); ?> "  class="submit" />
142                         </p>
143                         </td>
144                 </tr>
145         </table>
146 </fieldset>
147
148 </div>
149 </form>
150
151 <?php require(TR_INCLUDE_PATH.'footer.inc.php'); ?>