Advertisement
Guest User

#2

a guest
Mar 8th, 2013
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. <center><div id="content">
  2. <table width="754" cellspacing="0" cellpadding="0">
  3. <tr>
  4. <td style="color: #FFFFFF; background-color:#000000;" align="center">
  5. <b>Register a Server </b>
  6. </td>
  7. </tr>
  8. <tr>
  9. <td style="padding: 10px; border: 1px solid #000000;">
  10. <center>
  11. </center>
  12. <?php
  13. include('inc/open.php');
  14. if(isset($_SESSION['ip'])){
  15. echo "<h5><a href='toplsit.php'>Back to Topslist</a> | <a href='addnew.php'>Add New Sever</a> | <a href='editserver.php'>Server CP</a></h5>";
  16. }else{
  17. echo "<h5><a href='toplist.php'>Back to Topslist</a> | <a href='addnew.php'>Add New Sever</a> | <a href='editlogin.php'>Login</a></h5>";
  18. }
  19. $name_z = mysql_query("SELECT ip FROM status WHERE ip = '" . $_POST['ip'] . "' LIMIT 1") or die (mysql_error());
  20. if(mysql_num_rows($name_z)){
  21. echo "<font color='#999999'>IP already in use.</font>";
  22. }else{
  23.  
  24. $sql="INSERT INTO status (name, ip, port, email, owner, version, type, password, description, status)
  25. VALUES
  26. ('$_POST[name]','$_POST[ip]','$_POST[port]','$_POST[email]','$_POST[owner]','$_POST[version]','$_POST[type]','$_POST[password]','$_POST[description]','$_POST[status]')";
  27.  
  28. if (!mysql_query($sql,$db))
  29. {
  30. die('Error: ' . mysql_error());
  31. }
  32. echo "<font color='#999999'>Thank you. You server </font><font color='#f3b13f'>".$_POST['name']."</font><font color='#999999'> has been added to the toplist.</font>";
  33. } //to complete the checks e.g ip exists
  34. mysql_close($db)
  35. ?>
  36. </td>
  37. </tr>
  38. </table>
  39. </div></center>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement