Browse Source

Merge remote-tracking branch 'origin/master'

master
n0m1s 10 years ago
parent
commit
87c43435b8
3 changed files with 126 additions and 126 deletions
  1. +1
    -1
      about.php
  2. +2
    -2
      event.php
  3. +123
    -123
      index.php

+ 1
- 1
about.php View File

@ -37,7 +37,7 @@
<p>Nathalie Molines, professeur d'Innovation et Politique, pour nous avoir donné l’opportunité de concevoir ce projet ainsi que pour nous avoir conseillé tout au long de sa réalisation.<br/>
Les étudiants du groupe Innovation et Politique, pour nous avoir régulièrement donné leur avis et conseils.<br/>
<br/>
<b>L'équipe Kiwi.</p>
<b>L'équipe Kiwi.</b></p>
</div>
<!-- bring in the google maps library -->


+ 2
- 2
event.php View File

@ -40,7 +40,7 @@ $dtend = strtotime($event['event_dtend']);
$obj = json_decode(file_get_contents($url), true);
$lat = $obj[0]["lat"];
$lng = $obj[0]["lon"];
$urlFrame = 'http://www.openstreetmap.org/export/embed.html?bbox='.$lng.','.$lat.','.$lng.','.$lat.'&layer=mapnik&floor';
$urlFrame = 'https://www.openstreetmap.org/export/embed.html?bbox='.$lng.','.$lat.','.$lng.','.$lat.'&layer=mapnik&floor';
echo '<iframe frameborder="0" scrolling="no"
marginheight="0" marginwidth="0"
src="'.$urlFrame.'" style="width:100%;height:500px;margin-bottom:-30px;"></iframe>';
@ -62,7 +62,7 @@ $dtend = strtotime($event['event_dtend']);
</div>
<!-- bring in the google maps library -->
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script>
</body>
</html>

+ 123
- 123
index.php View File

@ -8,143 +8,143 @@ $db = connect();
initCategories($db);
if(isset($_GET['w'])&&is_numeric($_GET['w']))
$weekOffset = $_GET['w'];
$weekOffset = $_GET['w'];
else
$weekOffset = 0;
$weekOffset = 0;
?>
<!DOCTYPE html>
<html>
<head>
<title>Kiwi Calendar</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="./index.css" />
<link rel="stylesheet" href="./main.css" />
<link rel="icon" type="image/png" href="favicon.png" />
<!--[if IE]><link rel="shortcut icon" type="image/x-icon" href="favicon.ico" /><![endif]-->
</head>
<body>
<header id="title">
<a id="hamburgerButton" href="#"><img alt="menu" src="./images/menu.png" /></a>
<a href="./index.php"><img alt="logo ESIR" src="./images/esir.png" /></a>
<a href="./about.php"><img class="rightLogo" alt="logo Kiwi" src="./images/KiWiCalendar.png" /></a>
</header>
<head>
<title>Kiwi Calendar</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="./index.css" />
<link rel="stylesheet" href="./main.css" />
<link rel="icon" type="image/png" href="favicon.png" />
<!--[if IE]><link rel="shortcut icon" type="image/x-icon" href="favicon.ico" /><![endif]-->
</head>
<body>
<header id="title">
<a id="hamburgerButton" href="#"><img alt="menu" src="./images/menu.png" /></a>
<a href="./index.php"><img alt="logo ESIR" src="./images/esir.png" /></a>
<a href="./about.php"><img class="rightLogo" alt="logo Kiwi" src="./images/KiWiCalendar.png" /></a>
</header>
<nav id="hamburgerMenu">
<a id="ancherESIR" href="#">
<div class="onglet" id="onglet-esir">
Esir
</div>
</a>
<a id="ancherRennes" href="#">
<div class="onglet" id="onglet-ext">
Rennes
</div>
</a>
<div id="container">
<form method="post" id="form-categories" action="./update-categories.php">
<?php
for($tab = 0; $tab < 2; ++$tab)
{
$sous_categories = getSousCategories($db, $tab);
?>
<div id="tab<?php echo $tab; ?>" class="tabContent">
<?php
for($sous_cat_it = 0; $sous_cat_it < count($sous_categories); ++$sous_cat_it)
{
$sous_cat_id = $sous_categories[$sous_cat_it]['sous_cat_id'];
$sous_cat_title = $sous_categories[$sous_cat_it]['sous_cat_title'];
?>
<h2><?php echo $sous_cat_title;?></h2>
<?php
$categories = getCategoriesBySousCategorie($db, $sous_cat_id);
for($cat_it = 0; $cat_it < count($categories); ++$cat_it)
{
$cat_id = $categories[$cat_it]['cat_id'];
$cat_title = $categories[$cat_it]['cat_title'];
?>
<input class="categorie-checkbox" type="checkbox" id="cat_<?php echo $cat_id; ?>" name="cat_<?php echo $cat_id; ?>" <?php if(isset($_SESSION['categorieStatus'][$cat_id]) && $_SESSION['categorieStatus'][$cat_id]) echo 'checked'; ?> />
<label for="cat_<?php echo $cat_id; ?>"><span></span><?php echo $cat_title;?></label><br />
<?php
}
}
?>
</div>
<?php
}
?>
<input type="submit" id="change" value="sauvegarder cat&eacute;gories" />
</form>
<a id="ancherEvent" href="./addEvent.php">
<div class="Button" id="AddEvent">
+ Ajouter un Évènement
</div>
</a>
</div>
</nav>
<nav id="hamburgerMenu">
<a id="ancherESIR" href="#">
<div class="onglet" id="onglet-esir">
Esir
</div>
</a>
<a id="ancherRennes" href="#">
<div class="onglet" id="onglet-ext">
Rennes
</div>
</a>
<div id="container">
<form method="post" id="form-categories" action="./update-categories.php">
<?php
for($tab = 0; $tab < 2; ++$tab)
{
$sous_categories = getSousCategories($db, $tab);
?>
<div id="tab<?php echo $tab; ?>" class="tabContent">
<?php
for($sous_cat_it = 0; $sous_cat_it < count($sous_categories); ++$sous_cat_it)
{
$sous_cat_id = $sous_categories[$sous_cat_it]['sous_cat_id'];
$sous_cat_title = $sous_categories[$sous_cat_it]['sous_cat_title'];
?>
<h2><?php echo $sous_cat_title;?></h2>
<?php
$categories = getCategoriesBySousCategorie($db, $sous_cat_id);
for($cat_it = 0; $cat_it < count($categories); ++$cat_it)
{
$cat_id = $categories[$cat_it]['cat_id'];
$cat_title = $categories[$cat_it]['cat_title'];
?>
<input class="categorie-checkbox" type="checkbox" id="cat_<?php echo $cat_id; ?>" name="cat_<?php echo $cat_id; ?>" <?php if(isset($_SESSION['categorieStatus'][$cat_id]) && $_SESSION['categorieStatus'][$cat_id]) echo 'checked'; ?> />
<label for="cat_<?php echo $cat_id; ?>"><span></span><?php echo $cat_title;?></label><br />
<?php
}
}
?>
</div>
<?php
}
?>
<input type="submit" id="change" value="sauvegarder cat&eacute;gories" />
</form>
<a id="ancherEvent" href="./addEvent.php">
<div class="Button" id="AddEvent">
+ Ajouter un Évènement
</div>
</a>
</div>
</nav>
<div id="calendar">
<?php
$monthDate = strtotime('last monday +'.($weekOffset+3).' weeks');
<div id="calendar">
<?php
$monthDate = strtotime('last monday +'.($weekOffset+3).' weeks');
for($week = $weekOffset; $week < $weekOffset + 5; ++$week)
{
echo('
<ul class="week">');
for($date = strtotime('last monday +'.$week.' weeks');
$date < strtotime('next monday +'.$week.' weeks');
$date = strtotime('+1 day', $date)
)
{
$events = getEventsByDateAndCategories($db, $date, $_SESSION['categorieStatus']);
for($week = $weekOffset; $week < $weekOffset + 5; ++$week)
{
echo('
<ul class="week">');
for($date = strtotime('last monday +'.$week.' weeks');
$date < strtotime('next monday +'.$week.' weeks');
$date = strtotime('+1 day', $date)
)
{
$events = getEventsByDateAndCategories($db, $date, $_SESSION['categorieStatus']);
$class = '';
if(date('m', $date) != date('m', $monthDate))
$class .= ' otherMonth';
$class = '';
if(date('m', $date) != date('m', $monthDate))
$class .= ' otherMonth';
if(date('Y-m-d', $date) == date('Y-m-d'))
$class .= ' today';
if(date('Y-m-d', $date) == date('Y-m-d'))
$class .= ' today';
echo('
<li class="day'.$class.'">
<a href="./day.php?date='.date('Y-m-d', $date) .'">
<h2>
<span class="minititle left">'.$days[date("N",$date)].'</span>
'.date("d", $date));
if(date('m', $date) != date('m', $monthDate))
echo('<span class="minititle right">/'.date("m",$date).'</class>');
echo('
</h2>
</a>
<ul>');
echo('
<li class="day'.$class.'">
<a href="./day.php?date='.date('Y-m-d', $date) .'">
<h2>
<span class="minititle left">'.$days[date("N",$date)].'</span>
'.date("d", $date));
if(date('m', $date) != date('m', $monthDate))
echo('<span class="minititle right">/'.date("m",$date).'</span>');
echo('
</h2>
</a>
<ul>');
foreach($events as $event)
echo('<li class="calendar-link"><a href="./event.php?id='.$event['event_id'].'">'.$event['event_title']."</a></li>");
echo('
</ul>
</li>');
}
echo('
</ul>'."\n");
}
?>
foreach($events as $event)
echo('<li class="calendar-link"><a href="./event.php?id='.$event['event_id'].'">'.$event['event_title']."</a></li>");
echo('
</ul>
</li>');
}
echo('
</ul>'."\n");
}
?>
<div id="footer">
<div id="TextFooter">
<div id="exMois">
<a id="ancherMore" href="./index.php?w=<?php echo($weekOffset - 1); ?>"><img id="exMore" alt="expand less" src="images/expand_less.png" /></a>
<div id="Mois"><?php echo($months[date('n',$monthDate)].' '.date('Y',$monthDate)); ?></div>
<a id="ancherLess" href="./index.php?w=<?php echo($weekOffset + 1); ?>"><img id="exLess" alt="expand more" src="images/expand_more.png" /></a>
</div>
<div id="Export"><a href="./export.php?w=<?php echo($weekOffset); ?>">Exporter (iCal)</a></div>
</div>
<div>
</div>
<script src="hamburger.js"></script>
<script src="categories.js"></script>
</body>
</html>
<div id="footer">
<div id="TextFooter">
<div id="exMois">
<a id="ancherMore" href="./index.php?w=<?php echo($weekOffset - 1); ?>"><img id="exMore" alt="expand less" src="images/expand_less.png" /></a>
<div id="Mois"><?php echo($months[date('n',$monthDate)].' '.date('Y',$monthDate)); ?></div>
<a id="ancherLess" href="./index.php?w=<?php echo($weekOffset + 1); ?>"><img id="exLess" alt="expand more" src="images/expand_more.png" /></a>
</div>
<div id="Export"><a href="./export.php?w=<?php echo($weekOffset); ?>">Exporter (iCal)</a></div>
</div>
</div>
</div>
<script src="hamburger.js"></script>
<script src="categories.js"></script>
</body>
</html>

Loading…
Cancel
Save