Location: PHPKode > projects > Nitrotech > nitrotech/includes/styles.php
<?php

function page_header($type)
{
	global $root, $table, $site_data, $page_name, $header_started, $style;

	if($type != 'simple')
    {
    	include($root . "styles/" . $style . "/header.php");
    }
}

function page_footer($type)
{
	global $root, $table, $style;

	if($type != 'simple')
    {
    	include($root . "styles/" . $style . "/footer.php");
    }
}

function styles_menu($current_style)
{
	global $root, $table, $site_data, $style;

	$query1 = "SELECT * FROM " . $table['styles'];
	$result1 = mysql_query($query1);
    if (!$result1)
	{
		message("Could not successfully run query ($query1) from DB: " . mysql_error(), 'die');
	}

    echo("<select size=\"1\" name=\"style\">");

    while($style = mysql_fetch_assoc($result1))
    {
    	if($style['active'])
		{
        	if($current_style == $style['folder'])
            {
        		echo("<option value=\"" . $style['folder'] . "\" SELECTED=\"seleceted\">" . $style['name'] . "</option>");
            }
            else
            {
        		echo("<option value=\"" . $style['folder'] . "\">" . $style['name'] . "</option>");
            }
        }
    }

    echo("</select>");
}

?>
Return current item: Nitrotech