<!--#include file="../../Inc/Cls_Main.Asp"-->
<!--#include file="../inc/Cls_Admin.Asp"-->
<!--#include file="../inc/Cls_MapPath.Asp"-->
<!--#include file="../inc/Cls_FreeField.Asp"-->
<!--#include file="../Admin_Check.Asp"-->
<%
Dim CmsAdmin
'=============================================================================
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 "savemain"
        Call SaveMain()
    Case Else
        Call PageLoad()
End Select
CmsAdmin.LoadFooter()
Set CmsAdmin = Nothing

Sub PageLoad()
    Dim oRs, Id
    Id = Easp.Get("id:n:0")
    If Id = 0 Then
        CmsAdmin.JscriptMsg "参数错误！", "back", "Error", "null"
    End If
    Set oRs = Easp.db.GR(TablePrefix & "FreeForm:1", " Id = "& Id &" ", "")
    If Easp.IsN(oRs) Then
        CmsAdmin.JscriptMsg "不存在的数据！", "back", "Error", "null"
    End If
%>
<div class="navigation"><a href="Admin.Form.List.Asp" class="back">自定义表单管理</a> 控制面板 &gt; 自定义表单管理 &gt; Html调用</div>
<div id="contentTab">
  <div class="content-tab">
    <ul class="tab_nav">
      <li><a onclick="tabs(this);" class="selected" href="javascript:void(0);">Html调用代码</a></li>
    </ul>
  </div>
  <div class="tab_con" style="display: block;">
    <table class="form_table">
      <tbody>
        <tr>
          <td><%=CreateCode(oRs)%></td>
        </tr>
      </tbody>
    </table>
  </div>
</div>
<%
Easp.C oRs
End Sub

Function CreateCode(ByVal objRs)
    Dim strHtml, oRs
    strHtml = "<script src="""& SiteWebFilePath &"Scripts/DatePicker/WdatePicker.js""></script>∏"
    strHtml = strHtml & "<form name=""myform"" method=""post"" action=""" & SiteWebFilePath & "Plug/form/?action=form&id="& objRs("Id") &""">∏"
    strHtml = strHtml & objFreeField.LoadFieldInfo(objRs("Id")) & "∏"
    If CmsFun.ChkNumEric(objRs("IsCode")) > 0 Then
        strHtml = strHtml & "验证码：<input name=""code"" type=""text"" id=""code"" size=""10"" maxlength=""4"" autocomplete=""off"" onkeyup=""value=value.replace(/[^\d]/g,'')"" /><img src=""" & SiteWebFilePath & "inc/GetCode.Asp?action=form"" border=""0"" align=""absmiddle"" id=""dcode"& objRs("Id") &""" onclick=""GetCheckCode('form','dcode"& objRs("Id") &"');"" style=""cursor:pointer;"" title=""看不请？点击刷新验证码"" />∏"
    End If
    strHtml = strHtml & "<input type=""submit"" value=""提 交"" /> ∏"
    strHtml = strHtml & "<input type=""reset"" value=""重 置"" />∏"
    strHtml = strHtml & "</form>"
    CreateCode = Replace(Replace(Replace(strHtml, "<", "&lt;"), ">", "&gt;"), "∏", "<br />")
End Function
%>