<?xml version="1.0" encoding="EUC-JP"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja">

 <head>
  <!--  -->
  <meta http-equiv="content-type" content="application/xhtml+xml; charset=EUC-JP" />
  <meta http-equiv="content-style-type" content="text/css" />
  <title>mod_uploader</title>
  <link rel="stylesheet" type="text/css" href="../css/default.css" media="screen" />
  <link rel="shortcut icon" href="../img/favicon.ico" />
  <script type="text/javascript">
   var uploaderURL;

   function init()
   {
       uploaderURL = document.URL.split('?')[0];

       document.getElementById('upload').onsubmit = startUpload;
   }

   function startUpload()
   {
       var uploadID;

       uploadID = Math.floor(Math.random()*(Math.pow(2, 32)-1)) + 1; // 1 ʾˤ롥

       this.action += '?' + uploadID;
       window.open(uploaderURL + 'progress/?' + uploadID, '_blank',
                   'width=800,height=300,toolbar=no,location=no,directories=no,status=no,menubar=no');

       return true;
   }
  </script>
 </head>

 <body onload="init()">

  <div>
   <a href="./" title="Ĥ">
    <img src="../img/mod_uploader.png" width="350" height="56" alt="mod_uploader" class="title" />
   </a>
  </div>

  <h1>File Upload</h1>

  <div class="description">
   $MAX_FILE_SIZE ޤǤΥΥե뤬åץɲǽǤ
   (DL pass: ɥѥɡRM pass: ѥ)
  </div>

  <form method="post" enctype="multipart/form-data" action="upload/" id="upload">
   <div>
  <table>
     <tr>
      <td><label for="upload_file" accesskey="F">file:</label></td>
      <td><input type="file" name="file" value="" size="50" id="upload_file" /></td>
     </tr>
     <tr>
      <td><label for="upload_comment" accesskey="C">comment:</label></td>
      <td>
       <input type="text" name="comment" value="" size="50" maxlength="256" id="upload_comment" />
       <label for="download_pass" accesskey="D">DL pass:</label>
       <input type="password" name="download_pass" value="" size="8" maxlength="8" id="download_pass" />
       <label for="remove_pass" accesskey="R">RM pass:</label>
       <input type="password" name="remove_pass" value="" size="8" maxlength="8" id="remove_pass" />
       <input type="hidden" name="code_pat" value="" />
       <input type="submit" name="submit" value="" class="submit" />
      </td>
     </tr>
    </table>
   </div>
  </form>

  <h1>File List</h1>

  <div class="description">
    ߡ$TOTAL_FILE_SIZE ($TOTAL_FILE_NUMBER ) Υե뤬åץɤƤޤ
    [<a href="thumbnail/"><em>ͥ</em></a>]
    [<a href="javascript:location.reload(true)"><em></em></a>]
  </div>

  <div class="page_info">
   <!--@
   print "Page: ";
   i = 0;
   while (i++ < PAGE_NUMBER) {
       if (i == CURRENT_PAGE) {
           print "[ <em>", i, "</em> ]";
       } else {
           print "[<a href=\"?", i, "\">", i, "</a>]";
       }
   }
   @-->
  </div>

  <table class="file">
   <tr>
    <th class="download"></th>
    <th class="name">NAME</th>
    <th class="comment">COMMENT</th>
    <th class="size">SIZE</th>
    <th class="mime">MIME</th>
    <th class="date">DATE</th>
    <th class="remove"></th>
   </tr>
<!--@ foreach (file in FILE_LIST) { @-->
   <tr>
    <td class="download"><a href="download/${file.path}?dl">DL</a></td>
    <td class="name"><a href="download/${file.path}">${file.name}</a></td>
    <td class="comment">${file.comment}</td>
    <td onclick="alert('MD5: ${file.digest}')" class="size">${file.size}</td>
    <td class="mime">${file.mime}</td>
    <td class="date">${file.time }</td>
    <td class="remove">
     <div onclick="javascript:
                   document.forms['remove'].elements['name'].value='${file.name}';
                   document.forms['remove'].elements['file'].value='${file.path}';
                   document.forms['remove'].elements['remove_pass'].focus();">D</div>
    </td>
   </tr>
<!--@ } @-->
  </table>

  <div class="page_info">
   <!--@
   print "Page: ";
   i = 0;
   while (i++ < PAGE_NUMBER) {
       if (i == CURRENT_PAGE) {
           print "[ <em>", i, "</em> ]";
       } else {
           print "[<a href=\"?", i, "\">", i, "</a>]";
       }
   }
   @-->
  </div>

  <h1>File Delete</h1>

  <div class="description">
   եαüˤDפ򥯥åȡ
   RM pass ꤷѥɤϤƤ( Javascript)
  </div>

  <form method="post" action="remove/" id="remove">
   <div>
  <table>
     <tr>
      <td><label for="rm_file" accesskey="F">file:</label></td>
      <td><input type="text" name="name" value="" size="30" id="rm_file" /></td>
      <td><label for="rm_remove_pass" accesskey="P">pass:</label></td>
      <td><input type="password" name="remove_pass" value="" size="8" maxlength="8" id="rm_remove_pass" /></td>
      <td><input type="submit" name="submit" value="" class="submit" /></td>
      <td><input type="hidden" name="file" value="" /></td>
     </tr>
    </table>
   </div>
  </form>

  <hr class="footer" />

  <div class="footer">
   Copyright(C) 2005 acapulco.dyndns.org
  </div>

  <div class="package_info">
   <a href="http://acapulco.dyndns.org/mod_uploader/">@PACKAGE_NAME@/@PACKAGE_VERSION@ is Free!</a>
  </div>

  <div class="validator">
   <a href="http://validator.w3.org/check?uri=referer">
    <img src="http://www.w3.org/Icons/valid-xhtml11" alt="Valid XHTML 1.1!" height="31" width="88" />
   </a>
   <a href="http://jigsaw.w3.org/css-validator/check/referer">
    <img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" height="31" width="88" />
   </a>
  </div>
  <div class="rss">
   <a href="rss">
    <img src="../img/rss.png" alt="RSS 1.0" height="14" width="60" />
   </a>
  </div>

 </body>

</html>
