-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.php
More file actions
executable file
·92 lines (80 loc) · 2.39 KB
/
Copy pathindex.php
File metadata and controls
executable file
·92 lines (80 loc) · 2.39 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?php
/**
* Filename: index.php
* Function: This file is the main root file for phpDivingLog.
* @author Lloyd Borrett - www.borrett.id.au ; Rob Lensen <rob@bsdfreaks.nl>
* @license LGPL v3 http://www.gnu.org/licenses/lgpl-3.0.txt
* @package phpdivinglog
* @version $Rev$
* Last Modified: $Date$
*
* @copyright (C) 2006 Lloyd Borrett - http://www.borrett.id.au
*
* Adapted from code by Olaf van Zandwijk - http://enschede.vanzandwijk.net
*
* For use with Diving Log by Sven Knoch - http://www.divinglog.de
*
*/
$config_file = "./config.inc.php";
require_once ($config_file);
$request = new HandleRequest();
$request->set_request_uri($_SERVER['REQUEST_URI']);
$request->set_file_depth(0);
$request->handle_url();
$links = new TopLevelMenu($request);
/**
* Create a new class Divelog with info from the HandleRequest class
*/
$divelog = new Divelog();
$divelog->set_divelog_info($request);
$result = $divelog->get_divelog_info();
global $_config;
if ($divelog->get_request_type() == 1) {
// We have a dive number, so display the dive details
$links->get_std_links();/*{{{*/
$links->get_nav_links($request );
// Get the page header
$pagetitle = $_lang['dive_details_pagetitle'].$result['Number'];
$t->assign('colspanlinks','5');
//include($_config['header']);
// Show Dive Information
// Show main dive details
$divelog->set_main_dive_details();
// Show buddy details
$divelog->set_buddy_details();
// Dive Pictures
$divelog->set_dive_pictures();
// Dive Profile
$divelog->set_dive_profile();
// Conditions
$divelog->set_dive_conditions();
// Breath details
$divelog->set_breathing_details();
//Dive details
$divelog->set_dive_details();
// Equipment
$divelog->set_equipment();
// Comments
$divelog->set_comments();
// Userdefined
$divelog->set_userdefined();
$t->assign('links',$links);/*}}}*/
} elseif($divelog->get_request_type() == 0) {
$links->get_ovv_links();
$divelog->get_dive_overview();
} else {
echo "shouldn't come here!";
exit;
}
// Get the page footer
//include ($_config['footer_index']);
$t->assign('colspanlinks','5');
if($_config['embed_mode'] == TRUE){
// Get the HTML output and send it to the requesting
include('header.php');
$output = $t->fetch('index.tpl');
echo $output;
include('footer.php');
} else {
$t->display('index.tpl');
}