* Reorganised the includes directory, creating subdirectories db, parser and specials
[lhc/web/wiklou.git] / includes / templates / Userlogin.php
1 <?php
2 /**
3 * @defgroup Templates Templates
4 * @file
5 * @ingroup Templates
6 */
7 if( !defined( 'MEDIAWIKI' ) ) die( -1 );
8
9 /**
10 * HTML template for Special:Userlogin form
11 * @ingroup Templates
12 */
13 class UserloginTemplate extends QuickTemplate {
14 function execute() {
15 if( $this->data['message'] ) {
16 ?>
17 <div class="<?php $this->text('messagetype') ?>box">
18 <?php if ( $this->data['messagetype'] == 'error' ) { ?>
19 <h2><?php $this->msg('loginerror') ?>:</h2>
20 <?php } ?>
21 <?php $this->html('message') ?>
22 </div>
23 <div class="visualClear"></div>
24 <?php } ?>
25
26 <div id="loginstart"><?php $this->msgWiki( 'loginstart' ); ?></div>
27 <div id="userloginForm">
28 <form name="userlogin" method="post" action="<?php $this->text('action') ?>">
29 <h2><?php $this->msg('login') ?></h2>
30 <p id="userloginlink"><?php $this->html('link') ?></p>
31 <?php $this->html('header'); /* pre-table point for form plugins... */ ?>
32 <div id="userloginprompt"><?php $this->msgWiki('loginprompt') ?></div>
33 <?php if( @$this->haveData( 'languages' ) ) { ?><div id="languagelinks"><p><?php $this->html( 'languages' ); ?></p></div><?php } ?>
34 <table>
35 <tr>
36 <td class="mw-label"><label for='wpName1'><?php $this->msg('yourname') ?></label></td>
37 <td class="mw-input">
38 <input type='text' class='loginText' name="wpName" id="wpName1"
39 tabindex="1"
40 value="<?php $this->text('name') ?>" size='20' />
41 </td>
42 </tr>
43 <tr>
44 <td class="mw-label"><label for='wpPassword1'><?php $this->msg('yourpassword') ?></label></td>
45 <td class="mw-input">
46 <input type='password' class='loginPassword' name="wpPassword" id="wpPassword1"
47 tabindex="2"
48 value="" size='20' />
49 </td>
50 </tr>
51 <?php if( $this->data['usedomain'] ) {
52 $doms = "";
53 foreach( $this->data['domainnames'] as $dom ) {
54 $doms .= "<option>" . htmlspecialchars( $dom ) . "</option>";
55 }
56 ?>
57 <tr>
58 <td class="mw-label"><?php $this->msg( 'yourdomainname' ) ?></td>
59 <td class="mw-input">
60 <select name="wpDomain" value="<?php $this->text( 'domain' ) ?>"
61 tabindex="3">
62 <?php echo $doms ?>
63 </select>
64 </td>
65 </tr>
66 <?php } ?>
67 <tr>
68 <td></td>
69 <td class="mw-input">
70 <input type='checkbox' name="wpRemember"
71 tabindex="4"
72 value="1" id="wpRemember"
73 <?php if( $this->data['remember'] ) { ?>checked="checked"<?php } ?>
74 /> <label for="wpRemember"><?php $this->msg('remembermypassword') ?></label>
75 </td>
76 </tr>
77 <tr>
78 <td></td>
79 <td class="mw-submit">
80 <input type='submit' name="wpLoginattempt" id="wpLoginattempt" tabindex="5" value="<?php $this->msg('login') ?>" />&nbsp;<?php if( $this->data['useemail'] && $this->data['canreset']) { ?><input type='submit' name="wpMailmypassword" id="wpMailmypassword"
81 tabindex="6"
82 value="<?php $this->msg('mailmypassword') ?>" />
83 <?php } ?>
84 </td>
85 </tr>
86 </table>
87 <?php if( @$this->haveData( 'uselang' ) ) { ?><input type="hidden" name="uselang" value="<?php $this->text( 'uselang' ); ?>" /><?php } ?>
88 </form>
89 </div>
90 <div id="loginend"><?php $this->msgWiki( 'loginend' ); ?></div>
91 <?php
92
93 }
94 }
95
96 /**
97 * @ingroup Templates
98 */
99 class UsercreateTemplate extends QuickTemplate {
100 function execute() {
101 if( $this->data['message'] ) {
102 ?>
103 <div class="<?php $this->text('messagetype') ?>box">
104 <?php if ( $this->data['messagetype'] == 'error' ) { ?>
105 <h2><?php $this->msg('loginerror') ?>:</h2>
106 <?php } ?>
107 <?php $this->html('message') ?>
108 </div>
109 <div class="visualClear"></div>
110 <?php } ?>
111 <div id="userlogin">
112
113 <form name="userlogin2" id="userlogin2" method="post" action="<?php $this->text('action') ?>">
114 <h2><?php $this->msg('createaccount') ?></h2>
115 <p id="userloginlink"><?php $this->html('link') ?></p>
116 <?php $this->html('header'); /* pre-table point for form plugins... */ ?>
117 <?php if( @$this->haveData( 'languages' ) ) { ?><div id="languagelinks"><p><?php $this->html( 'languages' ); ?></p></div><?php } ?>
118 <table>
119 <tr>
120 <td class="mw-label"><label for='wpName2'><?php $this->msg('yourname') ?></label></td>
121 <td class="mw-input">
122 <input type='text' class='loginText' name="wpName" id="wpName2"
123 tabindex="1"
124 value="<?php $this->text('name') ?>" size='20' />
125 </td>
126 </tr>
127 <tr>
128 <td class="mw-label"><label for='wpPassword2'><?php $this->msg('yourpassword') ?></label></td>
129 <td class="mw-input">
130 <input type='password' class='loginPassword' name="wpPassword" id="wpPassword2"
131 tabindex="2"
132 value="" size='20' />
133 </td>
134 </tr>
135 <?php if( $this->data['usedomain'] ) {
136 $doms = "";
137 foreach( $this->data['domainnames'] as $dom ) {
138 $doms .= "<option>" . htmlspecialchars( $dom ) . "</option>";
139 }
140 ?>
141 <tr>
142 <td class="mw-label"><?php $this->msg( 'yourdomainname' ) ?></td>
143 <td class="mw-input">
144 <select name="wpDomain" value="<?php $this->text( 'domain' ) ?>"
145 tabindex="3">
146 <?php echo $doms ?>
147 </select>
148 </td>
149 </tr>
150 <?php } ?>
151 <tr>
152 <td class="mw-label"><label for='wpRetype'><?php $this->msg('yourpasswordagain') ?></label></td>
153 <td class="mw-input">
154 <input type='password' class='loginPassword' name="wpRetype" id="wpRetype"
155 tabindex="4"
156 value=""
157 size='20' />
158 </td>
159 </tr>
160 <tr>
161 <?php if( $this->data['useemail'] ) { ?>
162 <td class="mw-label"><label for='wpEmail'><?php $this->msg('youremail') ?></label></td>
163 <td class="mw-input">
164 <input type='text' class='loginText' name="wpEmail" id="wpEmail"
165 tabindex="5"
166 value="<?php $this->text('email') ?>" size='20' />
167 <div class="prefsectiontip">
168 <?php if( $this->data['emailrequired'] ) {
169 $this->msgWiki('prefs-help-email-required');
170 } else {
171 $this->msgWiki('prefs-help-email');
172 } ?>
173 </div>
174 </td>
175 <?php } ?>
176 <?php if( $this->data['userealname'] ) { ?>
177 </tr>
178 <tr>
179 <td class="mw-label"><label for='wpRealName'><?php $this->msg('yourrealname') ?></label></td>
180 <td class="mw-input">
181 <input type='text' class='loginText' name="wpRealName" id="wpRealName"
182 tabindex="6"
183 value="<?php $this->text('realname') ?>" size='20' />
184 <div class="prefsectiontip">
185 <?php $this->msgWiki('prefs-help-realname'); ?>
186 </div>
187 </td>
188 <?php } ?>
189 </tr>
190 <tr>
191 <td></td>
192 <td class="mw-input">
193 <input type='checkbox' name="wpRemember"
194 tabindex="7"
195 value="1" id="wpRemember"
196 <?php if( $this->data['remember'] ) { ?>checked="checked"<?php } ?>
197 /> <label for="wpRemember"><?php $this->msg('remembermypassword') ?></label>
198 </td>
199 </tr>
200 <tr>
201 <td></td>
202 <td class="mw-submit">
203 <input type='submit' name="wpCreateaccount" id="wpCreateaccount"
204 tabindex="8"
205 value="<?php $this->msg('createaccount') ?>" />
206 <?php if( $this->data['createemail'] ) { ?>
207 <input type='submit' name="wpCreateaccountMail" id="wpCreateaccountMail"
208 tabindex="9"
209 value="<?php $this->msg('createaccountmail') ?>" />
210 <?php } ?>
211 </td>
212 </tr>
213 </table>
214 <?php if( @$this->haveData( 'uselang' ) ) { ?><input type="hidden" name="uselang" value="<?php $this->text( 'uselang' ); ?>" /><?php } ?>
215 </form>
216 </div>
217 <div id="signupend"><?php $this->msgWiki( 'signupend' ); ?></div>
218 <?php
219
220 }
221 }