array('url'=>'full url', 'storage'=>'full file path')
require_once('config.inc.php'); require_once($GLOBALS['g_campsiteDir']."/$ADMIN_DIR/lib_campsite.php"); require_once('classes/AttachmentManager.php'); $manager = new AttachmentManager($AMConfig); $languageSelected = (isset($_REQUEST['language_selected']) && is_numeric($_REQUEST['language_selected'])) ? $_REQUEST['language_selected'] : null; $articleId = (isset($_REQUEST['article_id']) && is_numeric($_REQUEST['article_id'])) ? $_REQUEST['article_id'] : null; // Get the list of files and directories $list = array(); if (!is_null($articleId)) { $list = $manager->getFiles($articleId, $languageSelected); } /** * Draw the files in a table. */ function drawFiles($list, &$manager) { global $languageSelected, $Campsite; $counter = 0; foreach($list as $entry => $file) { $counter++; $languageId = ($file['attachment']->getLanguageId()) ? $file['attachment']->getLanguageId() : $languageSelected;