]> git.vanrenterghem.biz Git - www.vanrenterghem.biz.git/blobdiff - News/index.php
Verwijder verouderde bestanden.
[www.vanrenterghem.biz.git] / News / index.php
diff --git a/News/index.php b/News/index.php
deleted file mode 100644 (file)
index 3e7814b..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-<?php
-printf("<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>\n");
-printf("<html>\n");
-printf("<head>\n");
-printf("<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-15' />\n");
-printf("<meta name='author' content='Frederik Vanrenterghem' />\n");
-printf("<meta name='Description' content=\"Frederik Vanrenterghem's Blog\" />\n");
-printf("<title>http://frederik.gotdns.org:1976 - News</title>\n");
-printf("<link rel='stylesheet' type='text/css' href='/styles/main.css' />\n");
-printf("<link rel='stylesheet' type='text/css' href='/styles/newspage.css' />\n");
-printf("<link rel='stylesheet' type='text/css' href='/styles/header.css' />\n");
-printf("</head>\n");
-printf("<body>\n");
-
-printf("<div class='thebody'>\n");
-// Print the header
-printf("<!--HEADER-->\n");
-include("../header.shtml");
-
-// Print the page title
-printf("<h1>Blog</h1>\n\n");
-
-// Define the variables
-
-$dbserver="localhost";
-$usernaam="webnews";
-$paswoord="BlaBla123";
-$database="website";
-$tabel="newsContent";
-$maxShown=5;
-
-if(isset($_GET['begin'])&&is_numeric($_GET['begin'])){
-$begin=$_GET['begin'];
-}
-else {
-$begin=0;
-}
-
-// -- Table structure for table 'newsContent'
-// --
-//
-// CREATE TABLE newsContent (
-//   title varchar(40) default NULL,
-//   date date default NULL,
-//   body text
-// )
-
-// Connect to database
-
-$db=mysql_connect($dbserver,$usernaam,$paswoord) or die ("Geen connectie met server");
-mysql_select_db($database,$db) or die ("Database bestaat niet");
-
-// Count the number of news items in the table
-
-$aantalNewsItems=mysql_query("SELECT COUNT(*) from $tabel") or die ('An error occured while retrieving data from the database. Please <a href="/About/index.shtml">contact the webmaster</a> if this problem persists.');
-$aantalNewsItemsNo=mysql_fetch_row($aantalNewsItems);
-
-
-// LIMIT x, y will limit the results to y rows, starting from x
-
-$resultatenreeks=mysql_query("SELECT * FROM $tabel ORDER BY DATE DESC LIMIT $begin, $maxShown") or die ('An error occured while retrieving data from the database. Please <a href="/About/index.shtml">contact the webmaster</a> if this problem persists.');
-
-while ($resultatenrij = mysql_fetch_row($resultatenreeks)) {
-
-// Put the results in a table, one table per result
-               printf("<!--NEWSITEM-->\n");
-               printf("<div class='newsitem'>\n");
-               printf("<h1>%s</h1><h2><a href='/News/permalink.php?berichtID=%s'>%s</a></h2><p>%s</p>\n",
-               $resultatenrij[0], $resultatenrij[1], $resultatenrij[1], $resultatenrij[2]);
-               printf("</div>\n");
-
-}
-
-// Add some navigation - still to add option to modify maxShown
-if($aantalNewsItemsNo[0]>$maxShown)
-{
-       printf("<!--NAVIGATION-->\n");
-       printf("<div id='newsNav'>\n");
-       // Only show the option for the previous items on post-first-page
-       if($begin>0 AND $aantalNewsItemsNo[0]>($maxShown*2))
-        {printf("<H1><a href='index.php?begin=" . ($begin - $maxShown) . "'>Show items ".($begin-$maxShown+1) . " to " . ($begin) . "</a></h1>\n");}
-       // Show the next items, make sure not to mention a non-existing number of items with the min function
-       if($aantalNewsItemsNo[0]>($maxShown+$begin))
-        {printf("<h2><a href='index.php?begin=" .($begin+$maxShown)."'>Show items ".($begin+$maxShown+1) . " to " . min(($maxShown*2+$begin),$aantalNewsItemsNo[0]) . "</a></h2>\n");}
-       // Once we have shown all items, show the option to return to the first items
-       else
-        {printf("<h2><a href='index.php?begin=".(0)."'>Show items ".(1) . " to " . ($maxShown) . "</a></h2>\n");}
-       printf("<!--END NAVIGATION-->\n");
-       printf("</div>\n");
-}
-
-printf("<div id='RSS'>\n");
-printf("<p><a href='/phppages/rss.php' title='Get the first 5 items of this News section in RSS XML format.'><img style='border:0' src='/Pics/xml.png' alt='XML RSS icon' /></a></p>\n");
-printf("</div>\n");
-
-// Print the footer
-printf("<div id='pagefooter'>\n");
-include("../footer.php");
-printf("</div>\n");
-printf("</div>\n");
-printf("</div>\n");
-printf("</body>\n");
-printf("</html>\n");
-?>
-
-