<!--<?php
if ($action=='showping') {
print <<<EOT
-->
<form action="operate.php?action=$action&ajax=1" method="post" onsubmit="return false;">
<input type="hidden" name="verify" value="$verifyhash" />
<input type="hidden" name="page" value="$page" />
<input type="hidden" name="tid" value="$tid" />
<!--
EOT;
	foreach ($atcdb as $key=>$value) {
print <<<EOT
-->
<input type="hidden" name="selid[]" value="$key" />
<!--
EOT;
	}
print <<<EOT
-->
<table width="450" cellspacing="0" cellpadding="5">
	<tr>
		<th colspan="2" class="h" style="cursor:move" onmousedown="read.move(event);"><span class="fr" style="margin-top:2px;cursor:pointer" onclick="closep();"><img src="$imgpath/close.gif" /></span>帖子评分</th>
	</tr>
	<tr>
		<td width="21%" align="center">操作类型:</td>
		<td>
			<input type="radio" name="step" value="1" checked onclick="operatesel(1);"/>评分&nbsp;
			<input type="radio" name="step" value="2" onclick="operatesel(2);"/>取消评分
		</td>
	</tr>
	<tr id="cancel" style="display:none">
		<td align="center">操作说明:</td>
		<th>取消评分按自己最近的评分开始取消</th>
	</tr>
	<tr>
		<td align="center">评分数量:</td>
		<td>$count 篇</td>
	</tr>
	<tr id="ok1" class="vt">
		<td align="center">积分名称:</td>
		<td style="padding:.25em .6em;">
			<table>
				<tr>
					<td>名称</td>
					<td>点数</td>
					<td align="center">评分区间</td>
					<td align="center">剩余</td>
					<td></td>
				</tr>
				<tbody id="c_model"><tr>
					<td><select name="cid[]" onchange="optionsel(this)">$creditselect</select></td>
					<td><input class="input" type="text" name="addpoint[]" value="1" size="3" /> 点</td>
					<td align="center"></td>
					<td align="center"></td>
					<td><a href="javascript:" onclick="addoption()">[添加]</a></td>
				</tr></tbody>
				<tbody id="c_body"></tbody>
			</table>
		</td>
	</tr>
	<tr>
		<td align="center">消息通知:</td>
		<td>
			<input type="radio" name="ifmsg" value="1" $check_Y />开启
			<input type="radio" name="ifmsg" value="0" $check_N />关闭
		</td>
	</tr>
	<tr id="ok3">
		<td align="center">评分理由：</td>
		<td>
			<div class="fl">
			<select name="" size="6" style="width:70px" multiple onchange="this.form.atc_content.value=this.value">
				<option value="">自定义</option>
				<option value="">-------</option>
				$reason_sel
			</select>
			</div>
			<div>
				<textarea name="atc_content" id="atc_content" onkeydown="ajax.quickpost(event,this.form)" style="width:180px;height:92px"></textarea>
				<div id="atc_content_warn" class="gray">限100字节</div>
			</div>
		</td>
	</tr>
</table>
<ul><li style="text-align:center;padding:4px 0;"><input type="button" class="btn" name="ajaxsubmit" onclick="ajax.submit(this.form,marked);" value="提 交" /></li></ul></form>
<script language="javascript" id="showping_js">
function operatesel (id) {
	if (id == '1') {
		objCheck('ok1').style.display = '';
		objCheck('ok3').style.display = '';
		objCheck('cancel').style.display = 'none';
	} else {
		objCheck('ok1').style.display = 'none';
		objCheck('ok3').style.display = 'none';
		objCheck('cancel').style.display = '';
	}
}
function optionsel(o) {
	var jscredit = JSONParse('$jscredit');
	var tr = o.parentNode.parentNode;
	var td = tr.getElementsByTagName('td');
	var v = o.value;
	td[2].innerHTML = jscredit[v]['minper'] + '~' + jscredit[v]['maxper'];
	td[3].innerHTML = '<span class="s3 b">' + jscredit[v]['leavepoint'] + '</span>';
}
function showoption(o) {
	var sel = o.getElementsByTagName('select')[0];
	optionsel(sel);
}
function addoption() {
	var s = $('c_model').firstChild.cloneNode(true);
	var td = s.getElementsByTagName('td');
	var sel = s.getElementsByTagName('select')[0];
	optionsel(sel);
	td[4].innerHTML = '<a href="javascript:" onclick="deloption(this)">[删除]</a>';
	$('c_body').appendChild(s);
}
function deloption(o) {
	$('c_body').removeChild(o.parentNode.parentNode);
}
var charset = '$db_charset';
</script>
<script language="JavaScript">
setTimeout(function() {
	showoption($('c_model'));
	initCheckTextNum('atc_content','atc_content_warn', 100);
}, 100);
</script>
<!--
EOT;
} elseif($action=='recommend') {
print <<<EOT
-->
<div class="tal">
<form method="post" name="FORM" action="operate.php?action=recommend&ajax=1" onsubmit="return false;">
<input type="hidden" name="verify" value="$verifyhash" />
<input type="hidden" name="tid" value="$tid" />
<table width="100%" cellspacing="0" cellpadding="5">
	<tr><th colspan="2" class="h" style="cursor:move" onmousedown="read.move(event);"><span class="fr" style="margin-top:2px;cursor:pointer" onclick="closep();"><img src="$imgpath/close.gif" /></span>帖子推荐</th></tr>
	<tr>
		<td width="24%" align="center">推荐方式:</td>
		<td><input type="radio" name="step" value="1" onclick="getObj('sendemail').style.display='none';getObj('friend').style.display='';" checked />短消息推荐 <input type="radio" name="step" value="2" onclick="getObj('sendemail').style.display='';getObj('tofriend').style.display='none';getObj('friend').style.display='none';" />邮件推荐</td>
	</tr>
	<tr>
		<td align="center">对方姓名:</td>
		<td><input type="text" class="input" name="sendtoname" size="25" value="" />
<!--
EOT;
	if ($friends) {
print <<<EOT
-->
			<span id="friend" class="bta" onClick="getObj('tofriend').style.display='';">好友列表</span>
<!--
EOT;
	}
print <<<EOT
-->
		</td>
	</tr>
	<tr id="tofriend" style="display:none">
		<td align="center">好友选择:</td>
		<td>
			<div style="overflow-y:scroll;width:307px;height:7em;"><ul class="menu-half">
<!--
EOT;
	if ($friends) {
		foreach ($friends as $key=>$val) {
print <<<EOT
-->
				<li><input type="checkbox" name="touid[]" value="$key" />$val[username]</li>
<!--
EOT;
		}
print<<<EOT
-->
			</ul></div>
			<span class="bta" style="cursor:pointer;" onClick="CheckAll(document.FORM,'touid')">全 选</span>
<!--
EOT;
	}
print <<<EOT
-->
		</td>
	</tr>
	<tbody id="sendemail" style="display:none">
	<tr><td align="center">对方Email:</td>
		<td><input type="text" class="input" name="sendtoemail" size="25" value="" /></td>
	</tr>
	</tbody>
	<tr>
		<td align="center">标题：</td>
		<td><input type="text" class="input" name="subject" size="44" value="$atc_name" /></td>
	</tr>
<!--
EOT;
	if ($db_gdcheck & 16) {
print <<<EOT
-->
	<tr>
		<td align="center">认证码：</td>
		<td><img src="ck.php?nowtime=1" align="absmiddle" onclick="this.src='ck.php?nowtime=' + new Date().getTime();" style="cursor:pointer;" /><br />
			<input type="text" class="input" name="gdcode" size="8" />
		</td>
	</tr>
<!--
EOT;
	}
print <<<EOT
-->
	<tr><td align="center">内容：</td>
		<td><textarea rows="6" style="width:300px" name="atc_content" onkeydown="ajax.quickpost(event,this.form)">您好！我在$db_bbsname($db_bbsurl/?u=$winduid)\n看到了这篇帖子，认为很有价值，特推荐给您。\n\n作者:$atcinfo[author]\n地址:{$db_bbsurl}/read.php?tid=$tid&u=$winduid\n\n希望您能喜欢。</textarea></td>
	</tr>
</table><ul><li style="text-align:center;padding:4px 0;"><input type="button" class="btn" name="ajaxsubmit" onclick="ajax.submit(this.form);" value="提 交" /></li></ul></form>
</div>

<SCRIPT type="text/javascript" LANGUAGE="JavaScript" src="js/core/friendlist.js"></SCRIPT>

<!--
EOT;
} elseif($action=='report') {
print <<<EOT
-->
<div class="tal">
<form action="operate.php?action=$action&ajax=1" method="post" onsubmit="return false;">
<input type="hidden" name="verify" value="$verifyhash" />
<table width="400" cellspacing="0" cellpadding="5">
<tr><th colspan="2" class="h" style="cursor:move" onmousedown="read.move(event);"><span class="fr" style="margin-top:2px;cursor:pointer" onclick="closep();"><img src="$imgpath/close.gif" /></span>报告功能</th></tr>
<tr><td width="21%" align="center">报告类型:</td>
<td><input type="radio" name="type" value="1" checked onclick="this.form.reason.value='该帖很优秀,建议加为精华帖!'" />优秀帖子 <input type="radio" name="type" value="0" onclick="this.form.reason.value='该帖包含不良信息,请及时处理!'" />不良帖子</td></tr>
<tr><td align="center">通知版主:</td>
<td><input type="radio" name="ifmsg" value="1" checked />开启
<input type="radio" name="ifmsg" value="0" />关闭</td></tr>
<tr><td align="center">原因:</td>
<td><textarea id="reason" name="reason" rows="6" style="width:300px">该帖很优秀,建议加为精华帖!</textarea>
</td></tr></table>
<input type="hidden" name="step" value="2" />
<input type="hidden" name="tid" value="$tid" />
<input type="hidden" name="pid" value="$pid" />
<ul><li style="text-align:center;padding:4px 0;"><input type="button" class="btn" onclick="ajax.submit(this.form);" value="提 交" /></li></ul></form>
</div>
<!--
EOT;
} elseif($action == 'share') {
	if ($db_share_open) {
print<<<EOT
-->
<div id="share_box">
	<form name="shareFORM" method="post" action="apps.php?q=sharelink" onsubmit="return false;">
	<div style="width:480px;">
        <div class="pw_list_a" style="cursor:move" onmousedown="read.move(event);">
            <ul>
                <li class="current"><a href="javascript:;">分享</a></li>
                <li><a href="javascript:;" onclick="shareOtherType('recommend_box');return false;">推荐</a></li>
            </ul>
        </div>
		<ul class="menu-list cc mb8">
			<li>
<!--
EOT;
if ($type != 'topic' && $type != 'reply'){print <<<EOT
-->
				<div>摘要：</div>
				<div class="exp bgB" style="line-height:1.8">
					$share_type_des
<!--
EOT;
			if ($type == 'album' || $type == 'photo') {
print <<<EOT
-->
					<img src="$photourl" width="100">
<!--
EOT;
			} else {
print <<<EOT
-->
					<b>$subject</b>
<!--
EOT;
			}
print <<<EOT
-->
<br />
					所属： $username
				</div>
<!--
EOT;
} elseif ($type == 'topic' || $type == 'reply') {print <<<EOT
-->
				<div>$share_type_des</div>
				<div class="exp bgB" style="line-height:1.8">
					<b>$subject</b>
					<br />作者： $username&nbsp;&nbsp;发表时间： $postdate
					<br />$descrip
					<br />

<!--
EOT;
			if ($attimages) {
				foreach ($attimages as $k => $v) {
print<<<EOT
-->
					<span class="fl" style="white-space:nowrap;margin-right:1px;"><img src="$v" style="width:60px;height:60px;margin-bottom:3px;" align="absmiddle"></span>
<!--
EOT;
				}
print<<<EOT
-->
					<div class="c"></div>
<!--
EOT;
			}
print<<<EOT
-->
				</div>
<!--
EOT;
		}
print <<<EOT
-->
			</li>
		</ul>
		<div class="c"></div>
		<ul class="menu-list cc">
			<li>
			<div>说明：</div>
			<textarea style="width:98%;height:45px;" name="descrip"></textarea>
			</li>
		</ul>
<!--
EOT;
		if ($o_share_gdcheck) {
print <<<EOT
-->
		<ul class="menu-list cc">
			<li>
				<div>认证码：</div>
				<input class="input" onfocus="showCK();" type="text" name="gdcode" id="gdcode" size="5" tabindex="3"  />
				<img id="ckcode" style="cursor:pointer;display:none" onclick="this.src='ck.php?nowtime='+new Date().getTime();" alt="看不清楚，换一张" />
			</li>
		</ul>
<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_share_qcheck && $db_question) {
			$qkey = array_rand($db_question);
			$db_question[$qkey] = addcslashes($db_question[$qkey],'"');
print <<<EOT
-->
		<ul class="menu-list cc">
			<li>
				<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" />
			</li>
		</ul>
<!--
EOT;
		}
print <<<EOT
-->
		<div class="menu-bt tac">
<!--
EOT;
if ($type != 'topic' && $type != 'reply') {print <<<EOT
-->
			<span class="button2"><span><button type="button" onclick="getObj('ifhidden').value='1';ajax.submit(this.form);">私密收藏</button></span></span>
<!--
EOT;
		}
print <<<EOT
-->
			<span class="button"><span><button class="btn" type="button" style="width:80px;" onclick="ajax.submit(this.form);">分享</button></span></span>
			&nbsp;&nbsp;<a href="javascript:;" onclick="closep();">取消</a>
		</div>
	</div>
	<input type="hidden" name="ifhidden" id="ifhidden" value="0">
	<input type="hidden" name="type" value="$type">
	<input type="hidden" name="id" value="$id">
	<input type="hidden" name="verify" value="$verifyhash" />
<!--
EOT;
if($type == 'reply'){print<<<EOT
-->
	<input type="hidden" name="tid" value="$tid" />
<!--
EOT;
}print<<<EOT
-->
	</form>
</div>
<!--
EOT;
	} else {
print<<<EOT
-->
	<div id="share_box"><div style="width:480px;"></div></div>
<!--
EOT;
	}
print<<<EOT
-->

<!--
EOT;
if (!$db_share_open) {print<<<EOT
-->
<div id="recommend_box">
<!--
EOT;
}else{print<<<EOT
-->
<div id="recommend_box" style="display:none">
<!--
EOT;
}print<<<EOT
-->
	<form name="recommendFORM" method="post" action="operate.php?action=share&ajax=1" onsubmit="return false;">
		<input type="hidden" name="step" value="2" />
		<div style="width:480px;">
            <div class="pw_list_a" style="cursor:move" onmousedown="read.move(event);">
                <ul>
<!--
EOT;
	if ($db_share_open) {
print<<<EOT
-->
					<li><a href="javascript:;" onclick="shareOtherType('share_box');return false;">分享</a></li>
<!--
EOT;
	}
print<<<EOT
-->
					<li class="current"><a href="javascript:;">推荐</a></li>
            	</ul>
            </div>
			<div style="padding:5px 20px 0;">
			<table width="100%" cellspacing="0">
				<tr>
					<td width="24%" align="center">推荐方式:</td>
						<td>短消息推荐</td>
					</tr>
				<tr>
					<td align="center">对方姓名:</td>
					<td><input type="text" class="input" name="sendtoname" size="25" 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">
					<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="button"><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]"> $v[username]</li>
<!--
EOT;
		}
print <<<EOT
-->
									</div>
<!--
EOT;
	}
print <<<EOT
-->
								</ul>
							</div>
						</div>
<SCRIPT type="text/javascript" LANGUAGE="JavaScript" src="js/core/friendlist.js"></SCRIPT>


					</td>
				</tr>
				<tr>
					<td align="center">标题:</td>
					<td><input type="text" class="input" name="subject" size="44" value="{$windid} 给您$atc_name" /></td>
				</tr>
				<tr><td align="center">内容:</td>
					<td>
<!--
EOT;
	if($type == 'user') {
print <<<EOT
-->
					<textarea rows="6" style="width:300px" name="atc_content" onkeydown="ajax.quickpost(event,this.form)">您好！我很喜欢用户[url={$db_bbsurl}/u.php?uid={$uid}]{$username}[/url]的个人空间，特推荐给您。\n\n他（她）的用户名:\n$title\n\n希望您能喜欢。</textarea>
<!--
EOT;
	} else {
print <<<EOT
-->
<textarea rows="6" style="width:300px" name="atc_content" onkeydown="ajax.quickpost(event,this.form)">
<!--
EOT;
if($isAnonymous){
print <<<EOT
-->
您好！我发现这个信息很有价值，特推荐给您。\n\n主要信息:\n$title\n\n描述:\n$descrip\n\n希望您能喜欢。
<!--
EOT;
}else{
print <<<EOT
-->

EOT;
$uid || $uid = $u;print <<<EOT
您好！我在用户[url={$db_bbsurl}/u.php?uid={$uid}]{$username}[/url]的个人空间发现这个信息，认为很有价值，特推荐给您。\n\n主要信息:\n$title\n\n描述:\n$descrip\n\n希望您能喜欢。
<!--
EOT;
}
print <<<EOT
-->
</textarea>
<!--
EOT;
	}
print <<<EOT
-->
					</td>
				</tr>
			</table>
			<div class="tac" style="padding:5px 0 10px;">
			<span class="button"><span><button  class="btn" type="button" style="width:80px;" name="ajaxsubmit" onclick="ajax.submit(this.form);">推荐</button></span></span>
			&nbsp;&nbsp;<a href="javascript:;" onclick="closep();">取消</a>
			</div>
			</div>
		</div>
	</form>
</div>
<script language="JavaScript">
function shareOtherType(id){
	getObj(id).style.display = '';
	if (id == 'recommend_box') {
		getObj('share_box').style.display = 'none';
	} else if (id == 'share_box') {
		getObj('recommend_box').style.display = 'none';
	}
}
</script>
<!--
EOT;
}
?>
-->