-
Notifications
You must be signed in to change notification settings - Fork 0
/
ftnav.php~
executable file
·45 lines (40 loc) · 1.22 KB
/
ftnav.php~
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/* File: ftnav.php
Desciption: Implementation file for the navigation of months in the various view.
Author: Eric A. Bonney
Date: February 18, 2009
Updated: October 1, 2009
Modified to work in the stand alone application. Removed WordPress items.
*/
$month = $_GET["month"];
$source = $_GET["source"];
$type = $_GET["type"];
session_start();
//See if we have an authenticated user, if so, setup the appropriate message.
if( isset( $_SESSION["loggedinUserName"] ) )
{
// Set the cookie to where the user wants to actually go.
$_SESSION["nav_month"] = $month;
switch( $source )
{
case "summary":
// re-direct back to the actual page again.
header( "Location: workoutview.php?display=" . $type );
break;
/* case "history":
$page = get_page_by_title( "Fitness Log" );
$url = get_bloginfo(wpurl) . "/?page_id=" . $page->ID;
break;*/
}
}
else
{
//Seems the user has attempted to navigate directly to the dashboard without
//logging in. Send them to the logout page with an error message.
$_SESSION["headerMessage"] = "Error!!";
$_SESSION["message"] = "You must first log into the system before you can view the page.";
// Send user to the logout page.
header( "Location: logout.php" );
exit;
}
?>