<?php
if( !defined('ISDVBBS') ){
	header('HTTP/1.0 404 Not Found');
	exit;
}
?>
<!--<?php
$func = "__Tools_Tpl_{$toolsid}";
if( function_exists($func) ){
	$func();
} else{
	showmsg($lang['Error.strings1'],0,'',false);
	exit;
}

//道具:转让器，可进行道具、金币和点券的转让
function __Tools_Tpl_1(){
	global $userinfo,$__toolsInfo,$lang,$__destUserInfo,$__toolsBussInfo;
	print <<<EOT
-->
<table cellpadding=0 cellspacing=0 align=center class="mainbox tableborder">
	<tr>
	<th height=23 colspan=2>{$lang['tpl.str1']} {$__toolsInfo['toolsname']}</th></tr>
	<tr><td height=23 colspan=2>
	{$lang['tpl.str2']}</td></tr>
	<tr>
	<td height=23 width="30%" align=right>{$lang['tpl.str4']}</td>
	<td height=23 width="70%"><B>{$__destUserInfo['username']}</B></td>
	</tr>
	<FORM METHOD=POST ACTION="?toolsaction=SendTools">
	<input type=hidden value="{$GLOBALS['touserid']}" name="touserid">
	<input type=hidden value="{$GLOBALS['toolsid']}" name="toolsid">
	<tr>
	<td height=23 width="30%" align=right>{$lang['tpl.str5']}</td>
	<td height=23 width="70%">
	<Select Size=1 Name="SendToolsID">
	<Option value=0 selected>{$lang['tpl.str6']}</option>
<!--
EOT;
	if( !empty($__toolsBussInfo) && is_array($__toolsBussInfo) ){
		foreach( $__toolsBussInfo as $val ){
			print <<<EOT
-->
	<option value="{$val['toolsid']}">{$lang['tpl.str7']}{$val['toolsname']}{$val['toolscount']}{$lang['tpl.str8']}</option>
<!--
EOT;
		}
	}
	print <<<EOT
-->
	</Select>
	{$lang['tpl.str9']}
	<input type=text size=5 value="0" name="sendtoolsnum">
	{$lang['tpl.str39']}
	</td>
	</tr>
	<tr><td height=23 colspan=2 align=center>
	{$lang['tpl.str10']} <B><font color=red>{$userinfo['usermoney']}</font></B> {$lang['tpl.str11']} <B><font color=red>{$userinfo['userticket']}</font></B> {$lang['tpl.str12']}
	</td></tr>
	<tr>
	<td height=23 width="30%" align=right>{$lang['tpl.str13']}</td>
	<td height=23 width="70%">
	<input type=text size=5 value="0" name="sendmoneynum">
	{$lang['tpl.str39']}</td>
	</tr>
	<tr>
	<td height=23 width="30%" align=right>{$lang['tpl.str14']}</td>
	<td height=23 width="70%">
	<input type=text size=5 value="0" name="sendticketnum">
	{$lang['tpl.str39']}</td>
	</tr>
	<tr><td height=23 colspan=2 align=center>
	<button type=submit name=submit onMousemove="button_move(this)" onMouseout="button_out(this)">{$lang['tpl.str15']}</button>
	</td></tr>
	</FORM>
</table>
<!--
EOT;
}

//道具:醒目灯，可将主题变色
function __Tools_Tpl_7(){
	global $lang,$dv,$db,$userinfo,$__toolsInfo,$_bussInfo,$toolsColorList,$__topicInfo7;
	$arrToolsColorList = explode(',',$toolsColorList);
	print <<<EOT
-->

<table border="0" cellpadding=0 cellspacing=0 align=center class="mainbox tableborder">
	<tr>
	<th height=23 colspan=2>{$lang['tpl.str16']} {$__toolsInfo['toolsname']}</th></tr>
	<tr><td height=23 colspan=2>
	{$lang['tpl.str17']}</td></tr>
	<FORM METHOD=POST ACTION="?toolsaction=SendColor" name="theform">
<!--	<input type=hidden value="{$GLOBALS['touserid']}" name="touserid">  -->
	<input type=hidden value="{$GLOBALS['boardid']}" name="boardid">
	<input type=hidden value="{$GLOBALS['topicid']}" name="topicid">
	<input type=hidden value="{$GLOBALS['replyid']}" name="replyid">
	<input type=hidden value="{$GLOBALS['toolsid']}" name="toolsid">
	<tr>
	<td height=23 width="30%" align=right>{$lang['tpl.str18']}</td>
	<td height=23 width="70%">
	<SELECT onChange="document.getElementById('TopicColor').color=options[selectedIndex].value;" name="color">
<!--
EOT;
	if( is_array($arrToolsColorList) ){
		$encodedTitle = htmlspecialchars($__topicInfo7['title']);
		foreach( $arrToolsColorList as $val ){
			print <<<EOT
-->
		<option style="background-color:{$val};color:{$val}" value="{$val}">{$val}</option>
<!--
EOT;
		}
	}
	print <<<EOT
-->
	</SELECT>
	</td>
	</tr>
	<tr>
	<td height=23 width="30%" align=right>{$lang['tpl.str19']}</td>
	<td height=23 width="70%"><font id=TopicColor>{$encodedTitle}</font></td>
	</tr>
	<tr><td height=23 colspan=2 align=center>
	<button type=submit name=submit onMousemove="button_move(this)" onMouseout="button_out(this)">{$lang['tpl.str20']}</button>
	</td></tr>
	</FORM>
</table>
<!--
EOT;
}

function __Tools_Tpl_20(){
	global $__toolsInfo,$lang;
	list($userNameMinLength,$userNameMaxLength) = explode(',',$fsetting['usernamelength']);
	print <<<EOT
-->
<form name=theForm action="?toolsaction=ChangID" method=post>
	<input type=hidden value="{$GLOBALS['toolsid']}" name="toolsid">
	<table cellpadding=0 cellspacing=0 align=center class="mainbox tableborder">
		<tr>
			<th height=25 id="tabletitlelink" colspan="2">{$lang['tpl.str16']} {$__toolsInfo['toolsname']}</th>
		</tr>
		<tr>
			<td colspan="2"><li>{$__toolsInfo['toolsinfo']}<li>{$lang['tpl.str21']}<font color="{$_DCACHE['stylecss'][19]}">{$userNameMinLength}</font> {$lang['tpl.str40']}<font color="{$_DCACHE['stylecss'][19]}">{$userNameMaxLength}</font>{$lang['tpl.str22']}</td>
		</tr>
		<tr>
			<td width="25%" height="25" align=right>{$lang['tpl.str23']}</td>
			<td width="75%">
			<input maxLength="{$userNameMaxLength}" size=30 name="name"></td>
		</tr>
		<tr>
			<td height=25 colspan="2" align=center ><button type="submit" onclick="if (this.form.name.value == ''){alert({$lang['tpl.str25']});return false;}" onMousemove="button_move(this)" onMouseout="button_out(this)">{$lang['tpl.str24']}</button>&nbsp;&nbsp;&nbsp;<button type="reset" onMousemove="button_move(this)" onMouseout="button_out(this)">{$lang['tpl.str26']}</button></td>
		</tr>
	</table>
</form>
<!--
EOT;
}

function __Tools_Tpl_21(){
	global $__toolsInfo,$lang;
	print <<<EOT
-->
<FORM name=theForm action="?toolsaction=SendMsg" method=post>
	<input type=hidden value="{$GLOBALS['toolsid']}" name="toolsid">
	<table cellpadding=0 cellspacing=0 align=center class="mainbox tableborder" Style="Width:99%">
	<tr><th height=25 id="tabletitlelink" colspan="2">{$lang['tpl.str16']} {$_toolsInfo['toolsname']}</th></tr>
	<tr><td colspan="2"><li>{$__toolsInfo['toolsinfo']}</td></tr>
	<tr><td width="25%" height="25" align=right><b>{$lang['tpl.str27']}</td>
	<td width="75%"><input maxLength="50" size=50 name="msgtitle">{$lang['tpl.str28']}
	</td></tr>
	<tr><td height="25" align=right Valign=Top><b>{$lang['tpl.str29']}</td>
	<td><textarea name="msgbody" Style="width:100%;height:250;"></textarea>
	</td></tr>
	<tr><td height=25 colspan="2" align=center >
	<button type="submit" onclick ="if(this.form.name.value == ''){alert({$lang['tpl.str25']});return false;}" onMousemove="button_move(this)" onMouseout="button_out(this)">{$lang['tpl.str24']}</button>&nbsp;&nbsp;&nbsp;
	<button type="reset" onMousemove="button_move(this)" onMouseout="button_out(this)">{$lang['tpl.str26']}</button>
	</td></tr>
	</table>
</FORM>
<!--
EOT;
}

function __Tools_Tpl_22(){
	global $__toolsInfo,$lang,$userinfo,$destUserInfo,$__BussInfo22;
	print <<<EOT
-->
<table border="0" cellpadding=0 cellspacing=0 align=center class="mainbox tableborder">
	<tr>
	<th height=23 colspan=2>{$lang['tpl.str16']} {$__toolsInfo['toolsname']}</th></tr>
	<tr>
	<td height=23 width="30%" align=right>{$lang['tpl.str4']}</td>
	<td height=23 width="70%"><B>{$destUserInfo['username']}</B></td>
	</tr>
	<tr>
	<td height=23 width="30%" align=right>{$lang['tpl.str30']}</td>
	<td height=23 width="70%">
	<B>{$destUserInfo['usermoney']}</B>
	{$lang['tpl.str39']}
	</td>
	</tr>
	<tr>
	<td height=23 width="30%" align=right>{$lang['tpl.str31']}</td>
	<td height=23 width="70%">
	<B>{$destUserInfo['userticket']}</B>
	{$lang['tpl.str32']}
	</td>
	</tr>
	<tr><td height=23 colspan=2 align=center>
	<B>{$lang['tpl.str33']}</B>
	</td></tr>
<!--
EOT;
	if( $__BussInfo22 !== false && is_array($__BussInfo22) ){
		foreach( $__BussInfo22 as $val ){
			print <<<EOT
-->
	<tr>
	<td height=23 width="30%" align=right>{$val['toolsname']}</td>
	<td height=23 width="70%">
	<B>{$val['toolscount']}</B>
	{$lang['tpl.str39']}
	</td>
	</tr>
<!--
EOT;
		}
	}
	print <<<EOT
-->
</table>
<!--
EOT;
	$LogMsg = "{$lang['tpl.str34']}<B>{$__toolsInfo['toolsname']}</B>{$lang['tpl.str35']}<B>{$destUserInfo['username']}</B>{$lang['tpl.str36']}";
	UpdateUserTools($GLOBALS['userid'],$GLOBALS['toolsid'],1);	ToolsLog($GLOBALS['toolsid'],1,0,0,1,$LogMsg,"{$userinfo['usermoney']}|{$userinfo['userticket']}");
}

?>-->