<?php

if(!defined('OT_ROOT')) {
	exit('Access Denied');
}



class AdmTplDef{

	// 后台模板
	protected $tplDir;


	// 构造函数
	public function __construct($sysArr){
		$this->tplDir		= $sysArr['SA_tplDir'];
	}

	// 登录页面
	public static function LoginWeb(){
		global $systemArr;

		$retStr = '
		<!DOCTYPE html>
		<html>
		<head>
			<meta http-equiv="Content-Type" content="text/html; charset='. OT_Charset .'" /><!-- big5  gb2312 gbk -->
			<title>后台登录 - '. $systemArr['SYS_title'] .'</title>
			<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
			<meta name="author" content="'. OT_SOFTNAME .'(网钛科技)">
			<meta name="robots" content="none">

			<link href="template/share.css" type="text/css" rel="stylesheet" />

			<script language="javascript" type="text/javascript" src="js/inc/jquery.min.js"></script>
			<script language="javascript" type="text/javascript" src="js/inc/jquery-migrate.js"></script>
			<script language="javascript" type="text/javascript" src="js/inc/common.js"></script>
			<script language="javascript" type="text/javascript" src="js/index.js"></script>
			<script language="javascript" type="text/javascript" src="js/Particleground.js"></script>

			<script language="javascript" type="text/javascript" charset="gb2312" src="tools/keyBoard/vkboard.js"></script>
			<noscript><iframe src="*.htm"></iframe></noscript><!-- 防止另存为 -->

			<style>
			html{height:100%;}
			body{height:100%;background:#fff;overflow:hidden;}
			canvas{z-index:-1;position:absolute;}
			</style>

			<script language="javascript" type="text/javascript">
			/* $(document).ready(function() {
				$("body").particleground({
					dotColor: "#b3c7e0",
					lineColor: "#b1c6e0"
				});
			}); */

			SYS_verCodeMode = '. intval($systemArr['SYS_verCodeMode']) .';
			webPathPart = "../";
			geetWidth = "260px";
			</script>
		</head>

		<body leftmargin="0" topmargin="0" style="margin:0px; margin-top:0px; margin-left:0px;">

		<div style="padding-top:80px;"></div>
		<form id="loginForm" name="loginForm" method="post" action="admin_cl.php?mudi=login" onsubmit="return CheckLoginForm()">
		<input type="hidden" id="pwdMode" name="pwdMode" value="" />
		<input type="hidden" id="pwdKey" name="pwdKey" value="" />
		<input type="hidden" id="pwdEnc" name="pwdEnc" value="" />
		<table style="width:489px; height:314px; background:url(\'template/default/images/login_bg.jpg\')" align="center" cellpadding="0" cellspacing="0">
		<tr>
			<td valign="top" style="padding-top:95px;">
				<table align="center" class="padd5">
				<tr>
					<td style="width:110px" rowspan="3"></td>
					<td align="right" class="fontF_2">用户名：</td>
					<td align="left"><input type="text" style="width:210px" id="username" name="username" maxlength="20" onkeyup="if (this.value!=FiltVarStr(this.value)){this.value=FiltVarStr(this.value)}" /></td>
				</tr>
				<tr>
					<td align="right" class="fontF_2">密&ensp;&ensp;码：</td>
					<td align="left"><input type="password" style="width:210px" id="userpwd" name="userpwd" maxlength="50"/><img src="images/keyBoard.gif" alt="开启/关闭密码输入器" class="pointer" id="vkb_img"><br /><div id="vkeyboard"></div></td>
				</tr>		
				<tr style="height:30px;">
					<td align="right" class="fontF_2">验证码：</td>
					<td align="left">
					';
					if (OT_OpenVerCode && strpos($systemArr['SYS_verCodeStr'],'|admin|') !== false){
						$retStr .= AdmTpl::ShowVerCode('loginForm','verCode');

					}else{
						$retStr .= '<span class="font2_2">已关闭</span>';
					}
					$retStr .= '
					</td>
				</tr>
				</table>
				<br />
				<center>
					<input type="image" src="template/default/images/login_submit.gif" />
					&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;
					<img src="template/default/images/login_reset.gif" style="cursor:pointer" onclick="$id(\'loginForm\').reset()" alt="" />
				</center>
			</td>
		</tr>
		<tr>
			<td align="center" style="height:27px;" valign="top" class="fontMenu">
				技术支持：<a class="fontMenu" href="http://otcms.com/" target="_blank" title="福州网钛软件科技有限公司">网钛科技</a>
			</td>
		</tr>
		</table>
		</form>


		<center>
		<div style="margin-top:15px;">
			<a href="../" class="font1_1">★回到前台首页</a>
			&ensp;&ensp;&ensp;&ensp;
			<a href="http://otcms.com/news/7851.html" class="font1_1" target="_blank">★忘记后台密码</a>
			&ensp;&ensp;&ensp;&ensp;
			<a href="http://otcms.com/news/8101.html" class="font1_1" target="_blank">★搬家后数据库异常</a>
		</div>
		</center>

		<script language="javascript" type="text/javascript">
		createKeyboard("vkeyboard","userpwd","vkb_img");
		</script>

		</body>
		</html>
		';

		return $retStr;
	}


	// 首页页面
	public static function IndexWeb(){
		global $DB,$MB,$systemArr,$sysAdminArr,$memberRow,$skin,$autoOpenMenu;

		if ($sysAdminArr['SA_skinWidth']<=0){
			$skinWidth = '100%';
		}else{
			$skinWidth = $sysAdminArr['SA_skinWidth'] .'px';
		}

		$wapStr = '';
		if (AppWap::Jud()){
			$wapStr = '<a href="javascript:void(0);" onclick=\'ClearWebCache("noAlert");setTimeout("DataDeal.location.href=\"makeHtml_runWap.php?mudi=homeHtml\";",500);return false;return false;\' class="fontMenu">生成手机首页静态</a><br />';
		}

		if ($MB->IsMenuRight('jud','用户管理')){
			$topMenuApp = '<a href="javascript:void(0);" onclick="HrefToShop(\'\');return false;" class="fontMenu">插件平台</a>';
			$topMenuUser = '<a href="#" onclick=\'ClickMenu("用户管理","user","","userManage");return false;\' class="fontMenu">用户管理</a>';
		}else{
			$topMenuApp = '<span class="font1_2d"><s>插件平台</s></span>';
			$topMenuUser = '<span class="font1_2d"><s>用户管理</s></span>';
		}

		$workOrderStr = '';
		if ($sysAdminArr['SA_workOrderSec'] > 0){
			$workOrderStr = '
				<div id="workOrderBox" style="position: absolute;"><div style="position:relative; left:20px; top:15px; width:610px; color:#fff; text-align:right;">
					<span id="gdBox"></span><span onclick="LoadWorkOrderInfo();" class="pointer" title="每'. $sysAdminArr['SA_workOrderSec'] .'秒自动刷新一次，如需调整提醒项目请到【管理员专区→后台参数配置】-[提示待处理信息范围]设置">[刷新]</span><span onclick="WorkOrderClose();" class="pointer" title="关闭该未处理检测框">[关]</span>
					<script language="javascript" type="text/javascript">
					// 读取工单信息
					LoadWorkOrderInfo();
					workOI = window.setInterval("LoadWorkOrderInfo()",'. $sysAdminArr['SA_workOrderSec'] .'000);
					</script>
				</div></div>
				';
		}

		$tabMenuBox = '';
		if ($sysAdminArr['SA_isSubMenu'] == 1){
			$tabMenuBox = '
				<div id="subMenuArea" class="subMenuArea">
					<a href="javascript:;" id="prevBtn" class="prevBtn prevBtn2 fl" title="上一页">上一页</a>
					<a href="javascript:;" id="nextBtn" class="nextBtn nextBtn2 fr" title="下一页">下一页</a>
					<div class="div1">
					<div class="div2" id="subMenuContBox">
						<ul id="subMenuCont" class="contBox">
						<li data-id="0" data-url="left_menuNote.php" data-title="引导页" class="curr"><span><a class="reload" title="页面重加载">刷新</a><a>引导页</a></span></li>
						<!-- <li data-id="34" class=""><span><a>清理缓存</a><a class="del" title="关闭此页">关闭</a></span></li> -->
						</ul>
					</div>
					</div>
				</div>
				';
		}

		$retStr = '
		<!DOCTYPE html>
		<html>
		<head>
			<title>管理后台 - '. $systemArr['SYS_title'] .'</title>
			'. $skin->WebConfig(true) .'
			<script language="javascript" type="text/javascript" src="js/ind_backstage.js?v='. OT_VERSION .'"></script>
		</head>
		<body>
		'. $skin->WebCommon(true) .'

		<script language="javascript" type="text/javascript">
		var exitMinute = '. intval($sysAdminArr['SA_exitMinute']) .';
		var isSubMenu = "'. $sysAdminArr['SA_isSubMenu'] .'";
		var tplDir = "'. $sysAdminArr['SA_tplDir'] .'";
		</script>

		<input type="hidden" id="currSubMenuID" name="currSubMenuID" value="0" />

		<table style="width:'. $skinWidth .'; height:78px; background:url(template/default/images/top_bgBig.jpg);" align="center" border="0" cellspacing="0" cellpadding="0" summary="">
		<tr><td valign="top" style="height:51px;">
			'. $workOrderStr .'
			<table style="width:620px; height:49px; background:url(template/default/images/top_bgBig.jpg); background-repeat:no-repeat; background-position:-1840px 0px;" align="right" cellspacing="0" cellpadding="0" border="0" summary=""><tr>
			<td style="width:5px;"></td>
			<td style="padding-right:5px"><img src="template/default/images/top_menu2_1.gif" alt="" /></td>
			<td style="padding-top:2px;padding-right:15px">
				<a href="../" target="_blank" class="fontMenu">前台网站</a>
			</td>
			<td style="padding-right:5px"><img src="template/default/images/top_menu2_0.gif" alt="" /></td>
			<td style="padding-top:2px;padding-right:15px">
				<a href="javascript:void(0);" onclick="HrefToDef();return false;" class="fontMenu">引导页</a>
			</td>
			<td style="padding-right:5px"><img src="template/default/images/top_menu2_6.gif" alt="" /></td>
			<td style="padding-top:2px;padding-right:15px">'. $topMenuApp .'</td>
			<td style="padding-right:5px"><img src="template/default/images/top_menu2_5.gif" alt="" /></td>
			<td style="padding-top:2px;padding-right:15px" onmouseover=\'$id("cwcBox").style.display="";\' onmouseout=\'$id("cwcBox").style.display="none";\'>
				<a href="javascript:void(0);" class="fontMenu">快捷菜单</a>
				<div id="cwcBox" style="position: relative;display:none;"><div style="position: absolute;width:100px;padding:2px 1px 3px 5px;top:2px; left:-5px;line-height:1.42;background:#394b63;filter:alpha(opacity=85);-moz-opacity:0.85;opacity:0.85;">
					<a href="javascript:void(0);" onclick="UpdateAllCache();return false;" class="fontMenu">一键更新缓存</a><br />
					<!-- <a href="javascript:void(0);" onclick="ClearWebCache();return false;" class="fontMenu">清空页面缓存</a><br />
					<a href="javascript:void(0);" onclick="UpdateWebCache();return false;" class="fontMenu">更新配置缓存</a><br />
					<a href="javascript:void(0);" onclick=\'DataDeal.location.href="makeHtml_run.php?mudi=sitemapHtml";return false;return false;\' class="fontMenu">生成网站地图</a><br /> -->
					<a href="javascript:void(0);" onclick=\'ClearWebCache("noAlert");setTimeout("DataDeal.location.href=\"makeHtml_run.php?mudi=homeHtml\";",500);return false;return false;\' class="fontMenu">生成电脑首页静态</a><br />
					'. $wapStr .'
				</div></div>
			</td>
			<td style="padding-right:5px;"><img src="template/default/images/top_menu2_2.gif" alt="" /></td>
			<td style="padding-top:2px;padding-right:15px;">'. $topMenuUser .'</td>
			<td style="padding-right:5px"><img src="template/default/images/top_menu2_3.gif" alt="" /></td>
			<td style="padding-top:2px;padding-right:15px"><a href="javascript:void(0);" onclick=\'ClickMenu("修改密码","revSelf","","userManage");return false;\' class="fontMenu">修改密码</a></td>
			<td style="padding-right:5px"><img src="template/default/images/top_menu2_4.gif" alt="" /></td>
			<td style="padding-top:2px;padding-right:15px"><a href="admin_cl.php" class="fontMenu">退出</a></td>
			<td style="width:15px;"></td>
			</tr></table>

			<div style="width:1003px; height:0px; overflow:hidden;"></div>
		</td></tr>
		<tr><td valign="bottom">
			<input type="hidden" id="menuStr" name="menuStr" value="hiddenMenu" />
			<span id="hiddenMenu" style="display:none"></span>
			<table style="" border="0" cellspacing="0" cellpadding="0" summary=""><tr>
			';
				$payArr = AdmArea::GetAppIdArr();	// 获取已购买插件appID数组

				$menuexe = $DB->query('select MT_ID,MT_theme,MT_themeStyle from '. OT_dbPref .'menuTree where MT_level=0 and MT_userState=1 and MT_state=1 and MT_appID in ('. implode(',',$payArr) .') and MT_ID not in (0'. AdmTpl::NoIdMenuArr('nav') .') order by MT_rank ASC');
					while ($row = $menuexe->fetch()){
						$retStr .= self::MenuStr($row['MT_theme'], $row['MT_ID'], $row['MT_themeStyle'], true);
					}
				unset($menuexe);

				if ($MB->IsMenuRight('jud',441)){
					$cnName = '静态页管理';
					$cnName2 = SysDiff::AdminMenu($cnName);
					$retStr .= '
						<td id="mainMenuHtml" align="center" style="width:105px; height:27px; overflow:hidden;">
							<a href="javascript:void(0);" onclick=\'HrefTo("辅助管理","'. $cnName .'","makeHtml.php?mudi=manage&amp;dataMode=&amp;dataModeStr=&amp;dataType=&amp;dataTypeCN=%BE%B2%CC%ACHTML&amp;dataType2=&amp;dataID=0","441");return false;\' class="fontMenu" style="color:red;"><b>'. $cnName2 .'</b></a>
						</td>
						<td style=\'width:2px; height:27px; background:url("template/default/images/top_menuDz.gif");\'><div style="width:1px;height:1px;overflow:hidden;font-size:2px;">&ensp;&ensp;</div></td>
						';
					// $retStr .= AppBase::AdminMainMenuBox1($sysAdminArr['SA_tplDir']);
				}

				if ($MB->IsAdminRight('jud')){
					$retStr .= self::MenuStr('管理员专区','database', '', true);
				}

			$retStr .= '
			</tr></table>
			';

			// 自动载入菜单
			// if ($MB->GetRightStr() == 'admin'){ $autoOpenMenu='ClickMenu("用户管理","user","true","userManage")'; }
			$retStr .= '
			<script language="javascript" type="text/javascript">
			window.onload=function(){'. $autoOpenMenu .'}
			</script>
		</td></tr>
		</table>

		<table style="width:'. $skinWidth .';" align="center" cellspacing="0" cellpadding="0" border="0" summary="">
		<tr>
			<td bgcolor="#ff8300" style="height:2px; *height:1px;"><div style="width:1003px; height:0px; overflow:hidden;"></div></td>
		</tr>
		<tr>
			<td bgcolor="#ff8300">
				<table style="width:100%; height:100%;" align="center" cellspacing="0" cellpadding="0" border="0" summary=""><tr>
				<tr>
					<td id="ShowLeft" style="width:178px; height:444px; background:url(images/left_bg.gif);" valign="top">
						<!-- 左边菜单框 start -->
						<table style="width:100%; height:100%;" border="0" cellspacing="0" cellpadding="0" summary="">
						<tr><td bgcolor="#50696e" style="height:22px; padding-left:10px; padding-top:0px !important; padding-top:2px;">
							<table style="height:100%;" cellspacing="0" cellpadding="0" summary=""><tr>
							<td style="padding-right:5px; padding-top:2px !important; padding-top:0px;"><img src="images/share_dz1.gif" align="top" alt="" vspace="2" /></td>
							<td id="LeftText" style="font-weight:bold;" class="fontMenu"></td>
							</table>
						</td></tr>
						<tr><td id="leftMenuContent" style="height:100%;" valign="top"></td></tr>
						</table>
						<!-- 左边菜单框 end -->
					</td>
					<td onclick="TurnMenu()" bgcolor="#eff6fc" style="width:10px; height:444px; border-right:2px #0089be solid;" valign="top">
						<!-- 开关按钮 start -->
						<table style="width:100%; height:100%;" border="0" cellspacing="0" cellpadding="0" summary="">
						<tr><td style="height:22px !important; height:24px; padding-top:0px !important; padding-top:2px;" bgcolor="#50696e"></td></tr>
						<tr><td style="height:100%;"><img id="LeftImg" src="images/left_close.gif" alt="" style="cursor:pointer;" /></td></tr>
						</table>
						<!-- 开关按钮 end -->
					</td>
					<td id="RightFrmBg" valign="top" style="background-color:#ffffff;">
						<!-- 右边内容区 start -->
						<table style="width:100%; height:100%;" cellspacing="0" cellpadding="0" border="0" summary="">
						<tr><td bgcolor="#50696e" style="height:22px; padding-left:10px; padding-top:0px !important; padding-top:2px;">
							<table style="width:100%; height:100%;" cellspacing="0" cellpadding="0" summary=""><tr>
							<td style="width:17px; padding-right:5px;">
								<img src="images/share_dz1.gif" align="top" alt="" vspace="2" />
							</td>
							<td style="width:300px; font-weight:bold;" class="fontMenu">
								<span id="RightText">引导页</span>
							</td>
							<td id="exitTimeK" style="width:200px;" align="left" class="fontMenu">
								<span class="font2_2"></span>超时退出倒计时<span id="exitM" class="font2_2"></span>分<span id="exitS" class="font2_2"></span>秒
							</td>
							<td id="rightBoxK" class="fontMenu" style="display:none;">
								页面刷新倒计时<span id="rightBoxSec" class="font2_2"></span>秒&ensp;&ensp;<span style="color:red;cursor:pointer;" onclick="endRboxCountdown()">[停止]</span>
							</td>
							<td align="right" class="fontMenu" style="padding:2px 6px 0 10px;">
								<div style="float:right;padding-left:12px;"><img src="images/img_gao.gif" class="pointer" onclick="CheckRightHeight(1)" title="重新调整内容框高度" alt="重新调整内容框高度" /></div>
								用户名：'. $memberRow['MB_username'] .'　　　称呼：'. $memberRow['MB_realname'] .'
							</td>
							<!-- <td align="right" class="fontMenu" style="width:20px; padding:0 2px 0 10px;">
								<img src="images/dz1.gif" border="0" onclick="CheckFdbox()" style="cursor:pointer;" alt="显示/关闭快捷&工具栏" />
							</td> -->
							</table>
						</td></tr>
						<tr><td valign="top">
							'. $tabMenuBox .'
							<div id="iframeArea">
								<iframe id="RightFrm0" name="RightFrm0" src="about:blank" frameborder="0" allowTransparency="true" scrolling="auto" style="width:100%; height:100%; min-height:400px;"></iframe>
							</div>
						</td></tr>
						</table>
						<!-- 右边内容区 end -->
					</td>
				</tr>
				</table>
			</td>
		</tr>
		</table>
		'. AdmTpl::LeftMenu();	// 左侧菜单

		$copyrightName	= '福州网钛软件科技有限公司';
		$copyrightUrl	= 'http://otcms.com/';
		if (strlen($sysAdminArr['SA_copyrightName']) > 0){
			$copyrightName = $sysAdminArr['SA_copyrightName'];
			if (strlen($sysAdminArr['SA_copyrightUrl']) > 10){
				$copyrightUrl = $sysAdminArr['SA_copyrightUrl'];
			}
		}
		$retStr .= '
		<table style="width:'. $skinWidth .'; height:34px;" align="center" border="0" cellspacing="0" cellpadding="0" summary="">
		<tr><td align="center" class="fontMenu" style="background:url(template/default/images/bottom_bg.jpg); font-family:Arial;line-height:2;">
			<div style="width:1003px; height:0px; overflow:hidden;"></div>
				<div style="float:right;padding-right:8px;"><img src="images/img_gao.gif" class="pointer" onclick="CheckRightHeight(9)" title="重新调整内容框高度" alt="重新调整内容框高度" /></div>
				技术支持：<a class="fontMenu" href="'. $copyrightUrl .'" target="_blank" title="'. $copyrightName .'">'. $copyrightName .'</a>
				&ensp;&ensp;Copyright &copy; 2010-'. date('Y') .'
		</td></tr>
		</table>

		<script language="javascript" type="text/javascript">
		StartCalcTime();
		</script>

		</body>
		</html>
		';

		return $retStr;
	}


	// 通用配置文件
	public static function WebConfig(){
		global $sysAdminArr;
		
		$retStr = '
		<!-- big5  gb2312 gbk utf-8 -->
		<meta http-equiv="Content-Type" content="text/html; charset='. OT_Charset .'" />
		<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
		<meta name="author" content="'. OT_SOFTNAME .'(网钛科技)">
		<!-- 插入常用JS -->
		<script language="javascript" type="text/javascript">var editorMode="'. $sysAdminArr['SA_editorMode'] .'";</script>
		<script language="javascript" type="text/javascript" src="js/inc/jquery.min.js?v='. OT_VERSION .'"></script>
		<script language="javascript" type="text/javascript" src="js/inc/jquery-migrate.js?v='. OT_VERSION .'"></script>
		<script language="javascript" type="text/javascript" src="js/inc/common.js?v='. OT_VERSION .'"></script>
		<script language="javascript" type="text/javascript" src="js/inc/editor.js?v='. OT_VERSION .'"></script>
		<!-- 插入日历控件 -->
		<script language="javascript" type="text/javascript" src="tools/My97DatePicker/WdatePicker.js?v='. OT_VERSION .'"></script>
		<!-- 插入CSS -->
		<link href="template/share.css?v='. OT_VERSION .'" type="text/css" rel="stylesheet" />
		';

		return $retStr;
	}

	// 表格页头
	public static function TableTop($img, $idName, $cnName){
		global $skin;
		$retStr = '
		<table style="width:99%;" align="center" cellpadding="0" cellspacing="0" border="0" class="tabWeb1" summary="">
		<tr><td style="height:24px; padding-left:6px; background:url(images/right_titleBg.gif);">
			<table cellpadding="0" cellspacing="0" summary=""><tr>
			<td style="padding-right:6px;"><img src="images/'. $img .'" alt="" /></td>
			<td style="font-weight:bold;padding-top:4px;letter-spacing:2px" class="fontMenu" id="'. $skin->TableTopId($idName) .'">'. $cnName .'</td>
			</table>
		</td></tr>
		<tr><td style="padding:5px">
		';

		return $retStr;
	}

	// 表格页头2
	public static function TableTop2($img, $idName, $cnName){
		global $skin;
		$retStr = '
		<table style="width:99%;" align="center" cellpadding="0" cellspacing="0" border="0" summary="" class="tabList1">
		<tr><td style="height:24px; background:url(images/right_titleBg.gif); padding-left:6px" colspan="30" class="border1_1">
			<div id="tabToBottomBtn" style="display:none;"><a href="#tabBottom" class="toBottomBtn" title="移动到该列表底部">置底</a></div>
			<table cellpadding="0" cellspacing="0" summary=""><tr>
			<td style="padding-right:6px;"><img src="images/'. $img .'" alt="" /></td>
			<td style="font-weight:bold;padding-top:4px;letter-spacing:2px;" class="fontMenu" id="'. $skin->TableTopId($idName) .'">'. $cnName .'</td>
			</table>
		</td></tr>
		';

		return $retStr;
	}

	// 主菜单
	public static function MenuStr($cnName, $enName, $styleStr='', $judGet=true){
		global $MB,$autoOpenMenu;

		$retStr = '';
		if ($MB->IsMenuRight('jud',$enName)){
			if ($autoOpenMenu == ''){ $autoOpenMenu = 'ClickMenu("'. $cnName .'","'. $enName .'",false,"")'; }	// 记录第一个菜单信息
			$retStr .= '
			<td id="mainMenu'. $enName .'" align="center" style="width:85px; height:27px; overflow:hidden;">
				<a href="javascript:void(0);" onclick=\'ClickMenu("'. $cnName .'","'. $enName .'",true,"");return false;\' class="fontMenu" style="'. $styleStr .'"><b>'. $cnName .'</b></a>
			</td>
			<td style=\'width:2px; height:27px; background:url("template/default/images/top_menuDz.gif");\'><div style="width:1px;height:1px;overflow:hidden;font-size:2px;">&ensp;</div></td>
			';
		}

		if ($judGet){
			return $retStr;
		}else{
			echo($retStr);
		}
	}

	// 子菜单
	public static function MenuStr2($menuSelID, $menuID, $menuName, $URL, $styleStr='', $judGet=true){
		global $MB,$autoOpenStr;
		$mainMenuName = '';

		$retStr = '';
		if ($menuID == ''){ $menuID = 0; }
		if ($MB->IsMenuRight('jud',$menuID)){
			if ($autoOpenStr==''){
				$retStr .= '
				<input type="hidden" id="input'. $menuSelID .'" name="input'. $menuSelID .'" value=\'HrefTo("'. $mainMenuName .'","'. $menuName .'","'. $URL .'","'. $menuID .'")\' />
				';
				$autoOpenStr='
				<script language="javascript" type="text/javascript">
				window.onload=function(){ HrefTo("'. $mainMenuName .'","'. $menuName .'","'. $URL .'","'. $menuID .'"); }
				</script>
				';	//获取自动载入菜单信息
			}
			$retStr .= '
			<table style=\'width:178px; height:31px; background:url("images/left_menuBg.gif");\' summary=""><tr>
			<td style="padding-top:4px !important; padding-top:0px; padding-left:30px;">
				<a href="#" onclick=\'HrefTo("'. $mainMenuName .'","'. $menuName .'","'. $URL .'","'. $menuID .'");return false;\' class="fontLeft" style="'. $styleStr .'"><b>'. $menuName .'</b></a>
			</td>
			</tr></table>
			';
		}

		if ($judGet){
			return $retStr;
		}else{
			echo($retStr);
		}
	}

	// 登陆页验证码
	public static function ShowVerCode($svcForm,$svcId=''){
		if (OT_OpenVerCode){
			global $systemArr;

			if ($systemArr['SYS_verCodeMode'] == 20){
				return '<div id="geetestDiv"></div>
						<p id="geetestWait" style="color:blue;display:none;">正在加载验证码......</p>
						<p id="geetestNote" style="display:none;">请先完成验证</p>
						<script language="javascript" type="text/javascript" src="../tools/geetest/gt.js"></script>
						';
			}else{
				if (empty($svcId)){ $svcId='verCode'; }
				return '<input type="text" id="'. $svcId .'" name="verCode" maxlength="16" class="text" style="width:60px;" onfocus=\'GetVerCode("input")\' title="如看不清验证码，可以点击验证码进行更换" />&ensp;&ensp;<span id="showVerCode" class="font2_2" onclick=\'GetVerCode("font")\' style="cursor:pointer;">点击获取验证码</span>';
			}
		}else{
			return '<span class="font2_2">已关闭</span>';
		}
	}

}