gluon-web-remote

Web remote Administration for big size of gluon routers
git clone git://archive.git.mtrnord.blog/MTRNord/gluon-web-remote.git
Log | Files | Refs | README

index.php (2759B)


      1 <div class="container">
      2 
      3     <!-- echo out the system feedback (error and success messages) -->
      4     <?php $this->renderFeedbackMessages(); ?>
      5 
      6     <div class="login-page-box">
      7         <div class="table-wrapper">
      8 
      9             <!-- login box on left side -->
     10             <div class="login-box">
     11                 <h2>Login here</h2>
     12                 <form action="<?php echo Config::get('URL'); ?>/login/login" method="post">
     13                     <input type="text" name="user_name" placeholder="Username or email" required />
     14                     <input type="password" name="user_password" placeholder="Password" required />
     15                     <label for="set_remember_me_cookie" class="remember-me-label">
     16                         <input type="checkbox" name="set_remember_me_cookie" class="remember-me-checkbox" />
     17                         Remember me for 2 weeks
     18                     </label>
     19                     <!-- when a user navigates to a page that's only accessible for logged a logged-in user, then
     20                          the user is sent to this page here, also having the page he/she came from in the URL parameter
     21                          (have a look). This "where did you came from" value is put into this form to sent the user back
     22                          there after being logged in successfully.
     23                          Simple but powerful feature, big thanks to @tysonlist. -->
     24                     <?php if (!empty($this->redirect)) { ?>
     25                         <input type="hidden" name="redirect" value="<?php echo $this->redirect ?>" />
     26                     <?php } ?>
     27 					<!-- 
     28 						set CSRF token in login form, although sending fake login requests mightn't be interesting gap here.
     29 						If you want to get deeper, check these answers:
     30 							1. natevw's http://stackoverflow.com/questions/6412813/do-login-forms-need-tokens-against-csrf-attacks?rq=1
     31 							2. http://stackoverflow.com/questions/15602473/is-csrf-protection-necessary-on-a-sign-up-form?lq=1
     32 							3. http://stackoverflow.com/questions/13667437/how-to-add-csrf-token-to-login-form?lq=1
     33 					-->
     34 					<input type="hidden" name="csrf_token" value="<?= Csrf::makeToken(); ?>" />
     35                     <input type="submit" class="login-submit-button" value="Log in"/>
     36                 </form>
     37                 <div class="link-forgot-my-password">
     38                     <a href="<?php echo Config::get('URL'); ?>/login/requestPasswordReset">I forgot my password</a>
     39                 </div>
     40             </div>
     41 
     42             <!-- register box on right side -->
     43             <div class="register-box">
     44                 <h2>No account yet ?</h2>
     45                 <a href="<?php echo Config::get('URL'); ?>/login/register">Register</a>
     46             </div>
     47 
     48         </div>
     49     </div>
     50 </div>