<!--<?php 
print <<<EOT
--><!doctype html>
<html>
<head>
<meta charset="$db_charset" />
<title>上傳照片</title>
<base id="headbase" href="$db_bbsurl/" />
<link rel="stylesheet" href="images/pw_core.css?{$GLOBALS['wind_repair']}" />
<link rel="stylesheet" href="u/images/style.css?{$GLOBALS['wind_repair']}" />
<script type="text/javascript" src="js/pw_ajax.js"></script>
<script type="text/javascript" src="js/core/core.js"></script>
<script type="text/javascript" src="js/core/tab.js"></script>
<script>
var imgpath = '$imgpath';
var verifyhash = '$verifyhash';
var winduid = '$winduid';
var windid	= '$windid';
var groupid	= '$groupid';
var charset = '$db_charset';
var basename = '$basename';
var temp_basename = '$temp_basename';
</script>
</head>
<style type="text/css">
html,body{background:#fff;overflow:hidden;}
.s1{color:#f00;}/*red*/
.s2{color:#f50;}/*org*/
.s3{color:#080;}/*green*/
.s4{color:#369;}/*blue*/
.s5{color:#333;}/*black*/
.s6{color:#666;}
.s7{color:#6fb0d6;}
.gray{color:#999;}
</style>
<body>
<div style="background:#fff;height:600px;">
<script>
function ajaxurl(o) {
	read.obj = o;
	ajax.send(o.href,'',ajax.get);
	return false;
}
</script>
<!--
EOT;
if($a == 'upload') {
$shortcut=$_GET['s']?' target=formiframe ':'';
$formiframe=$shortcut?"<iframe src=javascript:; style='display:none;' width=0 height=0 name='formiframe' onload=\"iPhotoForm(this)\"></iframe>":"";
if (empty($job)) {
print <<<EOT
-->
<div class="p10">
$formiframe
<form action="{$basename}a=$a&ajax=1&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="mb10">
<!--
EOT;
if ($options) {print <<<EOT
-->
		<select name="aid" id="aidsel_info" class="mr10" onChange="getallowflash(this.value);">{$options}</select>
<!--
EOT;
}print <<<EOT
-->
		<span id="allowflash" class="mr10">請選擇相冊</span><span class="gray">(單張照片不得大于{$o_maxfilesize}kb)</span>
	</div>
	<div class="photoup">
		<dl class="cc" style="height:130px;">
			<dt><span><img id="preview_1" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=image);" width="90" height="90" src="$imgpath/90.png"></span></dt>
			<dd><p><input type="file" class="input" name="photo_1" id="p_1" accept="image/*" onChange="preview_img(1);"/></p>
			<p style="margin-top:8px;"><textarea id="pintro_1" name="pintro[1]" class="textareaA mb5"></textarea></p>
			<span class="s6" id="pintro_1_warn">限255字節</span>
			</dd>
		</dl>
		<dl class="cc" style="height:130px;">
			<dt><span><img id="preview_2" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=image);" width="90" height="90" src="$imgpath/90.png"></span></dt>
			<dd><p><input type="file" class="input" name="photo_2" id="p_2" accept="image/*" onChange="preview_img(2);"/></p>
			<p style="margin-top:8px;"><textarea id="pintro_2" name="pintro[2]" class="textareaA mb5"></textarea></p>
			<span class="s6" id="pintro_2_warn">限255字節</span>
			</dd>
		</dl>
	</div>
<!--
EOT;
if ($o_photos_gdcheck) {
$checkCode = L::loadClass('checkcode', 'site');
$checkCodeString = $checkCode->getCheckCodeTemplate();
print <<<EOT
-->
	<div class="mb10">驗證碼: <input class="input mr5" type="text" onfocus="showgd();" name="gdcode" id="fs_gdcode" size="5" tabindex="3"  />
		<span id="ckcode" style="display:none;"></span>
$checkCodeString
	</div>
<!--
EOT;
}if($o_photos_qcheck && $db_question){
list(,$showq)=explode("\t",$db_qcheck);
if($db_imagequestion){
	$question = '<img id="ckquestion" src="ckquestion.php?q='.$qkey.'&t='.$timestamp.'" align="top">';
}else{
	$question = $qkey<0 ? getMachineQuestion_1() :  $db_question[$qkey];
}
$q_a = $question.($showq && $qkey>0?" （答案︰".$db_answer[$qkey] . '）' : '');
print <<<EOT
-->
	<div class="mb10">驗證問答: {$q_a}
		<input class="input" name="qanswer" id="qanswer" size="25" tabindex="7" />
		<input type="hidden" name="qkey" id="qkey" value="$qkey" />
	</div>
<!--
EOT;
}print <<<EOT
-->
	<span class="btn" style="margin-left:0;"><span><button type="submit">開始上傳</button></span></span>
</form>
</div>
<script>
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);
</script>
<!--
EOT;
}print<<<EOT
-->
<script>
function getallowflash(aid) {
	ajax.send('{$basename}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;
}print <<<EOT
-->
<script>
function ajaxdel(pid) {
	ajax.send('{$basename}a=delphoto&pid='+pid,'',function() {
		var rText = ajax.request.responseText.split('\\t');
		if (rText[0] == 'ok') {
			window.location = '{$basename}a=album&aid='+rText[1];
		} else {
			ajax.guide();
		}
	});
	return false;
}
function ajaxSetCover(pid){
	ajax.send('{$basename}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>
<script type="text/javascript" src="js/global.js"></script>
<script type="text/javascript" src="js/app_global.js"></script>
</body></html>
<!--
EOT;
?>-->
