forked from cfinke/anyInventory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
executable file
·108 lines (102 loc) · 4.76 KB
/
header.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
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title><?php echo APP_TITLE.': '.$title; ?></title>
<link rel="stylesheet" type="text/css" href="<?php echo $DIR_PREFIX; ?>style.css">
<?php echo $inHead; ?>
</head>
<body<?php echo $inBodyTag; ?>>
<table style="width: 99%; margin: 5px; background-color: #ffffff;" cellspacing="0">
<tr>
<td>
<table cellspacing="0">
<tr>
<td id="appTitle">
<?php echo APP_TITLE; ?> 2.0
</td>
<td>
<?php
if (isset($_SESSION["user"]["id"])){
echo '
<td style="width: 5%; text-align: center; vertical-align: middle; white-space: nowrap;">[ <a href="'.$DIR_PREFIX.'login_processor.php?action=log_out">'.LOG_OUT.'</a> ]</td>';
}
elseif (!isset($_SESSION["user"]["id"]) && PP_ADMIN){
echo '
<td style="width: 5%; text-align: center; vertical-align: middle; white-space: nowrap;">[ <a href="'.$DIR_PREFIX.'login.php?return_to='.$_SERVER["PHP_SELF"].'">'.LOGIN.'</a> ]</td>';
}
?>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td id="mainMenu">
<table>
<tr>
<?php
if (isset($_SESSION["user"]["id"]) || !PP_VIEW){
echo '
<td style="width: 5%; text-align: center; vertical-align: middle;"><a href="'.$DIR_PREFIX.'index.php">'.HOME.'</a></td>
<td style="width: 5%; text-align: center; vertical-align: middle;"><a href="'.$DIR_PREFIX.'labels.php">'.LABELS.'</a></td>';
}
else{
echo '
<td style="width: 5%; text-align: center; vertical-align: middle;"><a href="'.$DIR_PREFIX.'index.php">'.HOME.'</a></td>';
}
?>
<td style="width: 5%; text-align: center; vertical-align: middle;"><a href="<?php echo $DIR_PREFIX; ?>docs/index.php"><?php echo HELP; ?></a></td>
<?php
if (isset($_SESSION["user"]["id"]) || !PP_ADMIN){
if (PP_ADMIN || PP_VIEW){
echo '
<td style="width: 10%; text-align: right; vertical-align: middle;"><a href="'.$DIR_PREFIX.'admin/index.php">'.ADMINISTRATION.'</a>:</td>
<td style="width: 5%; text-align: center; vertical-align: middle;"><a href="'.$DIR_PREFIX.'admin/fields.php">'.FIELDS.'</a></td>
<td style="width: 5%; text-align: center; vertical-align: middle;"><a href="'.$DIR_PREFIX.'admin/categories.php">'.CATEGORIES.'</a></td>
<td style="width: 5%; text-align: center; vertical-align: middle;"><a href="'.$DIR_PREFIX.'admin/items.php">'.ITEMS.'</a></td>
<td style="width: 5%; text-align: center; vertical-align: middle;"><a href="'.$DIR_PREFIX.'admin/alerts.php">'.ALERTS.'</a></td>
<td style="width: 5%; text-align: center; vertical-align: middle;"><a href="'.$DIR_PREFIX.'admin/users.php">'.USERS.'</a></td>';
}
else{
echo '
<td style="width: 15%; text-align: right; vertical-align: middle;"><a href="'.$DIR_PREFIX.'admin/index.php">'.ADMINISTRATION.'</a>:</td>
<td style="width: 5%; text-align: center; vertical-align: middle;"><a href="'.$DIR_PREFIX.'admin/fields.php">'.FIELDS.'</a></td>
<td style="width: 5%; text-align: center; vertical-align: middle;"><a href="'.$DIR_PREFIX.'admin/categories.php">'.CATEGORIES.'</a></td>
<td style="width: 5%; text-align: center; vertical-align: middle;"><a href="'.$DIR_PREFIX.'admin/items.php">'.ITEMS.'</a></td>
<td style="width: 5%; text-align: center; vertical-align: middle;"><a href="'.$DIR_PREFIX.'admin/alerts.php">'.ALERTS.'</a></td>';
}
}
else{
echo '
<td style="width: 50%; text-align: right; vertical-align: middle;"><a href="'.$DIR_PREFIX.'admin/index.php">'.ADMINISTRATION.'</a></td>';
}
?>
<td style="width: 25%; text-align: right; vertical-align: middle;" class="submitButtonRow">
<form action="<?php echo $DIR_PREFIX; ?>search.php" method="get">
<input type="hidden" name="action" value="quick_search" />
<?php
if (isset($_SESSION["user"]["id"]) || !PP_VIEW){
echo '
<input type="text" name="q" id="q" />
<input type="submit" value="'.SEARCH.'" />';
}
else{
echo '
<input type="text" name="q" id="q" disabled="disabled" />
<input type="submit" value="'.SEARCH.'" disabled="disabled" />';
}
?>
</form>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td id="breadCrumbs">
<?php echo $breadcrumbs; ?>
</td>
</tr>
<tr>
<td>
<div style="min-height: 400px; padding: 5px;">