plugins/SpecialUserFuncs.php
changeset 32 4d87aad3c4c0
parent 30 7e8fd44b36b0
child 57 b354deeaa4c4
equal deleted inserted replaced
31:dc8741857bde 32:4d87aad3c4c0
   165             <input name="username" size="25" type="text" <?php
   165             <input name="username" size="25" type="text" <?php
   166               if ( $level <= USER_LEVEL_MEMBER )
   166               if ( $level <= USER_LEVEL_MEMBER )
   167               {
   167               {
   168                 echo 'tabindex="1" ';
   168                 echo 'tabindex="1" ';
   169               }
   169               }
       
   170               else
       
   171               {
       
   172                 echo 'tabindex="3" ';
       
   173               }
   170               if ( $session->user_logged_in )
   174               if ( $session->user_logged_in )
   171               {
   175               {
   172                 echo 'value="' . $session->username . '"';
   176                 echo 'value="' . $session->username . '"';
   173               }
   177               }
   174               ?> />
   178               ?> />
   190              <p>This restriction applies to the following countries: Belarus, China, India, Israel, Kazakhstan, Mongolia, Pakistan, Russia, Saudi Arabia, Singapore, Tunisia, Venezuela, and Vietnam.</p>
   194              <p>This restriction applies to the following countries: Belarus, China, India, Israel, Kazakhstan, Mongolia, Pakistan, Russia, Saudi Arabia, Singapore, Tunisia, Venezuela, and Vietnam.</p>
   191            </td>
   195            </td>
   192          </tr>
   196          </tr>
   193          <?php } ?>
   197          <?php } ?>
   194          <tr>
   198          <tr>
   195            <th colspan="3" style="text-align: center" class="subhead"><input type="submit" name="login" value="Log in" tabindex="3" /></th>
   199            <th colspan="3" style="text-align: center" class="subhead"><input type="submit" name="login" value="Log in" tabindex="<?php echo ( $level <= USER_LEVEL_MEMBER ) ? '3' : '2'; ?>" /></th>
   196          </tr>
   200          </tr>
   197       </table>
   201       </table>
   198     </div>
   202     </div>
   199       <input type="hidden" name="challenge_data" value="<?php echo $challenge; ?>" />
   203       <input type="hidden" name="challenge_data" value="<?php echo $challenge; ?>" />
   200       <input type="hidden" name="use_crypt" value="no" />
   204       <input type="hidden" name="use_crypt" value="no" />
   201       <input type="hidden" name="crypt_key" value="<?php echo $pubkey; ?>" />
   205       <input type="hidden" name="crypt_key" value="<?php echo $pubkey; ?>" />
   202       <input type="hidden" name="crypt_data" value="" />
   206       <input type="hidden" name="crypt_data" value="" />
   203       <input type="hidden" name="auth_level" value="<?php echo (string)$level; ?>" />
   207       <input type="hidden" name="auth_level" value="<?php echo (string)$level; ?>" />
       
   208       <?php if ( $level <= USER_LEVEL_MEMBER ): ?>
       
   209       <script type="text/javascript">
       
   210         document.forms.loginform.username.focus();
       
   211       </script>
       
   212       <?php else: ?>
       
   213       <script type="text/javascript">
       
   214         document.forms.loginform.pass.focus();
       
   215       </script>
       
   216       <?php endif; ?>
   204     </form>
   217     </form>
   205     <?php
   218     <?php
   206       echo $session->aes_javascript('loginform', 'pass', 'use_crypt', 'crypt_key', 'crypt_data', 'challenge_data');
   219       echo $session->aes_javascript('loginform', 'pass', 'use_crypt', 'crypt_key', 'crypt_data', 'challenge_data');
   207     ?>
   220     ?>
   208   <?php
   221   <?php