<?
require"ygl.php";
if(!isset($myclass)){errorview("对不起，没有该班级！！");exit;}
if(!isset($ses_user_id)||!isset($ses_user_psd)){errorview("对不起，你没有登陆！！");exit;}
$user_login_id=$ses_user_id;
$user_login_psd=$ses_user_psd;
if(!haveclass($myclass)){errorview("对不起，没有该班级！！");exit;}
if(!ynjoinclass($myclass,$user_login_id)){errorview("对不起，你没有加入该班！！");exit;}
readclass($myclass);
read_user_zl($user_login_id);
class_read_user($cjadmin);
gotNewMessage($user_login_id);
$allmember=file("class/$myclass/list","r");
$membercount=count($allmember);
$ynhead2="1";
$ynhead3="1";
#####
$ggcontent=read_file("class/$myclass/news");
$ggcontent=explode("\n",$ggcontent);
##########
$title=$schooln.$classn;
include"header.php";
?>
<script language=JavaScript1.2>
var x =0
var y=0
drag = 0
move = 0
window.document.onmousemove = mouseMove
window.document.onmousedown = mouseDown
window.document.onmouseup = mouseUp
function Show(divid) {
divid.filters.revealTrans.apply();
divid.style.visibility = "visible";
divid.filters.revealTrans.play();
}
function Hide(divid) {
divid.filters.revealTrans.apply();
divid.style.visibility = "hidden";
divid.filters.revealTrans.play();
}
function mouseUp() {
move = 0;
}
function mouseDown() {
if (drag) {
clickleft = window.event.x - parseInt(dragObj.style.left);
clicktop = window.event.y - parseInt(dragObj.style.top);
dragObj.style.zIndex += 1;
move = 1;
}
}
function mouseMove() {
if (move) {
dragObj.style.left = window.event.x - clickleft;
dragObj.style.top = window.event.y - clicktop;
}
}
function mouseStop() {
window.event.returnValue = false;
}
</script>
<table width="750" border="0" cellspacing="0" cellpadding="0" align="center">
 <tr>
  <td width="154" valign="top" align="center">
   <table width="98%" border="0" cellspacing="0" cellpadding="3">
    <tr>
     <td valign="top" align="center">
      <table width="100%" border="0" cellspacing="0" cellpadding="0" height="5">
       <tr>
        <td></td>
       </tr>
      </table>
      <table width="98%" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#B5E1F7" bordercolordark="#FFFFFF">
       <tr>
        <td><img src="image/tools1.gif" width="79" height="19">
        </td>
       </tr>
       <tr>
        <td valign="top" align="center">
         <table width="95%" border="0" cellspacing="0" cellpadding="3">
          <tr>
           <td class=gb3><img src="image/icon3.gif" width="10" height="11">&nbsp;<a href=sendmsg.php?myclass=<?echo $myclass;?>>发&nbsp;消&nbsp;息</a></td>
          </tr>
          <tr>
           <td class=gb3><img src="image/icon3.gif" width="10" height="11">&nbsp;<a href=# onClick="Show(messanger);"Show(lastdiv);>我&nbsp;的&nbsp;消&nbsp;息</a></td>
          </tr>
          <tr>
           <td class=gb3><img src="image/icon3.gif" width="10" height="11">&nbsp;<a href=mail.php?mailpage=maillist&myclass=<?echo $myclass;?>>发&nbsp;群&nbsp;体&nbsp;信</a></td>
          </tr>
          <tr>
           <td class=gb3><img src="image/icon3.gif" width="10" height="11">&nbsp;<a href=mail.php?mailpage=invites&myclass=<?echo $myclass;?>>发&nbsp;邀&nbsp;请&nbsp;函</a>
           </td>
          </tr>
          <tr>
           <td class=gb3><img src="image/icon3.gif" width="10" height="11">&nbsp;<a href=gbook.php?myclass=<?echo $myclass;?>>班&nbsp;级&nbsp;留&nbsp;言</a></td>
          </tr>
          <tr>
           <td class=gb3><img src="image/icon3.gif" width="10" height="11">&nbsp;<a href=classart.php?myclass=<?echo $myclass;?>>班&nbsp;级&nbsp;读&nbsp;物</a></td>
          </tr>
          <tr>
           <td class=gb3><img src="image/icon3.gif" width="10" height="11">&nbsp;<a href=classphoto.php?myclass=<?echo $myclass?>>班&nbsp;级&nbsp;相&nbsp;簿</a></td>
          </tr>
          <tr>
           <td class=gb3><img src="image/icon3.gif" width="10" height="11">&nbsp;<a href=classcard.php?myclass=<?echo $myclass;?>>班&nbsp;级&nbsp;名&nbsp;片</a></td>
          </tr>
          <tr>
           <td class=gb3><img src="image/icon3.gif" width="10" height="11">&nbsp;<a href=show.php?myclass=<?echo $myclass;?>>班&nbsp;级&nbsp;成&nbsp;员</a></td>
          </tr>
          <tr>
           <td><font color="#FF0000">::::::::::::::::::::</font></td>
          </tr>
          <tr>
           <td class=gb3><img src="image/icon3.gif" width="10" height="11">&nbsp;<a href=admin.php?myclass=<?echo $myclass?>&adpage=main>管&nbsp;理&nbsp;员&nbsp;入&nbsp;口</a></td>
          </tr>
         </table>
        </td>
       </tr>
      </table>
     </td>
    </tr>
    <tr>
     <td><iframe src=classcount.php?myclass=<?echo $myclass;?> width="95%" height=180 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=NO></iframe></td>
    </tr>
    <tr>
     <td align=center><a href=withdraw.php?droppage=yesno&myclass=<?echo $myclass;?>><font color=red>与该班断绝关系</font></a></td>
    </tr>
   </table>
  </td>
  <td valign="top" align="center" width="596">
   <table width="95%" border="0" cellspacing="0" cellpadding="0" height=5>
    <tr>
     <td></td>
    </tr>
   </table>
   <table width="98%" border="0" cellspacing="0" cellpadding="3">
    <tr>
     <td width="37%" align="center" valign="top">
      <table width="98%" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#B5E1F7" bordercolordark="#FFFFFF">
       <tr>
        <td align="center">
         <table width="97%" border="0" cellspacing="0" cellpadding="1" bordercolorlight="#B5E1F7" bordercolordark="#FFFFFF">
          <tr>
           <td height="13">
            <table width="100%" border="0" cellspacing="0" cellpadding="3">
             <tr>
              <td>学校名称:<?echo $schooln;?>&nbsp;</td>
             </tr>
             <tr>
              <td>班级名称:<?echo $classn;?>&nbsp;</td>
             </tr>
            </table>
           </td>
          </tr>
          <tr>
           <td>
            <table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#B5E1F7" bordercolordark="#FFFFFF">
             <tr>
              <td>
               <table width="100%" border="0" cellspacing="0" cellpadding="3">
                <tr>
                 <td>创建时间：<?echo $creatdate;?></td>
                </tr>
                <tr>
                 <td>创始人：<?echo $cusername;?></td>
                </tr>
                <tr>
                 <td>管理员：<?echo $admin1;?>&nbsp;&nbsp;<?echo $admin2;?>&nbsp;&nbsp;<?echo $admin3;?></td>
                </tr>
                <tr>
                 <td>现有成员：<?echo $membercount;?>&nbsp;人</td>
                 </td>
                </tr>
                <tr>
                 <td>&nbsp;</td>
                </tr>
               </table>
              </td>
             </tr>
            </table>
           </td>
          </tr>
         </table>
        </td>
       </tr>
      </table>
     </td>
     <td width="63%" valign="top" align="center">
      <table width="98%" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#B5E1F7" bordercolordark="#FFFFFF">
       <tr>
        <td valign="top" height="141">
         <table width="100%" border="0" cellspacing="0" cellpadding="3">
          <tr>
           <td class=gb3><img src="image/gonggao.gif" width="79" height="19"></td>
          </tr>
          <tr>
           <td height="95" valign="top"><?echo $ggcontent[0];?></td>
          </tr>
          <tr>
           <td height="22">&nbsp;</td>
          </tr>
         </table>
        </td>
       </tr>
      </table>
     </td>
    </tr>
   </table>
   <table width="98%" border="0" cellspacing="0" cellpadding="0" height=5>
    <tr>
     <td></td>
    </tr>
   </table>
   <table width="98%" border="0" cellspacing="0" cellpadding="3">
    <tr>
     <td width="62%" align="center" valign="top">
      <table width="98%" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#B5E1F7" bordercolordark="#FFFFFF">
       <tr>
        <td><img src="image/gb.gif" width="79" height="19"></td>
       </tr>
<?
$gbfile=file("class/$myclass/gbook.gb");
for($i=0; $i<6; $i++)
{
 $linea=$gbfile[$i];
 $linea=ereg_replace("\n", "", $linea);
 if ($linea != "") {
 $lines1a=file("class/$myclass/gbook.gb");
 while (list($tmpkey, $line1a) = each($lines1a))
  {
  $line1=ereg_replace("\n", "", $line1);
  list($cid,$userid,$usname,$posttime,$face,$gbcontent)=split("\t",$linea);
  if(strlen($gbcontent)>=55)$gbcontent=substr($gbcontent,0,53)."...";
   }
print"<tr><td><table width=100% border=0 cellspacing=0 cellpadding=1><tr><td bgcolor=#f7f7f7>※&nbsp;$posttime — $usname</td>
<td>&nbsp;</td></tr> <tr> <td colspan=2>$gbcontent</td></tr></table></td></tr>";
}
}
?>
   <tr>
        <td><a href=gbook.php?myclass=<?echo $myclass;?>#add>我要留言</a>　　　　　　　　　　　　　　　　　<a href=gbook.php?myclass=<?echo $myclass;?>>更多留言>></a></td>
       </tr>
      </table>
     </td>
     <td width="38%" valign="top" align="center">
      <table width="98%" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#B5E1F7" bordercolordark="#FFFFFF">
       <tr>
        <td><img src="image/read.gif" width="79" height="19"></td>
       </tr>
       <tr>
        <td>
<?
$gbfile=file("class/$myclass/read/list");
for($i=0; $i<10; $i++)
{
 $linea=$gbfile[$i];
 $linea=ereg_replace("\n", "", $linea);
 if ($linea != "") {
 $lines1a=file("class/$myclass/read/list");
 while (list($tmpkey, $line1a) = each($lines1a))
  {
  $line1=ereg_replace("\n", "", $line1);
  list($art_id,$art_title,$art_date,$art_sendid)=split("\t",$linea);
  if(strlen($art_title)>=30)$art_title=substr($art_title,0,27)."...";
   }
print"<table width=100% border=0 cellspacing=0 cellpadding=2><tr><td><a href=classart.php?myclass=$myclass&artpage=artshow&artshowid=$art_id target=_blank>$art_title</a></td></table>";
}
}
?>

        </td>
       </tr>
      </table>
     </td>
    </tr>
   </table>
  </td>
 </tr>
</table>
<?
###############
?>
<table width="100%" cellpadding="0">
<tbody><tr></TD><TD><div align="right">
<div id="messanger" style="FILTER: revealTrans(transition=23,duration=0.5) blendTrans(duration=0.5); POSITION: absolute; z-index:1; background-color: #FFFFFF; border: 1px none #500000; top:82px;left:530;width:230px; visibility: <? if ($gotNewMessage==0) echo "hidden"; else echo "visible";?>">
<table width=100% border=0 cellspacing=0 cellpadding=1 bgcolor=333333>
<tr><td>
  <table width=100% bgcolor=#B5E1F7 border=0 cellspacing=0 cellpadding=2 onMouseOver="dragObj=messanger; drag=1;move=0" style="WIDTH: 100%; CURSOR: move" onMouseOut="drag=0">
<tr><td><font color=FFFFFF>短消息提醒</font></td>
</tr></table><table width=100% bgcolor=FFFFFF border=0 cellspacing=0 cellpadding=2>
<tr><td><table width=100% border=0 cellspacing=0 cellpadding=0>
<tr><td><a href="messanger.php?myclass=<?echo $myclass;?>&menu=receivebox" target=msg>收件箱</a>
<a href="messanger.php?myclass=<?echo $myclass;?>&menu=sendbox" target=msg>发件箱</a>
<a href="messanger.php?myclass=<?echo $myclass;?>&menu=clear" target=msg>清空</a>
<span style="CURSOR:hand" onClick="Hide(messanger);">关闭</span><br>
<hr noshade size=1>
<iframe name=msg noresize frameborder=0 width=225></iframe>您有 <b> <?echo $gotNewMessage;?></b>
</b> 条新消息 -- <a href="messanger.php?myclass=<?echo $myclass;?>&menu=receivebox" target=msg>查看</a>
</td></tr></table></td></tr></table></td></tr></table></div>
<?include"footer.php";?>