-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathboard18BoxLoad.php
More file actions
126 lines (125 loc) · 4.1 KB
/
board18BoxLoad.php
File metadata and controls
126 lines (125 loc) · 4.1 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
<?php
/*
* This page is a tool for loading a game box from a zip file.
*
* Copyright (c) 2016 Richard E. Price under the The MIT License.
* A copy of this license can be found in the LICENSE.text file.
*/
/*
require_once('auth.php');
if ($playerlevel != 'admin' && $playerlevel != 'author') {
error_log("gameGet: Not an admin or author level player");
echo $errResp;
exit;
}
*/
require_once('php/rm_r.php');
require_once('php/loadGameBox.php');
if(isset($_POST['submit'])) { // If reload via zform submit.
$reportout = loadBox($_FILES);
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>BOARD18 - Remote Play Tool For 18xx Style Games</title>
<link rel="shortcut icon" href="images/favicon.ico" >
<link rel="stylesheet" href="style/board18com-160521.css" />
<link rel="stylesheet" href="style/board18BoxLoad.css" />
<script type="text/javascript" src="scripts/jquery.js">
</script>
<script type="text/javascript" src="scripts/jquery.ui.position.js">
</script>
<script type="text/javascript" src="scripts/board18com.js">
</script>
<script type="text/javascript" src="scripts/board18BoxLoad.js">
</script>
<script type="text/javascript" >
$(function() {
if (!window.File) { // Check for File API support.
// The File API is not supported.
alert('The file upload API is not supported on this browser.');
}
$('#content .error').hide();
$('#zfile').val('');
<?php
if (isset($_POST['submit'])) { // If reload via zform submit.
echo "zipBoxOk($reportout);";
}
?>
$('#buttonz2').click(function() {
$('#content .error').hide();
$('#zfile').val('');
return false;
}); // end buttonz2 click
$('#buttonz3').click(function() {
window.location = 'board18Admin.php';
return false;
}); // end buttonz3 click
$('#buttonf').click(function() {
$('#failmsg').hide();
return false;
}); // end buttonf click
$('#buttons').click(function() {
$('#successmsg').hide();
return false;
}); // end buttons click
}); // end ready
</script>
</head>
<body>
<div id="topofpage">
<div id="logo">
<img src="images/logo.png" alt="Logo"/>
</div>
<div id="heading">
<h1>BOARD18 - Remote Play Tool For 18xx Style Games</h1>
</div>
</div>
<div id="leftofpage">
</div>
<div id="rightofpage">
<div id="content">
<form action="board18BoxLoad.php" method="post"
name="loadbox" class="boxform" id="zform"
enctype="multipart/form-data">
<fieldset>
<p>
<label for="zfile">Select ZIP file to upload:</label><br>
<input type="file" id="zfile" name="zfile" required/>
<label class="error" for="zfile" id="zfile_error"></label>
</p>
<p>
<input type="submit" name="submit" class="zfbutton"
id="buttonz1" value="Load Gamebox" >
<input type="button" name="resbutton" class="zfbutton"
id="buttonz2" value="Reset Form">
<input type="button" name="canbutton" class="zfbutton"
id="buttonz3" value="Exit"><br>
</p>
<p>
Loading the Gamebox may take a few minutes. Please be patient.
</p>
</fieldset>
</form>
</div>
<div id="successmsg" class="hidemsg">
<p>The game box creation was successful.
</p>
<p>You will be emailed a detailed report.
</p>
<input type="button" name="buttons" class="zfbutton"
id="buttons" value="Exit">
</div>
<div id="failmsg" class="hidemsg">
<p>The game box creation failed.
</p>
<p>You will be emailed a detailed report.
</p>
<input type="button" name="buttonf" class="zfbutton"
id="buttonf" value="Exit">
</div>
</div>
</body>
</html>