<?php

/************************************************************/
/* Theme Name: Charcoal2                                    */
/* Theme Design: mikem (www.nukecops.com)                   */
/* version 3.0                                              */
/* Theme inspired by the phpbb2 style Charcoal2 by          */
/* zarron design (http://www.zarron.com)                    */
/*                                                          */
/* Copyright Notice(read and understand)                    */
/* - THIS PACKAGE IS NOT RELEASED AS GPL/GNU SCRIPTING.     */
/*                                                          */
/* - Author names and Credit links MUST REMAIN in the       */
/*   credit line footer of all Nuke generated pages.        */
/*                                                          */
/* - Translations are permitted, not renaming.              */
/*                                                          */
/* - ANY UNAUTHORIZED USE OF THESE MATERIALS                */
/*   MAY VIOLATE COPYRIGHTS and/or TRADEMARKS.              */
/*                                                          */
/* - This package CAN NOT be mirrored without written       */
/*   permission.                                            */
/*                                                          */
/* - ADDITIONAL COPYRIGHTS BY TEMPLATE AUTHORS APPLY        */
/*                                                          */
/* - FULL LICENSE - http://www.nukecops.com/postt8856.html  */
/*                                                          */
/************************************************************/

/************************************************************/
/* Theme Colors Definition                                  */
/*                                                          */
/* Define colors for your web site. $bgcolor2 is generaly   */
/* used for the tables border as you can see on OpenTable() */
/* function, $bgcolor1 is for the table background and the  */
/* other two bgcolor variables follows the same criteria.   */
/* $texcolor1 and 2 are for tables internal texts           */
/************************************************************/



/************************************************************/
/* OpenTable Functions                                      */
/*                                                          */
/* Define the tables look&feel for you whole site. For this */
/* we have two options: OpenTable and OpenTable2 functions. */
/* Then we have CloseTable and CloseTable2 function to      */
/* properly close our tables. The difference is that        */
/* OpenTable has a 100% width and OpenTable2 has a width    */
/* according with the table content                         */
/************************************************************/

function OpenTable() {
    global $bgcolor1, $bgcolor2;
    echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">
  <tr>
    <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">
        <tr>
          <td bgcolor=\"#CCCCCC\"><table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\" bgcolor=\"#303032\">
              <tr>
                <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">
                    <tr>
                      <td background=\"themes/Charcoal2/forums/images/bk-z.jpg\" bgcolor=\"#C0C0C0\"><table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\">
                          <tr>
                            <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">
                                <tr>
                                  <td background=\"themes/Charcoal2/forums/images/bk-z.jpg\" bgcolor=\"#8A8C91\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">
                                      <tr>
                                        <td>";
}

function CloseTable() {
    echo "</td>
                                      </tr>
                                    </table></td>
                                </tr>
                              </table></td>
                          </tr>
                          
                        </table></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>";
}

function OpenTable2() {
    global $bgcolor1, $bgcolor2;
    echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"$bgcolor2\" align=\"center\"><tr><td>\n";
    echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"8\" bgcolor=\"$bgcolor1\"><tr><td>\n";
}

function CloseTable2() {
    echo "</td></tr></table></td></tr></table>\n";
}

/************************************************************/
/* Function themeheader()                                   */
/*                                                          */
/* Control the header for your site. You need to define the */
/* BODY tag and in some part of the code call the blocks    */
/* function for left side with: blocks(left);               */
/************************************************************/

function themeheader() {
    global  $admin, $user, $banners, $sitename, $slogan, $cookie, $prefix, $db, $nukeurl, $anonymous;
    if ($banners == 1) {    
    $numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_banner WHERE type='0' AND active='1'"));
   /* Get a random banner if exist any. */ 
   /* More efficient random stuff, thanks to Cristian Arroyo from http://www.planetalinux.com.ar */ 

    if ($numrows>1) { 
   $numrows = $numrows-1; 
   mt_srand((double)microtime()*1000000); 
   $bannum = mt_rand(0, $numrows); 
    } else { 
   $bannum = 0; 
    } 
    $sql = "SELECT bid, imageurl, clickurl, alttext FROM ".$prefix."_banner WHERE type='0' AND active='1' LIMIT $bannum,1"; 
    $result = $db->sql_query($sql); 
    $row = $db->sql_fetchrow($result); 
    $bid = $row[bid]; 
    $imageurl = $row[imageurl]; 
    $clickurl = $row[clickurl]; 
    $alttext = $row[alttext]; 
    
    if (!is_admin($admin)) { 
       $db->sql_query("UPDATE ".$prefix."_banner SET impmade=impmade+1 WHERE bid='$bid'"); 
    } 
    if($numrows>0) { 
   $sql2 = "SELECT cid, imptotal, impmade, clicks, date FROM ".$prefix."_banner WHERE bid='$bid'"; 
   $result2 = $db->sql_query($sql2); 
   $row2 = $db->sql_fetchrow($result2); 
   $cid = $row2[cid]; 
   $imptotal = $row2[imptotal]; 
   $impmade = $row2[impmade]; 
   $clicks = $row2[clicks]; 
   $date = $row2[date]; 

/* Check if this impression is the last one and print the banner */ 

   if (($imptotal <= $impmade) AND ($imptotal != 0)) { 
       $db->sql_query("UPDATE ".$prefix."_banner SET active='0' WHERE bid='$bid'"); 
       $sql3 = "SELECT name, contact, email FROM ".$prefix."_bannerclient WHERE cid='$cid'"; 
       $result3 = $db->sql_query($sql3); 
       $row3 = $db->sql_fetchrow($result3); 
       $c_name = $row3[name]; 
       $c_contact = $row3[contact]; 
       $c_email = $row3[email]; 
       if ($c_email != "") { 
      $from = "$sitename <$adminmail>"; 
      $to = "$c_contact <$c_email>"; 
      $message = ""._HELLO." $c_contact:\n\n"; 
      $message .= ""._THISISAUTOMATED."\n\n"; 
      $message .= ""._THERESULTS."\n\n"; 
      $message .= ""._TOTALIMPRESSIONS." $imptotal\n"; 
      $message .= ""._CLICKSRECEIVED." $clicks\n"; 
      $message .= ""._IMAGEURL." $imageurl\n"; 
      $message .= ""._CLICKURL." $clickurl\n"; 
      $message .= ""._ALTERNATETEXT." $alttext\n\n"; 
      $message .= ""._HOPEYOULIKED."\n\n"; 
      $message .= ""._THANKSUPPORT."\n\n"; 
      $message .= "- $sitename "._TEAM."\n"; 
      $message .= "$nukeurl"; 
      $subject = "$sitename: "._BANNERSFINNISHED.""; 
      mail($to, $subject, $message, "From: $from\nX-Mailer: PHP/" . phpversion()); 
       } 
   } 
    $showbanners = "<a href=\"banners.php?op=click&bid=$bid\" target=\"_blank\"><img src=\"$imageurl\" border=\"0\" alt='$alttext' title='$alttext'></a><br><br>"; 
    }
}
        cookiedecode($user);
    $username = $cookie[1];
    if ($username == "") {
        $username = "Anonymous";
    }
    echo "<script type=\"text/javascript\" language=\"JavaScript1.2\" src=\"themes/Charcoal2/jscript/imageswap.js\"></script><center>\n\n\n";
    echo "<body bgcolor=\"#8A8C91\" text=\"#DCDCDC\" leftmargin=\"10\" topmargin=\"10\" marginwidth=\"10\" marginheight=\"10\">\n";
	
    if ($username == "Anonymous") {
	$theuser = "&nbsp;&nbsp;<a href=\"modules.php?name=Your_Account\">"._LOGIN."</a> or <a href=\"modules.php?name=Your_Account&op=new_user\">"._BREG."</a>\n";
    } else {
	$theuser = "&nbsp;&nbsp;"._BWEL." $username!";
    }
	$public_msg = public_message();
	
echo"$showbanners<table class=\"bodyline\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"> "
  . "	<tr> "
  . "		<td align=\"center\" valign=\"top\">\n"
  . "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"
  . "<tr>\n"
  . "<td width=\"349\"><img src=\"themes/Charcoal2/forums/images/logo.jpg\" alt=\"\" height=\"58\" width=\"349\" border=\"0\"></td>\n"
  . "<td width=\"81\" background=\"themes/Charcoal2/forums/images/header_topback1.jpg\">&nbsp;</td>\n"
  . "<td align=\"right\" width=\"296\" background=\"themes/Charcoal2/forums/images/header_topback1.jpg\"><img src=\"themes/Charcoal2/forums/images/topcurve.jpg\" alt=\"\" height=\"58\" width=\"224\" border=\"0\"></td>\n"
  . "<td background=\"themes/Charcoal2/forums/images/rightcurve.jpg\">&nbsp;</td>\n"
  . "</tr>\n"
  . "<tr>\n"
  . "<td width=\"349\"><img src=\"themes/Charcoal2/forums/images/slogan.jpg\" alt=\"\" height=\"30\" width=\"349\" border=\"0\"></td>\n"
  . "<td width=\"81\" background=\"themes/Charcoal2/forums/images/header_topback2.jpg\">&nbsp;</td>\n";
      if ($username == "Anonymous") {
echo "<td width=\"296\"><img src=\"themes/Charcoal2/forums/images/profile_off.jpg\" alt=\"\" name=\"profile\" height=\"30\" width=\"191\" border=\"0\"></td>\n";
    } else {
echo "<td width=\"296\"><a href=\"modules.php?name=Forums&file=profile&mode=editprofile\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('profile','','themes/Charcoal2/forums/images/profile_on.jpg')\"><img src=\"themes/Charcoal2/forums/images/profile.jpg\" alt=\"\" name=\"profile\" height=\"30\" width=\"191\" border=\"0\"></a></td>\n";
}
echo "<td>&nbsp;</td>\n"
  . "</tr>\n"
  . "</table>\n"
  . "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"
  . "<tr>\n"
  . "<td width=\"50\"><a href=\"index.php\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('faq','','themes/Charcoal2/forums/images/faq_on.jpg')\"><img src=\"themes/Charcoal2/forums/images/faq.jpg\" alt=\"\" name=\"faq\" height=\"37\" width=\"50\" border=\"0\"></a></td>\n"
  . "<td width=\"60\"><a href=\"modules.php?name=Your_Account\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('search','','themes/Charcoal2/forums/images/search_on.jpg')\"><img src=\"themes/Charcoal2/forums/images/search.jpg\" alt=\"\" name=\"search\" height=\"37\" width=\"60\" border=\"0\"></a></td>\n"
  . "<td width=\"75\"><a href=\"modules.php?name=Downloads\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('memberlist','','themes/Charcoal2/forums/images/memberlist_on.jpg')\"><img src=\"themes/Charcoal2/forums/images/memberlist.jpg\" alt=\"\" name=\"memberlist\" height=\"37\" width=\"75\" border=\"0\"></a></td>\n"
  . "<td width=\"54\"><a href=\"modules.php?name=Forums\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('usergroups','','themes/Charcoal2/forums/images/usergroups_on.jpg')\"><img src=\"themes/Charcoal2/forums/images/usergroups.jpg\" alt=\"\" name=\"usergroups\" height=\"37\" width=\"54\" border=\"0\"></a></td>\n"
  . "<td width=\"62\"><img src=\"themes/Charcoal2/forums/images/register.jpg\" alt=\"\" name=\"register\" height=\"37\" width=\"62\" border=\"0\"></td>\n"
  . "<td width=\"119\"><img src=\"themes/Charcoal2/forums/images/pms.jpg\" alt=\"\" name=\"pms\" height=\"37\" width=\"119\" border=\"0\"></td>\n";
if ($username == "Anonymous") {
echo "<td width=\"201\"><a href=\"modules.php?name=Your_Account\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('login','','themes/Charcoal2/forums/images/login_on.jpg')\"><img src=\"themes/Charcoal2/forums/images/login.jpg\" alt=\"\" name=\"login\" height=\"37\" width=\"201\" border=\"0\"></a></td>\n";
  } else {
echo "<td width=\"201\"><a href=\"modules.php?name=Your_Account&op=logout\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('login','','themes/Charcoal2/forums/images/login_on.jpg')\"><img src=\"themes/Charcoal2/forums/images/login.jpg\" alt=\"\" name=\"login\" height=\"37\" width=\"201\" border=\"0\"></a></td>\n";
}
echo "<td>&nbsp;</td>\n"
  . "</tr>\n"
  . "</table>\n"
  . "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\">\n"
  . "      <tr valign=\"top\">\n"
  . "        <td>$public_msg<img src=\"themes/Charcoal2/images/pixel.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\"></td>\n"
  . "</tr></table>\n"
  . "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\">\n"
  . "<tr valign=\"top\">\n"
  . "  <td valign=\"top\" width=\"1\" background=\"themes/Charcoal2/images/7px.gif\">\n"
  . "";
    blocks(left); 
echo "</td><td valign=\"top\" width=\"100%\">\n";
}

/************************************************************/
/* Function themefooter()                                   */
/*                                                          */
/* Control the footer for your site. You don't need to      */
/* close BODY and HTML tags at the end. In some part call   */
/* the function for right blocks with: blocks(right);       */
/* Also, $index variable need to be global and is used to   */
/* determine if the page your're viewing is the Homepage or */
/* and internal one.                                        */
/************************************************************/

function themefooter() {
    global $index, $foot1, $foot2, $foot3, $foot4, $copyright, $totaltime, $footer_message;
    if ($index == 1) {
echo "</td><td valign=\"top\" width=\"165\">\n";
	blocks(right);
    }	
echo"</td>\n"
  . "</table>\n"
  . "<body>\n"
  . "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">\n"
  . "  <tr>\n"
  . "    <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">\n"
  . "        <tr>\n"
  . "          <td><div align=\"center\"><font class=\"small\">$footer_message</font></div></td>\n"
  . "        </tr>\n"
  . "        <tr>\n"
  . "          <td><div align=\"center\"></div></td>\n"
  . "        </tr>\n"
  . "      </table></td>\n"
  . "  </tr>\n"
  . "</table>\n"
 ."";
                echo "<center>\n";
        $footer_message = footmsg();
// DO NOT TOUCH THE NEXT LINE(s). DOING SO VIOLATES THE COPYRIGHTS OF THIS THEME
// YOU CAN ONLY ADD TO IT IF YOU MODIFY THIS THEME :-)
            echo "</center>\n";
        echo "<center><br><font class=\"small\">:: Charcoal2 phpbb2 style by <a href=\"http://www.zarron.com/\">zarron designs</a> &copy; :: PHP-Nuke theme by <a href=\"http://www.nukemods.com\">www.nukemods.com</a> &copy; ::</font></center>\n";  
	echo "<br>\n";
}

/************************************************************/
/* Function themeindex()                                    */
/*                                                          */
/* This function format the stories on the Homepage         */
/************************************************************/

function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
    global $anonymous, $tipath;
    if ($notes != "") {
	$notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
    } else {
	$notes = "";
    }
    if ("$aid" == "$informant") {
	$content = "$thetext$notes\n";
    } else {
	if($informant != "") {
	    $content = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
	} else {
	    $content = "$anonymous ";
	}
	$content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
    }
    $posted = ""._POSTEDBY." ";
    $posted .= get_author($aid);
    $posted .= " "._ON." $time $timezone ($counter "._READS.")";
echo"<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">\n"
  . "  <tr>\n"
  . "    <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"
  . "        <tr>\n"
  . "          <td bgcolor=\"#CCCCCC\"><table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\" bgcolor=\"#303032\">\n"
  . "              <tr>\n"
  . "                <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">\n"
  . "                    <tr>\n"
  . "                      <td background=\"themes/Charcoal2/forums/images/bk-z.jpg\" bgcolor=\"#C0C0C0\"><table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\">\n"
  . "                          <tr>\n"
  . "                            <td height=\"28\" background=\"themes/Charcoal2/forums/images/sidebox_background2.gif\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\">\n"
  . "                                <tr>\n"
  . "                                  <td><font class=\"block-title\"><strong>$title</strong></font></td>\n"
  . "                                </tr>\n"
  . "                              </table></td>\n"
  . "                          </tr>\n"
  . "                          <tr>\n"
  . "                            <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"
  . "                                <tr>\n"
  . "                                  <td background=\"themes/Charcoal2/forums/images/bk-z.jpg\" bgcolor=\"#8A8C91\"><a href=\"modules.php?name=News&amp;new_topic=$topic\"><img src=\"$tipath$topicimage\" border=\"0\" alt=\"$topictext\" title=\"$topictext\" align=\"right\" hspace=\"10\" vspace=\"10\"></a><font class=\"storycontent\">$content</font></td>\n"
  . "                                </tr>\n"
  . "                              </table></td>\n"
  . "                          </tr>\n"
  . "                          <tr>\n"
  . "                            <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"
  . "                                <tr>\n"
  . "                                  <td background=\"themes/Charcoal2/forums/images/bk-w.jpg\" bgcolor=\"#8A8C91\"><div align=\"center\"><font class=\"content\">$posted</font><br><font class=\"content\">$morelink</font></div></td>\n"
  . "                                </tr>\n"
  . "                              </table></td>\n"
  . "                          </tr>\n"
  . "                        </table></td>\n"
  . "                    </tr>\n"
  . "                  </table></td>\n"
  . "              </tr>\n"
  . "            </table></td>\n"
  . "        </tr>\n"
  . "      </table></td>\n"
  . "  </tr>\n"
  . "</table>\n"
 ."";
}

/************************************************************/
/* Function themearticle()                                  */
/*                                                          */
/* This function format the stories on the story page, when */
/* you click on that "Read More..." link in the home        */
/************************************************************/

function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
    global $admin, $sid, $tipath;
    $posted = ""._POSTEDON." $datetime "._BY." ";
    $posted .= get_author($aid);
    if ($notes != "") {
	$notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
    } else {
	$notes = "";
    }
    if ("$aid" == "$informant") {
	$content = "$thetext$notes\n";
    } else {
	if($informant != "") {
	    $content = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
	} else {
	    $content = "$anonymous ";
	}
	$content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
    }
echo"<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">\n"
  . "  <tr>\n"
  . "    <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"
  . "        <tr>\n"
  . "          <td bgcolor=\"#CCCCCC\"><table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\" bgcolor=\"#303032\">\n"
  . "              <tr>\n"
  . "                <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">\n"
  . "                    <tr>\n"
  . "                      <td background=\"themes/Charcoal2/forums/images/bk-z.jpg\" bgcolor=\"#C0C0C0\"><table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\">\n"
  . "                          <tr>\n"
  . "                            <td height=\"28\" background=\"themes/Charcoal2/forums/images/sidebox_background2.gif\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\">\n"
  . "                                <tr>\n"
  . "                                  <td><font class=\"block-title\"><strong>$title</strong></font></td>\n"
  . "                                </tr>\n"
  . "                              </table></td>\n"
  . "                          </tr>\n"
  . "                          <tr>\n"
  . "                            <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"
  . "                                <tr>\n"
  . "                                  <td background=\"themes/Charcoal2/forums/images/bk-z.jpg\" bgcolor=\"#8A8C91\"><a href=\"modules.php?name=News&amp;new_topic=$topic\"><img src=\"$tipath$topicimage\" border=\"0\" alt=\"$topictext\" title=\"$topictext\" align=\"right\" hspace=\"10\" vspace=\"10\"></a><font class=\"storycontent\">$content</font></td>\n"
  . "                                </tr>\n"
  . "                              </table></td>\n"
  . "                          </tr>\n"
  . "                          <tr>\n"
  . "                            <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"
  . "                                <tr>\n"
  . "                                  <td background=\"themes/Charcoal2/forums/images/bk-w.jpg\" bgcolor=\"#8A8C91\"><div align=\"center\"><font class=\"content\">$posted</font><br><font class=\"content\"></font></div></td>\n"
  . "                                </tr>\n"
  . "                              </table></td>\n"
  . "                          </tr>\n"
  . "                        </table></td>\n"
  . "                    </tr>\n"
  . "                  </table></td>\n"
  . "              </tr>\n"
  . "            </table></td>\n"
  . "        </tr>\n"
  . "      </table></td>\n"
  . "  </tr>\n"
  . "</table>\n"
 ."";
}

/************************************************************/
/* Function themesidebox()                                  */
/*                                                          */
/* Control look of your blocks. Just simple.                */
/************************************************************/

function themesidebox($title, $content) {
echo"<table width=\"165\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">\n"
  . "  <tr>\n"
  . "    <td><table width=\"165\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">\n"
  . "        <tr>\n"
  . "          <td bgcolor=\"#696969\"><table width=\"100%\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\">\n"
  . "              <tr>\n"
  . "                <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"
  . "                    <tr>\n"
  . "                      <td bgcolor=\"#C0C0C0\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"
  . "                          <tr>\n"
  . "                            <td height=\"28\" background=\"themes/Charcoal2/forums/images/sidebox_background.gif\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\">\n"
  . "                                <tr>\n"
  . "                                  <td><font class=\"block-title\"><strong>$title</strong></font></td>\n"
  . "                                </tr>\n"
  . "                              </table></td>\n"
  . "                          </tr>\n"
  . "                          <tr>\n"
  . "                            <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"
  . "                                <tr>\n"
  . "                                  <td background=\"themes/Charcoal2/forums/images/dkback.gif\" bgcolor=\"#8A8C91\"><font class=\"content\">$content</font></td>\n"
  . "                                </tr>\n"
  . "                              </table></td>\n"
  . "                          </tr>\n"
  . "                          <tr>\n"
  . "                            <td height=\"15\" background=\"themes/Charcoal2/forums/images/slogan_blank.jpg\">&nbsp;</td>\n"
  . "                          </tr>\n"
  . "                        </table></td>\n"
  . "                    </tr>\n"
  . "                  </table></td>\n"
  . "              </tr>\n"
  . "            </table></td>\n"
  . "        </tr>\n"
  . "      </table></td>\n"
  . "  </tr>\n"
  . "</table>\n"
 ."";
}

?>
