Bloghost > Admin / Flushcal.php

Questions? Need Help? Want to share? » PHP Forum
Script Name:
Bloghost

Download:
bloghost.zip

Category:
Blog

Archive Content:

Admin

Content:

Guestbook

Content:

Images

Content:

Flushcal.php:


<?php
session_start
();
?>
<link rel="stylesheet" href="style.css" type="text/css">
<center><table border='0' width=100%><tr><td valign='top' width=30%>
<?PHP
include "connect.php";
$blogadmin=$_SESSION['blogadmin'];
$getadmin="SELECT * from bl_admin where username='$blogadmin'";
$getadmin2=mysql_query($getadmin) or die("Cannot get admin");
$getadmin3=mysql_fetch_array($getadmin2);
if(
$getadmin3['status']>=1)
{
   include 
"left.php";
   print 
"</td>";
   print 
"<td valign='top' width=70%>";
   print 
"<table class='maintable'><tr class='headline'><td><center>Flush calendar</center></td></tr>";
   print 
"<tr class='mainrow'><td>";
   if(isset(
$_POST['submit']))
   {
      
$nuke="DELETE from bl_calender where personid='$getadmin3[adminid]'";
      
mysql_query($nuke) or die("COuld not delete entries");
      print 
"Calender entries Deleted.";
  
   }
   else
   {   
      print 
"Flushing will delete all calendar entries. Are you sure you want to flush?<br><br>";
      print 
"<form action='flushcal.php' method='post'>";
      print 
"<input type='submit' name='submit' value='flush the calendar'></form>";

   }
   print 
"</td></tr></table>";
}
else
{
  print 
"Not logged in.";
  print 
"</td></tr></table>";
 

}
?>


Other Blog Scripts:

WebMaster Resources Home

©RingsWorld.com