www.gusucode.com > citySHOP B2C商城系统 进销存 2.0.6码程序 > upload/post.php

    <?php
define('NOROBOT', true);
include './include/common.inc.php';

if($action == 'remind'){
	if(submitcheck('postsubmit')){
		if($db->result_first("SELECT COUNT(rid) FROM {$tablepre}reminder WHERE uid='$mall_uid' AND $timestamp-pubtime<86400")>=10){
			showmessage('对不起,每人24小时只能发10条预订信息。');
		}
		$gid = intval($gid);
		$goods = $db->fetch_array($db->query("SELECT ydmoney FROM {$tablepre}goods WHERE gid='$gid' AND nostock=1"));
		if(!$goods){
			showmessage('预订出错!');
		}
		$drealname = scriptfilter(trim($drealname));
		$phone = scriptfilter(trim($phone));
		$db->query("INSERT INTO {$tablepre}reminder (`gid`,`uid`,`realname`,`phone`,`ydmoney`,`pubtime`,`noticetype`) VALUES ('$gid','$mall_uid','$drealname','$phone','$goods[ydmoney]','$timestamp','$noticetype')");
		showmessage('恭喜,预订成功!');		
	}
}
showmessage('undefined_action');
?>