首頁  >  文章  >  後端開發  >  社區(php&&mysql)一_PHP教程

社區(php&&mysql)一_PHP教程

WBOY
WBOY原創
2016-07-21 16:05:491038瀏覽

function cook_cooloff(){
    全域$PHP_SELF,$aid,$pgno;
    setcookie("OPEN_LIST",0,time() 31536000); =$pgno");
    退出;
}
//============================== =====================================
function cook_coolon(){
    全域$PHP_SELF ,$aid,$pgno;
    setcookie("OPEN_LIST",1,time() 31536000);
    Header("位置:$PHP_SE?aid=$aid&pgno)
}
函數check_mail($semail)
{
    $str=strchr($semail,'@');   
  >    $str=strchr($semail,".");
    if ($str=="") 回傳false;
    返回true;
}
//====== ====================================== ============== ===========
function addhitviews($sid,$rid) {
    $DROOT=getenv('DOCUMENT_ROOT');
    include("sql.php3");
    include("sql.php3"); 🎜>    $db=mysql_connect($sql['host'], $sql['user'] , $sql['passwd']);  
    if($sid==$rid)  
    if($sid==$rid)  from bbs_subj where id='$rid'";
    else $qsql="SELECT * from bbs_docs where id='$rid'";
    $ );
    $row=mysql_fetch_array($rs);
    $views=$row['views'];
    "UPDATE bbs_subj SETviews='$views' where id='$rid'";
    else $qsql="UPDATE bbs_docs SET views='$views' where id='$rid'";


mysql_db_query($sql['db'],$qsql);
}

//======================== ================ =========================
function mail_list(){
    全域$PHP_SELF,$HTTP_HOST,$email;
    全域$aid,$sid,$rid;
    $way1,$way2     $mailtype=0; //璹綹
    if(strlen($way2)) $mailtype=1;//
>    include("sql.php3");
    $db=mysql_connect($sql['host'], $sql['user'] , $sql['pass );  
  ==0) { //璹綷
        $qsql="SELECT * from bbs_sml where sid='$sid' AND email='$ '";         if(mysql_num_rows($rs)==0) { //臨⠿
      $email')";
          $rs=mysql_db_query($sql['db'],$qsql);
              
         」;

}

    }

    } else {
        echo           
         ";  
} echo「 cationlt; script Lakenanage = javaScript document.oo }

//============================================ ======================
函數Send_the_doc_to_mail_list($aid,$sid,$rid){
    全域$PHP_SELF,$HTTP_HOST ;
    $DROOT=getenv('DOCUMENT_ROOT');
    include("sql.php3");
    $db=mysql_connect($ $[ 'passwd']);  
    if($sid==$rid)     $qsql="SELECT * from bbs_subj where id='$sid'";
    $rs=mysql_db_query($sql['db'],$qsql);
    $row=mysql_fetch_array($rs) ; 'poster'];
    $banner=$row['banner'];
    $body=$row['body'];

   ゅ徹";
    $message=":$postern";
    $message.="ゅ徹夾肈:$bannern";     $message.="nㄤ閩ゅ徹叫 http://$HTTP_HOST$PHP_SELF?proc=view&aid=$.sid sid&rid=$ridn"; ">n";
    $mailfrom="發件人:魔法傑瑞";


  '$sid'";
    $rs=mysql_db_query($sql['db'],$qsql);
    while($row=mysql_fetch_array($rs)) { //mail_list  $row['email'];
        郵件($email,$subj,$message,$mailfrom);
        🎜> $qsql="SELECT * from bbs_area where id='$aid'";
    $rs=mysql_db_query($sql['db'],$qsql);
   🎜>    $email=$row['email'];
    $banner=$row['banner'];

    mail($email,"$banban んサ+XX3"399,"$banban サmessage,$mailfrom);


}
//============================= ========= ============================
function mail_friend(){
    全域$ PHP_SELF,$HTTP_HOST,$c_email,$ c_poster,$frmail;
    全域$aid,$sid,$rid;
    if(check_mail($frmail)) {
);
    include("sql.php3");
    $db=mysql_connect($sql['host'], $sql['user'] , $sql['passwd'])
; if($sid==$rid) {  
        $qsql="SELECT * from bbs_subj where id='$rid' ";
   = '$rid' ";
    }
        $rs=mysql_db_query($sql['db'],$qsql);
      $row=mysql_fetch_array($rs); 🠎> c_poster.
       $message.="ゆ徹夾肈:$bannern"; .="nㄤ閩輕徹垐 http://$HTTP_HOST$PHP_SELFLFSnviews&aidsid=$ aid&id=$$$id? $ridn"; >>n";
     $mailfrom="寄件人:".$c_email;

     mail($frmail,$subj,$subj,$a); 🎜>     }else {
           echo "
         巋粇'); "; }
      //echo "rid=$ rid a=$aid s=$sid p=$pgno";

        echo "
        location=' $PHP_SELF?proc=view&aid=$aid&sid=$sid&rid=$rid'
          ;



http://www.bkjia.com/PHPjc/315626.html

www.bkjia.com

true

http: //www.bkjia.com/PHPjc/315626.html

TechArticle

function cook_cooloff(){ global $PHP_SELF,$aid,$pgno setcookie(OPEN_L,,$2); 31536000); 標題(位置:$PHP_SELF?aid=$aidquot;); } //================================ ==...




陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn