<!--<?php
print <<<EOT
-->
<div id="content" class="w800 fr cc">
	<div class="y-bg"></div>
	<div class="y-bg2"></div>
	<div class="y-bg-content" style="padding:0 10px 50px 10px;">
	<div class="app-title cc">
		<a href="{$basename}space=1&q=photos" class="gray fr">进入个人空间浏览&raquo;</a><img src="$pwModeImg/applied/albums.png" class="fl" /><span>相册</span>
    </div>
    <div class="tabB cc">
        <ul>
            <li id="q_index"><a href="{$basename}q=$q&a=friend">好友相册</a></li>
            <li id="q_own"><a href="{$basename}q=$q&a=own">我的相册</a></li>
        </ul>
        <a href="{$basename}q=$q&a=upload" class="app-post">上传照片</a>
        <a href="{$basename}q=$q&a=create" class="app-post2">创建相册</a>
    </div>
<script language="JavaScript">
function ajaxurl(o) {
	read.obj = o;
	ajax.send(o.href,'',ajax.get);
	return false;
}
setCurrent('q_{$a_key}','q_index','current');
</script>
<!--
EOT;
if (empty($a) || $a == 'own' || $a == 'friend') {print <<<EOT
-->
	<div class="cc">
		<div class="photo-four cc">
<!--
EOT;
if (!empty($albumdb)) {
foreach ($albumdb as $key => $value) {
$prviteimg = !$value['private']?'key':'lock';
if (!$value['private']) {
	$prviteimg = "";
} elseif ($value['private'] == 1) {
	$prviteimg = "<img src=\"$pwModeImg/icon/lock.png\" title=\"仅好友可见\" class=\"fr\"/>";
} elseif ($value['private'] == 2) {
	$prviteimg = "<img src=\"$pwModeImg/icon/lock.png\" title=\"仅自己可见\" class=\"fr\"/>";
} elseif ($value['private'] == 3) {
	$prviteimg = "<img src=\"$pwModeImg/icon/key.png\" title=\"需要密码访问\" class=\"fr\"/>";
}
if (($u != $winduid || $a == 'friend') && $value['private'] == 3 && $groupid != 3) {
	$viewurl = "{$thisbase}q=$q&a=viewalbum&aid=$value[aid]&u=$value[ownerid]";
	$ajaxclick = "onclick=\"return ajaxurl(this);\"";
} else {
	$viewurl = "{$thisbase}q=$q&a=album&aid=$value[aid]&u=$value[ownerid]";
	$ajaxclick = "";
}
print <<<EOT
-->
			<!--[if IE 6]><a class="photo-hover" href="#"><table><tr><td><![endif]-->
        	<dl class="cc" style="width:280px;">
                <dt><div><a href="$viewurl" $ajaxclick><img src="$value[lastphoto]" /></a></div></dt>
                <dd>$prviteimg<h2><a href="$viewurl" class="b" $ajaxclick title="{$value[aname]}">{$value[sub_aname]}</a></h2>
                        <p class="gray">
                            更新:$value[lasttime]<br />
                            共{$value[photonum]}张照片<br />

<!--
EOT;
if ($value['ownerid'] == $winduid) {print <<<EOT
-->
                            <span class="fl mr10"><a href="{$thisbase}q=$q&a=upload&aid=$value[aid]">上传照片</a> | <a href="{$thisbase}q=$q&a=editalbum&aid=$value[aid]" onclick="return ajaxurl(this);">编辑相册</a></span>
<!--
EOT;
} else {print <<<EOT
-->
							<a href="u.php?uid=$value[ownerid]" class="fl mr10">$value[owner]</a>
<!--
EOT;
}if ($value['ownerid'] == $winduid || $groupid == 3) {print <<<EOT
-->
							<span class="none"><a href="{$thisbase}q=$q&a=delalbum&aid=$value[aid]" onclick="return ajaxurl(this)" title="删除相册" class="del">删除</a></span>
<!--
EOT;
}print <<<EOT
-->

						</p>
                </dd>
            </dl>
            <!--[if IE 6]></td></tr></table></a><![endif]-->
<!--
EOT;
}} else {print <<<EOT
-->
			<div class="p10">相册暂时没有照片</div>
<!--
EOT;
}print <<<EOT
-->
			<div class="c"></div>
			<div class="cc">$pages</div>
        </div>
    </div>
<!--
EOT;
} elseif ($a == 'album') {
print <<<EOT
-->
		<div class="cc">
			<div class="photo-four cc">
            	<h3>
<!--
EOT;
if ($isown) {print <<<EOT
-->
					<p><span class="f14 b">$album[aname]</span> <span class="gray">$album[photonum]张照片</span></p>

					<a href="{$thisbase}q=$q&a=editalbum&aid=$aid" onclick="return ajaxurl(this)"><img src="$pwModeImg/operation/edit.png" align="absmiddle" /> 编辑</a>
					<a href="{$thisbase}q=$q&a=upload&aid=$aid"><img src="$pwModeImg/operation/up.png" align="absmiddle" /> 上传</a>
                    <a href="{$thisbase}q=$q&a=delalbum&aid=$aid" onclick="return ajaxurl(this)" title="删除相册"><img src="$pwModeImg/operation/del.png" align="absmiddle" /> 删除</a>
                    <a href="{$thisbase}q=$q">返回所有相册</a>
<!--
EOT;
}else{print <<<EOT
-->
					<p><span class="f14 b">$album[owner]的相册 -$album[aname]</span> <span class="gray">$album[photonum]张照片</span></p>
					<a href="{$basename}q=$q&a=friend">返回好友相册</a>
<!--
EOT;
}if($db_share_open && !$shareGM){print<<<EOT
-->
					 <a href="javascript:;" onclick="sendmsg('operate.php?action=share&ajax=1&type=album&id=$aid','',this.id);"><img src="$pwModeImg/operation/share.png" align="absmiddle" />分享</a>
<!--
EOT;
}print <<<EOT
-->
				</h3>
                <ul class="cc">
<!--
EOT;
if ($cnpho) {
foreach ($cnpho as $key => $value) {print <<<EOT
-->
                    <li><table style="height:105px;width:100%;"><tr><td><a href="{$thisbase}q=$q&a=view&pid=$value[pid]" class="photo-img"><img src="$value[path]" /></a></td></tr></table>
                        <p>
                            <span id="ff" title="$value[pintro]">$value[sub_pintro]</span><br />
                            <span class="gray">共{$value[c_num]}条评论<br />
                            上传于<span class="f10">$value[uptime]</span></span>
<!--
EOT;
if ($isown || $isGM) {print <<<EOT
-->
							<a href="{$thisbase}q=$q&a=editphoto&pid=$value[pid]"><img src="$pwModeImg/operation/edit.png" /></a>
                            <a style="cursor: pointer;" onclick="pwConfirm('是否确认删除',this,function(){ajaxdel('$value[pid]')});" title="删除"><img src="$pwModeImg/operation/del.png" /></a>
<!--
EOT;
}print <<<EOT
-->
                        </p>
                    </li>


<!--
EOT;
}}else{print <<<EOT
-->
					<li>相册暂时没有照片</li>
<!--
EOT;
}print <<<EOT
-->
                </ul>
				<div class="mt10 cc">$pages</div>
            </div>
        </div>
<!--
EOT;
} elseif ($a == 'view') {
print <<<EOT
-->
		<div class="cc">
			<div class="photo-five cc">
            	<h3>
                    <p><span class="f14 b"><a href="{$thisbase}q=$q&a=album&aid=$photo[aid]" title="$photo[aname]">$photo[aname]</a></span> <span class="gray">$photo[photonum]张照片</span></p>
<!--
EOT;
if ($isown){print <<<EOT
-->
					<a href="{$thisbase}q=$q&a=editphoto&pid=$photo[pid]"><img src="$pwModeImg/operation/edit.png" align="absmiddle" /> 编辑</a>
                    <a href="{$thisbase}q=$q&a=upload&aid=$photo[aid]"><img src="$pwModeImg/operation/up.png" align="absmiddle" /> 上传</a>
                    <a style="cursor: pointer;" onclick="pwConfirm('是否将本照片设为封面',this,function(){ajaxSetCover('$photo[pid]')});"><img src="$pwModeImg/operation/set.png" align="absmiddle" /> 设为封面</a>
<!--
EOT;
}if($isown || $isGM){print <<<EOT
-->
					<a style="cursor: pointer;" onclick="pwConfirm('是否确认删除',this,function(){ajaxdel('$photo[pid]')});" title="删除"><img src="$pwModeImg/operation/del.png" align="absmiddle" /> 删除</a>

<!--
EOT;
}if($db_share_open && !$shareGM){print<<<EOT
-->
					<a href="javascript:;" onclick="sendmsg('operate.php?action=share&ajax=1&type=photo&id=$photo[pid]','',this.id);"><img src="$pwModeImg/operation/share.png" align="absmiddle" /> 分享</a>
<!--
EOT;
}print <<<EOT
-->
					<a style="cursor: pointer;" onclick="sendmsg('pw_ajax.php?action=report&type=photo&tid=$pid&pid=$u','',this.id);" id="report_photo"><img src="$pwModeImg/operation/report.png" align="absmiddle" /> 举报</a>
					<a href="javascript:;" onclick="ImgClick();"><img src="$pwModeImg/operation/oline.png" align="absmiddle" /> 原图</a>
                </h3>
                <div class="cc">
                	<div class="photo520 fl">
                    	<map name="FPMap0">
						<area shape="rect" id="next" href="{$thisbase}q=photos&a=pre&pid=$photo[pid]" onclick="return ajaxpage(this.href,'pre');" title="上一张">
						<area shape="rect" id="pre" href="{$thisbase}q=photos&a=next&pid=$photo[pid]" onclick="return ajaxpage(this.href,'next');" title="下一张">
						</map>
						<div class="tac" id="img-width"><img id="imgview" src="$photo[path]" usemap="#FPMap0"/></div>
						<div id="ff" style="width:470px;">$photo[pintro]</div><br /><span class="gray">上传于 {$photo[uptime]} | $photo[hits] 浏览 | $photo[c_num] 评论</span>
                    </div>
                    <div class="photo230 fr">
                        <div class="photo-img-one tac">
                            <h2>来自 $photo[aname]</h2>
                            <p><a style="cursor:pointer;" onclick="photolist.goPre(this);">上一张</a></p>
                            <table style="width:170px;">
                                <tr>
                                    <td class="tac" id="img_list">

<!--
EOT;
foreach($nearphoto as $value){
$ifsel = $pid == $value[pid] ? 'class="current"' : '';
print <<<EOT
-->
										<div class="mt8" id="imglist_{$value[pid]}">
<!--
EOT;
if($value[pid]=='begin'||$value[pid]=='end'){
print <<<EOT
-->
										<div><img src="$value[path]" style="cursor:pointer;" /></div>
<!--
EOT;
} else {print <<<EOT
-->
                                        <div $ifsel><a href="{$thisbase}q=$q&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>
                                </tr>
                            </table>
                            <p><a style="cursor:pointer;" onclick="photolist.goNext(this);">下一张</a></p>
                        </div>
                    </div>

                </div>


            </div>
        </div>
<script language="JavaScript" src="apps/$appdir/js/photolist.js"></script>
<script language="JavaScript">
var photolist = new photoList('img_list','$pid','$aid');

function toBreakWord(intLen){
var obj=document.getElementById("ff");
var strContent=obj.innerHTML;
var strTemp="";
while(strContent.length>intLen){
strTemp+=strContent.substr(0,intLen)+"<br>";
strContent=strContent.substr(intLen,strContent.length);
}
strTemp+=""+strContent;
obj.innerHTML=strTemp;
}
if(document.getElementById  &&  !document.all)  toBreakWord(100)
</script>
<div class="c"></div>

<script language="JavaScript" src="js/app_comment.js"></script>
<div class="w530">
<!--
EOT;
require_once PrintEot('m_comment');print <<<EOT
-->
</div>
<script language="JavaScript">
var imgMaxWidth=450;
var content = document.getElementById("img-width");
ImgLoad(content);

function ImgClick()
{
	var url = getObj('imgview');
	if (url.parentElement){
		if (url.parentElement.tagName!="A"){
			window.open(url.src);
		}
	}else{
		window.open(url.src);
	}
}

function ajaxpage(url,type) {
	var tourl = '{$thisbase}q=photos&a=view';
	ajax.send(url,'',function() {
		var rText = ajax.request.responseText.split('\\t');
		if (rText[0] == 'ok') {
			if (rText[1]) {
				window.location.href = tourl + '&pid=' + rText[1];
			} else {
				ajax.request.responseText = type == 'next' ? '已经是最后一张照片' : '已经是第一张照片';
				ajax.guide();
			}
		} else {
			ajax.guide();
		}
	});
	return false;
}

function bbimg()
{
	if (event.ctrlKey){
		var zoom=parseInt(this.style.zoom, 10)||100;
		zoom+=event.wheelDelta/12;
		if (zoom>0) this.style.zoom=zoom+'%';
		return false;
	}else{
		return true;
	}
}
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>
<!--
EOT;
} elseif ($a == 'editphoto') {print <<<EOT
-->
		<div class="cc">
              <div class="photo-tree">
               <h2>编辑相片 | <a href="{$thisbase}q=$q&a=view&pid=$pid">返回照片</a></h2>
                <form action="{$thisbase}q=$q&a=$a" method="post">
                <input type="hidden" name="step" value="3" />
                <input type="hidden" name="pid" value="$pid" />
                <table cellpadding="0" cellspacing="0">
                    <tr>
                        <td>选择相册</td><td><select name="aid">{$options}</select></td>
                    </tr>
                    <tr>
                        <td class="vt">描述</td>
						<td><textarea id="pintro" name="pintro"  style="width:350px;height:70px">$photo[pintro]</textarea>
						<div id="pintro_warn" class="gray">限 255 字节</div>
						</td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td>
							<span class="button"><span><button type="submit">编辑照片</button></span></span>
                        </td>
                    </tr>
                </table>
								</form>
              </div>
         </div>
<script language="JavaScript">
var charset = '$db_charset';
initCheckTextNum('pintro','pintro_warn',255);
</script>
<!--
EOT;
} elseif ($a == 'upload') {
$shortcut=@$_GET['s']?' target=formiframe ':'';
$formiframe=$shortcut?"<iframe src=javascript:; width=0 height=0 name='formiframe' onload=\"try{if(this.contentWindow.document.body.innerHTML.indexOf('操作完成')>0){showDialog('success','上传成功!')&(read.menu.style.top='400px')&getObj('uploadPhotoForm').reset()}else{showDialog('fail',this.contentWindow.document.getElementById('main').innerHTML.replace(/<.+?>/g,'').replace('提示消息','').replace('返 回 继 续 操 作',''))&(read.menu.style.top='400px')}}catch(e){}\"></iframe>":"";
if (empty($job)) {

print <<<EOT
-->
		<div class="cc">
		<div class="photo180 fl m10">
			<h2>提示：</h2>
			<p class="gray mb10">单张照片不得大于{$o_maxfilesize}kb</p>
			<p class="gray mb10"><span id="allowflash"></span></p>

		</div>
		$formiframe
		<form action="{$thisbase}q=$q&a=$a&job=$job" id="uploadPhotoForm" enctype="multipart/form-data" method="post" $shortcut >
		<input type="hidden" name="step" value="3" />
		<input type="hidden" name="verify" value="$verifyhash" />
		<div class="photo-one fr">
<!--
EOT;

if ($options) {print <<<EOT
-->
			<div class="mt10">
			<select name="aid" style="width:200px;" id="aidsel_info" onchange="getallowflash(this.value);">{$options}</select>

			</div><br />
<!--
EOT;
}
$show2rows=$shortcut?"style=display:none":"";
print <<<EOT
-->
			<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>
			<img id="ckcode" style="cursor:pointer;display:none;margin-bottom:5px;" onclick="this.src='ck.php?nowtime='+new Date().getTime();" alt="看不清楚，换一张" /><br />
			<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){print <<<EOT
-->
			<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>
		</form>
		</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
-->
<script type="text/javascript" language="JavaScript" src="js/upload.js"></script>
<div class="cc">
	<div class="photo180 fl m10">
		<h2>提示：</h2>
		<p class="gray mb10">单张照片不得大于{$o_maxfilesize}kb</p>
		<p class="gray mb10"><span id="allowflash"></span></p>
		<h2>其他上传方式</h2>
		<a href="{$thisbase}q=$q&a=$a&aid=$aid" class="uline">普通上传</a>
	</div>
	<div class="photo-two fr mt10">
		<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>
			<a style="cursor: pointer;margin-left:1em;" href="{$thisbase}q=$q&a=createajax&job=flash" onclick="return ajaxurl(this);">创建新相册</a>
<!--
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>
<script language="JavaScript">
photoflashAtt.init();
</script>
<!--
EOT;
}print <<<EOT
-->
<script language="JavaScript">
function getallowflash(aid) {
	ajax.send('mode.php?m=o&q=photos&a=getallowflash&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();
		}
	});
	return false;
}
window.onload=function()
{
getallowflash(getObj('aidsel_info').value);
};
</script>
<!--
EOT;
} elseif ($a == 'create') {print <<<EOT
-->
<div class="cc">
	<div class="photo-tree">
		<div class="help">

		</div>
		<h2>
<!--
EOT;
if ($a == 'create') {print <<<EOT
-->
				创建新相册
<!--
EOT;
if ($tips == 1) {print <<<EOT
-->
				<span style="color:#FF0000">* 您还未曾创建相册，请先建立一个！</span>
<!--
EOT;
}} else {print <<<EOT
-->
				编辑相册
<!--
EOT;
}print <<<EOT
-->
</h2>
<form action="{$thisbase}q=$q&a=$a" method="post">
<input type="hidden" name="step" value="3" />
<input type="hidden" name="aid" value="$aid" />
<input type="hidden" name="verify" value="$verifyhash" />
		<table cellpadding="0" cellspacing="0">
			<tr>
				<th>相册名<span class="red">*</span></th><td><input class="input" type="text" name="aname" value="$rt[aname]" id="aname" /><span id="aname_warn" class="gray">限 24 字节</span></td>
			</tr>
			<tr>
				<th class="vt">描述<span class="red">*</span></th>
				<td>
					<textarea id="aintro" name="aintro" class="textarea">{$rt[aintro]}</textarea>
					<p id="aintro_warn" class="gray"> 限 255 字节</p>
				</td>
			</tr>
			<tr>
				<th>可见度</th>
				<td>
					<select name="private" onchange="optionsel(this.value)">
						<option value="0" $select_0>全站用户可见</option>
						<option value="1" $select_1>仅好友可见</option>
						<option value="2" $select_2>仅自己可见</option>
						<option value="3" $select_3>需要密码访问</option>
					</select>
				</td>
			</tr>
			<tbody id="photopwd" style="display:none">
			<tr>
				<td align="right" class="gray">输入密码</td>
				<td>
					<input type="password" name="pwd" id="pwdinfo" />&nbsp;<span id="pwdinfo_warn" class="gray">最小长度:3 最大长度:15</span>
				</td>
			</tr>
			<tr>
				<td align="right" class="gray">确认密码</td>
				<td>
					<input type="password" name="repwd"/>
				</td>
			</tr>
			</tbody>
<!--
EOT;
if ($o_photos_gdcheck) {print <<<EOT
-->
			<tr>
				<td>&nbsp;</td>
				<td>
					<div>认证码:</div>
					<img id="ckcode" style="cursor:pointer;display:none;margin-bottom:5px;" onclick="this.src='ck.php?nowtime='+new Date().getTime();" alt="看不清楚，换一张" />
					<input class="input" onfocus="showCK();" type="text" name="gdcode" id="gdcode" style="width:50px;" tabindex="3"  />
				</td>
			</tr>
<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){print <<<EOT
-->
			<tr>
				<td>&nbsp;</td>
				<td>
				<div>验证问答: {$db_question[$qkey]} （正确答案:{$db_answer[$qkey]}）
				<input class="input" name="qanswer" id="qanswer" size="25" tabindex="7" />
				<input type="hidden" name="qkey" id="qkey" value="$qkey" />	  </div>
				</td>
			</tr>
<!--
EOT;
}print <<<EOT
-->
			<tr>
				<td></td>
				<td>
				<span class="button"><span><button type="submit">创建相册</button></span></span>
				</td>
			</tr>
		</table>
</form>
	</div>
</div>
<script language="JavaScript">
var charset = '$db_charset';
initCheckTextNum('aname','aname_warn',24);
initCheckTextNum('aintro','aintro_warn',255);
initCheckTextNum('pwdinfo','pwdinfo_warn',15);

function optionsel(id) {
	pwdobj = getObj('photopwd');
	if (isNaN(id)) {
		showDialog('error','非法操作');
	}
	if (id == '3') {
		pwdobj.style.display = '';
	} else {
		pwdobj.style.display = 'none';
	}
}
</script>
<!--
EOT;
}print <<<EOT
-->
<script language="JavaScript">
function ajaxdel(pid) {
	ajax.send('mode.php?m=o&q=photos&a=delphoto&pid='+pid,'',function() {
		var rText = ajax.request.responseText.split('\\t');
		if (rText[0] == 'ok') {
			window.location = 'mode.php?m=o&q=photos&a=album&aid='+rText[1];
		} else {
			ajax.guide();
		}
	});
	return false;
}
function ajaxSetCover(pid){
	ajax.send('mode.php?m=o&q=photos&a=setcover&pid='+pid,'',function() {
		var rText = ajax.request.responseText.split('\\t');
		if (rText[0] == 'ok') {
			showDialog('succes','设置封面成功!',1);
		} else {
			ajax.guide();
		}
	});
	return false;
}
</script>
</div>
<div class="y-bg2"></div>
<div class="y-bg"></div>
</div>
<script language="JavaScript" src="js/global.js"></script>
<script language="JavaScript" src="js/app_global.js"></script>
<style>
html,body{background:#FFF}
</style>
<!--
EOT;
exit;
?>-->
