<?php //Put non UI logic in a difference file include 'attendance.logic.php'; $lan = new Lan_events(); $success = $lan->get(getCurrentLID()); $state = "notsignedup"; if ($success) { $lan->text = str_replace("\\n", "\n", $lan->text); $lan->text = str_replace("\\r", "\r", $lan->text); $master->Smarty->assign("lan", $lan); $attendees = new Lan_attendees(); $user = new Lan_users(); $attendees->lan_id = getCurrentLID(); $attendees->joinAdd($user); $attendees->orderBy('username'); $attendees->find(); $attendeeslist = array(); while ($attendees->fetch()) { if (streq(getCurrentUID(), $attendees->user_id)) { $state = "signedup"; } $sold = new Lan_addons_sold(); $sold->lan_id = getCurrentLID(); $sold->user_id = $attendees->user_id; $sold->find(); $soldlists = array(); while ($sold->fetch()) { $g = new Lan_addons_groups(); $g->get($sold->addon_id); $soldlists[] = $g->name;