2016-08-18 22:43:32 +02:00
|
|
|
<?php
|
|
|
|
date_default_timezone_set('Europe/Oslo');
|
2016-08-19 22:01:25 +02:00
|
|
|
setlocale(LC_ALL, 'no_NO');
|
2017-11-11 15:20:58 +01:00
|
|
|
require __DIR__ . '/../inc/navbar.php';
|
2016-08-26 17:22:11 +02:00
|
|
|
require __DIR__ . '/../src/_autoload.php';
|
|
|
|
require __DIR__ . '/../sql_config.php';
|
2017-10-28 17:19:40 +02:00
|
|
|
|
2016-08-26 17:29:09 +02:00
|
|
|
$translation = ['i dag', 'i morgen', 'denne uka', 'neste uke', 'denne måneden', 'neste måned'];
|
2016-08-18 23:17:24 +02:00
|
|
|
$pdo = new \PDO($dbDsn, $dbUser, $dbPass);
|
|
|
|
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
|
|
|
$agenda = new \pvv\side\Agenda([
|
|
|
|
new \pvv\side\social\NerdepitsaActivity,
|
|
|
|
new \pvv\side\social\AnimekveldActivity,
|
|
|
|
new \pvv\side\DBActivity($pdo),
|
2017-10-28 17:19:40 +02:00
|
|
|
]);
|
|
|
|
?>
|
2017-11-13 13:21:51 +01:00
|
|
|
|
2016-08-19 22:00:46 +02:00
|
|
|
<!DOCTYPE html>
|
2016-08-18 00:25:47 +02:00
|
|
|
<html lang="no">
|
2017-11-13 13:21:51 +01:00
|
|
|
<head>
|
|
|
|
<title>Programvareverkstedet</title>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
|
|
|
<link rel="stylesheet" href="css/normalize.css">
|
|
|
|
<link rel="stylesheet" href="css/style.css">
|
|
|
|
<link rel="stylesheet" href="css/splash.css">
|
|
|
|
<link rel="stylesheet" href="css/landing.css">
|
|
|
|
</head>
|
2016-08-15 17:43:41 +02:00
|
|
|
|
2017-11-13 13:21:51 +01:00
|
|
|
<body>
|
|
|
|
<nav>
|
|
|
|
<?php echo navbar(0, ''); ?>
|
|
|
|
<?php echo loginbar(); ?>
|
|
|
|
</nav>
|
2016-08-15 17:43:41 +02:00
|
|
|
|
2017-11-13 13:21:51 +01:00
|
|
|
<header>
|
|
|
|
<img src="css/pvv-background.png"/>
|
2017-11-13 14:18:08 +01:00
|
|
|
<div class="info">
|
2017-11-13 14:20:07 +01:00
|
|
|
<h2>Velkommen til Programvare­verkstedet</h2>
|
|
|
|
<p>Programvareverkstedet (PVV) er en studentorganisasjon ved NTNU som vil skape et miljø for datainteresserte personer tilknyttet universitetet.</p>
|
|
|
|
<p>Nåværende og tidligere studenter ved NTNU, samt ansatte ved NTNU og tilstøtende miljø, kan bli medlemmer.</p>
|
2017-11-13 13:21:51 +01:00
|
|
|
<ul class="essentials">
|
|
|
|
<a class="btn" href="om/"><li>Om PVV</li></a>
|
|
|
|
<a class="btn join" href="paamelding/"><li>Bli medlem</li></a>
|
|
|
|
<a class="btn" href="https://use.mazemap.com/?v=1&left=10.4032&right=10.4044&top=63.4178&bottom=63.4172&campusid=1&zlevel=2&sharepoitype=point&sharepoi=10.40355%2C63.41755%2C2&utm_medium=longurl"><li>Veibeskrivelse</li></a>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2017-11-13 14:18:08 +01:00
|
|
|
</header>
|
2016-08-15 17:43:41 +02:00
|
|
|
|
2017-11-13 14:18:08 +01:00
|
|
|
<main>
|
2017-11-13 13:21:51 +01:00
|
|
|
<h2>Kommende arrangement</h2>
|
|
|
|
<ul class="calendar-events">
|
|
|
|
<?php $counter1 = 0; ?>
|
|
|
|
<?php $counter2 = 0; ?>
|
|
|
|
<?php foreach($agenda->getNextDays() as $period => $events) if ($events && $counter1 < 2 && $counter2 < 10) { $counter1++ ?>
|
|
|
|
<li>
|
|
|
|
<p><?= $translation[$period] ?></p>
|
|
|
|
<ul>
|
|
|
|
<?php foreach($events as $event) { $counter2++ ?>
|
|
|
|
<li>
|
|
|
|
<a href="<?= htmlspecialchars($event->getURL()) ?>"><?= $event->getName(); ?></a>
|
|
|
|
<?php /* <a class="icon subscribe">+</a> */ ?>
|
|
|
|
<?php if ($period !== \pvv\side\Agenda::TODAY) {
|
|
|
|
echo '<span class="time">' . $event->getStart()->format('H:i') . '</span>';
|
|
|
|
if (\pvv\side\Agenda::isThisWeek($event->getStart()) || $event->getStart()->sub(new DateInterval('P3D'))->getTimestamp() < time()) {
|
|
|
|
echo '<span class="date">' . strftime('%a', $event->getStart()->getTimestamp()) . '</span>';
|
|
|
|
} else {
|
|
|
|
echo '<span class="date">' . strftime('%e. %b', $event->getStart()->getTimestamp()) . '</span>';
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
echo '<span class="time">' . $event->getStart()->format('H:i') . '</span>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</li>
|
|
|
|
<?php } ?>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<?php } ?>
|
|
|
|
</ul>
|
|
|
|
<p><a class="btn" href="kalender/">Flere aktiviteter</a></p>
|
2016-08-15 17:43:41 +02:00
|
|
|
|
2017-11-13 13:21:51 +01:00
|
|
|
<h2>Opptak</h2>
|
|
|
|
<p>
|
|
|
|
Alle med tilknytning til NTNU kan bli medlem hos oss
|
|
|
|
og benytte seg av våre ressurser.
|
|
|
|
<!--
|
|
|
|
For å bli med i våre prosjekter og komitéer må du søke.
|
|
|
|
-->
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<a class="btn" href="paamelding/">Bli medlem</a>
|
|
|
|
<!--
|
|
|
|
<a class="btn" href="prosjekt/">Søk prosjekt</a>
|
|
|
|
<a class="btn" href="prosjekt/">Søk komité</a>
|
|
|
|
-->
|
|
|
|
</p>
|
|
|
|
</main>
|
|
|
|
</body>
|
|
|
|
</html>
|