<?php
!function_exists('readover') && exit('Forbidden');

/****

@name:沉澱卡
@type:帖子類
@effect:帖子中使用，讓帖子丟到12小時前,回復也不再上來．

****/

if($tooldb['type']!=1){
	Showmsg('tooluse_type_error');  // 判斷道具類型是否設置錯誤
}

$db->update("UPDATE pw_threads SET toolinfo=".pwEscape($tooldb['name'],false).",locked='3',lastpost=lastpost-43200 WHERE tid='$tid'");
$db->update("UPDATE pw_usertool SET nums=nums-1 WHERE uid=".pwEscape($winduid)."AND toolid=".pwEscape($toolid));
$logdata = array(
	'type'		=>	'use',
	'descrip'	=>	'tool_17_descrip',
	'uid'		=>	$winduid,
	'username'	=>	$windid,
	'ip'		=>	$onlineip,
	'time'		=>	$timestamp,
	'toolname'	=>	$tooldb['name'],
	'subject'	=>	substrs($tpcdb['subject'],15),
	'tid'		=>	$tid,
);
writetoollog($logdata);
Showmsg('toolmsg_success');
?>