This repository has been archived by the owner on Jan 19, 2022. It is now read-only.
forked from jkk/eidogo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
upload.phtml
91 lines (77 loc) · 2.06 KB
/
upload.phtml
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
<?php $title = "Upload SGF"; include("header.phtml"); ?>
<style type="text/css">
form {
margin: 0 0 15px 0;
padding: 0;
}
input[type=submit] {
display: block;
margin: 10px 0 0 0;
}
#fetch-form input[name=url] {
width: 400px;
display: block;
}
#paste-form textarea {
width: 400px;
height: 200px;
display: block;
}
h3 {
padding-top: 10px;
border-top: 1px solid #aaa;
}
ul {
margin: 10px 0 20px 0;
padding: 0 0 0 20px;
}
ul p {
margin: 0;
padding: 0;
zoom: normal;
}
ul li {
margin: 0 0 10px 0;
padding: 0;
zoom: normal;
}
</style>
<div id="text-content">
<h2>Upload SGF</h2>
<p><strong>Please note:</strong></p>
<ul>
<li><p>Any games you upload will be publicly viewable.</p></li>
<li><p>Copyright laws on game records vary from country to country.
It is your responsibility to upload only SGF
files that are legal for you to upload. Games with commentary are generally
copyrighted and you should not upload them without the owner's permission.
Copyrighted games uploaded without permission will be removed.</p></li>
</ul>
<h3>SGF File Upload</h3>
<form id="upload-form" action="backend/upload.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="type" value="file">
<input type="file" name="sgf_file">
<input type="submit" value="Upload">
</form>
<h3>Fetch SGF from a URL</h3>
<form id="fetch-form">
<input name="url">
<input type="submit" value="Fetch">
</form>
<h3>Paste Raw SGF</h3>
<form id="paste-form" action="backend/upload.php" method="post">
<input type="hidden" name="type" value="paste">
<textarea name="sgf"></textarea>
<input type="submit" value="Upload">
</form>
</div>
<script type="text/javascript">
eidogo.util.addEvent(eidogo.util.byId('fetch-form'), "submit", function(evt) {
if (!(/http:\/\//.test(this.url.value))) {
this.url.value = "http://" + this.url.value;
}
location.href = "/#url:" + this.url.value;
eidogo.util.stopEvent(evt);
});
</script>
<?php include("footer.phtml"); ?>