-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPrintableChecksheet.inc.php
More file actions
80 lines (56 loc) · 1.74 KB
/
PrintableChecksheet.inc.php
File metadata and controls
80 lines (56 loc) · 1.74 KB
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
<?php
require_once('inc/startsession.php');
/////////////////////////////////////////////////////////////////////
//
// Written by Jim Garbe-- Dynamic Checksheet
//
/////////////////////////////////////////////////////////////////////
require_once('inc/appvars.php');
$Title="Printable Checksheet";
include('inc/title.php');
require_once('inc/functions.php.inc');
require_once('inc/appvars.php');
require_once('inc/connectvars.php');
?>
</div>
<?php
if (isset($_SESSION['user_id']) && ($_SESSION['status'] < 3)) {
?>
<div class = indexing style="text-align:center;">
<fieldset><legend>Checksheet</legend>
<?php
$name='Checksheets';
// Connect to the database
$dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
$sql="SELECT * FROM ".$name." WHERE veh = '1' order by id asc";
$result=mysqli_query($dbc, $sql);
while ($row = mysqli_fetch_array($result, MYSQL_NUM)) {
$OName[$row[0]] = $row[1]; }
foreach($OName as $chno => $CName) {
print("<li style=\"display:inline;\"><INPUT TYPE=\"button\" value=\"".$CName."\" ");
if (file_exists("tmp/".$CName."print.pdf")) {
print(" style= \"color:421a02;background-color:#c3ae59;font-size:1.1em;font-weight:bold;\" onClick=\"window.open('".HOME."/tmp/".$CName."print.pdf')\">");
}else{
print(" style= \"color:421a02;background-color:#7F7961;font-size:1em;\" >"); }
print("</li>\n");
}
?>
</fieldset>
<?php
if($_SESSION['status'] == 1){ // Administrator
print("\n");
print("\n");
print("\n");
print("\n");
print("\n");
}
?>
<div class="push"></div>
<div class="footer">
<!-- <a href="dynRSSfeed.php">
<img style="verticle-align:top; border:none;" src="rssicon.png" alt="Checksheets" />Checksheets via News Feeder</a> -->
</div>
</div>
<?php
}
?>