<!--<?php
require_once PrintEot('m_header');
if (empty($a)) {print <<<EOT
-->
<div class="c mb10"></div>
<div class="g_contentA fl">
<!--
EOT;
if ($colony['annouce']) {
if ($colony['ifannouceopen'] || $ifadmin || ($colony['ifcyer'] && $colony['ifadmin'] != '-1')) {print <<<EOT
-->
	<div>
    	<h5 class="g_hA"><span class="b f14">群公告</span></h5>
		<div class="p10">
<!--
EOT;
if ($ifadmin) {print <<<EOT
-->
<style type="text/css" media="screen">
	@import url($imgpath/post/minieitor/minieitor.css);
</style>
<div id="showannouce" style="display:none">
<form  name="FORM3" action="{$basename}a=set&t=annouce&cyid=$cyid" enctype="multipart/form-data" method="post">
    <div class="minieitor_pw cc">
        <ul class="miniUl">
            <li><a href="javascript:" title="插入url链接" class="milink_pw" onClick="editor.createLinkBox(this.id);" id="createlinkid" unselectable="on">插入url链接</a></li>
            <li><a href="javascript:" title="字体加粗" class="mistrong_pw" onClick="editor.bold();" id="createb3" unselectable="on">加粗</a></li>
            <li><a href="javascript:" title="加颜色" class="micolor_pw" onClick="editor.createcolor(this.id);" id="createcolorid" unselectable="on">加颜色</a></li>
        </ul>
        <div class="minitextarea">
            <textarea maxlength="200" name="atc_content" id="atc_content">$colony[annouce]</textarea><input type="hidden" id="board_uid" value="$u">
        <div class="c"></div>
        </div>
        <div class="c"></div>
    </div>
    <span class="btn2" style="margin:0 10px 0 0;"><span><button type="submit">保 存</button></span></span><span class="bt2"><span><button type="button" onclick="hidenannouce();">取 消</button></span></span>
</form>
</div>
<script type="text/javascript" src="js/mini_editor.js"></script>
<script type="text/javascript">
var db_bbsurl = '$db_bbsurl';
var db_urlcheck = '$db_urlcheck';
function showannouce() {
	document.getElementById('showannouce').style.display = 'block';
	document.getElementById('annouce').style.display = 'none';
	document.getElementById('a_modify').style.display ='none';
	document.FORM3.atc_content.focus();
}
function hidenannouce() {
	document.getElementById('showannouce').style.display = 'none';
	document.getElementById('annouce').style.display = 'block';
	document.getElementById('a_modify').style.display ='block';
	closep();
}
var editor = new MiniEditor('atc_content');
</script>
<!--
EOT;
}print <<<EOT
-->
	<div id="annouce">
		{$annouce}
	</div>
<!--
EOT;
if ($ifadmin) {print <<<EOT
-->
			<div class="tar"><a href='javascript:void(0);' onclick="showannouce();" id="a_modify">修改</a></div>
<!--
EOT;
}print <<<EOT
-->
		</div>
    </div>
<!--
EOT;
} else { print <<<EOT
-->
<div class="mb10">
	<h5 class="g_hA"><span class="b f14">群公告</span></h5>
	<div class="p15 f14 tac">
	你还没有加入本群组，<a onclick="sendmsg('apps.php?q=group&cyid=$cyid&a=join','',this.id);" id="joincolony2" href="javascript:;">申请加入</a>吧！
	</div>
</div>
<!--
EOT;
}}
require_once PrintEot('m_index_model');
$groupRight['layout'] = $groupRight['layout'] ? $groupRight['layout'] : array();
foreach ($groupRight['layout'] as $key => $value) {
if ($value['ifopen'] && $groupRight['modeset'][$key]['ifopen']) {
	$colonytemplate->$key($indexModel[$key]);
}}print <<<EOT
-->
</div>
<div class="g_sidebarA fr">
<!--
EOT;
require_once PrintEot('m_colony_right');
print <<<EOT
-->
</div>
<!--
EOT;
} elseif ($a == 'thread') {print <<<EOT
-->
<div class="g_navB mb10">
    <span class="fr">
        <form action="apps.php?q=group&a=thread&cyid=$cyid" method="post">
			<input name="type" type="hidden" value="thread" />
			<input name="cyid" type="hidden" value="$cyid" />
			<input name="range" type="hidden" value="1" />
			<input name="keyword" type="text" value='$keyword' class="input" />
            <span class="bt2"><span><button type="submit">搜 索</button></span></span>
        </form>
    </span>
	<a href="apps.php?q=group&a=thread&cyid=$cyid" class="$all_current">全部</a>&nbsp;|&nbsp;
    <a href="apps.php?q=group&a=thread&cyid=$cyid&digest=1" class="$digest_current">精华</a>
</div>
<!--
EOT;
if (!$colony['ifopen'] && !$ifadmin && !$colony['ifcyer'] ){print<<<EOT
-->
<p class="p15 mb20 tac f14">
你还没有加入本群组，<a onclick="sendmsg('apps.php?q=group&cyid=$cyid&a=join','',this.id);" id="joincolony2" href="javascript:;">申请加入</a>吧！
</p>
<!--
EOT;
}else
{if($ifadmin){print<<<EOT
-->
<form action="apps.php?q=topicadmin" method="post" name="mawhole">
 	<input type="hidden" name="fid" value="$colony[classid]">
 	<input type="hidden" name="cyid" value="$cyid">
 	<input type="hidden" name="cyid_o" value="$cyid">
 	<input type="hidden" name="action" value="">
 	<input type="hidden" name="gMode" value="group">
<!--
EOT;
}print<<<EOT
-->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="g_tableA">
<!--
EOT;
if($argdb){print <<<EOT
-->
    <tr class="tr3 g_bgA">
<!--
EOT;
if ($newColony->getManageCheck($ifbbsadmin,$ifcolonyadmin)) {print <<<EOT
-->
			<th width="20">&nbsp;</th>
<!--
EOT;
}print<<<EOT
-->
			<th>&nbsp;</th>
			<th>标题&nbsp;&nbsp;&nbsp;<span class="gray fn">(共{$count}篇话题)</span></th>
			<th width="120">发布者&nbsp;</th>
			<th width="75" class="tac">回复/阅读</th>
			<th width="180">最后回复&nbsp;</th>
    </tr>
<!--
EOT;
foreach ($argdb as $value) {print <<<EOT
-->
    <tr class="tr5 {$value[tr_style]}">
<!--
EOT;
if ($newColony->getManageCheck($ifbbsadmin,$ifcolonyadmin)) {print <<<EOT
-->
			<th><input type="checkbox" name="tidarray[]" value="$value[tid]" /></th>
<!--
EOT;
}print<<<EOT
-->
        <td style="width:14px;">
			<a href="apps.php?q=group&a=read&cyid=$cyid&tid={$value['tid']}" target="_blank">
<!--
EOT;
if ($value['locked']%3 == 1) {print<<<EOT
-->
			<img src="$imgpath/g/topiclock.gif" align="absmiddle" />
<!--
EOT;
} elseif ($value['locked']%3 == 2) {print<<<EOT
-->
			<img src="$imgpath/g/topicclose.gif" align="absmiddle" />
<!--
EOT;
} else {print <<<EOT
-->
			<img src="$imgpath/g/topicnew.gif" align="absmiddle" />
<!--
EOT;
}print <<<EOT
-->
			</a>
		</td>
		<td>
<!--
EOT;
if($value[digest]){print <<<EOT
-->
			<img class="fr" src="$imgpath/g/digest.gif" align="absmiddle" />
<!--
EOT;
}if ($value['topped']) {print <<<EOT
-->
			<img src="$imgpath/g/headtopic.gif" align="absmiddle" class="fl mr5" />
<!--
EOT;
}print <<<EOT
-->
			<p class="g_subject"><a href="apps.php?q=group&a=read&cyid=$cyid&tid=$value[tid]" class="f14" title="$value[subject]">$value[sub_subject]</a></p>
		</td>
        <td>
        	<!--a class="userCard img_25 mr10"-->
			<a href="{$db_userurl}$value[authorid]" title="$value[author]" target="_blank"><img src="{$allFaceurl[$value[author]]}" width="18" height="18" align="absmiddle" /></a><a href="{$db_userurl}$value[authorid]" title="$value[author]" target="_blank">$value[sub_author]</a></td>
        <td class="tac s6">
			<span class="s2">$value[replies]</span>&nbsp;/&nbsp;$value[hits]
		</td>
        <td class="s6">
        	<!--class="userCard img_25 mr10"-->
			<a href="u.php?username=$value[lastposter]" target="_blank" title="$value[lastposter]"><img src="{$allFaceurl[$value[lastposter]]}" width="18" height="18" align="absmiddle" /></a><span title="$value[lastpost]">{$value[format_lastpost]}</span>
		</td>
    </tr>
<!--
EOT;
}}else{
if($digest == 1){print <<<EOT
-->
	<tr><td class="p15 f14 tac">暂无精华话题！</td></tr>

<!--
EOT;
}else{print <<<EOT
-->
	<tr><td class="p15 f14 tac">
<!--
EOT;
if(!$keyword){print <<<EOT
-->
    暂无话题，我来第一个<a href="{$basename}a=post&cyid=$cyid" class="line s2">发表话题</a>吧！
<!--
EOT;
} else {print <<<EOT
-->
	 抱歉，没有找到与"搜索关键词"相关的话题！
<!--
EOT;
}print <<<EOT
--> 
    </td></tr>
<!--
EOT;
}}}print <<<EOT
-->
</table>
<!--
EOT;
if ($newColony->getManageCheck($ifbbsadmin,$ifcolonyadmin)) {
print <<<EOT
-->
<div class="g_talkbox g_bgB">
	<div class="p10 tal cc">
    <span class="fl mt5"><label for="quanxuan"><input name="" type="checkbox" id="quanxuan" value=""  onclick="CheckAll(this.form)"/> 全选&nbsp;</label></span>
<!--
EOT;
if($newColony->right['topicadmin']['toptopic'] && $ifcolonyadmin || $ifbbsadmin) {print<<<EOT
-->
	<a href="javascript:;" onclick="submitAction(document.mawhole,'toptopic');return false;" class="g_bta fl">置顶</a>
<!--
EOT;
}if($newColony->right['topicadmin']['digest'] && $ifcolonyadmin || $ifbbsadmin){print<<<EOT
-->
	<a href="javascript:;" onclick="submitAction(document.mawhole,'digest');return false;" class="g_bta fl">精华</a>
<!--
EOT;
}if($newColony->right['topicadmin']['lock'] && $ifcolonyadmin || $ifbbsadmin){print<<<EOT
-->
	<a href="javascript:;" onclick="submitAction(document.mawhole,'lock');return false;" class="g_bta fl">锁定</a>
<!--
EOT;
}if($newColony->right['topicadmin']['pushtopic'] && $ifcolonyadmin || $ifbbsadmin){print<<<EOT
-->
	<a href="javascript:;" onclick="submitAction(document.mawhole,'pushtopic');return false;" class="g_bta fl">提前</a>
<!--
EOT;
}if($newColony->right['topicadmin']['downtopic'] && $ifcolonyadmin || $ifbbsadmin){print<<<EOT
-->
	<a href="javascript:;" onclick="submitAction(document.mawhole,'downtopic');return false;" class="g_bta fl">压帖</a>
<!--
EOT;
}if($newColony->right['topicadmin']['highlight'] && $ifcolonyadmin || $ifbbsadmin){print<<<EOT
-->
	<a href="javascript:;" onclick="submitAction(document.mawhole,'highlight');return false;" class="g_bta fl">加亮</a>
<!--
EOT;
}if($newColony->right['topicadmin']['del'] && $ifcolonyadmin || $ifbbsadmin){print<<<EOT
-->
	<a href="javascript:;" onclick="submitAction(document.mawhole,'del');return false;" class="g_bta fl">删除</a>
<!--
EOT;
}print<<<EOT
-->
	</div>
</div>
</form>
<!--
EOT;
}print <<<EOT
-->
<div class="mt10 mb10 cc">$pages</div>
<script type="text/javascript">
function submitAction(aForm,action){
	aForm.action.value = action;
	aForm.submit();
}
</script>
<!--
EOT;
} elseif ($a == 'write') {
include printEot('writesmile');
print <<<EOT
-->
<div class="g_navB mb10">共{$colony['writenum']}篇</span></div>
<div class="g_contentA fl">
	<!--
EOT;
if (!$colony['ifwriteopen'] && !$ifadmin && (!$colony['ifcyer'] || $colony['ifadmin'] == '-1')) {print <<<EOT
-->
<p class="p15 mb20 tac f14">
你还没有加入本群组，<a onclick="sendmsg('apps.php?q=group&cyid=$cyid&a=join','',this.id);" id="joincolony2" href="javascript:;">申请加入</a>吧！
</p>
 <!--
EOT;
}else{
print <<<EOT
-->
    <div class="p10">
    <div class="dlA">
<form method="post" action="{$basename}cyid=$cyid&ajax=1&a=writepost" onsubmit="return false;" name="FORM">
		<table width="100%">
			<tr class="vt">
				<td width="65"><span class="img_50"><img src="$faceurl" width="48" height="48" /></span></td>
			<td>
            <div class="sk">
           	<div class="one"><div class="two"><div class="tree"><div class="four">
				<div class="sktextarea"><textarea name="text" id="writetext" onkeydown="write_quickpost(event)" onfocus="if(this.value == oldvalue)this.value=''">来，说两句吧…</textarea><div class="c"></div></div>
                <div class="sk_open">
                    <span id="writebutton" class="btn3 fr"><span><button class="button" type="submit" onclick="groupComment(document.forms['FORM'])" id="write_button">发表</button></span></span>
<!--
EOT;
if($_COOKIE['iftongbu']==1)
{
	$check = "checked=1";
}else
{
	$check ='';
}
print <<<EOT
-->
                    <span id="showSmile" class="sk_show cp">表情</span>
                    <div style="position:absolute;display:none;width:100px;" id="smile" class="face_menu"></div>
                    <span id="writetext_warn" class="s6">限 255 字节</span>
                </div>
            </div></div></div></div>
        	</div>
			</td>
			</tr>
		</table>
	</form>
<script type="text/javascript">
var charset = '$db_charset';
initCheckTextNum('writetext','writetext_warn',255);
function write_quickpost(event){
	if((event.ctrlKey && event.keyCode == 13) || (event.altKey && event.keyCode == 83)){
		getObj('write_button').click();
	}
}
var oldvalue;
function groupComment(o) {
	if (getObj('writetext').value == '' || getObj('writetext').value == oldvalue) {
		showDialog('error','记录内容必须在3～255个字节之间');
		return false;
	}
	ajax.submit(o);
	return true;
}
~function getOldValue(){
	oldvalue = getObj('writetext').value;
	if (oldvalue != '来，说两句吧…') {
		getObj('writetext').value = '';
	}
}();

getObj('showSmile').onclick = function(e) {
	stopPropagation(e);
	displayElement('smileContainer');
	document.body.onclick=function(){
		getObj('smileContainer').style.display='none';
		document.body.onclick=null;
	};
	getObj('writetext').focus();
	var rect = getObj('showSmile').getBoundingClientRect();
	getObj('smileContainer').style.left = rect.left+ietruebody().scrollLeft+'px';
	getObj('smileContainer').style.top = rect.top + ietruebody().scrollTop + 20 +'px';
}
applySmile(function(codeText) {
	insertContentToTextArea(getObj('writetext'), codeText);
	checkTextNum('writetext','writetext_warn',255,true);
});
</script>
	<div id="writebox" class="mb10">
<!--
EOT;
if (!empty($writedata)) {
$db_blogsource = array('web'=>'网页','signature'=>'个性签名','other'=>'其他');
$i=0;
foreach ($writedata as $key => $value) {
$value['content']=str_replace($face_array,$img_array,$value['content']);
print <<<EOT
-->
		<dl class="dl cc" id="write_$value[id]" >
<!--
EOT;
if($value[icon]){print <<<EOT
-->


		<dt class="dt"><a href="{$db_userurl}$value[uid]" target="_blank" class="userCard img_50"  id="card_write_{$i}_{$value[uid]}"><img src="$value[icon]" width="44" height="44" /></a><span id="write_{$i}" style="height:1px" class="fr"></span></dt>
		<dd class="dd">
<!--
EOT;
if ($ifadmin || $value['uid'] == $winduid) {print <<<EOT
-->
				<a href="apps.php?q=group&a=writedel&ajax=1&id=$value[id]&cyid=$cyid" id="del_$value[id]" class="adel wirte" onclick="ajaxurl(this);return false;" title="删除" style="display:none;">删除</a>

<!--
EOT;
}print <<<EOT
-->
		<p class="f14 mb15"><a href="{$db_userurl}$value[uid]" target="_blank" class="mr5">$value[username]</a>：$value[content]</p>
		<p class="gray mb10"><span class="mr5">{$value[postdate]}</span><!--通过{$db_blogsource[$value[source]]}--><span id="com_write_$value[id]"><a href="javascript:;" id='a_write_{$value[id]}' onclick="PW_Comment.showCommList('groupwrite','$value[id]',this);return false;">回复({$value[c_num]})</a></span>
        </p>
		<div id="combox_groupwrite_{$value[id]}">
<!--
EOT;
}print <<<EOT
-->
			<div class="redlA">
<!--
EOT;
if($value['replayuid']){
print <<<EOT
-->
                <dl class="cc" id="commentreplay_{$value[id]}">
                	<dd class="d"><div class="title"><span>{$value[replaytitle]}</span>&nbsp;-&nbsp;<a href="apps.php?&q=user&u={$value[replayuid]}" class="mr5 w">{$value[replayusername]}</a><span class="s6 w">{$value[replaypoastdate]}</span></div></dd>
                </dl>
<!--
EOT;
if($value[c_num]>1)
{print <<<EOT
-->
                <dl class="cc">
                	<dd class="d"><a id="com_$value[id]" href="javascript:;" class="s6" onclick="PW_Comment.showCommList('groupwrite','$value[id]',getObj('a_write_{$value[id]}'));return false;">全部{$value[c_num]}条回复&raquo;</a></dd>
                </dl>
<!--
EOT;
}else{
print <<<EOT
-->
                <dl class="cc">
                	<dd class="d"><a id="com_$value[id]" href="javascript:;" class="s6" onclick="PW_Comment.showCommList('groupwrite','$value[id]',getObj('a_write_{$value[id]}'));return false;">添加回复&raquo;</a></dd>
                </dl>
<!--
EOT;
}print <<<EOT
-->
				</div>
<!--
EOT;
}print <<<EOT
-->
			</div>
			</dd>
		</dl>
<!--
EOT;
$i++;
}}print <<<EOT
-->
	</div>
	<div>$pages</div>
<script type="text/javascript" src="js/app_comment.js"></script>
<script>
function showshow(id)
{
	if(document.getElementById('commentreplay_'+id))
	{
		if(document.getElementById('commentreplay_'+id).style.display=="block"||document.getElementById('commentreplay_'+id).style.display=="")
		{
			document.getElementById('commentreplay_'+id).style.display="none";
			document.getElementById('com_'+id).style.display ="none";
		}else if(document.getElementById('commentreplay_'+id).style.display=="none")
		{
			document.getElementById('commentreplay_'+id).style.display="block";
			document.getElementById('com_'+id).style.display ="block";
		}
	}
}

function delload(){
	var objTrs = getElementsByClassName('dl cc',getObj('writebox'));
	for (var i=0;i<objTrs.length ; i++ ){
		var stamp = objTrs[i].id.substr(0,6);
		if (stamp == 'write_'){
			objTrs[i].onmouseover = function (){
				var delObj = getElementsByClassName('adel wirte',this);
				//var delObj = this.getElementsByName('deldel');
				if(delObj.length>0){
					delObj[0].style.display='';
				}
			}
			//console.log(objTrs[i].onmouseover);
			objTrs[i].onmouseout = function (){
				var delObj = getElementsByClassName('adel wirte',this);
				//var delObj = this.getElementsByName('deldel');
				if(delObj.length>0){
					delObj[0].style.display='none';
				}
			}
		}
	}
}
window.onReady(delload);
</script>
    </div>
    </div>
<!--
EOT;
}print <<<EOT
-->
</div>
<div class="g_sidebarA fr">
<!--
EOT;
require_once PrintEot('m_colony_right');
print <<<EOT
-->
</div>
<!--
EOT;
} elseif ($a == 'active') {
	require_once PrintEot('m_active');
} elseif ($a == 'invite') {print <<<EOT
-->
<div class="cc p10 mt30">
        <div class="g_contentC fl">
            <div class="f14 b mb10">方法一：给好友发送电子邮件邀请</div>
            <form action="" method="post" id="inviteForm">
			<input type="hidden" name="step" value="1">
			<input type="hidden" name="type" value="$type">
			<input type="hidden" name="cyid" value="$cyid">
			<input type="hidden" name="id" value="$id">
            <p class="mb5">好友的电子邮箱</p>
            <p class="mb5"><textarea name="emails" id="emails" class="textareaA" onclick="grayChange(this)" >多个电子邮箱用逗号 (,) 或者换行分隔</textarea></p>
            <p id="emails_warning" class="maxlength-hint wrongTip" style="display: none;"></p>
            <div class="c mb20">&nbsp;</div>
            <p class="mb5">邀请附言</p>
            <p class="mb5"><textarea name="customdes" id="customdes_textarea" class="textareaA" onChange="changeEmailCustom(this.id);">$customdes</textarea></p>
            <p id="extra_warning" class="maxlength-hint wrongTip" style="display: none;"></p>
            <div class="c mb20">&nbsp;</div>
            <p class="mb5">预览</p>
            <div class="viewbox mb10">
                $emailContent
            </div>
			<span class="btn" style="margin:0;"><span><button type="submit" onfocus="blur();">邀请</button></span></span>
            </form>
        </div>
        <div class="fr g_sidebarC">
<script>
function grayChange(obj) {
	if (typeof(obj) == 'string') {
		obj = document.getElementById(obj);
	}
	if (obj.className == 'gray') {
		obj.className = '';
	}
	if (obj.value =='多个电子邮箱用逗号 (,) 或者换行分隔') {
		obj.value = '';
	}
}
function copyUrl2(o) {
	if (is_ie) {
		if(window.clipboardData.setData("Text",o)){
			showDialog('success','已成功复制',1);
		}
	} else {
		prompt('按下 Ctrl+C 复制到剪贴板', o)
	}
}
function changeEmailCustom(id){
	var customdes = getObj(id).value;
	customdes = customdes.replace(/\\n/ig,'<br />');
	getObj('customdes').innerHTML = customdes;
}
</script>
			<div class="f14 b mb10">方法二：发送网址邀请</div>
            	<p class="mb5">把下面的网址通过MSN、QQ发给好友，邀请他们加入{$objectName}</p>
                <p class="viewbox mb5"><a href="$invite_url">$invite_url</a></p>
                <p><a onclick="copyUrl2('{$invite_url}')" href="javascript:;">复制</a></p>
                <div class="c mb20">&nbsp;</div>
            <div class="f14 b mb20">方法三：邀请站内好友</div>
<form name="recommendFORM" method="post" action="apps.php?q=group&a=invite&id=$id" >
<input type="hidden" name="cyid" value="$cyid" />
<input type="hidden" name="step" value="2" />
<input type="hidden" name="type" value="$type">
<table width="100%" cellspacing="0">
	<tr class="vt">
		<td width="60">用户名</td>
		<td><div class="selector">
            <span class="toggle" onClick="if (getObj('tofriend').style.display=='none'){getObj('tofriend').style.display='';}else{getObj('tofriend').style.display='none';}" style="cursor:pointer;"></span>
            <div class="tokenList fl"><input type="text" name="sendtoname" size="25" value="" /></div>
<!--
EOT;
if ($frienddb) {
print <<<EOT
-->
            </div>
<!--
EOT;
}print <<<EOT
-->
		</td>
	</tr>
	<tr id="tofriend" style="display:none">
		<td align="center">好友选择:</td>
		<td>
			<div class="fri-list pr mb10">
			<div class="fri-top">
				<span class="fr">
					<select name="friendtype" onchange="showFriendList(this.value);">
					<option value="-1">全部好友</option>
<!--
EOT;
foreach ($friendtype as $key => $value) {
print <<<EOT
-->
					<option value="$key">$value[name]</option>
<!--
EOT;
}print <<<EOT
-->
					</select>
				</span>
				<span class="bt2"><span><button type="button" onclick="CheckAll(this.form)">全选</button></span></span>
			</div>
			<div class="fri-bot" id="friendlist">
				<ul class="list-wid cc listC">
<!--
EOT;
foreach ($friendtype as $key => $value) {
print <<<EOT
-->
					<div id="ftid_$value[ftid]">
<!--
EOT;
foreach ($frienddb[$value[ftid]] as $k => $v) {
print <<<EOT
-->
					<li><input type="checkbox" name="touid[]" value="$v[uid]"> $v[username]</li>
<!--
EOT;
		}
print <<<EOT
-->
					</div>
<!--
EOT;
	}
print <<<EOT
-->
				 </ul>
			</div>
			</div>
		</td>
	</tr>
    <tr>
			<td align="center">&nbsp;</td>
       <td class="pt7 vt"><span class="btn2" style="margin:10px 0 0;"><span><button type="submit" onfocus="blur();">邀请</button></span></span></td>
    </tr>
</table>
</form>
</div>
	<div class="c mb20">&nbsp;</div>
</div>
<script type="text/javascript" src="js/core/friendlist.js"></script>
<!--
EOT;
} elseif ($a == 'read') {print <<<EOT
-->
<div class="g_navB mb10">
	<a href="apps.php?q=group&a=thread&cyid=$cyid" class="fr">返回{$groupRight[modeset][thread][title]}列表</a>
</div>
<!--
EOT;
if($newColony->getManageCheck($ifbbsadmin,$ifcolonyadmin)){print<<<EOT
-->
<div class="g_talkbox g_bgB mb10">
	<div class="cc p10">
<!--
EOT;
if($newColony->right['topicadmin']['toptopic'] && $ifcolonyadmin || $ifbbsadmin) {print<<<EOT
-->
	<a href="apps.php?q=topicadmin&action=toptopic&cyid=$cyid&seltid=$tid" class="g_bta fl">置顶</a>
<!--
EOT;
}if($newColony->right['topicadmin']['digest'] && $ifcolonyadmin || $ifbbsadmin){print<<<EOT
-->
	<a href="apps.php?q=topicadmin&action=digest&cyid=$cyid&seltid=$tid" class="g_bta fl">精华</a>
<!--
EOT;
}if($newColony->right['topicadmin']['lock'] && $ifcolonyadmin || $ifbbsadmin){print<<<EOT
-->
	<a href="apps.php?q=topicadmin&action=lock&cyid=$cyid&seltid=$tid" class="g_bta fl">锁定</a>
<!--
EOT;
}if($newColony->right['topicadmin']['pushtopic'] && $ifcolonyadmin || $ifbbsadmin){print<<<EOT
-->
	<a href="apps.php?q=topicadmin&action=pushtopic&cyid=$cyid&seltid=$tid" class="g_bta fl">提前</a>
<!--
EOT;
}if($newColony->right['topicadmin']['downtopic'] && $ifcolonyadmin || $ifbbsadmin){print<<<EOT
-->
	<a href="apps.php?q=topicadmin&action=downtopic&cyid=$cyid&seltid=$tid" class="g_bta fl">压帖</a>
<!--
EOT;
}if($newColony->right['topicadmin']['highlight'] && $ifcolonyadmin || $ifbbsadmin){print<<<EOT
-->
	<a href="apps.php?q=topicadmin&action=highlight&cyid=$cyid&seltid=$tid" class="g_bta fl">加亮</a>
<!--
EOT;
}if($newColony->right['topicadmin']['del'] && $ifcolonyadmin || $ifbbsadmin){print<<<EOT
-->
	<a href="apps.php?q=topicadmin&action=del&cyid=$cyid&seltid=$tid" class="g_bta fl">删除</a>
<!--
EOT;
}print<<<EOT
-->
	</div>
</div>
<!--
EOT;
}print<<<EOT
-->
<div class="g_bgB">
<table width="100%" style="table-layout:fixed">
    <tr>
        <td width="150"></td>
        <td height="10" class="g_bgA p10"><div class="read_num"><div><em>$replies</em>人回复</div><div class="one"><em>$hits</em>人阅读</div></div>
            <span class="fr"><span class="bt"><span><button onclick="location.href='apps.php?q=group&a=reply&cyid=$cyid&tid=$tid'">回复</button></span></span><span class="btn"><span><button onclick="location.href='apps.php?q=group&a=post&cyid=$cyid'">发布话题</button></span></span></span>$pages</td>
    </tr>
</table>
<!--
EOT;
foreach ($readdb as $key => $read) {print <<<EOT
-->
<a name="$read[pid]"></a>
<div id="article_{$read[pid]}">
    <table width="100%" class="floot">
        <tr class="vt">
            <td rowspan="2" class="floot_left">
                <div class="p10">
									<p class="gName mb5 cc">
<!--
EOT;
if($db_showonline){
$gender = getDefaultGender($read['gender']);
if(checkOnline($read['thisvisit'])){print <<<EOT
-->
					<span class="{$gender}_ol mr5" title="在线" alt="在线">在线</span>
<!--
EOT;
}else{print <<<EOT
-->
					<span class="{$gender}_unol mr5" title="离线" alt="离线">离线</span>
<!--
EOT;
}}print <<<EOT
-->
                  <a href="{$db_userurl}$read[authorid]" target="_blank">$read[author]</a>
								</p>
                <p class="mb5"><a href="{$db_userurl}$read[authorid]" class="gFace" target="_blank"><img src="$read[icon]" width="120" height="120" /></a></p>
                </div>
            </td>
            <td class="floot_right">
                <div class="floot_top">

                    <span class="mr20"><a href="javascript:;" class="s2 b" onclick="copyUrl('$db_bbsurl/apps.php?q=group&a=read&cyid=$cyid&tid=$tid&page=$page#$read[pid]')" title="复制此楼地址"><!--
EOT;
if ($read['lou'] == 0) {print <<<EOT
-->
							楼主
<!--
EOT;
} else {print <<<EOT
-->
							$read[lou]楼
<!--
EOT;
}print <<<EOT
--></a> 发表于{$read[postdate]}</span>
					<span title="$read[ip]" class="mr20">
<!--
EOT;
if ($read['ipfrom'] && empty($read['ip'])){print <<<EOT
-->
						来自: $read[ipfrom]
<!--
EOT;
} elseif ($read['ipfrom'] && $read['ip']){print <<<EOT
-->
						<span title="$read[ip]">来自: $read[ipfrom]</span>
<!--
EOT;
} elseif ($read['ip']) {print <<<EOT
-->
						$read[ip]
<!--
EOT;
}print <<<EOT
-->
                     </span>


<!--
EOT;
if ($ifadmin || $read['authorid'] == $winduid) {print <<<EOT
-->
<a href="javascript:;" id="edit_{$read[pid]}" onclick="sendmsg('{$basename}a=ajaxedit&tid=$read[tid]&pid={$read[pid]}&cyid=$cyid&article=$read[lou]','',this.id);">编辑</a>
<!--
EOT;
}print <<<EOT
-->
                </div>
<style type="text/css">
.tp_img img{max-width:700px;}
</style>
                <div class="p15 tp_img" style="overflow:hidden;">
<!--
EOT;
if ($read[subject]) {print <<<EOT
-->
                    <h1 class="mb10" id="subject_{$read[pid]}">{$read[subject]}</h1>
<!--
EOT;
}print <<<EOT
-->
                    <div class="tp_content" id="read_{$read[pid]}">$read[content]</div>
<!--
EOT;
if($read['pic']){
foreach($read['pic'] as $pic){
if($pic){print <<<EOT
-->
						<div id="att_$pic[aid]">
<!--
EOT;
if($pic['descrip']){print <<<EOT
-->
							描述:$pic[descrip]<br />
<!--
EOT;
}print <<<EOT
-->
							图片: $pic[img]
<!--
EOT;
if($pic['dfadmin']){print <<<EOT
-->
							[<a style="cursor:pointer" onclick="delatt('$read[pid]','$pic[aid]');">删除</a>]
<!--
EOT;
}print <<<EOT
-->
						</div>
<!--
EOT;
}}}print <<<EOT
-->
<!--
EOT;
if($read['aid'] && $read['ifhide']>0){print <<<EOT
-->
					<blockquote class="blockquote fl mb10">附件设置隐藏，需要回复后才能看到</blockquote>
					<div class="c"></div>
<!--
EOT;
}if($read['picurl']){
foreach($read['picurl'] as $k => $picture){
if($picture){print <<<EOT
-->
					<div class="mb10" id="att_$k">远程图片:<a href="job.php?action=showimg&tid={$tid}&pid={$read[pid]}&fid={$fid}&aid={$k}&verify={$picture[verify]}" target="_blank">$picture[name]</a>
<!--
EOT;
if($picture['dfadmin']){print <<<EOT
-->
						[<a style="cursor:pointer" onclick="delatt('$read[pid]','$k');">删除</a>]
<!--
EOT;
}print <<<EOT
-->
					</div>
<!--
EOT;
}}}if($read['downattach']){
foreach($read['downattach'] as $attach){
if($attach){print <<<EOT
-->
					<div class="mb10" id="att_$attach[aid]">
<!--
EOT;
if($attach['descrip']){print <<<EOT
-->
						描述:$attach[descrip]<br />
<!--
EOT;
}$att_id = $db_attfg ? "id=\"fg_$attach[aid]\"" : '';print <<<EOT
-->
						附件: <img src="$imgpath/$stylepath/file/$attach[type].gif" align="absmiddle" /> <a $att_id href="job.php?action=download&aid=$attach[aid]" onclick="return ajaxurl(this, '&check=1')"> <font color="red">$attach[name]</font></a> ($attach[size] K) 下载次数:$attach[hits]
<!--
EOT;
if ($attach['needrvrc']) {
$at_lang = $attach['special'] == 2 ? '售价' : '需要';
print <<<EOT
-->
						{$at_lang}:{$attach[needrvrc]}{$attach[cname]}
<!--
EOT;
}elseif(in_array($attach['ext'],array('mp3','wma','wmv','rm','swf'))){print <<<EOT
-->
						[<a style="cursor:pointer" onclick="playatt('$attach[aid]');">试播</a>]
<!--
EOT;
}if($attach['dfadmin']){print <<<EOT
-->
						[<a style="cursor:pointer" onclick="delatt('$read[pid]','$attach[aid]');">删除</a>]
<!--
EOT;
}print <<<EOT
-->
					</div>
<!--
EOT;
}}}if($db_iftag && $read['tag']){print <<<EOT
-->
					<div class="tal gray" style="margin:10px 15px 0 0;">关键词: {$read[tag]}</div>
<!--
EOT;
}print <<<EOT
-->
                </div>

            </td>
        </tr>
        <tr>
            <td class="flootC">
                <div class="floot_bottom">
                    <span class="fr">
<!--
EOT;
if ($ifadmin || $_G['allowdelatc'] && $winduid == $read['authorid']) {
if($read['pid'] == 'tpc'){print <<<EOT
--><a href="apps.php?q=topicadmin&action=del&cyid=$cyid&seltid=$read[tid]" id="del_{$read[pid]}" class="mr10">删除</a><!--
EOT;
}else{print <<<EOT
-->
<a href="javascript:;" id="del_{$read[pid]}" onclick="sendmsg('{$basename}a=del&cyid=$cyid&tid=$read[tid]&pid={$read[pid]}','',this.id);">删除 </a><!--
EOT;
}}if($_G['allowreport']){print <<<EOT
--><a href="javascript:;" onclick="sendmsg('pw_ajax.php?action=report&type=grouptopic&tid=$tid&pid={$read[pid]}','',this.id);" id="report_grouptopic_{$read[pid]}" class="mr10">举报</a><!--
EOT;
}print <<<EOT
--></span>
<!--
EOT;
if($ifadmin || $readdb[0][locked]%3 != 1){
if ($read['lou']==0) {print <<<EOT
-->
   <a href="javascript:" onclick="grouppostreply('回 楼主($read[anonymousname]) 的帖子');" class="mr10">回复</a>
<!--
EOT;
} else {print <<<EOT
-->
   <a href="javascript:" onclick="grouppostreply('回 $read[lou]楼($read[author]) 的帖子');" class="mr10">回复</a>
<!--
EOT;
}print <<<EOT
-->
   <a href="{$basename}a=reply&tid=$read[tid]&cyid=$cyid&pid=$read[pid]&article=$read[lou]" class="mr10">引用</a>
<!--
EOT;
}if ($read['lou'] == 0) {print <<<EOT
-->
   <a href="operate.php?action=toweibo&ajax=1&type=topic&id=$tid&cyid=$cyid" onclick="return ajaxurl(this)" class="mr10">新鲜事</a>
<!--
EOT;
} else {print <<<EOT
-->
   <a href="operate.php?action=toweibo&ajax=1&type=reply&id=$read[pid]&tid=$tid&cyid=$cyid" onclick="return ajaxurl(this)" class="mr10">新鲜事</a>
<!--
EOT;
}print <<<EOT
-->
   <!-- <a href="#" class="mr10">收藏</a> -->
                </div>
            </td>
        </tr>
    </table>
    <table width="100%" style="table-layout:fixed">
    	<tr>
        	<td width="150"></td>
            <td height="10" class="g_bgA"></td>
        </tr>
    </table>
</div>
<!--
EOT;
}print <<<EOT
-->
    <table width="100%" style="table-layout:fixed">
    	<tr>
        	<td width="150"></td>
            <td height="10" class="g_bgA" style="padding:0 10px 10px 10px;"><span class="fr"><span class="bt"><span><button onclick="window.location='apps.php?q=group&a=reply&cyid=$cyid&tid=$tid'">回复</button></span></span><span class="btn"><span><button onclick="location.href='apps.php?q=group&a=post&cyid=$cyid'">发布话题</button></span></span></span>$pages</td>
        </tr>
    </table>
</div>
<div class="mb10">
<!--
EOT;
if($ifadmin || $readdb[0][locked]%3 != 1){
	require_once PrintEot('m_fastpost');
}print <<<EOT
-->
</div>
<div id="menu_show" style="display:none;"></div>
<script>
var charset = '$db_charset';
var db_bbsurl = '$db_bbsurl';
var db_urlcheck = '$db_urlcheck';
var imgpath   = '$imgpath';
var stylepath = '$stylepath';
var totalpage = 0;
var tid = '$tid';
var fid = '$colony[classid]';
function addsmile(NewCode){
	getObj('textarea').value += ' [s:'+NewCode+'] ';
}
function grouppostreply(txt) {
	if (typeof document.FORM != "undefined") {
		document.FORM.atc_title.value = txt;
		if (txt.match(/\((.+?)\)/ig)) {
			if (document.FORM.replytouser) document.FORM.replytouser.value = RegExp.$1;
		}
		document.FORM.atc_content.focus();
	} else {
		window.location = 'post.php?action=reply&fid='+fid+'&tid='+tid;
	}
}
window.onReady(function(){
	//控制多媒体播放
	var videos=getElementsByClassName("video");
	for(var i=0,len=videos.length;i<len;i++){
(function(elem){
toggleVideo(elem);
})(videos[i])
	}
});
</script>
<script src="$db_htmdir/js/face.js"></script>
<script type="text/javascript" src="js/pw_lwd.js"></script>
<div id="menu_face" class="menu" style="display:none;"></div>
<!--
EOT;
} elseif ($a == 'post' || $a == 'reply' || $a == 'edit') {print <<<EOT
-->
<style type="text/css">
.w_title_ip,.menu_select div,.menu_select .hover{border:1px solid;border-color:#aaa #ddd #ddd #aaa;}
/*标题栏*/
.w_title_ip{float:left;height:25px;line-height:25px;}
.w_title_ip input{width:340px;float:left;border:0;background:#fff;padding:0 5px;font:14px Arial;vertical-align:middle;margin-top:5px;}
.w_title_ip i{float:left;margin:3px 2px 0;}
.w_input_text{font-style:normal;line-height:18px;padding:0 4px;color:#fff;margin-left:10px; position:absolute;right:-1px;bottom:25px;background:#ff0000;}
.w_editor_up{background-color:#f8f8f8;padding:5px;}
.w_editor_up td{padding:2px 0 2px 10px;}
.w_editor_up .w_tab_a{padding-left:10px;position:absolute;}
.w_editor_up .w_tab_a li{float:left;margin-right:5px;color:#666;}
.w_editor_up .w_tab_a li a{float:left;display:block;line-height:22px;padding:0 15px;border:1px solid #ddd;color:#666;background-color:#fbf9fa;}
.w_editor_up .w_tab_a li a:hover{background-color:#fff;text-decoration:none;}
.w_editor_up .w_tab_a .none_css a{border:none;background-color:none;line-height:18px;margin-top:2px;}
.w_editor_up .w_tab_a .none_css a:hover{background-color:#f8f8f8;color:#3366cc;}
.w_editor_up .w_tab_a .none_css .wy_tips:hover{color:#666;}
.wy_tips{background:url($imgpath/post/c_editor/w_edit_but.png) right center no-repeat;float:left;}
.wy_tips i{display:none;}
.wy_tips:hover{color:#333;_position:relative;text-decoration:none;}
.wy_tips:hover i{display:block; position:absolute;border:1px solid #f8ad48;background:#fffeed;padding:2px 5px;color:#333;font-style:normal;line-height:130%;word-break:keep-all;word-wrap:no-wrap;}
.w_editor_up .w_tab_a .current a{background:#fff;border-bottom:none;color:#333;padding-bottom:1px;}
.w_editor_up_con{background-color:#ffffff;padding:10px;border-top:1px solid #ddd;}
/*链接按钮*/
.bta{cursor:pointer;color:#333333;padding:0 8px;margin:0 3px;white-space:nowrap;border:1px solid #d5e6ed;line-height:22px;background:#ffffff;}
.bta:hover{border:1px solid #a6cbe7;text-decoration:none;}
</style>
<script type="text/javascript" src="js/swfobject.js"></script>
<div class="r_content">
  <div>
    <div class="c"></div>
<!--
EOT;
if ($a == 'post' || $a == 'edit') {print <<<EOT
-->
    <div class="g_navB mb10">
      <h5><a href="apps.php?q=group&a=thread&cyid=$cyid" class="fr">返回{$groupRight[modeset][thread][title]}列表</a>发表新话题</h5>
     </div>
<!--
EOT;
} else {print <<<EOT
-->
<div class="g_navB mb10">
      <h5><a href="apps.php?q=group&a=thread&cyid=$cyid" class="fr">返回{$groupRight[modeset][thread][title]}列表</a>发表回复</h5>
     </div>
<!--
EOT;
}
//max attachnum
$uploadedNum = $winddb['uploadtime'] < $tdtime ? 0 : $winddb['uploadnum'];
if ($_G['allownum'] > 0 && $_G['allownum'] - $uploadedNum<$db_attachnum){
	$maxAttachnum = $_G['allownum'] - $uploadedNum;
} else {
	$maxAttachnum = $db_attachnum;
}
if ($isGM || ($db_allowupload && $_G['allowupload'] && (!$_G['allownum'] || $winddb['uploadnum'] < $_G['allownum'])) || $attach) {print <<<EOT
-->
<table cellPadding="0" cellSpacing="0" style="display:none" width="100%">
	<tbody id="att_mode"><tr>
		<td class="review_bg"><input class="input" type="file" name="attachment_" style="width:200px;overflow:hidden;"/></td><td><input class="input" type="text" name="atc_desc" size="25" /></td>
		<td style="display:none;"><select name="att_special" onchange="newAtt.sel(this);" style="width:60px;"><option value="0"></option><option value="1">加密</option><option value="2">出售</option></select></td>
		<td style="display:none;"><select name="att_ctype" style="width:60px;">{$alltype}</select></td>
		<td style="display:none;"><input class="input" type="text" name="atc_needrvrc" value="0" size="1" /></td>
		<td></td></tr>
	</tbody>
</table>
<script>
var allowmutinum = parseInt('$maxAttachnum');
var allow_ext = '$uploadfiletype';
var allow_size = '$uploadfilesize';
var attachnum = parseInt('$db_attachnum');
</script>
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript" src="js/upload.js"></script>
<script>
var icontab=0;
function show_icontab() {
	if (icontab <= 0) {
		getObj('icontab').style.display = '';
		icontab = 1;
	} else {
		getObj('icontab').style.display = 'none';
		icontab = 0;
	}
}
function seticonid(iconid,iconurl) {
	getObj('atc_iconid').value=iconid;
	getObj('icontab').style.display='none';
	icontab = -1;
	getObj('icon_button').innerHTML = '<img align="absmiddle" src="$imgpath/post/emotion/'+iconurl+'" />';
}
</script>
<!--
EOT;
}print <<<EOT
-->
<form action="{$basename}a=$a&cyid=$cyid" method="post" enctype="multipart/form-data" onsubmit="return checkpost(document.FORM);" name="FORM" id="FORM">
<!--
EOT;
$icondb = array(
		'1'=>'1.gif',	'2'=>'2.gif',
		'3'=>'3.gif',	'4'=>'4.gif',
		'5'=>'5.gif',	'6'=>'6.gif',
		'7'=>'7.gif',	'8'=>'8.gif'
	);
print <<<EOT
-->
			<input type="hidden" name="step" value="3" />
			<input type="hidden" name="tid" value="$tid" />
			<input type="hidden" name="pid" value="$pid" />
			<input type="hidden" name="article" value="$article" />
			<input type="hidden" name="verify" value="$verifyhash" />
			<input type="hidden" value="1" name="atc_convert" />
			<input type="hidden" name="ajax" value="1" />
			<input type="hidden" name="iscontinue" value="0" />

            <div class="w_title_ip mr10"><input type="text" name="atc_title" id="atc_title" value="$atc_title" size="60" title="请输入标题" />
			</div><span id="atc_title_warn" class="gray mt10">限 {$db_titlemax} 字节</span>
            <div class="c mb10">&nbsp;</div>
			<table cellpadding="0" cellspacing="0" width="100%" class="mb10">
				<tr class="tr6 vt">
					<td colspan="2">
						<div id="menu_face" class="menu" style="display:none;"></div>
<!--
EOT;
require_once PrintEot('wysiwyg_editor');
print <<<EOT
-->
					</td>
				</tr>
			</table>
<!--
EOT;
if($db_iftag && ($a == 'post' || $a == 'edit')) {
$tags == '' && $tags = '标签之间空格隔开，最多可填写5个';
print <<<EOT
-->
            <div class="cc mb10">
                <script type="text/javascript" src="js/pw_tags.js"></script>
                <div><input id="atc_tags" class="input gray fl mr5" name="atc_tags" size="40" value="$tags" tabindex="3" autocomplete="off" onfocus="tag.init();document.getElementById('atc_tags').value='';" /><span class="bt2 fl"><span><button type="button" onclick="tag.get()">提取标签</button></span></span>
                <a onclick="return false;" href="javascript:;" class="wy_tips" style="padding-right:14px;margin:3px 0 0 10px;">&nbsp;什么是标签<i style="width:200px;">标签是您给您的文章指定的关键字，设置适当的标签能便于他人快速的找到您的文章，最多可填写5个，每个3-15字节</i></a></div>
                <div class="c"></div>
                <fieldset id="tagmenu" style="border:1px solid #ccc;width:500px;padding:3px;margin:2px 0;display:none;"><legend>热门标签</legend><div style="height:80px;overflow-Y:auto;"></div></fieldset>
            </div>
<!--
EOT;
}if ($o_groups_p_gdcheck || $o_groups_p_qcheck) {print <<<EOT
-->
            <div class="cc mb10">
<!--
EOT;
if($o_groups_p_gdcheck){
$checkCode = L::loadClass('checkcode', 'site');
$checkCodeString = $checkCode->getCheckCodeTemplate();
print <<<EOT
-->
<input class="input mr10" type="text" name="gdcode" size="8" tabindex="2" onfocus="showgd();" />
<span class="cp" onclick="showgd();">点击刷新验证码</span>
<div id="ckcode" style="display:none"></div>
$checkCodeString
<!--
EOT;
}if($db_question && $o_groups_p_qcheck){
$qkey = array_rand($db_question);
if($db_imagequestion){
	$question = sprintf('<img src="ckquestion.php?q=%s">',$qkey);
}else{
	$question = $qkey<0 ? getMachineQuestion_1() :  $db_question[$qkey];
}
$q_a = $question.($showq && $qkey>0?" （答案：".$db_answer[$qkey] . '）' : '');
print <<<EOT
-->
验证问题:{$q_a}&nbsp;&nbsp;<input class="input" type="text" name="qanswer" />
<input type="hidden" name="qkey" value="$qkey" />
<!--
EOT;
}print <<<EOT
-->
            </div>
<!--
EOT;
}print <<<EOT
-->
            <div class="mb20">
                <span class="btn"><span><button name="Submit" type="submit">发 布</button></span></span>&nbsp;
	  			<span class="bt"><span><button type="button" onclick="gopreview();">预 览</button></span></span>&nbsp;
                <span class="bt"><span><button type="button" onclick="savedraft()">存为草稿</button></span></span>
            </div>
            <div class="c"></div>
			<div id="divload"></div>
			</form>
		</div>
</div>
<script>var stylepath = 'wind';</script>
<form name="preview" action="job.php?action=preview" method="post" target="preview_page">
	<input type="hidden" name="atc_content" value="" />
	<input type="hidden" name="pcinfo" value="" />
	<input type="hidden" name="pcid" value="$pcid" />
	<input type="hidden" name="modelid" value="$modelid" />
</form>
<script>
function gopreview() {
	editor.save();
	document.preview.atc_content.value=document.FORM.atc_content.value;
	var elements = document.FORM.elements;
	var pcinfo = '';
	for (var i = 0,len = elements.length; i < len; i++) {
		if (elements[i].type == 'radio' || elements[i].type == 'checkbox') {
			if (elements[i].checked == true) {
				pcinfo += elements[i].name + '(|)' + elements[i].value + '(|)' + elements[i].id + '{|}';
			}
		} else {
			pcinfo += elements[i].name + '(|)' + elements[i].value + '(|)' + elements[i].id + '{|}';
		}

	}
	document.preview.pcinfo.value=pcinfo;
	document.preview.submit();
}
var cnt  = 0;
document.FORM.Submit.disabled = false;
function checkpost(obj) {
	if (obj.atc_title.value == "") {
		showDialog("error","话题<span class='s1'>标题</span>不能为空",2);
		obj.atc_title.focus();
		return false;
	} else if (strlen(obj.atc_title.value) > $db_titlemax) {
		showDialog("error","话题<span class='s1'>标题</span>不能大于 <span class='s1'>$db_titlemax </span>个字节",2);
		obj.atc_title.focus();
		return false;
	}
	if (strlen(obj.atc_content.value) < $db_postmin) {
		showDialog("error","话题<span class='s1'>内容</span>不能少于 <span class='s1'>$db_postmin </span>个字节",2);
		editor.focus();
		return false;
	} else if (strlen(obj.atc_content.value) > $db_postmax) {
		showDialog("error","话题<span class='s1'>内容</span>不能大于 $db_postmax 个字节",2);
		editor.focus();
		return false;
	}
	if (IsElement('atc_tags') && obj.atc_tags.value == '标签之间空格隔开，最多可填写5个') {
		obj.atc_tags.value='';
	}

	SubmitAjax(obj);
	return false;
}

//ajax提交数据 
function SubmitAjax(obj) {
	document.FORM.Submit.disabled = true;
	getObj('divload').innerHTML = showLoading();
	cnt++;
	ajax.send("{$basename}a=$a&cyid=$cyid", obj, function(){
		if(undefined == ajax.request.responseText){
			showDialog({
				type: 'error',
				message: '请求超时!'
			});
			document.FORM.Submit.disabled = false;
			getObj('divload').innerHTML = "";
			return false;
		}
		var rText = ajax.request.responseText.split('\t');
		if (rText[0] == 'success') {
			window.onbeforeunload = function(){};
			window.location =  rText[1];
	    }else if(rText[0] == 'continue'){ //敏感词
			 showDialog({type:'confirm',message:rText[1],okText:'继续',onOk:function(){
				obj.iscontinue.value = 1;
				SubmitAjax(obj);
			 }});
		} else {
			showDialog('error', rText[0]);
		}
		cnt = 0;
		document.FORM.Submit.disabled = false;
		getObj('divload').innerHTML = "";
		return false;
	});
}
function showLoading(){
	return "<div id=\"loading\" style=\"padding:20px;width:80%;text-align:center\"><img src=\""+imgpath+"/loading.gif\" align=\"absbottom\" alt=\"loading\" /> 正在加载数据...</div>";
}
initCheckTextNum('atc_title','atc_title_warn','$db_titlemax');
</script>
<script type="text/javascript" src="js/post.js"></script>
<script>
var dataStorage = {
	save : function() {
		if (PwStorage.save('msg', editor._editMode == 'textmode' ? editor.getHTML() : htmltocode(editor.getHTML()))) {
			PwStorage.save('title', document.FORM.atc_title.value, 1);
			SetCookie('ds', 1);
			return true;
		}
		return false;
	},
	load : function() {
		document.FORM.atc_title.value = PwStorage.load('title') || '';
		setEditorContent(PwStorage.load('msg'));
		SetCookie('ds', 0);
	}
}
if (FetchCookie('ds') == 1) {
	try{dataStorage.load();}catch(e){}
}
</script>
    </div>
  </div>
<!--
EOT;
} elseif ($a == 'member') {print <<<EOT
-->
	<div class="g_navB mb10">
<!--
EOT;
if (empty($group) || $group != 4) {print <<<EOT
-->
		<span class="fr">排序方式：
			<a href="{$basename}a=$a&cyid=$cyid{$urladd}&orderby=lastvisit"{$order_lastvisit}>最近登录</a>
			| <a href="{$basename}a=$a&cyid=$cyid{$urladd}&orderby=lastpost"{$order_lastpost}>最后发表</a>
		</span>
<!--
EOT;
}print<<<EOT
-->
		<span class="mr20">共{$total}名成员</span>
	</div>
	<div class="g_contentA fl">
 <!--
EOT;
if (!$colony['ifmemberopen'] && !$ifadmin && (!$colony['ifcyer'] || $colony['ifadmin'] == '-1')) {print <<<EOT
-->
<p class="p15 mb20 tac f14">
你还没有加入本群组，<a onclick="sendmsg('apps.php?q=group&cyid=$cyid&a=join','',this.id);" id="joincolony2" href="javascript:;">申请加入</a>吧！
</p>
<!--
EOT;
}
if(empty($memdb)) {print<<<EOT
-->
		<p class="p15 mb20 tac f14">{$lang_no_member[$group]}</p>
<!--
EOT;
}else{
if($group != 4){print<<<EOT
-->
	<form action="{$basename}a=$a&cyid=$cyid" method="post" name="uForm">
<!--
EOT;
foreach ($memdb as $key => $value) {print <<<EOT
-->
            <table width="100%">
                <tr>
<!--
EOT;
if ($ifadmin){print <<<EOT
-->
					<td width="30">
<!--
EOT;
if ($value[uid] != $winduid){print <<<EOT
-->
					<input type="checkbox" name="selid[]" value="$value[uid]" />
<!--
EOT;
}print <<<EOT
-->
					</td>
<!--
EOT;
}print <<<EOT
-->
                    <td width="70">
                        <a href="{$db_userurl}$value[uid]" target="_blank" class="img_50"><img src="$value[icon]" width="48" height="48" /></a>
                    </td>
                    <td>
                        <p class="mb5 cc">
								<a href="{$db_userurl}$value[uid]" target="_blank" class="b f14 mr5 fl">
								$value[username]
<!--
EOT;
if ($value[realname]){print <<<EOT
-->
								($value[realname])
<!--
EOT;
}print <<<EOT
-->

								</a>
<!--
EOT;
if($db_showonline){
$gender = getDefaultGender($read['gender']);
if(checkOnline($read['thisvisit'])){print <<<EOT
-->
					<span class="{$gender}_ol mr5" title="在线" alt="在线">在线</span>
<!--
EOT;
}else{print <<<EOT
-->
					<span class="{$gender}_unol mr5" title="离线" alt="离线">离线</span>
<!--
EOT;
}}print <<<EOT
-->
						</p>

<!--
EOT;
if ($value['honor']) {print <<<EOT
-->
                        <p class="mb5"><span class="mr20">{$value['honor']}</span></p>
<!--
EOT;
}
if ($colony['admin'] == $value['username']) {print <<<EOT
-->
	<span class="s1 mr5">群主</span>
<!--
EOT;
} elseif ($value['ifadmin'] == '1') {print <<<EOT
-->
	<span class="s2 mr5">管理员</span>
<!--
EOT;
} elseif ($value['ifadmin'] == '-1') {print <<<EOT
-->
	<span class="gray mr5">未验证</span>
<!--
EOT;
} else {print <<<EOT
-->
	<span class="mr5 s3">群员</span>
<!--
EOT;
}
if ($value[lastpost]) {
$time2 = get_date($value[lastpost]);
print <<<EOT
-->
最后发表:{$time2}
<!--
EOT;
}print <<<EOT
-->

                    </td>
                    <td width="20">&nbsp;</td>
                    <td width="70">
                        <p class="mb5"><a href="apps.php?q=group&cyid=$cyid&a=uintro&uid=$value[uid]" onclick="return ajaxurl(this)" id="guser_{$value[uid]}">通讯录</a></p>
                        <p class="mb5"><a href="{$db_bbsurl}/pw_ajax.php?action=addfriend&touid=$value[uid]" onclick="return ajaxurl(this);">加为好友</a></p>
                        <p><a href="pw_ajax.php?action=msg&touid=$value[uid]" onclick="return ajaxurl(this);">发消息</a></p>
                    </td>
                </tr>
			</table>
            <div class="hrA"></div>
<!--
EOT;
}print <<<EOT
-->
			<div class="cc mb10">$pages</div>
<!--
EOT;
if ($ifadmin && $group != 4) {print <<<EOT
-->
			<label for="checkall_button"><input type="checkbox" id="checkall_button" onclick="CheckAll(this.form)"/>&nbsp;全选</label>
			<input type="hidden" name ="operateStep" id="operateStep" value="" />
<!--
EOT;
if ($_G['multiopen']) {
print <<<EOT
-->
			<span class="bt2"><span><button id="senndmsg" onclick="fanoutMsg();return false;">群发消息</button></span></span>
<script>
(function () {
	fanoutMsg = function() {
		var d = '';
		var f = document.uForm;
		var j = 0;
		for (var i = 0; i < f.elements.length - 2; i++) {
			var e = f.elements[i];
			if (e.type == 'checkbox' && e.name.match(/^selid/ig) && e.checked == true) {
				d += '&selid[' + j++ + ']=' + e.value;
			}
		}
		sendmsg('{$basename}a=fanoutmsg&cyid=$cyid&group=$group', d, 'senndmsg');
	}
})()
</script>
<!--
EOT;
}
if ($colony['admin'] == $windid || $groupid == 3) {print <<<EOT
-->
			<span class="bt2"><span><button type="submit" onclick="submitStep('addadmin');">设为管理员</button></span></span>
			<span class="bt2"><span><button type="submit" onclick="submitStep('deladmin');">取消管理员</button></span></span>
<!--
EOT;
}print <<<EOT
-->
			<span class="bt2"><span><button type="submit" onclick="submitStep('check');">审核会员</button></span></span>
			<span class="bt2"><span><button type="submit" onclick="submitStep('del');" >踢出本群</button></span></span>
<script>
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;
}
function submitStep(operateStep) {
	getObj('operateStep').value = operateStep;
}
</script>
<!--
EOT;
}print <<<EOT
-->
			<div class="c mb20"></div>
		</form>
<!--
EOT;
}else{print<<<EOT
-->
			<div class="ulB p10">
				<ul class="cc">
<!--
EOT;
foreach ($memdb as $key => $value) {
$visittime = get_date($value[lastvisit], 'm月d日');
print <<<EOT
-->
				<li><a href="{$db_userurl}$value[uid]" class="i" target="_blank" title="$value[username]"><img src="{$value[icon]}" height="44" width="44" /></a><p class="n"><a href="{$db_userurl}$value[uid]" title="$value[username]" target="_blank">$value[username]</a></p><p class="t">$visittime</p></li>
<!--
EOT;
}print<<<EOT
-->
				</ul>
			</div>
<!--
EOT;
}}print<<<EOT
-->
	</div>
    <div class="g_sidebarA fr">
        <div class="g_tA mb10">
            <h2 class="g_hB">筛选</h2>
            <div>
                <ul class="ulA">
                    <li id="group_all"><a href="{$basename}a=$a&cyid=$cyid">全部成员</a></li>
                    <li id="group_1"><a href="{$basename}a=$a&cyid=$cyid&group=1">管理员</a></li>
                    <li id="group_2"><a href="{$basename}a=$a&cyid=$cyid&group=2">普通成员</a></li>
                    <li id="group_3"><a href="{$basename}a=$a&cyid=$cyid&group=3">未验证会员</a></li>
                    <li id="group_4"><a href="{$basename}a=$a&cyid=$cyid&group=4">最近访客</a></li>
                </ul>
            </div>
        </div>
    </div>
<script>
setCurrent('group_{$group}','group_all','current');
</script>
<!--
EOT;
} elseif ($a == 'uintro') {print <<<EOT
-->
<div class="g_navB tar"><a href="apps.php?q=group&a=member&cyid=$cyid">返回成员列表</a></div>
		<div class="setpd">
        	<p class="g_hD mb10">编辑通讯录</p>
			<form action="{$basename}a=$a" method="post">
			<input type="hidden" name="step" value="3" />
			<input type="hidden" name="cyid" value="$cyid" />
			<table cellpadding="0" cellspacing="0" class="g_tableA vt">
					<tr>
							<td width="100">用户</td>
							<td>$uinfo[username]</td>
					</tr>
					<tr>
							<td>真实姓名</td>
							<td><input type="text" class="input" name="realname" value="$uinfo[realname]" /></td>
					</tr>
					<tr>
							<td>性别</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>电话</td>
							<td><input type="text" class="input" name="tel" value="$uinfo[tel]" /></td>
					</tr>
					<tr>
							<td>电子邮箱</td>
							<td><input type="text" class="input" name="email" value="$uinfo[email]" /></td>
					</tr>
					<tr>
							<td>联系地址</td>
							<td><input type="text" class="input" name="address" size="55" value="$uinfo[address]" /></td>
					</tr>
					<tr>
							<td>介绍说明</td>
							<td><textarea name="introduce" style="width:300px;height:80px">$uinfo[introduce]</textarea></td>
					</tr>
					<tr>
							<td></td>
							<td><span class="btn"><span><button type="submit">提 交</button></span></span></td>
					</tr>
			</table>
			</form>
		</div>
<!--
EOT;
} elseif ($a == 'set') {print <<<EOT
-->
<div class="g_navB gray">
	<a href="{$basename}a=set&cyid=$cyid#main" $basic id="set_default">基本信息</a>
<!--
EOT;
if ($groupRight['allowstyle']) {print <<<EOT
-->
	| <a href="{$basename}a=set&cyid=$cyid&t=style#main" $style id="set_style">风格主题</a>
<!--
EOT;
}print <<<EOT
-->
	| <a href="{$basename}a=set&cyid=$cyid&t=privacy#main" $privacy id="set_privacy">隐私设置</a>
<!--
EOT;
if ((1 == $SYSTEM['colonyright'] || $colony['admin'] == $windid) && $groupRight['allowmerge']) {print <<<EOT
-->
	| <a href="{$basename}a=set&cyid=$cyid&t=merge#main" $merge id="set_merge">合并群组</a>
<!--
EOT;
}if ((1 == $SYSTEM['colonyright'] || $colony['admin'] == $windid) && $groupRight['allowattorn']) {print <<<EOT
-->
	| <a href="{$basename}a=set&cyid=$cyid&t=attorn#main" $attorn id="set_attorn">转让群组</a>
<!--
EOT;
}if ((1 == $SYSTEM['colonyright'] || $colony['admin'] == $windid) && $groupRight['allowdisband']) {print <<<EOT
-->
	| <a href="{$basename}a=set&cyid=$cyid&t=disband#main" $disband id="set_disband">解散群组</a>
<!--
EOT;
}print <<<EOT
-->
</div>
<!--
EOT;
if (empty($t)) {print <<<EOT
-->
<style type="text/css">
	@import url($imgpath/post/minieitor/minieitor.css);
</style>
<script type="text/javascript" src="js/color_picker.js"></script>
<script type="text/javascript" src="js/mini_editor.js"></script>
<script type="text/javascript">
function pickReback(color){
	getObj('color_show').style.backgroundColor = color;
}
function styleOnclick(e,obj){
	var objclass = e.className;
	var temp = objclass.split(' ');
	var newclass = '';
	for (var n=0; n<temp.length; n++){
		if (temp[n]=='one') {
			continue;
		}
		newclass += ' ' + temp[n];
	}
	if (objclass.match(/one/)) {
		e.className = newclass;
		getObj(obj).value = '';
	} else {
		e.className = newclass + ' one';
		getObj(obj).value = 1;
	}
}
function colorCancel(){
	getObj('color_show').style.backgroundColor='#FFFFFF';
	getObj('title1').value='';
}
</script>
<div id="id1" class="setpd">
	<form action="{$basename}a=$a" enctype="multipart/form-data" method="post" name="FORM">
	<input type="hidden" name="step" value="3" />
	<input type="hidden" name="cyid" value="$cyid" />
	<p class="g_hD mb15">基本信息</p>
    <table width="70%" class="setTable vt">
        <tr>
            <th class="th">群组名称&nbsp;<span class="s1">*</span></th>
            <td class="td">
				<input type="text" class="input fl mr10 mb5" name="cname" id="cname" value="$colony[cname]" size="35" />
				<div class="pwnew tac fl">
					<span><a onclick="styleOnclick(this,'title2')" class="$stylename[1]">加粗</a></span>
					<span><a onclick="styleOnclick(this,'title3')" class="$stylename[2]">斜体</a></span>
					<span><a onclick="styleOnclick(this,'title4')" class="$stylename[3]">下划线</a></span>
					<span id="color_show" style="background:$titlecolor;cursor:pointer;" title="点击取消颜色" onclick="colorCancel()"></span>
					<span title="颜色选择"><a class="two tal" onclick="showColorPicker(this,document.FORM.title1,function(){pickReback(color_picker)})"><img src="$imgpath/pickcolor.gif"  /></a></span>
					<input id="title1" name="title1" type="hidden" value="$titlecolor" />
					<input id="title2" name="title2" type="hidden" value="{$titledetail[1]}" />
					<input id="title3" name="title3" type="hidden" value="{$titledetail[2]}" />
					<input id="title4" name="title4" type="hidden" value="{$titledetail[3]}" />
				</div>
				<div class="c"></div>
				<span id="cname_warn" class="gray">限 20 字节</span>
            </td>
        </tr>
        <tr>
            <th class="th">群组简介</th>
            <td class="td">
            	<div style="width:340px;" class="fl mr10">
                    <div class="minieitor_pw cc">
                        <ul class="miniUl">
                            <li><a href="javascript:" title="插入url链接" class="milink_pw" onClick="editor.createLinkBox(this.id);" id="createlinkid" unselectable="on">插入url链接</a></li>
                            <li><a href="javascript:" title="字体加粗" class="mistrong_pw" onClick="editor.bold();" id="createb2" unselectable="on">字体加粗</a></li>
                            <li><a href="javascript:" title="加颜色" class="micolor_pw" onClick="editor.createcolor(this.id);" id="createcolorid" unselectable="on">加颜色</a></li>
                        </ul>
                        <div class="minitextarea">
                            <textarea id="mini_descrip" name="descrip">{$colony[descrip]}</textarea><input type="hidden" id="board_uid" value="$u">
                            <script type="text/javascript">var editor = new MiniEditor('mini_descrip');</script>
                        <div class="c"></div>
                        </div>
                        <div class="c"></div>
                    </div>
                </div>
                <span class="gray" id="mini_descrip_warn">限 255 字节</span>
            </td>
        </tr>
        <tr>
            <th class="th">群组公告</th>
            <td class="td">
            	<div style="width:340px;" class="fl mr10">
                    <div class="minieitor_pw cc">
                        <ul class="miniUl">
                            <li><a href="javascript:" title="插入url链接" class="milink_pw" onClick="editor2.createLinkBox(this.id);" id="createlinkid2" unselectable="on">插入url链接</a></li>
                            <li><a href="javascript:" title="字体加粗" class="mistrong_pw" onClick="editor2.bold();" unselectable="on">字体加粗</a></li>
                            <li><a href="javascript:" title="加颜色" class="micolor_pw" onClick="editor2.createcolor(this.id);" unselectable="on" id="createcolorid2">加颜色</a></li>
                        </ul>
                        <div class="minitextarea">
                            <textarea id="editor_annouce" name="annouce">{$colony[annouce]}</textarea><input type="hidden" id="board_uid" value="$u">
                            <script type="text/javascript">var editor2 = new MiniEditor('editor_annouce');</script>
                        <div class="c"></div>
                        </div>
                        <div class="c"></div>
                    </div>
                </div>
                <span class="gray" id="editor_annouce_warn">限 50000 字节</span>
            </td>
        </tr>
       <tr>
            <th class="th">群组分类&nbsp;<span class="s1">*</span></th>
			<td class="td">
				<select name="firstgradestyle" id="firstgradestyle" onchange="setSecondstyle(this.value);">
				<option value="">不分类</option>
<!--
EOT;
foreach ($o_style_relation as $key => $value){print<<<EOT
-->
				<option value="$key">{$o_styledb[$key]['cname']}</option>
<!--
EOT;
}print<<<EOT
-->
			  </select>
			  <select name="secondgradestyle" id="secondgradestyle" style="display:none"></select>
            </td>
        </tr>
        <tr>
            <th class="th">群组图标</th>
            <td class="td"><input type="hidden" name="q_1" id="q_1" value="" />
            	<img width="48px" height="48px" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=image);" id="preview_1" src="$colony[cnimg]" class="fr" />
				<!--div id="preview_1" style="width:48px;height:48px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale);"></div-->
				<p class="mb5"><input type="file" class="input mr10" id="p_1" name="cnimg_1" accept="image/*" onchange="preview_img(1);" /><a href="javascript:void(0);" onclick="show_image('1','images/g/groupnopic.gif');" >使用默认图标</a></p>
                <p class="gray">推荐尺寸120px*120px，<a href="javascript:;" class="help_a"><span class="gray cp">可上传类型</span><i class="cc">
<!--
EOT;
foreach($cnimg_1 as $key => $value){print<<<EOT
-->
<span class="w fl mr10">{$key}:{$value}KB;</span>
<!--
EOT;
}print<<<EOT
--></i></a></p>
            </td>
        </tr>
        <tr>
            <th class="th">群组背景</th>
            <td class="td"><input type="hidden" name="q_2" id="q_2" value="" />
				<p class="mb5"><input type="file" class="input mr10" id="p_2" name="cnimg_2" accept="image/*" onchange="preview_img(2);" /><a href="javascript:void(0);" onclick="show_image('2','images/g/skin_default/preview.jpg');">使用默认背景</a></p>
                <p class="mb5"><a href="javascript:;" class="help_a"><span class="gray cp">可上传类型</span><i class="cc">
<!--
EOT;
foreach($cnimg_2 as $key => $value){print<<<EOT
-->
<span class="w fl mr10">{$key}:{$value}KB;</span>
<!--
EOT;
}print<<<EOT
--></i></a></p>
                <img width="355px" height="75px" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=image);" id="preview_2" src="{$set_banner}" />
            </td>
        </tr>
        <tr>
            <th class="th">&nbsp;</th>
            <td class="td"><span class="btn"><span><button type="submit">保存设置</button></span></span></td>
        </tr>
    </table>
	</form>
</div>
<script>
var charset = '$db_charset';
initCheckTextNum('cname','cname_warn',20);
initCheckTextNum('mini_descrip','mini_descrip_warn',255);
initCheckTextNum('editor_annouce','editor_annouce_warn',50000);

function show_image(id,pic_url) {
	getObj('q_' + id).value = 1;
	getObj('p_' + id).value = "";
	if(is_ie){
		getObj('p_' + id).outerHTML=getObj('p_' + id).outerHTML;
	}
	getObj("preview_" + id).src = pic_url;
}

function setSecondstyle(id) {
	var jsStyle = JSONParse('$jsStyle');
	var jsStyleRelation = JSONParse('$jsStyleRelation');

	if (typeof jsStyle[id] == 'undefined') {
		getObj('secondgradestyle').style.display = 'none';
	} else {
		if (jsStyle[id]['upid'] == '0') {
			if (jsStyleRelation[id].length == 0) {
				getObj('secondgradestyle').style.display = 'none';
			} else {
				getObj('secondgradestyle').style.display = '';
				getObj('secondgradestyle').length = 0;
				for (var i = 0; i < jsStyleRelation[id].length; i++) {
					getObj('secondgradestyle').options.add(new Option(jsStyle[jsStyleRelation[id][i]]['cname'], jsStyleRelation[id][i]));
				}
			}
			getObj('firstgradestyle').value = id;
		} else {
			var parentId = jsStyle[id]['upid'];
			getObj('firstgradestyle').value = parentId;
			getObj('secondgradestyle').style.display = '';
			getObj('secondgradestyle').length = 0;
			for (var i = 0; i < jsStyleRelation[parentId].length; i++) {
				getObj('secondgradestyle').options.add(new Option(jsStyle[jsStyleRelation[parentId][i]]['cname'], jsStyleRelation[parentId][i]));
			}
			getObj('secondgradestyle').value = id;
		}
	}
}
setSecondstyle('{$colony[styleid]}');
</script>
<!--
EOT;
} elseif ($t == 'style') {print <<<EOT
-->
<div id="id4">
    <div class="setpd">
        <p class="g_hD mb15">选择你喜欢的主题</p>
        <div id="successinfo" style="color:red;display:none;">主题设置成功</div>
        <form id="set_option" action="apps.php?q=group&a=set&cyid=$cyid" method="post" name="set_option">
        <input type="hidden" name="step" value="4" />
        <input type="hidden" name="t" value="$t" />
        <table width="100%" class="setTable vt">
<!--
EOT;
foreach ($names as $k => $v) {
$checked = $colony['colonystyle'] == $k ? ' checked' : '';
print <<<EOT
-->
            <tr>
                <td class="td"><label for="{$k}"><input id="{$k}" type="radio" name="colonystyle" value="{$k}" align="absmiddle" onclick='change(this.value);' {$checked}/>
                <img src="images/g/$k/preview.jpg" style="vertical-align:middle;" width="400" class="mr20" /><span class="f14 b" align="absmiddle;">{$v}</span></label></td>
            </tr>
<!--
EOT;
}print<<<EOT
-->
            <tr>
                <td class="td" style="padding-left:110px;"><span class="btn"><span><button type="submit" name="ajaxsubmit">保存设置</button></span></span></td>
            </tr>
        </table>
        </form>
    </div>
</div>
<script type="text/javascript">
function change(style) {
	if (style == "default") {
		style = "default";
	}
	document.getElementById('change2').href="images/g/"+style+"/style.css";
	document.getElementById('banner_class').style.background='';
}
</script>
<!--
EOT;
} elseif ($t == 'privacy') {print <<<EOT
-->
<div id="id2" class="setpd">
    <form action="{$basename}a=$a" enctype="multipart/form-data" method="post">
    <input type="hidden" name="step" value="3" />
    <input type="hidden" name="cyid" value="$cyid" />
    <input type="hidden" name="t" value="$t" />
    <p class="g_hD mb10">隐私设置</p>
    <table width="100%" class="setTable">
        <tr>
            <th class="th">加入权限</th>
            <td class="td">
                <select name="ifcheck">
                    <option value="2" $ifcheck_2>允许任何人加入该群组</option>
                    <option value="1" $ifcheck_1>需要管理员审核才能加入该群组</option>
                    <option type="radio" value="0" $ifcheck_0> 不允许任何人加入该群组</option>
                </select>
            </td>
        </tr>
        <tr>
            <th class="th">{$groupRight['modeset']['thread']['title']}浏览权限</th>
            <td class="td">
                <label for="ifopen1" class="mr20"><input name="ifopen" id="ifopen1" type="radio" value="1" $ifopen_Y /> 任何人</label>
                <label for="ifopen0"><input name="ifopen" id="ifopen0" type="radio" value="0" $ifopen_N /> 仅群组成员</label>
            </td>
        </tr>
        <tr>
            <th class="th">{$groupRight['modeset']['write']['title']}浏览权限</th>
            <td class="td">
                <label for="ifwriteopen1" class="mr20"><input id="ifwriteopen1" name="ifwriteopen" type="radio" value="1" $ifwriteopen_Y /> 任何人</label>
                <label for="ifwriteopen0"><input id="ifwriteopen0" name="ifwriteopen" type="radio" value="0" $ifwriteopen_N /> 仅群组成员</label>
            </td>
        </tr>
        <tr>
            <th class="th">成员浏览权限</th>
            <td class="td">
                <label for="ifmemberopen1" class="mr20"><input id="ifmemberopen1" name="ifmemberopen" type="radio" value="1" $ifmemberopen_Y /> 任何人</label>
                <label for="ifmemberopen0"><input id="ifmemberopen0" name="ifmemberopen" type="radio" value="0" $ifmemberopen_N /> 仅群组成员</label>
            </td>
        </tr>
        <tr>
            <th class="th">公告浏览权限</th>
            <td class="td">
                <label for="ifannouceopen1" class="mr20"><input id="ifannouceopen1" name="ifannouceopen" type="radio" value="1" $ifannouceopen_Y /> 任何人</label>
                <label for="ifannouceopen0" class="mr20"><input id="ifannouceopen0" name="ifannouceopen" type="radio" value="0" $ifannouceopen_N /> 仅群组成员</label>
            </td>
        </tr>
        <tr>
            <th class="th">&nbsp;</th>
            <td class="td"><span class="btn"><span><button type="submit">保存设置</button></span></span></td>
        </tr>
    </table>
    </form>
</div>
<!--
EOT;
} elseif ($t == 'merge') {print <<<EOT
-->
	<div class="setpd">
		<form action="{$basename}a=$a" method="post">
		<input type="hidden" name="step" value="3" />
		<input type="hidden" name="cyid" value="$cyid" />
		<input type="hidden" name="t" value="$t" />
		<p class="mt10 f14 b g_hD">合并群组</p>
		<div class="g_hD_box p10 mb10">
			<p>合并说明：</p>
			<p class="red">此操作不可撤销请谨慎操作。</p>
			<p>只允许群积分低的群组并入群积分高的群组。</p>
		</div>
        <table width="100%" class="setTable">
            <tr>
                <th class="th" style="width:130px;">源群组</th>
                <td class="td">$colony[cname]</td>
            </tr>
            <tr>
                <th class="th">目标群组</th>
                <td class="td">
                    <select name="tocid" class="select_wa">
<!--
EOT;
foreach ($groupList as $key => $value) {
if ($value['id'] != $cyid) {print <<<EOT
-->
					<option value="$value[id]">$value[cname]</option>
<!--
EOT;
}}print <<<EOT
-->
					</select>
                </td>
            </tr>
            <tr>
                <th class="th">请输入登录密码</th>
                <td class="td">
                    <input name="password" type="password" class="input input_wa" />
                </td>
            </tr>
            <tr>
                <th class="th">&nbsp;</th>
                <td class="td"><span class="btn2"><span><button type="submit">保存设置</button></span></span></td>
            </tr>
        </table>

		</form>
	</div>
<!--
EOT;
} elseif ($t == 'attorn') {print <<<EOT
-->
	<div class="setpd">
		<p class="mt10 f14 b g_hD">转让群组</p>
		<div class="g_hD_box p10 mb10">
			<p class="b">接受转让能够资格：</p>
			<p>具备可再创建新群组的资格。</p>
			<p>是本群组管理员。</p>
			<p class="b mt20">温馨提示：</p>
			<p>群组转让成功后，无法要回，需被接收者主动操作才可以再次转回，请谨慎操作。</p>
		</div>
		<div class="c"></div>
<!--
EOT;
if ($groupManager) {print <<<EOT
-->
		<form action="$basename&a=set" method="post">
		<input type="hidden" name="step" value="3" />
		<input type="hidden" name="cyid" value="$cyid" />
		<input type="hidden" name="t" value="$t" />
		<table width="100%" class="mb20">
<!--
EOT;
foreach ($groupManager as $key => $value) {print <<<EOT
-->
			<tr>
				<td width="45px"><input name="newmanager" type="radio" value="{$value['uid']}" /></td>
				<td class="p10" width="70"><a href="javascript:;" class="img_50"><img src="$value[faceurl]" width="48" height="48" /></a></td>
				<td width="215px"><a href="{$db_userurl}$value[uid]" target="_blank">$value[username]</a><p class="s2">管理员</p></td>
				<!--td  width="210px" class="s6">最后发言：2010-12-12</td-->
				<td><p><a href="pw_ajax.php?action=msg&touid=$value[uid]" onclick="return ajaxurl(this);">发送短信</a></p><p><a href="pw_ajax.php?action=addfriend&touid=$value[uid]" onclick="return ajaxurl(this);">加为好友</a></p>
              </td>
			</tr>
<!--
EOT;
}print <<<EOT
-->
		</table>
		<p><span>请输入登录密码</span> <input name="password" type="password" class="input" size="20" /> <span class="btn2"><span><button type="submit">转让群组</button></span></span></p>
		</form>
<!--
EOT;
} else {print <<<EOT
-->
		<div class="g_hD_box p10 mb10">没有找到可以转让的人！</div>
<!--
EOT;
}print <<<EOT
-->
	</div>
<!--
EOT;
} elseif ($t == 'disband') {print <<<EOT
-->
	<form action="$basename&a=set" method="post">
	<input type="hidden" name="step" value="3" />
	<input type="hidden" name="cyid" value="$cyid" />
	<input type="hidden" name="t" value="$t" />
	<div class="setpd">
		<p class="mt10 f14 b g_hD">解散群组</p>
		<div class="g_hD_box p10 mb10">
			<p class="b">注意：</p>
			<p>·解散群组是一个不可逆操作，解散群组将解除群组内所有的群友关系，同时删除群组内所有资料</p>
			<p>·请提前通知群成员备份资料。</p>
		</div>
		<div class="c"></div>
		<div class="mt10">
			<p class="mt10">请输入登录密码 <input name="password" type="password" class="input" size="20" /> <span class="btn2"><span><button type="submit">解散群组</button></span></span>
		</div>
	</div>
	</form>
<!--
EOT;
}print <<<EOT
-->
<script>
setCurrent('set_{$t}','set_default','current');
</script>
<!--
EOT;
}require_once(uTemplate::printEot('footer'));
?>-->