Location: PHPKode > projects > EasyFest > new/editCell.php
<?php
	include_once("include/db_connection.php");
	session_start();
	if($_SESSION["adminloggedIn"] == FALSE){
				header("Location:admin_login.php");
				exit;
	}
	include_once("config_admin.php");
checkLoggedIn("yes");?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>

<?php
//echo "hello\n";

	$EventAssociate = $_GET['EventAssociate'];
	//$EventName=$_GET['EventName'];
	$sqlQuery = "SELECT * FROM rights where UserName='$EventAssociate'";
  	$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='$EventAssociate'";
  		$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='$EventAssociate'";
  		$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.php";
//-->
</script>	
  
	
	</body>
	</html>
Return current item: EasyFest