-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
67 lines (58 loc) · 1.69 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
<?php
# index.php - a trilug membership list
# Copyright (c) 2000 Eric Lease Morgan <[email protected]>
# Licensed under the GNU GPLv3 (http://www.gnu.org/licenses/gpl-3.0.html)
# Include non-version-controlled configuration file
include("config.inc");
# let's get started; no editing should be necessary below this line
include("php4-1-1_varfix.php");
# open a connection to the database server
$db_conn = mysql_connect("$gDbHost","$gUsername","$gPassword") or
die("Cound not open database : ".mysql_error());
$the_db = mysql_select_db("$gDatabase",$db_conn) or
die("Mysql Error : ".mysql_error());
# display the header
include "header.inc";
echo "<!-- the command is : $cmd -->\n";
# process the command
if (! $cmd) {
# display the home page
include "./home.inc";
}
elseif ($cmd == "add") {
include "add.php";
}
elseif ($cmd == "displayall") {
include "./displayall.php";
}
elseif ($cmd == "displayone") {
include "displayone.php";
}
elseif ($cmd == "delete") {
include "delete.php";
}
elseif ($cmd == "edit") {
include "edit.php";
}
elseif ($cmd == "search") {
include "search.php";
}
elseif ($cmd == "emailall") {
include "emailall.php";
}
elseif ($cmd == "email") {
include "email.php";
}
elseif ($cmd == "manual") {
include "manual.inc";
}
else {
# error
$error = "Unknown value for cmd ($cmd).";
include "error.inc";
}
# display the footer
include "footer.inc";
# close the database connection
mysql_close($db_conn);
?>