<!--<?php
include_once PrintEot('m_header');
print <<<EOT
-->
<div class="wrapB cc" style="padding-top:10px;background:#fff;">

<div class="contentC cc">
	<div class="h5A">
		<a href="{$basename}q=groups" style="float:right">我的群组</a>
		<span class="b">
<!--
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]
		</span>
	</div>
	<div id="status-cate">
		<div class="tabA" style="margin-top:10px;width:725px;">
			<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>
				<li id="g_uintro"><a href="{$basename}q=$q&a=uintro&cyid=$cyid">通讯录</a></li>
<!--
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>
	<div class="contentC-main cc">

		<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');
</script>
<!--
EOT;
if (empty($a)) {print <<<EOT
-->
		<h4 class="h5A">
			<span class="b">群公告</span>
		</h4>
		<div class="pdD">{$colony[annouce]}</div>
		<h4 class="h5A">
			<span><b>群组相册</b></span>
			<small><a href="{$basename}q=galbum&a=upload&cyid=$cyid">添加新照片</a> | <a href="{$basename}q=galbum&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="" src="$value[path]" /></a></li>
<!--
EOT;
}} else {print <<<EOT
-->
				<li>暂无群组相册信息</li>
<!--
EOT;
}print <<<EOT
-->
			</ul>
		</div>
		<div class="c"></div>
		<h4 class="h5A">
			<span class="b">近期关注</span>
			<small><a href="{$basename}q=$q&a=post&cyid=$cyid">发表新话题</a></small>
		</h4>
		<div class="table-list2">
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
<!--
EOT;
if($argdb){print <<<EOT
-->
				<tr>
					<td>标题</td>
					<td>作者</td>
					<td>最后发表时间</td>
				</tr>
<!--
EOT;
foreach ($argdb as $value) {print <<<EOT
-->
				<tr>
					<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="table-list2">
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
<!--
EOT;
if($argdb){print <<<EOT
-->
				<tr>
					<td>标题</td>
					<td>作者</td>
					<td>最后发表时间</td>
				</tr>
<!--
EOT;
foreach ($argdb as $value) {print <<<EOT
-->
				<tr>
					<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>$pages
		</div>
		<br />
		<h4 class="h5A">
			<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 class="txa" 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="" class="a-reply fr">操作<span>▼</span></a>
					<!-- <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> -->
<!--
EOT;
}print <<<EOT
-->
							#$read[lou] <a href="{$basename}q=user&u=$read[authorid]" class="f14 b s1  pdr">$read[author]</a>
<!--
EOT;
if ($read['lou'] == 0) {print <<<EOT
-->
							<a href="#" class="b s1">$read[subject]</a>
<!--
EOT;
}print <<<EOT
-->
							&nbsp;<span class="gray1 small">{$read[postdate]}</span>
						</p>
						<p class="text" 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 class="txa" 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 class="txa" 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="table-list2">
			<form action="{$basename}q=$q&a=$a&cyid=$cyid" method="post">
			<table cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<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>
					<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 href="{$basename}q=$q&a=uintro&cyid=$cyid&uid=$value[uid]">查看</a></td>
					<td><a href="pw_ajax.php?action=msg&touid=$value[uid]" onclick="return ajaxurl(this);">发短消息</a></td>
					<td><a href="{$db_bbsurl}/pw_ajax.php?action=addfriend&touid=$value[uid]" onclick="return ajaxurl(this);">加为好友</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') {
if ($job == 'set' && $uinfo['uid'] == $winduid) {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" 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" name="tel" value="$uinfo[tel]" /></td>
				</tr>
				<tr>
					<td align="right">邮箱</td>
					<td><input type="text" name="email" value="$uinfo[email]" /></td>
				</tr>
				<tr>
					<td align="right">联系地址</td>
					<td><input type="text" 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;
} else {print <<<EOT
-->
		<div class="table-list2">
			<table cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<td width="30%">用户</td>
					<td>
						$uinfo[username]
<!--
EOT;
if ($winduid == $uinfo['uid']) {print <<<EOT
-->
						[<a href="{$basename}q=$q&a=$a&cyid=$cyid&job=set">编辑我的通讯录</a>]
<!--
EOT;
}print <<<EOT
-->
					</td>
				</tr>
				<tr>
					<td>真实姓名</td>
					<td>$uinfo[realname]</td>
				</tr>
				<tr>
					<td>性别</td>
					<td>
<!--
EOT;
if ($uinfo['gender'] == '1') {print <<<EOT
-->
						男
<!--
EOT;
} elseif ($uinfo['gender'] == '2') {print <<<EOT
-->
						女
<!--
EOT;
} else {print <<<EOT
-->
						保密
<!--
EOT;
}print <<<EOT
-->
					</td>
				</tr>
				<tr>
					<td>电话</td>
					<td>$uinfo[tel]</td>
				</tr>
				<tr>
					<td>邮箱</td>
					<td>$uinfo[email]</td>
				</tr>
				<tr>
					<td>联系地址</td>
					<td>$uinfo[address]</td>
				</tr>
				<tr>
					<td>介绍说明</td>
					<td>$uinfo[introduce]</td>
				</tr>
			</table>
		</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="gray1">群组名称</td>
					<td><input type="text" name="cname" value="$colony[cname]" /></td>
				</tr>
				<tr>
					<td align="right" class="gray1">群组分类</td>
					<td><select name="cid">$options</select></td>
				</tr>
				<tr>
					<td align="right" class="gray1">群组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="gray1">加入权限</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="gray1">公开群组内容</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="gray1">公开群组相册</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="gray1">群组公告</td>
					<td><textarea class="txa" name="annouce" style="width:350px;height:70px">{$colony[annouce]}</textarea></td>
				</tr>
				<tr>
					<td align="right" class="gray1">群组描述</td>
					<td><textarea class="txa" 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">
		<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 class="xl-app">
<!--
EOT;
foreach ($memdb as $value) {print <<<EOT
-->
				<li><a href="{$basename}q=user&u=$value[uid]" class="i-d">$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-->
<!--侧栏 begin-->
<div class="sidebarC cc">
	<div class="pdtb3"><img src="{$cnimg}" onload="imgResize(this,150)" /></div>
	<h4 class="h5A">
		<span class="b">群组信息</span>
	</h4>
	<div class="list-F list-fen">
		<ul>
			<li><a>群组成员：$colony[members]/$o_memberfull</a></li>
			<li><a>群组相册：$colony[albumnum]/$o_albumnum</a></li>
<!--
EOT;
if ($colony['ifcyer']) {print <<<EOT
-->
            <li><a>我的身份：<span class="gray1">
<!--
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>
			<li><a href="{$basename}q=$q&a=out&cyid=$cyid" onclick="return ajaxurl(this);" class="gray1">退出群组</a></li>
<!--
EOT;
} else {print <<<EOT
-->
			<li><a href="{$basename}q=$q&a=join&cyid=$cyid" onclick="return ajaxurl(this);">加入群组</a></li>
<!--
EOT;
}print <<<EOT
-->
		</ul>
	</div>
</div>
</div></div>
<!--
EOT;
?>-->