Newer
Older
backup-commander / html / inc / login.php
  1. <?php
  2.  
  3.  
  4. function getLogin_content( ){
  5. $content = <<<'EOD'
  6.  
  7. <div class="section_header" >Login</div>
  8. <div class="content_section_text" style="min-height: 350px;" >
  9. <div class="two-col-panel">
  10. <div>Login Name</div>
  11. <div><input id="login_name" type="text" $login_name_value ></div>
  12. <div>Password</div>
  13. <div><input id="login_pwd" type="password" ></div>
  14.  
  15.  
  16. <div></div>
  17. <div>
  18. <button class="btn_exec" onclick="btn_clk_nav(this, 'btn_login')" >Login</button>
  19. </div>
  20.  
  21. </div>
  22.  
  23. </div>
  24. EOD;
  25. //$content = str_replace('$header_cont', $header_cont, $content);
  26. return $content;
  27. }
  28.  
  29. function authenticate( $username, $hashed_pwd_client, $svr_nonce ){
  30. //TODO:
  31. // get the username and password from somewhere.
  32. $hashed_pwd_correct = hash('sha256', 'biggles'.$svr_nonce );
  33. return $hashed_pwd_correct == $hashed_pwd_client;
  34. }
  35.  
  36.  
  37. ?>