<?php
/*
    CREATIVE COMMONS - Attribution-No Derivative Works 3.0 Germany:
    - You may not alter, transform, or build upon this work.
    - Dieses Werk darf nicht bearbeitet oder in anderer Weise verändert werden.
*/
  $_SESSION['MenuReminderAdmin'] = $page;
  if ( !IsUserAdmin() ) echo $L_015;
  else
  {
    include ('functions/export.php');
    include ('functions/export/gigs.php');
    include ('functions/export/guestbook.php');
    include ('functions/export/news.php');
    include ('functions/export/setup.php');
    include ('functions/export/user.php');
    $directory = 'export';
    $handle=opendir ($directory);
    while ($file = readdir ($handle))
    if ($file != "." && $file != "..") { $files[] = $file; }
    sort ( $files );
    //Dateien zählen
      $AnzahlDateien = count($files);
      if ($AnzahlDateien == 0) { echo $L_034; }
    else
    {
      echo '<table summary="Export">
              <tr>
                <th>'.$AnzahlDateien.' '.$L_034.'</th>
                <th>'.$L_035.'</th>
              </tr>';
      $handle=opendir ($directory);
      while ($file = readdir ($handle))
      {
    	  if ($file != "." && $file != "..")
        {
		      $filesize =filesize('export/'.$file);
          $filesize = ceil($filesize/1024).' KB';
          if ($filesize >= 1024) {$filesize = round($filesize/1024,3).' MB';}
		      echo '<tr>
                  <td>
        	          <a href="export/'.$file.'">'.$file.'</a>
                  </td>
                  <td class="TabellenSpalte_Rechts" style="text-align:right">'.$filesize.'</td>
                </tr>';
    	  }
	    }
      echo '</table>';
    }
    closedir($handle);
  }
?>