<?php
include("include/inc_smarty.php");
include("include/inc_db_mysql.php");
//$myipadd= convertip(GetIP());
$myip = GetIP();
 if($_GET[action]=="add"){
 	$db->fn_insert("gz_lstbook","ntitle,name,nsex,npic,msgdate,email,msgcontent,userip,useripadd,rstate,rqiao",
					"'$_POST[ntitle]','$_POST[name]','$_POST[nsex]','$_POST[npic]',now(),'$_POST[email]','$_POST[msgcontent]','$myip','',1,'$_POST[rqiao]'");
 	//$db->query("UPDATE test set name='$_POST[name]', regdate='$_POST[regdate]' where id='$_GET[id]'");
 	backurl('lst.php');
 }
 $nowtime = date('Y-m-d H:i:s');

 $picarr = array(10,11,22,25,18,26,92,33,65,58,14);
 $smarty->assign('picarr',$picarr);
 $smarty->assign('nowtime',$nowtime);
 $smarty->display("post.htm");							//ÔÚÄÄ¸öÒ³ÃæÖ´ÐÐ

/*echo $myip;
echo $myipadd;*/

?>

