-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathabout.php~
More file actions
64 lines (59 loc) · 2.19 KB
/
about.php~
File metadata and controls
64 lines (59 loc) · 2.19 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/* File: about.php
Desciption: Implementation file for the about page.
Author: Eric A. Bonney
Date: September 25, 2009
Updated:
*/
require_once "HTML/Template/IT.php";
// Create the template and load the correct template file.
$template = new HTML_Template_IT( "./templates" );
$template->loadTemplatefile( "about.tpl", true, true );
session_start();
//See if we have an authenticated user, if so, setup the appropriate message.
if( isset( $_SESSION["loggedinUserName"] ) )
{
//Populate the navigation menu correcltly.
$template->setCurrentBlock( "NAVIGATIONMENU" );
$template->setVariable( "PAGE", "dashboard.php" );
$template->setVariable( "TITLE", "Home" );
$template->parseCurrentBlock();
$template->setVariable( "PAGE", "settings.php" );
$template->setVariable( "TITLE", "Settings" );
$template->parseCurrentBlock();
$template->setVariable( "PAGE", "reports.php" );
$template->setVariable( "TITLE", "Reports" );
$template->parseCurrentBlock();
$template->setVariable( "PAGE", "workoutview.php" );
$template->setVariable( "TITLE", "Work Outs" );
$template->parseCurrentBlock();
$template->setVariable( "PAGE", "routes.php" );
$template->setVariable( "TITLE", "Routes" );
$template->parseCurrentBlock();
$template->setVariable( "PAGE", "trainingplans.php" );
$template->setVariable( "TITLE", "Training Plans" );
$template->parseCurrentBlock();
$template->setVariable( "PAGE", "downloads.php" );
$template->setVariable( "TITLE", "downloads" );
$template->parseCurrentBlock();
$template->setVariable( "PAGE", "about.php" );
$template->setVariable( "TITLE", "About Fitness Log" );
$template->parseCurrentBlock();
$template->setVariable( "PAGE", "logout.php" );
$template->setVariable( "TITLE", "Log Out" );
$template->parseCurrentBlock();
}
else
{
//User is not logged in yet, so setup the proper navigation menu.
$template->setCurrentBlock( "NAVIGATIONMENU" );
$template->setVariable( "PAGE", "index.html" );
$template->setVariable( "TITLE", "Home" );
$template->parseCurrentBlock();
$template->setVariable( "PAGE", "about.php" );
$template->setVariable( "TITLE", "About Fitness Log" );
$template->parseCurrentBlock();
}
//Show the user's Dashboard page.
$template->show();
?>