setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $userManager = new \pvv\admin\UserManager($pdo); require_once(__DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php'); $as = new SimpleSAML_Auth_Simple('default-sp'); $as->requireAuth(); $attrs = $as->getAttributes(); $uname = $attrs['uid'][0]; if(!$userManager->hasGroup($uname, 'aktiviteter')){ echo 'Her har du ikke lov\'t\'å\'værra!!!'; exit(); } $customActivity = new \pvv\side\DBActivity($pdo); $new = 0; if(isset($_GET['new'])){ $new = $_GET['new']; } $eventID = 0; if(isset($_GET['id'])){ $eventID = $_GET['id']; }else if($new == 0){ echo "\nID not set"; exit(); } $today = new DateTimeImmutable; $defaultStart = $today->format("Y-m-d H:00:00"); $inOneHour = $today->add(new DateInterval('PT1H')); $defaultEnd = $inOneHour->format("Y-m-d H:00:00"); $event = new \pvv\side\SimpleEvent( 0, 'Kul Hendelse', $today, $inOneHour, 'PVV', 'Norge et sted', 'her skjer det noe altså' ); if($new == 0){ $event = $customActivity->getEventByID($eventID); } ?>
Aktivitets­administrasjon

Tittel

getName(). '" class="boxinput">' ?>

Beskrivelse

Starttid (YYYY-MM-DD HH:MM:SS)

getStart()->format('Y-m-d H:00:00') . '">
' ?>

Sluttid (YYYY-MM-DD HH:MM:SS)

getStop()->format('Y-m-d H:00:00') . '">
' ?>

Organisert av

getOrganiser(). '" class="boxinput">' ?>

Hvor?

getLocation(). '" class="boxinput">' ?>
getID() . '" />' ?>