Location: PHPKode > projects > Absolut Engine > absolut-engine-33870/admin/modules/messaging/modify.php
<?
define(TEMPDIR,"../../");
@include(TEMPDIR."coreclass.php");
$ae=new CEngine();
$ae->EngineInitialize();
$ae->RequestVariables(1);
$ae->UserVerifySession();

if ($ae->command==1) // sends a message (and optionally email) to user
   {
   $ae->adate=date("Y-m-d");
   $ae->atime=date("H:i:s");
   if ($ae->recipientID==$ae->textmessaging[4]) $ae->DisplayError(10,"","","messaging");
   $ae->DBQuery("INSERT INTO ".$ae->tablemessaging[0]." VALUES (NULL,'".$ae->recipientID."','".$ae->adate."','".$ae->atime."','".$ae->senderID."','".$ae->subject."','".$ae->message."')");
   if ($ae->email)
   {
   $ae->DBQuery("SELECT * FROM ".$ae->table[5]." WHERE ID='".$ae->recipientID."'");
   $ae->DBGetRow();
   $ae->email=$ae->access["email"];
   if ($ae->email)
   {
   $ae->DBQuery("SELECT * FROM ".$ae->table[5]." WHERE ID='".$ae->senderID."'");
   $ae->DBGetRow();
   $ae->sender=$ae->access["fullname"];
   $ae->senderemail=$ae->access["email"];
   $ae->message.="\r\n\r\n----------------------------\n  ABSOLUT ENGINE by dusoft  \nhttp://www.absolutengine.com\n----------------------------";
   $ae->subject.=" (Absolut Engine - www.absolutengine.com)";
   mail($ae->email,$ae->subject,$ae->message,"From: ".$ae->sender." <".$ae->senderemail.">\nX-Mailer: Absolut Engine ".AE_VERSION." by dusoft (www.absolutengine.com)");
   }
   }
   }
if ($ae->command==2) // deletes a message
   {
   $ae->DBQuery("DELETE FROM ".$ae->tablemessaging[0]." WHERE ID='".$ae->messageID."'");
   }

header("location: http://".$ae->server."/".$ae->path."admin/admin.php?username=".$ae->username."&session=".$ae->session);
if ($ae->command==2) header("location: http://".$ae->server."/".$ae->path."admin/modules/messaging/readmessage.php?username=".$ae->username."&session=".$ae->session);
?>
Return current item: Absolut Engine