-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwanted.php
70 lines (59 loc) · 2.33 KB
/
wanted.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
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>TiredTechnician</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="Description" lang="en" content="A handheld library technician to add books to your LazyLibrarian server">
<meta name="author" content="fireshaper">
<meta name="robots" content="NOINDEX, NOFOLLOW">
<!-- icons -->
<link rel="apple-touch-icon" href="assets/img/apple-touch-icon.png">
<link rel="shortcut icon" href="favicon.ico">
<!-- Override CSS file - add your own CSS rules -->
<link rel="stylesheet" href="assets/css/styles.css">
</head>
<body style="background-color: #000">
<div class="container">
<div class="header">
<h1 class="header-heading"><a href="." >TiredTechnician</a></h1>
<h6>A handheld library technician to add books to your LazyLibrarian server</h6><br />
<div class="nav">
[<a href="index.php">Search</a>] [<a href="wanted.php">Wanted Books</a>]
</div>
</div>
<div class="content">
<div class="info">
<?php
require_once('settings.php');
if (isset($_POST['force'])){
$forceResult = file_get_contents($GLOBALS['url'] . '/api?apikey=' . $GLOBALS['apikey'] . '&cmd=forceBookSearch');
if ($forceResult == "OK"){
echo 'Checking for available books.<br />';
}
}
?>
</div>
<div class="main">
<h3>Wanted books</h3>
<?php
echo '<form action="wanted.php" method="POST"><input type="submit" name="force" value="Force Check" style="padding:15px 32px;background-color:#ffffc7;color:#333333;font-size:16px;font-weight:bold;" /><br /><br /></form>';
$string = file_get_contents($url . '/api?apikey=' . $apikey . '&cmd=getWanted');
$json_a = json_decode($string, true);
foreach ($json_a as $book => $book_a) {
$cover = $url . "/" . $book_a['BookImg'];
echo '<table width="100%"><tr>';
echo '<td width="33%"><img width="100px" src="' . $cover . '" /></td>';
echo '<td width="33%"><b>' . $book_a['BookName'] . '</b></td>';
echo '</tr>';
}
echo '</table>';
?>
</div>
</div>
<div class="footer">
© Copyright fireshaper 2018
</div>
</div>
</body>
</html>