Location: PHPKode > projects > Open Biller > ob/admin/add_servers.php
* Creator: Michael Bacon
* Copyright 2008 - 2009 Open Biller Project. All Rights Reserved.
* This project is open source and the copyright shall not be removed from the visible pages.
//checks cookies to make sure they are logged in
$adminame = $_COOKIE['admin_ID_my_site'];
$adminpass = $_COOKIE['admin_Key_my_site'];
$check = mysql_query("SELECT * FROM admins WHERE adminame = '$adminame'")or die(mysql_error());
while($info = mysql_fetch_array( $check ))
$query = sprintf("SELECT * FROM admins where adminame='%s' and adminpassword='%s'", 

//if the cookie has the wrong password, they are taken to the login page
if ($padminass != $info['adminpassword'])
{ header("Location: ../admin.php");
//otherwise they are shown the admin area
$username = $_COOKIE['admin_ID_my_site'];
$query = mysql_query("SELECT * FROM admins WHERE adminame = '$adminame'")or die(mysql_error());
while($row = mysql_fetch_array($query)) {
<title><?php echo $script_title; ?> Project</title>
<body link="blue" alink="blue" vlink="blue">
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<strong><font color="red" size="1">* means Required Field</font></strong>
<tr><td><strong><font color="red" size="1">*</font></strong>Server Type:</td><td>
<select name="servertype">
  <option value="cpanel">cPanel</option>
<tr><td><strong><font color="red" size="1">*</font></strong>WHM Access Key:</td><td>
<textarea rows="5" cols="80" name="key">
<tr><td><strong><font color="red" size="1">*</font></strong>Server IP Address:</td><td>
<input type="text" name="ip" maxlength="60">
<tr><td><strong><font color="red" size="1">*</font></strong>Server Username(Example: Root)</td><td>
<input type="text" name="serveruser" maxlength="60">
<tr><th colspan=2><input type="submit" name="submit" value="Add Server"></th></tr> </table>
<?php } ?>
<!-- Please Support Our Project! Do not remove the copyright under any circumstances! -->
<?php echo copyright_text();?>
//if the cookie does not exist, they are taken to the login screen
header("Location: ../admin.php");
Return current item: Open Biller