Location: PHPKode > projects > Backend code/CMS for blizzle.com > v1.x/releases.php
<?
/*
   I'm not sure I like this theme format
   there are just too many external files
   I wonder, it it less efficiant to access
   10 required files than to parse one
   big one?  I'm assuming so.. hrm.
*/


// INCLUDES all neccessary page building functions
require "functions.php";


function createRelease($name,$version,$linkx,$date,$notes,$reporting) {
return "<dl><dt><strong>$name $version</strong><dd><i>[desc:$name]</i><p>$notes</dl><ul><ul><li>Posted: $date<li>[$linkx]Download Link[/]<li>Reporting: $reporting </ul></ul>";
}




// PARSE RELEASE TABLE AND OUTPUT AS ITEM
// INCLUDE $num_rows TO CREATE PAGE LINKS AT BOTTOM

if ($page) {
$limitSQL = " LIMIT ".($page*10).",".(($page*10)+11);
} else {
$limitSQL = " LIMIT 0,11";
}

$query = "SELECT * FROM releases ORDER BY date DESC$limitSQL;";
$result = mysql_query ($query, $link) or die (mysql_error());
$num_rows = mysql_num_rows($result);


			while (list($name,$version,$linkx,$date,$notes,$reporting) = mysql_fetch_row($result)) {
				$loopNum++;
				if ($loopNum < 11) {
					$retval = $retval.createRelease($name,$version,$linkx,$date,$notes,$reporting);
				}
			}

					$retval = createItem("blizzle Detailed Releases",date("Y-m-d H:i:s"),$retval,null,"blizzle","releases","blizzle",null,null,null,null,null);

createPage($retval);



?>
Return current item: Backend code/CMS for blizzle.com