<?xml version="1.0" encoding="ISO-8859-1"?>
<!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="en">

 <head>
  <meta http-equiv="content-type" content="application/xhtml+xml; charset=ISO-8859-1" />
  <meta http-equiv="content-style-type" content="text/css" />
  <title>mod_uploader</title>
  <link rel="alternate" type="application/rss+xml" title="mod_uploader" href="${BASE_URL}/rss/" />
  <link rel="stylesheet" type="text/css" href="${BASE_URL}/../up_css/default.css" media="screen" />
  <link rel="shortcut icon" href="${BASE_URL}/../up_img/favicon.ico" />
  <script type="text/javascript" src="${BASE_URL}/../up_js/progress.js" charset="ISO-8859-1"></script>
  <script type="text/javascript">
   <!--
   var uploaderURL = "${BASE_URL}";

   function initUploadForm()
   {
       // If you do not use progress report of file upload,
       // remove the following two lines.
       document.getElementById('upload').onsubmit = startUpload;
       document.getElementById('upload').target = 'dummy';
   }
   -->
  </script>

 </head>

 <body onload="initUploadForm()">

  <div>
   <a href="${BASE_URL}">
    <img src="${BASE_URL}/../up_img/title.png" width="350" height="56" alt="mod_uploader" class="title" />
   </a>
  </div>

  <h1>File Upload</h1>

  <div class="description">
   You can upload files of up to $MAX_FILE_SIZE.
   (DL pass: password for DownloadĦ¤RM pass: password for Removal)
  </div>

  <form method="post" enctype="multipart/form-data" action="${BASE_URL}/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="submit" name="submit" value="Upload" class="submit" />
      </td>
     </tr>
    </table>
   </div>
  </form>

  <div class="progress" id="progress" style="display: none">
    <div id="progress_info">Loading...</div>
    <div style="background-image: url(${BASE_URL}/../up_img/bar_back.png); width: 600px;" class="bar_graph"><img src="${BASE_URL}/../up_img/bar_fore.png" width="1" height="16" alt="" id="progress_bar" /></div>
  </div>

  <iframe name="dummy" id="dummy" style="display: none"></iframe>

  <h1>File List</h1>

  <div class="description">
    Total $TOTAL_FILE_SIZE, $TOTAL_FILE_NUMBER files are available.
    [<a href="${BASE_URL}/thumbnail/"><em>Thumbnail</em></a>]
    [<a href="javascript:location.reload(true)"><em>Reload</em></a>]
  </div>

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

  <table class="file">
   <tr>
    <th class="index">NO</th>
    <th class="name">NAME</th>
    <th class="download"></th>
    <th class="comment">COMMENT</th>
    <th class="size">SIZE</th>
    <th class="mime">MIME</th>
    <th class="date">DATE</th>
    <th class="download_count">COUNT</th>
    <th class="remove"></th>
   </tr>
<!--@ foreach (item in ITEM_LIST) { @-->
   <tr>
    <td class="index">${item.index}</td>
    <td class="name"><a href="${BASE_URL}/download/${item.id}.${item.file_ext}">${item.file_name}</a></td>
    <td class="download">
     <a href="${BASE_URL}/download/${item.id}.${item.file_ext}/attatch">
      <img src="${BASE_URL}/../up_img/icon_download.png" alt="DL" height="14" width="14" />
     </a>
    </td>
    <td class="comment">${item.comment}</td>
    <td onclick="alert('MD5: ${item.file_digest}')" class="size">${item.file_size}</td>
    <td class="mime">${item.file_mime}</td>
    <td class="date">${item.date}</td>
    <td class="download_count">${item.download_count}</td>
    <td class="remove">
     <div onclick="javascript:
                   document.forms['remove'].elements['name'].value='${item.file_name}';
                   document.forms['remove'].elements['id'].value='${item.id}';
                   document.forms['remove'].elements['remove_pass'].focus();">D</div>
    </td>
   </tr>
<!--@ } @-->
  </table>

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

  <h1>File Delete</h1>

  <div class="description">
   Click "D" of right hand of the file you want to remove, and input the password to RM pass.
   (Javascript is required)
  </div>

  <form method="post" enctype="multipart/form-data" action="${BASE_URL}/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="Remove" class="submit" /></td>
      <td><input type="hidden" name="id" value="" /></td>
     </tr>
    </table>
   </div>
  </form>

  <hr class="footer" />

  <div class="footer">
   Copyright(C) 2006 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="${BASE_URL}/../up_img/icon_valid_xhtml.png" alt="Valid XHTML 1.1!" height="31" width="88" />
   </a>
   <a href="http://jigsaw.w3.org/css-validator/check/referer">
    <img src="${BASE_URL}/../up_img/icon_valid_css.png" alt="Valid CSS!" height="31" width="88" />
   </a>
  </div>
  <div class="rss">
   <a href="${BASE_URL}/rss/">
    <img src="${BASE_URL}/../up_img/icon_feed.png" alt="RSS 1.0" height="16" width="16" />
   </a>
  </div>

 </body>

</html>
