Location: PHPKode > projects > XBR > mastop_publish/include/mpu_files_list.js.php
<?PHP
### =============================================================
### Mastop InfoDigital - Paixão por Internet
### =============================================================
### Arquivo que gera a lista de imagens para exibir no Option
### List do TinyMCE
### =============================================================
### Developer: Fernando Santos (topet05), hide@address.com
### Copyright: Mastop InfoDigital © 2003-2006
### -------------------------------------------------------------
### www.mastop.com.br
### =============================================================
### $Id: mpu_files_list.js.php,v 1.1.1.1 2007/01/31 19:30:00 topet05 Exp $
### =============================================================
include_once("../../../mainfile.php");
include_once("../admin/admin_header.php");
$xoopsLogger->activated = false;
$ret = "";
if (!is_object($xoopsUser) || !$xoopsUserIsAdmin) {
	die("Oops!");
}
$criterio = new CriteriaCompo(new Criteria("fil_12_exibir", 1));
$criterio->setSort("fil_30_nome");
$fil_classe = new mpu_fil_files();
$files = $fil_classe->PegaTudo($criterio);
if ($fil_classe->total > 0) {

	foreach ($files as $fil) {
		$ext = (substr($fil->getVar('fil_30_arquivo'), -4,1) == ".") ? substr($fil->getVar('fil_30_arquivo'), -4) : substr($fil->getVar('fil_30_arquivo'), -5);
		$ret .= '["'.$fil->getVar('fil_30_nome').'  ('.$ext.')", "'.MPU_FILES_URL.'/'.$fil->getVar('fil_30_arquivo').'"],';
	}
	$ret = substr($ret, 0, -1);
}
?>
var tinyMCELinkList = new Array(
	<?=$ret;?>
);
Return current item: XBR