Location: PHPKode > projects > Open Biller > ob/admin/remove_plans.php
<?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.
*/
include('../config.php');
include('../global.php');
//checks cookies to make sure they are logged in
if(isset($_COOKIE['admin_ID_my_site']))
{
$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'", 
                  mysql_real_escape_string($adminame), 
                  mysql_real_escape_string($adminpassword));
mysql_query($query);
{

//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
else
{
?>
<?php
$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)) {
?>
<html>
<head>
<title><?php echo $script_title; ?> Project</title>
</head>
<body link="blue" alink="blue" vlink="blue">
<table border="1">
<tr><td><h1>Plans</h1></td></tr><tr><td>
<tr><td><strong>Plan Name:</strong><input type="checkbox" name="category" value="<?php echo $row[planname]; ?>">
</tr></td>
<tr><td><strong>Plan Type:</strong><input type="checkbox" name="description" value="<?php echo $row[plantype]; ?>">
</tr></td>
<tr><th colspan=2><input type="submit" name="submit" value="Remove Plan"></th></tr>
</form>
</table>
<?php } ?>
<!-- Please Support Our Project! Do not remove the copyright under any circumstances! -->
<?php echo copyright_text();?>
</body>
</html>
<?php
}
}
}
else
//if the cookie does not exist, they are taken to the login screen
{
header("Location: ../admin.php");
}
?>
 
Return current item: Open Biller