社區(php&&mysql)一

來源:互聯網
上載者:User
關鍵字 社區(php&&mysql)一
function cook_cooloff(){
  global $PHP_SELF,$aid,$pgno;
  setcookie("OPEN_LIST",0,time()+ 31536000);
  Header("Location:$PHP_SELF?aid=$aid&pgno=$pgno");
  exit;
}
//===============================================================
function cook_coolon(){
  global $PHP_SELF,$aid,$pgno;
  setcookie("OPEN_LIST",1,time()+ 31536000);
  Header("Location:$PHP_SELF?aid=$aid&pgno=$pgno");
  exit;
}
function check_mail($semail)
{
  $str=strchr($semail,'@'); 
  if ($str=="") return false;
  $str=strchr($semail,".");
  if ($str=="") return false;
  return true;
}
//================================================================
function addhitviews($sid,$rid) {
  $DROOT=getenv('DOCUMENT_ROOT');
  include("sql.php3");
  $db=MySQL(和PHP搭配之最佳組合)_connect($sql['host'], $sql['user'] , $sql['passwd']); 
  if($sid==$rid)   $qsql="SELECT * from bbs_subj where id='$rid'";
  else $qsql="SELECT * from bbs_docs where id='$rid'";
  $rs=MySQL(和PHP搭配之最佳組合)_db_query($sql['db'],$qsql);
  $row=MySQL(和PHP搭配之最佳組合)_fetch_array($rs);
  $views=$row['views'];
  $views++;
  if($sid==$rid)   $qsql="UPDATE bbs_subj SET views='$views' where id='$rid'";
  else $qsql="UPDATE bbs_docs SET views='$views' where id='$rid'";
  
  MySQL(和PHP搭配之最佳組合)_db_query($sql['db'],$qsql);
}

//===============================================================
function mail_list(){
  global $PHP_SELF,$HTTP_HOST,$email;
  global $aid,$sid,$rid;
  global $way1,$way2;
  
  if(check_mail($email)) {
  $mailtype=0; //璹綷
  if(strlen($way2)) $mailtype=1;//

  $DROOT=getenv('DOCUMENT_ROOT');
  include("sql.php3");
  $db=MySQL(和PHP搭配之最佳組合)_connect($sql['host'], $sql['user'] , $sql['passwd']); 
  if($mailtype==0) { //璹綷
    $qsql="SELECT * from bbs_sml where sid='$sid' AND email='$email'";
    $rs=MySQL(和PHP搭配之最佳組合)_db_query($sql['db'],$qsql);
    if(MySQL(和PHP搭配之最佳組合)_num_rows($rs)==0) { //臨⊿
     $qsql="INSERT INTO bbs_sml (sid,email) values('$sid','$email')";
     $rs=MySQL(和PHP搭配之最佳組合)_db_query($sql['db'],$qsql);

1 2 3 4 下一頁
  • 相關文章

    聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.