j=document.all.messager.font.length-1
for i=j to 0 step -1
document.all.messager.font.remove(i)
next
set ooption=document.createelement("option")
ooption.text="---请选择收件人---"
ooption.value="CELERY"
document.all.messager.font.add(ooption)
<%
sql="select dept_name,dept_no from hes_dept where length(dept_no )='"&Session("deptlen")&"'"
set ks=conn.execute(sql)
while not ks.eof
%>
if strcomp(x,"<%=ks(1)%>")=0 then
<%
sql="select b.user_name user_name,c.user_desc user_desc,a.name name from HES_EMPLOYEE a,user_emp b,user_tab c where a.dept_no='"+ks(1)+"' and b.emp_no=a.employee_no and c.user_name=b.user_name"
set hoho=conn.execute(sql)
while not hoho.eof
%>
set ooption=document.createelement("option")
ooption.text="<%=hoho("user_name")%>--<%=hoho("user_desc")%>--<%=hoho("name")%>"
ooption.value="<%=hoho("user_name")%>"
document.all.messager.font.add(ooption)
<%
hoho.movenext
wend
%>
end if
<%
ks.movenext
wend
%>
j=document.all.messager.font.length-1
for i=j to 0 step -1
document.all.messager.font.remove(i)
next
set ooption=document.createelement("option")
ooption.text="---请选择收件人---"
ooption.value="CELERY"
document.all.messager.font.add(ooption)
<%
sql="select dept_name,dept_no from hes_dept where length(dept_no )='"&Session("deptlen")&"'"
set ks=conn.execute(sql)
while not ks.eof
%>
if strcomp(x,"<%=ks(1)%>")=0 then
<%
sql="select b.user_name user_name,c.user_desc user_desc,a.name name from HES_EMPLOYEE a,user_emp b,user_tab c where a.dept_no='"+ks(1)+"' and b.emp_no=a.employee_no and c.user_name=b.user_name"
set hoho=conn.execute(sql)
while not hoho.eof
%>
set ooption=document.createelement("option")
ooption.text="<%=hoho("user_name")%>--<%=hoho("user_desc")%>--<%=hoho("name")%>"
ooption.value="<%=hoho("user_name")%>"
document.all.messager.font.add(ooption)
<%
hoho.movenext
wend
%>
end if
<%
ks.movenext
wend
%>
j=document.all.messager.font.length-1
for i=j to 0 step -1
document.all.messager.font.remove(i)
next
set ooption=document.createelement("option")
ooption.text="---请选择收件人---"
ooption.value="CELERY"
document.all.messager.font.add(ooption)
<%
sql="select dept_name,dept_no from hes_dept where length(dept_no )='"&Session("deptlen")&"'"
set ks=conn.execute(sql)
while not ks.eof
%>
if strcomp(x,"<%=ks(1)%>")=0 then
<%
sql="select b.user_name user_name,c.user_desc user_desc,a.name name from HES_EMPLOYEE a,user_emp b,user_tab c where a.dept_no='"+ks(1)+"' and b.emp_no=a.employee_no and c.user_name=b.user_name"
set hoho=conn.execute(sql)
while not hoho.eof
%>
set ooption=document.createelement("option")
ooption.text="<%=hoho("user_name")%>--<%=hoho("user_desc")%>--<%=hoho("name")%>"
ooption.value="<%=hoho("user_name")%>"
document.all.messager.font.add(ooption)
<%
hoho.movenext
wend
%>
end if
<%
ks.movenext
wend
%>