| 
			
			 
			
				04-03-2009, 03:14 PM
			
			
			
		 | 
	| 
		
			
			| Member |  | 
					Join Date: Dec 2008 
						Posts: 27
					 
		Credits: 5,669  
	      |  | 
	
	| 
				 RE: Currency for leveling up / Adoptable shop (NEW: Prevent stealing!) 
 
			
			
	Quote: 
	
		| 
					Originally Posted by kisazeky
					
				 Easy, mattalien. 
First of all, insert the adoptables you want in this section using this query.  Replace shop with something different like shop_platinum.
 
	PHP Code: 
		
			
INSERT INTO adoptables VALUES ('', 'name','level 0 image','shop_platinum','cost') 
 Don't forget to add the rank images.
 
Then edit shop.php and find this line:
 
	PHP Code: 
		
			
$article_content = stripslashes($article_content); 
 Right below it, put this in:
 
	PHP Code: 
		
			
$article_content=$article_content."<p>Platinum Coin Frames";
 $query = "SELECT * FROM adoptables WHERE memberlevel = 'shop_platinum'";
 $result = mysql_query($query);
 $num = mysql_numrows($result);
 
 //Loop out code
 $i=0;
 while ($i < $num) {
 
 $aID=@mysql_result($result,$i,"uid");
 $name=@mysql_result($result,$i,"name");
 $imageurl=@mysql_result($result,$i,"imageurl");
 $cost=@mysql_result($result,$i,"description");
 
 //Begin our content output...
 $article_content=$article_content."<p>".$name."<p><img src='".$imageurl."' /><p>".$cost." <p><a href='buy.php?aID=".$aID."'>Buy ".$name."</a>";
 
 
 $i++;
 }
 
 |  Thanks! You are the best, apart from BMR77!
 
:)
		 
			
			
			
			
			
			
			
			
			
			
				
			
			
			
		 |