-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcharts.php
110 lines (88 loc) · 2.34 KB
/
charts.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
<?php
include_once(__DIR__."/global.php");
if (isset($_GET["type"])){
if ($_GET["type"] == "cardlistNew"){
$cards = DB::app()->getAllCards();
echo json_encode($cards);
//echo var_export($cards);
return;
}
else if ($_GET["type"] == "price"){
$set = $_GET["set"];
$card = $_GET["card"];
$data = DB::app()->getChartData($set, $card);
echo json_encode($data);
return;
}
}
?>
<!DOCTYPE html>
<html>
<head>
<link rel='stylesheet' href='style\style.css'/>
<link rel='stylesheet' href='style\jquery-ui.min.css'/>
<script src="libs\jquery-2.1.1.min.js"></script>
<script src='libs\jquery-ui.min.js'></script>
<script src='libs\Chart.bundle.min.js'></script>
<script src='script.js'></script>
</head>
<body>
<?php
echo "<div class='mainContainer'>
<div class='container'>
<canvas id='foilAvailCanvas'</canvas>
</div>
<div class='container'>
<canvas id='foilPriceCanvas'</canvas>
</div>
<div class='search'>";
$card = "Brainstorm";
$set = "A25";
if (sizeof($_GET) && ($_GET["type"] == "preset")){
$set = $_GET["set"];
$card = $_GET["card"];
echo "<script>window.remote = 1</script>";
} else echo "<script>window.remote = 0</script>";
echo '<input type="form" class="setSearch" value="'.$set.'">';
echo '<input type="form" class="cardSearch" value="'.$card.'">';
?>
<input type="button" style="font-size: 16px" onclick="charter.getCardData(0, $('.setSearch').val(), $('.cardSearch').val())" value="Search">
<input type='checkbox'></input>
<input type="button" style="font-size: px" onclick="charter.assembleFavData()" value="add">
<div id="cardName"></div>
<div class="reprints"></div>
<?php
echo "</div>";
echo "<div class='container'>
<canvas id='baseAvailCanvas'</canvas>s
</div>
<div class='container'>
<canvas id='basePriceCanvas'</canvas>
</div>";
?>
</body>
</html>
<script type="text/javascript">
const charter = new Charter();
/* window.onload = function(){
timeout = false;
//$(".ui").removeClass("disabled");
if (remote){
timeout = setTimeout(function(){
charter.getCardData(0, $(".setSearch").val(), $(".cardSearch").val())
}, 500);
}
}
*/
</script>
<style>
.mainContainer {
width: 850px;
}
.mainContainer div {
width: 400px;
}
.mainContainer div.search {
width: 100%;
}
</style>