View Single Post
  #6  
Old 10-17-2016, 09:35 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 392,942
Hall of Famer is on a distinguished road
Default

Alright, I will write the actual code for you, its not very difficult really. My way to do this is to create a PrivateMessage object and call the post() method to send and save it, which may be harder to understand for you than to write an INSERT query. But since you dont even know how to write an INSERT query, it doesnt matter, just copy/paste the code and follow the instructions.

This is the complete code:

Code:
$message = new PrivateMessage;
$message->setrecipient($mysidia->input->post("owner"));
$message->setmessage("You have received an item from Admin", "Dear {$mysidia->input->post("owner")}, you have received {$mysidia->input->post("quantity")} {$mysidia->input->post("itemname")} on Atrocity.com. Enjoy!");
$message->post();
All you need to do is to add it below the if...else statement code I showed you in an earlier post. Search for 'public function add()' in file /admincp/inventory.php, and you should find it around line 29-37.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote