Browse Source

moved day and months arrays to a separate file

master
n0m1s 10 years ago
parent
commit
c0024459d8
2 changed files with 37 additions and 24 deletions
  1. +36
    -0
      datetimeOperations.php
  2. +1
    -24
      index.php

+ 36
- 0
datetimeOperations.php View File

@ -0,0 +1,36 @@
<?php
$days = array(
1 => htmlentities("Lun"),
2 => htmlentities("Mar"),
3 => htmlentities("Mer"),
4 => htmlentities("Jeu"),
5 => htmlentities("Ven"),
6 => htmlentities("Sam"),
7 => htmlentities("Dim")
);
$daysFull = array(
1 => htmlentities("Lundi"),
2 => htmlentities("Mardi"),
3 => htmlentities("Mercredi"),
4 => htmlentities("Jeudi"),
5 => htmlentities("Vendredi"),
6 => htmlentities("Samedi"),
7 => htmlentities("Dimamche")
);
$months = array(
1 => htmlentities("Janvier"),
2 => htmlentities("Fevrier"),
3 => htmlentities("Mars"),
4 => htmlentities("Avril"),
5 => htmlentities("Mai"),
6 => htmlentities("Juin"),
7 => htmlentities("Juillet"),
8 => htmlentities("Août"),
9 => htmlentities("Septembre"),
10 => htmlentities("Octobre"),
11 => htmlentities("Novembre"),
12 => htmlentities("Décembre")
);
?>

+ 1
- 24
index.php View File

@ -1,32 +1,9 @@
<?php <?php
session_start(); session_start();
include_once('databaseOperations.php'); include_once('databaseOperations.php');
include_once('datetimeOperations.php');
$db = connect(); $db = connect();
$days = array(
1 => "Lun",
2 => "Mar",
3 => "Mer",
4 => "Jeu",
5 => "Ven",
6 => "Sam",
7 => "Dim"
);
$months = array(
1 => "Janvier",
2 => "Fevrier",
3 => "Mars",
4 => "Avril",
5 => "Mai",
6 => "Juin",
7 => "Juillet",
8 => "Ao&ucirc;t",
9 => "Septembre",
10 => "Octobre",
11 => "Novembre",
12 => "Decembre"
);
if(isset($_GET['w'])&&is_numeric($_GET['w'])) if(isset($_GET['w'])&&is_numeric($_GET['w']))
$weekOffset = $_GET['w']; $weekOffset = $_GET['w'];
else else


Loading…
Cancel
Save