WEB开发网
开发学院WEB开发PHP 社区(php&&mysql)五 阅读

社区(php&&mysql)五

 2008-02-15 18:00:10 来源:WEB开发网   
核心提示:function post2() { global $sid,$aid,$PHP_SELF; global $banner,$body,$poster,$email,$type,$CHAR_GB; if(strlen($ban
function post2() {
  global $sid,$aid,$PHP_SELF;
  global $banner,$body,$poster,$email,$type,$CHAR_GB;
   
   
  if(strlen($banner)==0 || strlen($body)==0 || strlen($poster)==0 || strlen($email)==0) {
    echo "
     <script language=javascript>
      alert('恶粜ぃЧ俱');
      history.back();
     </script>
     ";
    return;
  }
   
  //$banner=AddSlashes($banner);
  //$body=AddSlashes($body);
  $rip=getenv('REMOTE_ADDR');

  $DROOT=getenv('DOCUMENT_ROOT');
  include("sql.php3");
  $db=MySQL(和PHP搭配之最佳组合)_connect($sql['host'], $sql['user'] , $sql['passwd']); 
  $now=date('Y')."-".date('m')."-".date('d')." ".date('H').":".date('i').":".date('s');
   
  if($CHAR_GB==1) {
    include("CCharset.php3");
    $code=new CCharset;
    $banner=$code->Gb_Big5($banner);
    $body=$code->Gb_Big5($body);
    $poster=$code->Gb_Big5($poster);       
  }
   
  if($type==1) {
    $qsql="INSERT INTO bbs_docs (aid,sid,banner,body,poster,email,pip,wdate)
      values('$aid','$sid','$banner','$body','$poster','$email','$rip','$now')";
  } else {
    $qsql="INSERT INTO bbs_subj (aid,banner,body,poster,email,pip,wdate)
      values('$aid','$banner','$body','$poster','$email','$rip','$now')";
  }   
  $rs=MySQL(和PHP搭配之最佳组合)_db_query($sql['db'],$qsql);
  $id=MySQL(和PHP搭配之最佳组合)_insert_id();
   
   
   
  if($type==0) { //笆mail_list
    $qsql="INSERT INTO bbs_sml (sid,email) values('$id','$email')";
    $rs=MySQL(和PHP搭配之最佳组合)_db_query($sql['db'],$qsql);

Tags:社区 php mysql

编辑录入:coldstar [复制链接] [打 印]
赞助商链接