<!--<?php
print <<<EOT
-->
<div id="breadCrumb" class="cc">$msg_guide</div>
<div id="pw_content">
<!--
EOT;
$tmpStyle = $_COOKIE['toggle']!=='0' ? 'f_tree cc' : 'f_tree cc sideClose';print <<<EOT
-->
	<div id="sidebar" class="$tmpStyle">
<!--
EOT;
$db_threadsidebarifopen && require_once(PrintEot('thread_side'));
print <<<EOT
-->
        <div class="content_thread cc">
            <div class="content_ie">
<!--
EOT;
require_once PrintEot('thread_group');
if (empty($a)) {print <<<EOT
-->
	<div class="g_navB">
<!--
EOT;
if (empty($group) || $group != 4) {print <<<EOT
-->
		<span class="fr">排序方式︰
			<a href="{$basename}&a=$a{$urladd}&orderby=lastvisit"{$order_lastvisit}>最近登錄</a>
			| <a href="{$basename}&a=$a{$urladd}&orderby=lastpost"{$order_lastpost}>最後發表</a>
		</span>
<!--
EOT;
}print<<<EOT
-->
		<span class="mr20">共{$total}名成員</span>
	</div>
	<div class="g_contentA fl">
    	<div class="p15">
<!--
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" 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){
if (checkOnline($value['thisvisit'])){print <<<EOT
-->
								<span class="card-online" title="在線">在線</span>
<!--
EOT;
}else{print<<<EOT
-->
								<span class="card-offline" title="離線">離線</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="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>
	<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('apps.php?q=group&a=fanoutmsg&cyid=$cyid&group=$group', d, 'senndmsg');
		}
	})()
	</script>
	<input type ="text" name ="operateStep" id="operateStep" value="" style="display:none"/>
<!--
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]">$value[username]</a></p><p class="t">$visittime</p></li>
<!--
EOT;
}print<<<EOT
-->
				</ul>
			</div>
<!--
EOT;
}}print<<<EOT
-->
		</div>
	</div>
    <div class="g_sidebarA fr">
    	<div class="p15">
        <div class="g_tA mb10">
            <h4 class="g_hB">篩選</h4>
            <div>
                <ul class="ulA">
                    <li id="group_all"><a href="{$basename}&a=$a">全部成員</a></li>
                    <li id="group_1"><a href="{$basename}&a=$a&group=1">管理員</a></li>
                    <li id="group_2"><a href="{$basename}&a=$a&group=2">普通成員</a></li>
                    <li id="group_3"><a href="{$basename}&a=$a&group=3">未驗證會員</a></li>
                    <li id="group_4"><a href="{$basename}&a=$a&group=4">最近訪客</a></li>
                </ul>
            </div>
        </div>
        </div>
    </div>
<script>
setCurrent('group_{$group}','group_all','current');
</script>
<!--
EOT;
} elseif ($a == 'invite') {print <<<EOT
-->
<div class="cc pd15">
        <div class="g_contentC fl">
            <div class="f14 b mb10">方法一︰給好友發送電子郵件邀請</div>
            <form action="thread.php?cyid=$cyid&showtype=member&a=invite" method="post" id="inviteForm">
			<input type="hidden" name="step" value="1">
			<input type="hidden" name="type" value="$type">
			<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="thread.php?cyid=$cyid&showtype=member&a=invite" >
<input type="hidden" name="id" value="$id" />
<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" class="vt">
		<td>&nbsp;</td>
		<td>
			<div class="fri-list pr">
			<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="cc">
<!--
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;
}print <<<EOT
-->
            </div>
		</div>
	</div>
</div>
<!--
EOT;
?>