Documentation: Kmessaging

# Class: Kmessaging (1.2)b

Class to implement and internal mail system.
Credits to: bubu

# Download:

To download .rar click here
To download .zip click here
tar.gz available soon
Variables
string Kmessaging::DBName
string Kmessaging::DBUser
string Kmessaging::DBPass
string Kmessaging::DBHost
string Kmessaging::tblName
Methods
Kmessaging::KMessaging ( $connect , $selectDB , $con )
Kmessaging::SendMessege ( $title , $body , $sender , $receiver , $senderLevel )
Kmessaging::GetTitle ( $msgId )
Kmessaging::GetBody ( $msgId )
Kmessaging::GetSenderID ( $msgId )
Kmessaging::GetReceiverID ( $msgId )
Kmessaging::GetMessege ( $msgId )
Kmessaging::MarkAsRead ( $msgId )
Kmessaging::GetAllMesseges ( $order , $receiver , $sender )
Kmessaging::DeleteMessege ( $msgId )

Kmessaging::DBName | ^ Top | ^ Variables | ^ Methods

Holds the database name
Type:
string
Default:
'dbname'

Kmessaging::DBUser | ^ Top | ^ Variables | ^ Methods

Mysql Server Username
Type:
string
Default:
'username'

Kmessaging::DBPass | ^ Top | ^ Variables | ^ Methods

Mysql Server Password
Type:
string
Default:
'password'

Kmessaging::DBHost | ^ Top | ^ Variables | ^ Methods

Mysql Server Hostname
Type:
string
Default:
'localhost'

Kmessaging::tblName | ^ Top | ^ Variables | ^ Methods

Name of the table
Type:
string
Default:
'MsgTbl'

Kmessaging::KMessaging() | ^ Top | ^ Variables | ^ Methods

Constructor and connection to database
Arguments:
( bool ) $connect
( bool ) $selectDB
( DB connection ) $con
Default:
$connect = false
$selectDB = false
$con = ''

Kmessaging::SendMessege() | ^ Top | ^ Variables | ^ Methods

Sends the message
Arguments:
( string ) $title
( string ) $body
( int ) $sender
( int ) $receiver
( int ) $senderLevel

Kmessaging::GetTitle() | ^ Top | ^ Variables | ^ Methods

Gets the title of one specific message
Arguments:
( int ) $msgId

Kmessaging::GetBody() | ^ Top | ^ Variables | ^ Methods

Gets the body of one specific message
Arguments:
( int ) $msgId

Kmessaging::GetSenderID() | ^ Top | ^ Variables | ^ Methods

Gets the sender ID of one specific message
Arguments:
( int ) $msgId

Kmessaging::GetReceiverID() | ^ Top | ^ Variables | ^ Methods

Gets the receiver ID of one specific message
Arguments:
( int ) $msgId

Kmessaging::GetMessege() | ^ Top | ^ Variables | ^ Methods

Gets a specific message
Arguments:
( int ) $msgId

Kmessaging::MarkAsRead() | ^ Top | ^ Variables | ^ Methods

Marks an specific message as Readed
Arguments:
( int ) $msgId

Kmessaging::GetAllMesseges() | ^ Top | ^ Variables | ^ Methods

Get all messages
$order can take the next values
(0-> Order By senderLevel Ascendent,
1-> Order By senderLevel Descendent,
2-> Order By readed messege Ascendent,
3-> Order By senderLevel Descendent)
Arguments:
( int ) $order
( int ) $receiver
( int ) $sender
Default:
$order = 0

Kmessaging::DeleteMessege() | ^ Top | ^ Variables | ^ Methods

Deletes a specific message
Arguments:
( int ) $msgId