<head>
<title>Bacheca Web </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>


<center>
<table width="880" border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
</table>
<table width="780" border="0" cellspacing="0" cellpadding="0" height="120" background="i/barratop.gif">
<tr>
<td width="210" align="center">[img]i/headpic.gif[/img]</td>
<td width="570" align="left">
<script language="javascript">
var uri = 'http://impit.tradedoubler.com/imp/js/12487937/1229052?' + new String (Math.random()).substring (2, 11);
document.write('<sc'+'ript language="JavaScript" src="'+uri+'" charset="ISO-8859-1"></sc'+'ript>');
</script>
</td>
</tr>
</table>
<table width="780" border="0" cellspacing="1" cellpadding="1" bgcolor="#12913C">
<tr bgcolor="#FFFFFF">
<td width="780" valign="top" bgcolor="#FFFFFF"><script type="text/javascript"><!--
google_ad_client = "pub-4478511713776299";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td></table></center>
<table width=780><td><?php
/*
This is a template file for the classifieds application.
If you are not a programmer, it won't be easy for you to modify it.
If you are a programmer it will be really easy to modify.

We think there is no need for very deep explanation what and where
you should change. The names of the functions and variables show
their role.

All functions have some input parameters and produce a string called $s
which will be sent back to the caller function as a return value.

Feel free to modify the functions and give a better look to your
application. Don't forget to change the styleheet in the style.css
if you want to modify your colors.
*/
$catColors[0][0]="#999900";
$catColors[0][1]="#cccc66";
$catColors[1][0]="#ff9900";
$catColors[1][1]="#ffcc99";
$catColors[2][0]="#cc6600";
$catColors[2][1]="#e6b380";
$catColors[3][0]="#cc9933";
$catColors[3][1]="#ffcc66";
$catSp="7";


function templateShowMenu($menu)
{
/*
Description:
The menu items will be displayed.
Input parameter:
Array. The elements of the array are the menu items.
*/
global $xi;

$s="";
$s.="<center><table border=0 width='780' cellpadding='0' cellspacing='0'>";
$s.="<tr valign='middle'>";
$first=TRUE;
foreach($menu as $id=>$menuPoint) {
if (!$first) {
$s.="<td bgcolor='ffffff'>\n";
$s.="";
$s.="</td>";
$s.="<td bgcolor='ffffff' align='center' valign='middle'>";
$s.="[img]$xi/menusep.gif[/img]";
$s.="</td>";
$s.="<td bgcolor='ffffff'>\n";
$s.="\n";
$s.="</td>";
}
$s.="<td bgcolor='ffffff' class='mainmenu' nowrap>";
$s.=$menuPoint;
$s.="</td>\n";
$first=FALSE;
}
$s.="</td></tr>";
$s.="</table>";
return $s;
}
function templateMain($navBarText,$userMenuStr,$adminMenuSt r,$userStatus,
$infoText,$gorumcontent)
{
/*
Description:
This is the main show function.
Input parameter:
The names of the parameter show which part of the page contained
in the strings.
$gorumcontent is the main part of the page generated by the program.
*/
global $xi;
$s="";

$s.=vertSpacer("0");
$s.=$userMenuStr;
if ($adminMenuStr) {
$s.=vertSpacer("0");

}
if ($navBarText) {

$s.="<center><table width='780' border='0' cellpadding='0' cellspacing='0'>";
$s.="<tr>";

$s.="<td class='navBar'>$navBarText";
$s.="</td></tr></table>";
}

if ($navBarText) {
$s.=vertSpacer();
}
else {
$s.=vertSpacer(0);
}
$s.=$gorumcontent;
$s.=vertSpacer("0");

return $s;
}


function templateShowCat($catArr,$adListStr)
{
/*
Description:
Displays the categories.
Input parameter:
$catArr: Array. The elements of the array are the category objects.
The format of the objects is described in the
function templateShowOneCat.
$adListStr: The string to add new items to the category.
*/
global $xi,$catColors;
$s="";
$colNum=4;
$s.="<center><table width='780' bgcolor='#12913C' cellpadding='1' cellspacing='1'>";
$s.="<tr>";
$i=0;
foreach($catArr as $item) {
if (($i % $colNum) == 0) $s.="<tr>";
$s.="<td bgcolor='ffffff'>[img]$xi/b.gif[/img]</td>";
$s.="<td bgcolor='ffffff' valign='top'>";
$s.=templateShowOneCat($item);
$s.="</td>\n";
if ((($i+1) % $colNum) == 0) {
$s.="</tr>\n<tr><td colspan='$colNum'>[img]$xi/b.gif[/img]</td></tr>\n";
}
$i++;
}
while ((($i+1) % $colNum) == 0) {
$s.="<td></td></tr>\n";
$i++;
}
$s.="</tr>";
$s.="</table>\n";
$s.=vertSpacer();
$s.=$adListStr;
return $s;
}

function templateShowOneCat($cat)
{
/*
Description:
Displays one category.
Input parameter:
$cat: Object.
Fields: title, description, pic.
*/
$s="";
$s.="<table border='0'>";
$s.="<tr><td class='categ'>$cat->title</td></tr>\n";
$s.="<tr><td class='catdesc'>$cat->description</td></tr>\n";
if ($cat->pic) {
$s.="<tr><td class='catdesc'>$cat->pic</td></tr>\n";
}
$s.="</table>\n";
return $s;
}

?>
</td></table>