Пример #1
0
$periodoActual = date("Y-m");
$periodos = array();

if (is_dir($dir))
	if ($gd = opendir($dir)) {
		while (($ano = readdir($gd)) !== false)
			if (($ano != ".") and ($ano != "..") and (is_dir($dir."/".$ano)))
				if ($gd2 = opendir($dir."/".$ano)) {
					while (($mes = readdir($gd2)) !== false)
						if (($mes != ".") and ($mes != ".."))
							if ($ano."-".$mes != $periodoActual)
								array_push($periodos, $ano."-".$mes);
					closedir($gd2);
				}
		closedir($gd);
	}
rsort($periodos);		// Ordeno el array descendentemente..


foreach($periodos as $value) {
	$vals = explode("-", $value);
	$list->addItem(new ItemList("/boletin-oficial/".$vals[0]."/".$vals[1], "Boletines del Mes de ".getMonthName(date("m", strtotime($vals[1]."/1/2000")))." ".$vals[0], "_self", false, true));
}

$list->setCols(1);
$list->setColsWidth(320);
$list->setImagePath("/modules/boletin_oficial/images/flecha.gif");
$list->setTitleAlign("center");
$list->draw();
?>
<a href="/boletin-oficial"><input class="btnVolver" type="button" value="" /></a>
Пример #2
0
</script>
<body link="#00539B" vlink="#00539B" alink="#00539B">
<?
validarParametro(isset($_REQUEST["mes"]));

$dir = DATA_BOLETIN_OFICIAL_PATH.date($_REQUEST["ano"]."/".$_REQUEST["mes"]."/");
$folders = array();
$list = new ListOfItems("", "Boletines ".GetMonthName($_REQUEST["mes"])." ".$_REQUEST["ano"]);

if (is_dir($dir))
	if ($gd = opendir($dir)) {
		while (($dia = readdir($gd)) !== false)
			if (($dia != ".") and ($dia != ".."))
				array_push($folders, $dia);
		closedir($gd);
	}
rsort($folders);		// Ordeno el array descendentemente..


foreach($folders as $value)
	$list->addItem(new ItemList("/index.php?pageid=15&dia=".$value."&mes=".$_REQUEST["mes"]."&ano=".$_REQUEST["ano"], "Boletín Oficial del día ".$value." de ".GetMonthName($_REQUEST["mes"])." de ".$_REQUEST["ano"], "_self", false, true));

$list->setCols(2);
$list->setColsWidth(320);
$list->setImagePath("/modules/boletin_oficial/images/flecha.gif");
$list->setTitleAlign("left");
$list->draw();
?>
<p>&nbsp;</p>
<p><a href="index.php?pageid=16" style="text-decoration: none; font-weight: 700"><< VOLVER</a></p>
</body>