Location: PHPKode > projects > Open Biller > ob/admin/add_plans.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>Plan Type:</td><td>
<select name="plantype">
  <option selected value="dedicated">Dedicated Server</option>
<option selected value="vps">VPS</option>
<option selected value="master">Master Reseller</option>
<option value="reseller">Reseller Hosting</option>
  <option value="shared">Shared Hosting</option>
<tr><td><strong><font color="red" size="1">*</font></strong>Plan Nickname:</td><td>
<input type="text" name="plannickname" maxlength="60">
<tr><td><strong><font color="red" size="1">*</font></strong>Plan Name</td><td>
<input type="text" name="planname" maxlength="60">
<tr><td><strong><font color="red" size="1">*</font></strong>Plan Description</td><td>
<input type="text" name="plandescription" maxlength="60">
<tr><th colspan=2><input type="submit" name="submit" value="Add Plan"></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