Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <center><div id="content">
- <table width="754" cellspacing="0" cellpadding="0">
- <tr>
- <td style="color: #FFFFFF; background-color:#000000;" align="center">
- <b>Register a Server </b>
- </td>
- </tr>
- <tr>
- <td style="padding: 10px; border: 1px solid #000000;">
- <center>
- </center>
- <?php
- include('inc/open.php');
- if(isset($_SESSION['ip'])){
- 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>";
- }else{
- 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>";
- }
- $name_z = mysql_query("SELECT ip FROM status WHERE ip = '" . $_POST['ip'] . "' LIMIT 1") or die (mysql_error());
- if(mysql_num_rows($name_z)){
- echo "<font color='#999999'>IP already in use.</font>";
- }else{
- $sql="INSERT INTO status (name, ip, port, email, owner, version, type, password, description, status)
- VALUES
- ('$_POST[name]','$_POST[ip]','$_POST[port]','$_POST[email]','$_POST[owner]','$_POST[version]','$_POST[type]','$_POST[password]','$_POST[description]','$_POST[status]')";
- if (!mysql_query($sql,$db))
- {
- die('Error: ' . mysql_error());
- }
- 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>";
- } //to complete the checks e.g ip exists
- mysql_close($db)
- ?>
- </td>
- </tr>
- </table>
- </div></center>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement