Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- class Lognout {
- function formularZobrazit() {
- echo' <form name="form1" method="post" action="">
- <td
- <td colspan="3">Login Game char </td> <br> <br>
- <tr>
- <td colspan="3">Lognout</td> <br>
- </tr>
- <tr>
- <td width="294"><input name="login" type="text" size="10" id="login"><br></td>
- </tr>
- <tr>
- <td>Password</td> <br>
- <td></td>
- <td><input name="heslo" type="password" size="10" id="heslo"></td>
- </tr>
- <tr>
- <td> </td>
- <td> </td> <br>
- <td><input type="submit" name="Submit" value="Lognout"></td>
- </tr>
- </td>
- </form>';
- }
- ///////////////function overeniHesla()////////////////////
- function overeniHesla() {
- $this->login = $_POST['login'];
- //$this->login;
- $this->heslo = $_POST['heslo'];
- //$this->heslo;
- if (!empty($this->login)){
- $passcode = base64_encode(pack('H*', sha1($this->heslo)));
- $radku= dibi::query('SELECT count(*) FROM `accounts` WHERE `login` = %s', $this->login, 'and `password` = %s', $passcode )->fetchSingle(); //POZOR NA fetchSingle
- print "AAAAAAaaa";
- print "<br>hash heslo:";
- print "$passcode";
- }
- }
- //////////////////////////////////////////////////
- ///////////////function test()////////////////////
- function test() {
- print " $this->heslo ";
- print "---dasdasdasdas";
- }
- //////////////////////////////////////////////////
- ///////////////function hesloTrue()////////////////////
- function hesloTrue() {
- $this->login = $_POST['login'];
- //$this->login;
- $this->heslo = $_POST['heslo'];
- //$this->heslo;
- $this->test();
- print "$this->test()";
- if (!empty($this->login)){
- $passcode = base64_encode(pack('H*', sha1($this->heslo)));
- $radku= dibi::query('SELECT count(*) FROM `accounts` WHERE `login` = %s', $this->login, 'and `password` = %s', $passcode )->fetchSingle(); //POZOR NA fetchSingle
- print "<br>hash heslo:";
- print "$passcode";
- }
- }
- //////////////////////////////////////////////////
- function zobrazPolozku($hoj) {
- $this->hoja = $hoj;
- print $this->hoja;
- }
- }
- $hlavni_menu = new Lognout();
- $hlavni_menu->formularZobrazit();
- $hlavni_menu->overeniHesla();
- //$hlavni_menu->test();
- $hlavni_menu->zobrazPolozku('hojjghgfhfg');
Advertisement
Add Comment
Please, Sign In to add comment