<!--#INCLUDE FILE="conn.asp" -->
<!--#INCLUDE FILE="Class_Checkuser.asp" -->
<!--#INCLUDE FILE="Class_Top.asp" -->
<%locat="学校列表"
Call top(1,1)
dim schooltypeid,provinceid,areaid
dim rs,sql,schoolname,temp,rss
areaid=trim(request("areaid"))
schooltypeid=trim(request("schooltypeid"))
provinceid=trim(request("provinceid"))
	if provinceid="" or not isnumeric(provinceid) then provinceid=0
    if schooltypeid="" or not isnumeric(schooltypeid) then schooltypeid=0
    if areaid="" or not isnumeric(areaid) then areaid=0
if provinceid>0 then
if schooltypeid=0 then
temp=" and provinceid="&clng(provinceid)&""
else
temp=" and provinceid="&clng(provinceid)&" and  schooltypeid="&clng(schooltypeid)
end if
else
if schooltypeid=0 then
   if areaid=0 then
      temp=""
   else
      temp=" and areaid="&clng(areaid)&""
   end if
else
   if areaid=0 then
      temp=" and schooltypeid="&clng(schooltypeid)
   else
      temp=" and areaid="&clng(areaid)&" and  schooltypeid="&clng(schooltypeid)
   end if
end if
   end if
%><BR><form name="selsc11" action="Class_Schoollist.asp" method="POST" onSubmit="return submitonce(this)">
  <span style="FONT-SIZE: 10pt">&nbsp;&nbsp;&nbsp;&nbsp;学校类型： 
        <select name="schooltypeid">
        <option value="">请选择</option>
        <%set rss=server.createobject("adodb.recordset")
		sql="select * from schooltype order by schooltypeid"
              rss.open sql,conn
              while not rss.eof
              selectedseachs=""
			  if clng(schooltypeid)=clng(rss("schooltypeid")) then
                 selectedseachs="selected"
              end if
              %>
        <option <%=selectedseachs%> value=<%=rss("schooltypeid")%>><%=rss("schooltypename")%></option>
        <%
               rss.movenext
               wend
               rss.close
              %>
      </select>&nbsp;&nbsp;学校所在省：
      <select name="provinceid">
        <option value="">请选择</option>
        <%
             sql="select * from province order by seed "
             rss.open sql,conn
             while not rss.eof
             selectedseach2=""
             if clng(provinceid)=clng(rss("provinceid")) then
                selectedseach2="selected"
             end if
              %>
        <option <%=selectedseach2%> value="<%=rss("provinceid")%>"><%=rss("provincename")%></option>
        <%
               rss.movenext
               wend
               rss.close
              %>
      </select>
&nbsp;&nbsp;请输入学校关键字：
        <input name="schoolname" type="text" id="schoolname" size="20" value="<%=trim(request("schoolname"))%>">
        </span>
  &nbsp;&nbsp;<input type="submit" value="查 询" class=button>
</form><form name="selsc111" action="Class_RegClass.asp" method="POST" onSubmit="return submitonce(this)">
	<input type=hidden name=action value=Join>
<!--#INCLUDE FILE="inc/popup.inc" -->	
	<table border="0" width="95%" Class=TableBorder cellspacing="1" cellpadding="2" align=center>
	<tr height=25>
		<th align="center" width=6%>选择</th>
		
      <th align="center" width=30%>学&nbsp;校&nbsp;名&nbsp;称</th>
	
      <th align="center" width=15%>学&nbsp;校&nbsp;主&nbsp;页</th>
		 	<th align="center" width=20%>管&nbsp;理&nbsp;员</th>
			<th align="center" width=10%>开放等级</th>
      <th align="center" width=15%>注&nbsp;册&nbsp;人&nbsp;数</th>
		 
      <th align="center" width=20%>注&nbsp;册&nbsp;时&nbsp;间
<%
Response.write "</th></tr>"
schoolname=replace(trim(request("schoolname")),"'","")
Set rs = Server.CreateObject("ADODB.Recordset")
sql="Select classid,classname,homepage,studcount,regdate,visitcount,enyear,admin1,admin2,openlevel from class where classname like '%"&trim(schoolname)&"%' "&temp&" order by classid desc"
rs.Open sql,conn,1,1

if rs.eof and rs.bof Then 
	Response.write "<tr Class=LightTableBody><td colspan=7 height=30>&nbsp;&nbsp;目前还没有任何学校噢:(</td></tr>"
Else

	rs.pagesize=20
	maxpages=rs.pagecount

	if trim(Request("page"))<>"" Then
		currentpage=cint(Request("page"))
	Else 
		CurrentPage=1
	End if

	if currentpage>maxpages Then currentpage=maxpages
	rs.absolutepage=CurrentPage

	for i=1 to 20
		response.write "<tr Class=LightTableBody><td align=center>"&_
			"<input type=Radio name=scId value="&rs(0)&"></td><td>&nbsp;"&_
			"<a target=_blank href=""Class_index.asp?ClassID="&rs(0)&""" title=""浏览『"&rs(1)&"』的学校信息"">"&htmlencode(rs(1))&"</a></td>"&_
			"<td align=center>"
			if rs(2)<>"" and rs(2)<>"http://" Then
	response.write "<a href="""&rs(2)&""" target=_blank  title=""访问"&rs(1)&"的主页"">"&_
	"<img border=0 src=images/homepage.gif>主页</a>"
Else
	response.write "-" 
End if
response.write "</td><td align=center>"
if rs(7)<>"" Then
	response.write "&nbsp;<a href=""Class_Userinfo.asp?Name="&rs(7)&"""  target=_blank title=""查看学校管理员 "&rs(7)&" 的个人信息"">"&htmlencode(rs(7))&"</a>"
End if
if rs(8)<>"" Then
	response.write "&nbsp;<a href=""Class_Userinfo.asp?Name="&rs(8)&""" target=_blank title=""查看副学校管理员 "&rs(8)&" 的个人信息"">"&htmlencode(rs(8))&"</a>"
End if
		response.write "</td>"
response.write "<td align=center>"
		select case rs(5)
		case 0
			  Response.write "<img src=images/open.gif width=16 onmouseout=kill() onmouseover=""popup('该学校完全开放，可以自由加入！','"&LightTBColor&"')"">"
		case 1
			  Response.write "<img src=images/passwd.gif onmouseout=kill() onmouseover=""popup('加入该学校需要向学校管理员索取学校密码！','"&LightTBColor&"')"">"
		case 2
			  Response.write "<img src=images/auditing.gif onmouseout=kill() onmouseover=""popup('你需要通过学校管理员的验证才能加入这个学校！','"&LightTBColor&"')"">"
		case 3
			  Response.write "<img src=images/lock1.gif width=14 onmouseout=kill() onmouseover=""popup('该学校已被管理员锁定，不允许其他人加入！','"&LightTBColor&"')"">"
		End select
		response.write "</td>"
		
response.write "<td align=center>"&rs(3)&"</td><td align=center>"&rs(4)&"</td></tr>"
		rs.movenext
		if currentpage=maxpages then
			if rs.eof then exit for
		end if
	next

End if
rs.close
Set rs=Nothing
%>
    </table>

<TABLE width=95% align=center>
<TR><TD width=100%><table width=100% border=0><tr><td align=left width=140 nowrap><%Response.write "页次: "&currentpage&"/"&maxpages&"&nbsp;&nbsp;&nbsp;去第"%><input type=text name=targetPage size=2 style="height:16px;width:20px;">&nbsp;页</td><td width=15 align=right style="cursor:hand" onClick="document.location.href='Class_Schoollist.asp?provinceid=<%=provinceid%>&schooltypeid=<%=schooltypeid%>&areaid=<%=areaid%>&schoolname=<%=schoolname%>&page='+targetPage.value;"><img src=images/btngo.gif width=13 height=15></td><td align=center><% if currentpage=0 Then currentpage=1
if not  (currentpage=1 or maxpages=0) Then
	Response.write "　<a href=""?provinceid="&provinceid&"&schooltypeid="&schooltypeid&"&areaid="&areaid&"&schoolname="&schoolname&"&page="&currentpage-1&"""><img src=images/left.gif border=0>&nbsp;上一页</a>"
End if
		
if not (currentpage=maxpages or maxpages=0) Then
	Response.write "　<a href=""?provinceid="&provinceid&"&schooltypeid="&schooltypeid&"&areaid="&areaid&"&schoolname="&schoolname&"&page="&currentpage+1&"""><img src=images/right.gif border=0>&nbsp;下一页</a>"
End if
%></td><td align=right width=75><input type="submit" value="加 入" name="sbmtj" accesskey="j" class=button></td></tr></table></TD>
</TR></TABLE>
</form>
<br>
<form name="selsc11" action="Class_RegClass.asp" method="POST" onSubmit="return submitonce(this)">
<input type=hidden name=action value=Create>
  <TABLE width=95% align=center>
<TR>
      <TD align=left><span style="FONT-SIZE: 10pt">请仔细查找您的学校，如果确认上表中还没有你想要加入的学校，请在下面创建您的学校：</span></TD>
</TR></TABLE>

<table border="0" width="95%" Class=TableBorder cellspacing="1" cellpadding="7" align=center>
    <tr Class=LightTableBody> 
      <td width="69%">学校类型：<select name="schooltypeid" onChange="document.location.href='?provinceid=<%=provinceid%>&schooltypeid='+this.options[selectedIndex].value;">
        <option value="">请选择</option>
        <%sql1="select * from schooltype order by schooltypeid"
              rss.open sql1,conn
              while not rss.eof
              selectedseach=""
              if clng(schooltypeid)=clng(rss("schooltypeid")) then
                 selectedseach="selected"
              end if
              %>
        <option <%=selectedseach%> value=<%=rss("schooltypeid")%>><%=rss("schooltypename")%></option>
        <%
               rss.movenext
               wend
               rss.close
              %>
      </select>&nbsp;&nbsp;学校所在省：
      <select name="schoolprovinceid" onChange="document.location.href='?schooltypeid=<%=schooltypeid%>&provinceid='+this.options[selectedIndex].value;">
        <option value="">请选择</option>
        <%
             sql2="select * from province order by seed "
             rss.open sql2,conn
             while not rss.eof
             selectedseach2=""
             if clng(provinceid)=clng(rss("provinceid")) then
                selectedseach2="selected"
             end if
              %>
        <option <%=selectedseach2%> value="<%=rss("provinceid")%>"><%=rss("provincename")%></option>
        <%
               rss.movenext
               wend
               rss.close
              %>
      </select>&nbsp;&nbsp;学校所在地区：<select name="schoolareaid">
        <option value="">请选择</option>
        <%
             sql3="select * from areainfo where provinceid="&provinceid&" order by seed "
             rss.open sql3,conn
             while not rss.eof
             selectedseach3=""
             if clng(areaid)=clng(rss("areaid")) then
                selectedseach3="selected"
             end if
              %>
        <option <%=selectedseach3%> value="<%=rss("areaid")%>"><%=rss("areaname")%></option>
        <%
               rss.movenext
               wend
               rss.close
              %>
      </select></td>
      <td width="31%">学校名称：<input name="classname" size="20" maxlength="28">
        </td>
</tr>

<tr Class=LightTableBody>
<td colspan=2><table width="668" border=0 cellpadding=3>
          <tr><td width="658" class=mp>为避免出现同一学校多个名称的现象,学校名必须遵守以下规范！<br>
              (1)在学校名中尽量写学校全称,让人一目了然,如"<font color="#FF0000">广东工业大学</font>"<br>
				(2)请用中文,文字之间不要有空格,学校名称长度在5至25个字符之间.<BR>
              (3)如果发现学校名不规范或者重复，请速与<a href=mailto:<%=StrVar(2)%> title=管理员QQ:<%=StrVar(9)%>><font color="#CC0000">管理员联系</font></a>.<br>
				<%if not isnull(StrVar(3)) then%>(4)系统已设定学校名称必须包含以下限定词：<B><%=replace(StrVar(3),"|","</b>,<b>")%></B>。<%end if%><br>
              <%if BoolVar(17) then%>
              <font color="#FF0000">(5)创建后的学校必须经过管理员的审核后才能正常访问!</font><br>
              <%end if%>
              <font color="#FF0000"><strong>注</strong></font>：创建学校后系统会自动<%if BoolVar(16) then%>将你设为该学校的管理员，并<%end if%>设置该学校处于 
              <%if IntVar(6)=0 then%>
              <font color="#FF0000">完全开放状态</font>，任何用户都可以进入！<br>
<%end if%><%if IntVar(6)=2 then%>
              <font color="#FF0000">管理员审核状态</font>，任何用户加入你的学校都必须经过学校管理员的审核才可以进入！<%if BoolVar(16) then%>请你经常访问你的学校，审核要加入你校的同学！<%end if%> 
              <%end if%><%if BoolVar(16) then%>如果你不想使用系统默认的模式，请你创建学校成功后到学校管理那里修改！<br>请认真管理你的学校，如不想担任学校管理员请申请将你的职位转交给有兴趣又认真负责的同学！<%end if%></td>
          </tr></table></td></tr>
</table>

<TABLE width=95% align=center>
<TR><TD align=right><input type="submit" value="注册学校(C)" accesskey="c" class=button onClick="javascript:if(confirm('你确定要注册此学校吗?')){;return true;}else{return false;}"></TD>
</TR></TABLE>
</form>
<%Call footer%>
