function vam_getDownloads() { $files = array(); $dir = DIR_FS_CATALOG . 'download/'; if ($fp = opendir($dir)) { while ($file = readdir($fp)) { if (is_file($dir . $file) && $file != '.htaccess') { $size = filesize($dir . $file); $files[] = array('id' => $file, 'text' => $file . ' | ' . vam_format_filesize($size), 'size' => $size, 'date' => date("F d Y H:i:s.", filemtime($dir . $file))); } //if } // while closedir($fp); } return $files; }
<td class="infoBoxHeading"><?php echo SELECT; ?> </td> </tr> <tr> <td> </td> <td> <?php $files = array(); echo vam_draw_form('import', FILENAME_CSV_BACKEND, 'action=import', 'POST', 'enctype="multipart/form-data"'); if ($dir = opendir(DIR_FS_CATALOG . 'import/')) { while (($file = readdir($dir)) !== false) { if (is_file(DIR_FS_CATALOG . 'import/' . $file) and $file != ".htaccess") { $size = filesize(DIR_FS_CATALOG . 'import/' . $file); $files[] = array('id' => $file, 'text' => $file . ' | ' . vam_format_filesize($size)); } } closedir($dir); } echo vam_draw_pull_down_menu('select_file', $files, ''); echo '<br/><span class="button"><button type="submit" value="' . BUTTON_IMPORT . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/import.png', '', '12', '12') . ' ' . BUTTON_IMPORT . '</button></span>'; ?> </form> </td> </tr> </table> <p> </p></td> </tr> </table>
<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"; } } closedir($d);
// 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 for ($i = 0, $n = sizeof($products_ids); $i < $n; $i++) {