-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck_package.php
152 lines (107 loc) · 4.34 KB
/
check_package.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
<?php session_start(); ?>
<?php include "include/header.php"; ?>
<div id="page_content">
<div class="container">
<div id="page_left">
<?
/* $info = getdate();
$date = $info['mday'];
$month = $info['mon'];
$year = $info['year'];
$hour = $info['hours'];
$min = $info['minutes'];
$sec = $info['seconds'];
$current_date = "$date/$month/$year == $hour:$min:$sec";
$current_time = "$hour:$min:$sec";
echo "Today is " . date("Y/m/d") . "<br>"; date_default_timezone_set("America/Chicago");
echo "The time is " .date("g:i a", strtotime("$hour:$min:$sec"));; */ ?>
<script type="text/javascript">
//Current Server Time script (SSI or PHP)- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// This notice must stay intact for use.
//Depending on whether your page supports SSI (.shtml) or PHP (.php), UNCOMMENT the line below your page supports and COMMENT the one it does not:
//Default is that SSI method is uncommented, and PHP is commented:
//var currenttime = '<!--#config timefmt="%B %d, %Y %H:%M:%S"--><!--#echo var="DATE_LOCAL" -->' //SSI method of getting server date
var currenttime = '<? print date("F d, Y H:i:s", time())?>' //PHP method of getting server date
///////////Stop editting here/////////////////////////////////
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
var serverdate=new Date(currenttime)
function padlength(what){
var output=(what.toString().length==1)? "0"+what : what
return output
}
function displaytime(){
serverdate.setSeconds(serverdate.getSeconds()+1)
var datestring=montharray[serverdate.getMonth()]+" "+padlength(serverdate.getDate())+", "+serverdate.getFullYear()
var timestring=padlength(serverdate.getHours())+":"+padlength(serverdate.getMinutes())+":"+padlength(serverdate.getSeconds())
document.getElementById("servertime").innerHTML=datestring+" "+timestring
}
window.onload=function(){
setInterval("displaytime()", 1000)
}
</script>
<p><b>Current Date and Time:</b><br> <span id="servertime"></span></p>
</div>
<div id="page_right">
<h1>Resident Package</h1>
<div class="alert alert-info">
<p>Welcome! This allows you to check your current packages, <strong>you must</strong> have your Wildcat ID Card in order to view packages.</p>
</div>
<div id="errNote" class="<?php if ($_SESSION['invalid_Card']=="Bad"){
echo ('""');
} else {
echo ('hide');
}?>">
<?php if (isset($_SESSION['invalid_Card']) ){
if ($_SESSION['invalid_Card']=="Bad"){
echo ('<strong>An Error has Occured</strong>: <li>Card id not a valid K-State ID Please contact KSU IS Center for help</li>');
}
} else {
echo '';
}
?></div>
<form onSubmit="return checkform();" action="../php/data_parse_process.php" method="post">
<fieldset>
<legend>Check Packages</legend>
<div class="row_center">
<div class="col-xs-12">
<label for="id_first_name" class="required">
Wildcat ID
</label>
<input type="password" name="iDAcc" value id="ID_Swipe" class="form-control textinput" autofocus>
</div>
</div>
<div class="row_center77">
<div class="help_center col-md-65" style="margin-top:20px;">
<h2 class="help__title">Swipe Wildcat ID Card</h2>
<div class="rap">
</div>
<span class="clear"></clear>
</div>
</div>
<span class="clear"></span>
<input name="Submit" value="Continue" type="submit" onclick="goToAction('saveBaseInfo');return false;" id="submit_button" class="btn btn-primary" style="display: inline;">
</fieldset>
</form>
</div>
</div>
<span class="clear"></span>
<script>
function checkform() {
errList = "";
if( $('#ID_Swipe').val().length < 3 ){
//alert('first name required!!!!');
errList += "<li>Card swipe was invalid please try again</li>";
}
if (errList != "") {
errList = "<strong>An Error has Occured</strong>:<ul>" +errList + "</ul>"
$('#errNote').html(errList);
$('#errNote').removeClass('hide');
return false;
} else {
return true;
}
}
</script>
</div>
<?php include "include/footer.php"; ?>