<?php
include_once("include/db_connection.php");
header("Expires: Thu, 17 May 2001 10:17:17 GMT"); // Date in the past
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header ("Pragma: no-cache"); // HTTP/1.0
session_start();
if($_SESSION["adminloggedIn"] == FALSE){
header("Location:admin_login.php");
exit;
}
include('header.php');
include('left1.php');?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Add Fest Details</title>
<meta name="keywords" content="" />
<meta name="Premium Series" content="" />
<link href="default.css" rel="stylesheet" type="text/css" media="screen" />
<script language="JavaScript" src="gen_validatorv31.js" type="text/javascript"></script>
<title>Untitled Document</title>
</head>
<body>
<div id="wrapper">
<!-- start page -->
<div id="page">
<!-- start content -->
<div id="prtCnt" align="center">
<div id="content" align="center">
<div class="post">
<h2 class="title"> </h2>
<div class="entry"><?php
//$uid = $_SESSION['ud'];
$FestName = $_POST['FestName'];
$FestAdmin = $_POST['FestAdmin'];
$Description = $_POST['Description'];
$StartDate = $_POST['StartDate'];
$EndDate = $_POST['EndDate'];
$Venue = $_POST['Venue'];
$Budget = $_POST['Budget'];
$UploadSpace = $_POST['UploadSpace'];
$FestAdministration = $_POST['FestAdministration'];
$PublicRelations = $_POST['PublicRelations'];
$Hospitality = $_POST['Hospitality'];
$Accounting = $_POST['Accounting'];
$Sponsorship = $_POST['Sponsorship'];
$MeetingScheduling = $_POST['MeetingScheduling'];
$SMSAlerts = $_POST['SMSAlerts'];
$checkfest = mysql_query("SELECT * FROM fest WHERE `FestName` ='$FestName'");
$fest_exist = mysql_num_rows($checkfest);
if($fest_exist > 0)
{
$messages[1] = "Fest already exists";
//header("Location:editFest.php"."?error=fest already exists");
exit();
// unset($f);
}
$sqlQuery = "INSERT INTO fest(`FestName`,`FestAdmin`,`Description`,`StartDate`,`EndDate`,`Venue`,`Budget` ,`UploadSpace` ,`FestAdministration`,`PublicRelations`,`Hospitality`,`Accounting`,`Sponsorship`,`MeetingScheduling` ,`SMSAlerts`) VALUES
('$FestName', '$FestAdmin', '$Description', '$StartDate', '$EndDate', '$Venue' , '$Budget', '$UploadSpace', '$FestAdministration', '$PublicRelations', '$Hospitality', '$Accounting','$Sponsorship','$MeetingScheduling', '$SMSAlerts')";
$result = mysql_query($sqlQuery) or die("Invalid query: " . mysql_error() . "<br><br>". $sqlQuery);
//header("Location:indexApproval.php"); //header("Location:user_viewprof.php");
echo "Fest Has been created";
?>
</p>
</div>
</div>
</div>
</div>
<!-- end content -->
<!-- start sidebars -->
<!-- end sidebars -->
<div style="clear: both;"> </div>
</div>
<!-- end page -->
</div>
</html>
<?php
include('footer.php');
?>