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
| <?php
$title = 0;
$descript = 0;
$descrip2 = 0;
$fullname = 0;
$address1 = 0;
$address2 = 0;
$postal = 0;
$city = 0;
$country = 0;
$editor = 0;
$date = 0;
$day1 = 0;
$day2 = 0;
$day3 = 0;
$status1 = 0;
$error1 = 0;
$error2 = 0;
$error3 = 0;
$error4 = 0;
$error5 = 0;
$error6 = 0;
$error7 = 0;
function checklogin($user,$pass) {
// Hier checked ie de user en pass en return true als goed is, return false is fout is.
}
function entrycheck($FEFullName,$FEAddress1,$FEAddress2,$FEPostalcode,$FECity,$FECountry,$FEEditor,$FEEventDate) {
if ($FEFullName == "") $error="Error1";;
if ($FEAddress1 == "") $error="Error2";
if ($FEPostalCode == "") $error="Error3";
if ($FECity == "") $error="Error4";
if ($FECountry == "") $error="Error5";
if ($FEEditor == "") $error="Error6";
if ($FEEventDate == "") $error="Error7";
if ($error != "") return $error;
else return "Good";
}
function setlang($user) {
//global $title, $descript, $descrip2, $fullname, $address1, $address2, $postal, $city, $country, $editor, $date, $day1, $day2, $day3, $status1, $error1, $error2, $error3, $error4, $error5, $error6, $error7;
if ($user == "mem") {
$GLOBALS['title'] = "Adreslijst Bruiloftsreceptie";
$GLOBALS['descript'] = "Vul het adres in en klik op Submit Form.";
$GLOBALS['descrip2'] = "Vul a.u.b. alle velden met een * in.";
$GLOBALS['fullname'] = "Naam";
$GLOBALS['address1'] = "Adres 1";
$GLOBALS['address2'] = "Adres 2";
$GLOBALS['postal'] = "Postcode";
$GLOBALS['city'] = "Woonplaats";
$GLOBALS['country'] = "Land";
$GLOBALS['editor'] = "Gebruiker";
$GLOBALS['date'] = "Datum";
$GLOBALS['day1'] = "Zat, 28 Mei 2005";
$GLOBALS['day2'] = "Zon, 29 Mei 2005";
$GLOBALS['day3'] = "Vrij, 10 Juni 2005";
$GLOBALS['status1'] = "Ingelogd";
$GLOBALS['error1'] = "Naam niet ingevuld";
$GLOBALS['error2'] = "Adres niet ingevuld";
$GLOBALS['error3'] = "Postcode niet ingevuld";
$GLOBALS['error4'] = "Woonplaats niet ingevuld";
$GLOBALS['error5'] = "Lang niet ingevuld";
$GLOBALS['error6'] = "Geen gebruiker uitgekozen";
$GLOBALS['error7'] = "Geen datum uitgekozen";
}
else {
$GLOBALS['title'] = "Address-list Wedding-reception";
$GLOBALS['descript'] = "Enter the address details and click Submit Form.";
$GLOBALS['descrip2'] = "Please fill in all fields marked with a *.";
$GLOBALS['fullname'] = "Full Name";
$GLOBALS['address1'] = "Address 1";
$GLOBALS['address2'] = "Address 2";
$GLOBALS['postal'] = "ZIP Code";
$GLOBALS['city'] = "City";
$GLOBALS['country'] = "Country";
$GLOBALS['editor'] = "Username";
$GLOBALS['date'] = "Date";
$GLOBALS['day1'] = "Sat, 28 May 2005";
$GLOBALS['day2'] = "Sun, 29 May 2005";
$GLOBALS['day3'] = "Fri, 10 June 2005";
$GLOBALS['status1'] = "Logged in";
$GLOBALS['error1'] = "No name entered";
$GLOBALS['error2'] = "No address entered";
$GLOBALS['error3'] = "No postal code entered";
$GLOBALS['error4'] = "No city entered";
$GLOBALS['error5'] = "No country entered";
$GLOBALS['error6'] = "No username selected";
$GLOBALS['error7'] = "No date selected";
}
return true;
}
function printform($user,$lang) {
global $title,$fullname,$address1,$address2,$postal,$city,$country,$editor,$date,$day1,$day2,$day3;
// Hier print ie het invulformulier in HTML
return true;
}
function printlogin() {
// Hier print ie het loginscherm
return true;
}
function printstatus($currentstatus) {
//Hier print ie de huidige status
print("<table width=\"95%\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#000000\">\n<tr>\n<td>\n<table width=\"100%\" cellspacing=\"1\" cellpadding=\"5\" bgcolor=\"#D6DFEF\">\n<tr>\n<td>Status: ".$currentstatus."</td>\n</tr>\n</table>\n</td>\n</tr>\n</table>\n<BR>");
return true;
}
if ($action == "login") {
if (checklogin($user,$pass)) {
setlang($user);
$currentstatus = $status1;
printstatus($currentstatus);
printform($user,$lang);
}
print("ShowSuccess");
}
else if ($action == "add") {
entrycheck($FEFullName,$FEAddress1,$FEAddress2,$FEPostalcode,$FECity,$FECountry,$FEEditor,$FEEventDate);
if ($error != "Error3") print("The error is: ".$_GET['error3']);
else print("Couldnt figure it out..");
}
else printlogin();
?> |