<?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");
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>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>
<style type="text/css">
<!--
.style1 {
color: #343434;
font-size: 16px;
}
-->
</style>
</head>
<body>
<div id="wrapper">
<!-- start page -->
<div id="page">
<!-- start content -->
<div id="prtCnt" align="center">
<div id="content" align="center">
<span class="style1">View Contacts</span><br>
<br><br>
<?php
//$tbl_name2="forum_answer"; // Switch to table "forum_answer"
$UserName1 = $_SESSION['UserName'];
//$result = mysql_query($query) or die("Invalid query: " . mysql_error() . "<br><br>". $query);
//echo "Event successfully added!!";
/*$sql2=mysql_query("SELECT * FROM events WHERE EventHead='$UserName' ");
$sql3=mysql_query("SELECT * FROM events WHERE EventAssociate='eve'");
$sql4=mysql_query("SELECT * FROM events WHERE EventCoord1='$UserName'");
//$result2=mysql_query($sql2);
$numberOfRows = MYSQL_NUM_ROWS($sql2);
$numberOfRows += MYSQL_NUM_ROWS($sql3);
$numberOfRows += MYSQL_NUM_ROWS($sql4);
if(MYSQL_NUM_ROWS($sql2)>0 && MYSQL_NUM_ROWS($sql3)<=0 && MYSQL_NUM_ROWS($sql4)<=0){}
else if(MYSQL_NUM_ROWS($sql2)<=0 && MYSQL_NUM_ROWS($sql3)>0 && MYSQL_NUM_ROWS($sql4)<=0) {$sql2=$sql3;}
else if(MYSQL_NUM_ROWS($sql2)<=0 && MYSQL_NUM_ROWS($sql3)<=0 && MYSQL_NUM_ROWS($sql4)>0) {$sql2=$sql4;}
while($numberOfRows>0){
$result3=mysql_fetch_row($sql2);
$EventName=$result3['EventName'];*/?>
<?php
$sql1="SELECT * FROM sponsorships ";
$result1=mysql_query($sql1);
$j=1;
$numberOfRows = MYSQL_NUM_ROWS($result1);
if($numberOfRows>0){?>
<table width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td width="3%" align="center" bgcolor="#E6E6E6"><strong>ID</strong></td>
<td width="15%" align="center" bgcolor="#E6E6E6"><strong>Added by</strong></td>
<td width="11%" align="center" bgcolor="#E6E6E6"><strong>Company Name</strong></td>
<td width="11%" align="center" bgcolor="#E6E6E6"><strong>Phone No.</strong></td>
<td width="11%" align="center" bgcolor="#E6E6E6"><strong>Contacted Person</strong></td>
<td width="27%" align="center" bgcolor="#E6E6E6"><strong>Post in Company</strong></td>
<td width="14%" align="center" bgcolor="#E6E6E6"><strong>Method</strong></td>
<td width="10%" align="center" bgcolor="#E6E6E6"><strong>Date </strong></td>
<td width="7%" align="center" bgcolor="#E6E6E6"><strong>Time</strong></td>
<td width="13%" align="center" bgcolor="#E6E6E6"><strong>Action</strong></td>
</tr>
<?php
while($numberOfRows>0){
$row=mysql_fetch_array($result1)
?>
<tr>
<td bgcolor="#FFFFFF"><?php echo $j; ?></td>
<td bgcolor="#FFFFFF"><?php echo $row['UserName']; ?></td>
<td align="center" bgcolor="#FFFFFF"><?php echo $row['CompanyName']; ?></td>
<td align="center" bgcolor="#FFFFFF"><?php echo $row['CompanyPhoneNo']; ?></td>
<td align="center" bgcolor="#FFFFFF"><?php echo $row['Name']; ?></td>
<td align="center" bgcolor="#FFFFFF"><?php echo $row['CompanyPost']; ?></td>
<td align="center" bgcolor="#FFFFFF"><?php echo $row['Method']; ?></td>
<td align="center" bgcolor="#FFFFFF"><?php echo $row['Date']; ?></td>
<td align="center" bgcolor="#FFFFFF"><?php echo $row['Time']; ?> </td>
<td align="center" bgcolor="#FFFFFF"><a href="admin_deleteSponsorItem.php?SponsorId=<?php echo $row['SponsorId'];?> "> Delete</a></td>
</tr>
<?php
$j++;
$numberOfRows--;
}
}
?>
</table>
<BR><a href="downloadsponsor.php?EventName=<?php echo "&Table=sponsorships";?>">Save as Report</a><br>
<a href="admin_addSponsorItem.php">Add more Contacts</a>
<?php
?> <br>
</p>
</div>
</div>
<!-- end content -->
<!-- start sidebars -->
<!-- end sidebars -->
<div style="clear: both;"> </div>
</div>
<!-- end page -->
</div>
</html>
<?php
include('footer.php');
?>