-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgui_show_support.php
More file actions
197 lines (176 loc) · 8.15 KB
/
gui_show_support.php
File metadata and controls
197 lines (176 loc) · 8.15 KB
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
<?php
// ini_set('display_errors', 1);
// ini_set('display_startup_errors', 1);
// error_reporting(E_ALL);
date_default_timezone_set('Europe/Berlin');
session_start();
// https://www.php-einfach.de/php-tutorial/php-sessions/
require('./logger.php');
require('./db.php');
if (!isset($_SESSION['playerid'])) {
echo "Not logged in... redirecting.<br>";
echo "<meta http-equiv='refresh' content='0;url=./login.php?auto=1'>";
header("Location: ./login.php?auto=1");
//die("Check position 12");
}
// Get data from db
$pid = $_SESSION['playerid'];
$gid = $_SESSION['gameid'];
$pimage = $_SESSION['playerimage'];
$opt3 = $_SESSION['option3'];
$playMode = $opt3;
$isAdmin = $_SESSION['isAdmin'];
$sql_asc_playerround = "SELECT SQL_NO_CACHE * FROM asc_player where playerid = " . $pid . ";";
$result_asc_playerround = mysqli_query($conn, $sql_asc_playerround);
if (mysqli_num_rows($result_asc_playerround) > 0) {
while($row = mysqli_fetch_assoc($result_asc_playerround)) {
$CURRENTROUND = $row["round"];
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>ASCard.net AplhaStrike Card App (clanwolf.net): Support</title>
<meta charset="utf-8">
<!-- <meta http-equiv="expires" content="0"> -->
<!-- <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> -->
<meta name="description" content="Cards app for the AlphaStrike TableTop (BattleTech).">
<meta name="keywords" content="BattleTech, AlphaStrike">
<meta name="robots" content="noindex,nofollow">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="ASCard">
<meta name="viewport" content="width=device-width, initial-scale=0.75, minimum-scale=0.75, maximum-scale=1.85, user-scalable=yes" />
<link rel="manifest" href="/app/ascard.webmanifest">
<link rel="stylesheet" type="text/css" href="./fontawesome/css/all.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="./styles/styles.css">
<link rel="stylesheet" type="text/css" href="./styles/jquery.jscrollpane.css">
<link rel="icon" type="image/png" href="/app/favicon-96x96.png" sizes="96x96" />
<link rel="icon" type="image/svg+xml" href="/app/favicon.svg" />
<link rel="shortcut icon" href="/app/favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="/app/apple-touch-icon.png" />
<!-- https://www.npmjs.com/package/passive-events-support?activeTab=readme -->
<script>
window.passiveSupport = {
debug: false,
events: ['touchstart', 'touchmove', 'wheel'],
listeners: [
{
element: '.jspContainer',
event: 'touchstart',
prevented: true
},
{
element: '.jspContainer',
event: 'touchmove',
prevented: true
},
{
element: '.jspContainer',
event: 'wheel',
prevented: true
}
]
}
</script>
<script type="text/javascript" src="./scripts/passive-events-support/main.js"></script>
<script type="text/javascript" src="./scripts/jquery-3.7.1.min.js"></script>
<script type="text/javascript" src="./scripts/jquery.jscrollpane.min.js"></script>
<script type="text/javascript" src="./scripts/jquery.mousewheel.js"></script>
<script type="text/javascript" src="./scripts/howler.min.js"></script>
<script type="text/javascript" src="./scripts/cookies.js"></script>
<style>
html, body {
background-image: url('./images/body-bg_2.jpg');
}
table {
margin-left: auto;
margin-right: auto;
}
.scroll-pane {
width: 100%;
height: 200px;
overflow: auto;
}
.horizontal-only {
height: auto;
max-height: 200px;
}
</style>
</head>
<body>
<script>
$(function() {
//$('.scroll-pane').jScrollPane({autoReinitialise: true});
$('.scroll-pane').jScrollPane();
});
$(document).ready(function() {
$("#cover").hide();
});
</script>
<div id="cover"></div>
<?php
if ($playMode) {
$buttonWidth = "33.3%"; // 3 columns in the middle
} else {
if ($isAdmin) {
$buttonWidth = "17%"; // 6 columns
} else {
$buttonWidth = "25%"; // 4 columns
}
}
?>
<div id="header">
<table style="width:100%;height:60px;border:none;border-collapse:collapse;background:rgba(50,50,50,1.0);" cellspacing="0" cellpadding="0">
<tr>
<td nowrap onclick="location.href='./logout.php'" style="width: 80px;background: rgba(50,50,50,1.0); text-align: center; vertical-align: middle;">
<div><a style="color: #eee;" href="./logout.php"> <i class="fas fa-power-off" aria-hidden="true"></i> </a></div>
</td>
<td nowrap onclick="location.href='./gui_edit_game.php'" style="width: 100px;background:rgba(56,87,26,1.0);">
<div style='vertical-align:middle;font-size:28px;color:#eee;'> G<?php echo $gid ?> R<?php echo $CURRENTROUND ?> </div>
</td>
<td style="width:5px;"> </td>
<td nowrap onclick="location.href='./gui_select_unit.php'" width="<?php echo $buttonWidth ?>" class='menu_button_normal'><a href='./gui_select_unit.php'><i class="fa-solid fa-list"></i> ROSTER</a></td>
<td style="width:5px;"> </td>
<?php
if ($playMode) {
echo " <td nowrap onclick=\"location.href='./gui_select_formation.php'\" width=".$buttonWidth." class='menu_button_normal'><a href='./gui_select_formation.php'>CHALLENGE</a></td><td style='width:5px;'> </td>\n";
}
if (!$playMode) {
echo " <td nowrap onclick=\"location.href='./gui_assign_unit.php'\" width=".$buttonWidth." class='menu_button_normal'><a href='./gui_assign_unit.php'>ASSIGN</a></td><td style='width:5px;'> </td>\n";
echo " <td nowrap onclick=\"location.href='./gui_create_unit.php'\" width=".$buttonWidth." class='menu_button_normal'><a href='./gui_create_unit.php'>CREATE</a></td><td style='width:5px;'> </td>\n";
//echo " <td nowrap onclick=\"location.href='./gui_edit_game.php'\" width=".$buttonWidth." class='menu_button_normal'><a href='./gui_edit_game.php'>GAME</a></td><td style='width:5px;'> </td>\n";
if ($isAdmin) {
echo " <td nowrap onclick=\"location.href='./gui_create_player.php'\" width=".$buttonWidth." class='menu_button_normal'><a href='./gui_create_player.php'>PLAYER</a></td><td style='width:5px;'> </td>\n";
echo " <td nowrap onclick=\"location.href='./gui_admin.php'\" width=".$buttonWidth." class='menu_button_normal'><a href='./gui_admin.php'>ADMIN</a></td><td style='width:5px;'> </td>\n";
}
}
?>
<td nowrap onclick="location.href='./gui_edit_option.php'" width="<?php echo $buttonWidth ?>" class='menu_button_normal'><a href='./gui_edit_option.php'>OPTIONS</a></td>
<td style="width:5px;"> </td>
<td nowrap onclick="location.href='gui_show_playerlist.php'" style="width: 60px;" nowrap width="60px" style="background: rgba(50,50,50,1.0); text-align: center; vertical-align: middle;"><img src='./images/player/<?=$pimage?>' height='60px' style='height:auto;display:block;' width='60px' height='60px'></td>
</tr>
<tr><td colspan='999' style='background:rgba(50,50,50,1.0);height:5px;'></td></tr>
</table>
</div>
<div id="liberapay"><a href="./gui_show_support.php"><i class="fa-solid fa-handshake-simple"></i></a></div>
<div id="disclaimer"><a href="./gui_show_disclaimer.php">Disclaimer</a></div>
<br>
<div id="header">
<table width="80%" align="center" class="options" cellspacing="4" cellpadding="4" border="0px">
<tr>
<td>
<p>This app has been developed by an enthusiast. Countless hours have been given into the concept, design and actual development and testing. If you appreciate using ASCard, you can support me with one of the following options:</p>
<p>
<a href="https://liberapay.com/WarWolfen/donate" target="_blank"><img alt="Donate using Liberapay" height="40px" src="./images/liberapay.png"></a>
<a href="https://www.paypal.com/paypalme/ClanWolf?country.x=DE&locale.x=de_DE" target="_blank"><img alt="Donate using paypal" height="40px" src="./images/paypal.png"></a>
</p>
<p>With liberapay you can arrange recurring support and paypal may be used for one time donations. Thank you!</p>
<p><img src="https://img.shields.io/liberapay/patrons/WarWolfen.svg?logo=liberapay"></p>
</td>
</tr>
</table>
</div>
</body>
</html>