OJD: Add recent changes list
[eidogo-ojd.git] / upload.phtml
blobb42a09e9f96ee05c267132db72428de27623492e
1 <?php include("header.phtml"); ?>
3 <style type="text/css">
4 form {
5     margin: 0 0 15px 0;
6     padding: 0;
8 input[type=submit] {
9     display: block;
10     margin: 10px 0 0 0;
12 #fetch-form input[name=url] {
13     width: 400px;
14     display: block;
16 #paste-form textarea {
17     width: 400px;
18     height: 200px;
19     display: block;
21 h3 {
22     padding-top: 10px;
23     border-top: 1px solid #aaa;
25 ul {
26     margin: 10px 0 20px 0;
27     padding: 0 0 0 20px;
29 ul p {
30     margin: 0;
31     padding: 0;
32     zoom: normal;
34 ul li {
35     margin: 0 0 10px 0;
36     padding: 0;
37     zoom: normal;
39 </style>
41 <div id="text-content">
43 <h2>Upload SGF</h2>
45 <p><strong>Please note:</strong></p>
47 <ul>
48     <li><p>Any games you upload will be publicly viewable.</p></li>
49     <li><p>Copyright laws on game records vary from country to country.
50         It is your responsibility to upload only SGF
51         files that are legal for you to upload. Games with commentary are generally
52         copyrighted and you should not upload them without the owner's permission.
53         Copyrighted games uploaded without permission will be removed.</p></li>
54 </ul>
56 <h3>SGF File Upload</h3>
58 <form id="upload-form" action="php/upload.php" method="post" enctype="multipart/form-data">
59     <input type="hidden" name="type" value="file">
60     <input type="file" name="sgf_file">
61     <input type="submit" value="Upload">
62 </form>
64 <h3>Fetch SGF from a URL</h3>
66 <form id="fetch-form">
67     <input name="url">
68     <input type="submit" value="Fetch">
69 </form>
71 <h3>Paste Raw SGF</h3>
73 <form id="paste-form" action="php/upload.php" method="post">
74     <input type="hidden" name="type" value="paste">
75     <textarea name="sgf"></textarea>
76     <input type="submit" value="Upload">
77 </form>
79 </div>
81 <script type="text/javascript">
82 eidogo.util.addEvent(eidogo.util.byId('fetch-form'), "submit", function(evt) {
83     if (!(/http:\/\//.test(this.url.value))) {
84         this.url.value = "http://" + this.url.value;
85     }
86     location.href = "/#url:" + this.url.value;
87     eidogo.util.stopEvent(evt);
88 });
89 </script>
91 <?php include("footer.phtml"); ?>