Location: PHPKode > projects > Potato News > newcopy/includes/news_list.php
<link rel="stylesheet" type="text/css"
href="news.css" />
<?PHP
include("data/settings.php");

$file = fopen("data/articles/newsid.txt","r");
$exra = fgets($file);
fclose($file);

$sixer = 8*$arc;

$next = $arc-1;
$prev = $arc+1;

$n1 = 0+$sixer;
$n2 = 1+$sixer;
$n3 = 2+$sixer;
$n4 = 3+$sixer;
$n5 = 4+$sixer;
$n6 = 5+$sixer;
$n7 = 6+$sixer;
$n8 = 7+$sixer;

$a1 = $exra-$n1;
$a2 = $exra-$n2;
$a3 = $exra-$n3;
$a4 = $exra-$n4;
$a5 = $exra-$n5;
$a6 = $exra-$n6;
$a7 = $exra-$n7;
$a8 = $exra-$n8;

if (file_exists("data/articles/$a1.txt")) {
if (file_exists("data/articles/$a1.db.php")) {
include ("data/articles/$a1.db.php");
echo "<div class=\"list\"><a href='$index?pid=$a1'/>$title</a> || $postdate</div>";


}
}

if (file_exists("data/articles/$a2.txt")) {
if (file_exists("data/articles/$a2.db.php")) {
include ("data/articles/$a2.db.php");
echo "<div class=\"list\"><a href='$index?pid=$a2'/>$title</a> || $postdate</div>";


}
}

if (file_exists("data/articles/$a3.txt")) {
if (file_exists("data/articles/$a3.db.php")) {
include ("data/articles/$a3.db.php");
echo "<div class=\"list\"><a href='$index?pid=$a3'/>$title</a> || $postdate</div>";


}
}

if (file_exists("data/articles/$a4.txt")) {
if (file_exists("data/articles/$a4.db.php")) {
include ("data/articles/$a4.db.php");
echo "<div class=\"list\"><a href='$index?pid=$a4'/>$title</a> || $postdate</div>";

}
}

if (file_exists("data/articles/$a5.txt")) {
if (file_exists("data/articles/$a5.db.php")) {
include ("data/articles/$a5.db.php");
echo "<div class=\"list\"><a href='$index?pid=$a5'/>$title</a> || $postdate</div>";

}
}

if (file_exists("data/articles/$a6.txt")) {
if (file_exists("data/articles/$a6.db.php")) {
include ("data/articles/$a6.db.php");
echo "<div class=\"list\"><a href='$index?pid=$a6'/>$title</a> || $postdate</div>";

}
}

if (file_exists("data/articles/$a7.txt")) {
if (file_exists("data/articles/$a7.db.php")) {
include ("data/articles/$a7.db.php");
echo "<div class=\"list\"><a href='$index?pid=$a7'/>$title</a> || $postdate</div>";

}
}

if (file_exists("data/articles/$a8.txt")) {
if (file_exists("data/articles/$a8.db.php")) {
include ("data/articles/$a8.db.php");
echo "<div class=\"list\"><a href='$index?pid=$a8'/>$title</a> || $postdate</div>";

}
}


echo "<br><div class='content' align='center' />Powered by <a href='http://potato-scripts.com'/>Potato News</a></div>";

?>
Return current item: Potato News