Changeset 49 for trunk/registrace.php
- Timestamp:
- Jan 30, 2009, 10:33:08 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:ignore
set to
SqlTranslate.zip
-
Property svn:ignore
set to
-
trunk/registrace.php
r43 r49 1 1 <?php 2 2 3 3 include('includes/global.php'); 4 4 5 if (array_key_exists('user', $_POST)) { 6 5 if(array_key_exists('user', $_POST)) 6 { 7 7 $User = $_POST['user']; 8 8 $Pass = $_POST['pass']; … … 11 11 $Language = $_POST['Language']; 12 12 13 if ($Pass == $Pass2) {14 13 if($Pass == $Pass2) 14 { 15 15 $Line = mysql_fetch_row($Database->SQLCommand("SELECT * FROM user WHERE user = '$User'")); 16 if (!$Line) { 16 if(!$Line) 17 { 17 18 $Addres = $_SERVER['REMOTE_ADDR']; 18 19 $Database->SQLCommand("INSERT INTO `user` (`user` , `pass` , `LastIP` , `LastLogin` , `Email` , `Language` ) 19 20 VALUES ('$User','$Pass','$Addres',now(),'$Email','$Language')"); 20 21 // $Database->SQLCommand("INSERT INTO user () VALUES('$User','$Pass','0','$Addres',now(),'0','$Email')"); 21 echo 'Registrace proběhla úspěšně<br />';22 echo('Registrace proběhla úspěšně<br />)'); 22 23 WriteLog('Uživatel se zaregistroval: '.$User, 3); 23 24 … … 29 30 30 31 // echo $Database->id_connection; 31 } else {32 echo 'Uživatel s touto přezdívkou již existuje 33 <A href="registrace.php">zpět</a>';32 } else 33 { 34 echo('Uživatel s touto přezdívkou již existuje. <a href="registrace.php">Zpět</a>'); 34 35 } 35 } else { 36 echo 'Hesla se neshodují 37 <A href="registrace.php">zpět</a>'; 38 } 39 40 } else { 41 42 ?> 43 <form action="registrace.php" method="post"> 36 } else 37 { 38 echo('Hesla se neshodují. <a href="registrace.php">Zpět</a>'); 39 } 40 } else 41 { 42 echo('<form action="registrace.php" method="post"> 44 43 <table> 45 44 <tr> 46 45 <td>Jméno:</td> 47 <td><input type="text" name="user" ></td>46 <td><input type="text" name="user" /></td> 48 47 </tr> 49 48 <tr> 50 49 <td>Heslo:</td> 51 <td><input type="password" name="pass" ></td>50 <td><input type="password" name="pass" /></td> 52 51 </tr> 53 52 <tr> 54 53 <td>Potvrzení Hesla: </td> 55 <td><input type="password" name="pass2" ></td>54 <td><input type="password" name="pass2" /></td> 56 55 </tr> 57 56 <tr> 58 57 <td>Email: </td> 59 <td><input type="text" name="Email" ></td>58 <td><input type="text" name="Email" /></td> 60 59 </tr> 61 60 <tr> 62 61 <td>Normálně budu překládat do: </td> 63 <td> <?php WriteLanguages($Line['Language']); ?></td>62 <td>'); WriteLanguages(1); echo('</td> 64 63 </tr> 64 <tr> 65 <th><input type="submit" value="Registrovat" /></th> 66 </tr> 67 </table></form>'); 68 } 69 70 ShowFooter(); 65 71 66 67 <tr>68 <th><input type="submit" value="Registrovat"></th>69 </tr>70 </table>71 </form>72 73 <?php74 75 }76 77 ShowFooter();78 72 ?>
Note:
See TracChangeset
for help on using the changeset viewer.