-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
157 lines (105 loc) · 3.29 KB
/
index.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?PHP
session_start();
include("libstd.php");
$_JS=1;
?>
<html>
<head>
<TITLE>OpenThesaurus</TITLE>
<link rel='stylesheet' type='text/css' href='default.css'>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script language="JavaScript" src="libjava.js"></script>
<script type="text/javascript" src="javascript/overlib.js"><!-- overLIB (c) Erik Bosrup --></script>
<noscript><?PHP $_JS=0; ?></noscript>
</head>
<body <?PHP
if ($_GET[action] == "showhyrarchy"
or $_GET[action] == "open"
or $_GET[action] == "close"
)
{
$string = ""#anchor" . $id . """;
echo "onload='location.href = $string';";
}
?>>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>
<?PHP
//echoalert($_JS);
// connect database
$daba = new database();
$daba->connect("localhost","","");
$daba->select("thesaurus");
// open thesaurus
$display = new hyrarchy;
// call actions
action($_GET);
if (right::link()) thesaurus::validate();
// show login or logged user
user::show();
//----------------------------------
// headline
if (system::getval(debug) and !user::superuser()) echo "<div id='alert' class='big'>Die Seite steht derzeit wegen Wartungsarbeiten nicht zur Verfügung.</div>";
else
{
?>
<div id='header'>
<a href='index.php'>OpenThesaurus</a><br>
<?PHP
// show count of entries
echo " <i class='normal'>(";
echo database::count() . " Einträge mit ";
echo database::linkcount() . " Verknüpfungen";
echo ")</i>";
?>
</div>
<div id='status'>V2.3 - Thomas H Winkler - 2010-2011</div>
<?PHP
if (right::read())
{
// Insert values into database
$mandatory = array("name");
$errorArray = database::insert($_GET,$mandatory);
$errorArray = $display->set_default($errorArray,$mandatory);
//------------------------------------------------------------------------------
// Form fields
if (session::get("hyrarchy")) echo "<div id='info' class='info'>"; // small info windos
else echo "<div id='infobig' class='info'>"; // big info window
form::insert_entry($_GET,$errorArray);
echo "</div>";
if (session::get("show"))
{
if (session::get("hyrarchy")) echo "<div id='info' class='info'>";
else echo "<div id='infobig' class='info'>";
form::update_entry($_GET,$errorArray);
echo "</div>";
}
//------------------------------------------------------------------------------
// display hyrarchy list
if (session::get("hyrarchy"))
{
echo "<div id='hyrarchy'>";
$display->header();
$display->display(0,-1,0,$errorArray); //thesaurus-resource, parent, depth, position
echo "</div>";
}
//------------------------------------------------------------------------------
// search field
$searchResult = search::get(session::get(search));
// display search result
if (!session::get(searchshow)) unset($searchResult); // clear serach string if nothing new
if (count($searchResult) > 0 and session::get(searchshow))
{
// display search window
search::display($searchResult);
}
// display search formular
search::form(session::get(search));
}
else
{
form::standard();
}
}
?>
</body>
</html>