<!--#include file="chklogin.asp"-->
<!--#include file="../conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>调用管理</title>
<link href="css.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FF9999">
        <%
		dim rs,sql
		set rs=server.CreateObject("adodb.recordset")
		sql ="Select * from kw_xl"
        rs.open sql,conn,1,1
		%>
<SCRIPT language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
		<%
        count = 0
        do while not rs.eof 
        %>
subcat[<%=count%>] = new Array("<%=rs("xiaolei")%>","<%=rs("dalei")%>","<%=rs("xiaolei")%>");
        <%
        count = count + 1
        rs.movenext
        loop
        rs.close
        %>

onecount=<%=count%>;

function changelocation(locationid)
    {
    document.myform.xl.length = 1; 

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.myform.xl.options[document.myform.xl.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
</SCRIPT>

<script>
function cha(){
if (document.myform.dl.value=="")
   {
   	alert("调用大类不允许为空！");
	document.myform.dl.focus();
	return false;
   }

document.myform.code.value='<script src="<%=replace(request.ServerVariables("PATH_INFO"),"order.asp","showcode.asp")%>?dl='+document.myform.dl.value
if (document.myform.xl.value!="")
  {
document.myform.code.value=document.myform.code.value+'&xl='+document.myform.xl.value
   }

document.myform.code.value=document.myform.code.value+'&wtlx='+document.myform.wtlx.value

document.myform.code.value=document.myform.code.value+'&wtys='+document.myform.wtys.value

if (document.myform.zs.value!="")
  {
document.myform.code.value=document.myform.code.value+'&zs='+document.myform.zs.value
   } 
if (document.myform.wts.value!="")
  {
document.myform.code.value=document.myform.code.value+'&wts='+document.myform.wts.value
   } 
if (document.myform.showfl.checked==true)
  {
document.myform.code.value=document.myform.code.value+'&showfl='+document.myform.showfl.checked
   }
if (document.myform.showuser.checked==true)
  {
document.myform.code.value=document.myform.code.value+'&showuser='+document.myform.showuser.checked
   }
if (document.myform.showtime.checked==true)
  {
document.myform.code.value=document.myform.code.value+'&showtime='+document.myform.showtime.checked
   } 
if (document.myform.showdjs.checked==true)
  {
document.myform.code.value=document.myform.code.value+'&showdjs='+document.myform.showdjs.checked
   } 
if (document.myform.showzt.checked==true)
  {
document.myform.code.value=document.myform.code.value+'&showzt='+document.myform.showzt.checked
   } 
if (document.myform.addpoint.checked==true)
  {
document.myform.code.value=document.myform.code.value+'&addpoint='+document.myform.addpoint.checked
   } 
if (document.myform.showhd.checked==true)
  {
document.myform.code.value=document.myform.code.value+'&showhd='+document.myform.showhd.checked
   }
if (document.myform.showxsf.checked==true)
  {
document.myform.code.value=document.myform.code.value+'&showxsf='+document.myform.showxsf.checked
   }
if (document.myform.openstyle.value!="")
  {
document.myform.code.value=document.myform.code.value+'&openstyle='+document.myform.openstyle.value
   } 
document.myform.code.value=document.myform.code.value+'"></'+'script>'
}
</script>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table width="600" border="0" align="center" cellpadding="3" cellspacing="1" class="tablebg">
  <form name="myform">
  <tr bgcolor="#ff6666">
    <td height="22" colspan="2" align="center" class="font_bt">调 用 问 答 参 数 设 置</td>
  </tr>
  <tr bgcolor="#ff6666">
    <td height="26" align="center"><b>所属大类：</b></td>
    <td height="26">&nbsp;
      <select name="dl" onChange="changelocation(document.myform.dl.options[document.myform.dl.selectedIndex].value)">
      <option selected value="">==请选类型==</option>
      <%
		dim i
		set rs=server.CreateObject("adodb.recordset")
		sql ="Select * from kw_dl order by dldm"
        rs.open sql,conn,1,1
		for i=1 to rs.recordcount
		%>
      <option value="<%=rs("dalei")%>"><%=rs("dalei")%></option>
      <%
           rs.movenext
           next
   rs.close
   set rs=nothing
   closedb
          %>
    </select>
    * 调用的大类，必须选择。</td>
  </tr>
  <tr bgcolor="#ff6666">
    <td height="26" align="center"><b>所属小类：</b></td> 
    <td height="26">&nbsp;
      <select name="xl">
      <option selected value="">==请选类型==</option>
    </select>
    * 小类可选，不选为所有大类问题。    
  </tr>
  <tr bgcolor="#ff6666">
    <td height="26" align="center"><b>问题类型：</b></td>
    <td height="26">&nbsp;
      <select name="wtlx" id="wtlx">
      <option value="1">最新问题</option>
      <option value="2">热门问题</option>
      <option value="3">高分问题</option>
      <option value="4">解决问题</option>
        </select> 
    * 按照选择排列问题。
  </tr>
  <tr bgcolor="#ff6666">
    <td height="26" align="center"><b>显示样式：</b></td>
    <td height="26">&nbsp;
      <select name="wtys" id="wtys">
      <option value="1">表格式</option>
      <option value="2">普通列表</option>
    </select> 
    * 推荐表格式。</td>
  </tr>
  <tr bgcolor="#ff6666">
    <td height="26" align="center"><b>调用字数：</b></td>
    <td height="26">&nbsp;
      <input name="zs" type="text" value="20" size="3" maxlength="2"> 
    * 每个问题所显示的字符数。汉字为2字符。</td>
  </tr>
  <tr bgcolor="#ff6666">
    <td height="26" align="center"><b>调用问题数：</b></td>
    <td height="26">&nbsp;
      <input name="wts" type="text" id="wts" value="10" size="3" maxlength="2">
    * 调用的问题数目。</td>
  </tr>
  <tr bgcolor="#ff6666">
    <td width="92" align="center"><b>显示内容：</b></td>
    <td width="405" align="center"><table width="98%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><input name="showfl" type="checkbox" id="showfl">      &nbsp;&nbsp;显示分类</td>
    <td><input name="showuser" type="checkbox" id="showuser">&nbsp;&nbsp;显示提问者</td>
    <td><input name="showtime" type="checkbox" id="showtime">&nbsp;&nbsp;提问时间</td>
    <td><input name="showdjs" type="checkbox" id="showdjs">&nbsp;&nbsp;点击次数</td>
  </tr>
  <tr>
    <td><input name="showzt" type="checkbox" id="showzt">&nbsp;&nbsp;显示状态</td>
    <td><input name="addpoint" type="checkbox" id="addpoint">&nbsp;&nbsp;是否加“…”</td>
    <td><input name="showhd" type="checkbox" id="showhd">&nbsp;&nbsp;显示回答数</td>
    <td><input name="showxsf" type="checkbox" id="showxsf">&nbsp;&nbsp;显示悬赏分</td>
  </tr>
</table>
</td>
  </tr>
  <tr bgcolor="#ff6666">
    <td height="26" colspan="2">&nbsp;&nbsp;<b>打开方式：</b>&nbsp;
      <select name="openstyle" id="openstyle">
      <option value="">原窗口</option>
      <option value="_blank">新窗口</option>
    </select>
    * 选择在新窗口打开。</td>
  </tr>
  <tr align="center" bgcolor="#ff6666">
    <td height="94" colspan="2"><textarea name="code" cols="68" rows="5" id="code"></textarea></td>
  </tr>
  <tr bgcolor="#ff6666">
    <td height="30" colspan="2" align="center"><input name="submit" type="button" id="submit" value="生成调用代码" onClick="cha()"></td>
  </tr>
  </form>
</table>
</body>
</html>
