Add some conditional die()s to suppress fatal error messages if certain files are...
[lhc/web/wiklou.git] / includes / templates / Userlogin.php
1 <?php
2
3 if( !defined( 'MEDIAWIKI' ) ) die();
4
5 /**
6 * HTML template for Special:Userlogin form
7 * @package MediaWiki
8 * @subpackage Templates
9 */
10 class UserloginTemplate extends QuickTemplate {
11 function execute() {
12 if( $this->data['error'] ) {
13 ?>
14 <h2><?php $this->msg('loginerror') ?>:</h2>
15 <p class='error'><?php $this->html('error') ?></p>
16 <?php } else { ?>
17 <h2><?php $this->msg('login' ) ?>:</h2>
18 <p><?php $this->msg('loginprompt') ?></p>
19 <?php } ?>
20 <form name="userlogin" id="userlogin" method="post" action="<?php $this->text('action') ?>">
21 <table border='0'>
22 <tr>
23 <td align='right'><?php $this->msg('yourname') ?>:</td>
24 <td align='left'>
25 <input tabindex='1' type='text' name="wpName"
26 value="<?php $this->text('name') ?>" size='20' />
27 </td>
28 <td align='left'>
29 <input tabindex='3' type='submit' name="wpLoginattempt"
30 value="<?php $this->msg('login') ?>" />
31 </td>
32 </tr>
33 <tr>
34 <td align='right'><?php $this->msg('yourpassword') ?>:</td>
35 <td align='left'>
36 <input tabindex='2' type='password' name="wpPassword"
37 value="<?php $this->text('password') ?>" size='20' />
38 </td>
39 <td align='left'>
40 <input tabindex='4' type='checkbox' name="wpRemember"
41 value="1" id="wpRemember"
42 <?php if( $this->data['remember'] ) { ?>checked="checked"<?php } ?>
43 /><label for="wpRemember"><?php $this->msg('remembermypassword') ?></label>
44 </td>
45 </tr>
46 <?php if( $this->data['create'] ) { ?>
47 <tr>
48 <td colspan='3'>&nbsp;</td>
49 </tr>
50 <tr>
51 <td align='right'><?php $this->msg('yourpasswordagain') ?>:</td>
52 <td align='left'>
53 <input tabindex='5' type='password' name="wpRetype"
54 value="<?php $this->text('retype') ?>"
55 size='20' />
56 </td>
57 <td><?php $this->msg('newusersonly') ?></td>
58 </tr>
59 <tr>
60 <?php if( $this->data['useemail'] ) { ?>
61 <td align='right'><?php $this->msg('youremail') ?>:</td>
62 <td align='left'>
63 <input tabindex='7' type='text' name="wpEmail"
64 value="<?php $this->text('email') ?>" size='20' />
65 </td>
66 <?php } ?>
67 <?php if( $this->data['userealname'] ) { ?>
68 </tr>
69 <tr>
70 <td align='right'><?php $this->msg('yourrealname') ?>:</td>
71 <td align='left'>
72 <input tabindex='8' type='text' name="wpRealName"
73 value="<?php $this->text('realname') ?>" size='20' />
74 </td>
75 <?php } ?>
76 <td align='left'>
77 <input tabindex='9' type='submit' name="wpCreateaccount"
78 value="<?php $this->msg('createaccount') ?>" />
79 <?php if( $this->data['createemail'] ) { ?>
80 <input tabindex='6' type='submit' name="wpCreateaccountMail"
81 value="<?php $this->msg('createaccountmail') ?>" />
82 <?php } ?>
83 </td>
84 </tr>
85 <?php } ?>
86 <?php if( $this->data['useemail'] ) { ?>
87 <tr>
88 <td colspan='3'>&nbsp;</td>
89 </tr>
90 <tr>
91 <td colspan='3' align='left'>
92 <p>
93 <?php $this->msgHtml( 'emailforlost' ) ?><br />
94 <input tabindex='10' type='submit' name="wpMailmypassword"
95 value="<?php $this->msg('mailmypassword') ?>" />
96 </p>
97 </td>
98 </tr>
99 <?php } ?>
100 </table>
101 </form>
102 <?php
103 $this->msgHtml( 'loginend' );
104 }
105 }
106
107 ?>