Exemple #1
0
    <td class="boxCenter" valign="top">
    
    <h1 class="contentBoxHeading"><?php 
echo HEADING_TITLE;
?>
</h1>
    
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td><table width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td>

<?php 
echo TEXT_CACHE_DIRECTORY . $dir . "<br />\n";
echo vam_spaceUsed($dir);
echo USED_SPACE . vam_format_filesize($total) . " including .htaccess<br />\n";
if ($i >= 1) {
    echo TEXT_TOTAL_FILES . $i . "<br /><br />\n";
    ###### uncomment if you want to show cache files ######
    /*
      echo TEXT_FILES."<br />\n";
    
      if ($d = opendir($dir)) {
    
      echo '<div style="overflow:auto;height:200px;border-style:inset;padding:1em;">';
        while (false !== ($file = readdir($d))) {
          if ($file != "." && $file != ".." && $file !=".htaccess") {
            echo $file."<br />\n";
          }
        }
function vam_spaceUsed($dir)
{
    if (is_dir($dir)) {
        if ($dh = opendir($dir)) {
            while (($file = readdir($dh)) !== false) {
                if (is_dir($dir . $file) && $file != '.' && $file != '..') {
                    vam_spaceUsed($dir . $file . '/');
                } else {
                    $GLOBALS['total'] += filesize($dir . $file);
                }
            }
            closedir($dh);
        }
    }
}
if (!$_GET['action']) {
    // products content
    // load products_ids into array
    $products_id_query = vam_db_query("SELECT DISTINCT\n                                pc.products_id,\n                                pd.products_name\n                                FROM " . TABLE_PRODUCTS_CONTENT . " pc, " . TABLE_PRODUCTS_DESCRIPTION . " pd\n                                WHERE pd.products_id=pc.products_id and pd.language_id='" . (int) $_SESSION['languages_id'] . "'");
    $products_ids = array();
    while ($products_id_data = vam_db_fetch_array($products_id_query)) {
        $products_ids[] = array('id' => $products_id_data['products_id'], 'name' => $products_id_data['products_name']);
    }
    // while
    ?>
 <div class="pageHeading"><br /><?php 
    echo HEADING_PRODUCTS_CONTENT;
    ?>
<br /></div>
  <?php 
    vam_spaceUsed(DIR_FS_CATALOG . 'media/products/');
    echo '<div class="main">' . USED_SPACE . vam_format_filesize($total) . '</div></br>';
    ?>
      
<table border="0" width="100%" cellspacing="2" cellpadding="0" class="contentListingTable">
    <tr class="dataTableHeadingRow">
     <td class="dataTableHeadingContent" nowrap width="5%" ><?php 
    echo TABLE_HEADING_PRODUCTS_ID;
    ?>
</td>
     <td class="dataTableHeadingContent" width="95%" align="left"><?php 
    echo TABLE_HEADING_PRODUCTS;
    ?>
</td>
</tr>
<?php