Guest User

Untitled

a guest
Jul 4th, 2012
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. <?
  2. class Lognout {
  3.  
  4. function formularZobrazit() {
  5. echo' <form name="form1" method="post" action="">
  6. <td
  7. <td colspan="3">Login Game char </td> <br> <br>
  8. <tr>
  9. <td colspan="3">Lognout</td> <br>
  10. </tr>
  11. <tr>
  12. <td width="294"><input name="login" type="text" size="10" id="login"><br></td>
  13. </tr>
  14. <tr>
  15. <td>Password</td> <br>
  16. <td></td>
  17. <td><input name="heslo" type="password" size="10" id="heslo"></td>
  18. </tr>
  19. <tr>
  20. <td>&nbsp;</td>
  21. <td>&nbsp;</td> <br>
  22. <td><input type="submit" name="Submit" value="Lognout"></td>
  23. </tr>
  24. </td>
  25. </form>';
  26. }
  27. function overeniHesla() {
  28. $this->login = $_POST['login'];
  29. //$this->login;
  30. $this->heslo = $_POST['heslo'];
  31. //$this->heslo;
  32. if (!empty($this->login)){
  33. $passcode = base64_encode(pack('H*', sha1($this->heslo)));
  34. $radku= dibi::query('SELECT count(*) FROM `accounts` WHERE `login` = %s', $this->login, 'and `password` = %s', $passcode )->fetchSingle(); //POZOR NA fetchSingle
  35.  
  36. print "AAAAAAaaa";
  37. print "<br>hash heslo:";
  38. print "$passcode";
  39. }
  40. }
  41.  
  42. # zobrazení jedné položky menu
  43. function zobrazPolozku($hoj) {
  44. $this->hoja = $hoj;
  45. print $this->hoja;
  46.  
  47. }
  48.  
  49.  
  50. }
  51.  
  52. $hlavni_menu = new Lognout();
  53. $hlavni_menu->formularZobrazit();
  54. $hlavni_menu->overeniHesla();
  55. $hlavni_menu->zobrazPolozku('hojjghgfhfg');
Advertisement
Add Comment
Please, Sign In to add comment