<%@language=vbscript codepage=936 %>
<!--#include file="conn.asp"-->
<!--#include file="admin.asp"-->
<!-- #include file="Inc/Head.asp" -->
<style>
 .new{
 
  font-size:16px;
 }
 .input1
 {
  border-width:1px;
  border-color:black;
  font-size:16px;color:#F00;
  font-family:"黑体";
 }
  .input2
 {
  border-width:1px;
  border-color:black;
  font-size:16px;
  font-family:"宋体";
 }
</style>
<%
dim rs
dim sql
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from SmallClass_New order by SmallClassID asc"
rs.open sql,conn,1,1
%>
<script language = "JavaScript">
var onecount;
subcat = new Array();
        <%
        count = 0
        do while not rs.eof 
        %>
subcat[<%=count%>] = new Array("<%= trim(rs("SmallClassName"))%>","<%= trim(rs("BigClassName"))%>","<%= trim(rs("SmallClassName"))%>");
        <%
        count = count + 1
        rs.movenext
        loop
        rs.close
        %>
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.addNEWS.SmallClassName.length = 1; 
    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.addNEWS.SmallClassName.options[document.addNEWS.SmallClassName.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
    }    

function CheckForm()
{
     document.addNEWS.cnWords.value = document.frames.cnEditBox.getHTML(true);     
     document.addNEWS.imageNum.value = document.frames.cnEditBox.document.all("editImageNum").value;
     document.addNEWS.editFirstImageName.value = document.frames.cnEditBox.document.all("editFirstImageName").value;

	if (document.addNEWS.title.value.length == 0) {
		alert("资讯标题没有填写.");
		document.addNEWS.title.focus();
		return false;
	}
		if (document.addNEWS.user.value.length == 0) {
		alert("新闻发布人没有填写");
		document.addNEWS.user.focus();
		return false;
	}
	if (document.addNEWS.hxts.value.length == 0) {
		alert("核心提示没有填写");
		document.addNEWS.hxts.focus();
		return false;
	}
	return true;
}
</script>

<table width="800" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td align="center" >
	<table width="100%" border="0" cellpadding="2" cellspacing="1" class="table_southidc">
        <form name="addNEWS" method="post" action="News_save.asp" onSubmit="return CheckForm();">
          <tr> 
            <td class="back_southidc" height="30" colspan="4" align="center">添加新患者</td>
          </tr>
          <tr bgcolor="#ECF5FF"> 
            <td width="95" height="25" class="new">患者姓名：<font color="#FF0000">*</font></td>
            <td width="275"> 
              <input name="name" type="text" class="input2" id="name" size="30"></td>
            <td width="84" align="center" class="new">&nbsp;性别：</td>
            <td width="261"><input name="sex" type="radio" value="女" checked>
女
  <input name="sex" type="radio" value="男">
男 　</td>
          </tr>
          <tr bgcolor="#ECF5FF"> 
            <td height="30" class="new">联系电话：<font color="#FF0000">*</font></td>
            <td><input name="tel" type="text" class="input2" id="tel" size="30"></td>
            <td align="center" class="new">年龄：</td>
            <td><input name="nl" type="text" class="input2" id="nl" size="20"></td>
          </tr>
          <tr bgcolor="#ECF5FF"> 
            <td height="30" class="new" > 联系地址：</td>
            <td colspan="3" ><input name="lxdz" type="text" class="input2" id="lxdz" size="80"></td>
          </tr>
          <tr bgcolor="#ECF5FF">
            <td height="30"class="new" >咨询日期：<font color="#FF0000">*</font></td>
            <td height="30" ><!--#include file="inc/rl.asp" --></td>
            <td height="30" align="center" class="new">预约指定医生：</td>
            <td height="30" ><%		
        sql = "select * from yy_zxy where ys=true and yxbz=true order by px desc"
        rs.open sql,conn,1,1
		if rs.eof and rs.bof then
			response.write "请先添加栏目。"
		else
		%>
              <select name="yyys" size="1" id="yyys" class="input2" >
                <option selected value="<%=trim(rs("Name"))%>"><%=trim(rs("Name"))%></option>
                <%
			dim selyyys
		    selyyys=rs("Name")
        	rs.movenext
		    do while not rs.eof
			%>
                <option value="<%=trim(rs("Name"))%>"><%=trim(rs("Name"))%></option>
                <%
		        rs.movenext
    	    loop
		end if
        rs.close
			%>
            </select></td>
          </tr>
          <tr bgcolor="#ECF5FF">
            <td height="30"class="new" >预约来院日期：<font color="#FF0000">*</font></td>
            <td><!--#include file="inc/yylydate.asp" -->
<select name="swxw" id="swxw">
  <option value="上午" selected>上午</option>
  <option value="中午">中午</option>
  <option value="下午">下午</option>
</select>
<input type="radio" name="yylydatebz" value="true"><font color="#FF0000">
非精准</font></td>
            <td align="center"class="new">预约人：<font color="#FF0000">*</font></td>
            <td><%		
        sql = "select * from yy_zxy where yyr=true and yxbz=true  order by px desc"
        rs.open sql,conn,1,1
		if rs.eof and rs.bof then
			response.write "请先添加栏目。"
		else
		%>
              <select name="yyr" size="1" id="yyr" class="input2" >
                <option selected value="<%=session("AdminName")%>"><%=session("AdminName")%></option>
                <%
			dim selzxy
		    selzxy=rs("Name")
        	rs.movenext
		    do while not rs.eof
			%>
                <option value="<%=trim(rs("Name"))%>"><%=trim(rs("Name"))%></option>
                <%
		        rs.movenext
    	    loop
		end if
        rs.close
			%>
            </select></td>
          </tr>
          <tr bgcolor="#ECF5FF">
            <td height="30" class="new">预计回访日期：<font color="#FF0000">*</font></td>
            <td><!--#include file="inc/yhfdate.asp" --></td>
            <td align="center"class="new">预约号：<font color="#FF0000">*</font></td>
            <td><input name="bz" type="text" class="input2" id="bz" value="" size="30"></td>
          </tr>
          <tr bgcolor="#ECF5FF">
            <td height="30"class="new" >预约途径：<font color="#FF0000">*</font></td>
            <td><%	
        sql = "select * from BigClass_New"
        rs.open sql,conn,1,1
		if rs.eof and rs.bof then
			response.write "请先添加栏目。"
		else
		%>
              <select name="BigClassName" size="1" id="BigClassName" class="input2" onChange="changelocation(document.addNEWS.BigClassName.options[document.addNEWS.BigClassName.selectedIndex].value)" >
                <option  selected value="<%=trim(rs("BigClassName"))%>"><%=trim(rs("BigClassName"))%></option>
                <%
			dim selclass
		    selclass=rs("BigClassName")
        	rs.movenext
		    do while not rs.eof
			%>
                <option value="<%=trim(rs("BigClassName"))%>"><%=trim(rs("BigClassName"))%></option>
                <%
		        rs.movenext
    	    loop
		end if
        rs.close
			%>
              </select>  </td>
            <td align="center">预约病种：<font color="#FF0000">*</font></td>
            <td><select name="SmallClassName" id="SmallClassName" class="input2">
    <option value="" selected>..请选择病种..</option>
    <%
			sql="select * from SmallClass_New where BigClassName='" & selclass & "' order by SmallClassName"
			rs.open sql,conn,1,1
			if not(rs.eof and rs.bof) then
			%>
    <option value="<%=rs("SmallClassName")%>"><%=rs("SmallClassName")%></option>
    <% rs.movenext
				do while not rs.eof%>
    <option value="<%=rs("SmallClassName")%>"><%=rs("SmallClassName")%></option>
    <%
			    	rs.movenext
				loop
			end if
	        rs.close
			%>
    <%
			ranNum=int(9*rnd)+10
			iddata=month(now)&day(now)&hour(now)&minute(now)&second(now)&ranNum
			%>
</select></td>
          </tr>
          <tr bgcolor="#ECF5FF">
            <td height="40" class="new">疾病概述：<font color="#FF0000" size="3">*</font><br>              <font color="#FF0000">&nbsp; </font></td>
            <td colspan="3"><textarea name="content" cols="85" rows="3" class="input1" id="content"></textarea></td>
          </tr>
          <!--
          <tr bgcolor="#ECF5FF">
            <td height="40" class="new">&nbsp;来路：</td>
            <td colspan="3"><textarea name="llfx" cols="85" rows="3" class="input1" id="llfx"></textarea></td>
          </tr>
          -->
          <tr bgcolor="#ECF5FF">
            <td height="20" bgcolor="#ECF5FF"class="new">聊天记录：<font color="#FF0000" size="3">*</font></td>
            <td colspan="3" bgcolor="#ECF5FF"><textarea name="ltjl" cols="85" rows="25" class="input1" id="ltjl"></textarea></td>
          </tr>
          <tr bgcolor="#ECF5FF">
            <td height="30" colspan="4" bgcolor="#ECF5FF">&nbsp;</td>
          </tr>
          <!--
          <tr bgcolor="#ECF5FF">
            <td height="30" class="new">农合、市医保:</td>
            <td colspan="3"><input type="radio" name="yb" value="true">
是
  <input name="yb" type="radio" value="false" checked>
否 　</td>
          </tr>
          -->
          <tr> 
            <td height="30" colspan="4" align="center" bgcolor="#ECF5FF"> 
              <input type="submit" name="Submit" value="提交" class="input2">
              　 
               
              <!--获取EditBox的内容-->
              <input name=cnWords type=hidden ID="cnWords" value=""> <input name=imageNum type=hidden ID="imageNum" value="<%=mImageNum%>"> 
              <input name=editFirstImageName type=hidden ID="editFirstImageName" value=""> 
              <!--获取EditBox的内容-->           
            <input type="button" onClick="javascript:window.history.go(-1);"value="关闭">           </td>
          </tr>
        </form>
        <tr> 
          <td height="30" colspan="4" align="center">&nbsp;</td>
        </tr>
    </table></td>
  </tr>
</table>
<!-- #include file="Inc/Foot.asp" -->