Exemple #1
0
		<div class="main">
			<div class="main-navigation">
				<div class="round-border-topright"></div>
				<h1 class="first"><img src="img/internet-news-reader.png" alt="<?php 
echo $template['index']['latestnews'];
?>
" 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'];
?>
Exemple #2
0
		<div class="main">
			<div class="main-navigation">
				<div class="round-border-topright"></div>
				<h1 class="first"><img src="img/internet-news-reader.png" alt="<?php 
echo $template['index']['latestnews'];
?>
" 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);
    $news = $x['day'] . ' ' . $x['monthname'] . ' ' . $x['year'] . '<br />' . $x['short'];
    ?>
						<dt><a href="?id=news&amp;story=<?php 
    echo basename($latestnews[$i]);
    ?>
&amp;dir=latest&amp;lang=<?php 
    echo $lang;
    ?>
"><?php 
Exemple #3
0
    }
    echo "<h1>" . $x['year'] . "-" . $x['month'] . "-" . $x['day'] . ": " . $x['title'] . "</h1>";
    echo "<p>" . $x['body'] . "</p>";
    echo "</div>";
    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;
Exemple #4
0
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
?>
<rss version="2.0">
	<channel>
		<title>KVIrc News</title>
		<link>http://www.kvirc.net</link>
		<description>The K-visual IRC client</description>
		<language>en</language>
	<?php 
require "conf/functions.php";
function cleanText($intext)
{
    return utf8_encode(htmlspecialchars(stripslashes($intext)));
}
$latestnews = array();
news_scan_dir("news/latest", $latestnews);
$cnt = count($latestnews);
for ($i = 0; $i < $cnt; $i++) {
    // Get data
    $x["dummy"] = "";
    news_read_entry($latestnews[$i], $x);
    // Set variables
    $title = substr(cleanText($x["title"]), 1);
    $description = substr(cleanText($x["short"]), 1);
    $author = substr(cleanText($x["author"]), 1);
    $news = basename($latestnews[$i]);
    $guid = "http://www.kvirc.net/?id=news&amp;story={$news}&amp;dir=latest&amp;lang={$lang}";
    $pubDate = date("r", mktime($x["hour"], $x["minute"], 0, $x["month"], $x["day"], $x["year"]));
    // Now output one item
    echo "\t\t<item>\n";
    echo "\t\t\t<title>{$title}</title>\n\t\t\t<guid>{$guid}</guid>\n";