-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
95 lines (72 loc) · 2.11 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
<?php
ini_set ("display_errors", "1");
error_reporting(E_ALL);
//Keep login Information
session_start();
//**This include file establishes the database connections
include_once ("./includes/db_connect.inc");
//**This include file includes functions, such as pipe cleaner
include_once ("./includes/functions.php");
//**This include file includes header
include_once ("./includes/header.php");
//Connect to SierraDNA
$sierraDNAconn = db_sierradna();
//Connect to MySQL
$overlookedGemsLink = db_overlooked_gems() or die ("Cannot connect to server");
//Check Session Variables
if(isset($_POST['Logout']))
{
$_SESSION['LoggedIn'] = 0;
$_SESSION['pnumber'] = "";
$_SESSION['pid'] = "";
}
//Check Session Variables
if(!isset($_SESSION['LoggedIn']))
$_SESSION['LoggedIn']=0;
//Checking for Errors
if (isset($_GET['lastname']))
$lastname = strtolower($_GET['lastname']);
else
$lastname = "";
if (isset($_GET['cardno']))
$cardno = $_GET['cardno'];
else
$cardno = "";
if(isset($_GET['error']))
$error = $_GET['error'];
else {
$error = 0;
$errorDisplay = "";
}
if($error==1) {
$errorDisplay="Sorry, you were not found in the system.<br>";
}
elseif($error==2) {
$errorDisplay="In order to use this service, you must have your reading history turned on.<br>To do this, please login to \"My Account\", select Reading History and \"Opt In\".<br>";
}
echo <<< Text
<div id="headertext">
Book Subscription Service
</div>
<div id="forminfo">
<span style="color:#C00;">{$errorDisplay}</span>
<form action="./process_login.php" method="POST" name="SIGNUP">
<div id="textbox">
<span id="textboxtitle">Last Name</span><br>
<input type="text" name="lastname" id="loginboxes" value="{$lastname}">
</div>
<br>
<div id="textbox">
<span id="textboxtitle">Barcode</span><br>
<input type="password" name="cardno" id="loginboxes" value="{$cardno}">
</div>
<br>
<div id="textbox">
<input type="submit" name="submit" value="Login">
</div>
</form>
<br><br>
Presented by: Overlooked Gems 2018
</div>
Text;
?>