Location: PHPKode > projects > Dynamic Band Manager > dbm-current/gig_admin.php
<?
include "conf.php";
include "permissions.php";

include "admin_headers.php";

if (($add_gig!="1") && ($del_gig!="1") && ($edit_gig!="1") || ($logged_in!="1")){
echo "dbm:=>You are not authorised to view this page.";
exit;
}

echo "<table width=\"100%\">
<tr><td bgcolor=\"#ececec\"><center><b>Gig Administration<br></b>Your permissions allow you to -";

if ($add_gig=="1"){
echo "[<font color=\"red\">ADD GIGS</font>] ";
}
if ($del_gig=="1"){
echo "[<font color=\"red\">DELETE GIGS</font>] ";
}
if ($edit_gig=="1"){
echo "[<font color=\"red\">EDIT_GIGS</font>]";
}

echo "<br><br></table><br>";

echo "<table width=\"100%\">
<tr><td bgcolor=\"#ececec\"><center><a href=\"add_gig.php\">Add New Gig</a></center></td></tr></table><br>";

$sql="SELECT * FROM dbm_gigs";
$result=mysql_query($sql,$link);

$output="<table><tr bgcolor=\"#d0d0d0\"><td><center><b>Date</b></center></td><td><center><b>Venue</center></b></td><td><center><b>Time</center></b></td><td><center><b>Cost</center></b></td><td><center><b>Comments</b></center></td></tr>";

while($row=mysql_fetch_array($result)){
$gig_id=$row['gig_id'];
$venue=$row['venue'];
$date=$row['date'];
$bands=$row['bands'];
$cost=$row['cost'];
$comments=$row['comments'];
$time=$row['time'];

$output.="<tr bgcolor=\"#eaeaea\"><td>$date</td><td>$venue</td><td>$time</td><td>$cost</td><td>$comments</td>";

if ($edit_gig=="1"){
$output.= "<td><a href=\"edit_gig.php?gig_id=$gig_id\">[EDIT]</a></td>";
}

if ($del_gig=="1"){
$output.= "<td><a href=\"del_gig.php?gig_id=$gig_id\">[DELETE] </a></td>";
}

$output.="</tr>";
}

$output.="</table>";

echo "<center> $output </center>";
include "admin_footers.php";
?>
Return current item: Dynamic Band Manager