<?cs include:"super_util.cs" ?>

<?cs def:print_button(value, url, help, winname) ?>
  <input type="button"  value="<?cs var:value ?>" title="<?cs var:help ?>" onclick="window.open('<?cs var:url ?>','<?cs var:winname ?>','menubar=1,resizable=1,width=700,height=600,top=20,left=20,scrollbars=1')" />
<?cs /def ?>
<?cs def:print_delete_button(value, url, help, winname) ?>
  <input type="button"  value="<?cs var:value ?>" title="<?cs var:help ?>" onclick="window.open('<?cs var:url ?>','<?cs var:winname ?>','menubar=0,resizable=0,width=300,height=200,top=20,left=20,scrollbars=0')" />
<?cs /def ?>

<?cs def:print_log_files() ?>
  <div><form action="">
  <table cellspacing="0" cellpadding="3" border="1">
  <tr>
     <?cs each:this = lang.super_stat_list.heading ?>
      <th><?cs var:this ?></th>
      <?cs /each ?> 
  </tr>
  <?cs each:one = log ?>
    <tr>
      <td><?cs var:lang.super_stat_list.history[one.history] ?></td>
      <td><?cs var:one.filename ?></td>
      <td><?cs var:one.last_time ?></td>
      <td><?cs var:one.size ?></td>
      <td><?cs call:print_button(lang.super_stat_list.all[0], one.g_url, lang.super_stat_list.all[0].help, "graphwin") ?></td>
      <td><?cs call:print_button(lang.super_stat_list.all[1], one.d_url, lang.super_stat_list.all[1].help, "datawin") ?></td>
    <?cs if:one.delete_url ?>
      <td><?cs call:print_delete_button(lang.super_stat_list.delete, one.delete_url, lang.super_stat_list.delete_help, "deletewin") ?></td>
      <?cs else ?>
      <td>&nbsp;</td> 
    <?cs /if ?>
  </tr>
  <?cs /each ?> 
 </table>
 </form></div> 
<?cs /def ?>

<?cs def:print_content() ?>
<fieldset>
  <legend><?cs var:lang.super_stat_list.page_title ?></legend>
<table width="100%">
<tr><td align="center">
  <div><form action="">
  <h4>
    <?cs var:lang.super_stat_list.all_log_file ?>
   <?cs call:print_button(lang.super_stat_list.all[0], all_url, lang.super_stat_list.all[0].help, "graphwin") ?>
   <?cs call:print_button(lang.super_stat_list.all[1], all_g_url, lang.super_stat_list.all[1].help, "datawin") ?>
   <?cs call:print_button(lang.super_stat_list.all[2], all_admin_url, lang.super_stat_list.all[2].help, "adminwin") ?>
  </h4>
 </form></div>
 <?cs call:print_log_files() ?>
</td></tr>
</table>
</fieldset>
<?cs /def ?>

<?cs call:html_header() ?>
   <head>
      <title><?cs var:lang.super_stat_list.page_title ?></title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   <link rel="StyleSheet" href="<?cs var:image_path ?>super_template.css" type="text/css"  />
   <?cs call:addDoIMenu() ?>
  </head>
<body>
<div id="container">
  <?cs call:top_container() ?>
  <?cs call:doIMenu() ?>
  <div id="content">
   <?cs call:print_content() ?>
  </div>
</div>
</body>
</html>
<?cs call:runtime() ?>
