Thread: Mys 1.3.0 Embed All
View Single Post
  #8  
Old 05-01-2012, 04:40 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 84,130
SilverDragonTears is on a distinguished road
Default

New code :)

Code:
<?php

include("functions/functions.php");
include("functions/functions_users.php");
include("functions/functions_adopts.php");
include("inc/lang.php");

//***************//
//  START SCRIPT //
//***************//

$id = $_GET["id"];
$act = $_GET["act"];
$more = $_GET["more"];
$page = $_GET["page"];

if($isloggedin == "yes"){
	if($act == ""){
		$article_title = "Embed";
		$article_content .= "<br>
        This will allow you to select all your available hamster's codes.<br>";



        $article_content .= "<textarea rows='20' cols='80'>";

// We need to get all of the user's adoptables from the database and display them...
 		$query = "SELECT * FROM ".constant("PREFIX")."owned_adoptables, 
								".constant("PREFIX")."adoptables, 
								".constant("PREFIX")."levels WHERE 	".constant("PREFIX")."owned_adoptables.owner = '{$loggedinname}' 
														AND ".constant("PREFIX")."adoptables.type = ".constant("PREFIX")."owned_adoptables.type 
														AND ".constant("PREFIX")."levels.thisislevel = ".constant("PREFIX")."owned_adoptables.currentlevel 
														AND ".constant("PREFIX")."levels.adoptiename = ".constant("PREFIX")."adoptables.type 
														ORDER BY ".constant("PREFIX")."owned_adoptables.totalclicks";
	    $rowsperpage = 10;
        $pagination = new Pagination($adopts, $query, $rowsperpage, "http://".constant("DOMAIN").constant("SCRIPTPATH")."/myadopts.php");
        $pagination->setPage($_GET[page]);
	    $query = "SELECT * FROM ".constant("PREFIX")."owned_adoptables, 
								".constant("PREFIX")."adoptables, 
								".constant("PREFIX")."levels WHERE 	".constant("PREFIX")."owned_adoptables.owner = '{$loggedinname}' 
														AND ".constant("PREFIX")."adoptables.type = ".constant("PREFIX")."owned_adoptables.type 
														AND ".constant("PREFIX")."levels.thisislevel = ".constant("PREFIX")."owned_adoptables.currentlevel 
														AND ".constant("PREFIX")."levels.adoptiename = ".constant("PREFIX")."adoptables.type 
														ORDER BY ".constant("PREFIX")."owned_adoptables.type ";
		$stmt = $adopts->query($query);


	
	


	



		while($row = $stmt->fetchObject()){
			if($row->usealternates == 'yes') $image = $row->alternateimage; 
			else $image = $row->primaryimage; 
			if($row->currentlevel == 0) $image = $row->eggimage; 
			if($image=='') $image = $row->primaryimage; 
if($row->currentlevel >= '4') {
    $article_content .= "";
}
else if($row->isfrozen == 'yes') {
    $article_content .= "";
} else{
    $article_content .= "";
     }
}
    $article_content .= "</textarea>";
}
}
else{

$article_title = $accden;
$article_content = $reqlogin;

} // End is logged in check else



//***************//
//  OUTPUT PAGE  //
//***************//

echo showpage($article_title, $article_content, $date);

?>
__________________

Check out SilvaTales
Reply With Quote