<?php
	@set_time_limit(0);
	define('T_ROOT', str_replace("\\", '/',substr(dirname(__FILE__),0,-9)));
	include T_ROOT.'include/common.inc.php';
	session_start();
	if($_SESSION['checkcode']!=$chkcode || !$_SESSION['checkcode'])showmsg('验证码不正确!');
	$b=array_map('htmlspecialchars',$b);
	$b['contentid']=intval($b['contentid']);
	$r=$db->fetch_one("SELECT userid FROM ".DB_PRE."content WHERE id=".$b['contentid']);
	$b['userid']=$r['userid']?$r['userid']:ADMIN_FOUNDERS;
	$b['sex']=intval($b['sex']);
	$b['num']=intval($b['num']);
	$db->insert(DB_PRE.'sign',$b);
	showmsg('报名成功!');
?>