7a6f03a12cecbbe93c3f1dfb4370949ee8bf49d1
[lhc/web/wiklou.git] / includes / templates / Userlogin.php
1 <?php
2 /**
3 * @package MediaWiki
4 * @subpackage Templates
5 */
6 if( !defined( 'MEDIAWIKI' ) ) die();
7
8 /** */
9 require_once( 'includes/SkinTemplate.php' );
10
11 /**
12 * HTML template for Special:Userlogin form
13 * @package MediaWiki
14 * @subpackage Templates
15 */
16 class UserloginTemplate extends QuickTemplate {
17 function execute() {
18 if( $this->data['error'] ) {
19 ?>
20 <div class="errorbox">
21 <h2><?php $this->msg('loginerror') ?>:</h2>
22 <?php $this->html('error') ?>
23 </div>
24 <div class="visualClear"></div>
25 <?php } ?>
26
27 <div id="userlogin">
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 <div id="userloginprompt"><?php $this->msgWiki('loginprompt') ?></div>
32 <table>
33 <tr>
34 <td align='right'><label for='wpName1'><?php $this->msg('yourname') ?>:</label></td>
35 <td align='left'>
36 <input type='text' class='loginText' name="wpName" id="wpName1"
37 value="<?php $this->text('name') ?>" size='20' />
38 </td>
39 </tr>
40 <tr>
41 <td align='right'><label for='wpPassword1'><?php $this->msg('yourpassword') ?>:</label></td>
42 <td align='left'>
43 <input type='password' class='loginPassword' name="wpPassword" id="wpPassword1"
44 value="<?php $this->text('password') ?>" size='20' />
45 </td>
46 </tr>
47 <?php if( $this->data['usedomain'] ) {
48 $doms = "";
49 foreach( $this->data['domainnames'] as $dom ) {
50 $doms .= "<option>" . htmlspecialchars( $dom ) . "</option>";
51 }
52 ?>
53 <tr>
54 <td align='right'><?php $this->msg( 'yourdomainname' ) ?>:</td>
55 <td align='left'>
56 <select name="wpDomain" value="<?php $this->text( 'domain' ) ?>">
57 <?php echo $doms ?>
58 </select>
59 </td>
60 </tr>
61 <?php } ?>
62 <tr>
63 <td></td>
64 <td align='left'>
65 <input type='checkbox' name="wpRemember"
66 value="1" id="wpRemember"
67 <?php if( $this->data['remember'] ) { ?>checked="checked"<?php } ?>
68 /> <label for="wpRemember"><?php $this->msg('remembermypassword') ?></label>
69 </td>
70 </tr>
71 <tr>
72 <td></td>
73 <td align='left' style="white-space:nowrap">
74 <input type='submit' name="wpLoginattempt" id="wpLoginattempt" value="<?php $this->msg('login') ?>" />&nbsp;<?php if( $this->data['useemail'] ) { ?><input type='submit' name="wpMailmypassword"
75 value="<?php $this->msg('mailmypassword') ?>" />
76 <?php } ?>
77 </td>
78 </tr>
79 </table>
80 </form>
81 </div>
82 <div id="loginend"><?php $this->msgWiki( 'loginend' ); ?></div>
83 <?php
84
85 }
86 }
87
88 class UsercreateTemplate extends QuickTemplate {
89 function execute() {
90 if( $this->data['error'] ) {
91 ?>
92 <div class="errorbox">
93 <h2><?php $this->msg('loginerror') ?>:</h2>
94 <?php $this->html('error') ?>
95 </div>
96 <div class="visualClear"></div>
97 <?php } ?>
98 <div id="userlogin">
99
100 <?php if( $this->data['create'] ) { ?>
101 <form name="userlogin2" id="userlogin2" method="post" action="<?php $this->text('action') ?>">
102 <h2><?php $this->msg('createaccount') ?></h2>
103 <p id="userloginlink"><?php $this->html('link') ?></p>
104 <table>
105 <tr>
106 <td align='right'><label for='wpName2'><?php $this->msg('yourname') ?>:</label></td>
107 <td align='left'>
108 <input type='text' class='loginText' name="wpName" id="wpName2"
109 value="<?php $this->text('name') ?>" size='20' />
110 </td>
111 </tr>
112 <tr>
113 <td align='right'><label for='wpPassword2'><?php $this->msg('yourpassword') ?>:</label></td>
114 <td align='left'>
115 <input type='password' class='loginPassword' name="wpPassword" id="wpPassword2"
116 value="<?php $this->text('password') ?>" size='20' />
117 </td>
118 </tr>
119 <?php if( $this->data['usedomain'] ) {
120 $doms = "";
121 foreach( $this->data['domainnames'] as $dom ) {
122 $doms .= "<option>" . htmlspecialchars( $dom ) . "</option>";
123 }
124 ?>
125 <tr>
126 <td align='right'><?php $this->msg( 'yourdomainname' ) ?>:</td>
127 <td align='left'>
128 <select name="wpDomain" value="<?php $this->text( 'domain' ) ?>">
129 <?php echo $doms ?>
130 </select>
131 </td>
132 </tr>
133 <?php } ?>
134 <tr>
135 <td align='right'><label for='wpRetype'><?php $this->msg('yourpasswordagain') ?>:</label></td>
136 <td align='left'>
137 <input type='password' class='loginPassword' name="wpRetype" id="wpRetype"
138 value="<?php $this->text('retype') ?>"
139 size='20' />
140 </td>
141 </tr>
142 <tr>
143 <?php if( $this->data['useemail'] ) { ?>
144 <td align='right'><label for='wpEmail'><?php $this->msg('youremail') ?>:</label></td>
145 <td align='left'>
146 <input type='text' class='loginText' name="wpEmail" id="wpEmail"
147 value="<?php $this->text('email') ?>" size='20' />
148 </td>
149 <?php } ?>
150 <?php if( $this->data['userealname'] ) { ?>
151 </tr>
152 <tr>
153 <td align='right'><label for='wpRealName'><?php $this->msg('yourrealname') ?>:</label></td>
154 <td align='left'>
155 <input type='text' class='loginText' name="wpRealName" id="wpRealName"
156 value="<?php $this->text('realname') ?>" size='20' />
157 </td>
158 <?php } ?>
159 </tr>
160 <tr>
161 <td></td>
162 <td align='left'>
163 <input type='checkbox' name="wpRemember"
164 value="1" id="wpRemember"
165 <?php if( $this->data['remember'] ) { ?>checked="checked"<?php } ?>
166 /> <label for="wpRemember"><?php $this->msg('remembermypassword') ?></label>
167 </td>
168 </tr>
169 <tr>
170 <td></td>
171 <td align='left'>
172 <input type='submit' name="wpCreateaccount" id="wpCreateaccount"
173 value="<?php $this->msg('createaccount') ?>" />
174 <?php if( $this->data['createemail'] ) { ?>
175 <input type='submit' name="wpCreateaccountMail" id="wpCreateaccountMail"
176 value="<?php $this->msg('createaccountmail') ?>" />
177 <?php } ?>
178 </td>
179 </tr>
180 <?php } ?>
181 </table>
182 <?php
183
184 if( $this->data['useemail'] ) {
185 echo '<div id="login-emailforlost">';
186 $this->msgHtml( 'emailforlost' );
187 echo '</div>';
188 }
189
190 ?>
191 </form>
192 </div>
193 <div id="signupend"><?php $this->msgWiki( 'signupend' ); ?></div>
194 <?php
195
196 }
197 }
198
199 ?>