Example #1
0
 */
function __autoload($class_name)
{
    require_once $class_name . '.php';
}
$connection = new Connection();
$user = new User();
$page = new Webpage("Test View Event", $user);
$event = $page->_GET_checkEventID($_GET['event'], $connection);
if ($event == NULL) {
    exit(0);
}
$page->printEvent($event);
echo "<center>";
echo "<div id=\"addBox\">";
if ($user->is_User()) {
    // figure out if the event is already in the user's schedule
    $eventID = $event->getEventID();
    $userID = $user->get_UserID();
    $query = "\n\t\tSELECT us_eventID \n\t\tFROM userSchedule \n\t\tWHERE us_eventID = {$eventID}\n\t\t\tAND us_userID = {$userID};";
    $connection->query($query);
    if ($connection->result_size() == 0) {
        $page->addURL("addUserEvent.php?event={$eventID}", "Add this event to your schedule.");
        echo "<br><br>";
        $page->addURL("userSchedule.php", "View your schedule.");
    } else {
        echo "This event is in ";
        $page->addURL("userSchedule.php", "your schedule.");
        echo "<br>";
        echo '<span style="font-size: small;">[';
        $page->addURL("deleteUserEvent.php?event={$eventID}", "Remove");
Example #2
0
 *      GNU General Public License for more details.
 *      
 *      You should have received a copy of the GNU General Public License
 *      along with this program; if not, write to the Free Software
 *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 *      MA 02110-1301, USA.
 */
function __autoload($class_name)
{
    require_once $class_name . '.php';
}
$C = new Connection();
$user = new User();
$page = new Webpage("Add User Event", $user);
// make sure the visitor is a forum user
if (!$user->is_User()) {
    $page->printError("You must be a forum user to create your own schedule.");
    echo "<center>";
    $page->addURL("http://www.mewcon.com/forum/index.php", "Go to the forums to Register or Sign In.");
    echo "<br /><br />";
    $page->addURL("index.php", "Return to the event schedule.");
    echo "</center>";
    exit(0);
}
$reqEvent = $page->_GET_checkEventID($_GET['event'], $C);
if (!isset($reqEvent)) {
    exit(0);
}
$uID = $user->get_UserID();
$eID = $reqEvent->getEventID();
// check if we're processing from the conflict resolution form