<!--#include file="../../Inc/Cls_Main.Asp"-->
<!--#include file="../inc/Cls_Admin.Asp"-->
<!--#include file="../inc/Cls_MapPath.Asp"-->
<!--#include file="../Admin_Check.Asp"-->
<%
Dim CmsAdmin, ToUrl
ToUrl = CmsFun.LoadToUrl()
'=============================================================================
Set CmsAdmin = New Cls_Admin
CmsAdmin.SetAdminTitle = CmsSiteName
CmsAdmin.SetBodyCssName = "mainbody"
CmsAdmin.SetAdminPath = CmsAdminMapPath
CmsAdmin.LoadHead()
'=============================================================================
Dim Action
'=============================================================================
Action = Easp.Get("action")
Select Case Action
    Case "pageload"
        Call PageLoad()
    Case "px"
        Call Px()
    Case "delall"
        Call DelAll()
    Case Else
        Call PageLoad()
End Select
CmsAdmin.LoadFooter()
Set CmsAdmin = Nothing

Sub PageLoad()
    ChkSysAdminLevel "sys_channel", "show"
%>
<div class="navigation"> 控制面板 &gt; 生成静态</div>
<div id="contentTab">
  <div class="content-tab">
    <ul class="tab_nav">
      <li><a onclick="tabs(this);" class="selected" href="javascript:void(0);">生成静态</a></li>
    </ul>
  </div>
  <div class="tab_con" style="display: block;">
    <table class="form_table">
      <col width="200px">
        </col>
      
      <tbody>
      <form action="Admin.Pc.Html.Asp" method="get" id="fm1" target="_blankframe">
        <input type="hidden" name="action" value="all" />
        <tr>
          <th>生成全站：</th>
          <td><input type="button" class="btnSearch" value="电脑端" onclick="ExeConfirmSub('fm1','Admin.Pc.Html.Asp','生成全站很耗资源,您确定要生成吗？');" />
            <input type="button" class="btnSearch" value="移动端" onclick="ExeConfirmSub('fm1','Admin.Mt.Html.Asp','生成全站很耗资源,您确定要生成吗？');" /></td>
        </tr>
      </form>
      <tr>
        <th></th>
        <td><iframe style="display:;width:100%;height:150px;" frameborder="0" src="blank.html" name="_blankframe" id="createiframe" allowTransparency="true"></iframe></td>
      </tr>
      <form action="Admin.Pc.Html.Asp" method="get" id="fmindex" target="_blankframe">
        <input type="hidden" name="action" value="index" />
        <tr>
          <th>生成首页：</th>
          <td><input type="button" class="btnSearch" onclick="OkSubmit('fmindex');" value="开始生成" /></td>
        </tr>
      </form>
      <form action="Admin.Pc.Channel.Asp" method="get" id="fmPcChannel">
        <tr>
          <th>生成频道[电脑端]：</th>
          <td><%=GetChannelList("fmPcChannel")%></td>
        </tr>
      </form>
      <form action="Admin.Mt.Channel.Asp" method="get" id="fmMtChannel">
        <tr>
          <th>生成频道[移动端]：</th>
          <td><%=GetChannelList("fmMtChannel")%></td>
        </tr>
      </form>
      <form action="Admin.Pc.Html.Asp" method="get" id="fmmap" target="_blankframe">
        <input type="hidden" name="action" value="map" />
        <tr>
          <th>生成地图：</th>
          <td><input type="button" class="btnSearch" onclick="OkSubmit('fmmap');" value="开始生成" /></td>
        </tr>
      </form>
      <form action="Admin.Pc.Html.Asp" method="get" id="fmtopic" target="_blankframe">
        <input type="hidden" name="action" value="topic" />
        <tr>
          <th>生成专题：</th>
          <td><input type="button" class="btnSearch" onclick="OkSubmit('fmtopic');" value="开始生成" /></td>
        </tr>
      </form>
      <form action="Admin.Pc.Html.Asp" method="get" id="fmtpl" target="_blankframe">
        <input type="hidden" name="action" value="freetpl" />
        <tr>
          <th>生成自定义模版页：</th>
          <td><input type="button" class="btnSearch" onclick="OkSubmit('fmtpl');" value="开始生成" /></td>
        </tr>
      </form>
        </tbody>
      
    </table>
  </div>
</div>
<%
End Sub

Function GetChannelList(ByVal FormChannel)
    Dim strTemp, oRs, arrList, i
    strTemp = "<select name=""ChannelId"" id=""ChannelId"" class=""select2"" onChange=""OkSubmit('"& FormChannel &"');"">" & vbCrLf
    strTemp = strTemp & "<option value=""0"">选择频道</option>" & vbCrLf
    Set oRs = Easp.db.GR(TablePrefix & "Channel:Id,ChannelName", "", " Px Asc,Id Desc ")
    If Not Easp.IsN(oRs) Then
        arrList = oRs.GetRows()
    End If
    Easp.C oRs
    If IsArray(arrList) Then
        For i = 0 To UBound(arrList, 2)
            strTemp = strTemp & "<option value="""& arrList(0, i) &""">"& arrList(1, i) &"</option>" & vbCrLf
        Next
    End If
    strTemp = strTemp & "</select>" & vbCrLf
    GetChannelList = strTemp
End Function
%>
