-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
158 lines (114 loc) · 4.16 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
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
153
154
155
156
157
158
<?php
session_start();
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
//ini_set('auto_detect_line_endings', true);
//ini_set('max_execution_time', 60000);
error_reporting(E_ALL);
include("main.class.php");
$state="";
if (isset($_REQUEST["state"])){$state=$_REQUEST["state"];}
if (!$state){$state="start";}
if(!$state && isset($_SESSION["active"])){
$state="scan";
}
$main=new main();
if($state=="scan" && !isset($_SESSION["active"])){
$main->initiate();
}
if($state=="readBarcode"){
$main->readBarcodeNetworkId();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Summit last copy checker</title>
<link rel="icon" href="pie_icon.gif" type="gifF" />
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<!-- Custom styles for this template -->
<link href="css/style.css" rel="stylesheet">
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<div class="container">
<a class="navbar-brand" href="index.php">Summit Last Copy Checker</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<!--
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link" href="#">Summit Last Copy Checker
<span class="sr-only">(current)</span>
</a>
</li>
</ul>
</div>-->
</div>
</nav>
<!-- Page Content -->
<div class="container">
<!-- Jumbotron Header -->
<header class="jumbotron my-4">
<h5 class="display-2">Summit Last Copy Checker</h5>
</header>
<div class="container">
<?php
if(isset($_SESSION["flash"])){
$type=$_SESSION["flashtype"];
?>
<div class="alert alert-<?= $type ?>" role="alert">
<?= $_SESSION["flash"]?>
</div>
<?php
unset($_SESSION["flashtype"]);
unset($_SESSION["flash"]);
}
?>
</div>
<!-- Page Features -->
<?php
$main->switchboard($state);
//echo $state;
?>
<div class="row text-center">
</div>
<!-- /.row -->
</div>
<!-- /.container -->
<!-- Footer -->
<footer class="py-5 ">
<div class="container">
<div class="jumbotron jumbotron-fluid">
<div class="container">
<h1 class="display-6">What is this?</h1>
<p class="lead">Say you have a cart of books to weed, and want to check "last copy" status for each. By scanning each barcode, you'll see a message on whether it's the last copy. If it isn't the barcode will be added to a text file, which you can download when you're finished (for later loading into Alma).</p>
<p>The steps:</p>
<ul>
<li>Select your institution.</li>
<li>Click "Begin a new text file of barcodes".</li>
<li>Scan each barcode in turn, taking care to view the response (you may want to set your last copies aside, etc.).</li>
<li>When finished, click "I'm done scanning, and ready to download the text file".</li>
<li>On the resulting page, click "Download file". This will give you a text file of non-last copy barodes.</li>
</ul>
</div>
</div>
</div>
<!-- /.container -->
</footer>
<!-- Bootstrap core JavaScript -->
<script
src="https://code.jquery.com/jquery-3.4.1.js"
integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU="
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"></script>
</body>
</html>