remove old readme
[atutor.git] / docs / themes / mobile / registration.tmpl.php
1 <?php 
2 require(AT_INCLUDE_PATH.'header.inc.php'); 
3 ?>
4
5 <script language="JavaScript" src="sha-1factory.js" type="text/javascript"></script>
6
7 <script type="text/javascript">
8 function encrypt_password()
9 {
10         document.form.password_error.value = "";
11
12         err = verify_password(document.form.form_password1.value, document.form.form_password2.value);
13         
14         if (err.length > 0)
15         {
16                 document.form.password_error.value = err;
17         }
18         else
19         {
20                 document.form.form_password_hidden.value = hex_sha1(document.form.form_password1.value);
21                 document.form.form_password1.value = "";
22                 document.form.form_password2.value = "";
23         }
24 }
25 </script>
26
27 <form method="post" action="<?php if (isset($_REQUEST["en_id"]) && $_REQUEST["en_id"] <> "") $getvars = '?en_id='. $_REQUEST["en_id"]; echo $_SERVER['PHP_SELF'] . $getvars; ?>" name="form">
28 <?php global $languageManager, $_config, $moduleFactory; ?>
29 <input name="ml" type="hidden" value="<?php echo $this->ml; ?>" />
30 <input name="password_error" type="hidden" />
31 <input type="hidden" name="form_password_hidden" value="" />
32 <input type="hidden" name="registration_token" value="<?php echo sha1($_SESSION['token']); ?>" />
33
34 <div class="input-form">
35 <fieldset class="group_form"><legend class="group_form"><?php echo _AT('required_information'); ?></legend>
36
37 <p><span class="required">*</span><?php echo _AT('required_field'); ?></p>
38         <?php if (!$_POST['member_id'] && defined('AT_MASTER_LIST') && AT_MASTER_LIST && !admin_authenticate(AT_ADMIN_PRIV_USERS, TRUE)): ?>
39                 <div class="row">
40                         <h3><?php echo _AT('account_authorization'); ?></h3>
41                 </div>
42
43                 <div class="row">
44                         <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="student_id"><?php echo _AT('student_id'); ?></label><br />
45                         <input id="student_id" name="student_id" type="text" size="15" maxlength="15" value="<?php echo stripslashes(htmlspecialchars($_POST['student_id'])); ?>" /><br />
46                 </div>
47
48                 <div class="row">
49                         <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="student_pin"><?php echo _AT('student_pin'); ?></label><br />
50                         <input id="student_pin" name="student_pin" type="password" size="15" maxlength="15" value="<?php echo stripslashes(htmlspecialchars($_POST['student_pin'])); ?>" /><br />
51                 </div>
52         <?php endif; ?>
53
54         <?php 
55                 $table_title="
56                 <div class=\"row\">
57                         <h3>" . _AT('course_to_auto_enroll'). "</h3>
58                         <small>&middot; " ._AT('auto_enroll_msg')."</small>
59                 </div>";
60                 
61                 require(AT_INCLUDE_PATH.'html/auto_enroll_list_courses.inc.php'); 
62         ?>
63         
64
65         <div class="row">
66                 <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="login"><?php echo _AT('login_name'); ?></label><br />
67                 <?php if ($_POST['member_id']) : ?>
68                                 <span id="login"><?php echo stripslashes(htmlspecialchars($_POST['login'])); ?></span>
69                                 <input name="member_id" type="hidden" value="<?php echo intval($_POST['member_id']); ?>" />
70                                 <input name="login" type="hidden" value="<?php echo stripslashes(htmlspecialchars($_POST['login'])); ?>" />
71                 <?php else: ?>
72                         <input id="login" name="login" type="text" maxlength="20" size="30" value="<?php echo stripslashes(htmlspecialchars($_POST['login'])); ?>" title="<?php echo _AT('login_name').':'._AT('contain_only'); ?>"/><br />
73                         <small>&middot; <?php echo _AT('contain_only'); ?><br />
74                                    &middot; <?php echo _AT('20_max_chars'); ?></small>
75                 <?php endif; ?>
76         </div>
77
78         <?php if (!admin_authenticate(AT_ADMIN_PRIV_USERS, TRUE) || !$_POST['member_id']): ?>
79                 <div class="row">
80                         <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="form_password1"><?php echo _AT('password'); ?></label><br />
81                         <input id="form_password1" name="form_password1" type="password" size="15" maxlength="15" title="<?php echo _AT('password').':'._AT('combination'); ?>"/><br />
82                         <small>&middot; <?php echo _AT('combination'); ?><br />
83                                    &middot; <?php echo _AT('15_max_chars'); ?></small>
84                 </div>
85
86                 <div class="row">
87                         <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="form_password2"><?php echo _AT('password_again'); ?></label><br />
88                         <input id="form_password2" name="form_password2" type="password" size="15" maxlength="15" />
89                 </div>
90         <?php endif; ?>
91
92         <?php if (isset($_config['use_captcha']) && $_config['use_captcha']==1 && !$this->no_captcha): ?>
93         <div class="row">
94                 <span class="required" title="<?php echo _AT('required_field'); ?>">*</span>
95                 <label for="secret"><img src="<?php echo AT_INCLUDE_PATH; ?>securimage/securimage_show.php?sid=<?php echo md5(uniqid(time())); ?>" id="simage" align="left" /></label>
96                 <a href="<?php echo AT_INCLUDE_PATH; ?>securimage/securimage_play.php" title="<?php echo _AT('audible_captcha'); ?>"><img src="<?php echo AT_INCLUDE_PATH; ?>securimage/images/audio_icon.gif" alt="<?php echo _AT('audible_captcha'); ?>" onclick="this.blur()" align="top" border="0"></a><br>
97                 <a href="#" title="<?php echo _AT('refresh_image'); ?>" onclick="document.getElementById('simage').src = '<?php echo AT_INCLUDE_PATH; ?>securimage/securimage_show.php?sid=' + Math.random(); return false"><img src="<?php echo AT_INCLUDE_PATH; ?>securimage/images/refresh.gif" alt="<?php echo _AT('refresh_image'); ?>" onclick="this.blur()" align="bottom" border="0"></a>
98
99                 <br /><br />
100                 <label for="secret"><?php echo _AT('image_validation_text'); ?></label>
101                 <input id="secret" name="secret" type="text" size="6" maxlength="6" value="" />
102                 <br />
103                 <small><?php echo _AT('image_validation_text2'); ?><br /></small>
104         </div>
105         <?php endif; ?>
106
107         <div class="row">
108                 <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="email"><?php echo _AT('email_address'); ?></label><br />
109                 <input id="email" name="email" type="text" size="30" maxlength="50" value="<?php echo stripslashes(htmlspecialchars($_POST['email'])); ?>" />
110                 <input type="checkbox" id="priv" name="private_email" value="1" <?php if ($_POST['private_email'] || !isset($_POST['submit'])) { echo 'checked="checked"'; } ?> /><label for="priv"><?php echo _AT('keep_email_private');?></label>
111         </div>
112
113         <div class="row">
114                 <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="email2"><?php echo _AT('email_again'); ?></label><br />
115                 <input id="email2" name="email2" type="text" size="30" maxlength="60" value="<?php echo stripslashes(htmlspecialchars($_POST['email2'])); ?>" />
116         </div>
117
118         <div class="row">
119                 <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="first_name"><?php echo _AT('first_name'); ?></label><br />
120                 <input id="first_name" name="first_name" type="text" value="<?php echo stripslashes(htmlspecialchars($_POST['first_name'])); ?>" />
121         </div>
122
123         <div class="row">
124                 <label for="second_name"><?php echo _AT('second_name'); ?></label><br />
125                 <input id="second_name" name="second_name" type="text" value="<?php echo stripslashes(htmlspecialchars($_POST['second_name'])); ?>" />
126         </div>
127
128         <div class="row">
129                 <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="last_name"><?php echo _AT('last_name'); ?></label><br />
130                 <input id="last_name" name="last_name" type="text" value="<?php echo stripslashes(htmlspecialchars($_POST['last_name'])); ?>" />
131         </div>
132         
133         <?php if (admin_authenticate(AT_ADMIN_PRIV_USERS, TRUE)): 
134                         if ($_POST['status'] == AT_STATUS_INSTRUCTOR) {
135                                 $inst = ' checked="checked"';
136                         } else if ($_POST['status'] == AT_STATUS_STUDENT) {
137                                 $stud = ' checked="checked"';
138                         }  else if ($_POST['status'] == AT_STATUS_DISABLED) {
139                                 $disa = ' checked="checked"';
140                         } else {
141                                 $uncon = ' checked="checked"';
142                         }?>
143                         <input type="hidden" name="id" value="<?php echo $_POST['member_id']; ?>" />
144                         <div class="row">
145                                 <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><?php echo _AT('account_status'); ?><br />
146
147                                 <input type="radio" name="status" value="0" id="disa" <?php echo $disa; ?> /><label for="disa"><?php echo _AT('disabled'); ?></label>
148                                 <?php if (defined('AT_EMAIL_CONFIRMATION') && AT_EMAIL_CONFIRMATION): ?>
149                                         <input type="radio" name="status" value="1" id="uncon" <?php echo $uncon; ?> /><label for="uncon"><?php echo _AT('unconfirmed'); ?></label>
150                                 <?php endif; ?>
151
152                                 <input type="radio" name="status" value="2" id="stud" <?php echo $stud; ?> /><label for="stud"><?php echo _AT('student'); ?></label>
153
154                                 <input type="radio" name="status" value="3" id="inst" <?php echo $inst; ?> /><label for="inst"><?php echo _AT('instructor'); ?></label>
155
156                                 <input type="hidden" name="old_status" value="<?php echo $_POST['old_status']; ?>" />
157                         </div>
158         <?php endif; ?>
159 </fieldset>
160 <fieldset class="group_form"><legend class="group_form"><?php echo _AT('personal_information').' ('._AT('optional').')'; ?></legend>
161         <?php 
162         $mod = $moduleFactory->getModule('_standard/profile_pictures');
163         if (admin_authenticate(AT_ADMIN_PRIV_USERS, TRUE) && $_POST['member_id'] && $mod->isEnabled() === TRUE): ?>
164                 <div class="row">
165                         <?php echo _AT('picture'); ?><br/>
166                         <?php if (profile_image_exists($_POST['member_id'])): ?>
167                                 <a href="get_profile_img.php?id=<?php echo $_POST['member_id'].SEP.'size=o'; ?>"><?php print_profile_img($_POST['member_id']); ?></a>
168                                 <input type="checkbox" name="profile_pic_delete" value="1" id="profile_pic_delete" /><label for="profile_pic_delete"><?php echo _AT('delete'); ?></label>
169                         <?php else: ?>
170                                 <?php echo _AT('none'); ?> <a href="mods/_standard/profile_pictures/admin/profile_picture.php?member_id=<?php echo $_POST['member_id']; ?>"><?php echo _AT('add'); ?></a>
171                         <?php endif; ?>
172                 </div>
173         <?php endif; ?>
174
175         <?php if (admin_authenticate(AT_ADMIN_PRIV_USERS, TRUE) && defined('AT_MASTER_LIST') && AT_MASTER_LIST): ?>
176                 <input type="hidden" name="old_student_id" value="<?php echo $_POST['old_student_id']; ?>" />
177                 <div class="row">
178                         <label for="student_id" value="student id"><?php echo _AT('student_id'); ?></label><br />
179                                 <input type="text" id="student_id" name="student_id" value="<?php echo $_POST['student_id']; ?>" size="20" /><br />
180                 </div>
181                 <div class="row">
182                         <input type="checkbox" id="overwrite" name="overwrite" value="1" <?php if ($_POST['overwrite']) { echo 'checked="checked"'; } ?> /><label for="overwrite"><?php echo _AT('overwrite_master');?></label>
183                 </div>
184
185         <?php endif; ?>
186
187         <div class="row">
188                 <?php echo _AT('date_of_birth'); ?><br />
189                 <label for="year"><?php echo _AT('year'); ?>: </label><input id="year" class="formfield" name="year" type="text" size="4" maxlength="4" value="<?php echo $_POST['year']; ?>" />  <label for="month"><?php echo _AT('month'); ?>: </label><input id="month" class="formfield" name="month" type="text" size="2" maxlength="2" value="<?php echo $_POST['month']; ?>" /> <label for="day"><?php echo _AT('day'); ?>: </label><input id="day" class="formfield" name="day" type="text" size="2" maxlength="2" value="<?php echo $_POST['day']; ?>" />
190         </div>
191
192         <div class="row">
193                 <?php echo _AT('gender'); ?><br />
194                 <input type="radio" name="gender" id="m" value="m" <?php if ($_POST['gender'] == 'm') { echo 'checked="checked"'; } ?> /><label for="m"><?php echo _AT('male'); ?></label> <input type="radio" value="f" name="gender" id="f" <?php if ($_POST['gender'] == 'f') { echo 'checked="checked"'; } ?> /><label for="f"><?php echo _AT('female'); ?></label>  <input type="radio" value="n" name="gender" id="ns" <?php if (($_POST['gender'] == 'n') || ($_POST['gender'] == '')) { echo 'checked="checked"'; } ?> /><label for="ns"><?php echo _AT('not_specified'); ?></label>
195         </div>
196
197         <div class="row">
198                 <label for="address"><?php echo _AT('street_address'); ?></label><br />
199                 <input id="address" name="address" size="40" type="text" value="<?php echo stripslashes(htmlspecialchars($_POST['address'])); ?>" />
200         </div>
201
202         <div class="row">
203                 <label for="postal"><?php echo _AT('postal_code'); ?></label><br />
204                 <input id="postal" name="postal" size="7" type="text" value="<?php echo stripslashes(htmlspecialchars($_POST['postal'])); ?>" />
205         </div>
206
207         <div class="row">
208                 <label for="city"><?php echo _AT('city'); ?></label><br />
209                 <input id="city" name="city" type="text" value="<?php echo stripslashes(htmlspecialchars($_POST['city'])); ?>" />
210         </div>
211
212         <div class="row">
213                 <label for="province"><?php echo _AT('province'); ?></label><br />
214                 <input id="province" name="province" type="text" value="<?php echo stripslashes(htmlspecialchars($_POST['province'])); ?>" />
215         </div>
216
217         <div class="row">
218                 <label for="country"><?php echo _AT('country'); ?></label><br />
219                 <input id="country" name="country" type="text" value="<?php echo stripslashes(htmlspecialchars($_POST['country'])); ?>" />
220         </div>
221
222         <div class="row">
223                 <label for="phone"><?php echo _AT('phone'); ?></label><br />
224                 <input size="11" name="phone" type="text" value="<?php echo stripslashes(htmlspecialchars($_POST['phone'])); ?>" id="phone" />
225         </div>
226
227         <div class="row">
228                 <label for="website"><?php echo _AT('web_site'); ?></label><br />
229                 <input id="website" name="website" size="40" type="text" value="<?php if ($_POST['website'] == '') { echo 'http://'; } else { echo stripslashes(htmlspecialchars($_POST['website'])); } ?>" />
230         </div>
231 </fieldset>
232         <div class="row buttons">
233                 <input type="submit" name="submit" value=" <?php echo _AT('save'); ?> " accesskey="s" onclick="encrypt_password()" class="button"/>
234                 <input type="submit" name="cancel" value=" <?php echo _AT('cancel'); ?> "  class="button" />
235         </div>
236 </div>
237 </form>
238
239 <?php require(AT_INCLUDE_PATH.'footer.inc.php'); ?>