Esempio n. 1
0
<body>
<?php 
include "header.php";
include "sidebar.php";
?>

<?php 
include_once "class.inc.php";
if (isset($_GET['id'])) {
    echo '<div id="center"><center><table width="60%">';
    $c = new Catagory();
    $c->setId($_GET['id']);
    $cinfo = $c->getInfo($_GET['id']);
    $events = $c->getEvents();
    $e = new Event();
    echo '<tr><td>Catagory </td><td><b>', $c->escape(ucwords($cinfo['name'])), '</b></td></tr><tr><td>Info</td><td>', $c->escape($cinfo['info']), '</td></tr><tr><td>Catagory Head(s) </td><td>';
    $count = 0;
    $cheads = $c->getHeads();
    foreach ($cheads as $chead) {
        if ($count) {
            echo ", ";
        }
        echo "<a href='head.php?id={$chead['userid']}'>", $c->escape($chead['name']), "</a>";
        $count++;
    }
    echo '</td></tr><tr><td><br><br></td></tr';
    foreach ($events as $event) {
        $e->setId($event['eventid']);
        echo '<tr><td>Event</td><td><b>', $e->escape($event['name']), '</b></td></tr><tr><td>Info</td><td>', $e->escape($event['info']), '</td></tr><tr><td>Event Head(s) </td><td>';
        $heads = $e->getHeads("head");
        //event heads