-
Notifications
You must be signed in to change notification settings - Fork 0
/
undi.html
288 lines (249 loc) · 9.26 KB
/
undi.html
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
<!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 http-equiv="x-ua-compatible" content="ie=edge">
<title>PT. Petrokimia Event Portal</title>
<!-- Font Awesome -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/navbar.css">
<link rel="stylesheet" type="text/css" href="css/owl.carousel.css">
<link rel="stylesheet" type="text/css" href="css/owl.theme.default.css">
<link rel="stylesheet" type="text/css" href="css/slider.css">
<!-- Bootstrap core CSS -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet">
<!-- Material Design Bootstrap -->
<link href="assets/css/mdb.min.css" rel="stylesheet">
<!-- Your custom styles (optional) -->
<link href="assets/css/style.css" rel="stylesheet">
<script type="text/javascript">
<!--
// code to generate and display random numbers, using values entered by a user on a form
// (namely BALLS_DRAWN and MAX_NUMBER), for use as lottery numbers etc.
// Copyright (C) Rhodus Corp 1997 [[email protected]]
// do not use this code in whole or in part without including these four lines.
var loop; //loop counter
var randy; //holds random numbers
function make_array(size) //creates a one-dimensional array
{
this.length = size;
for (a=0; a<size; a++) this[a]="";
}
function StartUndi() //flags certain numbers in a one-dimensional array
{
hold = new make_array(document.lottery.max_number.value);
document.lottery.numbers.value = ""; //clear numbers box
//now we need to generate some numbers------------------
for(loop=0;loop<document.lottery.balls_drawn.value;loop++) //1 step through loop for each ball to be drawn
{
randy = Math.round(Math.random()*(document.lottery.max_number.value-1));
randy++; //ie. number between 0+1 (=1) and max_value-1+1 (=max_value)
if(hold[randy]==1)
{
loop--; //if number already chosen, go back one step in the loop
continue; //and start again (so no duplicate numbers)
}
if(hold[randy]!=1)
{
hold[randy]=1; //if not already flagged, then flag the number in the 'hold' list
}
}
//----------------------------------------------------
//now we need to display the numbers----------------
for(loop=0;loop<=document.lottery.max_number.value;loop++)
{
if(hold[loop]==1) //ie. if 'loop' is flagged
document.lottery.numbers.value = document.lottery.numbers.value + loop + ", "; //display on 'numbers' text field, seperated by commas
}
//---------------------------------------------------
}
function resetUndi()
{
document.getElementById("undiForm").reset();
}
// -->
</script>
</head>
<body>
<!-- Start your project here-->
<!-- <nav class="navbar navbar-expand-lg" id="mobile" style="background-color: white">
<<span>
<a class="navbar-brand" href="#"><img src="img/bumn.png" width="75" height="45" alt=""></a>
<a class="navbar-brand" href="#"><img src="img/logo2.png" width="80" height="35" alt=""></a>
<a class="navbar-brand" href="#"><img src="img/logo.png" width="100" height="60" alt=""></a>
</span>
</nav>-->
<nav class="navbar navbar-expand-lg sticky-top" style="background-color: white">
<div class="container">
<span id="web">
<a class="navbar-brand" href="http://www.bumn.go.id/"><img src="img/bumn.png" width="75" height="45" alt=""></a>
<a class="navbar-brand" href="http://pupuk-indonesia.co.id"><img src="img/logo2.png" width="80" height="35" alt=""></a>
<a class="navbar-brand" href="http://petrokimia-gresik.com"><img src="img/logo.png" width="100" height="60" alt=""></a>
</span>
<span id="title">Portal Event PT. Petrokimia Gresik</span>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarText"
aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon" style="background-image: url('https://mdbootstrap.com/img/svg/hamburger7.svg?color=#4a9c54');"></span>
</button>
<div class="collapse navbar-collapse" id="navbarText">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="index.html" style="color: #4a9c54;"><b>HOME</b></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" style="color: #4a9c54;"><b>ON GOING</b></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" style="color: #4a9c54;"><b>COMING SOON</b></a>
</li>
<li class="nav-item">
<a class="nav-link" href="undi.html" style="color: #4a9c54;"><b>UNDIAN</b></a>
</li>
<li class="nav-item">
<a class="nav-link" href="login.html" style="color: #4a9c54;"><b>LOGIN</b></a>
</li>
</ul>
<!-- Search form -->
<form class="form-inline ml-auto">
<div class="md-form my-0">
<input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search">
</div>
</form>
</div>
</div>
</nav>
<br>
<div class="container">
<h1 class="bq-title" style="text-align:center; color:#107f35"><strong>Undian</strong></h1>
<div class="poster-wrapper">
<form id="undiForm" name="lottery">
Berapa nomor yang diundi?<br>
<input class="form-control mb-4" type="text" name="balls_drawn" size=2 value="1">
Nomor undian tertinggi?<br>
<input class="form-control mb-4" type="text" name="max_number" size=2 value="100">
Output:<br>
<textarea class="form-control mb-4" type="text" name="numbers" value=""></textarea><br><br>
<input class="btn btn-success center-block" type="button" value="Start" onclick="StartUndi();">
<input class="btn btn-danger center-block" type="button" value="Reset" onclick="resetUndi();">
<br><br>
</form>
</div>
</div>
<br>
<br>
<!-- Footer -->
<footer class="page-footer bg-dark font-small blue pt-4">
<!-- Footer Links -->
<div class="container-fluid text-center text-md-left">
<!-- Grid row -->
<div class="row">
<!-- Grid column -->
<div class="col-md-6 mt-md-0 mt-3">
<!-- Content -->
<img src="img/logo.png" width="120px" height="80px;">
<p>PT Petrokimia Gresik merupakan Produsen Pupuk Terlengkap di Indonesia yang memproduksi berbagai macam pupuk dan bahan kimia untuk solusi agroindustri. Kami berkomitmen untuk terus tumbuh dan berkembang bersama masyarakat, demi mendukung terwujudnya Ketahanan Pangan Nasional dan kemajuan dunia pertanian.</p>
</div>
<!-- Grid column -->
<hr class="clearfix w-100 d-md-none pb-3">
<!-- Grid column -->
<div class="col-md-3 mb-md-0 mb-3">
<!-- Links -->
<h5 class="text-uppercase">Kantor Pusat</h5>
<ul class="list-unstyled">
<li>
<span class="font-medium text-muted db">ALAMAT</span>
<p>Jl. Jenderal Ahmad Yani - Gresik 61119</p>
</li>
<li>
<span class="font-medium text-muted db">TELEPON</span>
<p>031-3981811, 3982100, 3982200</p>
</li>
<li>
<span class="font-medium text-muted db">FAX</span>
<p>031-3981722, 3982272</p>
</li>
<li>
<span class="font-medium text-muted db">EMAIL</span>
<a href="mailto:[email protected]">[email protected]</a>
</li>
</ul>
</div>
<!-- Grid column -->
<!-- Grid column -->
<div class="col-md-3 mb-md-0 mb-3">
<!-- Links -->
<h5 class="text-uppercase">Links</h5>
<ul class="list-unstyled">
<li>
<a href="#!">Link 1</a>
</li>
<li>
<a href="#!">Link 2</a>
</li>
<li>
<a href="#!">Link 3</a>
</li>
<li>
<a href="#!">Link 4</a>
</li>
</ul>
</div>
<!-- Grid column -->
</div>
<!-- Grid row -->
</div>
<!-- Footer Links -->
<!-- Copyright -->
<div class="footer-copyright text-center py-3">© 2018 Copyright:
<a href="https://mdbootstrap.com/education/bootstrap/"> MDBootstrap.com</a>
</div>
<!-- Copyright -->
</footer>
<!-- Footer -->
<!-- Start your project here-->
<!--Card-->
<!-- SCRIPTS -->
<!-- JQuery -->
<script type="text/javascript" src="assets/js/jquery-3.4.1.min.js"></script>
<!-- Bootstrap tooltips -->
<script type="text/javascript" src="assets/js/popper.min.js"></script>
<!-- Bootstrap core JavaScript -->
<script type="text/javascript" src="assets/js/bootstrap.min.js"></script>
<!-- MDB core JavaScript -->
<script type="text/javascript" src="assets/js/mdb.min.js"></script>
<script src="js/owl.carousel.js"></script>
<script>
$(document).ready(function(){
$(window).scroll(function(){
var scroll = $(window).scrollTop();
if (scroll > 300) {
$(".sticky-top").css("background-image" , "radial-gradient( circle farthest-corner at 100.6% 51.9%, rgba(255,186,2,1) 0%, rgba(26,149,77,1) 90% )");
$(".nav-link").css("color", "white");
}
else{
$(".sticky-top").css("background" , "white");
$(".nav-link").css("color", "#4a9c54");
}
})
})
$('.owl-carousel').owlCarousel({
margin: 10,
nav:true,
autoplay:true,
responsive:{
0:{
items:1
},
600:{
items:3
},
1000:{
items:4
}
}
})
</script>
</body>
</html>