Prepare for merge
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
date_default_timezone_set('Europe/Oslo');
|
||||
setlocale(LC_ALL, 'no_NO');
|
||||
setlocale(LC_ALL, 'nb_NO');
|
||||
require __DIR__ . '/../../inc/navbar.php';
|
||||
require __DIR__ . '/../../src/_autoload.php';
|
||||
require __DIR__ . '/../../sql_config.php';
|
||||
|
@@ -1,13 +1,7 @@
|
||||
<?php
|
||||
error_reporting(E_ALL);
|
||||
date_default_timezone_set('Europe/Oslo');
|
||||
require __DIR__ . '/../../inc/navbar.php';
|
||||
require __DIR__ . '/../../src/_autoload.php';
|
||||
require __DIR__ . '/../../sql_config.php';
|
||||
require_once dirname(dirname(__DIR__)) . implode(DIRECTORY_SEPARATOR, ['', 'inc', 'include.php']);
|
||||
|
||||
$translation = ['i dag', 'i morgen', 'denne uka', 'neste uke', 'denne måneden', 'neste måned'];
|
||||
$pdo = new \PDO($dbDsn, $dbUser, $dbPass);
|
||||
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$projectManager = new \pvv\side\ProjectManager($pdo);
|
||||
$projects = $projectManager->getAll();
|
||||
?>
|
||||
@@ -22,7 +16,7 @@ $projects = $projectManager->getAll();
|
||||
<link rel="stylesheet" href="../css/style.css">
|
||||
<link rel="stylesheet" href="../css/nav.css">
|
||||
<link rel="stylesheet" href="../css/splash.css">
|
||||
<link rel="stylesheet" href="../css/projects.css"
|
||||
<link rel="stylesheet" href="../css/projects.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -64,7 +58,6 @@ $projects = $projectManager->getAll();
|
||||
</div>
|
||||
<p class="project-organizer">Organisert av<br><?= $project->getOwner(); ?></p>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
<?php
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
date_default_timezone_set('Europe/Oslo');
|
||||
setlocale(LC_ALL, 'no_NO');
|
||||
setlocale(LC_ALL, 'nb_NO');
|
||||
require __DIR__ . '/../../inc/navbar.php';
|
||||
require __DIR__ . '/../../src/_autoload.php';
|
||||
require __DIR__ . '/../../sql_config.php';
|
||||
@@ -39,80 +39,78 @@ $projects = array_values(array_filter(
|
||||
));
|
||||
?>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="stylesheet" href="../css/normalize.css">
|
||||
<link rel="stylesheet" href="../css/style.css">
|
||||
<link rel="stylesheet" href="../css/nav.css">
|
||||
<link rel="stylesheet" href="../css/splash.css">
|
||||
<link rel="stylesheet" href="../css/admin.css">
|
||||
</head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="stylesheet" href="../css/normalize.css">
|
||||
<link rel="stylesheet" href="../css/style.css">
|
||||
<link rel="stylesheet" href="../css/events.css">
|
||||
<link rel="stylesheet" href="../css/admin.css">
|
||||
|
||||
<body>
|
||||
<nav>
|
||||
<?php echo navbar(1, 'prosjekt'); ?>
|
||||
<?php echo loginbar(); ?>
|
||||
</nav>
|
||||
<header>Prosjekt­verkstedet</header>
|
||||
|
||||
<main>
|
||||
<main>
|
||||
|
||||
<article class="gridsplit">
|
||||
<div class="gridl">
|
||||
<h2 class="no-chin">Mine Prosjekter</h2>
|
||||
<hr class="ruler">
|
||||
|
||||
<div class="gridsplit">
|
||||
<div class="gridl">
|
||||
<ul class="event-list">
|
||||
<?php
|
||||
$counter = 0;
|
||||
$pageLimit = 4;
|
||||
<ul class="event-list">
|
||||
<?php
|
||||
$counter = 0;
|
||||
$pageLimit = 4;
|
||||
|
||||
for($i = ($pageLimit * ($page - 1)); $i < count($projects); $i++){
|
||||
if($counter == $pageLimit){
|
||||
break;
|
||||
}
|
||||
|
||||
$project = $projects[$i];
|
||||
$projectID = $project->getID();
|
||||
?>
|
||||
|
||||
<li>
|
||||
<div class="event">
|
||||
<div class="event-info">
|
||||
<h3 class="no-chin"><?= '<a href="edit.php?id=' . $project->getID() . '">' . $project->getName() . '</a>'; ?></h3>
|
||||
<p><?= implode($project->getDescription(), "<br>"); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<?php
|
||||
$counter++;
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
|
||||
<?php
|
||||
if($page != 1){
|
||||
echo '<a class="btn float-left" href="?page=' . ($page - 1) . '">Forrige side</a>';
|
||||
for($i = ($pageLimit * ($page - 1)); $i < count($projects); $i++){
|
||||
if($counter == $pageLimit){
|
||||
break;
|
||||
}
|
||||
|
||||
if(($counter == $pageLimit) and (($pageLimit * $page) < count($projects))){
|
||||
echo '<a class="btn float-right" href="?page=' . ($page + 1) . '">Neste side</a>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
$project = $projects[$i];
|
||||
$projectID = $project->getID();
|
||||
?>
|
||||
|
||||
<div class="gridr">
|
||||
<h2>Verktøy</h2>
|
||||
<a class="btn" href="edit.php?new=1">Lag prosjekt</a>
|
||||
<h2>Filter</h2>
|
||||
<form action="." method="post">
|
||||
<p class="no-chin">Navn</p>
|
||||
<?= '<input type="text" name="title" class="boxinput" value="' . $filterTitle . '">' ?><br>
|
||||
|
||||
<div style="margin-top: 2em;">
|
||||
<input type="submit" class="btn" value="Filtrer"></input>
|
||||
<li>
|
||||
<div class="event">
|
||||
<div class="event-info">
|
||||
<h3 class="no-chin"><?= '<a href="edit.php?id=' . $project->getID() . '">' . $project->getName() . '</a>'; ?></h3>
|
||||
<p><?= $project->getDescription(); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</li>
|
||||
|
||||
<?php
|
||||
$counter++;
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
|
||||
<?php
|
||||
if($page != 1){
|
||||
echo '<a class="btn float-left" href="?page=' . ($page - 1) . '">Forrige side</a>';
|
||||
}
|
||||
|
||||
if(($counter == $pageLimit) and (($pageLimit * $page) < count($projects))){
|
||||
echo '<a class="btn float-right" href="?page=' . ($page + 1) . '">Neste side</a>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="gridr">
|
||||
<h2>Verktøy</h2>
|
||||
<a class="btn" href="edit.php?new=1">Lag prosjekt</a>
|
||||
<h2>Filter</h2>
|
||||
<form action="." method="post">
|
||||
<p class="no-chin">Navn</p>
|
||||
<?= '<input type="text" name="title" class="boxinput" value="' . $filterTitle . '">' ?><br>
|
||||
|
||||
<div style="margin-top: 2em;">
|
||||
<input type="submit" class="btn" value="Filtrer"></input>
|
||||
</div>
|
||||
</div class="gridsplit">
|
||||
</main>
|
||||
</body>
|
||||
</form>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
</main>
|
||||
|
||||
<nav>
|
||||
<?= navbar(1, 'prosjekt'); ?>
|
||||
<?= loginbar(); ?>
|
||||
</nav>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
date_default_timezone_set('Europe/Oslo');
|
||||
setlocale(LC_ALL, 'no_NO');
|
||||
setlocale(LC_ALL, 'nb_NO');
|
||||
require __DIR__ . '/../../src/_autoload.php';
|
||||
require __DIR__ . '/../../sql_config.php';
|
||||
$pdo = new \PDO($dbDsn, $dbUser, $dbPass);
|
||||
|
Reference in New Issue
Block a user