<?php
function draw_header()
{
    global $cfg;
?>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<?php draw_header_tag(); ?>
<body>
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" background="themes/dark/img/bgmidright.gif">
<tr>
	<td height="121" align="left" valign="top">
		<table width="100%" height="121" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td height="99" align="left" valign="top" bgcolor="#333333" background="themes/dark/img/topbgovals.gif">
				<table width="774" height="99" border="0" cellspacing="0" cellpadding="0" cols="4">
				<tr>
					<td width="176" background="themes/dark/img/shim.gif">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
  codebase="http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0"
  id="Movie1" width="176" height="99">
  <param name="movie" value="themes/dark/img/dark.swf">
  <param name="quality" value="high">
  <param name="bgcolor" value="#666666">
  <embed name="Movie1" src="themes/dark/img/dark.swf" quality="high" bgcolor="#666666"
    width="176" height="99"
    type="application/x-shockwave-flash"
    pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
  </embed>
</object>
					</td>
					<td width="598" align="center" valign="middle" background="themes/dark/img/shim.gif"><?php if( check_module("banners")) draw_banner(); ?></td>
				</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td bgcolor="#000000" background="themes/dark/img/topseparator.gif" class="topbarsep">&nbsp;PHPwebthings v.0.6.0 <!-- here comes the navbar --></td>
		</tr>
		</table>
	</td>
</tr><!-- end toppanel -->

<tr>
	<td height="100%" align="left" valign="top">
		<table width="774" height="100%" border="0" cellspacing="0" cellpadding="0" cols="3">
		<tr><td width="164" height="100%" align="left" valign="top">
			<table width="164" height="100%" border="0" cellspacing="0" cellpadding="0" cols="2">
			<tr>
				<td width="150" height="100%" align="center" valign="top" bgcolor="#333333"><br><?php draw_sideboxes("left"); ?></td>
				<td width="14" height="100%" align="right" valign="top"><img src="themes/dark/img/corner_white.gif" alt="" width="14" height="16" border="0"></td>
				</tr>
				<tr>
					<td width="150" height="100%" align="left" valign="top" bgcolor="#666666"><img src="themes/dark/img/bottomleftbow.gif" alt="" width="150" height="76" border="0"></td>
					<td width="14" height="100%" align="right" valign="bottom">&nbsp;</td>
				</tr>
				</table>
			</td><!--starts middle panel --><td width="460" align="left" valign="top"><br>
<?php
}

function draw_footer()
{
?></td>
	<td width="150" align="center" valign="top"><br><?php
draw_sideboxes("right");
// please don't remove the link below and help phpWebThings!
// por favor não remova o link abaixo e ajude o phpWebThings!
theme_draw_rightbox_open( "Powered by" );
?>
<div align="center"><a href="http://www.phpdbform.com" target="_blank"><img src="images/webthings_button.png" border=0 alt="phpWebThings powered"></a></div>
<?php
theme_draw_rightbox_close();
?></td>
</tr>
</table></td>
</tr>
<tr>
	<td height="20" align="center" bgcolor="#666666"><?php draw_copyright(); ?></td>
</tr>
</table>
</body>
</html>
<?php
}
// functions that draw the boxes

function theme_draw_leftbox_open( $title )
{
?>
<table width="140" cellspacing="1" cellpadding="1" bgcolor="#000000">
<tr>
	<td align="center" class="sideboxtitle"><?php echo $title; ?></td>
</tr>
<tr>
	<td align="center" bgcolor="#999999" onMouseOver="this.bgColor='#CDCDCD'" onMouseOut="this.bgColor='#999999'">
<?php
}

function theme_draw_leftbox_close()
{
?>
</td>
</tr>
</table><br>
<?php
}

function theme_draw_rightbox_open( $title )
{
?>
<table width="140" cellspacing="1" cellpadding="1" bgcolor="#000000">
<tr>
	<td align="center" class="sideboxtitle"><?php echo $title; ?></td>
</tr>
<tr>
	<td align="center" bgcolor="#999999" onMouseOver="this.bgColor='#CDCDCD'" onMouseOut="this.bgColor='#999999'">
<?php
}

function theme_draw_rightbox_close()
{
?>
</td>
</tr>
</table><br>
<?php
}

function theme_draw_centerbox_open( $title )
{
?>
<table width="95%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr>
    <td class="centerboxtitle" align=center><?php echo $title; ?></td>
</tr>
<tr>
    <td class="centerboxtext">
<?php
}

function theme_draw_centerbox_close()
{
?>
</td>
</tr>
</table><br>
<?php
}

function theme_draw_menu_item( $text, $link, $newwindow )
{
	$target = ($newwindow == "Y")?"target=\"_blank\"":"";
	return "<tr><td align=\"center\" bgcolor=\"#999999\" onMouseOver=\"this.bgColor='#CDCDCD'\" onMouseOut=\"this.bgColor='#999999'\"><a href=\"$link\" $target>$text</a></td></tr>\n";
}
?>
