Location: PHPKode > projects > EasyFest > new/EventHead_editCell.php
<?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["loggedIn"] == FALSE){
		header("Location:admin_login.php");
		exit;
		
	 }include_once("config.php");
		include('header1.php');
	include('left_user.php'); ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Premium Series by Free CSS Templates</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">Create EventHead</h2><br>
	    <div class="entry">
<?php
//echo "hello\n";

	$EventHead = $_GET['EventHead'];
	//$EventName=$_GET['EventName'];
	$sqlQuery = "SELECT * FROM rights where UserName='$EventHead'";
  	$result = MYSQL_QUERY($sqlQuery);
	$numberOfRows = MYSQL_NUM_ROWS($result);
	$i = 0;
	$j=0;
	$k=0;
	
	//echo "helloooooo\n";
   // echo $_POST['gsoc_EventAdministration'];
	//echo "hello1111111111111";
	//print_r(mysql_fetch_array($result));
	while($j<$numberOfRows)
		{
		$row=mysql_fetch_array($result);
		$event[$j]=$row[EventName];
		//echo $event[$j]."\n";
		$j++;
		}
	//echo "hello\n";
		$sqlQuery = "SELECT * FROM rights where UserName='$EventHead'";
  		$result1 = MYSQL_QUERY($sqlQuery);
	while($k<$numberOfRows)
		{
		$row1=mysql_fetch_array($result1);
		$Right[$k]=$row1[RightId];
		//echo $Right[$k]."\n";
		$k++;
		}
		//print_r($Right);
		//echo "hello\n";
	
		$sqlQuery = "SELECT * FROM rights where UserName='$EventHead'";
  		$result = MYSQL_QUERY($sqlQuery);
	while($i<$numberOfRows)
		{
		//echo $_POST["$event[$i]"."_Sponsorships"];
		if($_POST["$event[$i]"."_Sponsorships"]==1)
		{
		$Sponsorships=1;
		}
		else
		{
		$Sponsorships=0;
		}
		$row=mysql_fetch_array($result);
		if($_POST["$event[$i]"."_EventAdministration"]==1)
		{
		$EventAdministration=1;
		}
		else
		{
		$EventAdministration=0;
		}
		$row=mysql_fetch_array($result);
		if($_POST["$event[$i]"."_Hospitality"]==1)
		{
		$Hospitality=1;
		}
		else
		{
		$Hospitality=0;
		}
		$row=mysql_fetch_array($result);
		if($_POST["$event[$i]"."_Accounting"]==1)
		{
		$Accounting=1;
		}
		else
		{
		$Accounting=0;
		}
		$row=mysql_fetch_array($result);
		if($_POST["$event[$i]"."_PublicRelations"]==1)
		{
		$PublicRelations=1;
		}
		else
		{
		$PublicRelations=0;
		}
		$row=mysql_fetch_array($result);
		if($_POST["$event[$i]"."_SMSAlerts"]==1)
		{
		$SMSAlerts=1;
		}
		else
		{
		$SMSAlerts=0;
		}
	/*		
	$Sponsorships = $row[Sponsorships];
	echo $Sponsorships;
	$EventAdministration = $row[EventAdministration];
	$Hospitality = $row[Hospitality];
	$Accounting = $row[Accounting];
	$PublicRelations = $row[PublicRelations];
	$SMSAlerts = $row[SMSAlerts];
	*/
	$EventName=$event[$i];
	$Rd=$Right[$i];
	//echo "hello"."$i"."$Rd";
	
	$sqlQuery1="UPDATE rights SET  Sponsorships='$Sponsorships',EventAdministration='$EventAdministration',Hospitality='$Hospitality',Accounting='$Accounting',PublicRelations='$PublicRelations',SMSAlerts='$SMSAlerts' WHERE RightId='$Rd'";
	//echo $sqlQuery1;
	/*sqlqup = "UPDATE rights SET Sponsorships=$Sponsorships,EventAdministration=$EventAdministration,Hospitality=$Hospitality,Accounting=$Accounting,PublicRelations=$PublicRelations,SMSAlerts=$SMSAlerts  WHERE EventAssociate='$EventAssociate' AND  EventName = '$row[EventName]' ";// AND UserName='$EventAssociate'";
		
		*/
		mysql_query($sqlQuery1);
		
		
		
		$i++;
	
		
	}
	
		
	
	
	?>
	
<script type="text/javascript">
<!--
window.location = "index_user.php";
//-->
</script>	
  


                    </p>
				</div>
		  </div>
		</div>
        </div>
        <!-- end content -->
		<!-- start sidebars -->
		<!-- end sidebars -->
	  <div style="clear: both;">&nbsp;</div>
	</div>
	<!-- end page -->
</div>
</html>
<?php
	include('footer.php');
?>
Return current item: EasyFest