<!--<?php
include_once PrintEot('m_header');
print <<<EOT
-->
<div class="bgA">
<div class="wrapB cc bgA" style="padding-top:10px;">
    <div class="p10">
    <table cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td width="100" class="tac" style="padding-right:10px;">
                <img src="{$cnimg}" onload="imgResize(this,150)" />
            </td>
            <td valign="top" style="line-height:2">
                <p class="b f14">
				<span class="fr f12 fn"><a class="a-reply" href="#" onclick="shareOtherType('share_group');return false;">分享<span>+</span></a></span>
                $colony[cname]
                </p>
				<p>
<!--
EOT;
if ($colony[ifcyer]) {print <<<EOT
-->
					<a href="{$basename}q=$q&a=out&cyid=$cyid" onclick="return ajaxurl(this);" class="fr gray">退出群組</a>
<!--
EOT;
}else{print <<<EOT
-->
					<a href="{$basename}q=$q&a=join&cyid=$cyid" onclick="return ajaxurl(this);" class="fr">加入群組</a>
<!--
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
-->
                </p>
                <p>
					成員︰$colony[members]
				</p>
                <p>群相冊︰$colony[albumnum]</p>
                <div style="overflow:hidden;width:700px;height:20px;">$colony[descrip]</div>
            </td>
        </tr>
    </table>
    </div>
<div id="share_group" style="display:none;">
	<div style="width:450px;">
		<div class="h" style="cursor:move" onmousedown="read.move(event);">
			<div class="pr cc" style="height:30px;">
			<div class="fl threadlist" style="padding-left:10px;">
			<a href="javascript:;" class="current b">分享</a>
			<a href="javascript:;" onclick="shareOtherType('recommend_group');return false;">推薦</a>
			</div>
			</div>
		</div>
		<ul class="nemu-list cc">
			<li>
				<div>摘要︰</div>
				<div class="exp bgB">
					分享了一個群組 <b>$colony[cname]</b>
				</div>
			</li>
		</ul>
		<div class="c"></div>
		<ul class="nemu-list cc">
			<li>
				<div>描述︰</div>
				<textarea  style="width:98%;height:110px;"></textarea>
			</li>
		</ul>
		<div class="menu-bt tac">
			<input class="bt3" type="button" value=" 確 定 " style="width:80px;" onclick="postShareOtherType('group','$cyid');">&nbsp;<input class="bt" type="button" value="取消" onclick="closep();"/>
		</div>
	</div>
</div>
<div id="recommend_group" style="display:none">
	<form method="post" action="mode.php?m=o&q=share&see=recommend&ajax=1" onsubmit="return false;">
	<input type="hidden" name="step" value="2" />
	<div style="width:450px;">
		<div class="h" style="cursor:move" onmousedown="read.move(event);">
			<div class="pr cc" style="height:30px;">
			<div class="fl threadlist" style="padding-left:10px;">
			<a href="javascript:;" onclick="shareOtherType('share_group');return false;">分享</a>
			<a href="javascript:;" class="current b">推薦</a>
			</div>
			</div>
		</div>
	<div style="padding:5px 20px 0;">
	<table width="100%" cellspacing="0" cellpadding="5">
		<tr>
			<td width="24%" align="center">推薦方式︰</td>
			<td>短消息推薦</td>
		</tr>
		<tr>
			<td align="center">對方姓名︰</td>
			<td><input type="text" class="input" name="sendtoname" size="25" value="" /></td>
		</tr>
		<tr>
			<td align="center">標題︰</td>
			<td><input type="text" class="input" name="subject" size="44" value="{$windid} 給您$atc_name" /></td>
		</tr>
		<tr><td align="center">內容︰</td>
			<td><textarea rows="6" style="width:300px" name="atc_content" onkeydown="ajax.quickpost(event,this.form)">您好！我在$db_bbsname($db_bbsurl/?u=$winduid)\n這個信息，認為很有價值，特推薦給您。\n\n主要信息︰\n$title\n\n描述︰\n$descrip\n\n希望您能喜歡。</textarea></td>
		</tr>
	</table><div style="text-align:center;padding:10px 0;"><input type="button" class="bt3" name="ajaxsubmit" style="width:80px;" onclick="ajax.submit(this.form);" value="提 交" />&nbsp;<input class="bt" type="button" value="取消" onclick="closep();"/></div>
	</div>
	</div>
	</form>
</div>
    <div id="person-nav" class="cc" style="margin-top:10px;">
    <ul style="width:500px;overflow:hidden;">
        <li id="g_index"><a href="{$basename}q=group&cyid=$cyid">首頁</a></li>
        <li id="g_thread"><a href="{$basename}q=group&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=group&a=member&cyid=$cyid">成員列表</a></li>
<!--
EOT;
if ($colony[ifcyer]) {print <<<EOT
-->
        <li id="g_uintro"><a href="{$basename}q=group&a=uintro&cyid=$cyid&job=set">我的通訊錄</a></li>
<!--
EOT;
}if ($ifadmin) {print <<<EOT
-->
				<li id="g_set"><a href="{$basename}q=group&a=set&cyid=$cyid">群組設置</a></li>
<!--
EOT;
}print <<<EOT
-->
    </ul>
    </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_galbum','g_index','current');
</script>
<!--
EOT;
if (empty($a)) {print <<<EOT
-->
		<div class="mt8"><span>{$colony[albumnum]} 個相冊</span>
<!--
EOT;
if ($ifadmin) {print <<<EOT
-->
		| <a href="{$basename}q=$q&a=create&cyid=$cyid">創建新相冊</a>
<!--
EOT;
}print <<<EOT
-->
		</div>
			<div class="table-list table-list-B">
<!--
EOT;
if (!empty($album)) {
foreach ($album as $key => $value) {print <<<EOT
-->
			<div class="w180 boxB">
				<div class="p10">
					<p class="tac">
                    	<a href="{$basename}q=$q&a=album&cyid=$cyid&aid=$value[aid]"><img src="$value[lastphoto]" height="100" width="158"></a>
					</p>
					<p class="mt8">
						<a href="{$basename}q=$q&a=album&cyid=$cyid&aid=$value[aid]" class="b">{$value[aname]}</a>
					</p>
					<p class="mt8">
                    	相片數 ({$value[photonum]}) | <a href="{$basename}q=$q&a=upload&cyid=$cyid&aid=$value[aid]">上傳相片</a>
					</p>
                    <p>
<!--
EOT;
if ($value['private']) {print <<<EOT
-->
						僅群內可見
<!--
EOT;
} else {print <<<EOT
-->
						所有用戶可見
<!--
EOT;
}print <<<EOT
-->
                    </p>
                    <p class="gray">
                    	創建日期{$value[lasttime]}
                    </p>
				</div>
			</div>
<!--
EOT;
}} else {print <<<EOT
-->
			<table cellpadding="0" cellspacing="0" width="100%"><tr><td class="tac">暫時沒有相冊信息</td></tr></table>
<!--
EOT;
}print <<<EOT
-->
			</div>
<!--
EOT;
} elseif ($a == 'album') {print <<<EOT
-->
		<style style="text/css">.vphoto{max-width:100px}</style>
		<div class="list-img boxB bgB cc list-img-A mt8">
			<p class="text">
				群組相冊 - $album[aname] $album[photonum] 張照片
<!--
EOT;
if ($ifadmin) {print <<<EOT
-->
				| <a href="{$basename}q=$q&a=edit&cyid=$cyid&aid=$aid">編輯相冊</a>
				| <a href="{$basename}q=$q&a=delalbum&cyid=$cyid&aid=$aid" onclick="return ajaxurl(this)" title="刪除" class="o-del gray">刪除</a>
<!--
EOT;
}print <<<EOT
-->
				| <a href="{$basename}q=$q&a=upload&cyid=$cyid&aid=$aid">上傳更多照片</a>
			</p>
			<ul>
<!--
EOT;
if (!empty($cnpho)) {
foreach ($cnpho as $key => $value) {print <<<EOT
-->
				<li class="height130"><a href="{$basename}q=$q&a=view&cyid=$cyid&pid=$value[pid]"><img src="$value[path]" class="vphoto" onload="if(this.width>'120')this.width='120';if(this.height>'120')this.height='120';" /></a></li>
<!--
EOT;
}} else {print <<<EOT
-->
				<li>相冊暫時沒有照片</li>
<!--
EOT;
}print <<<EOT
-->
			</ul>
		</div>
		<div class="list-img cc list-img-A mt8"><p class="text">$album[aintro]</p></div>
<!--
EOT;
} elseif ($a == 'view') {print <<<EOT
-->
<script language="JavaScript">
function ajaxpage(url,type) {
	ajax.send(url,'',function() {
		var rText = ajax.request.responseText.split('\\t');
		if (rText[0] == 'ok') {
			if (rText[1]) {
				window.location.href = '{$basename}q=$q&a=view&cyid=$cyid&pid=' + rText[1];
			} else {
				ajax.request.responseText = type == 'next' ? '已經是最後一張照片了' : '已經是第一張照片了';
				ajax.guide();
			}
		} else {
			ajax.guide();
		}
	});
	return false;
}
function ajaxdel(url) {
	if (!confirm('您確定要刪除改相片嗎？')) {
		return false;
	}
	ajax.send(url,'',function() {
		if (ajax.request.responseText == 'ok') {
			window.location.href = '{$basename}q=$q&a=album&cyid=$cyid&aid={$photo[aid]}';
		} else {
			ajax.guide();
		}
	})
	return false;
}
</script>
<style style="text/css">.vphoto{max-width:500px}</style>
		<div class="list-img boxB bgB cc mt8">
			<p class="text">
				<a href="{$basename}q=photos&a=next&pid=$photo[pid]" style="float:right" onclick="return ajaxpage(this.href,'next');">下一張</a>
				<a href="{$basename}q=photos&a=pre&pid=$photo[pid]" style="float:right;margin-right:5px" onclick="return ajaxpage(this.href,'pre');">上一張</a>
				{$photo[photonum]} 張照片中的第 {$num} 張
				<a href="{$basename}q=$q&a=album&cyid=$cyid&aid=$photo[aid]">返回相冊</a> | <a href="{$basename}q=$q&a=editphoto&cyid=$cyid&pid=$photo[pid]">編輯照片</a> | <a href="{$basename}q=$q&a=delphoto&cyid=$cyid&pid=$photo[pid]" onclick="return ajaxdel(this.href);" title="刪除" class="o-del gray">刪除</a>
			</p><br />
			<div class="tac"><img src="$photo[path]" class="vphoto" /></div>
			<div>
				<b>$photo[pname]</b><br />
				$photo[pintro]
			</div>
			<div>
				上傳于 {$photo[uptime]} | $photo[hits] 瀏覽
			</div>
		</div>
<!--
EOT;
} elseif ($a == 'editphoto') {print <<<EOT
-->
		<div class="list-img boxB bgB cc mt8 table-list">
			<p class="text">編輯照片 | <a href="{$basename}q=$q&a=view&cyid=$cyid&pid=$pid">返回照片</a></p>
			<form action="{$basename}q=$q&a=$a&cyid=$cyid" method="post">
			<input type="hidden" name="step" value="3" />
			<input type="hidden" name="pid" value="$pid" />
			<table cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<td width="30%" align="right">選擇相冊</td>
					<td><select name="aid">{$options}</select></td>
				</tr>
				<tr>
					<td align="right">描述</td>
					<td><textarea name="pintro" style="width:350px;height:70px">$photo[pintro]</textarea></td>
				</tr>
				<tr>
					<td></td>
					<td><input type="submit" class="bt3" value="編輯照片" /></td>
				</tr>
			</table>
			</form>
		</div>
<!--
EOT;
} elseif ($a == 'upload') {print <<<EOT
-->
		<div class="list-img boxB bgB cc mt8 table-list">
			<p class="text">上傳新照片 | <a href="{$basename}q=$q&cyid=$cyid{$extra_url}">返回相冊</a></p>
			<form action="{$basename}q=$q&a=$a&cyid=$cyid" enctype="multipart/form-data" method="post">
			<input type="hidden" name="step" value="3" />
			<table cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<td width="30%" align="right">選擇相冊</td>
					<td><select name="aid">{$options}</select></td>
				</tr>
				<tr>
					<td align="right">相片描述</td>
					<td><textarea name="pintro" style="width:350px;height:70px"></textarea></td>
				</tr>
				<tr>
					<td align="right">相片地址</td>
					<td><input type="file" name="photo" /></td>
				</tr>
				<tr>
					<td></td>
					<td><input type="submit" class="bt3" value="上傳照片" /></td>
				</tr>
			</table>
			</form>
		</div>
<!--
EOT;
} elseif ($a == 'create' || $a == 'edit') {print <<<EOT
-->
		<div class="list-img boxB bgB cc mt8 table-list">
			<p class="text">
<!--
EOT;
if ($a == 'create') {print <<<EOT
-->
				創建新相冊
<!--
EOT;
} else {print <<<EOT
-->
				編輯相冊
<!--
EOT;
}print <<<EOT
-->
				| <a href="{$basename}q=$q&cyid=$cyid{$extra_url}">返回相冊</a>
			</p>
			<form action="{$basename}q=$q&a=$a&cyid=$cyid" method="post">
			<input type="hidden" name="step" value="3" />
			<input type="hidden" name="aid" value="$aid" />
			<table cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<td width="30%" align="right">相冊名</td>
					<td><input type="text" name="aname" value="$rt[aname]" /></td>
				</tr>
				<tr>
					<td align="right">描述</td>
					<td><textarea name="aintro" style="width:350px;height:70px">{$rt[aintro]}</textarea></td>
				</tr>
				<tr>
					<td align="right">可見度</td>
					<td><select name="private"><option value="0" $select_0>全站用戶可見</option><option value="1" $select_1>僅群內可見</option></select></td>
				</tr>
				<tr>
					<td></td>
					<td><input type="submit" value="提 交" class="bt3" /></td>
				</tr>
			</table>
			</form>
		</div>
<!--
EOT;
}print <<<EOT
-->
	</div>
</div></div>
</div>
<!--
EOT;
?>-->