<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
<title>圈子管理-&gt;圈子列表</title>
<link href="css_body.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.rb{ border-right:1px solid #98CAEF }
.tb{ border-top:1px solid #98CAEF }
</style>
<script type="text/javascript">
var flag=false; 
function MyImage(Img){ 
	var image=new Image(); 
	image.src=Img.src; 
	width=80;//预先设置的所期望的宽的值
	height=80;//预先设置的所期望的高的值
	if(image.width>width||image.height>height){//现有图片只有宽或高超了预设值就进行js控制
	w=image.width/width;
	h=image.height/height;
		if(w>h){//比值比较大==>宽比高大
		//定下宽度为width的宽度
		Img.width=width;
		//以下为计算高度
		Img.height=image.height/w;
		}else{//高比宽大
		//定下宽度为height高度
		Img.height=height;
		//以下为计算高度
		Img.width=image.width/h;
		}
	}
} 
</script>
</head>
<body>

<div class="bodytitle">
	<div class="bodytitleleft"></div>
	<div class="bodytitletxt">圈子管理</div>
</div>
<table width="96%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="	background:#E2F5BC;">
  <tr>
    <td height="30" align="center" bgcolor="#FAFCEF">
      <form action="group_main.php" name="form1" method="get">
	    <table width="600" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="69">&nbsp;关键字：</td>
            <td width="83" align="left">
           	  <input name="keyword" type="text" id="keyword" size="12" style="width:100" value="<?php echo $keyword?>">            </td>
            <td width="60">&nbsp;创建人：</td>
            <td width="87"><input name="username" type="text" id="username" size="12" style="width:100" value="<?php echo $username?>" /></td>
            <td width="59" align="center">类目：            </td>
            <td width="161" align="left"><select name="store" id="store">
              <option value="0">所有</option>
              <?php echo $option?>
            </select></td>
            <td width="81" align="center"><input name="imageField" type="submit" class="inputbut" value="搜索"/></td>
          </tr>
        </table>
	  </form>
    </td>
  </tr>
</table>

<table width="96%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="	background:#E2F5BC;">
  <tr>
    <td height="24" colspan="9" bgcolor="#EDF9D5"><table width="99%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="29%">&nbsp;&nbsp;<strong>圈子管理>>圈子列表</strong></td>
          <td width="71%" align="right">&nbsp;</td>
        </tr>
      </table></td>
  </tr>
  <tr bgcolor="#FDFEE9" height="26">
    <td width="10%" align="center">图标</td>
    <td width="20%" align="center">[ID]名称/时间</td>
    <td width="5%" align="center">官方?</td>
    <td width="10%" align="center">创建人</td>
    <td width="30%" align="center">说明</td>
    <td width="10%" align="center">管理员</td>
    <td width="15%" align="center">操作</td>
  </tr>
  <!--分页-->
  <?php  
  $mylist = $dlist->GetDataList();
  while($row = $mylist->GetArray('dm'))
  {
  $icon = $row['groupimg'];
  if(!$icon) $icon = "img/dfpic.gif";
  $issystem = $row['issystem'];
  if($issystem) $issystem = "<font color='red'>官方</font>";
  else $issystem = "普通";
  if($row['ishidden']){
  	$ishidden = "<font color='red'>关闭</font>";
    $opstauts = "开放";
    $opstautsdo = "open";    
  }else{
    $ishidden = "<font color='#66CC00'>开放</font>";
    $opstauts = "关闭";
    $opstautsdo = "close";
   }
  ?>
  <tr height="26" align="center" bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#EDF7D0';" onMouseOut="javascript:this.bgColor='#FFFFFF';">
    <td><img src="<?php echo $icon?>" align="absmiddle" onload='javascript:MyImage(this);'/></td>
    <td align="left" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="26">[<?php echo $row['groupid']?>] <?php if($row['isindex']) echo "[<font color='red'>荐</font>]";?><u><a href="group_edit.php?ID=<?php echo $row['groupid']?>"><?php echo $row['groupname']?></a></u>/<?php echo GetDateMk($row['stime'])?></td>
        </tr>
        <tr>
          <td height="26">状态：<?php echo $ishidden?>;类目：<?php echo GetGroupstore($row['storeid']);?></td>
        </tr>
      </table></td>
    <td><?php echo $issystem?></td>
    <td><?php echo $row['creater']?></td>
    <td title="title"><?php echo $row['des']?></td>
    <td><?php echo $row['ismaster']?></td>
    <td>
	<table width="98%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td align="center" height="25"><a href="group_main.php?action=<?php echo $opstautsdo?>&ID=<?php echo $row['groupid']?>"><?php echo $opstauts?></a> | <a href="group_edit.php?ID=<?php echo $row['groupid']?>">编辑</a> | <a href="group_main.php?action=del&ID=<?php echo $row['groupid']?>" onClick="return(confirm('删除后无法恢复,您确定删除吗?'))">删除</a> | <a href="group_guestbook.php?gid=<?php echo $row['groupid']?>">留言</a></td>
        </tr>
      </table></td>
  </tr>
  <?php
  } ?>
  <!--分页-->
  <tr>
     <td height="28" colspan="9" bgcolor="#EDF9D5">&nbsp;&nbsp;<?php echo $dlist->GetPageList(7);?></td>
  </tr>
</table>

</body>
</html>