<?php

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



class AdmTplYouyou{

	// 后台模板
	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 -->
			<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
			<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/youyou/css/userlogin.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><!-- 防止另存为 -->

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

		<body class="bgw">
		<div class="main-content">
			<div class="top_nav">
				<div class="main_c">
					<a class="logo" href="./" title="网钛IDC系统(idcCMS) 后台管理系统"></a>
					<div class="top_links">
						<a href="../">★回到前台首页</a>
						<a href="http://otcms.com/news/8101.html" target="_blank">★搬家后数据库异常</a>
						<a href="http://idccms.com/softUpdate/9169.html" target="_blank">★网钛IDC系统最新版</a>
					</div>
				</div>
			</div>
			<div class="main_c">
				<div class="form_w clearfix">
					<form id="loginForm" name="loginForm" method="post" class="form_act" 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="" />
						<div class="login_tit">后台管理系统</div>
						<fieldset>
							<div class="block clearfix">
								<span class="block input-icon">
									<input class="form-control req the-padding-left" placeholder="账号" type="text" id="username" name="username" onkeyup="if (this.value!=FiltVarStr(this.value)){this.value=FiltVarStr(this.value)}">
								</span>
							</div>
							<div class="block clearfix">
								<span class="block input-icon">
									<input class="form-control req the-padding-left" placeholder="密码" type="password" id="userpwd" name="userpwd">
								</span>
							</div>
							
							<div class="block clearfix">
								<span class="block input-icon input-yzm">
								';
									if (OT_OpenVerCode && strpos($systemArr['SYS_verCodeStr'],'|admin|') !== false){
										$retStr .= AdmTpl::ShowVerCode('loginForm','verCode');
									}
								$retStr .= '
								</span>
							</div>
							
							<div class="block clearfix">
								<span class="block input-icon ">
									<a href="http://otcms.com/news/7851.html" target="_blank" class="fr">忘记密码?</a>
								</span>
							</div>
							<div class="space"></div>
							<div class="block">
								<button type="submit" class="login_btn btn-danger btn-block">登录</button>
							</div>
							<div class="space-4"></div>
						</fieldset>
					</form>
				</div>
			</div>
			<div class="copyright">
				版本：'. OT_VERSION .'/'. PHP_VERSION . (PHP_VERSION < 5.3 ? '<span style="color:red;">（建议PHP版本≥5.3）</span>' : '') .'&ensp;&ensp;&ensp;&ensp;技术支持：<a class="fontMenu" href="http://otcms.com/" target="_blank" title="福州网钛软件科技有限公司">网钛科技</a>
			</div>
		</div>

		</body>
		</html>
		';

		return $retStr;
	}


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

		$payArr = AdmArea::GetAppIdArr();	// 获取已购买插件appID数组

		$topMenuWap = $topMenuImgStr = $topMenuApp = $topMenuUser = $topMenuRev = $topMenuHtml = '';

		// 是否启用头部主菜单模式
		if (strpos($sysAdminArr['SA_event'], '|topNav|') !== false){
			$judTopNav = true;
			$topMenuRev = '<li> <a href="javascript:void(0);" onclick=\'ClickMenu("修改密码","revSelf","","userManage");return false;\'><i class="otcmssys-edit-2"></i> 修改密码</a> </li>';
		}else{
			$judTopNav = false;
			$topMenuRev = '<li> <a href="javascript:void(0);" onclick=\'HrefTo("修改密码","修改用户名或密码","admin.php?mudi=revPwd","修改用户名或密码");return false;\'><i class="otcmssys-edit-2"></i> 修改密码</a> </li>';
		}

		// 手机版菜单
		if (AppWap::Jud()){
			$topMenuWap = '<li><a href="javascript:void(0);" onclick=\'ClearWebCache("noAlert");setTimeout("DataDeal.location.href=\"makeHtml_runWap.php?mudi=homeHtml\";",500);return false;return false;\'><i class="otcmssys-mobile"></i> 生成手机首页</a></li>';
		}

		// 超级管理员专属菜单
		if ($MB->IsMenuRight('jud','用户管理')){
			$topMenuImgStr = '<li><a href="javascript:void(0);" onclick="HrefToShop(\'\');return false;" style="color:#fff;"><i class="otcmssys-137" style="color:#fff;" title="插件平台"></i><!-- 插件 --></a></li>';
			$topMenuApp = '<li><a href="javascript:void(0);" onclick="HrefToShop(\'\');return false;" style="font-weight:bold;"><i class="otcmssys-137"></i> 插件平台</a></li>';	// <li class="divider"></li>
			if ($judTopNav){
				$topMenuUser = '<li> <a href="javascript:void(0);" onclick=\'ClickMenu("用户管理","user","","userManage");return false;\'><i class="otcmssys-74"></i> 用户管理</a></li>';
			}
		}

		$topMenuStr = $topMiniMenuStr = $leftMenuStr = $leftMenuList = $autoOpenStr = '';
		if ($judTopNav){
			// 头部主菜单模式
			$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()){
					$topMenuStr .= self::MenuStr($row['MT_theme'], $row['MT_ID'], $row['MT_themeStyle'], true);
				}
			unset($menuexe);

			if ($MB->IsMenuRight('jud',441) && AppBase::Jud()){
				$cnName = '静态页管理';
				$cnName2 = SysDiff::AdminMenu($cnName);
				$topMenuStr .= '
					<li id="mainMenuHtml" class="navbar-levelone">
						<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;\' style="font-weight:900;">'. $cnName2 .'</a>
					</li>
					';
				// $topMenuStr .= AppBase::AdminMainMenuBox1($sysAdminArr['SA_tplDir']);
			}

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

			$topMenuStr .= '
			<script language="javascript" type="text/javascript">
			window.onload=function(){'. $autoOpenMenu .'}
			</script>
			';

			$topMiniMenuStr .= '
				'. $topMenuImgStr .'
				<li><a href="javascript:void(0);" onclick="HrefToDef();return false;"><i class="otcmssys-windows" style="color:#fff;" title="引导页"></i></a></li>
				';
			$leftMenuList = AdmTpl::LeftMenu();

		}else{
			// 左侧主菜单模式
			if ($MB->IsMenuRight('jud',441) && AppBase::Jud()){
				$cnName = '静态页管理';
				$cnName2 = SysDiff::AdminMenu($cnName);
				$topMenuHtml = '
					<li id="mainMenuHtml" class="navbar-levelone">
						<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;\'  style="font-weight:bold;"><i class="otcmssys--13"></i> '. $cnName2 .'</a>
					</li>
					';
			}

			$topMenuStr = '
				<li><a href="../" target="_blank"><i class="otcmssys-home-3"></i> 前台</a></li>
				<li><a href="javascript:void(0);" onclick="HrefToDef();return false;"><i class="otcmssys-windows" style="color:#fff;" title="引导页"></i> 引导页</a></li>
				'. $topMenuApp .'
				'. $topMenuHtml .'
				<li><a href="javascript:void(0);" onclick="UpdateAllCache();return false;"><i class="otcmssys-spinner3"></i> 一键更新缓存</a></li>
				<li><a href="javascript:void(0);" onclick=\'ClearWebCache("noAlert");setTimeout("DataDeal.location.href=\"makeHtml_run.php?mudi=homeHtml\";",500);return false;return false;\'><i class="otcmssys-19"></i> 生成电脑首页</a></li>
				'. $topMenuWap .'
				'. $topMenuUser .'
				<li><a href="admin_cl.php?mudi=exit&nohrefStr=close"><i class="otcmssys-exit2"></i> 退出</a> </li>
				';
			$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()){
					if ($MB->IsMenuRight('jud',$row['MT_ID'])){
						$cnName = $row['MT_theme'];	// SysDiff::AdminMenu()
						$leftMenuStr .= '
							<li id="mainMenu'. $row['MT_ID'] .'" class="nav-item nav-item-has-subnav">    
							<a href="javascript:void(0)" style="'. $row['MT_themeStyle'] .'"><i class="'. self::MenuIco($row['MT_ID']) .'"></i>'. $cnName .'</a>
							<ul class="nav nav-subnav" >
							';	// '. $row['MT_ID'] .' 

							$menu2exe=$DB->query('select MT_ID,MT_theme,MT_themeStyle,MT_URL,MT_menuID from '. OT_dbPref .'menuTree where MT_level=1 and MT_menuID='. $row['MT_ID'] .' and MT_userState=1 and MT_state=1 and MT_appID in ('. implode(',',$payArr) .') and MT_ID not in (0'. AdmTpl::NoIdMenuArr('menu') .') order by MT_rank ASC');
								while ($row2 = $menu2exe->fetch()){
									if ($MB->IsMenuRight('jud',$row2['MT_ID'])){
										/* if ($autoOpenStr==''){
											$leftMenuStr .= '
											<input type="hidden" id="input'. $row['MT_ID'] .'" name="input'. $row['MT_ID'] .'" value=\'HrefTo("'. $row['MT_theme'] .'","'. $row2['MT_theme'] .'","'. $row2['MT_URL'] .'","'. $row2['MT_ID'] .'")\' />
											';
											$autoOpenStr = '
											<script language="javascript" type="text/javascript">
											window.onload=function(){ HrefTo("'. $row['MT_theme'] .'","'. $row2['MT_theme'] .'","'. $row2['MT_URL'] .'","'. $row2['MT_ID'] .'"); }
											</script>
											';	//获取自动载入菜单信息
										} */
										$leftMenuStr .= '
											<li class="nav-item">
												<a href="javascript:void(0)" onclick=\'HrefTo("'. $row['MT_theme'] .'","'. $row2['MT_theme'] .'","'. $row2['MT_URL'] .'","'. $row2['MT_ID'] .'");return false;\' style="'. $row2['MT_themeStyle'] .'"><!--  class="ico"<i class="otcmssys-219"></i>  -->'. $row2['MT_theme'] .'</a>
											</li>
											';
									}
								}
							unset($menu2exe);

						$leftMenuStr .= '
							</ul>
							</li>
							';
					}
				}
			unset($menuexe);

			if ($MB->IsAdminRight('jud')){
				$adminMenuArr = array();
				$adminMenuArr[] = array('type'=>'database', 'name'=>'管理员区', 'ico'=>'otcmssys-cate');
				$adminMenuArr[] = array('type'=>'user', 'name'=>'用户管理', 'ico'=>'otcmssys-74');

				foreach ($adminMenuArr as $val){
					$leftMenuStr .= '
						<li id="mainMenu'. $val['type'] .'" class="nav-item nav-item-has-subnav">    
						<a href="javascript:void(0)"><i class="'. $val['ico'] .'"></i>'. $val['name'] .'</a>
						<ul class="nav nav-subnav" >
						';

						$menuArr = AdmTpl::DiyMenuArr($val['type']);
						foreach ($menuArr as $val2){
							$leftMenuStr .= '
								<li class="nav-item">
									<a href="javascript:void(0)" onclick=\'HrefTo("'. $val['name'] .'","'. $val2['name'] .'","'. $val2['url'] .'","'. $val2['id'] .'");return false;\'><!--  class="ico"<i class="otcmssys-219"></i>  -->'. $val2['name'] .'</a>
								</li>
								';
						}

						$leftMenuStr .= '
						</ul>
						</li>
						';
				}
			}

			$adminMenuArr = array();
			$adminMenuArr[] = array('type'=>'revSelf', 'name'=>'修改密码');
			foreach ($adminMenuArr as $val){
				$leftMenuStr .= '
					<li id="mainMenu'. $val['type'] .'" class="nav-item nav-item-has-subnav">    
					<a href="javascript:void(0)"><i class="otcmssys-edit-2"></i>'. $val['name'] .'</a>
					<ul class="nav nav-subnav" >
					';

					$menuArr = AdmTpl::DiyMenuArr($val['type']);
					foreach ($menuArr as $val2){
						$leftMenuStr .= '
							<li class="nav-item">
								<a href="javascript:void(0)" onclick=\'HrefTo("'. $val['name'] .'","'. $val2['name'] .'","'. $val2['url'] .'","'. $val2['id'] .'");return false;\'><!--  class="ico"<i class="otcmssys-219"></i>  -->'. $val2['name'] .'</a>
							</li>
							';
					}

					$leftMenuStr .= '
					</ul>
					</li>
					';
			}

			$leftMenuList = '
			<script language="javascript" type="text/javascript">
			window.onload=function(){ HrefToDef(); }
			</script>
			';
		}

		$workOrderStr = '';
		if ($sysAdminArr['SA_workOrderSec'] > 0){
			// 定时读取显示工单信息
			$workOrderStr = '
				<li id="workOrderBox">
					<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>
				</li>
				';
		}

		$tabMenuBox = '';
		if ($sysAdminArr['SA_isSubMenu'] == 1){
			// 多菜单选项卡
			$tabMenuBox = '
				<div id="subMenuArea" class="subMenuArea">
					<a href="javascript:;" id="prevBtn" class="prevBtn prevBtn2 fl" title="上一页"><i class="otcmssys-backward2"></i></a>
					<a href="javascript:;" id="nextBtn" class="nextBtn nextBtn2 fr" title="下一页"><i class="otcmssys-forward3"></i></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>
						</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 class="theme-blue-gradient pace-done">
		'. $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" />

		<div class="otcms-layout-web" style="min-width:1280px;">
		<div class="otcms-layout-container">
		<header class="otcms-layout-header">
			<nav class="navbar navbar-default">
				<div class="topbar" id="header-navbar">
					<div class="topbar-left nav navbar-nav">
						<div class="otcms-aside-toggler">
							<span class="otcms-toggler-bar"></span>
							<span class="otcms-toggler-bar"></span>
							<span class="otcms-toggler-bar"></span>
						</div>
						'. $topMenuStr .'
					</div>
					<ul class="topbar-right">
						<li class="dropdown dropdown-profile">
							<a href="javascript:void(0)" data-toggle="dropdown">
								<img class="img-avatar img-avatar-40" src="template/youyou/images/def_face.png" alt="头像"><span class="adminUser">'. $memberRow['MB_realname'] .'<span class="caret"></span></span>
							</a>
							<ul class="dropdown-menu dropdown-menu-right">
								'. $topMenuApp .'
								<li><a href="../" target="_blank"><i class="otcmssys-home-3"></i> 前台网站</a></li>
								<li><a href="javascript:void(0);" onclick="HrefToDef();return false;"><i class="otcmssys-windows"></i> 引导页</a></li>
								<li class="divider"></li>
								<li><a href="javascript:void(0);" onclick="UpdateAllCache();return false;"><i class="otcmssys-spinner3"></i> 一键更新缓存</a></li>
								<li><a href="javascript:void(0);" onclick=\'ClearWebCache("noAlert");setTimeout("DataDeal.location.href=\"makeHtml_run.php?mudi=homeHtml\";",500);return false;return false;\'><i class="otcmssys-19"></i> 生成电脑首页</a></li>
								'. $topMenuWap .'
								<li class="divider"></li>
								'. $topMenuRev .'
								'. $topMenuUser .'
								<li class="divider"></li>
								<li><a href="admin_cl.php?mudi=exit&nohrefStr=close"><i class="otcmssys-exit2"></i> 退出登录</a> </li>
							</ul>
						</li>
						'. $topMiniMenuStr .'
					</ul>
				</div>
			</nav>
		</header>
		<aside class="otcms-layout-sidebar">
			<div id="logo" class="sidebar-header">
				<a class="navbar-brand" href="#">网钛后台管理</a>
			</div>
			<div class="otcms-layout-sidebar-scroll">
				<nav class="sidebar-main" id="ShowLeft">
					<input type="hidden" id="menuStr" name="menuStr" value="hiddenMenu" />
					<span id="hiddenMenu" style="display:none"></span>
					<span id="LeftText" style="display:none"></span>
					<ul class="nav nav-drawer" id="leftMenuContent">
						'. $leftMenuStr .'
					</ul>
				</nav>
			</div>
		</aside>
		';

		$copyrightTitle	= '技术支持';
		$copyrightName	= '福州网钛软件科技有限公司';
		$copyrightUrl	= 'http://otcms.com/';
		if (strlen($sysAdminArr['SA_copyrightName']) > 0){
			$copyrightTitle = '使用者';
			$copyrightName = $sysAdminArr['SA_copyrightName'];
			if (strlen($sysAdminArr['SA_copyrightUrl']) > 10){
				$copyrightUrl = $sysAdminArr['SA_copyrightUrl'];
			}
		}
		$retStr .= '
		<main class="otcms-layout-content">
			'. $tabMenuBox .'
			<div class="container-fluid">
				<span id="RightFrmBg" style="display:none"></span>
				<span id="LeftImg" style="display:none"></span>
				<div class="row">
					<div class="col-lg-12">
						<div class="card">
							<div class="card-header card-model-header">
								<h4 id="RightText">引导页</h4>

								<div id="exitTimeK" style="color:#333" align="left" class="fontMenu">
									<span class="font2_2"></span>超时退出倒计时<span id="exitM" class="font2_2"></span>分<span id="exitS" class="font2_2"></span>秒
								</div>
								<div id="rightBoxK" class="fontMenu" style="display:none;color:#333">
									页面刷新倒计时<span id="rightBoxSec" class="font2_2"></span>秒&ensp;&ensp;<span style="color:red;cursor:pointer;" onclick="endRboxCountdown()">[停止]</span>
								</div>
								'. $workOrderStr .'

								<div class="card-toolbar clearfix">
									<div class="toolbar-btn-action">
										<a class="btn btn-danger m-r-5 submenuitem" href="javascript:void(0);" onclick="RightFrameBack()" title="框架里网页返回"><i class="otcmssys-73"></i> 返回</a>
										<a class="btn btn-dark m-r-5 submenuitem" href="javascript:void(0);" onclick="RightFrameToBottom()" title="框架里网页移到底部"><i class="otcmssys-AK-IM"></i> 置底</a>
										<a class="btn btn-primary m-r-5 submenuitem" href="javascript:void(0);" onclick="CheckRightHeight(1)" title="重新调整内容框高度，点击右下角下箭头图标一样效果"><i class="otcmssys-47"></i> 调整高度</a>
									</div>
								</div>
							</div>
							<div class="card-body card-model">
								<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>
							</div>
						</div>
						<div class="card-bottom pointer" title="点击此处调整内容框高度" onclick="CheckRightHeight(9)"></div>
					</div>			
				</div>
				
				<table style="width:100%; height:34px;" align="center" border="0" cellspacing="0" cellpadding="0" summary="">
					<tr>
						<td align="center" class="fontMenu" style="background:#333; 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>
							'. $copyrightTitle .'：<a class="fontMenu" href="'. $copyrightUrl .'" target="_blank" title="'. $copyrightName .'">'. $copyrightName .'</a>
							&ensp;&ensp;Copyright &copy; 2010-'. date('Y') .'&ensp;&ensp;页面UI：悠悠设计
						</td>
					</tr>
				</table>
			</div>
		</main>
		'. $leftMenuList .'

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

		<script type="text/javascript" src="template/youyou/js/bootstrap.min.js"></script>
		<script type="text/javascript" src="template/youyou/js/perfect-scrollbar.min.js"></script>
		<script type="text/javascript" src="template/youyou/js/bootstrap-notify.min.js"></script>
		<script type="text/javascript" src="template/youyou/js/tips.js"></script>
		<script type="text/javascript" src="template/youyou/js/main.min.js"></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 http-equiv="Cache-Control" content="no-cache" />
		<!-- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" /> -->
		<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" />
		<link href="template/youyou/css/bootstrap.min.css?v='. OT_VERSION .'" rel="stylesheet">
    	<link href="template/youyou/css/fonts.css?v='. OT_VERSION .'" rel="stylesheet">
    	<link href="template/youyou/css/style.css?v='. OT_VERSION .'" 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 class="otcms-title-bg">
			<table cellpadding="0" cellspacing="0" summary=""><tr>
			<td class="otcms-title-ico"><img src="template/youyou/images/'. $img .'.png" 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 class="otcms-title-bg" 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 class="otcms-title-ico"><img src="template/youyou/images/'. $img .'.png" 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)){
			$cnName = SysDiff::AdminMenu($cnName);
			if ($autoOpenMenu == ''){ $autoOpenMenu = 'ClickMenu("'. $cnName .'","'. $enName .'",false,"")'; }	// 记录第一个菜单信息
			$retStr .= '
			<li id="mainMenu'. $enName .'" class="navbar-levelone">
				<a href="javascript:void(0);" onclick=\'ClickMenu("'. $cnName .'","'. $enName .'",true,"");return false;\' style="'. $styleStr .'">'. $cnName .'</a>
			</li>
			';
		}

		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 .= '
			<li class="nav-item nav-item-has-subnav">
				<a href="javascript:void(0)" onclick=\'HrefTo("'. $mainMenuName .'","'. $menuName .'","'. $URL .'","'. $menuID .'");return false;\' style="'. $styleStr .'"><i class="otcmssys-219"></i>'. $menuName .'</a>
			</li>
			';
		}

		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 class="form-control req the-padding-left" placeholder="验证码" type="text" id="'. $svcId .'" name="verCode" maxlength="16" onfocus=\'GetVerCode("input")\'><span id="showVerCode" class="font2_2" onclick=\'GetVerCode("font")\' style="cursor:pointer;"></span>';
			}
		}else{
			return '';
		}
	}

	// 主菜单ico图标
	public static function MenuIco($menuID,$def='otcmssys-29'){
		switch ($menuID){
			case 644:	return 'otcmssys-control-fill';	// IDC设置
			case 871:	return 'otcmssys-ic_org';		// IDC管理
			case 645:	return 'otcmssys-108';		// 虚拟主机
			case 647:	return 'otcmssys-UI';		// 云服务器
			case 815:	return 'otcmssys-tel-2';	// 拨号VPS
			case 648:	return 'otcmssys-display';	// 物理机
			case 649:	return 'otcmssys-wifi';		// 域名
			case 1:		return 'otcmssys-47';		// 常规设置
			case 345:	return 'otcmssys-228';		// 文章管理
			case 400:	return 'otcmssys-compass';	// 采集管理
			case 364:	return 'otcmssys-cogs';		// 辅助管理
			case 467:	return 'otcmssys-24';		// 功能模块
			case 429:	return 'otcmssys-users';	// 会员管理
			case 393:	return 'otcmssys-212';		// 淘宝客管理
			case 576:	return 'otcmssys-291';		// 公众号管理
			case 589:	return 'otcmssys-mao';		// 活动管理
			case 590:	return 'otcmssys-67';		// 财务管理
			case 629:	return 'otcmssys-ic_org';	// 企业站功能
			case 454:	return 'otcmssys-app';		// 模板功能
			case 465:	return 'otcmssys-tel-2';	// 移动端管理
			case 1070:	return 'otcmssys-infinite';	// 小程序管理
			default :	return $def;
		}
	}
}