<?php
if( !defined('ISDVBBS') ){
	header('HTTP/1.0 404 Not Found');
	exit;
}
?><!--<?php print <<<EOT
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src="templates/lang/{$GLOBALS['fsetting']['lang']}/js/main_new.js" type="text/javascript"></script>
<style type="text/css">
body { margin:0px; background:#E9F4FA;scrollbar-face-color:CBE5FC; scrollbar-shadow-color:297AE8;  scrollbar-highlight-color:569FE5; scrollbar-3dlight-color:ffffff;  scrollbar-darkshadow-color:ffffff; scrollbar-track-color:F0F8FF;  scrollbar-arrow-color:297AE8; }
a { color: #2779A5; text-decoration: none; }
a:hover { color: #ff6600; text-decoration: underline; }
img { float:none; vertical-align:middle; }
.menutitle { cursor:pointer; margin: auto auto 1px auto; background-image:url("{$imgurl}menu_button_bg.gif"); color:#000000; width:126px; height:20px !important;height:17px; line-height:22px; padding:2px 0px 0px 10px !important; padding:5px 0px 0px 10px; text-align:left; font-size:12px; font-weight:normal; }
.submenu { margin-bottom: 0.5em; font-size:12px; width:148px; padding:0px; text-align:left; }
.left_menu { width:148px; text-align:center; }
.left_menu_top { height:83px; margin:0px 0px 1px 0px; padding:10px 0px 0px 6px; background:url("{$imgurl}menu_left_topbg.gif"); text-align:left; clear:both; vertical-align:top; }
.left_menu_top img { float:none; vertical-align:top; }
</style>
<script type="text/javascript">
if (document.getElementById){ //DynamicDrive.com change
document.write('<style type="text/css">')
document.write('.submenu{display: none;}')
document.write('</style>')
}

function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var parentfollowImg;
	var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (document.getElementById("followImgsub"+i) != null){
				parentfollowImg = document.getElementById("followImgsub"+i);
				parentfollowImg.outerHTML = '<img src="{$imgurl}plus.gif" alt="" id="followImgsub'+i+'"/>';
				}
				if (ar[i].className=="submenu"){ //DynamicDrive.com change
					ar[i].style.display = "none";
				}
			}
			parentfollowImg = document.getElementById("followImg"+obj);
			parentfollowImg.outerHTML = '<img src="{$imgurl}nofollow.gif" alt="" id="followImg'+obj+'"/>';
			el.style.display = "block";
		}else{
			parentfollowImg = document.getElementById("followImg"+obj);
			parentfollowImg.outerHTML = '<img src="{$imgurl}plus.gif" alt="" id="followImg'+obj+'"/>';
			el.style.display = "none";
		}
	}
}

</script>
<div class="left_menu">
	<div class="left_menu_top">
		<img src="{$imgurl}menu.gif" alt="" />
		<div style="height:41px; width:136px; background:url({$imgurl}topinfobg.gif); margin:0px; padding:4px 0px 0px 0px; font-size:12px; line-height:20px; text-align:center; ">
		 <a href="{$fsetting['homepage']}" target="frmright">{$lang['hometitle1']}</a> | <a href="query.php?stype=4&psearch=0&nsearch=0" target="frmright">{$lang['left.str2']}</a> <br />
         <a href="query.php?stype=3&psearch=0&nsearch=0" target="frmright">{$lang['left.str3']}</a> | <a href="boardhelp.php" target="frmright">{$lang['head.help']}</a>
		</div>
	</div>
	<!-- Keep all menus within masterdiv-->
	<div id="masterdiv">
<!--
EOT;
if ( $userid > 0 ){
print <<<EOT
-->
		<div class="menutitle" onclick="SwitchMenu('sub0')"><img src="{$imgurl}nofollow.gif" alt="" id="followImgsub0"/> {$lang['menu.user_cpmain']}</div>
		<span class="submenu" id="sub0" style="display:block;">
          <img src="{$imgurl}menu_left_line.gif"><a href="JavaScript:openScript('messanger.php?action=new',600,450)">{$lang['menu.user_sendmsg']}</a><br>
          <img src="{$imgurl}menu_left_line.gif"><a href="userpay.php" target="frmright"><font class="redfont">{$lang['menu.user_ticket']}</font></a><br>
          <img src="{$imgurl}menu_left_line.gif"><a href="boardpermission.php?action=myinfo&amp;boardid={$boardid}" target="frmright">{$lang['menu.user_permission']}</a><br>
          <img src="{$imgurl}menu_left_line.gif"><a href="query.php?stype=5&amp;s=2&amp;psearch=0&amp;nsearch=0" target="frmright">{$lang['menu.user_topic']}</a><br>
          <img src="{$imgurl}menu_left_line.gif"><a href="query.php?stype=5&amp;s=1&amp;psearch=0&amp;nsearch=0" target="frmright">{$lang['menu.user_ttopic']}</a><br>
          <img src="{$imgurl}menu_left_line.gif"><a href="mymodify.php" target="frmright">{$lang['menu.user_modbase']}</a><br>
          <img src="{$imgurl}menu_left_line.gif"><a href="mymodify.php?t=1" target="frmright">{$lang['menu.user_modpass']}</a><br>
          <img src="{$imgurl}menu_left_line.gif"><a href="mymodify.php?t=2" target="frmright">{$lang['menu.user_modinfo']}</a><br>
          <img src="{$imgurl}menu_left_line.gif"><a href="usersms.php" target="frmright">{$lang['menu.user_msgmain']}</a><br>
          <img src="{$imgurl}menu_left_line.gif"><a href="friendlist.php" target="frmright">{$lang['menu.user_friend']}</a><br>
          <img src="{$imgurl}menu_left_line.gif"><a href="favlist.php" target="frmright">{$lang['menu.user_fav']}</a><br>
          <img src="{$imgurl}menu_left_line.gif"><a href="myfile.php" target="frmright">{$lang['menu.user_files']}</a><br>
          <img src="{$imgurl}menu_left_line.gif"><a href="myask.php" target="frmright">{$lang['menu.user_myask']}</a><br>
		</span>
<!--
EOT;
}
$i = 1;
$hassubmenu = false;
while($forum =& $db->fetch_array($query)) {
	$html_boardtype = htmlspecialchars($forum['boardtype']);
	if ( $i > 1 ){
		$outspan = '</span>';
	}
	if( $forum['ishidden'] == 1 && $groupsetting[37] == 0 ){
		$ishidden = 1;
	}else{
		$ishidden = 0;
	}
	if ( $forum['parentid'] == 0 ){
print <<<EOT
-->{$outspan}
<div class="menutitle" onclick="SwitchMenu('sub{$i}')" style="overflow:hidden; width:126px;" title="{$html_boardtype}"><img src="{$imgurl}plus.gif" alt="" id="followImgsub{$i}"/> {$forum['boardtype']}</div>
<span class="submenu" id="sub{$i}">
<!--
EOT;
		$i++;
	}elseif($ishidden == 0){
print <<<EOT
-->
<div style="overflow:hidden; height:21px;" title="{$html_boardtype}"><img src="{$imgurl}menu_left_line.gif"><a href="{$fsetting['homepage']}?boardid={$forum['boardid']}" target="frmright">{$forum['boardtype']}</a></div>
<!--
EOT;
	}
}
(true === $hassubmenu) AND print('--'.'></span><!--');
print <<<EOT
-->
	</div>
</div>
</body>
</html>
<!--
EOT;
?>-->