Discuz Data Sheet Description

Source: Internet
Author: User

Pm.so

Message list

CREATE TABLE ' pre_ucenter_pm_lists ' (
' Plid ' mediumint (8) unsigned not NULL auto_increment COMMENT ' message self-increment ID ',
' Authorid ' mediumint (8) unsigned not NULL DEFAULT ' 0 ' COMMENT ' sender uid ',
' Pmtype ' tinyint (1) unsigned not NULL DEFAULT ' 0 ' COMMENT ' message type 1 normal two people chat ',
' Subject ' varchar (not NULL),
' Members ' smallint (5) unsigned not NULL DEFAULT ' 0 ' COMMENT ' How many people chat ',
' Min_max ' varchar (+) not NULL COMMENT ' user uid combination, min_max,pmtype=2 is empty ',
' Dateline ' int (ten) unsigned not NULL DEFAULT ' 0 ',
' Lastmessage ' text not NULL COMMENT ' recent message content ',
PRIMARY KEY (' Plid '),
KEY ' Pmtype ' (' Pmtype '),
KEY ' Min_max ' (' Min_max '),
KEY ' Authorid ' (' Authorid ', ' Dateline ')
) Engine=myisam DEFAULT CHARSET=GBK

Get message Content PMID

CREATE TABLE ' pre_ucenter_pm_indexes ' (
' PMID ' mediumint (8) unsigned not NULL auto_increment,
' Plid ' mediumint (8) unsigned not NULL DEFAULT ' 0 ' COMMENT ' message ID ',
PRIMARY KEY (' PMID '),
KEY ' Plid ' (' Plid ')
) Engine=myisam DEFAULT CHARSET=GBK

Message content Table

CREATE TABLE ' Pre_ucenter_pm_messages_0 ' (
' PMID ' mediumint (8) unsigned not NULL DEFAULT ' 0 ',
' Plid ' mediumint (8) unsigned not NULL DEFAULT ' 0 ',
' Authorid ' mediumint (8) unsigned not NULL DEFAULT ' 0 ',
' Message ' text is not NULL,
' Delstatus ' tinyint (1) unsigned not NULL DEFAULT ' 0 ',
' Dateline ' int (ten) unsigned not NULL DEFAULT ' 0 ',
PRIMARY KEY (' PMID '),
KEY ' Plid ' (' plid ', ' delstatus ', ' Dateline '),
KEY ' Dateline ' (' Plid ', ' Dateline ')
) Engine=myisam DEFAULT CHARSET=GBK

User message Statistics

CREATE TABLE ' Pre_ucenter_pm_members ' (
' Plid ' mediumint (8) unsigned not NULL DEFAULT ' 0 ',
' UID ' mediumint (8) unsigned not NULL DEFAULT ' 0 ',
' IsNew ' tinyint (1) unsigned not NULL DEFAULT ' 0 ',
' Pmnum ' int (ten) unsigned not NULL DEFAULT ' 0 ',
' Lastupdate ' int (ten) unsigned not NULL DEFAULT ' 0 ',
' Lastdateline ' int (ten) unsigned not NULL DEFAULT ' 0 ',
PRIMARY KEY (' plid ', ' uid '),
KEY ' isnew ' (' isnew '),
KEY ' lastdateline ' (' uid ', ' lastdateline '),
KEY ' lastupdate ' (' uid ', ' lastupdate ')
) Engine=myisam DEFAULT CHARSET=GBK

HTTP://9NIGHT.KIMISS.COM/HOME.PHP?MOD=SPACECP&AC=PM Private Message

Send Message Pre_ucenter_pm_lists.pmtype normal 1, group chat 2

SENDPM (Implode (', ', $newusers), $subject, $message, ', 0, 1, $type);

functionSENDPM ($toid,$subject,$message,$fromid= ",$replypmid= 0,$isusername= 0,$type= 0) {    Global $_g; if($fromid= = = "") {        $fromid=$_g[' UID '];    } loaducenter (); returnUc_pm_send ($fromid,$toid,$subject,$message, 1,$replypmid,$isusername,$type);}
functionUc_pm_send ($fromuid,$msgto,$subject,$message,$instantly= 1,$replypmid= 0,$isusername= 0,$type= 0) {    if($instantly) {        $replypmid= @Is_numeric($replypmid) ?$replypmid: 0; return Call_user_func(Uc_api_func, ' pm ', ' SENDPM ',Array(' fromuid ' =$fromuid, ' msgto ' =$msgto, ' subject ' =$subject, ' message ' =$message, ' replypmid ' =$replypmid, ' isusername ' =$isusername, ' type ' = =$type)); } Else {        $fromuid=intval($fromuid); $subject=Rawurlencode($subject); $msgto=Rawurlencode($msgto); $message=Rawurlencode($message); $replypmid= @Is_numeric($replypmid) ?$replypmid: 0; $replyadd=$replypmid? "&pmid=$replypmid&do=reply ":"; $apiurl= Uc_api_url (' pm_client ', ' send ', "uid=$fromuid"," &msgto=$msgto&subject=$subject&message=$message $replyadd"); @Header("expires:0"); @Header("Cache-control:private, Post-check=0, pre-check=0, max-age=0",FALSE); @Header("Pragma:no-cache"); @Header("Location:".)$apiurl); }}

Send Message Pre_ucenter_pm_lists.pmtype = 1

//Before a party has sent a message
If(!isset($existplid[$value])) { $this->db->query ("INSERT into".) Uc_dbtablepre. " Pm_lists (Authorid, Pmtype, subject, members, Min_max, Dateline, Lastmessage) VALUES ('$fromuid', ' 1 ', '$subject', 2, '$value‘, ‘".$this->base-> Time."‘, ‘$lastmessage‘)"); $plid=$this->db->insert_id (); $this->db->query ("INSERT into".) Uc_dbtablepre. " Pm_indexes (plid) VALUES ('$plid‘)"); $pmid=$this->db->insert_id (); $this->db->query ("INSERT into".) Uc_dbtablepre.$this->getposttablename ($plid)." (PMID, Plid, Authorid, message, Dateline, Delstatus) VALUES ('$pmid‘, ‘$plid‘, ‘$fromuid‘, ‘$message‘, ‘".$this->base-> Time. "', 0)"); $this->db->query ("INSERT into".) Uc_dbtablepre. " Pm_members (Plid, uid, isnew, Pmnum, Lastupdate, Lastdateline) VALUES ('$plid‘, ‘$key', ' 1 ', ' 1 ', ' 0 ', '.$this->base-> Time."‘)"); $this->db->query ("INSERT into".) Uc_dbtablepre. " Pm_members (Plid, uid, isnew, Pmnum, Lastupdate, Lastdateline) VALUES ('$plid‘, ‘$fromuid', ' 0 ', ' 1 ', '.$this->base-> Time."‘, ‘".$this->base-> Time."‘)"); } Else { $plid=$existplid[$value]; $this->db->query ("INSERT into".) Uc_dbtablepre. " Pm_indexes (plid) VALUES ('$plid‘)"); $pmid=$this->db->insert_id (); $this->db->query ("INSERT into".) Uc_dbtablepre.$this->getposttablename ($plid)." (PMID, Plid, Authorid, message, Dateline, Delstatus) VALUES ('$pmid‘, ‘$plid‘, ‘$fromuid‘, ‘$message‘, ‘".$this->base-> Time. "', 0)"); $result=$this->db->query ("INSERT into".) Uc_dbtablepre. " Pm_members (Plid, uid, isnew, Pmnum, Lastupdate, Lastdateline) VALUES ('$plid‘, ‘$key', ' 1 ', ' 1 ', ' 0 ', '.$this->base-> Time. "')", ' SILENT '); if(!$result) { $this->db->query ("UPDATE". Uc_dbtablepre. " Pm_members SET isnew=1, pmnum=pmnum+1, lastdateline= ' ".$this->base-> Time."‘ WHERE plid= '$plid' and uid= '$key‘"); } $result=$this->db->query ("INSERT into".) Uc_dbtablepre. " Pm_members (Plid, uid, isnew, Pmnum, Lastupdate, Lastdateline) VALUES ('$plid‘, ‘$fromuid', ' 0 ', ' 1 ', '.$this->base-> Time."‘, ‘".$this->base-> Time. "')", ' SILENT '); if(!$result) { $this->db->query ("UPDATE". Uc_dbtablepre. " Pm_members SET isnew=0, pmnum=pmnum+1, lastupdate= ' ".$this->base-> Time. "', lastdateline= '".$this->base-> Time."‘ WHERE plid= '$plid' and uid= '$fromuid‘"); } $this->db->query ("UPDATE". Uc_dbtablepre. " Pm_lists SET lastmessage= '$lastmessage' WHERE plid= '$plid‘"); }

Reply Message Pre_ucenter_pm_lists.pmtype = 1

$lastmessage=Array(' Lastauthorid ' =$fromuid, ' lastauthor ' =$fromusername, ' lastsummary ' =$lastsummary); $lastmessage=addslashes(Serialize($lastmessage)); $result=$this->db->query ("INSERT into".) Uc_dbtablepre. " Pm_members (Plid, uid, isnew, Pmnum, Lastupdate, Lastdateline) VALUES ('$plid‘, ‘$touid', ' 1 ', ' 1 ', ' 0 ', '.$this->base-> Time. "')", ' SILENT '); if(!$result) {                $this->db->query ("UPDATE". Uc_dbtablepre. " Pm_members SET isnew=1, pmnum=pmnum+1, lastdateline= ' ".$this->base-> Time."‘ WHERE plid= '$plid' and uid= '$touid‘"); }            $this->db->query ("UPDATE". Uc_dbtablepre. " Pm_members SET isnew=0, pmnum=pmnum+1, lastupdate= ' ".$this->base-> Time. "', lastdateline= '".$this->base-> Time."‘ WHERE plid= '$plid' and uid= '$fromuid‘");

Discuz Data Sheet Description

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.