00001 <?php
00007 if( !defined( 'MEDIAWIKI' ) ) die( -1 );
00008
00013 class UserloginTemplate extends QuickTemplate {
00014 function execute() {
00015 if( $this->data['message'] ) {
00016 ?>
00017 <div class="<?php $this->text('messagetype') ?>box">
00018 <?php if ( $this->data['messagetype'] == 'error' ) { ?>
00019 <h2><?php $this->msg('loginerror') ?></h2>
00020 <?php } ?>
00021 <?php $this->html('message') ?>
00022 </div>
00023 <div class="visualClear"></div>
00024 <?php } ?>
00025
00026 <div id="loginstart"><?php $this->msgWiki( 'loginstart' ); ?></div>
00027 <div id="userloginForm">
00028 <form name="userlogin" method="post" action="<?php $this->text('action') ?>">
00029 <h2><?php $this->msg('login') ?></h2>
00030 <p id="userloginlink"><?php $this->html('link') ?></p>
00031 <?php $this->html('header'); ?>
00032 <div id="userloginprompt"><?php $this->msgWiki('loginprompt') ?></div>
00033 <?php if( @$this->haveData( 'languages' ) ) { ?><div id="languagelinks"><p><?php $this->html( 'languages' ); ?></p></div><?php } ?>
00034 <table>
00035 <tr>
00036 <td class="mw-label"><label for='wpName1'><?php $this->msg('yourname') ?></label></td>
00037 <td class="mw-input">
00038 <input type='text' class='loginText' name="wpName" id="wpName1"
00039 tabindex="1"
00040 value="<?php $this->text('name') ?>" size='20' />
00041 </td>
00042 </tr>
00043 <tr>
00044 <td class="mw-label"><label for='wpPassword1'><?php $this->msg('yourpassword') ?></label></td>
00045 <td class="mw-input">
00046 <input type='password' class='loginPassword' name="wpPassword" id="wpPassword1"
00047 tabindex="2"
00048 value="" size='20' />
00049 </td>
00050 </tr>
00051 <?php if( $this->data['usedomain'] ) {
00052 $doms = "";
00053 foreach( $this->data['domainnames'] as $dom ) {
00054 $doms .= "<option>" . htmlspecialchars( $dom ) . "</option>";
00055 }
00056 ?>
00057 <tr id="mw-user-domain-section">
00058 <td class="mw-label"><?php $this->msg( 'yourdomainname' ) ?></td>
00059 <td class="mw-input">
00060 <select name="wpDomain" value="<?php $this->text( 'domain' ) ?>"
00061 tabindex="3">
00062 <?php echo $doms ?>
00063 </select>
00064 </td>
00065 </tr>
00066 <?php }
00067 if( $this->data['canremember'] ) { ?>
00068 <tr>
00069 <td></td>
00070 <td class="mw-input">
00071 <input type='checkbox' name="wpRemember"
00072 tabindex="4"
00073 value="1" id="wpRemember"
00074 <?php if( $this->data['remember'] ) { ?>checked="checked"<?php } ?>
00075 /> <label for="wpRemember"><?php $this->msg('remembermypassword') ?></label>
00076 </td>
00077 </tr>
00078 <?php } ?>
00079 <tr>
00080 <td></td>
00081 <td class="mw-submit">
00082 <input type='submit' name="wpLoginattempt" id="wpLoginattempt" tabindex="5" value="<?php $this->msg('login') ?>" /> <?php if( $this->data['useemail'] && $this->data['canreset']) { ?><input type='submit' name="wpMailmypassword" id="wpMailmypassword"
00083 tabindex="6"
00084 value="<?php $this->msg('mailmypassword') ?>" />
00085 <?php } ?>
00086 </td>
00087 </tr>
00088 </table>
00089 <?php if( @$this->haveData( 'uselang' ) ) { ?><input type="hidden" name="uselang" value="<?php $this->text( 'uselang' ); ?>" /><?php } ?>
00090 </form>
00091 </div>
00092 <div id="loginend"><?php $this->msgWiki( 'loginend' ); ?></div>
00093 <?php
00094
00095 }
00096 }
00097
00101 class UsercreateTemplate extends QuickTemplate {
00102 function addInputItem( $name, $value, $type, $msg ) {
00103 $this->data['extraInput'][] = array(
00104 'name' => $name,
00105 'value' => $value,
00106 'type' => $type,
00107 'msg' => $msg,
00108 );
00109 }
00110
00111 function execute() {
00112 if( $this->data['message'] ) {
00113 ?>
00114 <div class="<?php $this->text('messagetype') ?>box">
00115 <?php if ( $this->data['messagetype'] == 'error' ) { ?>
00116 <h2><?php $this->msg('loginerror') ?></h2>
00117 <?php } ?>
00118 <?php $this->html('message') ?>
00119 </div>
00120 <div class="visualClear"></div>
00121 <?php } ?>
00122 <div id="userlogin">
00123
00124 <form name="userlogin2" id="userlogin2" method="post" action="<?php $this->text('action') ?>">
00125 <h2><?php $this->msg('createaccount') ?></h2>
00126 <p id="userloginlink"><?php $this->html('link') ?></p>
00127 <?php $this->html('header'); ?>
00128 <?php if( @$this->haveData( 'languages' ) ) { ?><div id="languagelinks"><p><?php $this->html( 'languages' ); ?></p></div><?php } ?>
00129 <table>
00130 <tr>
00131 <td class="mw-label"><label for='wpName2'><?php $this->msg('yourname') ?></label></td>
00132 <td class="mw-input">
00133 <input type='text' class='loginText' name="wpName" id="wpName2"
00134 tabindex="1"
00135 value="<?php $this->text('name') ?>" size='20' />
00136 </td>
00137 </tr>
00138 <tr>
00139 <td class="mw-label"><label for='wpPassword2'><?php $this->msg('yourpassword') ?></label></td>
00140 <td class="mw-input">
00141 <input type='password' class='loginPassword' name="wpPassword" id="wpPassword2"
00142 tabindex="2"
00143 value="" size='20' />
00144 </td>
00145 </tr>
00146 <?php if( $this->data['usedomain'] ) {
00147 $doms = "";
00148 foreach( $this->data['domainnames'] as $dom ) {
00149 $doms .= "<option>" . htmlspecialchars( $dom ) . "</option>";
00150 }
00151 ?>
00152 <tr>
00153 <td class="mw-label"><?php $this->msg( 'yourdomainname' ) ?></td>
00154 <td class="mw-input">
00155 <select name="wpDomain" value="<?php $this->text( 'domain' ) ?>"
00156 tabindex="3">
00157 <?php echo $doms ?>
00158 </select>
00159 </td>
00160 </tr>
00161 <?php } ?>
00162 <tr>
00163 <td class="mw-label"><label for='wpRetype'><?php $this->msg('yourpasswordagain') ?></label></td>
00164 <td class="mw-input">
00165 <input type='password' class='loginPassword' name="wpRetype" id="wpRetype"
00166 tabindex="4"
00167 value=""
00168 size='20' />
00169 </td>
00170 </tr>
00171 <tr>
00172 <?php if( $this->data['useemail'] ) { ?>
00173 <td class="mw-label"><label for='wpEmail'><?php $this->msg('youremail') ?></label></td>
00174 <td class="mw-input">
00175 <input type='text' class='loginText' name="wpEmail" id="wpEmail"
00176 tabindex="5"
00177 value="<?php $this->text('email') ?>" size='20' />
00178 <div class="prefsectiontip">
00179 <?php if( $this->data['emailrequired'] ) {
00180 $this->msgWiki('prefs-help-email-required');
00181 } else {
00182 $this->msgWiki('prefs-help-email');
00183 } ?>
00184 </div>
00185 </td>
00186 <?php } ?>
00187 <?php if( $this->data['userealname'] ) { ?>
00188 </tr>
00189 <tr>
00190 <td class="mw-label"><label for='wpRealName'><?php $this->msg('yourrealname') ?></label></td>
00191 <td class="mw-input">
00192 <input type='text' class='loginText' name="wpRealName" id="wpRealName"
00193 tabindex="6"
00194 value="<?php $this->text('realname') ?>" size='20' />
00195 <div class="prefsectiontip">
00196 <?php $this->msgWiki('prefs-help-realname'); ?>
00197 </div>
00198 </td>
00199 <?php } ?>
00200 </tr>
00201 <?php if( $this->data['canremember'] ) { ?>
00202 <tr>
00203 <td></td>
00204 <td class="mw-input">
00205 <input type='checkbox' name="wpRemember"
00206 tabindex="7"
00207 value="1" id="wpRemember"
00208 <?php if( $this->data['remember'] ) { ?>checked="checked"<?php } ?>
00209 /> <label for="wpRemember"><?php $this->msg('remembermypassword') ?></label>
00210 </td>
00211 </tr>
00212 <?php }
00213
00214 $tabIndex = 8;
00215 if ( isset( $this->data['extraInput'] ) && is_array( $this->data['extraInput'] ) ) {
00216 foreach ( $this->data['extraInput'] as $inputItem ) { ?>
00217 <tr>
00218 <?php
00219 if ( !empty( $inputItem['msg'] ) && $inputItem['type'] != 'checkbox' ) {
00220 ?><td class="mw-label"><label for="<?php
00221 echo htmlspecialchars( $inputItem['name'] ); ?>"><?php
00222 $this->msgWiki( $inputItem['msg'] ) ?></label><?php
00223 } else {
00224 ?><td><?php
00225 }
00226 ?></td>
00227 <td class="mw-input">
00228 <input type="<?php echo htmlspecialchars( $inputItem['type'] ) ?>" name="<?php
00229 echo htmlspecialchars( $inputItem['name'] ); ?>"
00230 tabindex="<?php echo $tabIndex++; ?>"
00231 value="<?php
00232 if ( $inputItem['type'] != 'checkbox' ) {
00233 echo htmlspecialchars( $inputItem['value'] );
00234 } else {
00235 echo '1';
00236 }
00237 ?>" id="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"
00238 <?php
00239 if ( $inputItem['type'] == 'checkbox' && !empty( $inputItem['value'] ) )
00240 echo 'checked="checked"';
00241 ?> /> <?php
00242 if ( $inputItem['type'] == 'checkbox' && !empty( $inputItem['msg'] ) ) {
00243 ?>
00244 <label for="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"><?php
00245 $this->msgHtml( $inputItem['msg'] ) ?></label><?php
00246 }
00247 ?>
00248 </td>
00249 </tr>
00250 <?php
00251
00252 }
00253 }
00254 ?>
00255 <tr>
00256 <td></td>
00257 <td class="mw-submit">
00258 <input type='submit' name="wpCreateaccount" id="wpCreateaccount"
00259 tabindex="<?php echo $tabIndex++; ?>"
00260 value="<?php $this->msg('createaccount') ?>" />
00261 <?php if( $this->data['createemail'] ) { ?>
00262 <input type='submit' name="wpCreateaccountMail" id="wpCreateaccountMail"
00263 tabindex="<?php echo $tabIndex++; ?>"
00264 value="<?php $this->msg('createaccountmail') ?>" />
00265 <?php } ?>
00266 </td>
00267 </tr>
00268 </table>
00269 <?php if( @$this->haveData( 'uselang' ) ) { ?><input type="hidden" name="uselang" value="<?php $this->text( 'uselang' ); ?>" /><?php } ?>
00270 </form>
00271 </div>
00272 <div id="signupend"><?php $this->msgWiki( 'signupend' ); ?></div>
00273 <?php
00274
00275 }
00276 }