Location: PHPKode > projects > SWG MiniBlog > miniblog.php
<?php	
	session_start();
	/* for the load time message */
	$starttime = explode(' ', microtime());
	$starttime = $starttime[1] + $starttime[0];
	require("sub/classes.php");
	/* load configuration options */
	require("sub/config.php");
	echo(html::header($page_title));
	/* connect to MySQL database */
	sql::connectDb($mysql_host, $mysql_user,$mysql_pass, $mysql_db);
	$myblog = new blog();
	/* switch the action argument */
	require("sub/actions.php");			
	if ($_GET['action']=="login" and !isset($_SESSION['loggedin']))
	{		
		echo(html::loginForm());
	}
	if (isset($_SESSION['loggedin']))
	{
		echo($myblog->getBlogInputBox($changeid));
	}
	echo($myblog->Buttons());
	echo($myblog->getBlogEntries($pagination,$tag));	
	/* for the load time message */
	$mtime = explode(' ', microtime());
	$totaltime = $mtime[0] + $mtime[1] - $starttime;
	$footer .= sprintf("<br />\nPage loaded in %.3f seconds.", $totaltime);
	echo(html::divId($footer, "Footer"));
	echo($myblog->getTagCloud());
	echo("</body></html>");
?>
Return current item: SWG MiniBlog