<!--<?php
include_once PrintEot('m_header');
print <<<EOT
-->
<div class="wrapB cc" style="padding-top:10px;background:#fff;">
<div class="contentC cc">
	<div class="h5A"><a href="{$basename}q=groups" style="float:right">我的群組</a>
		<span class="b">
<!--
EOT;
if (isset($o_classdb[$colony['classid']])) {print <<<EOT
-->
		<a href="{$basename}q=groups&a=all&cid=$colony[classid]">{$o_classdb[$colony[classid]]}</a> -
<!--
EOT;
}print <<<EOT
-->
		$colony[cname]
		</span>
	</div>
	<div id="status-cate">
		<div class="tabA" style="margin-top:10px;width:725px;">
			<ul style="width:500px;overflow:hidden;">
					<li id="g_index"><a href="{$basename}q=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>
					<li id="g_uintro"><a href="{$basename}q=group&a=uintro&cyid=$cyid">通訊錄</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>
		<div class="contentC-main cc">
		<div class="c"></div><br />
<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>
		<div style="clear:both"></div>
<!--
EOT;
if (empty($a)) {print <<<EOT
-->
		<div>{$colony[albumnum]} 個相冊
<!--
EOT;
if ($ifadmin) {print <<<EOT
-->
		| <a href="{$basename}q=$q&a=create&cyid=$cyid">創建新相冊</a>
<!--
EOT;
}print <<<EOT
-->
		</div>
		<div class="boxB bgB pdD mt8">
			<div class="table-list table-list-B">
<!--
EOT;
if (!empty($album)) {
foreach ($album as $key => $value) {print <<<EOT
-->
			<table width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td rowspan="5" width="80"><a href="{$basename}q=$q&a=album&cyid=$cyid&aid=$value[aid]"><img src="$value[lastphoto]" height="100"></a></td>
					<td>{$value[aname]}</td>
				</tr>
				<tr><td>相片數 ({$value[photonum]})</td></tr>
				<tr>
					<td>
<!--
EOT;
if ($value['private']) {print <<<EOT
-->
						僅群內可見
<!--
EOT;
} else {print <<<EOT
-->
						所有用戶可見
<!--
EOT;
}print <<<EOT
-->
					</td>
				</tr>
				<tr><td>{$value[lasttime]}</td></tr>
				<tr>
					<td>
						[<a href="{$basename}q=$q&a=upload&cyid=$cyid&aid=$value[aid]">上傳相片</a>]
					</td>
				</tr>
			</table>
<!--
EOT;
}} else {print <<<EOT
-->
			<table cellpadding="0" cellspacing="0" width="100%"><tr><td class="tac">暫時沒有相冊信息</td></tr></table>
<!--
EOT;
}print <<<EOT
-->
			</div>
		</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)">刪除相冊</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><a href="{$basename}q=$q&a=view&cyid=$cyid&pid=$value[pid]"><img src="$value[path]" class="vphoto" /></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);">刪除照片</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>
<!--側欄 begin-->
<div class="sidebarC cc">
	<div class="pdtb3"><img src="{$cnimg}" onload="imgResize(this,150)" /></div>
	<h4 class="h5A">
		<span class="b">群組信息</span>
	</h4>
	<div class="list-F list-fen">
		<ul>
			<li><a>群組成員︰$colony[members]/$o_memberfull</a></li>
			<li><a>群組相冊︰$colony[albumnum]/$o_albumnum</a></li>
<!--
EOT;
if ($colony['ifcyer']) {print <<<EOT
-->
            <li><a>我的身份︰<span class="gray1">
<!--
EOT;
if($colony['admin'] == $windid){print <<<EOT
-->
群主
<!--
EOT;
}elseif($colony['ifadmin'] == 1){print <<<EOT
-->
管理員
<!--
EOT;
}elseif($colony['ifadmin'] == 0){print <<<EOT
-->
普通成員
<!--
EOT;
}else{print <<<EOT
-->
未驗證成員
<!--
EOT;
}print <<<EOT
-->
			</span></a></li>
<!--
EOT;
if($ifadmin){print <<<EOT
-->
			<li><a href="{$basename}q=galbum&a=create&cyid=$cyid">創建群組相冊</a></li>
<!--
EOT;
}print <<<EOT
-->
			<li><a href="{$basename}q=group&a=uintro&job=set&cyid=$cyid">編輯我的通訊錄</a></li>
			<li><a href="{$basename}q=group&a=out&cyid=$cyid" onclick="return ajaxurl(this);" class="gray1">退出群組</a></li>
<!--
EOT;
} else {print <<<EOT
-->
			<li><a href="{$basename}q=group&a=join&cyid=$cyid" onclick="return ajaxurl(this);">加入群組</a></li>
<!--
EOT;
}print <<<EOT
-->
		</ul>
	</div>
</div></div></div>
<!--
EOT;
?>-->