<%@ Page Language="C#" AutoEventWireup="True" Inherits="Kesion.NET.WebSite.Main" Title="" Codebehind="Main.aspx.cs" %>
<%@ OutputCache Duration="120" VaryByParam="none" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="Kesion.BLL" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.Cache" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit"> 
<title>无标题文档</title>
<link href="/admin/images/style.css" rel="stylesheet" type="text/css" />
<link href="/admin/images/style2.css" rel="stylesheet" type="text/css" />
<link href="/admin/images/percircle.css" rel="stylesheet" />
<link href="/admin/images/Main.css" rel="stylesheet" />
<script src="../../ks_inc/jquery.js"></script>
<script src="../../ks_inc/kesion.common.js"></script>
<script>
	function addWorkTable() {
		parent.openWin("添加快捷键到我的工作台", "<%=KSCMS.GetInstallDir()+MyCache.GetCacheConfig(4)%>/System/KS.WorkTableManage.aspx?action=add", true, 820, 500);
    }
    function delWorkTable(id) {
    	KesionJS.Confirm("确定删除该快捷键?", "location.href='<%=KSCMS.GetInstallDir()+MyCache.GetCacheConfig(4)%>/System/KS.WorkTableManage.aspx?action=delQuickMenu&from=FrameWork/Main.aspx&ids=" + id + "';", null);
    }
    function addPlan(date) {
    	parent.openWin("添加工作计划", "<%=KSCMS.GetInstallDir()+MyCache.GetCacheConfig(4)%>/User/KS.AdminPlan.aspx?istop=1&action=add&date="+date, true, 820, 611);
    }
    function rz() {
    	$(".concent .left").width($(window).width() - $(".right").width() - 40);
    }
    $(function () {
    	rz();
    	$(window).resize(function () {
    		rz();
    	});
		var classStyle = parent.document.body.className.match(/s\d+/)[0]
		$('body').addClass(classStyle);
    });
	
	
</script>


</head>

<body class="prebody">
            <form id="form1" runat="server">

<!--新的首页开始-->
<!--左边模块开始-->
<div class="m-leftBox">

  <!--快捷入口开始-->
  <div class="m-padding m-quickEntry"<%=KSSecurity.CheckMenuPower(KSSecurity.RemovePowerBadChar("System/KS.WorkTableManage.aspx")).ToString().ToLower().Equals("true")?"":" style='display:none'" %>>
     <div class="m-title">快捷入口</div>
	 <ul class="clearfix">
        <asp:Repeater ID="MyWorkTable" runat="server"  >
          <HeaderTemplate>
          </HeaderTemplate>
         <ItemTemplate>
           <li>
             <a title="<%# Eval("intro") %>" href="<%# Convert.ToString(Eval("url")).Replace("{$AdminDir}",KSCMS.GetInstallDir()+MyCache.GetCacheConfig(4)+"/") %>"><img onerror="this.src='../../sysimg/default/1.png';" src="<%# Eval("ico") %>"></a>
             <span><i><a onClick="delWorkTable(<%# Eval("id") %>)" href="javascript:;" ></a></i><%# Eval("itemname") %></span>
           </li>
         </ItemTemplate>
          <FooterTemplate>
               <li class="m-quickE-add">
                   <a href="javascript:;" onClick="addWorkTable()">+</a>
               </li>
          </FooterTemplate>
        </asp:Repeater>
	 </ul>
  </div>
  <!--快捷入口结束--> 
  <!--待办事项开始-->
  <div class="m-padding m-matter">
     <div class="m-conBox">
         <div class="m-title">待审核事项</div>
         <ul class="clearfix">
            <%
                int nowNum = 0;
                int num = 0;
                int showMaxNum = 7;
                StringBuilder sb = new StringBuilder();
    
                if (BaseFun.CheckModulePower("edu")) //课程
                {
                    if (BaseFun.CheckModulePower("edu"))
                    {
                        if (nowNum <= showMaxNum && BaseFun.CheckModulePower("school") && BaseFun.CheckTableExists("KS_EnterPrise"))
                        {
                            num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From KS_EnterPrise where  Status=0"));
                            if (num > 0)
                            {
                                sb.AppendLine(string.Format(@"
                                <li class=""m-boxBorder1"">
                                    <a href=""../EnterPrise/KS.CsEnterPriseZS.Aspx?verify=5"" title=""机构系统"">
                                        <div class=""inner"">
											<img class=""m-icon"" src=""/admin/images/m-icon1.png"">
                                            <div class=""m-iconname"">机构</div><span>{0}</span> 
                                        </div>
                                    </a>
                                </li>", num));
                                nowNum++;
                            }
                        }
                        if (nowNum <= showMaxNum && BaseFun.CheckModulePower("school")&& BaseFun.CheckTableExists("KS_EnterPriseNews"))
                        {
                            num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From KS_EnterPriseNews where  status=0"));
                            if (num > 0)
                            {
                                sb.AppendLine(string.Format(@"
                                <li class=""m-boxBorder2"">
                                    <a href=""../EnterPrise/KS.CsEpNews.Aspx?Type=1"" title=""机构系统"">
                                        <div class=""inner"">
                                            <img class=""m-icon"" src=""/admin/images/m-icon2.png"">
                                            <div class=""m-iconname"">机构新闻</div><span>{0}</span>
                                        </div>
                                    </a>
                                </li>", num));
                                nowNum++;
                            }
                        }
                        if (nowNum <= showMaxNum && BaseFun.CheckModulePower("school")&& BaseFun.CheckTableExists("KS_EnterPrisePhoto"))
                        {
                            num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From KS_EnterPrisePhoto where  status=0"));
                            if (num > 0)
                            {
                                sb.AppendLine(string.Format(@"
                                <li class=""m-boxBorder3"">
                                    <a href=""../EnterPrise/KS.CsEpEnvironment.Aspx?Type=1"" title=""机构系统"">
                                        <div class=""inner"">
                                            <img class=""m-icon"" src=""/admin/images/m-icon3.png"">
                                            <div class=""m-iconname"">机构环境</div><span>{0}</span>
                                        </div>
                                    </a>
                                </li>", num));
                                nowNum++;
                            }
                        }
                        if (nowNum <= showMaxNum && BaseFun.CheckModulePower("school")&& BaseFun.CheckTableExists("KS_EnterPriseAdvert"))
                        {
                            num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From KS_EnterPriseAdvert where  verify=0"));
                            if (num > 0)
                            {
                                sb.AppendLine(string.Format(@"
                                <li class=""m-boxBorder4"">
                                    <a href=""../EnterPrise/KS.CsEpAdvert.Aspx?Type=1"" title=""机构系统"">
                                        <div class=""inner"">
                                            <img class=""m-icon"" src=""/admin/images/m-icon4.png"">
                                            <div class=""m-iconname"">机构轮播图广告</div><span>{0}</span>
                                        </div>
                                    </a>
                                </li>", num));
                                nowNum++;
                            }
                        }
                        if (nowNum <= showMaxNum && BaseFun.CheckModulePower("school")&& BaseFun.CheckTableExists("KS_EnterPriseCampus"))
                        {
                            num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From KS_EnterPriseCampus where  status=0"));
                            if (num > 0)
                            {
                                sb.AppendLine(string.Format(@"
                                <li class=""m-boxBorder5"">
                                    <a href=""../EnterPrise/KS.CsEpCampus.Aspx?Type=1"" title=""机构系统"">
                                        <div class=""inner"">
                                            <img class=""m-icon"" src=""/admin/images/m-icon5.png"">
                                            <div class=""m-iconname"">机构的分校</div><span>{0}</span>
                                        </div>
                                    </a>
                                </li>", num));
                                nowNum++;
                            }
                        }
                        if (nowNum <= showMaxNum && BaseFun.CheckModulePower("school")&& BaseFun.CheckTableExists("KS_EnterpriseMessage"))
                        {
                            num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From KS_EnterpriseMessage where  flag=0"));
                            if (num > 0)
                            {
                                sb.AppendLine(string.Format(@"
                                <li class=""m-boxBorder6"">
                                    <a href=""../EnterPrise/KS.CsEpMessage.Aspx?showType=1"" title=""机构系统"">
                                        <div class=""inner"">
                                            <img class=""m-icon"" src=""/admin/images/m-icon6.png"">
                                            <div class=""m-iconname"">机构的留言</div><span>{0}</span>
                                        </div>
                                    </a>
                                </li>", num));
                                nowNum++;
                            }
                        }
                    }
                    if (nowNum <= showMaxNum&& BaseFun.CheckTableExists("KS_Course"))
                    {
                        num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From KS_Course where teachWay=1 and verify=0"));
                        if (num > 0)
                        {
                            sb.AppendLine(string.Format(@"
                                <li class=""m-boxBorder7"">
                                    <a href=""../Course/KS.CosList.aspx?Type=6"" title=""课程系统"">
                                        <div class=""inner"">
                                            <img class=""m-icon"" src=""/admin/images/m-icon7.png"">
                                            <div class=""m-iconname"">点播课程</div><span>{0}</span>
                                        </div>
                                    </a>
                                </li>", num));
                            nowNum++;
                        }
                    }
    
    
                    if (nowNum <= showMaxNum)
                    {
                        num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From KS_Course where teachWay=5 and verify=0"));
                        if (num > 0)
                        {
                            sb.AppendLine(string.Format(@"
                                <li class=""m-boxBorder8"">
                                    <a href=""../Course/KS.CosLiveList.aspx?showType=1"" title=""课程系统"">
                                        <div class=""inner"">
                                            <img class=""m-icon"" src=""/admin/images/m-icon8.png"">
                                            <div class=""m-iconname"">直播课程</div><span>{0}</span>
                                        </div>
                                    </a>
                                </li>", num));
                            nowNum++;
                        }
                    }
                    if (nowNum <= showMaxNum)
                    {
                        num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From KS_CourseFace where teachWay=0 and verify=0"));
                        if (num > 0)
                        {
                            sb.AppendLine(string.Format(@"
                                <li class=""m-boxBorder9"">
                                    <a href=""../Course/KS.CosFaceList.aspx?verify=1"" title=""课程系统"">
                                        <div class=""inner"">
                                            <img class=""m-icon"" src=""/admin/images/m-icon9.png"">
                                            <div class=""m-iconname"">面授课程</div><span>{0}</span>
                                        </div>
                                    </a>
                                </li>", num));
                            nowNum++;
                        }
                    }
                    if (nowNum <= showMaxNum)
                    {
                        num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From KS_Course where teachWay=2 and verify=0"));
                        if (num > 0)
                        {
                            sb.AppendLine(string.Format(@"
                                <li class=""m-boxBorder10"">
                                    <a href=""../Course/KS.CosList.aspx?Type=6&costype=2"" title=""课程系统"">
                                        <div class=""inner"">
                                            <img class=""m-icon"" src=""/admin/images/m-icon10.png"">
                                            <div class=""m-iconname"">组合课程</div><span>{0}</span>
                                        </div>
                                    </a>
                                </li>", num));
                            nowNum++;
                        }
                    }
                    if (nowNum <= showMaxNum)
                    {
                        num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From KS_CourseChat where chattype=100 and status=0"));
                        if (num > 0)
                        {
                            sb.AppendLine(string.Format(@"
                                <li class=""m-boxBorder11"">
                                    <a href=""../Course/KS.CosChat.aspx?Type=1"" title=""课程系统"">
                                        <div class=""inner"">
                                            <img class=""m-icon"" src=""/admin/images/m-icon11.png"">
                                            <div class=""m-iconname"">直播学员讨论</div><span>{0}</span>
                                        </div>
                                    </a>
                                </li>", num));
                            nowNum++;
                        }
                    }
                    if (nowNum <= showMaxNum)
                    {
                        num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From KS_CoursePJ where status=0"));
                        if (num > 0)
                        {
                            sb.AppendLine(string.Format(@"
                                <li class=""m-boxBorder12"">
                                    <a href=""../Course/KS.CosPJ.aspx?type=1&mycourseid=0&CosType=0"" title=""课程系统"">
                                        <div class=""inner"">
                                            <img class=""m-icon"" src=""/admin/images/m-icon12.png"">
                                            <div class=""m-iconname"">课程评价</div><span>{0}</span>
                                        </div>
                                    </a>
                                </li>", num));
                            nowNum++;
                        }
                    }
                    if (nowNum <= showMaxNum)
                    {
                        num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From KS_CosTeacherPJ where status=0"));
                        if (num > 0)
                        {
                            sb.AppendLine(string.Format(@"
                                <li class=""m-boxBorder13"">
                                    <a href=""../Course/KS.TcAchieve.Aspx?Type=1&teacherid=0"" title=""课程系统"">
                                        <div class=""inner"">
                                            <img class=""m-icon"" src=""/admin/images/m-icon13.png"">
                                            <div class=""m-iconname"">名师评价</div><span>{0}</span>
                                        </div>
                                    </a>
                                </li>", num));
                            nowNum++;
                        }
                    }
                    if (nowNum <= showMaxNum)
                    {
                        num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From KS_CourseChat where ChatType=1"));
                        if (num > 0)
                        {
                            sb.AppendLine(string.Format(@"
                                <li class=""m-boxBorder14"">
                                    <a href=""../Course/KS.CosChat.aspx?chattype=1"" title=""课程系统"">
                                        <div class=""inner"">
                                            <img class=""m-icon"" src=""/admin/images/m-icon14.png"">
                                            <div class=""m-iconname"">名师留言</div><span>{0}</span>
                                        </div>
                                    </a>
                                </li>", num));
                            nowNum++;
                        }
                    }
                }
    
                if (BaseFun.CheckModulePower("mall")) //商城
                {
                    if (nowNum <= showMaxNum)
                    {
                        num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From KS_ProOrder where MoneyReceipt>0 and DeliverStatus=0 and status=1"));
                        if (num > 0)
                        {
                            sb.AppendLine(string.Format(@"
                            <li class=""m-boxBorder15"">
                                <a href=""../shop/KS.ShopOrder.aspx?ShowType=2"" title=""商城系统"">
                                    <div class=""inner"">
                                        <img class=""m-icon"" src=""/admin/images/m-icon15.png"">
                                        <div class=""m-iconname"">发货</div><span>{0}</span>
                                    </div>
                                </a>
                            </li>", num));
                            nowNum++;
                        }
                    }
                    if (nowNum <= showMaxNum)
                    {
                        num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From KS_ProOrder where MoneyReceipt>0 and status=1 and IsInvoice=1 and Invoiced=0"));
                        if (num > 0)
                        {
                            sb.AppendLine(string.Format(@"
                            <li class=""m-boxBorder16"">
                                <a href=""../shop/KS.ShopOrder.aspx?ShowType=3"" title=""商城系统"">
                                    <div class=""inner"">
                                        <img class=""m-icon"" src=""/admin/images/m-icon16.png"">
                                        <div class=""m-iconname"">开发票</div><span>{0}</span>
                                    </div>
                                </a>
                            </li>", num));
                            nowNum++;
                        }
                    }
                    if (nowNum <= showMaxNum)
                    {
                        num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From KS_ProComment where status=0"));
                        if (num > 0)
                        {
                            sb.AppendLine(string.Format(@"
                            <li class=""m-boxBorder17"">
                                <a href=""../shop/KS.ShopComment.aspx?logType=2"" title=""商城系统"">
                                    <div class=""inner"">
                                        <img class=""m-icon"" src=""/admin/images/m-icon17.png"">
                                        <div class=""m-iconname"">评价</div><span>{0}</span>
                                    </div>
                                </a>
                            </li>", num));
                            nowNum++;
                        }
                    }
                    if (nowNum <= showMaxNum)
                    {
                        num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From KS_ProAsk where status=0"));
                        if (num > 0)
                        {
                            sb.AppendLine(string.Format(@"
                            <li class=""m-boxBorder18"">
                                <a href=""../shop/KS.ShopAsk.aspx?logType=2"" title=""商城系统"">
                                    <div class=""inner"">
                                        <img class=""m-icon"" src=""/admin/images/m-icon18.png"">
                                        <div class=""m-iconname"">咨询</div><span>{0}</span>
                                    </div>
                                </a>
                            </li>", num));
                            nowNum++;
                        }
                    }
    
                }
    
                //内容模型
                using (DataTable dt = MyCache.GetCacheModelTable())
                {
                    if (dt.Rows.Count > 0)
                    {
                        foreach (DataRow dr in dt.Rows)
                        {
                            if (dr["modelstatus"].ToString() == "1")
                            {
                                if (dr["basictype"].ToString() != "4" || (dr["basictype"].ToString() == "4" && (BaseFun.CheckModulePower("mall"))))
                                {
                                    if (nowNum <= showMaxNum)
                                    {
                                        num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From " + dr["ModelTable"].ToString() + " where deltf=0 and verify=0"));
                                        if (num > 0)
                                        {
                                            sb.AppendLine(string.Format(@"<li class=""m-boxBorder19"">
                                                    <a href=""{2}"" title=""{0}"">
                                                        <div class=""inner"">
                                                            <div class=""m-icon icon-doc{4}"" style=""display:none""></div>
															<img class=""m-icon"" src=""/admin/images/m-icon19.png"">
                                                            <div class=""m-iconname"">{1}</div><span>{3}</span>
                                                        </div>
                                                    </a>
                                                </li>", dr["modelname"].ToString(), dr["modelitem"].ToString(), (dr["basictype"].ToString() == "4" ? "../Shop/KS.ShopManage.aspx" : "../Content/KS.ContentManage.aspx") + "?showType=1&channelid=" + dr["channelid"].ToString(), num.ToString(), dr["basicType"].ToString()));
                                            nowNum++;
                                        }
                                    }
                                }
    
                            }
                        }
                    }
                }
                if (nowNum <= showMaxNum)
                {
                    //评论
                    num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From KS_Comment where verify=0"));
                    if (num > 0)
                    {
                        sb.AppendLine(string.Format(@"
                        <li class=""m-boxBorder20"">
                            <a href=""../Content/KS.Comment.Aspx?showType=1"" title=""评论系统"">
                                <div class=""inner"">
                                    <img class=""m-icon"" src=""/admin/images/m-icon20.png"">
                                    <div class=""m-iconname"">评论</div><span>{0}</span>
                                </div>
                            </a>
                        </li>", num));
                        nowNum++;
                    }
                }
                if (nowNum <= showMaxNum)
                {
                    if (BaseFun.CheckModulePower("exam")) //考试
                    {
                        if (BaseFun.CheckTableExists("KS_SJReviews"))
                        {
                            num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From KS_SJReviews where status=0"));
                            if (num > 0)
                            {
                                sb.AppendLine(string.Format(@"
                            <li class=""m-boxBorder21"">
                                <a href=""../exam/KS.SJReviews.Aspx?showType=1"" title=""考试系统"">
                                    <div class=""inner"">
                                        <img class=""m-icon"" src=""/admin/images/m-icon21.png"">
                                        <div class=""m-iconname"">考后心得</div><span>{0}</span>
                                    </div>
                                </a>
                            </li>", num));
                                nowNum++;
                            }
                        }
                    }
                }
                if (nowNum <= showMaxNum&& CommonJsonCache.CheckYunAPPHasAllow("plus.ask") && BaseFun.CheckTableExists("KS_AskTopic"))
                {
                    //问答
                    num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From KS_AskTopic where verify=0"));
                    if (num > 0)
                    {
                        sb.AppendLine(string.Format(@"
                            <li class=""m-boxBorder22"">
                                <a href=""../../Plus/Plus.Ask/KS.AskTopic.Aspx?showType=1"" title=""问答系统"">
                                    <div class=""inner"">
                                        <img class=""m-icon"" src=""/admin/images/m-icon22.png"">
                                        <div class=""m-iconname"">问答问题</div><span>{0}</span>
                                    </div>
                                </a>
                            </li>", num));
                        nowNum++;
                    }
                }
                if (nowNum <= showMaxNum && CommonJsonCache.CheckYunAPPHasAllow("plus.group") && BaseFun.CheckTableExists("KS_BBSTopic"))
                {
                    //微社区
                    num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From KS_BBSTopic where verify=0"));
                    if (num > 0)
                    {
                        sb.AppendLine(string.Format(@"
                            <li class=""m-boxBorder23"">
                                <a href=""../../Plus/Plus.Group/KS.bbstopic.aspx?showType=1"" title=""微社区系统"">
                                    <div class=""inner"">
                                        <img class=""m-icon"" src=""/admin/images/m-icon23.png"">
                                        <div class=""m-iconname"">微社区话题</div><span>{0}</span>
                                    </div>
                                </a>
                            </li>", num));
                        nowNum++;
                    }
                }
                if (nowNum <= showMaxNum && CommonJsonCache.CheckYunAPPHasAllow("plus.space") && BaseFun.CheckTableExists("KS_Blog"))
                {
                    //空间门户
                    num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From KS_Blog where status=0"));
                    if (num > 0)
                    {
                        sb.AppendLine(string.Format(@"
                            <li class=""m-boxBorder24"">
                                <a href=""../../Plus/Plus.Space/KS.Blog.Aspx?showType=1"" title=""空间门户系统"">
                                    <div class=""inner"">
                                        <img class=""m-icon"" src=""/admin/images/m-icon24.png"">
                                        <div class=""m-iconname"">空间</div><span>{0}</span>
                                    </div>
                                </a>
                            </li>", num));
                        nowNum++;
                    }
                }
                if (nowNum <= showMaxNum && CommonJsonCache.CheckYunAPPHasAllow("plus.link") && BaseFun.CheckTableExists("KS_Link"))
                {
                    //友情链接
                    num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From KS_Link where verify=0"));
                    if (num > 0)
                    {
                        sb.AppendLine(string.Format(@"
                            <li class=""m-boxBorder25"">
                                <a href=""../../Plus/Plus.Link/KS.Link.aspx?showType=1"" title=""友情链接系统"">
                                    <div class=""inner"">
                                        <img class=""m-icon"" src=""/admin/images/m-icon25.png"">
                                        <div class=""m-iconname"">友情链接</div><span>{0}</span>
                                    </div>
                                </a>
                            </li>", num));
                        nowNum++;
                    }
                }
                if (nowNum <= showMaxNum)
                {
                    num = Utils.StrToInt(DataFactoryUser.GetOnlyValue("select count(1) From KS_User where locked=2"));
                    if (num > 0)
                    {
                        sb.AppendLine(string.Format(@"
                            <li class=""m-boxBorder26"">
                                <a href=""../user/KS.User.aspx?UserType=3"" title=""会员系统"">
                                    <div class=""inner"">
                                        <img class=""m-icon"" src=""/admin/images/m-icon26.png"">
                                        <div class=""m-iconname"">认证会员</div><span>{0}</span>
                                    </div>
                                </a>
                            </li>", num));
                        nowNum++;
                    }
                }
                if (sb.Length>0)
                {
                    Response.Write(sb.ToString());
                }else
                {
                    Response.Write(@"<li class=""empty"">没有待审核事项！</li>");
                }
                 %>
             
         </ul>
     </div>
  </div>
  <!--待办事项结束-->
  <!--数据统计开始-->
  <div class="m-padding m-schoolData">
     <div class="m-conBox">
     	<div class="m-title">数据统计</div>
        <ul class="clearfix">
            <%
                int nn =1;
                sb.Length = 0;
                if (BaseFun.CheckModulePower("edu"))
                {
                    sb.AppendFormat(@"
        	<li>
            	<a href=""../Course/KS.CosList.aspx"" title=""点播课程总数"">
                	<div class=""dataTit"">点播课程总数</div>
                    <div class=""dataNum no{1}"">{0}</div>
                    <em class=""hoverArrow""></em>
                </a>
            </li>", DataFactory.GetOnlyValue("select count(1) from KS_Course Where verify=1 AND TeachWay IN(1,2)"), nn);
                    nn++;
                    sb.AppendFormat(@"
            <li>
                <a href=""../Course/KS.CosLiveList.aspx"" title=""直播课程总数"">
                    <div class=""dataTit"">直播课程总数</div>
                    <div class=""dataNum no{1}"">{0}</div>
                    <em class=""hoverArrow""></em>
                </a>
            </li>", DataFactory.GetOnlyValue("select count(1) from KS_Course Where verify=1 AND TeachWay=5"), nn);
                    nn++;
                    if (BaseFun.CheckModulePower("school")&& BaseFun.CheckTableExists("KS_EnterPrise"))
                    {
                        sb.AppendFormat(@"
            <li>
            	<a href=""../EnterPrise/KS.CsEnterPriseZS.aspx"" title=""机构总数"">
                    <div class=""dataTit"">机构总数</div>
                    <div class=""dataNum no{1}"">{0}</div>
                    <em class=""hoverArrow""></em>
                </a>
            </li>", DataFactory.GetOnlyValue("select count(1) from KS_EnterPrise Where status=1"), nn);
                        nn++;
                    }
                    sb.AppendFormat(@"
            <li>
            	<a href=""../Course/KS.CsTeacher.aspx"" title=""教师总数"">
                    <div class=""dataTit"">教师总数</div>
                    <div class=""dataNum no{1}"">{0}</div>
                    <em class=""hoverArrow""></em>
                </a>
            </li>", DataFactory.GetOnlyValue("select count(1) from KS_CosTeacher Where verify=1"), nn);
                    nn++;
                    sb.AppendFormat(@"
            <li>
                <a href=""../User/KS.User.aspx"" title=""学生总数"">
                    <div class=""dataTit"">学生总数</div>
                    <div class=""dataNum no{1}"">{0}</div>
                    <em class=""hoverArrow""></em>
                </a>
            </li>", DataFactory.GetOnlyValue("select count(1) from KS_User Where GroupID=2"), nn);
                    nn++;
                }
                else
                {
                    sb.AppendFormat(@"
            <li>
                <a href=""../User/KS.User.aspx"" title=""会员总数"">
                    <div class=""dataTit"">会员总数</div>
                    <div class=""dataNum no{1}"">{0}</div>
                    <em class=""hoverArrow""></em>
                </a>
            </li>", DataFactory.GetOnlyValue("select count(1) from KS_User"), nn);
                    nn++;
                }
                if (BaseFun.CheckModulePower("edu"))
                {
                    sb.AppendFormat(@"
            <li>
                <a href=""../Course/KS.CsOrderList.aspx"" title=""课程有效订单总数"">
                    <div class=""dataTit"">课程订单总数</div>
                    <div class=""dataNum no{1}"">{0}</div>
                    <em class=""hoverArrow""></em>
                </a>
            </li>", DataFactory.GetOnlyValue("SELECT COUNT(id) FROM KS_CosOrder WHERE  status=2 OR status=1"), nn);
                    nn++;
                    sb.AppendFormat(@"
           <li>
                <a href=""../Course/KS.CsOrderList.aspx"" title=""课程订单总额（元）"">
                    <div class=""dataTit"">课程订单总额（元）</div>
                    <div class=""dataNum no{1}"">{0}</div>
                    <em class=""hoverArrow""></em>
                </a>
            </li>", Kesion.APPCode.Public.ReturnShopPrice(DataFactory.GetOnlyValue("select SUM(OrderTotalPrice) from KS_CosOrder Where status=2 OR status=1")), nn);
                    nn++;
                }
                if (BaseFun.CheckModulePower("mall"))
                {
                    sb.AppendFormat(@"
                    <li>
                     <a href=""../Shop/KS.ShopOrder.aspx"" title=""商城订单总数"">
                    <div class=""dataTit"">商城订单总数</div>
                    <div class=""dataNum no{1}"">{0}</div>
                    <em class=""hoverArrow""></em>
                </a>
            </li>", DataFactory.GetOnlyValue("select count(1) from KS_ProOrder Where status>0"), nn);
                    nn++;
                    sb.AppendFormat(@" <li>
                <a href=""../Shop/KS.ShopOrder.aspx"" title=""商城订单总额（元）"">
                    <div class=""dataTit"">商城订单总额（元）</div>
                    <div class=""dataNum no{1}"">{0}</div>
                    <em class=""hoverArrow""></em>
                </a>
            </li>", Kesion.APPCode.Public.ReturnShopPrice(DataFactory.GetOnlyValue("select SUM(OrderTotalPrice) from KS_ProOrder Where status>0")), nn);
                    nn++;
                }
                if (BaseFun.CheckModulePower("exam"))
                {
                    sb.AppendFormat(@" <li>
            	<a href=""../Exam/KS.SJ.aspx"" title=""试卷总数"">
                	<div class=""dataTit"">试卷总数</div>
                    <div class=""dataNum no{1}"">{0}</div>
                    <em class=""hoverArrow""></em>
                </a>
            </li>", DataFactory.GetOnlyValue("SELECT COUNT(id) FROM KS_SJ Where verify=1"), nn);
                }
                if (nn<10)  //低于10条才显示
                {
                    using (DataTable dt = MyCache.GetCacheModelTable())
                    {
                        if (dt.Rows.Count > 0)
                        {
                            foreach (DataRow dr in dt.Rows)
                            {
                                if (dr["modelstatus"].ToString() == "1" && nn <= 18)
                                {
                                    if (dr["basictype"].ToString() != "4" || (dr["basictype"].ToString() == "4" && (BaseFun.CheckModulePower("mall"))))
                                    {
                                        num = Utils.StrToInt(DataFactory.GetOnlyValue("select count(1) From " + dr["ModelTable"].ToString() + " where verify=1 and deltf=0"));
                                        if (num > 0)
                                        {
                                            string url = "../Content/KS.ContentManage.aspx";
                                            if (dr["basictype"].ToString() == "4") url = "../Shop/KS.ShopManage.aspx";
                                            sb.AppendLine(string.Format(@"<li><a href=""{4}?channelid={5}"" title=""{0}({1})"">
			                               <div class=""dataTit"">{0}({1})</div>
			                               <div class=""dataNum no{2}"">{3}</div>
			                                <em class=""hoverArrow""></em></a>
		                               </li>", dr["modelName"].ToString(), dr["ModelItemUnit"].ToString(), nn%10+1, num.ToString(), url, dr["channelid"].ToString()));
                                            nn++;
                                            if (nn > 10) break;
                                        }
                                    }

                                }
                            }
                        }
                    }
                }
                Response.Write(sb.ToString());

      %>
        </ul>
     </div>
  </div>
  <!--网校数据结束-->

  <!--业务量开始-->
  <div class="m-padding m-business">
     <div class="m-conBox">
         
         <div class="m-BusBox">
            <div class="m-title fl">最新业务量</div>
            <div class="m-TabTitle fr">
                <%
                    string str = GetBusinessByDate(0);
                    if (!string.IsNullOrEmpty(str))
                    {
                        Response.Write(@"<span  data-chart=""" + str + @""">今日</span>");
                    }
                    str = GetBusinessByDate(1);
                    if (!string.IsNullOrEmpty(str))
                    {
                        Response.Write(@"<span data-chart=""" + str + @""">本周</span>");
                    }
                    str = GetBusinessByDate(2);
                    if (!string.IsNullOrEmpty(str))
                    {
                        Response.Write(@"<span data-chart=""" + str + @""">本月</span>");
                    }
                    str = GetBusinessByDate(3);
                    if (!string.IsNullOrEmpty(str))
                    {
                        Response.Write(@"<span data-chart=""" + str + @""">本年度</span>");
                    }
                 %>
            </div>
            <div class="m-TabCon">
              <div class="m-TabBox" style="display:block;" id="container"></div>
            </div>
         </div>
     </div>
  </div>
  <!--业务量结束-->
  <%if (BaseFun.CheckModulePower("edu") || BaseFun.CheckModulePower("mall")) { %>

  <!--订单数据分析开始-->
  <div class="m-padding m-orderAnalysis">
      <div class="m-conBox">
      	<div class="m-title">订单数据分析</div>
        <ul class="clearfix">
        	<%=GetOrderByDate(3) %>
        </ul>
      </div>
  </div>
  <!--订单数据分析结束-->
<%} %>
  

  
</div>
<!--左边模块结束-->

<!--右边模块开始-->
<div class="m-rightBox">
    <div class="m-rightInner">
       <!--日历模块开始-->
       <div class="m-calendar">
          
			<style>
                .gzjh_box{position:relative; margin-bottom:10px;}
                .gzjh_btn{height:36px;background: #fff;color:#35a7ba;outline:0;cursor:pointer;border:#35a7ba solid 1px;font-size:16px;border-radius:3px;}
                .gzjh_box label{background:url(../images/all_icon.png) no-repeat -403px -505px;display:inline-block;height:27px; width:27px;position:absolute;top:9px;left:29px;}
                .m-calendar{ padding-bottom:10px;}
                .today {background:none !important; font-size:16px; border:0 !important;}
                .today a{ color:#35a7ba !important;}
                .otherday {border:0 !important;}
                .otherday a{color: #6A6F73;}
                .titleday {border:0 !important;}
                .week{height:30px; font-weight:normal !important; padding:0 2px; background:none !important;}
                .titlestyle{border:0}
                .titlestyle td{border:1px solid #f1f1f1;text-align:center;}
                .hasplanfinish {background-color:#24d9ca;border:1px solid #f1f1f1; font-weight:normal !important;}
                .hasplannofinish {background:#f3f7ff !important;border:0 !important; font-weight:normal !important;}
                .hasplannofinish a{ color:#999 !important;}
                .CalendarStatus {height:60px; border-top:none;}
                .CalendarStatus ul{padding: 0 0 0 20px;}
                .CalendarStatus li {float:left;margin:5px;text-align:center;color:#777;}
                .CalendarStatus li i{display:block;width:35px; height:20px;}
                .CalendarStatus span{display:block;}
                .titlestyle{ font-weight:normal !important;}
            </style>
            <asp:Calendar CssClass="CTable" ID="Calendar1" ToolTip="工作计划日历"
                DayHeaderStyle-HorizontalAlign="Center"
                Width="400px"
                TitleStyle-Font-Size="13px" TitleStyle-CssClass="titlestyle"
                TodayDayStyle-CssClass="today" DayStyle-CssClass="otherday" DayHeaderStyle-CssClass="otherday"
                DayStyle-Font-Size="13px"
                DayHeaderStyle-Font-Size="12px" 
                OtherMonthDayStyle-ForeColor="#cccccc" OnDayRender="Calendar1_DayRender" runat="server"  OnSelectionChanged="Calendar1_SelectionChanged" BackColor="White" BorderColor="White" Font-Names="" Font-Size="10pt" ForeColor="Black" Height="220px" NextPrevFormat="FullMonth" DayNameFormat="Shortest" TitleFormat="Month">
                <DayHeaderStyle HorizontalAlign="Center" CssClass="otherday week" Font-Size="12pt" BackColor="#f1f1f1" Font-Bold="True" ForeColor="#6a6f73" Height="20pt"></DayHeaderStyle>
                <DayStyle CssClass="otherday" Font-Size="11pt"></DayStyle>
                <NextPrevStyle BorderColor="#0066CC" BorderStyle="Dotted" ForeColor="#999999" Font-Size="8pt" />
                <OtherMonthDayStyle ForeColor="#bdbfc1" />
                <SelectedDayStyle BackColor="#CC3333" ForeColor="White" />
                <SelectorStyle BackColor="#CCCCCC" Font-Bold="True" Font-Names="Verdana" Font-Size="8pt" ForeColor="#333333" Width="1%" />
                <TitleStyle CssClass="titlestyle" Font-Size="13pt" BackColor="White" ForeColor="White" Font-Bold="True" Height="14pt"></TitleStyle>
                <TodayDayStyle CssClass="today" BackColor="#CCCC99"></TodayDayStyle>
            </asp:Calendar>
                 
    
       </div>
       <!--日历模块结束-->
       
       <!--计划开始-->
       <div class="m-plan">
          <div class="m-pTabTitle clearfix">   
             <span><b>已完成计划</b><%=DataFactory.GetOnlyValue("select count(1) From KS_AdminPlan where status=1 and username='" + KSCMS.GetCookie("Admin", "AdminUser") + "'") %></span>
             <span class="m-nofinish curr"><b>未完成计划</b><%=DataFactory.GetOnlyValue("select count(1) From KS_AdminPlan where status=0 and username='" + KSCMS.GetCookie("Admin", "AdminUser") + "'") %></span>
          </div>
          <div class="m-pTabCon">
             <div class="m-pTabBox" style="display:block;">
                <ul>
                    <%
                        using(DataTable dt=DataFactory.GetDataTable("select top 5 * From KS_AdminPlan where status=1 and username='" + KSCMS.GetCookie("Admin", "AdminUser") + "' order by adddate desc,id desc"))
                        {
                            if (dt.Rows.Count > 0)
                            {
                                foreach(DataRow dr in dt.Rows)
                                {
                                    %>
                                   <li class="grayPlan clearfix<%=Utils.StrToDateTime(dr["adddate"].ToString()).Day==DateTime.Now.Day?" curr":"" %>"><em class="m-suline"></em><a href="javascript:;" onClick="top.showPlan('<%=Utils.StrToDateTime(dr["adddate"].ToString()).ToShortDateString() %>');"><span class="m-pTime fr"><%=Utils.StrToDateTime(dr["adddate"].ToString()).ToShortDateString() %></span><span class="m-pUser" title="计划内容：<%=dr["content"].ToString() %>"><%=dr["content"].ToString() %></span></a></li>
    
                                   <%
                                               }
                                           }else
                                           {
                                               Response.Write("<li class='nofinish'>没有未完成计划！</li>");
                                           }
                                       }
                     %>
                </ul>
                <div class="m-pMore"><a href="../User/KS.AdminPlan.aspx?showType=5" title="查看更多">查看更多>></a></div>
             </div>
             <div class="m-pTabBox">
                <ul>
                  <%
                        using(DataTable dt=DataFactory.GetDataTable("select top 5 * From KS_AdminPlan where status=0 and username='" + KSCMS.GetCookie("Admin", "AdminUser") + "' order by adddate desc, id desc"))
                        {
                            if (dt.Rows.Count > 0)
                            {
                                foreach(DataRow dr in dt.Rows)
                                {
                                    %>
                                   <li class="greenPlan clearfix<%=Utils.StrToDateTime(dr["adddate"].ToString()).Day==DateTime.Now.Day?" curr":"" %>"><em class="m-suline"></em><a href="javascript:;" onClick="top.showPlan('<%=Utils.StrToDateTime(dr["adddate"].ToString()).ToShortDateString() %>');"><span class="m-pTime fr"><%=Utils.StrToDateTime(dr["adddate"].ToString()).ToShortDateString() %></span><span class="m-pUser" title="计划内容：<%=dr["content"].ToString() %>"><%=dr["content"].ToString() %></span></a></li>
    
                                   <%
                                }
                            }else
						   {
							   Response.Write("<li class='nofinish'>没有已完成计划！</li>");
						   }
                        }
                     %>
                </ul>
                <div class="m-pMore"><a href="../User/KS.AdminPlan.aspx?showType=4" title="查看更多">查看更多>></a></div>
             </div>
          </div>
       </div>
       <!--计划结束-->
       
       <div class="gzjh_box">
          <input type="button" style="text-align:center;width:100%" onClick="addPlan('<%=DateTime.Now.ToShortDateString()%>')" value="写工作计划" class="gzjh_btn" />
       </div>
         
       <!--计划模块开始-->
       <div class="m-planBox">
          <ul>
            <li class="m-pBox clearfix">
               <a href="../User/KS.AdminPlan.aspx?showType=1" title="查看"><span>查看本日计划>></span></a>
            </li>
            <li class="m-pBox clearfix">
               <a href="../User/KS.AdminPlan.aspx?showType=2" title="查看"><span>查看本周计划>></span></a>
            </li>
            <li class="m-pBox clearfix">
               <a href="../User/KS.AdminPlan.aspx?showType=3" title="查看"><span>查看本月计划>></span></a>
            </li>
          </ul>
       </div>
       <!--计划模块结束-->
       
    </div>
</div>
<!--右边模块结束-->
<script src="/admin/images/highcharts.js"></script>
<script src="/ks_inc/jquery.nicescroll.js"></script>
<script src="/admin/images/percircle.js"></script>
<script>
//左边的宽度
$(function(){
    $(".m-BusBox span").eq(0).addClass("curr");
	$(".m-leftBox").height($(window).height())
	//右边的滚动条
	$(".m-rightBox").niceScroll({  
		cursorcolor:"#d0d7d9",  
		cursoropacitymax:1,  
		touchbehavior:false,  
		cursorwidth:"6px",  
		cursorborder:"0",  
		cursorborderradius:"5px"  
	}); 
		
	//左边的滚动条
	$(".m-leftBox").niceScroll({  
		cursorcolor:"#d0d7d9",  
		cursoropacitymax:1,  
		touchbehavior:false,  
		cursorwidth:"6px",  
		cursorborder:"0",  
		cursorborderradius:"5px"  
	}); 	
   $(window).resize(function() {$(".m-leftBox").height($(window).height())});
   
   //待办事项为空时的宽度样式
   var w = $(".m-matter ul").width()-20;
   $(".m-matter li.empty").width(w);
	
});




//柱形数据表
$(function () {
	
	var currArray = new Array();
	var currData = new Array();
	var dataSplit = $(".m-TabTitle .curr").attr('data-chart').split('|');
	var dataLength = dataSplit.length;
	for(var i=0;i<dataLength;i++){
		var name = dataSplit[i].split(',')[0];
		var data = Number(dataSplit[i].split(',')[1]);
		currArray[i] = name;
		currData[i] = data;
	};
	
    var chart = Highcharts.chart('container', {
        title: {
            text: ''
        },
        subtitle: {
            text: ''
        },
        xAxis: {
            categories: currArray
        },
		tooltip: {
			headerFormat: '',
			pointFormat: '<span>共有{point.y}条'
		},
        series: [{
            type: 'column',
            colorByPoint: true,
            data: currData,
            showInLegend: false,
        }]
    });
		
	
	var oldIndex = $(".m-TabTitle .curr").index();//检测是否重复点击
   $(".m-TabTitle span").click(function(){
	    var index = $(this).index();
		if(index!=oldIndex){
			oldIndex = index;
			var currArray = new Array();
			var currData = new Array();
			var dataSplit = $(this).attr('data-chart').split('|');
			var dataLength = dataSplit.length;
			for(var i=0;i<dataLength;i++){
				var name = dataSplit[i].split(',')[0];
				var data = Number(dataSplit[i].split(',')[1]);
				currArray[i] = name;
				currData[i] = data;
			};
			
			chart = Highcharts.chart('container', {
				title: {
					text: ''
				},
				subtitle: {
					text: ''
				},
				xAxis: {
					categories: currArray
				},
				tooltip: {
					headerFormat: '',
					pointFormat: '<span>共有{point.y}条'
				},
				series: [{
					type: 'column',
					colorByPoint: true,
					data: currData,
					showInLegend: false
				}]
			});
		};
		$(this).addClass('curr').siblings().removeClass('curr');
   });
   
   
   //工作计划切换
   $(".m-pTabTitle span").click(function(){
	  // $(this).addClass('curr').siblings().removeClass('curr');
	   $('.m-pTabCon>.m-pTabBox:eq('+$(this).index()+')').show().siblings().hide();	
   })	
	
   
	
});

$("[id$='circle']").percircle();



</script>
<!--新的首页结束-->

  
 <div class="copyright" style="display:none;margin:0 auto; padding:20px 0;width:80%;"/>
              <%=KSCMS.CopyRight() %>
        </div>
  </form>
</body>
</html>
