Exemple #1
0
<?php

if (isset($_GET["imgid"])) {
    $game = new Lan_games();
    if (1 == $game->get($game->escape($_GET["imgid"]))) {
        echo Config::$webPath . "images/games/" . $game->picture;
    }
}
die;
Exemple #2
0
 if (isset($_POST["id"])) {
     $form = parseForm($_POST["id"]);
 } else {
     $form = parseForm();
 }
 $form->details = stripslashes($form->details);
 $master->Smarty->assign("event", $form);
 if (isset($_POST["delete"])) {
     $form->delete();
     header('Location: intranet.php?p=timetable');
     die;
 } else {
     if (streq($_POST["submitBtn"], "Update")) {
         //Update or switch type
         $game = new Lan_games();
         if (isset($_POST["game"]) && 1 == $game->get($game->escape($_POST["game"]))) {
             $master->Smarty->assign("image", "images/games/" . $game->picture);
             $logoAssigned = true;
         } else {
             $master->Smarty->assign("image", "images/games/other.png");
         }
         setupLanTime("when", strtotime($form->occurs), $master->Smarty);
         $userlist = array();
         $user = new Lan_users();
         $attendees = new Lan_attendees();
         $lanid = getCurrentLID();
         $user->query("SELECT user_id,username FROM {$user->__table}  WHERE {$user->__table}.user_id IN (SELECT user_id FROM {$attendees->__table} WHERE `lan_id` = '{$lanid}') ORDER BY user_id");
         while ($user->fetch()) {
             $userlist[] = clone $user;
         }
         $master->Smarty->assign("userlist", $userlist);