View Single Post
  #2  
Old 07-02-2011, 05:03 AM
Chibi_Chicken Chibi_Chicken is offline
Niwatori Kami
 
Join Date: Jun 2011
Posts: 63
Gender: Unknown/Other
Credits: 5,187
Chibi_Chicken is on a distinguished road
Default

Well my suggestion after looking at the levelup and reward function would be.
after the line
Code:
$rewardstatus = reward($id, $type, $nextlevel, $owner);
check if $type is the Happy Birthday type
if true then get the promocode from the adopt.

sql command:
Code:
"SELECT * FROM ".$GLOBALS['prefix']."levels WHERE adoptiename='$type' and thisislevel='$nextlevel'"
with the result grab the $promocode and build a link:
Code:
$promocode=@mysql_result($result, 0,"promocode");
<a href='promo.php?promocode=".$promocode."'>HERE IS A LINK TO PROMOCODE: $promocode</a>
where you could display that link would be
Code:
 	$article_content = "<img src='".$image."'><br>".$lang_gave."".$name." one ".$lang_unit.".<br>".$lang_levelup_encourage;
or at
Code:
	$article_content = $article_content . "<div align='center'><br />You have earned ". grabanysetting('rewardmoney') ." ". grabanysetting('cost') ." for leveling up this adoptable. <br />You now have {$GLOBALS['money']} ".grabanysetting('cost')."</div>";
The problems that i can see with this is if the pet didnt level up it will still try to display a link.
Reply With Quote