<!--<?php
include_once PrintEot('m_header');
print <<<EOT
-->
<div class="bgA">
<div class="wrapB cc bgA" style="padding-top:10px;">
<div class="p10">
    <table cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td width="100" class="tac" style="padding-right:10px;">
                <img src="{$cnimg}" onload="imgResize(this,150)" />
            </td>
            <td valign="top" style="line-height:2">
                <p class="b f14">
<!--
EOT;
if (isset($o_classdb[$colony['classid']])) {print <<<EOT
-->
                <a href="{$basename}q=groups&a=all&cid=$colony[classid]">{$o_classdb[$colony[classid]]}</a> -
<!--
EOT;
}print <<<EOT
-->
                $colony[cname]
                </p>
                <p>
<!--
EOT;
if ($colony[ifcyer]) {print <<<EOT
-->
					<a href="{$basename}q=$q&a=out&cyid=$cyid" onclick="return ajaxurl(this);" class="fr">退出群组</a>
<!--
EOT;
}else{print <<<EOT
-->
					<a href="{$basename}q=$q&a=join&cyid=$cyid" onclick="return ajaxurl(this);" class="fr">加入群组</a>
<!--
EOT;
}print <<<EOT
-->
					成员：$colony[members]
				</p>
                <p>群相册：$colony[albumnum]</p>
                <p>简介：$colony[descrip]</p>
            </td>
        </tr>
    </table>
</div>



		<div id="person-nav" class="cc" style="margin-top:10px;">
			<ul style="width:500px;overflow:hidden;">
				<li id="g_index"><a href="{$basename}q=$q&cyid=$cyid">首页</a></li>
				<li id="g_thread"><a href="{$basename}q=$q&a=thread&cyid=$cyid">讨论区</a></li>
				<li id="g_galbum"><a href="{$basename}q=galbum&cyid=$cyid">群组相册</a></li>
				<li id="g_member"><a href="{$basename}q=$q&a=member&cyid=$cyid">成员列表</a></li>
<!--
EOT;
if ($colony[ifcyer]) {print <<<EOT
-->
				<li id="g_uintro"><a href="{$basename}q=$q&a=uintro&cyid=$cyid&job=set">我的通讯录</a></li>
<!--
EOT;
}print <<<EOT
-->
<!--
EOT;
if ($ifadmin) {print <<<EOT
-->
				<li id="g_set"><a href="{$basename}q=$q&a=set&cyid=$cyid">群组设置</a></li>
<!--
EOT;
}print <<<EOT
-->
			</ul>
		</div>
	<div class="contentC cc fl">

		<div class="c"></div>
<script language="JavaScript">
function imgResize(o, size) {
	if (o.width > o.height) {
		if (o.width > size) o.width = size;
	} else {
		if (o.height > size) o.height = size;
	}
}
function ajaxurl(o) {
	read.obj = o;
	ajax.send(o.href,'',ajax.get);
	return false;
}
setCurrent('g_{$a_key}','g_index','current');

function showAnnouce(){
	var annouce = getObj('annouce_div');
	if (annouce.style.display == 'none') {
		annouce.style.display = '';
	} else {
		annouce.style.display = 'none';
	}
}
function showConInfo(uid,cyid){
	ajax.send('mode.php?m=o&q=group&a=uintro&cyid='+cyid+'&uid='+uid,'',ajax.get);
}
</script>
<!--
EOT;
if (empty($a)) {print <<<EOT
-->
		<div class="pd8"><a style="cursor: pointer;" onclick="showAnnouce();">公告：{$colony[annouce_temp]}</a></div>
		<div class="pdD boxA" id="annouce_div" style="display:none">
        	<a style="cursor: pointer;" onclick="showAnnouce();" class="fr">隐藏</a>
        	<div class="p10">{$colony[annouce]}</div>
        </div>
		<h4 class="h5A mt8">
			<span><b>群组相册</b></span>
			<small><a href="{$basename}q=galbum&a=upload&cyid=$cyid">添加新照片</a></small>
		</h4>
		<div class="list-img list-img-A cc">
			<ul>
<!--
EOT;
if($newphoto){
foreach ($newphoto as $value) {print <<<EOT
-->
				<li><a href="{$basename}q=galbum&a=view&cyid=$cyid&pid=$value[pid]"><img alt="" width="80" src="$value[path]" /></a></li>
<!--
EOT;
}} else {print <<<EOT
-->
				<li>暂无群组相册信息</li>
<!--
EOT;
}print <<<EOT
-->
			</ul>
			<div class="pdtb3"><span class="more fr"><a href="{$basename}q=galbum&cyid=$cyid">查看更多</a></span></div>
		</div>
		<div class="c"></div>
		<h4 class="h5A mt8">
			<span class="b">近期关注</span>
			<small><a href="{$basename}q=$q&a=post&cyid=$cyid">发表新话题</a></small>
		</h4>
		<div class="bdtA">
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
<!--
EOT;
if($argdb){print <<<EOT
-->
				<tr class="tr2">
					<td>标题</td>
					<td>作者</td>
					<td>最后发表时间</td>
				</tr>
<!--
EOT;
foreach ($argdb as $value) {print <<<EOT
-->
				<tr class="tr3">
					<td><a href="{$basename}q=$q&a=read&cyid=$cyid&tid=$value[tid]" class="pdr">$value[subject]</a></td>
					<td><a href="{$basename}q=user&u=$value[authorid]">$value[author]</a></td>
					<td><span class="pdr">$value[lastpost]</span></td>
				</tr>
<!--
EOT;
}}else{print <<<EOT
-->
				<tr><td>群组近期暂无关注内容</td></tr>
<!--
EOT;
}print <<<EOT
-->
			</table>
		</div>
		<div class="pdtb3">
			<span class="more fr"><a href="{$basename}q=$q&a=thread&cyid=$cyid">查看更多</a></span>
		</div>
<!--
EOT;
} elseif ($a == 'thread') {print <<<EOT
-->
		<div class="bdtA mt8">
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
<!--
EOT;
if($argdb){print <<<EOT
-->
				<tr class="tr2">
					<td>标题</td>
					<td>作者</td>
					<td>最后发表时间</td>
				</tr>
<!--
EOT;
foreach ($argdb as $value) {print <<<EOT
-->
				<tr class="tr3">
					<td><a href="{$basename}q=$q&a=read&cyid=$cyid&tid=$value[tid]" class="pdr">$value[subject]</a></td>
					<td><a href="{$basename}q=user&u=$value[authorid]">$value[author]</a></td>
					<td><span class="pdr">$value[lastpost]</span></td>
				</tr>
<!--
EOT;
}}else{print <<<EOT
-->
				<tr class="tr3"><td>群组近期暂无关注内容</td></tr>
<!--
EOT;
}print <<<EOT
-->
			</table>$pages
		</div>
		<br />
		<h4 class="h5A mt8">
			<span class="b">快速发表</span>
		</h4>
		<div class="table-list">
			<form action="{$basename}q=$q&a=post&cyid=$cyid" method="post">
			<input type="hidden" name="step" value="3" />
			<table cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<td width="15%" class="gray2">标题</td>
					<td><input type="text" name="subject" size="35" /></td>
				</tr>
				<tr>
					<td class="gray2">内容</td>
					<td><textarea name="content" style="width:400px;height:120px"></textarea></td>
				</tr>
				<tr>
					<td></td>
					<td><input class="bt3" type="submit" value="提 交" /></td>
				</tr>
			</table>
			</form>
		</div>
<!--
EOT;
} elseif ($a == 'read') {print <<<EOT
-->
		<div style="margin:20px auto;">
			<div class="list-dlA list-dlA-A">
<!--
EOT;
foreach ($readdb as $key => $read) {print <<<EOT
-->
				<dl class="cc" id="lou_{$read[tid]}">
					<dt class="fl"><img src="$read[icon]" /></dt>
					<dd class="title1 bdbA">
						<p>
<!--
EOT;
if ($ifadmin || $read['authorid'] == $winduid) {print <<<EOT
-->
							<a href="javascript:;" id="read_$read[lou]" class="a-reply fr">操作<span>▼</span></a>
							<div id="read_1_$read[lou]" class="menu menu-post cc" style="display:none;">
							<div class="menu-b" style="width:45px;">
								<a href="{$basename}q=$q&a=del&cyid=$cyid&tid=$read[tid]" style="float:right;margin-right:5px" onclick="return ajaxurl(this);">删除</a>
								<a href="{$basename}q=$q&a=edit&cyid=$cyid&tid=$read[tid]" style="float:right;margin-right:5px" onclick="return ajaxurl(this);">编辑</a>
							</div></div>
<!--
EOT;
}print <<<EOT
-->
							#$read[lou] <a href="{$basename}q=user&u=$read[authorid]" class="b blue  pdr">$read[author]</a>
<!--
EOT;
if ($read['lou'] == 0) {print <<<EOT
-->
							<a href="{$basename}q=group&a=read&cyid=$cyid&tid=$tid" class="b blue f16">$read[subject]</a>
<!--
EOT;
}print <<<EOT
-->
							&nbsp;<span class="gray small">{$read[postdate]}</span>
						</p>
						<p class="text f14" style="line-height:1.8" id="read_{$read[tid]}">$read[content]</p>
					</dd>
				</dl>
<!--
EOT;
}print <<<EOT
-->
			</div>
		</div>$pages
		<div class="table-list">
			<form action="{$basename}q=$q&a=reply&cyid=$cyid" method="post">
			<input type="hidden" name="tid" value="$tid" />
			<table cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<td width="15%" class="gray2">快速发表</td>
					<td><textarea name="content" style="width:400px;height:120px"></textarea></td>
				</tr>
				<tr>
					<td></td>
					<td><input class="bt3" type="submit" value="提 交" /></td>
				</tr>
			</table>
			</form>
		</div>
<!--
EOT;
} elseif ($a == 'post') {print <<<EOT
-->
		<div class="table-list">
			<form action="{$basename}q=$q&a=$a&cyid=$cyid" method="post">
			<input type="hidden" name="step" value="3" />
			<table cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<td width="15%" class="gray2">标题</td>
					<td><input type="text" name="subject" size="35" /></td>
				</tr>
				<tr>
					<td class="gray2">内容</td>
					<td><textarea name="content" style="width:400px;height:120px"></textarea></td>
				</tr>
				<tr>
					<td></td>
					<td><input class="bt3" type="submit" value="提 交" /></td>
				</tr>
			</table>
			</form>
		</div>
<!--
EOT;
} elseif ($a == 'member') {print <<<EOT
-->
		<div class="bdtA mt8">
			<form action="{$basename}q=$q&a=$a&cyid=$cyid" method="post">
			<table cellpadding="0" cellspacing="0" width="100%">
				<tr class="tr2">
					<td></td>
					<td>会员</td>
					<td>真实姓名</td>
					<td>身份</td>
					<td>性别</td>
					<td>通讯录</td>
					<td>短信</td>
					<td>加好友</td>
<!--
EOT;
if ($ifadmin){print <<<EOT
-->
					<td>操作</td>
<!--
EOT;
}print <<<EOT
-->
				</tr>
<!--
EOT;
foreach ($memdb as $key => $value) {print <<<EOT
-->
				<tr class="tr3">
					<td><img src="$value[icon]" onload="imgResize(this,50)" /></td>
					<td><b>$value[username]</b></td>
					<td>$value[realname]</td>
					<td>
<!--
EOT;
if ($colony['admin'] == $value['username']) {print <<<EOT
-->
						群主
<!--
EOT;
} elseif ($value['ifadmin'] == '1') {print <<<EOT
-->
						管理员
<!--
EOT;
} elseif ($value['ifadmin'] == '-1') {print <<<EOT
-->
						未验证
<!--
EOT;
} else {print <<<EOT
-->
						群员
<!--
EOT;
}print <<<EOT
-->
					</td>
					<td>
<!--
EOT;
if ($value['gender'] == '1') {print <<<EOT
-->
						男
<!--
EOT;
} elseif ($value['gender'] == '2') {print <<<EOT
-->
						女
<!--
EOT;
} else {print <<<EOT
-->
						保密
<!--
EOT;
}print <<<EOT
-->
					</td>
					<td><a style="cursor: pointer;" onclick="showConInfo('$value[uid]','$cyid')">查看</a></td>
					<td><a href="pw_ajax.php?action=msg&touid=$value[uid]" onclick="return ajaxurl(this);"><img src="$imgpath/$stylepath/read/email.gif" /></a></td>
					<td><a href="{$db_bbsurl}/pw_ajax.php?action=addfriend&touid=$value[uid]" onclick="return ajaxurl(this);"><img src="$imgpath/$stylepath/u-adf.gif" /></a></td>
<!--
EOT;
if ($ifadmin){print <<<EOT
-->
					<td><input type="checkbox" name="selid[]" value="$value[uid]" /></td>
<!--
EOT;
}print <<<EOT
-->
				</tr>
<!--
EOT;
}print <<<EOT
-->
			</table>{$pages}
<!--
EOT;
if ($ifadmin) {print <<<EOT
-->
			<div style="margin-top:1em;text-align:center">
<!--
EOT;
if ($colony['admin'] == $windid) {print <<<EOT
-->
				<input type="radio" name="step" value="addadmin" />设为管理
				<input type="radio" name="step" value="deladmin" />取消管理
<!--
EOT;
}print <<<EOT
-->
				<input type="radio" name="step" value="check" checked />审核会员
				<input type="radio" name="step" value="del" />踢出本群
				<input class="bt3" type="button" name="chkall" value="全 选" onclick="CheckAll(this.form)" />
				<input class="bt3" type="submit" value="提 交" />
			</div>
<script language="JavaScript">
var ifcheck = true;
function CheckAll(form) {
	for (var i = 0; i < form.elements.length - 2; i++) {
		var e = form.elements[i];
		if (e.type == 'checkbox') e.checked = ifcheck;
	}
	ifcheck = ifcheck == true ? false : true;
}
</script>
<!--
EOT;
}print <<<EOT
-->
			</form>
		</div>
<!--
EOT;
} elseif ($a == 'uintro') {
print <<<EOT
-->
		<div class="table-list2">
			<form action="{$basename}q=$q&a=$a" method="post">
			<input type="hidden" name="step" value="3" />
			<input type="hidden" name="cyid" value="$cyid" />
			<table cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<td width="30%" align="right">用户</td>
					<td>$uinfo[username]</td>
				</tr>
				<tr>
					<td align="right">真实姓名</td>
					<td><input type="text" class="input" name="realname" value="$uinfo[realname]" /></td>
				</tr>
				<tr>
					<td align="right">性别</td>
					<td>
						<select name="gender">
							<option value="0" $select_0>保密</option>
							<option value="1" $select_1>男</option>
							<option value="2" $select_2>女</option>
						</select>
					</td>
				</tr>
				<tr>
					<td align="right">电话</td>
					<td><input type="text" class="input" name="tel" value="$uinfo[tel]" /></td>
				</tr>
				<tr>
					<td align="right">邮箱</td>
					<td><input type="text" class="input" name="email" value="$uinfo[email]" /></td>
				</tr>
				<tr>
					<td align="right">联系地址</td>
					<td><input type="text" class="input" name="address" size="40" value="$uinfo[address]" /></td>
				</tr>
				<tr>
					<td align="right">介绍说明</td>
					<td><textarea name="introduce" style="width:300px;height:80px">$uinfo[introduce]</textarea></td>
				</tr>
				<tr>
					<td align="right"></td>
					<td><input type="submit" value="提 交" class="bt3" /></td>
				</tr>
			</table>
			</form>
		</div>
<!--
EOT;
} elseif ($a == 'set') {print <<<EOT
-->
		<div class="table-list">
			<form action="{$basename}q=$q&a=$a" enctype="multipart/form-data" method="post">
			<input type="hidden" name="step" value="3" />
			<input type="hidden" name="cyid" value="$cyid" />
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td width="30%" align="right" class="gray">群组名称</td>
					<td><input type="text" name="cname" value="$colony[cname]" /></td>
				</tr>
				<tr>
					<td align="right" class="gray">群组分类</td>
					<td><select name="cid">$options</select></td>
				</tr>
				<tr>
					<td align="right" class="gray">群组LOGO</td>
					<td>
<!--
EOT;
if($cnimg){print <<<EOT
-->
						<img src="$cnimg" onload="imgResize(this,150)" /><br />
<!--
EOT;
}print <<<EOT
-->
						<input type="file" name="cnimg" />
					</td>
				</tr>
				<tr>
					<td align="right" class="gray">加入权限</td>
					<td>
						<select name="ifcheck">
							<option value="2" $ifcheck_2>完全开放</option>
							<option value="1" $ifcheck_1>需审核</option>
							<option value="0" $ifcheck_0>不允许加入</option>
						</select>
					</td>
				</tr>
				<tr>
					<td align="right" class="gray">公开群组内容</td>
					<td><input type="radio" name="ifopen" value="1" $ifopen_Y />是 <input type="radio" name="ifopen" value="0" $ifopen_N />否</td>
				</tr>
				<tr>
					<td align="right" class="gray">公开群组相册</td>
					<td><input type="radio" name="albumopen" value="1" $albumopen_Y />是 <input type="radio" name="albumopen" value="0" $albumopen_N />否</td>
				</tr>
				<tr>
					<td align="right" class="gray">群组公告</td>
					<td><textarea name="annouce" style="width:350px;height:70px">{$colony[annouce]}</textarea></td>
				</tr>
				<tr>
					<td align="right" class="gray">群组描述</td>
					<td><textarea name="descrip" style="width:350px;height:70px">{$colony[descrip]}</textarea></td>
				</tr>
				<tr>
					<td></td>
					<td><input class="bt3" type="submit" value="保存设置" /></td>
				</tr>
			</table>
			</form>
		</div>
<!--
EOT;
}print <<<EOT
-->
	</div>
<!--
EOT;
if (empty($a)) {print <<<EOT
-->
	<div class="contentC-side cc">
    <h4 class="h5A mt8">
    	<a href="{$basename}q=groups" class="fr">我的群组</a>
        <span class="b">我的信息</span>
    </h4>
	<div class="list-F list-fen">
		<ul>
<!--
EOT;
if ($colony['ifcyer']) {print <<<EOT
-->
            <li><a>我的身份：<span class="gray">
<!--
EOT;
if($colony['admin'] == $windid){print <<<EOT
-->
群主
<!--
EOT;
}elseif($colony['ifadmin'] == 1){print <<<EOT
-->
管理员
<!--
EOT;
}elseif($colony['ifadmin'] == 0){print <<<EOT
-->
普通成员
<!--
EOT;
}else{print <<<EOT
-->
未验证成员
<!--
EOT;
}print <<<EOT
-->
				</span></a>
			</li>
<!--
EOT;
if($ifadmin){print <<<EOT
-->
			<li><a href="{$basename}q=galbum&a=create&cyid=$cyid">创建群组相册</a></li>
<!--
EOT;
}print <<<EOT
-->
			<li><a href="{$basename}q=$q&a=uintro&job=set&cyid=$cyid">编辑我的通讯录</a></li>
<!--
EOT;
}print <<<EOT
-->
		</ul>
	</div>
		<div class="boxB bgB pr" style="margin-top:2em"><span class="cirA1"></span><span class="cirA2"></span><span class="cirA3"></span><span class="cirA4"></span>
		<div class="list-F list-cheng pdD">
			<h2 class="b">成员列表</h2>
			<ul>
<!--
EOT;
foreach ($memdb as $value) {print <<<EOT
-->
				<li><a href="{$basename}q=user&u=$value[uid]">$value[username]</a></li>
<!--
EOT;
}print <<<EOT
-->
			</ul>
		</div>
		<div class="pdD">
			<span class="more fr"><a href="{$basename}q=group&a=member&cyid=$cyid">查看更多</a></span>
		</div><br />
	</div></div>
<!--
EOT;
}print <<<EOT
-->
</div>
<!--内容 end-->

</div>
</div>
<!--
EOT;
?>-->