-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgui_message_round_finalized_error_02.php
186 lines (161 loc) · 8.15 KB
/
gui_message_round_finalized_error_02.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
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
<?php
//ini_set('display_errors', 1);
//ini_set('display_startup_errors', 1);
//error_reporting(E_ALL);
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 8");
}
$unitIDsNotFinished = $_GET['units'];
// Get data from db
$pid = $_SESSION['playerid'];
$gid = $_SESSION['gameid'];
$pimage = $_SESSION['playerimage'];
$isAdmin = $_SESSION['isAdmin'];
$opt3 = $_SESSION['option3'];
$playMode = $opt3;
$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): Message</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="viewport" content="width=device-width, initial-scale=0.75, minimum-scale=0.75, maximum-scale=1.85, user-scalable=yes" />
<meta http-equiv="refresh" content="2; URL=gui_select_unit.php">
<link rel="manifest" href="./manifest.json">
<!-- <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css"> -->
<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="icon" href="./favicon.png" type="image/png">
<link rel="shortcut icon" href="./images/icon_196x196.png" type="image/png" sizes="196x196">
<link rel="apple-touch-icon" href="./images/icon_57x57.png" type="image/png" sizes="57x57">
<link rel="apple-touch-icon" href="./images/icon_72x72.png" type="image/png" sizes="72x72">
<link rel="apple-touch-icon" href="./images/icon_76x76.png" type="image/png" sizes="76x76">
<link rel="apple-touch-icon" href="./images/icon_114x114.png" type="image/png" sizes="114x114">
<link rel="apple-touch-icon" href="./images/icon_120x120.png" type="image/png" sizes="120x120">
<link rel="apple-touch-icon" href="./images/icon_144x144.png" type="image/png" sizes="144x144">
<link rel="apple-touch-icon" href="./images/icon_152x152.png" type="image/png" sizes="152x152">
<link rel="apple-touch-icon" href="./images/icon_180x180.png" type="image/png" sizes="180x180">
<!-- 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/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;
}
</style>
</head>
<body>
<script>
$(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 = "14.5%"; // 7 columns
} else {
$buttonWidth = "20.4%"; // 5 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_select_unit.php'" style="width: 100px;background:rgba(81,125,37,1.0);">
<div style='vertical-align:middle;font-size:28px;color:#fff;'> 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 ?>"><div class='unitselect_button_normal'><a href='./gui_select_unit.php'>ROSTER</a><br><span style='font-size:16px;'>Choose a unit</span></div></td>
<td style="width:5px;"> </td>
<?php
if ($playMode) {
echo " <td nowrap onclick=\"location.href='./gui_select_formation.php'\" width=".$buttonWidth."><div class='unitselect_button_normal'><a href='./gui_select_formation.php'>CHALLENGE</a><br><span style='font-size:16px;'>Batchall & bidding</span></div></td><td style='width:5px;'> </td>\n";
}
if (!$playMode) {
echo " <td nowrap onclick=\"location.href='./gui_assign_unit.php'\" width=".$buttonWidth."><div class='unitselect_button_normal'><a href='./gui_assign_unit.php'>ASSIGN</a><br><span style='font-size:16px;'>Assign unit</span></div></td><td style='width:5px;'> </td>\n";
echo " <td nowrap onclick=\"location.href='./gui_create_unit.php'\" width=".$buttonWidth."><div class='unitselect_button_normal'><a href='./gui_create_unit.php'>ADD</a><br><span style='font-size:16px;'>Create a unit</span></div></td><td style='width:5px;'> </td>\n";
echo " <td nowrap onclick=\"location.href='./gui_create_game.php'\" width=".$buttonWidth."><div class='unitselect_button_active'><a href='./gui_create_game.php'>GAME</a><br><span style='font-size:16px;'>Game settings</span></div></td><td style='width:5px;'> </td>\n";
if ($isAdmin) {
echo " <td nowrap onclick=\"location.href='./gui_create_player.php'\" width=".$buttonWidth."><div class='unitselect_button_normal'><a href='./gui_create_player.php'>PLAYER</a><br><span style='font-size:16px;'>Manage players</span></div></td><td style='width:5px;'> </td>\n";
echo " <td nowrap onclick=\"location.href='./gui_admin.php'\" width=".$buttonWidth."><div class='unitselect_button_normal'><a href='./gui_admin.php'>ADMIN</a><br><span style='font-size:16px;'>Administration</span></div></td><td style='width:5px;'> </td>\n";
}
}
?>
<td nowrap onclick="location.href='./gui_edit_option.php'" width="<?php echo $buttonWidth ?>"><div class='unitselect_button_normal'><a href='./gui_edit_option.php'>OPTIONS</a><br><span style='font-size:16px;'>Change options</span></div></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>
</table>
</div>
<div id="liberapay"><a href="./gui_support.php"><i class="fa-solid fa-handshake-simple"></i></a></div>
<div id="disclaimer"><a href="./gui_disclaimer.php">Disclaimer</a></div>
<br>
<div>
<table class="options" cellspacing=4 cellpadding=4 border=0px>
<tr>
<td align="center" class='datalabel'>
<p>Round was not changed!</p>
<p style="font-family:'Pathway Gothic One',sans-serif,bold;font-size:40px;color:yellow;">Check units!</p>
</td>
</tr>
</table>
</div>
</body>
</html>