59JoSblxHX5yadkg5jVKTd changeset

Changeset353839396430 (b)
Parent366134663832 (a)
ab
0+--- the signin php main page --
0+
0+<?php $pathToRoot=dirname($_SERVER['SCRIPT_FILENAME'])."/"; ?>
0+<?php include($pathToRoot."includes/phpheader.php"); ?>
0+<?php include($pathToRoot."includes/httpheader.php"); ?>
0+<?php include($pathToRoot."includes/signin.php"); ?>
0+<?php
0+
0+// Check if we have established a session
0+if (isUserSignedIn())
0+{
0+  // There is a user logged on
0+  outputSignedOnPage($_SESSION["authenticatedUser"]);
0+}
0+else
0+{
0+  // No session established, no POST variables
0+  // display the sign-in form + any message
0+  outputSignInPage($_SESSION["sessionMessage"]);
0+
0+  session_destroy();
0+}
0+
0+?>
0+
0+
0+--- the signin.php include is listed below ---
0+
...
00<?php
11// include guards
22if (!$INCLUDED_SIGN_IN_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
--- Revision 366134663832
+++ Revision 353839396430
@@ -1,3 +1,31 @@
+--- the signin php main page --
+
+<?php $pathToRoot=dirname($_SERVER['SCRIPT_FILENAME'])."/"; ?>
+<?php include($pathToRoot."includes/phpheader.php"); ?>
+<?php include($pathToRoot."includes/httpheader.php"); ?>
+<?php include($pathToRoot."includes/signin.php"); ?>
+<?php
+
+// Check if we have established a session
+if (isUserSignedIn())
+{
+ // There is a user logged on
+ outputSignedOnPage($_SESSION["authenticatedUser"]);
+}
+else
+{
+ // No session established, no POST variables
+ // display the sign-in form + any message
+ outputSignInPage($_SESSION["sessionMessage"]);
+
+ session_destroy();
+}
+
+?>
+
+
+--- the signin.php include is listed below ---
+
<?php
// include guards
if (!$INCLUDED_SIGN_IN_PHP):