⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_label.asp

📁 个人网站比较简短
💻 ASP
📖 第 1 页 / 共 5 页
字号:
    Response.Write "          <td width='100' align='center'><strong>标签分类:</strong></td>"
    Response.Write "          <td colspan='3'><input name='LabelClass' type='text' id='LabelClass' size='30' maxlength='50'> " & getlabelclass(AddType) & "</td>"
    Response.Write "        </tr>"
    Response.Write "       </table>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td>"
    Response.Write "       <table border='0' cellpadding='0' cellspacing='0' width='100%' >"
    Response.Write "        <tr>"
    Response.Write "          <td width='100' align='center'><strong>标签类型:</strong></td>"
    Response.Write "          <td><Input type='radio' name='labeltype' value=1"
    If AddType = 1 Then Response.Write " checked"
    Response.Write " onClick=""flist.style.display='none';"">标准动态标签 <Input type='radio' name='labeltype' value=3"
    If AddType = 3 Then Response.Write " checked"
    Response.Write " onClick=""flist.style.display='';"">函数型动态标签</td>"
    Response.Write "        </tr>"
    Response.Write "       </table>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td>"
    Response.Write "       <table border='0' cellpadding='0' cellspacing='0' width='100%' >"
    Response.Write "        <tr>"
    Response.Write "          <td width='100' align='center'><strong>分页数量:</strong></td>"
    Response.Write "          <td width='45'><input name='pagenum' type='text' id='pagenum' size='3' maxlength='10' value=" & lnum & "></td>"
    Response.Write "          <td width='10'></td><td><font color='#FF0000'>* 动态标签分页显示的每页显示数,为0时则不分页。</font></td>"
    Response.Write "        </tr>"
    Response.Write "       </table>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td>"
    Response.Write "       <table border='0' cellpadding='0' cellspacing='0' width='100%' >"
    Response.Write "        <tr>"
    Response.Write "          <td width='100' align='center'><strong>自动刷新:</strong></td>"
    Response.Write "          <td width='45'><input name='rtime' type='text' id='rtime' size='3' maxlength='3' value=0></td>"
    Response.Write "          <td width='10'></td><td><font color='#FF0000'>* 标签内容自动刷新频率,必须大于10秒并启用分页功能才能启动。</font></td>"
    Response.Write "        </tr>"
    Response.Write "       </table>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td>"
    Response.Write "       <table border='0' cellpadding='0' cellspacing='0' width='100%' >"
    Response.Write "        <tr>"
    Response.Write "      <td width='100' align='center'><strong>主表:</strong></td>"
    Response.Write "      <td><select name='dbname1' style='width:250px;' onChange=""changedb()"">"
    Response.Write "<option value=''>请选择一个表</option>"
    Set rstSchema = Conn.OpenSchema(20)
    Do Until rstSchema.EOF
    If Left(rstSchema("TABLE_NAME"), 2) <> "MS" And rstSchema("TABLE_NAME") <> "" And rstSchema("TABLE_NAME") <> "PE_Admin" And rstSchema("TABLE_NAME") <> "PE_Config" Then
        Response.Write "<option value='" & rstSchema("TABLE_NAME") & "'"
        If dbname1 = rstSchema("TABLE_NAME") Then
        Response.Write " selected"
        End If
        Response.Write ">" & rstSchema("TABLE_NAME") & "</option>"
    End If
    rstSchema.MoveNext
    Loop
    Response.Write "</select></td>"
    Response.Write "      <td width='100' align='center'><strong>从表:</strong></td>"
    Response.Write "      <td><select name='dbname2' style='width:250px;' onChange=""changedb()"">"
    Response.Write "<option value=''>请选择一个表</option>"
    Set rstSchema = Conn.OpenSchema(20)
    Do Until rstSchema.EOF
    If Left(rstSchema("TABLE_NAME"), 2) <> "MS" And rstSchema("TABLE_NAME") <> "" And rstSchema("TABLE_NAME") <> "PE_Admin" And rstSchema("TABLE_NAME") <> "PE_Config" Then
        Response.Write "<option value='" & rstSchema("TABLE_NAME") & "'"
        If dbname2 = rstSchema("TABLE_NAME") Then
        Response.Write " selected"
        End If
        Response.Write ">" & rstSchema("TABLE_NAME") & "</option>"
    End If
    rstSchema.MoveNext
    Loop
    Response.Write "</select></td></tr>"
    If dbname1 <> "" And dbname2 <> "" Then
        Response.Write "        <tr><td align='center'><strong>约束字段:</strong></td>"
        Response.Write "          <td><select name='bg1' style='width:250px;'>"
        Response.Write "<option value=''>选择主表字段</option>"
        If dbname1 <> "" Then
        sqlstr = "select * from " & dbname1
        Set rs = Conn.Execute(sqlstr)
        For i = 0 To rs.Fields.Count - 1
            Response.Write "<option value='" & rs(i).name & "'>" & rs(i).name & "</option>"
        Next
        Else
        Response.Write "<option value='0'>请先选择一个表</option>"
        End If
        Response.Write "</select></td><td align='center'><strong><< 等于 >></strong></td><td><select name='bg2' style='width:250px;'>"
        Response.Write "<option value=''>选择从表字段</option>"
        If dbname2 <> "" Then
        sqlstr = "select * from " & dbname2
        Set rs = Conn.Execute(sqlstr)
        For i = 0 To rs.Fields.Count - 1
            Response.Write "<option value='" & rs(i).name & "'>" & rs(i).name & "</option>"
        Next
        Else
        Response.Write "<option value='0'>请先选择一个表</option>"
        End If
        Response.Write "         </select></td><td><font color='#FF0000'>请选择跨表查询的约束条件。</font></td>"
        Response.Write "</tr>"
    End If
    Response.Write "        <tr><td width='100' align='center'><strong>选择字段:</strong><br><br><font color='#FF0000'>请选择需要调用的字段名称,按Ctrl或Shift键多选</font></td>"
    Response.Write "         <td width='100'><select name='field' size='1' multiple style='height:200px;width:250px;' onChange='addfield()'>"
    If dbname1 <> "" Then
    sqlstr = "select * from " & dbname1
    Set rs = Conn.Execute(sqlstr)
    For i = 0 To rs.Fields.Count - 1
        Response.Write "<option value='" & rs(i).name & "'>" & rs(i).name & "</option>"
    Next
    Else
    Response.Write "<option value='0'>请先选择一个表</option>"
    End If
    Response.Write "</select></td>"
    Response.Write "<td align='center'><strong>>>>></strong></td>"
    Response.Write "<td><select name='field2' size='2' multiple style='height:200px;width:250px;' onChange='addfield()'>"
    If dbname2 <> "" Then
    sqlstr = "select * from " & dbname2
    Set rs = Conn.Execute(sqlstr)
    For i = 0 To rs.Fields.Count - 1
        Response.Write "<option value='" & rs(i).name & "'>" & rs(i).name & "</option>"
    Next
    Else
    Response.Write "<option value='0'>请先选择一个表</option>"
    End If
    Response.Write "</select></td>"
    Response.Write "         <td></td></tr>"
    Response.Write "       </table>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tbody id='flist'"
    If AddType <> 3 Then Response.Write " style=""display:none"""
    Response.Write "><tr class='tdbg'>"
    Response.Write "      <td>"
    Response.Write "       <table border='0' cellpadding='0' cellspacing='0' width='100%' >"
    Response.Write "        <tr>"
    Response.Write "          <td width='100' align='center'><strong>参数说明:</strong></td>"
    Response.Write "          <td width='80'><textarea name='FieldList' cols='40' rows='5' id='FieldList' onkeydown=""checkfield();""></textarea></td>"
    Response.Write "          <td width='10'></td><td><font color='#FF0000'>* 输入函数列表参数,每行一个。</font></td>"
    Response.Write "        </tr>"
    Response.Write "       </table>"
    Response.Write "      </td>"
    Response.Write "    </tr></tbody>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td>"
    Response.Write "       <table border='0' cellpadding='0' cellspacing='0' width='100%' >"
    Response.Write "        <tr>"
    Response.Write "         <td width='100' align='center'><strong>查询语句:</strong></td>"
    If lnum > 0 Then
        Response.Write "         <td><div id=""flist2"">"
        Response.Write "<table border='1' cellpadding='2' cellspacing='1'  width='600' class='border'><tr align='center'>"
        Response.Write "<td style='cursor:hand;' onclick='addlist2(0)'>{$Now}</td>"
        Response.Write "<td style='cursor:hand;' onclick='addlist2(1)'>{$NowDay}</td>"
        Response.Write "<td style='cursor:hand;' onclick='addlist2(2)'>{$NowMonth}</td>"
        Response.Write "<td style='cursor:hand;' onclick='addlist2(3)'>{$NowYear}</td></tr></table>"
        Response.Write "</div><textarea name='LabelIntro' cols='83' rows='6' id='LabelIntro'>select * from " & dbname1 & "</textarea></td>"
    Else
        Response.Write "         <td><div id=""flist2"">"
        Response.Write "<table border='1' cellpadding='2' cellspacing='1'  width='600' class='border'><tr align='center'>"
        Response.Write "<td style='cursor:hand;' onclick='addlist2(0)'>{$Now}</td>"
        Response.Write "<td style='cursor:hand;' onclick='addlist2(1)'>{$NowDay}</td>"
        Response.Write "<td style='cursor:hand;' onclick='addlist2(2)'>{$NowMonth}</td>"
        Response.Write "<td style='cursor:hand;' onclick='addlist2(3)'>{$NowYear}</td></tr></table>"
        Response.Write "</div><textarea name='LabelIntro' cols='83' rows='6' id='LabelIntro'>select top 10 * from " & dbname1 & "</textarea></td>"
    End If
    Response.Write "       </tr></table>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td>"
    Response.Write "       <table border='0' cellpadding='0' cellspacing='0' width='100%' >"
    Response.Write "        <tr>"
    Response.Write "          <td width='100' align='center'><strong>优 先 级:</strong></td>"
    Response.Write "          <td width='50'><input name='Priority' type='text' id='Priority' size='5' maxlength='5'></td>"
    Response.Write "          <td width='10'></td>"
    Response.Write "          <td><font color='#FF0000'>数字越小,优先级越高。当标签中再嵌套调用其他标签时,就需要决定标签的优先级。<br>系统按照如下顺序来替换标签:自定义标签-->系统通用标签-->频道标签</font></td>"
    Response.Write "        </tr>"
    Response.Write "       </table>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "    <tr class='tdbg'>"
    Response.Write "      <td height='40'  align='center'>"
    Response.Write "        <input name='Action' type='hidden' id='Action' value='AddDyna2'>"
    Response.Write "        <input name='Submit' type='submit' id='Submit' value=' 下一步 '>"
    Response.Write "      </td>"
    Response.Write "    </tr>"
    Response.Write "  </table>"
    Response.Write "</form>"
End Sub

Sub AddDyna2()
    Dim LabelName, LabelClass, LabelType, PageNum, RTime, FieldList, LabelIntro, LabelIntro2, Priority, strtmp, dbname1, dbname2, dbtype
    Dim i, rs
    LabelName = "MY_" & Trim(Request.Form("LabelName"))
    LabelClass = Trim(Request.Form("LabelClass"))
    LabelType = PE_CLng(Trim(Request.Form("labeltype")))
    PageNum = PE_CLng(Trim(Request.Form("pagenum")))
    RTime = PE_CLng(Trim(Request.Form("rtime")))
    FieldList = Request.Form("FieldLi

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -