<?php
if( !defined('ISDVBBS') ){
	header('HTTP/1.0 404 Not Found');
	exit;
}
global $action;
if ('view' === $action) {	//	ÔùËÍ½ð±Ò
	print <<<EOT
		<table cellpadding=0 cellspacing=0 align=center class="mainbox tableborder">
			<tbody>
				<tr>
					<th height="24" colspan="1">{$lang['tpl.str7']}</th>
				</tr>
				<tr>
					<td class="tablebody2">
EOT;
	if ($postbuieduser !== '') {
		$postbuieduser = str_replace('|', '</li><li>', $postbuieduser);
		print <<<EOT
		<ul>
			<li>{$postbuieduser}</li>
		</ul>
EOT;
	} else {
		print $lang['tpl.str8'];
	}
	print <<<EOT
		</td></tr>
		</table>
EOT;
} elseif ('send' === $action) {	//	ÔùËÍ½ð±Ò
	$encodedtouser = htmlspecialchars($tousername);
	$inttmp1 = $getmoney - $tmpstr[0];
	$rootid = ROOT_ID;
	$announceid = ANNOUNCE_ID;
	$posttable = POST_TABLE;
	print <<<EOT
	<form method=post action="buypost.php?action=send">
		<input type="hidden" name="doaction" value="savemoney" />
		<input type="hidden" name="posttable" value="{$posttable}" />
		<input type="hidden" name="id" value="{$rootid}">
		<input type="hidden" name="replyid" value="{$announceid}" />
		<input type="hidden" name="boardid" value="{$GLOBALS['boardid']}" />
		<table cellpadding=0 cellspacing=0 align=center class="mainbox tableborder">
			<tr><th colspan=2>{$lang['tpl.str24']} {$topic} {$lang['tpl.str25']} {$lang['tpl.str9']}</th></tr>
			<tr>
			<td align=right width="30%">{$lang['tpl.str10']}</td>
			<td width="70%">{$getmoney}</td>
			</tr>
			<tr>
			<td align=right>{$lang['tpl.str11']}</td>
			<td>{$tmpstr[0]}</td>
			</tr>
			<tr>
			<td align=right>{$lang['tpl.str12']}</td>
			<td>{$tousername} {$issenduser}</td>
			</tr>
			<tr>
			<td align=right>{$lang['tpl.str13']}</td>
			<td><input type="text" name="sendmoney" value=""> {$lang['tpl.str14']}<b><font class="redfont">{$inttmp1}</font></b>{$lang['tpl.str15']}</td>
			</tr>
			<tr><td colspan=2 align=center>
			<button type="submit" onMousemove="button_move(this)" onMouseout="button_out(this)">{$lang['tpl.str16']}</button> <button type="button" onclick="history.go(-1)" onMousemove="button_move(this)" onMouseout="button_out(this)">{$lang['tpl.str17']}</button>
			</td></tr>
		</table>
	</form>
EOT;
} elseif ('close' === $action) {	//	½áÌû²Ù×÷
	$inttmp1 = $getmoney - $tmpstr[0];
	$rootid = ROOT_ID;
	$announceid = ANNOUNCE_ID;
	$posttable = POST_TABLE;
	print <<<EOT
	<form method="post" action="buypost.php?action=close">
		<input type="hidden" name="doaction" value="saveclose" />
		<input type="hidden" name="posttable" value="{$posttable}" />
		<input type="hidden" name="id" value="{$rootid}">
		<input type="hidden" name="replyid" value="{$announceid}" />
		<input type="hidden" name="boardid" value="{$GLOBALS['boardid']}" />
		<table cellpadding=0 cellspacing=0 align=center class="mainbox tableborder">
			<tr><th colspan=2>{$lang['tpl.str24']} {$topic} {$lang['tpl.str25']} {$lang['tpl.str18']}</th></tr>
			<tr>
				<td colspan=2><li>{$lang['tpl.str19']}</td>
			</tr>
			<tr>
				<td align=right width="30%">{$lang['tpl.str20']}</td>
				<td width="70%">{$getmoney}</td>
			</tr>
			<tr>
				<td align=right>{$lang['tpl.str11']}</td>
				<td>{$tmpstr[0]}</td>
			</tr>
			<tr>
				<td align=right>{$lang['tpl.str21']}</td>
				<td>{$inttmp1}</td>
			</tr>
			<tr>
				<td colspan=2 align=center>
					<button type="submit" onMousemove="button_move(this)" onMouseout="button_out(this)">{$lang['tpl.str22']}</button> <input type="button" onclick="history.go(-1)" onMousemove="button_move(this)" onMouseout="button_out(this)"/>{$lang['tpl.str23']}</button>
				</td>
			</tr>
		</table>
	</form>
EOT;
}
?>