<%
ntime=now()
Stime2=formatDateTime(Stime,2)
Etime2=formatDateTime(Etime,2)
if ks=0 or not (DateDiff("d",Stime2,ntime)>0 and DateDiff("d",ntime,Etime2)>0) then 
   response.write("<script>alert('友情提示：选课暂未开放，目前不能选课!');location='index.asp';</script>")
   response.end
end if

if session("Sname")="" or session("sno")="" then
   response.write("<script>alert('友情提示：您还未登录，目前不能选课!');location='index.asp';</script>")
   response.end
end if
%>