All pastes #394317 Raw Edit

Mine

public php v1 · immutable
·published 2007-03-14 06:07 UTC
rendered paste body
<?phprequire_once('common.php');//Loads common.php correctlyif(!empty($username)){	//Checks and makes sure the user is NOT logged in	$WhatLayout = mysql_query("SELECT layout FROM members WHERE username='$username'") or die(mysql_error());    $WhatLayout = mysql_fetch_object($WhatLayout);    if(empty($WhatLayout->layout)){	  $WhatLayout = mysql_query("SELECT * FROM layouts WHERE `default`='yes'");	  $WhatLayout = mysql_fetch_object($WhatLayout);	}	else{		$Layout = mysql_query("SELECT * FROM layouts WHERE `layout_name`='$WhatLayout->layout'")or die(mysql_error());	    $Layout = mysql_fetch_object($Layout);	    $WhatLayout = $Layout;	}}else{  //If the user is not logged in then it should select the default layout  $WhatLayout = mysql_query("SELECT * FROM layouts WHERE `default`='yes'")or die(mysql_error());  $WhatLayout = mysql_fetch_object($WhatLayout); }define('LAYOUT',$WhatLayout->layout_name);define('LAYOUT_INCLUDE_LOC',$WhatLayout->layout_location);require_once(LAYOUT_INCLUDE_LOC.'header.php');?>