Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 02-02-2013, 05:42 AM
dulop's Avatar
dulop dulop is offline
Member
 
Join Date: May 2012
Posts: 26
Gender: Male
Credits: 8,516
dulop is on a distinguished road
Default

i've seeing the files and i made this:

PHP Code:
function items_milagros($item$adopt){
$codigopromo $adopts->select("items_functions", array(), "code")->fetchObject();
$mtitle "Has ganado un logro!";
        
$mtext "Felicitaciones!  Has recibido una recompenza. El código es el siguiente:{$codigopromo} . Puedes usarlo en la página de promos. Para saber como usarlo hay una gu*a correspondiente.";

        
$date date('Y-m-d');
        
$GLOBALS['adopts']->insert("messages", array("id" => NULL"fromuser" => "SYSTEM""touser" => $owner"status" => "unread""datesent" => $date"messagetitle" => $mtitle"messagetext" => $mtext));
        
        
$row $GLOBALS['adopts']->select("users", array(), "username='{$owner}'")->fetchObject();    

        
$newmessagenotify=$row->newmessagenotify;
        
$email=$row->email;
        
        if(
$newmessagenotify == 1) {
            
// We are sending this user an email about the new message...
            
$systememail grabanysetting("systememail"); // QUERYPROBLEM - we should get the settings at the beginning so we never need to call for them after that.            
            
$headers "From: {$systememail}";
            
$site_name grabanysetting("sitename"); // QUERYPROBLEM - see, two queries for this message alone.
            
$message "Hello {$owner};\n\nYou have received a new Private Message from SYSTEM at {$site_name} with the title {$mtitle}.\n
            You can read this message at: http://www."
.constant("DOMAIN").constant("SCRIPTPATH")."/messages.php\n
            Thank You.  The 
{$site_name} team.";

            
mail($email$site_name." - You Have Received a Reward"$message$headers);
        }
        
$note "Has conseguido un código promo!";
return 
$note;

Its a new function. I want that when i use a item with this function, the system send me a pm, giving me a promocode.

But doesn't work. Any idea? when i use the item, the screen goes blank.
Thank you
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mys v1.3.4 Item Shop Mod(s): NPC + Item Display + Tooltips Kyttias Mys v1.3.x Mods 55 06-19-2020 11:21 AM
Item Promocode MaximumRide Questions and Supports 11 05-02-2012 11:31 PM
ok im new and i give up i am asking for help chinchillapals Questions and Supports 12 04-18-2012 04:22 PM
Promocode SilverDragonTears Questions and Supports 25 04-12-2012 03:11 AM


All times are GMT -5. The time now is 10:56 PM.

Currently Active Users: 1858 (0 members and 1858 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636