<!--<?php
if ($a == 'del') {print <<<EOT
-->
<div style="width:200px;" class="cc">
	<div class="p15">您確定要刪除該帖嗎？</div>
	<div class="popBottom">
	<span class="btn2"><span>
<!--
EOT;
if($pid){print<<<EOT
-->
	<button type="button" onclick="ajax.send('apps.php?q=group&a=del&cyid=$cyid&tid=$tid&pid=$pid','step=2',ajax.get)">刪 除</button>
<!--
EOT;
}else{print <<<EOT
-->
	<button type="button" onclick="ajax.send('apps.php?q=topicadmin&action=del&ajax=1&cyid=$cyid&seltid=$seltid','step=2',ajax.get)">刪 除</button>
<!--
EOT;
}print <<<EOT
-->
	</span></span>
	<span class="bt2"><span><button type="button" onclick="closep();">取消</button></span></span>
	</div>
</div>
<!--
EOT;
} elseif ($a == 'toptopic') {
if($topped == 1){print <<<EOT
-->
<div style="width:200px;" class="cc">
	<div class="p15">您確定要置頂該帖嗎？</div>
	<div class="popBottom">
	<span class="btn2"><span><button type="button" onclick="ajax.send('apps.php?q=topicadmin&action=toptopic&topped=1&ajax=1&cyid=$cyid&seltid=$seltid','step=2',ajax.get)">確定</button></span></span>
	<span class="bt2"><span><button type="button" onclick="closep();">取消</button></span></span>
	</div>
</div>
<!--
EOT;
} else {print <<<EOT
-->
<div style="width:200px;" class="cc">
	<div class="p15">您確定要取消置頂該帖嗎？</div>
	<div class="popBottom">
	<span class="btn2"><span><button type="button" onclick="ajax.send('apps.php?q=topicadmin&action=toptopic&topped=0&ajax=1&cyid=$cyid&seltid=$seltid','step=2',ajax.get)">確定</button></span></span>
	<span class="bt2"><span><button type="button" onclick="closep();">取消</button></span></span>
	</div>
</div>	
<!--
EOT;
}} elseif ($a == 'digest') {
if($digest == 1){print <<<EOT
-->
<div style="width:200px;" class="cc">
	<div class="p15">您確定要加精該帖嗎？</div>
	<div class="popBottom">
	<span class="btn2"><span><button type="button" onclick="ajax.send('apps.php?q=topicadmin&action=digest&digest=1&ajax=1&cyid=$cyid&seltid=$seltid','step=2',ajax.get)">確定</button></span></span>
	<span class="bt2"><span><button type="button" onclick="closep();">取消</button></span></span>
	</div>
</div>
<!--
EOT;
} else {print <<<EOT
-->
<div style="width:200px;" class="cc">
	<div class="p15">您確定要取消加精該帖嗎？</div>
	<div class="popBottom">
	<span class="btn2"><span><button type="button" onclick="ajax.send('apps.php?q=topicadmin&action=digest&digest=0&ajax=1&cyid=$cyid&seltid=$seltid','step=2',ajax.get)">確定</button></span></span>
	<span class="bt2"><span><button type="button" onclick="closep();">取消</button></span></span>
	</div>
</div>
<!--
EOT;
}} elseif ($a == 'writedel') {print <<<EOT
-->
<form action="{$basename}&a=$a&cyid=$cyid&id=$id" onsubmit="return false;" method="post">
<input type="hidden" name="step" value="2" />
<div style="width:200px;" class="cc">
	<div class="p15">您確定要刪掉該記錄嗎？</div>
	<div class="popBottom">
	<span class="btn2"><span><button type="button" onclick="ajax.submit(this.form)">確 定</button></span></span>
	<span class="bt2"><span><button type="button" onclick="closep();">取消</button></span></span>
	</div>
</div>
</form>
<!--
EOT;
} elseif ($a == 'ajaxedit') {print <<<EOT
-->
<div style="width:400px">
<script type="text/javascript" id="o_edit">
function o_edit() {
	var str = ajax.request.responseText.split("\t");
	if (str[0] == 'success') {
		var id  = read.obj.id;
		id = id.substr(id.lastIndexOf('_')+1);
		getObj('subject_'+id).innerHTML	= str[1];
		getObj('read_'+id).innerHTML	= str[2];
	} else {
		ajax.guide();
	}
}
</script>
	<form action="apps.php?q=group&a=$a&cyid=$cyid" onsubmit="return false;" method="post">
	<input type="hidden" name="tid" value="$tid" />
	<input type="hidden" name="pid" value="$pid" />
	<input type="hidden" name="step" value="3" />
	<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><a class="adel" href="javascript:;" onclick="closep();">關閉</a>編輯話題</div>
	<table width="100%" class="vt">
		<tr><td width="40">標題</td><td><input class="input input_wa" type="text" name="atc_title" value="$atc_title" /></td></tr>
		<tr><td >內容</td><td><textarea name="atc_content" class="textareaA">$atc_content</textarea></td></tr>
	</table>
	<div class="popBottom"><span class="bt2"><span><button type="button" onclick="window.location.href='apps.php?q=group&a=edit&cyid=$cyid&tid=$tid&pid=$pid&article=$article'">進入高級模式</button></span></span><span class="btn2"><span><button type="button" onclick="ajax.submit(this.form,o_edit)">提 交</button></span></span>
	</div>
	</form>
</div>
<!--
EOT;
} elseif ($a == 'active') {
if ($job == 'join'){print <<<EOT
-->
<div style="width:320px">
<form action="{$basename}a=$a&job=$job&cyid=$cyid" method="post" onsubmit="return false;">
<input type="hidden" name="verify" value="$verifyhash" />
<input type="hidden" name="id" value="$id">
<input type="hidden" name="step" value="1">
<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><a class="fr adel" href="javascript:;" onclick="closep();">關閉</a>活動報名</div>
<table width="100%" cellspacing="0" cellpadding="0">
	<tr><td>真實姓名︰<span class="s1">*</span></td><td><input type="text" name="realname" class="input input_wa" /></td></tr>
	<tr><td>手機︰<span class="s1">*</span></td><td><input type="text" name="mobile" class="input input_wa" /></td></tr>
	<tr><td>電話︰</td><td><input type="text" name="phone" class="input input_wa" /></td></tr>
	<tr><td>地址︰</td><td><input type="text" name="address" class="input input_wa" /></td></tr>
	<tr><td>匿名︰</td><td><label for="anonymous"><input id="anonymous" type="checkbox" name="anonymous" value="1" />僅管理人員可見</label></td></tr>
</table>
<div class="popBottom">
	<span class="btn2"><span><button name="ajaxsubmit" onclick="return groupsubmit(this.form)" type="button">確認報名</button></span></span>
</div>
</form>
<script type="text/javascript">
groupsubmit = function(fp){
	if(fp['realname'].value == ""){
		ajax.showError('請填寫真實姓名。');return false;
	}
	if(fp['mobile'].value == ""){
		ajax.showError('請填寫手機號碼。');return false;
	}
	if((/^1[3-9]\d{9}$/.test(fp['mobile'].value)) == false){
		ajax.showError('無效的手機號碼。');return false;
	}
	ajax.submit(fp);
}
</script>
</div>
<!--
EOT;
} elseif ($job == 'del') {print <<<EOT
-->
<form action="{$basename}a=$a&job=$job&cyid=$cyid" method="post">
<input type="hidden" name="verify" value="$verifyhash" />
<!--
EOT;
if($frombbs == 1){print<<<EOT
-->
<input type="hidden" name="frombbs" value="1" />
<!--
EOT;
}print<<<EOT
-->
<input type="hidden" name="id" value="$id">
<input type="hidden" name="step" value="1">
<div style="width:250px;">
	<div class="p15">取消活動後，活動的所有信息將被刪除!</div>
    <div class="popBottom">
        <span class="btn2"><span><button type="submit">確 定</button></span></span>
        <span class="bt2"><span><button type="button" onclick="closep();">取消</button></span></span>
    </div>
</div>
</form>
<!--
EOT;
} elseif ($job == 'quit') {print <<<EOT
-->
<form action="{$basename}a=$a&job=$job&cyid=$cyid" method="post" onsubmit="return false;">
<input type="hidden" name="verify" value="$verifyhash" />
<input type="hidden" name="id" value="$id">
<input type="hidden" name="step" value="1">
<div style="width:250px;">
	<div class="p15">退出活動後，你的報名信息將被刪除。<br />如需退款請與活動發起人聯系。</div>
    <div class="popBottom">
	<span class="btn2"><span><button type="button" onclick="ajax.submit(this.form)">退 出</button></span></span>
	<span class="bt2"><span><button type="button" onclick="closep();">取消</button></span></span>
	</div>
</div>
</form>
<!--
EOT;
} elseif ($job == 'delmember') {print <<<EOT
-->
<form action="{$basename}a=$a&job=$job&cyid=$cyid" method="post" onsubmit="return false;">
<input type="hidden" name="verify" value="$verifyhash" />
<input type="hidden" name="id" value="$id">
<input type="hidden" name="uid" value="$uid">
<input type="hidden" name="step" value="1">
<div style="width:250px;">
	<div class="p15">確定要刪除該報名用戶嗎?</div>
    <div class="popBottom">
	<span class="btn2"><span><button type="button" onclick="ajax.submit(this.form)">確 定</button></span></span>
	<span class="bt2"><span><button type="button" onclick="closep();">取消</button></span></span>
	</div>
</div>
</form>
<!--
EOT;
} elseif ($job == 'sendmsg') {print <<<EOT
-->
<form action="apps.php?q=group&cyid=$cyid&a=active&job=$job" method="post" onsubmit="return false;">
<input type="hidden" name="verify" value="$verifyhash" />
<input type="hidden" name="step" value="2" />
<input type="hidden" name="id" value="$id" />
<div class="h" style="cursor:move" onmousedown="read.move(event);"><span class="adel" onclick="closep();">close</span>群發短消息</div>
<table cellspacing="0" cellpadding="0" width="440">
	<tbody>
	<tr><td align="center">標題</td><td><input type="text" class="input" name="subject" maxlength="100" size="50"/></td></tr>
	<tr><td align="center">內容</td><td><textarea name="atc_content" rows="8" style="width:330px"></textarea></td></tr>
	</tbody>
</table>
<div class="p10 tac"><span class="btn2"><span><button type="button" name="ajaxsubmit" onclick="ajax.submit(this.form);">提 交</button></span></span></div>
</form>
<!--
EOT;
}
} elseif ($a == 'out') {print <<<EOT
-->
<form action="{$basename}&a=$a&cyid=$cyid" onsubmit="return false;" method="post">
<input type="hidden" name="step" value="3" />
	<div style="width:250px;">
		<div class="p15">
<!--
EOT;
if ($colony['admin'] == $windid) {print <<<EOT
-->
			您是該群組的創建者，您確定要解散該群組嗎？
<!--
EOT;
} else {print <<<EOT
-->
			您確定要退出該群組嗎？
<!--
EOT;
}print <<<EOT
-->
		</div>
		<div class="popBottom">
		<span class="btn2"><span><button type="button" onclick="ajax.submit(this.form)">確 定</button></span></span>
		<span class="bt2"><span><button type="button" onclick="closep();">取消</button></span></span>
	</div>
	</div>
	</form>
<!--
EOT;
} elseif ($a == 'fanoutmsg') {print <<<EOT
-->
<div style="width:450px;">
	<form action="{$basename}a=fanoutmsg&cyid=$cyid" onsubmit="return false;" method="post">
	<input type="hidden" name="step" value="3" />
	<input type="hidden" name="group" value="$group" />
	<input type="hidden" name="uids" value="$uids" />
	<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><a class="fr adel" href="javascript:;" onclick="closep();">關閉</a>群發消息</div>
	<table cellpadding="0" cellspacing="0" width="100%" class="vt">
		<tr>
			<td width="70">群發對象</td>
			<td> $usernames
<!--
EOT;
if (!$selid && $total > 3) {
$s_lang = array(
	'0' => '群員',
	'1' => '管理成員',
	'2' => '普通成員',
	'3' => '未驗證會員'
);
print <<<EOT
-->
				等 {$total} 位{$s_lang[$group]}
<!--
EOT;
}print <<<EOT
-->
			</td>
		</tr>
		<tr>
			<td>標題</td>
			<td><input type="text" class="input input_wa" name="subject" /></td>
		</tr>
		<tr>
			<td>內容</td>
			<td><textarea name="content" class="textareaA"></textarea></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td><span class="btn2"><span><button type="button" onclick="ajax.submit(this.form);">提 交</button></span></span></td>
		</tr>
	</table>
	</form>
</div>
<!--
EOT;
} elseif ($a == 'delalbum') {print <<<EOT
-->
	<form action="{$basename}&a=$a&cyid=$cyid" onsubmit="return false;" method="post">
	<input type="hidden" name="aid" value="$aid" />
	<input type="hidden" name="step" value="3" />
	<input type="hidden" name="from" value="$from" />
	<div style="width:200px;">
		<div class="p15">刪除相冊將同時刪除所有照片<br />您確定要刪除嗎？</div>
		<div class="popBottom">
		<span class="btn2"><span><button type="button" onclick="ajax.submit(this.form)">刪 除</button></span></span>
		<span class="bt2"><span><button type="button" onclick="closep();">取消</button></span></span>
	</div>
	</div>
	</form>
<!--
EOT;
} elseif ($a == 'editalbum') {print <<<EOT
-->
	<form action="{$baseUrl}q=photos&a=editalbum" onSubmit="return false;" method="POST">
		<input type="hidden" name="step" value="3" />
		<input type="hidden" name="aid" value="$aid" />
		<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><a class="adel" href="javascript:;" onclick="closep();">關閉</a>編輯相冊</div>
		<table cellpadding="0" cellspacing="0" width="450px">
			<tr>
				<td width="14%">相冊名</td>
				<td><input type="text" id="ajax_aname" name="aname" value="$rt[aname]" />&nbsp; <span id="ajax_aname_warn">限 24 字節</span></td>
			</tr>
			<tr>
				<td>描述</td>
				<td>
					<textarea id="ajax_aintro" name="aintro" style="width:350px;height:70px">{$rt[aintro]}</textarea>
					<span id="ajax_aintro_warn" class="fr" style="margin-right:15px;"> 限 255 字節</span>
				</td>
			</tr>
			<tr>
				<td>可見度</td>
				<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>
<!--
EOT;
if($select_3 == 'selected'){print<<<EOT
-->
					<span id="resetpwd_$rt[aid]" onclick="resetpwd();" style="cursor:pointer">重設密碼</span>
<!--
EOT;
}else{print<<<EOT
-->
					<span id="resetpwd_$rt[aid]"></span>
<!--
EOT;
}print <<<EOT
-->
				</td>
			</tr>
			<tbody id="photo_pwd" style="display:none">
			<tr>
				<td>輸入密碼</td>
				<td>
					<input type="password" name="pwd" id="c_ajax_pwdinfo" />&nbsp;<span id="c_ajax_pwdinfo_warn">最小長度:3 最大長度:15</span>
				</td>
			</tr>
			<tr>
				<td>確認密碼</td>
				<td>
					<input type="password" name="repwd" id="repwd_info" />
				</td>
			</tr>
			</tbody>
		</table>
		<div class="popBottom"><span class="btn2"><span><button type="submit" onclick="ajax.submit(this.form)">編輯相冊</button></span></span><span class="bt2"><span><button type="button" onclick="closep();">取消</button></span></span></div>
	</form>
<script type="text/javascript">
var charset = '$db_charset';
setTimeout(function(){initCheckTextNum('ajax_aname','ajax_aname_warn',24);},300);
setTimeout(function(){initCheckTextNum('ajax_aintro','ajax_aintro_warn',255);},300);
function resetpwd() {
	getObj('resetpwd_$rt[aid]').style.display = 'none';
	getObj('photo_pwd').style.display = '';
}
function optionsel(id) {
	var pwdobj = getObj('photo_pwd');
	var resetpwdid = getObj('resetpwd_$rt[aid]');
	resetpwdid.style.display = 'none';
	if (isNaN(id)) {
		showDialog('error','非法操作');
	}
	if (id == '3') {
		pwdobj.style.display = '';
	} else {
		pwdobj.style.display = 'none';
	}
}
</script>
<!--
EOT;
} elseif ($a == 'uintro') {
if ($job != 'set') {print <<<EOT
-->
<div style="width:400px;">
	<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><a class="adel" href="javascript:;" onclick="closep();">關閉</a>通訊資料</div>
	<table cellpadding="0" cellspacing="0" width="100%" class="z">
		<tr class="tr3">
			<td width="80">用戶</td>
			<td>
				$uinfo[username]
<!--
EOT;
if ($winduid == $uinfo['uid']) {print <<<EOT
-->
				[<a href="apps.php?q=group&a=uintro&cyid=$cyid&job=set" onclick="ajax.send(this.href,'',ajax.get);return false;">編輯我的通訊錄</a>]
<!--
EOT;
}print <<<EOT
-->
			</td>
		</tr>
		<tr class="tr3">
			<td>真實姓名</td>
			<td>$uinfo[realname]</td>
		</tr>
		<tr class="tr3">
			<td>性別</td>
			<td>
<!--
EOT;
if ($uinfo['gender'] == '1') {print <<<EOT
-->
				男
<!--
EOT;
} elseif ($uinfo['gender'] == '2') {print <<<EOT
-->
				女
<!--
EOT;
} else {print <<<EOT
-->
				保密
<!--
EOT;
}print <<<EOT
-->
			</td>
		</tr>
		<tr class="tr3">
			<td>電話</td>
			<td>$uinfo[tel]</td>
		</tr>
		<tr class="tr3">
			<td>電子郵箱</td>
			<td>$uinfo[email]</td>
		</tr>
		<tr class="tr3">
			<td>聯系地址</td>
			<td>$uinfo[address]</td>
		</tr>
		<tr class="tr3">
			<td>介紹說明</td>
			<td>$uinfo[introduce]</td>
		</tr>
	</table>
</div>
<!--
EOT;
} else {print <<<EOT
-->
<div style="width:500px">
	<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><a class="adel" href="javascript:;" onclick="closep();">關閉</a>編輯通訊資料</div>
	<form action="apps.php?q=group&a=$a" method="post" onsubmit="return false">
	<input type="hidden" name="step" value="3" />
	<input type="hidden" name="cyid" value="$cyid" />
	<table cellpadding="0" cellspacing="0" width="100%" class="mb5 vt">
		<tr class="tr3">
				<td width="80">用戶</td>
				<td>$uinfo[username]</td>
		</tr>
		<tr class="tr3">
				<td>真實姓名</td>
				<td><input type="text" class="input input_wa mr5" name="realname" id="realname" value="$uinfo[realname]" /><span id="realname_warn" class="s6">限 20 字節</span></td>
		</tr>
		<tr class="tr3">
				<td>性別</td>
				<td>
						<select name="gender" class="select_wa">
								<option value="0" $select_0>保密</option>
								<option value="1" $select_1>男</option>
								<option value="2" $select_2>女</option>
						</select>
				</td>
		</tr>
		<tr class="tr3">
				<td>電話</td>
				<td><input type="text" class="input input_wa" name="tel" value="$uinfo[tel]" /></td>
		</tr>
		<tr class="tr3">
				<td>電子郵箱</td>
				<td><input type="text" class="input input_wa" name="email" value="$uinfo[email]" /></td>
		</tr>
		<tr class="tr3">
				<td>聯系地址</td>
				<td><input type="text" class="input input_wb mb5" name="address" id="address" value="$uinfo[address]" /><p id="address_warn" class="s6">限 255 字節</p></td>
		</tr>
		<tr class="tr3">
				<td>介紹說明</td>
				<td><textarea name="introduce" onclick="" id="introduce" class="textareaA mb5">$uinfo[introduce]</textarea><p id="introduce_warn" class="s6">限 255 字節</p></td>
		</tr>
	</table>
	<div id="warn"></div>
	<div class="popBottom"><span class="btn2"><span><button type="button" onclick="checkPost(this.form);">提 交</button></span></span></div>
	</form>
</div>
<script type="text/javascript">
function checkPost(obj) {
	if (obj.realname.value.length > 20) {
		showError('真實姓名不能大于20字符',3000);
		return false;
	}
	if (obj.tel.value.length > 15) {
		showError('電話號碼不能大于15字符',3000);
		return false;
	}
	if (obj.email.value.length > 50) {
		showError('電子郵箱不能大于50字符',3000);
		return false;
	}
	if (obj.address.value.length > 255) {
		showError('地址不能大于255字符',3000);
		return false;
	}
	if (obj.introduce.value.length > 255) {
		showError('介紹說明不能大于255字符',3000);
		return false;
	}
	var reg = /^([\w|-|\.])+@([\w|-|\.])+(([\w|-|\.]{2,3}){1,2})$/;
	if(obj.email.value.length != 0 && reg.test(obj.email.value) == false){
		showError('電子郵箱格式不正確',3000);
		return false;
	}
	ajax.submit(obj);
}

function showError(msg, time) {
	var warn = document.getElementById("warn");
	var html = "<div class=\"wrongTip\">"+msg+"</div>";
	warn.innerHTML = html;
	warn.style.display = '';
	if(time){			
		setTimeout(function(){warn.style.display = 'none';},time);
	}
}
var charset = '$db_charset';
setTimeout(function(){initCheckTextNum('realname','realname_warn',20);},300);
setTimeout(function(){initCheckTextNum('address','address_warn',255);},300);
setTimeout(function(){initCheckTextNum('introduce','introduce_warn',255);},300);
</script>
<!--
EOT;
}}elseif($a=='recommend'){print <<<EOT
-->
<div style="width:440px;">
<form method="post" name="FORM" action="operate.php?action=share&ajax=1" onsubmit="return false;">
<input type="hidden" name="step" value="2" />
<input type="hidden" name="type" value="groups" />
<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><a class="adel" href="javascript:;" onclick="closep();">關閉</a>推薦</div>
<table width="100%" class="vt mb5">
	<tr class="tr3">
		<td width="80">推薦方式:</td>
		<td>消息推薦</td>
	</tr>
	<tr class="tr3">
		<td>對方姓名:</td>
		<td><input type="text" class="input input_wa" name="sendtoname" value="" />
<!--
EOT;
if($frienddb){print <<<EOT
-->
		<span class="bta" onClick="if (getObj('tofriend').style.display=='none'){getObj('tofriend').style.display='';}else{getObj('tofriend').style.display='none';}" style="cursor:pointer;">好友列表</span>
<!--
EOT;
}print <<<EOT
-->
		</td>
	</tr>
	<tr id="tofriend" style="display:none" class="tr3 vt">
		<td align="center">好友選擇:</td>
		<td>
			<div class="fri-list pr">
							<div class="fri-top">
								<span class="fr">
									<select name="friendtype" onchange="showFriendList(this.value);">
										<option value="-1">全部好友</option>
<!--
EOT;
foreach ($friendtype as $key => $value) {print <<<EOT
-->
										<option value="$key">$value[name]</option>
<!--
EOT;
}print <<<EOT
-->
									</select>
								</span>
								<span class="btn2"><span><button type="submit" onclick="CheckAll(this.form)">全選</button></span></span>
							</div>
							<div class="fri-bot" id="friendlist">
								<ul class="list-wid cc listC">
<!--
EOT;
foreach ($friendtype as $key => $value) {print <<<EOT
-->
									<div id="ftid_$value[ftid]">
<!--
EOT;
foreach ($frienddb[$value[ftid]] as $k => $v) {print <<<EOT
-->
										<li><input type="checkbox" name="touid[]" value="$v[uid]" {$checked[$v[uid]]}> $v[username]</li>
<!--
EOT;
}print <<<EOT
-->
									</div>
<!--
EOT;
}print <<<EOT
-->
								</ul>
							</div>
						</div>
<script type="text/javascript" src="js/core/friendlist.js"></script>

		</td>
	</tr>
	<tr class="tr3">
		<td>標題:</td>
		<td><input type="text" class="input input_wb" name="subject" value="&quot;{$windid}&quot;$atc_name" /></td>
	</tr>
	<tr class="tr3">
		<td>內容:</td>
		<td>
<!--
EOT;
if($type == 'user') {print <<<EOT
-->
					<textarea class="textareaA" name="atc_content" onkeydown="ajax.quickpost(event,this.form)">我很喜歡用戶[url={$db_bbsurl}/{$db_userurl}{$uid}]{$username}[/url]的個人空間，特別推薦。\n\n他（她）的用戶名:\n$title\n\n希望你能喜歡。</textarea>
<!--
EOT;
}else{print <<<EOT
-->
					<textarea class="textareaA" name="atc_content" onkeydown="ajax.quickpost(event,this.form)">
EOT;
$uid || $uid = $u;print <<<EOT
我在用戶[url={$db_bbsurl}/{$db_userurl}{$uid}]{$username}[/url]的個人空間發現這個信息，認為很有價值，特別推薦。\n\n主要信息:\n$title\n\n描述:\n$descrip\n\n希望你能喜歡。</textarea>
<!--
EOT;
}print <<<EOT
-->
		</td>
	</tr>
</table>
<div class="popBottom"><span class="btn2"><span><button type="button" name="ajaxsubmit" style="width:80px;" onclick="ajax.submit(this.form);">提 交</button></span></span><span class="bt2"><span><button type="button" onclick="closep();">取消</button></span></span></div>
</form>
</div>
<script type="text/javascript">
var ifcheck = true;
function CheckAll(form,match) {
	for (var i = 0; i < form.elements.length; i++) {
		var e = form.elements[i];
		if (e.type == 'checkbox' && (typeof match == 'undefined' || e.name.match(match))) {
			e.checked = ifcheck;
		}
	}
	ifcheck = ifcheck == true ? false : true;
}
</script>
<!--
EOT;
} elseif ($a == 'feedsetting') {print <<<EOT
-->
<form action="{$baseUrl}q=ajax&a=feedsetting" onSubmit="return false;" method="POST">
	<input type="hidden" name="step" value="2" />
	<div class="fri-list pr">
		<div class="fri-top">
			<span class="fr">
				<select name="friendtype" onchange="showFriendList(this.value);">
					<option value="-1">全部好友</option>
<!--
EOT;
foreach ($friendtype as $key => $value) {print <<<EOT
-->
					<option value="$key">$value[name]</option>
<!--
EOT;
}print <<<EOT
-->
				</select>
			</span>
			<span class="bt2"><span><button type="submit" onclick="CheckAll(this.form)">全選</button></span></span>
			<span class="btn2"><span><button type="submit" onclick="ajax.submit(this.form)">確定</button></span></span>
			<span class="bt2"><span><button type="button" onclick="closep();">取消</button></span></span>
		</div>
	<div class="fri-bot" id="friendlist">
	<div>
<!--
EOT;
foreach ($friendtype as $key => $value) {print <<<EOT
-->
						<ul class="cc" id="ftid_$value[ftid]">
<!--
EOT;
foreach ($frienddb[$value[ftid]] as $k => $v) {print <<<EOT
-->
								<li><input type="checkbox" name="selid[]" value="$v[uid]" {$checked[$v[uid]]}> $v[username]</li>
<!--
EOT;
}print <<<EOT
-->
						</ul>
<!--
EOT;
}print <<<EOT
-->
	</div>
</div>
</div>
</form>
<script type="text/javascript" src="js/core/friendlist.js"></script>

<!--
EOT;
}elseif ($a == 'copydiary') {print <<<EOT
-->
<div style="width:350px;">
	<form action="{$baseUrl}q=diary&a=copydiary" onSubmit="return false;" method="POST">
		<input type="hidden" name="step" value="2" />
		<input type="hidden" name="did" value="$did" />
		<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><a class="adel" href="javascript:;" onclick="closep();">關閉</a>日志轉載</div>
		<table width="100%" class="mb5 vt">
			<tr class="tr3">
				<td width="80">日志分類</td>
				<td>
					<select id="dtidsel" name="dtid" class="select_wa">
						<option value="0">默認分類</option>
						$dtsel
					</select>
				</td>
			</tr>
			<tr class="tr3">
				<td>隱私設置</td>
				<td>
					<select id="prisel" name="privacy" class="select_wa">
						<option value="0">全站可見</option>
						<option value="1">僅好友可見</option>
						<option value="2">僅自己可見</option>
					</select>
				</td>
			</tr>
		</table>
		<div class="popBottom"><span class="btn2"><span><button type="button" onclick="copyurl();return false;">提 交</button></span></span><span class="bt2"><span><button type="button" onclick="closep();">取消</button></span></span></div>
	</form>
</div>
<script type="text/javascript">
function copyurl() {
	var dtid = getObj('dtidsel').value;
	var privacy = getObj('prisel').value;
	Copydiary('$did',dtid,privacy);
}
</script>
<!--
EOT;
}elseif ($a == 'viewalbum') {print <<<EOT
-->
	<form action="{$baseUrl}q=photos&a=viewalbum" onSubmit="return false;" method="POST">
		<input type="hidden" name="aid" id="aidvalue" value="$aid" />
		<input type="hidden" name="space" id="spacevalue" value="$space" />
		<input type="hidden" name="uid" id="uidvalue" value="$u" />
		<table cellpadding="0" cellspacing="0" width="300px">
			<tr>
				<td width="25%">輸入密碼</td>
				<td><input type="password" name="viewpwd" id="pwdvalue" maxlength="15" /></td>
			</tr>
			<tr>
				<td></td>
				<td>
				<span class="btn2"><span><button type="submit" style="width:80px;" onclick="tourl();">提 交</button></span></span>
				<span class="bt2"><span><button type="button" onclick="closep();">取消</button></span></span>
				</td>
			</tr>
		</table>
	</form>
<script type="text/javascript">
function tourl() {
	var aid = getObj('aidvalue').value;
	var viewpwd = getObj('pwdvalue').value;
	var space = getObj('spacevalue').value;
	var uid = getObj('uidvalue').value;
	ajax.send("{$baseUrl}q=photos&a=album",'checkpwd=1&aid=' + aid + '&viewpwd=' + viewpwd,function(){
		var rText = ajax.request.responseText;
		if (rText == 'fail') {
			showDialog('error','密碼錯誤,請重新輸入',2);
		} else if (rText == 'empty') {
			showDialog('error','密碼不能為空,請重新輸入',2);
		} else if (rText == 'success') {
			window.location.href = "{$baseUrl}q=photos&a=album&aid=" + aid + "&viewpwd=" + viewpwd + "&space=" + space + "&u=" + uid;
		} else {
			showDialog('error','數據鏈接出錯',2);
		}
	});
}
</script>
<!--
EOT;
} elseif ($a == 'createajax') {
print <<<EOT
-->
<div style="width:450px;">
	<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><a class="adel" href="javascript:;" onclick="closep();">關閉</a>創建相冊</div>
	<form name="form" method="POST" action="apps.php?q=galbum&a=create&ajax=1&cyid=$cyid">
	<input type="hidden" name="step" value="2">
	<table class="vt">
		<tr>
			<td width="75">相冊名稱<span class="s1">*</span></td>
			<td><input type="text" id="c_ajax_aname" name="aname" class="input input_wa" />&nbsp; <span id="c_ajax_aname_warn" class="s6">限 24 字節</span></td>
		</tr>
		<tr>
			<td>描述</td>
			<td>
				<textarea id="c_ajax_aintro" name="aintro" class="textareaA mb5"></textarea>
				<p id="c_ajax_aintro_warn" class="s6"> 限 255 字節</p>
			</td>
		</tr>
		<tr>
			<td>可見度</td>
			<td> 
				<select name="private" id="private_info" class="select_wa">
					<option value="0">全站用戶可見</option>
					<option value="1">僅成員可見</option>
				</select>
			</td>
		</tr>
		<tr>
        	<td>群成員上傳</td>
            <td>
				<select name="memopen" class="select_wa"><option value="1" ${'select2_1'}>允許</option><option value="0" ${'select2_0'}>不允許</option></select>
			</td>
        </tr>
<!--
EOT;
if ($o_photos_gdcheck) {
$checkCode = L::loadClass('checkcode', 'site');
$checkCodeString = $checkCode->getCheckCodeTemplate();
print <<<EOT
-->
		<tr>
			<td>驗證碼</td>
			<td>
$checkCodeString
				<input class="input input_wc" onfocus="showgd();" type="text" name="gdcode" id="gdcode" tabindex="3"  /><br />
				<div id="ckcode" style="display:none;margin-bottom:5px;"></div>
			</td>
		</tr>
<!--
EOT;
}if($db_question && $o_photos_qcheck){
$qkey = array_rand($db_question);
if($db_imagequestion){
	$question = sprintf('<img src="ckquestion.php?q=%s">',$qkey);
}else{
	$question = $qkey<0 ? getMachineQuestion_1() :  $db_question[$qkey];
}
$q_a = $question.($showq && $qkey>0?" （答案︰".$db_answer[$qkey] . '）' : '');
print <<<EOT
-->
		<tr>
			<td>驗證問答</td>
			<td>
			{$q_a}<br />
			<input class="input input_wc" name="qanswer" id="qanswer" size="25" tabindex="7" />
			<input type="hidden" name="qkey" id="qkey" value="$qkey" />
			</td>
		</tr>
<!--
EOT;
}print <<<EOT
-->
		<tr>
			<td></td>
			<td>
			<span class="btn2"><span><button type="button" onclick="ajax.submit(this.form,createAlbumResponse);">提 交</button></span></span>
			</td>
		</tr>
	</table>
	</form>
</div>
<script type="text/javascript">

var charset = '$db_charset';
var maxphotonum = '$maxphotonum';
setTimeout(function(){initCheckTextNum('c_ajax_aname','c_ajax_aname_warn',24);},300);
setTimeout(function(){initCheckTextNum('c_ajax_aintro','c_ajax_aintro_warn',255);},300);
setTimeout(function(){initCheckTextNum('c_ajax_pwdinfo','c_ajax_pwdinfo_warn',15);},300);

function createAlbumResponse() {
	var rText = ajax.request.responseText.split('\t');
	if(rText[0] == 'success') {
		var aidsel = getObj('aidsel_info');
		var option = elementBind('option');
		option.innerHTML = rText[2];
		option.value = rText[1];
		option.selected = 'selected';
		aidsel.insertBefore(option,null);
		if (rText[3] == 'flash') {
			photoflashAtt.getaid(aidsel.value);
		}
		getObj('allowflash').innerHTML = '您還可以上傳'+maxphotonum+'張照片';
		showDialog('success','相冊添加成功!',2);
	} else {
		ajax.guide();
	}
	read.menu.style.top="300px";
}
</script>
<!--
EOT;
} elseif ($a == 'editphoto') {print <<<EOT
-->
<div style="width:450px;">
<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><a class="adel" href="javascript:;" onclick="closep();">關閉</a>編輯照片</div>
<form action="apps.php?q=galbum&a=editphoto&cyid=$cyid" method="post">
	<input type="hidden" name="step" value="3" />
	<input type="hidden" name="pid" value="$pid" />
    <table class="vt mb5">
    	<tr>
        	<td width="60">選擇相冊</td>
            <td><select name="aid" class="select_wa">{$options}</select></td>
        </tr>
        <tr>
        	<td>描述</td>
            <td><textarea name="pintro" class="textareaA">$photo[pintro]</textarea></td>
        </tr>
    </table>
<div class="popBottom"><span class="btn2"><span><button type="button" onclick="ajax.submit(this.form)">編輯照片</button></span></span></div>
</form>
</div>
<!--
EOT;
}?>-->