<link rel="stylesheet" type="text/css" href="Style/top.css" />
<script type="text/javascript">
function MM_setTextOfTextfield(objId,x,newText) { //v9.0
  with (document){ if (getElementById){
    var obj = getElementById(objId);} if (obj) obj.value = newText;
  }
}
</script>
<div class="top">
  <div class="top_head"><?php 
  if($login==1){
     echo '欢迎您：'.$nc.'!';
	 if($admin==1){
	   echo '<a href="admin/index.php?sid='.$sid.'">管理后台</a> | ';}
	 echo '<a href="index.php">退出</a>';
  }else{
    echo '游客:<a href="/webreg.php">注册</a>|';
	echo '<a href="/weblogin.php">登录</a>';
	} 
  ?>
         </div>
    </div>
<div class="top_nav">
<div class="top_content">
  <div class="top_nav_logo">
         <img src="image/dd_logo.gif" />
		 </div>
         <div class="top_nav_dh">
                 <div class="search">
<form id="form1" name="form1" method="get" action="search/search_list.php">
  <input name="search" type="text"  class="sinput" id="search" onclick="MM_setTextOfTextfield('search','','')" value="请输入关键词"/>
  <input name="sid" type="hidden" value="<?php  echo $_GET['sid']?>"/>
  <input type="submit" id="button" value="马上搜索" class="button" /> 
 
</form>
                </div>
            </div>
	    </div>
    </div>
<table class="dh">
     <tr>
	    <td>
  <table class="dh_content"  border="0" cellpadding="0" cellspacing="0">
  <tr>
  <td>
  <a href="index.php?sid=<?php  echo $_GET['sid']?>">首页</a>
  </td><td>
  <a href="news.php?sid=<?php  echo $_GET['sid']?>">新闻</a>
  </td><td>
  <a href="biancheng.php?sid=<?php  echo $_GET['sid']?>">编程</a>
  </td><td>
  <a href="web.php?sid=<?php  echo $_GET['sid']?>">建站</a>
  </td><td>
  <a href="school.php?sid=<?php  echo $_GET['sid']?>">校园</a>
  </td><td>
  <a href="kepu.php?sid=<?php  echo $_GET['sid']?>">科普</a>
  </td><td>
  <a href="kaifa.php?sid=<?php  echo $_GET['sid']?>">开发</a>
  </td><td>
  <a href="books.php?sid=<?php  echo $_GET['sid']?>">文库</a>
  </td><td>
  <a href="download.php?sid=<?php  echo $_GET['sid']?>">下载</a>
  </td><td>
  <a href="shequ/index.php?sid=<?php  echo $_GET['sid']?>">社区</a>
  </td>
  </tr>
  </table>
</tr></td></table>
<div class="sub">
<div class="sub_content">
<?php 
	 $cl="SELECT cid,number,cn,class,lmq,url FROM class WHERE class='{$urld}' ORDER BY number";
	 /*执行数据查询语句*/  
     $classcon=mysql_query($cl);
     /*处理结果集*/
	 if($classcon && mysql_num_rows($classcon)>0){
	 $i=0; 
	while(list($cid,$number,$cn,$class,$lmq,$url)=mysql_fetch_row($classcon)){
	if($cid==$_GET['cid']){
	echo "<a href=\"".$class.".php?cid=".$cid."&sid=".$_GET['sid']."\" style=\"background-color:#efefef;\">";
	}else{
	echo "<a href=\"".$class.".php?cid=".$cid."&sid=".$_GET['sid']."\">";
	}
	echo "$cn";
	echo '</a>';
	    }
			
    }
mysql_free_result($classcon);
			 
			 ?>
</div>
</div>
