Exemple #1
0
" width="16" height="16" class="noborder" /><?php 
echo $template['index']['latestnews'];
?>
</h1>

				<!-- inserire codeswitch news-->
				<dl class="nav3-grid">
					<?php 
$latestnews = array();
news_scan_dir($docRoot . "/news/latest", $latestnews);
for ($i = 0; $i < 10; $i++) {
    if (basename($latestnews[$i]) == "") {
        break;
    }
    $x["dummy"] = "";
    news_read_entry($latestnews[$i], $x);
    echo "<dt><a href=\"?id=news&amp;story=" . basename($latestnews[$i]) . "&amp;dir=latest&amp;lang={$lang}\">" . $x["day"] . " " . $x["monthname"] . " " . $x["year"] . "<br />" . $x['short'] . "</a></dt>\n";
}
echo "<dt><a href=\"?id=news&amp;dir=latest&amp;lang={$lang}\">" . $template['index']['allnews'] . "</a></dt>";
?>
				</dl>

				<h1><img src="img/internet-web-browser.png" alt="<?php 
echo $template['index']['mirrors'];
?>
" class="noborder" /><?php 
echo $template['index']['mirrors'];
?>
</h1>
				<h3><?php 
echo $template['index']['wwwmirrors'];
Exemple #2
0
    return;
}
if ($dir != "") {
    echo "<h1>";
    if ($dir != "latest") {
        echo $template['news']['news'] . ": " . news_get_dir_description($dir);
    } else {
        echo $template['news']['latest'];
    }
    echo "</h1>";
    $latestnews = array();
    news_scan_dir($docRoot . "/news/{$dir}", $latestnews);
    $cnt = count($latestnews);
    for ($i = 0; $i < $cnt; $i++) {
        $content['dummy'] = "";
        if (news_read_entry($latestnews[$i], $content)) {
            echo "<li>";
            echo "<b>" . $content['year'] . "." . $content['month'] . "." . $content['day'] . " " . $content['hour'] . ":" . $content['minute'] . "</b><br />";
            echo $content['short'] . "<br />";
            echo "<a href=\"?id=news&amp;story=" . basename($latestnews[$i]) . "&amp;dir={$dir}&amp;lang={$lang}\">" . $template['news']['readmore'] . "...</a></li>";
        }
    }
}
echo "<li><a href=\"?id=news&amp;dir=latest&amp;lang={$lang}\">" . $template['news']['latest'] . "</a></li>";
$d = opendir($docRoot . "/news");
if ($d) {
    $cnt = 0;
    while (($file = readdir($d)) !== false) {
        if ($file != "." && $file != ".." && $file != ".svn" && $file != "latest") {
            $arry[$cnt] = $file;
            $cnt++;