<!--<?php
print <<<EOT
-->
<!--
EOT;
if($cssForum){print <<<EOT
-->
<div class="c"></div>
<link rel="stylesheet" type="text/css" href="$pwModeImg/app.css" />
<!--
EOT;
}print <<<EOT
-->
<div id="content" class="fr">
    <table width="100%">
    <tr class="vt"><td height="400" style="padding-bottom:20px;">
<!--
EOT;
if ($colony['banner']) {print <<<EOT
-->
	<div class="p10" style="overflow:hidden;width:778px;"><img src="{$colony[banner]}" /></div>
	<div class="c"></div>
<!--
EOT;
}print <<<EOT
-->
<div class="cc">
	<div id="content_main" class="fl">
    <div class="p10">
	<div class="fl pr10"><table height="100"><tr><td style="border:1px solid #e4e4e4;padding:4px;"><img src="{$cnimg}" onload="imgResize(this,110)" /></td></tr></table></div>
	<div>
	<a href="{$baseUrl}q=group&cyid=$cyid" class="f20 b" style="line-height:1.1;">$colony[cname]</a>
		<div class="pt5">
			所属版块：<a href="{$baseUrl}q=groups&a=all&cid=$colony[classid]">{$o_classdb[$colony[classid]]}</a><br />
			<span style="margin-right:30px;">成员： <span class="f10">$colony[members] 人</span></span>
			<span style="margin-right:30px;">创立时间： <span class="f10">$colony[createtime]</span></span>
		</div>
		<div class="pt5">简介：$colony[descrip]</div>
</div>
	</div>
	</div>
	<div id="sidebar" class="fr">
	<div class="p10">
<!--
EOT;
if($db_share_open && !$shareGM){print<<<EOT
-->
	<div class="f_one tar" style="padding:2px 3px;border-bottom:1px solid #e7e7e7;"><a class="a-reply" href="javascript:;" onclick="sendmsg('operate.php?action=share&ajax=1&type=group&id=$cyid','',this.id);">分享<span>+</span></a></div>
<!--
EOT;
}print <<<EOT
-->
		<div class="list-bor-a">
			<ul>
				<li>
<!--
EOT;
if ($colony[ifcyer]) {print <<<EOT
-->
					你已加入该群组，<a class="gray" style="display:inline;" href="{$baseUrl}q=group&a=out&cyid=$cyid" onclick="return ajaxurl(this);">退出</a>
<!--
EOT;
}else{print <<<EOT
-->
					<a href="{$baseUrl}q=group&a=join&cyid=$cyid" onclick="return ajaxurl(this);"><img src="$pwModeImg/group-join.gif" class="fr" />加入群组</a>
<!--
EOT;
}print <<<EOT
-->
				</li>
				<li>
<!--
EOT;
if($_G['allowreport']){print <<<EOT
-->
	<a onclick="sendmsg('pw_ajax.php?action=report&type=group&tid=$cyid','',this.id);" id="report_group" style="cursor: pointer;" class="gray"><img src="$pwModeImg/group-report.gif" class="fr" />举报</a>
<!--
EOT;
}print <<<EOT
-->
				</li>
				<li><a href="{$baseUrl}q=group&a=member&cyid=$cyid" class="gray"><img src="$pwModeImg/group-s.gif" class="fr" />查看群组成员</a></li>
			</ul>
		</div>
	</div>
	</div>
</div>
<div class="cc" style="margin:10px 10px 0;">
<div class="tabB cc">
	<ul>
		<li id="g_index"><a href="{$baseUrl}q=group&cyid=$cyid">首页</a></li>
<!--
EOT;
if ($colony[ifopen] || $ifadmin || empty($colony['ifopen']) && $colony['ifcyer']) {print <<<EOT
-->
		<li id="g_thread"><a href="{$baseUrl}q=group&a=thread&cyid=$cyid">讨论区</a></li>
<!--
EOT;
}print <<<EOT
-->
		<li id="g_galbum"><a href="{$basename}cyid=$cyid">群组相册</a></li>
		<li id="g_member"><a href="{$baseUrl}q=group&a=member&cyid=$cyid">成员列表</a></li>
<!--
EOT;
if ($colony[ifcyer]) {print <<<EOT
-->
		<li id="g_uintro"><a href="{$baseUrl}q=group&a=uintro&cyid=$cyid&job=set">我的通讯录</a></li>
<!--
EOT;
}print <<<EOT
-->
	</ul>
<!--
EOT;
if ($ifadmin) {print <<<EOT
-->
		<div class="pt5 fl pl10"><img src="$imgpath/apps/applied/edit-app.png" align="absmiddle" /><a href="{$baseUrl}q=group&a=set&cyid=$cyid" class="black">群组设置</a></div>
<!--
EOT;
}print <<<EOT
-->
</div>
</div>
<SCRIPT type="text/javascript" LANGUAGE="JavaScript" src="js/core/core.js"></SCRIPT>
<script language="JavaScript">

setCurrent('g_{$a_key}','g_index','current');

function ajaxdel(url,aid) {
	if (!confirm('您确定要删除该相片吗？')) {
		return false;
	}
	ajax.send(url,'',function() {
		if (ajax.request.responseText == 'ok') {
			window.location.href = '{$basename}a=album&cyid=$cyid&aid='+aid;
		} else {
			ajax.guide();
		}
	})
	return false;
}
</script>
<!--
EOT;
if (empty($a)) {print <<<EOT
-->
<!--
EOT;
	if ($ifadmin) {
print <<<EOT
-->
				<div class="p10">
					<a class="app-post2" href="{$basename}a=create&cyid=$cyid">创建相册</a>
					<div class="fl pl10 mt3 gray">已有{$colony[albumnum]} 个相册 {$photonum}张相片</div>
				</div>
<!--
EOT;
	}
print <<<EOT
-->
      	<div class="c"></div>
        <div class="pl10">
		<ul id="list-box" class="cc list-box-a">
<!--
EOT;
	if (!empty($album)) {
		foreach ($album as $key => $value) {
print <<<EOT
-->
	<li>
	<dl>
	<dt><div><table style="height:100%;width:100%;"><tr><td class="tac"><a href="{$basename}a=album&cyid=$cyid&aid=$value[aid]"><img src="$value[lastphoto]" /></a></td></tr></table></div></dt>
	<dd><h2><a href="{$basename}a=album&cyid=$cyid&aid=$value[aid]" title="{$value[aname]}">{$value[sub_aname]}</a></h2>
												<p class="gray">
														更新:$value[lasttime]<br />
														共{$value[photonum]}张照片
<!--
EOT;
			if ($value['private']) {
print <<<EOT
-->
						仅群内可见<br />
<!--
EOT;
			} else {
print <<<EOT
-->
						所有用户可见<br />
<!--
EOT;
			}
			if (!$value['forbidden']) {
print <<<EOT
-->
														<span class="none"><a href="{$basename}a=upload&cyid=$cyid&aid=$value[aid]"  class="black uline">上传照片</a>
<!--
EOT;
			}
			if ($ifadmin) {
print <<<EOT
-->
						| <a href="{$basename}a=edit&cyid=$cyid&aid=$value[aid]"  class="black uline">编辑相册</a> | <a href="{$basename}a=delalbum&cyid=$cyid&aid=$value[aid]" onclick="return ajaxurl(this)" title="删除" class="del">删除</a>
<!--
EOT;
			}
print <<<EOT
-->
						</span></p>
	</dd>
	</dl>
	</li>
<!--
EOT;
		}
print <<<EOT
-->
	<script language="JavaScript" src="js/core/changeview.js"></script>
	<script language="JavaScript">
		var frist = New(changView,['list-box','li',1]);
	</script>
<!--
EOT;
	} else {
print <<<EOT
-->
		<div class="tac">暂时没有相册信息</div>
<!--
EOT;
	}
print <<<EOT
-->
					</ul>
		<div class="mt10 cc">$pages</div>
        </div>
<!--
EOT;
} elseif ($a == 'album') {print <<<EOT
-->
			<div style="padding:10px 20px;">
            <p><span class="f16 b black">$album[aname]</span>&nbsp;&nbsp;&nbsp;<span class="gray">$album[photonum] 张照片</span></p>
					<p class="mt10 ong">
<!--
EOT;
if ($ifadmin) {print <<<EOT
--><a href="{$basename}a=edit&cyid=$cyid&aid=$aid"><img src="$pwModeImg/operation/edit.png" align="absmiddle" /> 编辑相册</a>&nbsp;&nbsp;&nbsp;<a href="{$basename}a=delalbum&cyid=$cyid&aid=$aid" onclick="return ajaxurl(this);"><img src="$pwModeImg/operation/del.png" align="absmiddle" /> 删除</a>
<!--
EOT;
}print <<<EOT
-->&nbsp;&nbsp;&nbsp;<a href="{$basename}a=upload&cyid=$cyid&aid=$aid"><img src="$pwModeImg/operation/up.png" align="absmiddle" />上传更多照片</a></p>
            </div>
			<div style="padding:0 20px;">
                <ul class="cc list-img-3">
<!--
EOT;
if (!empty($cnpho)) {
foreach ($cnpho as $key => $value) {print <<<EOT
-->
                    <li><div><table><tr><td class="tac"><a href="{$basename}a=view&cyid=$cyid&pid=$value[pid]" class="photo-img"><img src="$value[path]" /></a></td></tr></table></div>
                   	<p><span class="f10 gray">$value[uptime]</span><br />
<!--
EOT;
if ($ifadmin) {print <<<EOT
-->
							<a href="{$basename}a=editphoto&cyid=$cyid&pid=$value[pid]"><img src="$pwModeImg/operation/edit.png" /></a>
                            <a href="{$basename}a=delphoto&cyid=$cyid&pid=$value[pid]" onclick="return ajaxdel(this.href,'$aid');" title="删除" class="o-del gray"><img src="$pwModeImg/operation/del.png" /></a>
<!--
EOT;
}print <<<EOT
--></p>
                    </li>


<!--
EOT;
}}else{print <<<EOT
-->
					<li>相册暂时没有照片</li>
<!--
EOT;
}print <<<EOT
-->
                </ul>
            </div>
<!--
EOT;
} elseif ($a == 'view') {print <<<EOT
-->
			<div style="padding:10px 20px;">
          <p class="cc">
						<span class="ong fr" style="padding-top:4px;">
<a href="{$basename}a=editphoto&cyid=$cyid&pid=$photo[pid]"><img src="$pwModeImg/operation/edit.png" align="absmiddle" /> 编辑照片</a>&nbsp;&nbsp;&nbsp;<a href="{$basename}a=delphoto&cyid=$cyid&pid=$photo[pid]" onclick="return ajaxdel(this.href,'$photo[aid]');" title="删除" /><img src="$pwModeImg/operation/del.png" align="absmiddle" /> 删除</a>&nbsp;&nbsp;&nbsp;<a href="{$basename}a=upload&cyid=$cyid&aid=$photo[aid]"><img src="$pwModeImg/operation/up.png" align="absmiddle" /> 上传</a>
<!--
EOT;
if($_G['allowreport']){print <<<EOT
-->&nbsp;&nbsp;&nbsp;<a onclick="sendmsg('pw_ajax.php?action=report&type=groupphoto&tid=$pid&pid=$cyid','',this.id);" id="report_groupphoto" style="cursor:pointer;"><img src="$pwModeImg/operation/report.png" align="absmiddle" /> 举报</a>
<!--
EOT;
}print <<<EOT
-->&nbsp;&nbsp;&nbsp;<a href="javascript:;" onclick="ImgClick();"><img src="$pwModeImg/operation/oline.png" align="absmiddle" /> 原图</a>
					</span>
					<span class="f16 b black">$photo[aname]</span>&nbsp;&nbsp;&nbsp;<span class="gray">{$photo[photonum]} 张照片中的第 {$num} 张</span>&nbsp;&nbsp;&nbsp;<a href="{$basename}a=album&cyid=$cyid&aid=$photo[aid]">返回相册列表</a></p>
				<div class="tac list-img-b">
					<table style="width:100%;height:90px;">
													<tr>
														<td width="20" class="pre"><a style="cursor:pointer;" onclick="photolist.refleshGroupsPre($prePid,$cyid);">上一张</a></td>
															<td class="tac" id="img_list">

<!--
EOT;
foreach($nearphoto as $value){
$ifsel = $pid == $value[pid] ? 'class="current img"' : 'class="img"';
print <<<EOT
-->
						<div class="mt8" id="imglist_{$value[pid]}">
<!--
EOT;
if($value[pid]=='begin'||$value[pid]=='end'){
print <<<EOT
-->
						<div class="img"><img src="$value[path]" style="cursor:pointer;" /></div>
<!--
EOT;
} else {print <<<EOT
-->
						<div $ifsel><a href="{$baseUrl}q=galbum&cyid=$cyid&a=view&pid=$value[pid]"><img src="$value[path]" onload="if(this.width>100){this.width = 100;} else if(this.height>100){this.height=100;}" /></a></div>
<!--
EOT;
}print <<<EOT
-->
						</div>
<!--
EOT;
}print <<<EOT
-->
															</td>
															<td width="20" class="next"><a style="cursor:pointer;" onclick="photolist.refleshGroupsNext($nextPid,$cyid);">下一张</a></td>
													</tr>
											</table>
				</div>
            <div class="mt10">
            <map name="FPMap0">
                <area shape="rect" id="next" href="{$baseUrl}q=photos&a=pre&pid=$photo[pid]" onclick="return ajaxpage(this.href,'pre');" title="上一张">
                <area shape="rect" id="pre" href="{$baseUrl}q=photos&a=next&pid=$photo[pid]" onclick="return ajaxpage(this.href,'next');" title="下一张">
            </map>
            </div>
				<div style="margin:auto;overflow:hidden;border:1px solid #ccc;background:#f7f7f7;">
				<table cellpadding="0" cellspacing="0" width="100%" height="400">
					<tr>
						<td height="400" style="vertical-align:middle">
						<div class="tac mt10 p10" id="img-width"><img id="imgview" src="$photo[path]" usemap="#FPMap0" onload="imgResize(this,500)"/></div>
						</td>
					</tr>
                    <tr>
                    	<td style="padding:10px;">
							<div>$photo[pintro]</div>
							<span class="gray">$photo[uploader] 上传于 {$photo[uptime]} | $photo[hits] 浏览</span>
                        </td>
                    </tr>
				</table>
				</div>
        </div>
<script language="JavaScript" src="js/pw_photolist.js"></script>
<script language="JavaScript">
var photolist = new photoList('img_list','$pid','$aid');
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}a=view&cyid=$cyid&pid=' + rText[1];
			} else {
				var message = type == 'next' ? '已经是最后一张照片' : '已经是第一张照片';
                                showDialog('error',message,2);
			}
		} else {
			ajax.guide();
		}
	});
	return false;
}

var imgMaxWidth=540;
var content = document.getElementById("img-width");
ImgLoad(content);
function ImgLoad(obj)
{
	for(var i=0;i<obj.getElementsByTagName("img").length;i++){
		var o=obj.getElementsByTagName("img")[i];
		if (o.width>imgMaxWidth){
			if (o.style.width){
				o.style.width="";
			}
			o.width=imgMaxWidth;
			o.removeAttribute("height");
			o.style.cursor="hand";
			o.style.display="block";
			o.vspace=5;
			o.resized=1;
			//o.setAttribute("title","ctrl+鼠标滚轮缩放");
			//o.onclick=ImgClick;
			//o.onmousewheel=bbimg;
		}
		var next = getObj('next');
		var pre = getObj('pre');
		next.coords = '0 0 ' + ',' + o.width/2 + ',' + o.height;
		pre.coords = o.width/2 + ' 0 ' + ',' + o.width + ',' + o.height;
	}
}
</script>
<script type="text/javascript" LANGUAGE="JavaScript" src="js/core/space.js"></script>
<!--
EOT;
} elseif ($a == 'editphoto') {print <<<EOT
-->
<div class="p10">
<div class="o-info-a">编辑相片 | <a href="{$basename}a=view&cyid=$cyid&pid=$pid">返回照片</a></div>
 <div class="p10">
	<form action="{$basename}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">
			<tr class="tr6">
					<td>选择相册</td><td><select name="aid">{$options}</select></td>
			</tr>
			<tr class="tr6">
					<td class="vt">描述</td><td><textarea name="pintro" style="width:350px;height:70px">$photo[pintro]</textarea></td>
			</tr>
			<tr class="tr6">
					<td>&nbsp;</td>
					<td>
							<span class="button"><span><button type="submit">编辑照片</button></span></span>
					</td>
			</tr>
	</table>
	</form>
</div>
</div>
<!--
EOT;
} elseif ($a == 'upload') {print <<<EOT
-->
<div class="p10">
<div class="o-info-a"><a href="{$basename}cyid=$cyid{$extra_url}">返回群组相册</a></div>
<script type="text/javascript" language="JavaScript" src="js/upload.js"></script>
</div>
<div id="sidebar" class="fl lh24">
	<div style="padding:0 0 0 20px;">
		<div class="b">提示：</div>
		<p class="gray">单张照片不得大于{$o_maxfilesize}kb</p>
		<span id="allowflash"></span>
		<br />
<!--
EOT;
if ($job == 'flash') {print <<<EOT
-->
		<a href="{$basename}q=$q&a=$a&cyid=$cyid&aid=$aid" class="uline">其他上传方式</a>
		<div class="b mt10">批量上传</div>
<!--
EOT;
} else {print <<<EOT
-->
		<div class="b mt10">其他上传方式</div>
		<a href="{$basename}q=$q&a=$a&cyid=$cyid&job=flash&aid=$aid" class="uline">批量上传</a><br />
<!--
EOT;
}print <<<EOT
-->
		<img src="$imgpath/apps/icon/albums.png" align="absmiddle" />&nbsp;<a href="{$basename}a=selalbum&cyid=$cyid" class="uline" onclick="location.href=this.href+'&selaid='+getObj('aidsel_info').value;return false;">从个人相册里选择</a>
		<span class="red f9 b" style=" position:absolute;margin:-10px 0 0 -5px;">NEW</span>
	</div>
</div>
<!--
EOT;
if (empty($job)) {print <<<EOT
-->
<form action="{$basename}a=$a&cyid=$cyid" id="uploadPhotoForm" enctype="multipart/form-data" method="post">
<input type="hidden" name="step" value="3" />
<input type="hidden" name="verify" value="$verifyhash" />
<div id="content_main" class="fr">
	<div class="photo-one">
		<div class="mt10 lh24">
			<p class="b">请选择相册：</p>
			<select name="aid" style="width:200px;" id="aidsel_info" onchange="getallowflash(this.value);">{$options}</select>
<!--
EOT;
if ($ifadmin) {print <<<EOT
-->
			<a style="cursor: pointer;margin-left:1em;" href="{$baseUrl}q=$q&a=create&cyid=$cyid">创建新相册</a>
<!--
EOT;
}print <<<EOT
-->
		</div>
		<dl class="cc">
			<dt><table><tr><td height="90"><img id="preview_1" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=image);" src="$pwModeImg/90.png"></td></tr></table></dt>
			<dd>
				<input type="file" class="input" name="photo_1" id="p_1" accept="image/*" onchange="preview_img(1);"/> <br />
				<textarea id="pintro_1" name="pintro[1]" style="width:250px;height:40px"></textarea><br /><span id="pintro_1_warn" class="gray">限 255 字节</span>
			</dd>
		</dl>
		<dl class="cc">
			<dt><table><tr><td height="90"><img id="preview_2" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=image);" src="$pwModeImg/90.png"></td></tr></table></dt>
			<dd>
				<input type="file" class="input" name="photo_2" id="p_2" onchange="preview_img(2);"/> <br />
				<textarea id="pintro_2" name="pintro[2]" style="width:250px;height:40px"></textarea><br /><span id="pintro_1_warn" class="gray">限 255 字节</span>
			</dd>
		</dl>
		<dl class="cc" $show2rows>
			<dt><table><tr><td height="90"><img id="preview_3" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=image);" src="$pwModeImg/90.png"></td></tr></table></dt>
			<dd>
				<input type="file" class="input" name="photo_3" id="p_3" onchange="preview_img(3);"/> <br />
				<textarea id="pintro_3" name="pintro[3]" style="width:250px;height:40px"></textarea><br /><span id="pintro_1_warn" class="gray">限 255 字节</span>
			</dd>
		</dl>
<!--
EOT;
if ($o_photos_gdcheck) {print <<<EOT
-->
		<div>认证码:</div>
		<div><img id="ckcode" style="cursor:pointer;display:none;margin-bottom:5px;" onclick="this.src='ck.php?nowtime='+new Date().getTime();" alt="看不清楚，换一张" /></div>
		<input class="input" onfocus="showCK();" type="text" name="gdcode" id="gdcode" size="5" tabindex="3"  />
<script language="JavaScript">
function showCK(){
	getObj('ckcode').style.display="";
	if (getObj('ckcode').src.indexOf('ck.php') == -1) {
		getObj('ckcode').src = 'ck.php?nowtime=' + new Date().getTime();
	}
}
</script>
<!--
EOT;
}if($o_photos_qcheck){
$qkey = array_rand($db_question);
print <<<EOT
-->
		<br /><br />
		<div>验证问答: {$db_question[$qkey]} （正确答案:{$db_answer[$qkey]}）</div>
		<input class="input" name="qanswer" id="qanswer" size="25" tabindex="7" />
		<input type="hidden" name="qkey" id="qkey" value="$qkey" />
<!--
EOT;
}print <<<EOT
-->
		<div class="mt10"><span class="button"><span><button type="submit">开始上传</button></span></span></div>
	</div>
</div>
</form>
<div class="c"></div>
<script language="JavaScript">
var charset = '$db_charset';
initCheckTextNum('pintro_1','pintro_1_warn',255);
initCheckTextNum('pintro_2','pintro_2_warn',255);
initCheckTextNum('pintro_3','pintro_3_warn',255);
function preview_img(id){
	var photype = getObj('p_'+id);
	var patn = /\.jpg$|\.jpeg$|\.png|\.bmp|\.gif$/i;
	if(patn.test(photype.value)){
		var Preview = getObj('preview_'+id);
		if (is_gecko) {
			Preview.src = photype.files[0].getAsDataURL();
		} else if (is_ie) {
			Preview.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = photype.value;
			Preview.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").sizingMethod = 'scale';
		}
	} else {
		showDialog('error','您选择的似乎不是图像文件。',2);
	}
}
</script>
<!--
EOT;
} elseif ($job == 'flash') {print <<<EOT
-->
<div id="content_main" class="fr">
	<div style="padding-right:20px;">
	<div class="photo-two">
		<div>
<!--
EOT;
if ($options) {print <<<EOT
-->
			<select name="aid" style="width:200px;" id="aidsel_info" onchange="photoflashAtt.getaid(this.value);getallowflash(this.value);">{$options}</select>
<!--
EOT;
}print <<<EOT
-->
		</div><br />
		<dl class="cc">
			<dd>
				<div>
					<div id="viewimg" class="menu" style="display:none;"></div>
					<div id="attsize" style="margin-top:10px"></div>
				</div>
			</dd>
		</dl>
	</div>
    </div>
</div>
<script language="JavaScript">
photoflashAtt.baseurl = '{$basename}cyid=$cyid&';
window.onReady(photoflashAtt.init);
</script>
<div class="c"></div>
<!--
EOT;
}print <<<EOT
-->
<script language="JavaScript">
function getallowflash(aid) {
	setTimeout(function(){ajax.send('{$basename}a=getallowflash&cyid=$cyid&aid='+aid,'',function() {
		var rText = ajax.request.responseText.split('\\t');
		if (rText[0] == 'ok') {
			if (rText[1]) {
				getObj('allowflash').innerHTML = '您还可以上传'+rText[1]+'张照片';
			} else {
				getObj('allowflash').innerHTML = '请选择相册';
			}
		} else {
			ajax.guide();
		}
	});},100);
	return false;
}
window.onReady(getallowflash,getObj('aidsel_info').value);
</script>
<!--
EOT;
} elseif ($a == 'selalbum') {
print <<<EOT
-->
<div class="p10">
<div class="o-info-a"><a href="{$basename}cyid=$cyid&a=upload">返回相册上传</a> | <a href="{$basename}cyid=$cyid&a=upload&job=flash">批量上传</a> | <a href="{$basename}cyid=$cyid">返回相册</a> <span style="margin-left:2em">提示：请进入相册选择照片</span></div>
</div>
<!--
EOT;
	if (!empty($album)) {
print <<<EOT
-->
<ul class="cc list-box-b">
<!--
EOT;
		foreach ($album as $key => $value) {
print <<<EOT
-->
	<li>
		<dl>
			<dt><div><table style="height:100%;width:100%;"><tr><td class="tac"><a href="{$basename}a=selphoto&cyid=$cyid&aid=$value[aid]{$url_extra}"><img src="$value[lastphoto]" /></a></td></tr></table></div></dt>
			<dd><h2><a href="{$basename}a=selphoto&cyid=$cyid&aid=$value[aid]{$url_extra}" class="b" title="{$value[aname]}">$value[aname]</a></h2><p>共{$value[photonum]}张照片</p>
			</dd>
		</dl>
	</li>
<!--
EOT;
		}
print <<<EOT
-->
</ul>
<!--
EOT;
	} else {
print <<<EOT
-->
	<div class="tac">
		<p>&nbsp;</p>
		你还没有创建个人相册
	</div>
<!--
EOT;
	}
print <<<EOT
-->

<div class="c"></div>
<!--
EOT;
} elseif ($a == 'selphoto') {print <<<EOT
-->
<form action="{$basename}a=selphoto&cyid=$cyid" method="post">
<div class="p10">
<div class="o-info-a cc">
<select name="selaid" style="width:200px;" class="fr">{$options}</select>
<a href="{$basename}cyid=$cyid&a=upload">返回相册上传</a> | <a href="{$basename}cyid=$cyid&a=upload&job=flash">批量上传</a> | <a href="{$basename}cyid=$cyid">返回相册</a></div>
</div>
<div style="margin:0 20px 5px"><b class="f16">$album[aname]</b> （本相册共{$album[photonum]}张照片）&nbsp;<span class="gray">点击图片选择</span></div>
<input type="hidden" name="step" value="3" />
<input type="hidden" name="aid" value="$aid" />
<ul class="cc list-box-c">
<!--
EOT;
foreach ($cnpho as $key => $value) {print <<<EOT
-->
	<li onclick="checkselect(this,'$value[pid]');">
		<div></div><table style="height:100%;width:100%;"><tr><td class="tac"><img src="$value[path]" /></td></tr></table>
		<input type="checkbox" id="sel_{$value[pid]}" name="selid[]" value="$value[pid]" style="display:none" />
	</li>
<!--
EOT;
}print <<<EOT
-->
</ul>
<div class="tac" style="padding-top:30px;"><span class="button"><span><button type="submit">选择上传</button></span></span></div>
</form>
<script language="JavaScript">
function checkselect(o, id) {
	var sel = getObj('sel_' + id);
	if (sel.checked === false) {
		sel.checked = true;
		o.className = 'current';
	} else {
		sel.checked = false;
		o.className = '';
	}
}
</script>
<div class="c"></div>
<!--
EOT;
} elseif ($a == 'create' || $a == 'edit') {print <<<EOT
-->
<div class="p10">
<div class="o-info-a">
<!--
EOT;
if ($a == 'create') {print <<<EOT
-->
				创建相册
<!--
EOT;
} else {print <<<EOT
-->
				编辑相册
<!--
EOT;
}print <<<EOT
-->
				 | <a href="{$basename}cyid=$cyid{$extra_url}">返回群组相册</a></div>
		<form action="{$basename}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">
					<tr class="tr6">
							<td>相册名</td>
							<td><input type="text" class="input" name="aname" value="$rt[aname]" /></td>
					</tr>
					<tr class="tr6">
							<td>描述</td>
							<td><textarea name="aintro" style="width:350px;height:70px">{$rt[aintro]}</textarea></td>
					</tr>
					<tr class="tr6">
							<td>可见度</td>
							<td><select name="private"><option value="0" $select_0>全站用户可见</option><option value="1" $select_1>仅群内可见</option></select></td>
					</tr>
					<tr class="tr6">
							<td>&nbsp;</td>
							<td>
							<span class="button"><span><button type="submit">提 交</button></span></span>
							</td>
					</tr>
			</table>
		</form>
	 </div>
<div class="c"></div>
<!--
EOT;
}print <<<EOT
-->
	</td></tr></table>
</div>
<!--
EOT;
?>-->