-
Notifications
You must be signed in to change notification settings - Fork 0
/
add.bonus.form.php
105 lines (81 loc) · 2.31 KB
/
add.bonus.form.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
<?php
require_once 'vendor/autoload.php';
use FileListPoker\Main\Site;
use FileListPoker\Main\Database;
use FileListPoker\Main\Config;
$site = new Site();
$jQueryPath = Config::getValue('path_jquery');
$jQueryUIPath = Config::getValue('path_jqueryui');
$jQueryCSSPath = Config::getValue('path_jqueryui_css');
$db = Database::getConnection();
$result = $db->query (
'SELECT name_pokerstars ' .
'FROM players ' .
'WHERE name_pokerstars IS NOT NULL ' .
'ORDER BY name_pokerstars ASC');
echo '<!DOCTYPE html>
<html>
<head>
<title>FileList Poker Add Bonus</title>';
echo "<script type=\"text/javascript\" src=\"$jQueryPath\"></script>\n";
echo "<script type=\"text/javascript\" src=\"$jQueryUIPath\"></script>\n";
echo "<link rel=\"stylesheet\" href=\"$jQueryCSSPath\" />\n";
?>
<style type="text/css">
div{
padding:8px;
}
div label {
padding: 8px;
}
body {
background:#BCD5E1;
}
</style>
</head>
<?php
$names = array();
foreach ($result as $name) {
$names[] = $name['name_pokerstars'];
}
$nameList = 'var availableNames = ["' . implode ('", "', $names) . '"];';
?>
<body>
<h1>FileList Poker Add Bonus</h1>
<script type="text/javascript">
$(document).ready(function()
{
<?php echo $nameList; ?>
$('#player').autocomplete({source: availableNames});
$('#bonusdate').datepicker ({dateFormat: 'yy-mm-dd', firstDay: 1});
});
</script>
<form action="add.bonus.execute.php" method="POST" target="_blank">
<div>
<label>Player: </label>
<input type="text" name="player" id="player" value="" />
</div>
<div>
<label>Bonus Description: </label>
<input type="text" name="bonusdesc" id="bonusdesc" value="" />
</div>
<div>
<label>Tournament ID: </label>
<input type="text" name="tid" id="tid" value="" />
</div>
<div>
<label>Bonus Value: </label>
<input type="text" name="bonusvalue" id="bonusvalue" value="" />
</div>
<div>
<label>Bonus Date: </label>
<input type="text" name="bonusdate" id="bonusdate" value="" />
</div>
<p>
<label>Password: </label>
<input type='password' name='flpokerpassword' id='flpokerpassword' value ='' />
</p>
<input type='submit' value='Submit' id='submitbutton' />
</form>
</body>
</html>