<?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/green/img/bg.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" background="themes/green/img/top_bg.gif">
				<table width="100%" height="99" border="0" cellspacing="0" cellpadding="0" cols="4">
				<tr>
					<td>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/logo.gif">					
					</td>
					<td><TD></TD></td>
				</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td height="52" bgcolor="#FFFFFF" background="themes/green/img/top_bar1.gif" class="topbarsep"><font color="#ffffff"><?php theme_draw_simple_menu(); ?></font><!-- here comes the navbar --></td>
		</tr>
		</table>
	</td>
</tr><!-- end toppanel -->

<tr>

	<td height="100%" align="left" valign="top"><img alt="top_nav (1K)" src="themes/green/img/top_nav.gif" height="10" width="155" />
		<table width="100%" 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="133" height="100%" align="left" valign="top"><br><?php draw_sideboxes("left"); ?></td>
					<td width="14" height="100%" align="left" valign="top"></td>
				</tr>
				<tr>
					<td width="133" height="100%" align="left" valign="top"></td>
					<td width="14" height="100%" align="right" valign="bottom"></td>
				</tr>
				</table>
			</td><!--starts middle panel --><td width="100%" align="left" valign="top"><br>
<?php
}

function draw_footer()
{
?></td>
	<td width="150" align="right" 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 background="themes/green/img/bg.gif" height="20" align="center"><?php draw_copyright(); ?></td>
</tr>
</table>
</body>
</html>
<?php
}
// functions that draw the boxes

function theme_draw_leftbox_open( $title )
{
?>
<table width="133" cellspacing="1" cellpadding="1">
<tr>
	<td align="center" class="sideboxtitle"><?php echo $title; ?></td>
</tr>
<tr>
	<td>
<?php
}

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

function theme_draw_rightbox_open( $title )
{
?>
<table width="140" cellspacing="1" cellpadding="1">
<tr>
	<td align="center" class="sideboxtitle"><?php echo $title; ?></td>
</tr>
<tr>
	<td align="right">
<?php
}

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

function theme_draw_centerbox_open( $title )
{
?>
<table width="100%" 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 align=\"center\" width=\"133\"><td background=\"themes/green/img/nav.gif\" width=\"133\" height=\"20\"><center><a href=\"$link\" $target>$text</a><center></td></tr>\n";
}
?>
