<!--<?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">
<!--
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]
                </p>
                <p>
<!--
EOT;
if ($colony[ifcyer]) {print <<<EOT
-->
					<a href="{$basename}q=$q&a=out&cyid=$cyid" onclick="return ajaxurl(this);" class="fr">退出群组</a>
<!--
EOT;
}else{print <<<EOT
-->
					<a href="{$basename}q=$q&a=join&cyid=$cyid" onclick="return ajaxurl(this);" class="fr">加入群组</a>
<!--
EOT;
}print <<<EOT
-->
					成员：$colony[members]
				</p>
                <p>群相册：$colony[albumnum]</p>
                <p>简介：$colony[descrip]</p>
            </td>
        </tr>
    </table>
    </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"></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;
?>-->