<!--<?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;
?>-->