This repository has been archived by the owner on Jan 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathviewlo.php
145 lines (140 loc) · 6.11 KB
/
viewlo.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha2/css/bootstrap.min.css" integrity="sha384-DhY6onE6f3zzKbjUPRc2hOzGAdEf4/Dz+WJwBvEYL/lkkIsI3ihufq9hk9K4lVoK" crossorigin="anonymous">
<style>
@import url('https://fonts.googleapis.com/css2?family=Charm&display=swap');
body{
font-family: 'Charm', cursive;
background-image: url('https://quadbproject.000webhostapp.com/money-1153538_1280.jpg');
}
</style>
</head>
<body>
<div class="container">
<div class="mb-2 mt-2" style="font-size: 10vh"><center><span class="badge bg-secondary">ผลการออกสลากกินแบ่งรัฐบาล ประจำวันที่ <div id="datetext" class="d-inline"></div> </span></center></div>
<div class="row">
<div class="col-md-3">
<div class="card">
<div class="card-header bg-success">
<center>รางวัลที่1</center>
</div>
<div class="card-body">
<p class="card-text"><center><h3 id="first"> </h3></center></p>
</div>
</div>
</div>
<div class="col-md-3">
<div class="card">
<div class="card-header bg-info">
<center>รางวัลเลขหน้าสามตัว</center>
</div>
<div class="card-body">
<p class="card-text"><center><h3 id="threefirst"> | </h3></center></p>
</div>
</div>
</div>
<div class="col-md-3">
<div class="card">
<div class="card-header bg-info">
<center>รางวัลเลขท้ายสามตัว</center>
</div>
<div class="card-body">
<p class="card-text"><center><h3 id="threeend"> | </h3></center></p>
</div>
</div>
</div>
<div class="col-md-3">
<div class="card">
<div class="card-header bg-warning">
<center>รางวัลเลขท้ายสองตัว</center>
</div>
<div class="card-body">
<p class="card-text"><center><h3 id="twoend"></h3></center></p>
</div>
</div>
</div>
</div>
<div class="card mt-2">
<div class="card-header">
Fun Fact
</div>
<div class="card-body">
<div id="numfind" class="d-inline"></div> เคยออกมาแล้ว <div id="numcount" class="d-inline"></div> ครั้ง ในรอบ 13 ปี
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha2/js/bootstrap.bundle.min.js" integrity="sha384-BOsAfwzjNJHrJ8cZidOg56tcQWfp6y72vEJ8xQ9w6Quywb24iOsW913URv1IS4GD" crossorigin="anonymous"></script>
<script>
$.getJSON('https://lottsanook.herokuapp.com/god.php', function(data1) {
switch (data1[data1.length - 1].substring(2, 4)) {
case '01':
month = "มกราคม";
break;
case '02':
month = "กุมภาพันธ์";
break;
case '03':
month = "มีนาคม";
break;
case '04':
month = "เมษายน";
break;
case '05':
month = "พฤษภาคม";
break;
case '06':
month = "มิถุนายน";
break;
case '07':
month = "กรกฎาคม";
break;
case '08':
month = "สิงหาคม";
break;
case '09':
month = "กันยายน";
break;
case '10':
month = "ตุลาคม";
break;
case '11':
month = "พฤศจิกายน";
break;
case '12':
month = "ธันวาคม";
}
document.getElementById('datetext').innerText = parseInt(data1[data1.length - 1].substring(0, 2)) + " " + month + " " + data1[data1.length - 1].substring(4, 8)
$.getJSON('https://lottsanook.herokuapp.com/?date='+data1[data1.length - 1], function(data2) {
document.getElementById('first').innerText = data2[0][1]
document.getElementById('threefirst').innerText = data2[1][1]+' | '+data2[1][2]
document.getElementById('threeend').innerText = data2[2][1]+' | '+data2[2][2]
document.getElementById('twoend').innerText = data2[3][1]
randnum = Math.floor((Math.random() * 6) + 1);
if(randnum == 1){
numsel = data2[0][1]
} else if(randnum == 2) {
numsel = data2[1][1]
} else if(randnum == 3) {
numsel = data2[1][2]
} else if(randnum == 4) {
numsel = data2[2][1]
} else if(randnum == 5) {
numsel = data2[2][2]
} else if(randnum == 6) {
numsel = data2[3][1]
}
$.getJSON('https://lottsanook.herokuapp.com/finddol.php?search='+numsel, function(data3) {
document.getElementById('numfind').innerText = numsel
console.log(data3.length)
document.getElementById('numcount').innerText = data3.length
});
});
});
</script>
</body>
</html>