Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.2.x Mods

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 08-29-2011, 02:01 PM
fadillzzz fadillzzz is offline
Dev Staff
 
Join Date: Jan 2010
Posts: 501
Gender: Male
Credits: 42,843
fadillzzz is an unknown quantity at this point
Default

Try this for your myadopts.php
PHP Code:
<?php

include("inc/functions.php");

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

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

if(
$isloggedin == "yes"){

if(
$act == ""){

    
$article_content .= "
        <div style='width: 100%; float:left; padding:5px;'><img src='http://www.v-adoptables.com/core/images/icons/small/coins.png'>                       
{$GLOBALS['money']}</div><br>";
        
        
$article_content .="<br>
        <center>
        <div style='width: 32%; float: left;'><a href='trade.php'>Trade</a><br>
        <a href='breeding.php'>Breed</a><br>
        <a href='embed.php'>Embed All</a></div>
        <div style='width: 32%; float: left;'><a href='account.php'>Account Settings</a><br>
        <a href='profile.php'>Members List</a><br>
        <a href='logout.php'>Log Out</a></div>
        <div style='width: 32%; float: left;'><a href='donate.php'>Donate to Friends</a><br>
        <a href='sort.php'>Sort Adopts</a></div></center>
        <p id='activate_sort'>
                                 Click here to sort your adoptables
                            </p>
        <br>
        <br>
        <br>
        <br>
        Share this link with others to show them your Den<br>
        <input type='text' size='100' value='http://silvadopts.com/profile.php?user=
$loggedinname'><br>
        <a href='http://silvadopts.com/profile.php?user=
$loggedinname'>http://silvadopts.com/profile.php?user=$loggedinname</a><br>";



        
$article_content .= "<div style='height:100%; background: #1f1f1f url(http://silvadopts.com/forums/public/style_images/animate/box_pattern.png) repeat;
        color: #fff;
    border: 1px solid #282828;
    border-top: 1px solid #363636;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    padding: 5px;'><center>Your Den</center><br><br><table style='width: 100%;' class='vamid'><tbody>
    <tr><th>SilvA Fox</th><th>Name</th><th>Level</th><th>Manage</th><th>Get Codes</th><th>Clicks</th></tr></table><table id='sortable_adoptables>'"
;


    
// We need to get all of the user's adoptables from the database and display them...
   /* $query = "SELECT * FROM ".$prefix."owned_adoptables, ".$prefix."levels WHERE ".$prefix."owned_adoptables.owner = '{$loggedinname}'" 
    ." AND ".$prefix."owned_adoptables.type = ".$prefix."owned_adoptables.type AND ".$prefix."levels.thisislevel = ".$prefix."owned_adoptables.currentlevel AND ".$prefix."levels.adoptiename = " 
    .$prefix."owned_adoptables.type ORDER BY ".$prefix."owned_adoptables.sort, ".$prefix."owned_adoptables.totalclicks";
*/
$query "    SELECT * 
                    FROM 
{$prefix}owned_adoptables 
                    LEFT JOIN 
{$prefix}sort_adoptables 
                        ON 
{$prefix}owned_adoptables.aid = {$prefix}sort_adoptables.adoptable_id
                    INNER JOIN 
{$prefix}levels 
                        ON 
{$prefix}levels.thisislevel = {$prefix}owned_adoptables.currentlevel
                    INNER JOIN 
{$prefix}adoptables
                        ON 
{$prefix}owned_adoptables.type = {$prefix}adoptables.type
                    WHERE 
{$prefix}owned_adoptables.owner = '{$loggedinname}
                    AND 
{$prefix}levels.adoptiename = {$prefix}adoptables.type
                    ORDER BY 
{$prefix}sort_adoptables.sorting_id";  

    
$result runquery($query);
    
$num mysql_numrows($result);
    
//Loop out code
    
$i=0;
    while (
$i $num) {
        
$aid=@mysql_result($result,$i$prefix."owned_adoptables.aid");
        
$currentlevel=@mysql_result($result,$i$prefix."owned_adoptables.currentlevel");
        
$gender=@mysql_result($result,$i$prefix."owned_adoptables.gender");
        
$isfrozen=@mysql_result($result,$i$prefix."owned_adoptables.isfrozen");
        
$type=@mysql_result($result,$i$prefix."owned_adoptables.type");
        
$name=@mysql_result($result,$i$prefix."owned_adoptables.name");
        
$eggimage=@mysql_result($result,$i$prefix."adoptables.eggimage");
        
$usealternates=@mysql_result($result,$i$prefix."owned_adoptables.usealternates");
        
$totalclicks=@mysql_result($result,$i$prefix."owned_adoptables.totalclicks");
        
$primaryimage=@mysql_result($result,$i$prefix."levels.primaryimage");
        
$alternateimage=@mysql_result($result,$i$prefix."levels.alternateimage");
        if (
$usealternates=='yes') { $image $alternateimage; }
        else { 
$image $primaryimage; }
        if (
$currentlevel==0) { $image $eggimage; }
        if (
$image=='') { $image $primaryimage; }
        
$article_content .= "<tr><td><a href='myadopts.php?act=stats&id=".$aid."'><img src='$image'></a></td><td>";

if(
$isfrozen == 'no') {
    
$article_content .= '';
} else {
    
$article_content .= '<img src=\'http://inky.org/rpg/agents-maps/snowflake.png\'>';
    
}

$article_content .= "<img src='picuploads/{$gender}.png'> <em><em>".stripslashes($name)."</em></em></td><td>{$currentlevel}</td><td><a href='myadopts.php?act=manage&id={$aid}'>Actions</a></td><td><a href='myadopts.php?act=bbcode&id={$aid}'>Get Codes</a></td><td>{$totalclicks}</td></tr>";
        
$i++;
    }
    
$article_content .= "</tbody></table></div>";

}
else if(
$act == "manage"){

// We are managing a specific adoptable

if($id == "" or !is_numeric($id)){

$article_title $err_idnoexist;
$article_content $err_idnoexist_text;

}
else{

// See if the adoptable actually exists...

$query "SELECT * FROM ".$prefix."owned_adoptables WHERE owner='$loggedinname' and aid='$id'";
$result runquery($query);
$num mysql_numrows($result);

//Loop out code
$i=0;
while (
$i 1) {

$aid=@mysql_result($result,$i,"aid"); //The adoptable's ID
$currentlevel=@mysql_result($result,$i,"currentlevel");
$type=@mysql_result($result,$i,"type");
$name=@mysql_result($result,$i,"name");
$tradestatus=@mysql_result($result,$i,"tradestatus");
$father=@mysql_result($result,$i,"father");
$mother=@mysql_result($result,$i,"mother");
$lastbred=@mysql_result($result,$i,"lastbred");
$adultdescription=@mysql_result($result,$i,"adultdescription");


$i++;
}

// Check that the adoptable exists for real, or show an error...

if($aid == $id){

// The adoptable does exist, so we show the image and junk to the user...

$image getcurrentimage($id);

$article_title "Managing "  stripslashes($name);
$article_content "
        <div id='top' style='position: relative;'></div>
        <div id='middle' style='position: relative;'><img src='"
.$image."'><br>
This page allows you to manage "
.stripslashes($name).".  Click on an option below to change settings.<br><br>
<b><a href='levelup.php?id="
.$id."'>Level Up</a> Level up this creature to help it reach the next stage.<br>
<a href='myadopts.php?act=stats&id="
.$id."'>Stats</a> Stats for your creature.<br>
<a href='myadopts.php?act=bbcode&id="
.$id."'>Get BBCodes / HTML Codes</a> Use these codes to place ".stripslashes($name)." on other forums.<br>
<a href='myadopts.php?act=rename&id="
.$id."'>Rename</a> Rename  ".stripslashes($name).".<br>
<a href='myadopts.php?act=trade&id="
.$id."'>Change Trade Status</a> Change ".stripslashes($name)."'s trade status to notfortrade or fortrade.<br>";

if(
$currentlevel == '0') {
    
$article_content .= "Freeze (You can not freeze eggs.)<br>";
} else if(
$currentlevel == '1') {
    
$article_content .= "Freeze (You can not freeze eggs.)<br>";
} else if(
$currentlevel == '2') {
    
$article_content .= "Freeze (You can not freeze eggs.)<br>";
} else if(
$currentlevel == '3') {
    
$article_content .= "Freeze (You can not freeze eggs.)<br>";
} else if(
$currentlevel == '5') {
    
$article_content .= "Freeze (You can not freeze adults.)<br>";
} else {
    
$article_content .= "<a href='myadopts.php?act=freeze&id=".$id."'>Freeze</a> This action can NOT be undone.<br>";
}
$article_content .= "<a href='myadopts.php?act=pound&id=".$id."'>Abandon</a> Abandon  ".stripslashes($name)." and allow it to fend for itself.</b><br></div>";

}
else{

$article_title $err_idnoexist;
$article_content $err_idnoexist_text;

}

}

// End the MANAGE action code
else if($act == "stats"){

// We are getting the stats for the adoptable
// Check that an ID was submitted...

if(is_numeric($id)){

// Now we see if the adoptable actually exists...

$query "SELECT * FROM ".$prefix."owned_adoptables as o LEFT JOIN ".$prefix."adoptables as a on o.type=a.type WHERE owner='$loggedinname' and aid='$id'";
$result runquery($query);
$num mysql_numrows($result);

//Loop out code
$i=0;
while (
$i 1) {

$aid=@mysql_result($result,$i,"aid"); //The adoptable's ID
$currentlevel=@mysql_result($result,$i,"currentlevel");
$type=@mysql_result($result,$i,"type");
$owner=@mysql_result($result,$i,"owner");
$name=@mysql_result($result,$i,"name");
$totalclicks=@mysql_result($result,$i,"totalclicks");
$gender=@mysql_result($result,$i,"gender");
$lastbred=@mysql_result($result,$i,"lastbred");
$isfrozen=@mysql_result($result,$i,"isfrozen");
$tradestatus=@mysql_result($result,$i,"tradestatus");
$father=@mysql_result($result,$i,"father");
$mother=@mysql_result($result,$i,"mother");

$getFather mysql_query('SELECT `name` 
                           FROM ' 
$prefix 'owned_adoptables 
                           WHERE `aid` = ' 
$father
                         
);
                         
$getMother mysql_query('SELECT `name` 
                           FROM ' 
$prefix 'owned_adoptables 
                           WHERE `aid` = ' 
$mother
                         
);

$nFather mysql_fetch_assoc($getFather);
$nFather $nFather['name'];
$nMother mysql_fetch_assoc($getMother);
$nMother $nMother['name'];
$adultdescription=@mysql_result($result,$i,"adultdescription");
$eggdesc=@mysql_result($result,$i,"eggdesc");
$foxdesc=@mysql_result($result,$i,"foxdesc");
$date=@mysql_result($result,$i,"date");


$i++;
}

if(
$aid == $id){

// The adoptable exists, so we show the stats for it...


$image getcurrentimage($id);
$nextlevelexists getnextlevelexists($type$currentlevel);

$nextlevel "";

// If a higher level exists, get that level's information...

if($nextlevelexists == "true"){

$nextlevel $currentlevel 1;

$query "SELECT * FROM ".$prefix."levels WHERE adoptiename='$type' and thisislevel='$nextlevel'";
$result runquery($query);
$num mysql_numrows($result);

$i=0;
while (
$i 1) {

$requiredclicks=@mysql_result($result,$i,"requiredclicks"); //The adoptable's ID


$i++;
}


// End grab next level info...

// Determine what to show for next level:

if($nextlevelexists == "true" and $nextlevel != ""){

// See how many more clicks to go

$ctg $requiredclicks totalclicks;

$nloutput $nextlevel."<br>Clicks Required for Level Increase: ".$ctg;

}
else{

$nloutput "This adoptable is at its maximum level";

}

$article_content "
<div style='height:100%; background: #1f1f1f url(http://silvadopts.com/forums/public/style_images/animate/box_pattern.png) repeat;
        color: #fff;
    border: 1px solid #282828;
    border-top: 1px solid #363636;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    padding: 5px;'>Click the adopt to level it up!<table class='den' width='100%'><tr><td>
<br>
<a href='levelup.php?id="
.$id."'><img src='".$image."' style='margin: 0px auto; display: block'></a><br>
<div class='vgroup'>
<a href='myadopts.php?act=manage&id="
.$id."'>Actions</a><br>
Name: "
.stripslashes($name)."<br>";

if(
$father == "0") {
    
$article_content .= 'Caught On:';
} else {
    
$article_content .= 'Laid On:';
     
}

$article_content .= "
$date<br>
For Trade: "
.$tradestatus."<br>
Current Level: "
.$currentlevel."<br>
Next Level: "
.$nloutput."<br>
<b>Total Clicks: "
.$totalclicks."</b><br></div>

<div class='vgroup'>
Owner: <a href='http://silvadopts.com/profile.php?user="
.$owner."'>$owner</a><br>
Gender: "
;

if(
$gender == 'm') {
    
$article_content .= 'Male ';
} else {
    
$article_content .= 'Female ';
    
}
if(
$isfrozen == 'no') {
    
$article_content .= '<br>';
} else {
    
$article_content .= '<img src=\'http://inky.org/rpg/agents-maps/snowflake.png\'><br> ';
     
}

if(
$nFather == '' && $nMother == '') {
    
$article_content .= '';
} else {
    
$article_content .= 'Father: ' $nFather '<br> 
                  Mother: ' 
$nMother '<br>';
    
}

$article_content .= '
                  <a href="http://silvadopts.com/familytree.php?aid='
.$aid.'">View Lineage</a><br>';

if(
$lastbred == '') {
    
$article_content .= '';

else if(
$lastbred == '0') {
    
$article_content .= '';
} else {
    
$article_content .= 'Last bred: '.date('M j, Y'$lastbred).'<br>
                         Children: (<i>This feature is not yet available</i>)<br>'
;

}

$article_content .= "<br><br><br><br><br><br></div>";


if(
$currentlevel == '0') {
    
$article_content .= "$eggdesc";
}
elseif(
$currentlevel == '1') {
$article_content .= "$eggdesc";
}
elseif(
$currentlevel == '2') {
$article_content .= "$eggdesc";
}
elseif(
$currentlevel == '3') {
$article_content .= "$eggdesc";
}
elseif(
$currentlevel == '4') {
$article_content .= "$foxdesc";
}
elseif(
$currentlevel >= '5') {
$article_content .= "$adultdescription";
}
$article_content .="<br><br>";

if(
$type == 'Red Stitch Silvfox') {
     
$article_content .='Artist: Switch';
} else if(
$type == 'Eventide Silvfox') {
     
$article_content .='Artist: Switch';
} else if(
$type == 'White Stitch Silvfox') {
     
$article_content .='Artist: Switch';
} else if(
$type == 'The Noctis Silvfox') {
     
$article_content .='Artist: Switch';
} else if(
$type == 'Gold Silvfox') {
     
$article_content .='Artist: Switch, Roconza';
} else if(
$type == 'Inferno Silvfox') {
     
$article_content .='Artist: Switch, Roconza';
} else if(
$type == 'The Marauder Silvfox') {
     
$article_content .='Artist: Switch';
} else if(
$type == 'Switch Silvfox') {
     
$article_content .='Artist: Switch';
} else if(
$type == 'Arctic Silvfox') {
     
$article_content .='Artist: Switch';
} else if(
$type == 'Zebra Silvfox') {
     
$article_content .='Artist: Isura';
} else if(
$type == 'Tiger Silvfox') {
     
$article_content .='Artist: Isura';
} else if(
$type == 'Heat Element Silvfox') {
     
$article_content .='Artist: Isura';
} else if(
$type == 'Magic Element Silvfox') {
     
$article_content .='Artist: Isura';
} else if(
$type == 'Grass Element Silvfox') {
     
$article_content .='Artist: Isura';
} else if(
$type == 'Water Element Silvfox') {
     
$article_content .='Artist: Isura';
} else if(
$type == 'Yellow Winged Silvfox') {
     
$article_content .='Artist: Isura';
} else if(
$type == 'Blue Winged Silvfox') {
     
$article_content .='Artist: Isura';
} else if(
$type == 'Teal Winged Silvfox') {
     
$article_content .='Artist: Isura';
} else if(
$type == 'Orange Winged Silvfox') {
     
$article_content .='Artist: Isura';
} else if(
$type == 'Dark Winged Silvfox') {
     
$article_content .='Artist: Isura';
} else if(
$type == 'The Forest Silvfox') {
     
$article_content .='Artist: Switch, Roconza, SilverDragonTears';
} else if(
$type == 'The Gremlin Silvfox') {
     
$article_content .='Artist: Switch, Roconza, Beachbeagle';
} else if(
$type == 'Rainbow Silvfox') {
     
$article_content .='Artist: Switch, SilverDragonTears';
} else if(
$type == 'Redd Silvfox') {
     
$article_content .='Artist: Duzlla';
} else if(
$type == 'Graven Silvfox') {
     
$article_content .='Artist: Duzlla';
} else if(
$type == 'Fairie Silvfox') {
     
$article_content .='Artist: Duzlla';
} else if(
$type == 'GreenTipped Silvfox') {
     
$article_content .='Artist: GoldenShadowFire';
} else if(
$type == 'Marauder Red Silvfox') {
     
$article_content .='Artist: Switch, SilverDragonTears';
} else if(
$type == 'Snow Owl') {
     
$article_content .='Artist: elfhome';
} else if(
$type == 'The Lichen Silvfox') {
     
$article_content .='Artist: albinosilver';
} else if(
$type == 'Day Dream Silvfox') {
     
$article_content .='Artist: SilverDragonTears';
} else if(
$type == 'Sapphire Golem Silvfox') {
     
$article_content .='Artist: Isura';
} else if(
$type == 'Brass Golem Silvfox') {
     
$article_content .='Artist: Isura';
} else if(
$type == 'Hellfire Golem Silvfox') {
     
$article_content .='Artist: Isura';
} else if(
$type == 'Raven') {
     
$article_content .='Artist: SilverDragonTears, albinosilver';


}

$article_content .="
       </td></tr></table></div>"
;
}
else{

$article_title $err_idnoexist;
$article_content $err_idnoexist_text;

}

}
else{

$article_title $err_idnoexist;
$article_content $err_idnoexist_text;


}


}

 
// End the STATS code
else if($act == "bbcode"){

if(
is_numeric($id)){

// Now we see if the adoptable actually exists...

$query "SELECT * FROM ".$prefix."owned_adoptables WHERE owner='$loggedinname' and aid='$id'";
$result runquery($query);
$num mysql_numrows($result);

//Loop out code
$i=0;
while (
$i 1) {

$aid=@mysql_result($result,$i,"aid"); //The adoptable's ID
$currentlevel=@mysql_result($result,$i,"currentlevel");
$type=@mysql_result($result,$i,"type");
$name=@mysql_result($result,$i,"name");
$totalclicks=@mysql_result($result,$i,"totalclicks");
$isfrozen=@mysql_result($result,$i,"isfrozen");

$i++;
}

if(
$aid == $id){

$altbb grabanysetting("usealtbbcode");

// Adoptable exists, so show the BBCode:

$article_title "Codes for ".stripslashes($name);
$article_content $lang_bbcode_explain."<br>
<p><u>Forum Codes / BBCode: </u></p>
<p>
  <textarea name='textarea' cols='50' rows='4'>[url=http://www."
.$domain."".$scriptpath."/levelup.php?id=".$aid."][img]http://www.".$domain."".$scriptpath."/siggy.php?id=".$aid."[/img][/url]
</textarea>
</p>"
;

if(
$altbb == "yes"){

// Use the seo friendly alternate bbcodes...

$article_content $article_content."<p><u>Alternate BBCodes (Use if the above do not work on a forum): </u></p>
<p>
  <textarea name='textarea' cols='50' rows='4'>[url=http://www."
.$domain."".$scriptpath."/levelup.php?id=".$aid."][img]http://www.".$domain."".$scriptpath."/get/".$aid.".gif[/img][/url]
</textarea>
</p>"
;

}



$article_content $article_content."<p><u>HTML Code</u>:</p>
<p>
<textarea name='textarea' cols='50' rows='4'><a href=\"http://www."
.$domain."".$scriptpath."/levelup.php?id=".$aid."\" target=\"_blank\">
<img src=\"http://www."
.$domain."".$scriptpath."/siggy.php?id=".$aid."\" border=0></a>
  </textarea>
   
</p>"
;

}
else{

$article_title $err_idnoexist;
$article_content $err_idnoexist_text;

}


}
else{

$article_title $err_idnoexist;
$article_content $err_idnoexist_text;

}




// End the BBCODE generation for the adoptable...
else if($act == "rename"){

// We are renaming an adoptable

if(is_numeric($id)){

// Now we see if the adoptable actually exists...

$query "SELECT * FROM ".$prefix."owned_adoptables WHERE owner='$loggedinname' and aid='$id'";
$result runquery($query);
$num mysql_numrows($result);

//Loop out code
$i=0;
while (
$i 1) {

$aid=@mysql_result($result,$i,"aid"); //The adoptable's ID
$currentlevel=@mysql_result($result,$i,"currentlevel");
$type=@mysql_result($result,$i,"type");
$name=@mysql_result($result,$i,"name");
$totalclicks=@mysql_result($result,$i,"totalclicks");
$isfrozen=@mysql_result($result,$i,"isfrozen");

$i++;
}

if(
$aid == $id){

$image getcurrentimage($id);

if(
$more == ""){

$article_title "Rename ".stripslashes($name);
$article_content "<img src='".$image."'><br>".$lang_rename."".stripslashes($name)."".$lang_rename2."<br>
<form name='form1' method='get' action='myadopts.php'>
  <p>Adoptable Name: 
    <input name='more' type='text' id='more'>
    <input name='id' type='hidden' id='id' value='"
.$id."'>
    <input name='act' type='hidden' id='act' value='rename'>
</p>
  <p>
    <input type='submit' name='Submit' value='Rename Adoptable'>
</p>
</form>"
;

}
else{

// We are renaming the adoptable

// The adoptable exists, so now we can rename it...

$query "UPDATE ".$prefix."owned_adoptables SET name='".$more."' WHERE aid='".$id."' and owner='".$loggedinname."'";
runquery($query);


$article_title $lang_rename_success_title;
$article_content "<img src='".$image."'><br>".$lang_rename_success."".$more.".  You can now manage ".$more." on the <a href='myadopts.php?act=manage&id=".$id."'>My Adopts</a> page.";

}



}
else{

$article_title $err_idnoexist;
$article_content $err_idnoexist_text;

}
}
else{

$article_title $err_idnoexist;
$article_content $err_idnoexist_text;

}

}

else if(
$act == "trade"){

// We are setting the trade status for an adoptable...


if(is_numeric($id)){

// Now we see if the adoptable actually exists...

$query "SELECT * FROM ".$prefix."owned_adoptables WHERE owner='$loggedinname' and aid='$id'";
$result mysql_query($query);
$num mysql_numrows($result);

//Loop out code
$i=0;
while (
$i 1) {

$aid=@mysql_result($result,$i,"aid"); //The adoptable's ID
$tradestatus=@mysql_result($result,$i,"tradestatus");

$i++;
}

if(
$aid == $id){

$image getcurrentimage($id); // Get the image for the adopt...

if($more == ""){

$article_title "Setting trade status for ".stripslashes($name);
$article_content "Are you sure you wish to change the trade status of this adoptable?<center><b><a href='myadopts.php?act=trade&id=".$id."&more=confirm'>Yes I'd like to change its trade status</a></b><br><br>
<b><a href='myadopts.php'>Nope I change my mind!  Go back to the previous page.</a></b></center><br>"
;

}

else if(
$more == "confirm"){  
  if(
$tradestatus == "fortrade"){
  
$newtradestatus "notfortrade";
  
$query "UPDATE ".$prefix."owned_adoptables SET tradestatus='".$newtradestatus."' WHERE aid='".$id."' and owner='".$loggedinname."'";
  
runquery($query);
  
$article_title "Change trade status successfully";
  
$article_content "The adoptable's trade status is now Not for Trade";
  }                
  else if(
$tradestatus == "notfortrade"){
  
$newtradestatus "fortrade";
  
$query "UPDATE ".$prefix."owned_adoptables SET tradestatus='".$newtradestatus."' WHERE aid='".$id."' and owner='".$loggedinname."'";
  
runquery($query);
  
$article_title "Change trade status successfully";
  
$article_content "The adoptable's trade status is now For Trade";
  }
  else{
  
$article_title "Something is very very wrong";
  
$article_content "Please check phpmyadmin to see if the settings are correct, or report your issue to Mysidia Adoptables support forum";
  }
}

else{

$article_title "Invalid Action";
$article_content "Invalid Action Specified";

}
}

else{

$article_title $err_idnoexist;
$article_content $err_idnoexist;

}
}
else{

$article_title $err_idnoexist;
$article_content $err_idnoexist_text;

}

}

else if(
$act == "freeze"){

// We are freezing an adoptable here...

if(is_numeric($id)){

// Now we see if the adoptable actually exists...

$query "SELECT * FROM ".$prefix."owned_adoptables WHERE owner='$loggedinname' and aid='$id'";
$result runquery($query);
$num mysql_numrows($result);

//Loop out code
$i=0;
while (
$i 1) {

$aid=@mysql_result($result,$i,"aid"); //The adoptable's ID
$currentlevel=@mysql_result($result,$i,"currentlevel");
$type=@mysql_result($result,$i,"type");
$name=@mysql_result($result,$i,"name");
$totalclicks=@mysql_result($result,$i,"totalclicks");
$isfrozen=@mysql_result($result,$i,"isfrozen");

$i++;
}
if(
$aid == $id){

$image getcurrentimage($id); // Get the image for the adopt...

if($more == ""){

if(
$isfrozen == "yes"){

$group getgroup();
$cancp cancp($group);

if(
$cancp == "yes"){
$status "<img src='templates/icons/freeze.gif'> Frozen<br>";
$go "<a href='myadopts.php?act=freeze&id=".$id."&more=unfreeze'><img src='templates/icons/unfreeze.gif' border=0> Unfreeze This Adoptable</a>";
}
else{
$status "<img src='templates/icons/freeze.gif'> Frozen<br>";
$go "You are not allowed to unfreeze this adoptable. <a href='javascript:history.go(-1)'>Click here to go back.</a>";
}

else if(
$isfrozen == "no"){
$status "<img src='templates/icons/unfreeze.gif'> Not Frozen<br>";
$go "<a href='myadopts.php?act=freeze&id=".$id."&more=freeze'><img src='templates/icons/freeze.gif' border=0> Freeze This Adoptable</a>";
}

$article_title $lang_freeze_title;
$article_content "<img src='".$image."'><br><b>".stripslashes($name)."'s Current Status: ".$status."</b><br>".$lang_freeze."<br><br><b>".$go."</b><br><br>
"
.$lang_freeze_warning."";



}
else{

// We are actually freezing or unfreezing the adopt...

$frz "no";

if(
$more == "freeze"){

$frz "yes";

}

$query "UPDATE ".$prefix."owned_adoptables SET isfrozen='".$frz."' WHERE aid='".$id."' and owner='".$loggedinname."'";
runquery($query);

if(
$frz == "yes"){
$article_title stripslashes($name)." Frozen Successfully";
}
else{
$article_title stripslashes($name)." Unfrozen Successfully";
}

$article_content stripslashes($name)." is now frozen.  You may now manage ".stripslashes($name)." on the <a href='myadopts.php?act=manage&id=".$id."'>My Adopts</a> page.";





}

}
else{

$article_title $err_idnoexist;
$article_content $err_idnoexist_text;

}
}
else{

$article_title $err_idnoexist;
$article_content $err_idnoexist_text;

}


}

else if(
$act == "pound"){


if(
is_numeric($id)){

// Now we see if the adoptable actually exists...

$query "SELECT * FROM ".$prefix."owned_adoptables WHERE owner='$loggedinname' and aid='$id'";
$result runquery($query);
$num mysql_numrows($result);

//Loop out code
$i=0;
while (
$i 1) {

$aid=@mysql_result($result,$i,"aid"); //The adoptable's ID
$currentlevel=@mysql_result($result,$i,"currentlevel");
$type=@mysql_result($result,$i,"type");
$name=@mysql_result($result,$i,"name");
$totalclicks=@mysql_result($result,$i,"totalclicks");
$isfrozen=@mysql_result($result,$i,"isfrozen");

$i++;
}

if(
$aid == $id){

$image getcurrentimage($id); // Get the image for the adopt...

if($more == ""){

$article_title "Abandon ".stripslashes($name);
$article_content "<img src='".$image."'><br>".$lang_pound."<br><br>".$lang_pound_warning."<br><br>
<center><b><a href='myadopts.php?act=pound&id="
.$id."&more=confirm'><img src='templates/icons/delete.gif' border=0> Abandon ".stripslashes($name)." - I dont want it anymore! <img src='templates/icons/delete.gif' border=0></a></b><br><br>
<b><a href='myadopts.php'><img src='templates/icons/yes.gif' border=0> DO NOT Abandon "
.stripslashes($name)."! <img src='templates/icons/yes.gif' border=0></a></b></center><br>";

}
else if(
$more == "confirm"){

// Actually run the execution

$query "UPDATE ".$prefix."owned_adoptables SET owner='SYSTEM' WHERE aid='".$id."'";
runquery($query); 

$article_title $lang_pound_title_complete;
$article_content $lang_pound_complete;

}
else{

$article_title "Invalid Action";
$article_content "Invalid Action Specified";

}


}
else{

$article_title $err_idnoexist;
$article_content $err_idnoexist_text;

}
}
else{

$article_title $err_idnoexist;
$article_content $err_idnoexist_text;

}

}
else{

// No valid action specified :: show an error

$article_title $lang_invalid_action_title;
$article_content $lang_invalid_action;

}



}
else{

$article_title $accden;
$article_content $reqlogin;

// End is logged in check else


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

echo showpage($article_title$article_content$date);

?>
Reply With Quote
 

Thread Tools
Display Modes

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
"Fairy State" theme by Bobbybighoof (Mysidia 1.3.3) bobbybig Templates and Themes 3 07-18-2018 06:54 PM
Sort "myadopts" page SilverDragonTears Questions and Supports 23 06-12-2017 05:39 PM
Removing of prefix "class", "abstract", "interface" Suggestions FounderSim Suggestions and Feature Requests 3 10-05-2014 05:35 PM
Creating a "Faction" for adoptables/owned adoptables Vaporman87 Questions and Supports 1 03-04-2014 03:38 PM
Changing... or "masking" existing URLs Vaporman87 Questions and Supports 7 03-03-2014 07:10 PM


All times are GMT -5. The time now is 06:58 PM.

Currently Active Users: 3777 (0 members and 3777 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