Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Drop-down menu for myadopt.php [SOLVED] (http://www.mysidiaadoptables.com/forum/showthread.php?t=1104)

arlecchina 09-23-2009 03:19 PM

Drop-down menu for myadopt.php [SOLVED]
 
The solution (thanks to Bloodrun) is below.

PHP Code:

<p>
    <
select name='owned_adoptables' id='owned_adoptables'>";
      
// We need to stop here and fetch their adoptables...

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

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

        
$aid=@mysql_result($result,$i,"aid");
        
$currentlevel=@mysql_result($result,$i,"currentlevel");
        
$name=@mysql_result($result,$i,"name");
    
    
$article_content = $article_content."<option value='".$aid."'>".$name." :: ".$currentlevel."</option>";    

    
$i++;
    }

$article_content = $article_content."</select>
</
p><br /> 

The Original Post:
Quote:

I want users to easily be able to jump from one adoptable to another when managing, viewing stats, getting codes, renaming, freezing, unfreezing and killing adoptables.

So on each of the myadopt.php action pages I would like to have a drop-down menu that lists all of the user's existing adoptables. For example, if the user is on the rename page for their first adoptable (myadopts.php?act=rename&id=1), then they could rename adoptable 1, and then choose adoptable 2 from the drop-down menu allowing them to jump to the adoptable 2's rename page (myadopts.php?act=rename&id=2).

I understand that the code below doesn't currently allow navigation. I am just trying to get the pages to list the adoptables the user owns first. It doesn't seem to be showing up and I believe it may be conflicting with some of the other code on the myadopt.php action pages.

This is what I wanted to use:

PHP Code:

$article_title "Example Title";
$article_content "Example Text";

//Get Member's adoptables from the database and display them
$query "SELECT * FROM ".$prefix."owned_adoptables WHERE owner='$loggedinname'";
$result mysql_query($query);
$num mysql_numrows($result);

//Member has 1 or more adoptable
if($num 0){
    
$dropdownstart "<select>";
    
$dropdownend "</select>";
}
//Member has 0 adoptables
else{
    
$dropdownstart "";
    
$dropdownend "";
}

$article_content $article_content."".$dropdownstart;

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

$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");
$owner=@mysql_result($result,$i,"owner");

$article_content $article_content."<option value='".$aid."'>".$name."</option>";

$i++;

}

$article_content $article_content."".$dropdownend

Where would I put this so it will show up, for example, on the rename page and not conflict with the rename action code? Once I know how it will work for one of the action pages I can figure out the other ones.

Bloodrun 09-23-2009 05:46 PM

RE: Drop-down menu for myadopt.php
 
Um, you will need to do one of two things.

Either implement ajax this with this function. This is the hardest of the two options.

Or simple make it so that the drop down menu of the adoptable names will lead the person to another page.

arlecchina 09-23-2009 07:08 PM

RE: Drop-down menu for myadopt.php
 
Quote:

Originally Posted by Bloodrun
Um, you will need to do one of two things.

Either implement ajax this with this function. This is the hardest of the two options.

Or simple make it so that the drop down menu of the adoptable names will lead the person to another page.

I am planning on making it so the drop-down menu will lead the person to another page. However, currently the drop-down menu doesn't show up at all.

I believe it is conflicting with this in the original code but I'm not sure:
PHP Code:

$query "SELECT * FROM ".$prefix."owned_adoptables WHERE owner='$loggedinname' and aid='$id'"

Where would I put this so it will show up, for example, on the rename page and not conflict with the rename action code? Once I know how it will work for one of the action pages I can figure out the other ones.

Bloodrun 09-24-2009 08:34 AM

RE: Drop-down menu for myadopt.php
 
Quote:

Originally Posted by arlecchina
Quote:

Originally Posted by Bloodrun
Um, you will need to do one of two things.

Either implement ajax this with this function. This is the hardest of the two options.

Or simple make it so that the drop down menu of the adoptable names will lead the person to another page.

I am planning on making it so the drop-down menu will lead the person to another page. However, currently the drop-down menu doesn't show up at all.

I believe it is conflicting with this in the original code but I'm not sure:
PHP Code:

$query "SELECT * FROM ".$prefix."owned_adoptables WHERE owner='$loggedinname' and aid='$id'"

Where would I put this so it will show up, for example, on the rename page and not conflict with the rename action code? Once I know how it will work for one of the action pages I can figure out the other ones.

Yeah I figured that much, I was trying to stall so I could find how I did it. But I currently don't have access to that information quite yet, so I have to try and remember.

But I know you wrote the code wrong for the drop-down menu.

I would have to see this Name Change page your talking about, (the coding that is) before I could give you an honest answer on where to put your drop-down menu code.

arlecchina 09-24-2009 10:51 AM

RE: Drop-down menu for myadopt.php
 
Here is the code for the rename action without the drop-down menu code I wrote (Because I don't know where to put it to make it work).

I've made several changes to Brandon's original code but none of these changes should conflict with the drop-down menu I think.

Sorry for the horizontal scrolling.

PHP Code:

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 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
$currentlevel=@mysql_result($result,$i,"currentlevel");
$type=@mysql_result($result,$i,"type");
$name=@mysql_result($result,$i,"name");
$owner=@mysql_result($result,$i,"owner");
$totalclicks=@mysql_result($result,$i,"totalclicks");
$usealternates=@mysql_result($result,$i,"usealternates");
$isfrozen=@mysql_result($result,$i,"isfrozen");
$royalbio=@mysql_result($result,$i,"royalbio");
$royaloccupation=@mysql_result($result,$i,"royaloccupation");

$i++;
}

if(
$aid == $id){

$image getcurrentimage($id);

    if(
$currentlevel == "0"){
        
$royalnametitle "";
        
$lang_caremenu_biobutton "<span class='buttongrey buttoncarefor center'>".$lang_caremenu_bio_t."</span>";
        
$lang_caremenu_occupationbutton "<span class='buttongrey buttoncarefor center'>".$lang_caremenu_occupation_t."</span>";
        if(
$isfrozen == "yes"){
            
$levelupbutton "<span class='buttongrey buttoncarefor center'>".$levelupbutton1."</span>";
        }
        else{
            
$levelupbutton "<a href='levelup.php?id=".$aid."' class='button buttoncarefor center'>".$levelupbutton1."</a>";
        }
    }
    else if(
$currentlevel == "1"){
        
$royalnametitle "";
        
$lang_caremenu_occupationbutton "<span class='buttongrey buttoncarefor center'>".$lang_caremenu_occupation_t."</span>";
        
$lang_caremenu_biobutton "<a href='myadopts.php?act=bio&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_bio_t."</a>";
        if(
$isfrozen == "yes"){
            
$levelupbutton "<span class='buttongrey buttoncarefor center'>".$levelupbutton2."</span>";
        }
        else{
            
$levelupbutton "<a href='levelup.php?id=".$aid."' class='button buttoncarefor center'>".$levelupbutton2."</a>";
        }
    }
    else if(
$currentlevel == "2"){
        
$royalnametitle "";
        
$lang_caremenu_occupationbutton "<span class='buttongrey buttoncarefor center'>".$lang_caremenu_occupation_t."</span>";
        
$lang_caremenu_biobutton "<a href='myadopts.php?act=bio&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_bio_t."</a>";
        if(
$isfrozen == "yes"){
            
$levelupbutton "<span class='buttongrey buttoncarefor center'>".$levelupbutton2."</span>";
        }
        else{
            
$levelupbutton "<a href='levelup.php?id=".$aid."' class='button buttoncarefor center'>".$levelupbutton2."</a>";
        }
    }
    else if(
$currentlevel == "3"){
        
$royalnametitle "";
        
$lang_caremenu_occupationbutton "<span class='buttongrey buttoncarefor center'>".$lang_caremenu_occupation_t."</span>";
        
$lang_caremenu_biobutton "<a href='myadopts.php?act=bio&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_bio_t."</a>";
        if(
$isfrozen == "yes"){
            
$levelupbutton "<span class='buttongrey buttoncarefor center'>".$levelupbutton2."</span>";
        }
        else{
            
$levelupbutton "<a href='levelup.php?id=".$aid."' class='button buttoncarefor center'>".$levelupbutton2."</a>";
        }
    }
    else if(
$currentlevel == "4"){
        
$lang_caremenu_biobutton "<a href='myadopts.php?act=bio&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_bio_t."</a>";
        
$lang_caremenu_occupationbutton "<a href='myadopts.php?act=occupation&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_occupation_t."</a>";
        if(
$isfrozen == "yes"){
            
$levelupbutton "<span class='buttongrey buttoncarefor center'>".$levelupbutton3."</span>";
        }
        else{
            
$levelupbutton "<a href='levelup.php?id=".$aid."' class='button buttoncarefor center'>".$levelupbutton3."</a>";
        }
        if(
$usealternates == "yes"){
            
$royalnametitle $royalstage4mtitle;
        }
        else if(
$usealternates == "no" ){
            
$royalnametitle $royalstage4ftitle;
        }
    }
    else if(
$currentlevel == "5"){
        
$lang_caremenu_biobutton "<a href='myadopts.php?act=bio&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_bio_t."</a>";
        
$lang_caremenu_occupationbutton "<a href='myadopts.php?act=occupation&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_occupation_t."</a>";
        if(
$isfrozen == "yes"){
            
$levelupbutton "<span class='buttongrey buttoncarefor center'>".$levelupbutton3."</span>";
        }
        else{
            
$levelupbutton "<a href='levelup.php?id=".$aid."' class='button buttoncarefor center'>".$levelupbutton3."</a>";
        }
        if(
$usealternates == "yes"){
            
$royalnametitle $royalstage5mtitle;
        }
        else if(
$usealternates == "no" ){
            
$royalnametitle $royalstage5ftitle;
        }
    }
    else if(
$currentlevel == "6"){
        
$lang_caremenu_biobutton "<a href='myadopts.php?act=bio&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_bio_t."</a>";
        
$lang_caremenu_occupationbutton "<a href='myadopts.php?act=occupation&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_occupation_t."</a>";
        if(
$isfrozen == "yes"){
            
$levelupbutton "<span class='buttongrey buttoncarefor center'>".$levelupbutton3."</span>";
        }
        else{
            
$levelupbutton "<a href='levelup.php?id=".$aid."' class='button buttoncarefor center'>".$levelupbutton3."</a>";
        }
        if(
$usealternates == "yes"){
            
$royalnametitle $royalstage6mtitle;
        }
        else if(
$usealternates == "no" ){
            
$royalnametitle $royalstage6ftitle;
        }
    }
    else if(
$currentlevel == "7"){
        
$lang_caremenu_biobutton "<a href='myadopts.php?act=bio&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_bio_t."</a>";
        
$lang_caremenu_occupationbutton "<a href='myadopts.php?act=occupation&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_occupation_t."</a>";
        if(
$isfrozen == "yes"){
            
$levelupbutton "<span class='buttongrey buttoncarefor center'>".$levelupbutton3."</span>";
        }
        else{
            
$levelupbutton "<a href='levelup.php?id=".$aid."' class='button buttoncarefor center'>".$levelupbutton3."</a>";
        }
        if(
$usealternates == "yes"){
            
$royalnametitle $royalstage7mtitle;
        }
        else if(
$usealternates == "no" ){
            
$royalnametitle $royalstage7ftitle;
        }
    }
    else if(
$currentlevel == "8"){
        
$lang_caremenu_biobutton "<a href='myadopts.php?act=bio&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_bio_t."</a>";
        
$lang_caremenu_occupationbutton "<a href='myadopts.php?act=occupation&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_occupation_t."</a>";
        if(
$isfrozen == "yes"){
            
$levelupbutton "<span class='buttongrey buttoncarefor center'>".$levelupbutton3."</span>";
        }
        else{
            
$levelupbutton "<a href='levelup.php?id=".$aid."' class='button buttoncarefor center'>".$levelupbutton3."</a>";
        }
        if(
$usealternates == "yes"){
            
$royalnametitle $royalstage8mtitle;
        }
        else if(
$usealternates == "no" ){
            
$royalnametitle $royalstage8ftitle;
        }
    }

    
//Frozen or Unfroozen?
    
if($isfrozen == "yes"){
        
$status2 $lang_unfreeze_button;
        
$renamebutton "<div class='buttongrey buttoncarefor center'>".$lang_caremenu_rename_t."</div>";
    }
    else{
        
$status2 $lang_freeze_button;
        
$renamebutton "<a href='myadopts.php?act=rename&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_rename_t."</a>";
    }

if(
$isfrozen != "yes"){

if(
$more == ""){

$article_title $lang_rename_title." ".$royalnametitle." ".$name;
$article_content "<!-- google_ad_section_start(weight=ignore) -->
<div class='npc3'><p class='titania2'><img src='templates/default/images/npc_1_s.png' width='70' height='70' border='0' alt='Titania' />"
.$lang_rename." <span class='bold'>".$royalnametitle." ".$name."</span> ".$lang_rename2." <span class='bold'>".$royalnametitle." ".$name."".$lang_rename3."</p></div>

<div id='pwrapper'>
<div id='p'>
    <div id='p_up_left'></div>
    <div id='p_up'></div>
    <div id='p_up_right'></div>
    <div id='p_middle_left'></div>
    <div id='p_middle'>
        <div class='inside2'>

<div id='pwrapper2'>
    <div id='ptitle'><div class='sub-title'>"
.$royalnametitle." ".$name."</div></div>
    <div id='p4'>
            <div id='p5'><a href='levelup.php?id="
.$aid."'><img src='".$image."' alt='".$royalnametitle." ".$name."' id='p5image' /></a></div>
            <div id='p5'>
            <div id='p1'><a href='myadopts.php?act=manage&id="
.$aid."' class='button buttoncarefor center'>".$lang_caremenu_stats2_t."</a></div>
            <div id='p1'>"
.$levelupbutton."</div>
            <div id='p2'>"
.$lang_caremenu_biobutton."</div>
            <div id='p3'>"
.$lang_caremenu_occupationbutton."</div>
            <div id='p1'><a href='myadopts.php?act=stats&id="
.$aid."' class='button buttoncarefor center'>".$lang_caremenu_stats_t."</a></div>
            <div id='p2'><a href='myadopts.php?act=bbcode&id="
.$aid."' class='button buttoncarefor center'>".$lang_caremenu_codes_t."</a></div>
            <div id='p3'>"
.$renamebutton."</div>
            <div id='p1'><a href='myadopts.php?act=freeze&id="
.$aid."' class='button buttoncarefor center'>".$status2."</a></div>
            <div id='p1'><a href='myadopts.php?act=kill&id="
.$aid."' class='button buttoncarefor center'>".$lang_caremenu_setfree_t."</a></div>
            </div>
    </div>
</div>

<form name='form1' method='get' action='myadopts.php'>
<label>"
.$lang_adoptrename_old_label."</label> ".$name."<br />
<div class='npc_p'><p class='titania2_p'>"
.$lang_rename4."</p></div>
<label for='more'>"
.$lang_adoptrename_new_label."</label> <input name='more' type='text' id='more' class='p_middletextarea' />
<input name='id' type='hidden' id='id' value='"
.$id."' />
<input name='act' type='hidden' id='act' value='rename' />
<input type='submit' name='Submit' class='button' value='"
.$lang_adoptrename_button."' />
</form>
        </div>
    </div>
    <div id='p_middle_right'></div>
    <div id='p_down_left'></div>
    <div id='p_down'></div>
    <div id='p_down_right'></div>
</div>
</div>
<!-- google_ad_section_end -->"
;

}
else{

// We are renaming the adoptable

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

$article_title $lang_rename_success_title;
$article_content "<!-- google_ad_section_start(weight=ignore) -->
<div class='npc3'><p class='titania2'><img src='templates/default/images/npc_1_s.png' width='70' height='70' border='0' alt='Titania' />"
.$lang_rename_success."</p></div>
<div id='pwrapper'>
<div id='p'>
    <div id='p_up_left'></div>
    <div id='p_up'></div>
    <div id='p_up_right'></div>
    <div id='p_middle_left'></div>
    <div id='p_middle'>
        <div class='inside2'>

<div id='pwrapper2'>
    <div id='ptitle'><div class='sub-title'>"
.$royalnametitle." ".$name."</div></div>
    <div id='p4'>
            <div id='p5'><a href='levelup.php?id="
.$aid."'><img src='".$image."' alt='".$royalnametitle." ".$name."' id='p5image' /></a></div>
            <div id='p5'>
            <div id='p1'><a href='myadopts.php?act=manage&id="
.$aid."' class='button buttoncarefor center'>".$lang_caremenu_stats2_t."</a></div>
            <div id='p1'>"
.$levelupbutton."</div>
            <div id='p2'>"
.$lang_caremenu_biobutton."</div>
            <div id='p3'>"
.$lang_caremenu_occupationbutton."</div>
            <div id='p1'><a href='myadopts.php?act=stats&id="
.$aid."' class='button buttoncarefor center'>".$lang_caremenu_stats_t."</a></div>
            <div id='p2'><a href='myadopts.php?act=bbcode&id="
.$aid."' class='button buttoncarefor center'>".$lang_caremenu_codes_t."</a></div>
            <div id='p3'>"
.$renamebutton."</div>
            <div id='p1'><a href='myadopts.php?act=freeze&id="
.$aid."' class='button buttoncarefor center'>".$status2."</a></div>
            <div id='p1'><a href='myadopts.php?act=kill&id="
.$aid."' class='button buttoncarefor center'>".$lang_caremenu_setfree_t."</a></div>
            </div>
    </div>
</div>

        </div>
    </div>
    <div id='p_middle_right'></div>
    <div id='p_down_left'></div>
    <div id='p_down'></div>
    <div id='p_down_right'></div>
</div>
</div>
<!-- google_ad_section_end -->"
;

}
}
else{

// We cannot rename a frozen adoptable...

$article_title $lang_frozen_title;
$article_content "<!-- google_ad_section_start(weight=ignore) -->
<div class='npc3'><p class='titania2'><img src='templates/default/images/npc_1_s.png' width='70' height='70' border='0' alt='Titania' />"
.$lang_frozen1." <span class='bold'>".$royalnametitle." ".$name."</span>".$lang_fronze2." <a href='myadopts.php?act=freeze&id=".$id."&more=unfreeze'>".$lang_adoptremane_unfreeze_link."</a> <span class='bold'>".$royalnametitle." ".$name."".$lang_frozen3."</p></div>
<div id='pwrapper'>
<div id='p'>
    <div id='p_up_left'></div>
    <div id='p_up'></div>
    <div id='p_up_right'></div>
    <div id='p_middle_left'></div>
    <div id='p_middle'>
        <div class='inside2'>

<div id='pwrapper2'>
    <div id='ptitle'><div class='sub-title'>"
.$royalnametitle." ".$name."</div></div>
    <div id='p4'>
            <div id='p5'><a href='levelup.php?id="
.$aid."'><img src='".$image."' alt='".$royalnametitle." ".$name."' id='p5image' /></a></div>
            <div id='p5'>
            <div id='p1'><a href='myadopts.php?act=manage&id="
.$aid."' class='button buttoncarefor center'>".$lang_caremenu_stats2_t."</a></div>
            <div id='p1'>"
.$levelupbutton."</div>
            <div id='p2'>"
.$lang_caremenu_biobutton."</div>
            <div id='p3'>"
.$lang_caremenu_occupationbutton."</div>
            <div id='p1'><a href='myadopts.php?act=stats&id="
.$aid."' class='button buttoncarefor center'>".$lang_caremenu_stats_t."</a></div>
            <div id='p2'><a href='myadopts.php?act=bbcode&id="
.$aid."' class='button buttoncarefor center'>".$lang_caremenu_codes_t."</a></div>
            <div id='p3'>"
.$renamebutton."</div>
            <div id='p1'><a href='myadopts.php?act=freeze&id="
.$aid."' class='button buttoncarefor center'>".$status2."</a></div>
            <div id='p1'><a href='myadopts.php?act=kill&id="
.$aid."' class='button buttoncarefor center'>".$lang_caremenu_setfree_t."</a></div>
            </div>
    </div>
</div>

        </div>
    </div>
    <div id='p_middle_right'></div>
    <div id='p_down_left'></div>
    <div id='p_down'></div>
    <div id='p_down_right'></div>
</div>
</div>
<!-- google_ad_section_end -->"
;

}


}
else{

$article_title $err_idnoexist;
$article_content "<!-- google_ad_section_start(weight=ignore) -->
<div class='npc3'><p class='titania2'><img src='templates/default/images/npc_1_s.png' width='70' height='70' border='0' alt='Titania' />"
.$err_idnoexist_text."</p></div>
<!-- google_ad_section_end -->"
;

}
}
else{

$article_title $err_idnoexist;
$article_content "<!-- google_ad_section_start(weight=ignore) -->
<div class='npc3'><p class='titania2'><img src='templates/default/images/npc_1_s.png' width='70' height='70' border='0' alt='Titania' />"
.$err_idnoexist_text."</p></div>
<!-- google_ad_section_end -->"
;

}




Bloodrun 09-24-2009 04:52 PM

RE: Drop-down menu for myadopt.php
 
Quote:

Originally Posted by arlecchina
Here is the code for the rename action without the drop-down menu code I wrote (Because I don't know where to put it to make it work).

I've made several changes to Brandon's original code but none of these changes should conflict with the drop-down menu I think.

Sorry for the horizontal scrolling.

PHP Code:

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 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
$currentlevel=@mysql_result($result,$i,"currentlevel");
$type=@mysql_result($result,$i,"type");
$name=@mysql_result($result,$i,"name");
$owner=@mysql_result($result,$i,"owner");
$totalclicks=@mysql_result($result,$i,"totalclicks");
$usealternates=@mysql_result($result,$i,"usealternates");
$isfrozen=@mysql_result($result,$i,"isfrozen");
$royalbio=@mysql_result($result,$i,"royalbio");
$royaloccupation=@mysql_result($result,$i,"royaloccupation");

$i++;
}

if(
$aid == $id){

$image getcurrentimage($id);

    if(
$currentlevel == "0"){
        
$royalnametitle "";
        
$lang_caremenu_biobutton "<span class='buttongrey buttoncarefor center'>".$lang_caremenu_bio_t."</span>";
        
$lang_caremenu_occupationbutton "<span class='buttongrey buttoncarefor center'>".$lang_caremenu_occupation_t."</span>";
        if(
$isfrozen == "yes"){
            
$levelupbutton "<span class='buttongrey buttoncarefor center'>".$levelupbutton1."</span>";
        }
        else{
            
$levelupbutton "<a href='levelup.php?id=".$aid."' class='button buttoncarefor center'>".$levelupbutton1."</a>";
        }
    }
    else if(
$currentlevel == "1"){
        
$royalnametitle "";
        
$lang_caremenu_occupationbutton "<span class='buttongrey buttoncarefor center'>".$lang_caremenu_occupation_t."</span>";
        
$lang_caremenu_biobutton "<a href='myadopts.php?act=bio&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_bio_t."</a>";
        if(
$isfrozen == "yes"){
            
$levelupbutton "<span class='buttongrey buttoncarefor center'>".$levelupbutton2."</span>";
        }
        else{
            
$levelupbutton "<a href='levelup.php?id=".$aid."' class='button buttoncarefor center'>".$levelupbutton2."</a>";
        }
    }
    else if(
$currentlevel == "2"){
        
$royalnametitle "";
        
$lang_caremenu_occupationbutton "<span class='buttongrey buttoncarefor center'>".$lang_caremenu_occupation_t."</span>";
        
$lang_caremenu_biobutton "<a href='myadopts.php?act=bio&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_bio_t."</a>";
        if(
$isfrozen == "yes"){
            
$levelupbutton "<span class='buttongrey buttoncarefor center'>".$levelupbutton2."</span>";
        }
        else{
            
$levelupbutton "<a href='levelup.php?id=".$aid."' class='button buttoncarefor center'>".$levelupbutton2."</a>";
        }
    }
    else if(
$currentlevel == "3"){
        
$royalnametitle "";
        
$lang_caremenu_occupationbutton "<span class='buttongrey buttoncarefor center'>".$lang_caremenu_occupation_t."</span>";
        
$lang_caremenu_biobutton "<a href='myadopts.php?act=bio&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_bio_t."</a>";
        if(
$isfrozen == "yes"){
            
$levelupbutton "<span class='buttongrey buttoncarefor center'>".$levelupbutton2."</span>";
        }
        else{
            
$levelupbutton "<a href='levelup.php?id=".$aid."' class='button buttoncarefor center'>".$levelupbutton2."</a>";
        }
    }
    else if(
$currentlevel == "4"){
        
$lang_caremenu_biobutton "<a href='myadopts.php?act=bio&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_bio_t."</a>";
        
$lang_caremenu_occupationbutton "<a href='myadopts.php?act=occupation&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_occupation_t."</a>";
        if(
$isfrozen == "yes"){
            
$levelupbutton "<span class='buttongrey buttoncarefor center'>".$levelupbutton3."</span>";
        }
        else{
            
$levelupbutton "<a href='levelup.php?id=".$aid."' class='button buttoncarefor center'>".$levelupbutton3."</a>";
        }
        if(
$usealternates == "yes"){
            
$royalnametitle $royalstage4mtitle;
        }
        else if(
$usealternates == "no" ){
            
$royalnametitle $royalstage4ftitle;
        }
    }
    else if(
$currentlevel == "5"){
        
$lang_caremenu_biobutton "<a href='myadopts.php?act=bio&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_bio_t."</a>";
        
$lang_caremenu_occupationbutton "<a href='myadopts.php?act=occupation&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_occupation_t."</a>";
        if(
$isfrozen == "yes"){
            
$levelupbutton "<span class='buttongrey buttoncarefor center'>".$levelupbutton3."</span>";
        }
        else{
            
$levelupbutton "<a href='levelup.php?id=".$aid."' class='button buttoncarefor center'>".$levelupbutton3."</a>";
        }
        if(
$usealternates == "yes"){
            
$royalnametitle $royalstage5mtitle;
        }
        else if(
$usealternates == "no" ){
            
$royalnametitle $royalstage5ftitle;
        }
    }
    else if(
$currentlevel == "6"){
        
$lang_caremenu_biobutton "<a href='myadopts.php?act=bio&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_bio_t."</a>";
        
$lang_caremenu_occupationbutton "<a href='myadopts.php?act=occupation&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_occupation_t."</a>";
        if(
$isfrozen == "yes"){
            
$levelupbutton "<span class='buttongrey buttoncarefor center'>".$levelupbutton3."</span>";
        }
        else{
            
$levelupbutton "<a href='levelup.php?id=".$aid."' class='button buttoncarefor center'>".$levelupbutton3."</a>";
        }
        if(
$usealternates == "yes"){
            
$royalnametitle $royalstage6mtitle;
        }
        else if(
$usealternates == "no" ){
            
$royalnametitle $royalstage6ftitle;
        }
    }
    else if(
$currentlevel == "7"){
        
$lang_caremenu_biobutton "<a href='myadopts.php?act=bio&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_bio_t."</a>";
        
$lang_caremenu_occupationbutton "<a href='myadopts.php?act=occupation&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_occupation_t."</a>";
        if(
$isfrozen == "yes"){
            
$levelupbutton "<span class='buttongrey buttoncarefor center'>".$levelupbutton3."</span>";
        }
        else{
            
$levelupbutton "<a href='levelup.php?id=".$aid."' class='button buttoncarefor center'>".$levelupbutton3."</a>";
        }
        if(
$usealternates == "yes"){
            
$royalnametitle $royalstage7mtitle;
        }
        else if(
$usealternates == "no" ){
            
$royalnametitle $royalstage7ftitle;
        }
    }
    else if(
$currentlevel == "8"){
        
$lang_caremenu_biobutton "<a href='myadopts.php?act=bio&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_bio_t."</a>";
        
$lang_caremenu_occupationbutton "<a href='myadopts.php?act=occupation&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_occupation_t."</a>";
        if(
$isfrozen == "yes"){
            
$levelupbutton "<span class='buttongrey buttoncarefor center'>".$levelupbutton3."</span>";
        }
        else{
            
$levelupbutton "<a href='levelup.php?id=".$aid."' class='button buttoncarefor center'>".$levelupbutton3."</a>";
        }
        if(
$usealternates == "yes"){
            
$royalnametitle $royalstage8mtitle;
        }
        else if(
$usealternates == "no" ){
            
$royalnametitle $royalstage8ftitle;
        }
    }

    
//Frozen or Unfroozen?
    
if($isfrozen == "yes"){
        
$status2 $lang_unfreeze_button;
        
$renamebutton "<div class='buttongrey buttoncarefor center'>".$lang_caremenu_rename_t."</div>";
    }
    else{
        
$status2 $lang_freeze_button;
        
$renamebutton "<a href='myadopts.php?act=rename&id=".$aid."' class='button buttoncarefor center'>".$lang_caremenu_rename_t."</a>";
    }

if(
$isfrozen != "yes"){

if(
$more == ""){

$article_title $lang_rename_title." ".$royalnametitle." ".$name;
$article_content "<!-- google_ad_section_start(weight=ignore) -->
<div class='npc3'><p class='titania2'><img src='templates/default/images/npc_1_s.png' width='70' height='70' border='0' alt='Titania' />"
.$lang_rename." <span class='bold'>".$royalnametitle." ".$name."</span> ".$lang_rename2." <span class='bold'>".$royalnametitle." ".$name."".$lang_rename3."</p></div>

<div id='pwrapper'>
<div id='p'>
    <div id='p_up_left'></div>
    <div id='p_up'></div>
    <div id='p_up_right'></div>
    <div id='p_middle_left'></div>
    <div id='p_middle'>
        <div class='inside2'>

<div id='pwrapper2'>
    <div id='ptitle'><div class='sub-title'>"
.$royalnametitle." ".$name."</div></div>
    <div id='p4'>
            <div id='p5'><a href='levelup.php?id="
.$aid."'><img src='".$image."' alt='".$royalnametitle." ".$name."' id='p5image' /></a></div>
            <div id='p5'>
            <div id='p1'><a href='myadopts.php?act=manage&id="
.$aid."' class='button buttoncarefor center'>".$lang_caremenu_stats2_t."</a></div>
            <div id='p1'>"
.$levelupbutton."</div>
            <div id='p2'>"
.$lang_caremenu_biobutton."</div>
            <div id='p3'>"
.$lang_caremenu_occupationbutton."</div>
            <div id='p1'><a href='myadopts.php?act=stats&id="
.$aid."' class='button buttoncarefor center'>".$lang_caremenu_stats_t."</a></div>
            <div id='p2'><a href='myadopts.php?act=bbcode&id="
.$aid."' class='button buttoncarefor center'>".$lang_caremenu_codes_t."</a></div>
            <div id='p3'>"
.$renamebutton."</div>
            <div id='p1'><a href='myadopts.php?act=freeze&id="
.$aid."' class='button buttoncarefor center'>".$status2."</a></div>
            <div id='p1'><a href='myadopts.php?act=kill&id="
.$aid."' class='button buttoncarefor center'>".$lang_caremenu_setfree_t."</a></div>
            </div>
    </div>
</div>

<form name='form1' method='get' action='myadopts.php'>
<label>"
.$lang_adoptrename_old_label."</label> ".$name."<br />
<div class='npc_p'><p class='titania2_p'>"
.$lang_rename4."</p></div>
<label for='more'>"
.$lang_adoptrename_new_label."</label> <input name='more' type='text' id='more' class='p_middletextarea' />
<input name='id' type='hidden' id='id' value='"
.$id."' />
<input name='act' type='hidden' id='act' value='rename' />
<input type='submit' name='Submit' class='button' value='"
.$lang_adoptrename_button."' />
</form>
        </div>
    </div>
    <div id='p_middle_right'></div>
    <div id='p_down_left'></div>
    <div id='p_down'></div>
    <div id='p_down_right'></div>
</div>
</div>
<!-- google_ad_section_end -->"
;

}
else{

// We are renaming the adoptable

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

$article_title $lang_rename_success_title;
$article_content "<!-- google_ad_section_start(weight=ignore) -->
<div class='npc3'><p class='titania2'><img src='templates/default/images/npc_1_s.png' width='70' height='70' border='0' alt='Titania' />"
.$lang_rename_success."</p></div>
<div id='pwrapper'>
<div id='p'>
    <div id='p_up_left'></div>
    <div id='p_up'></div>
    <div id='p_up_right'></div>
    <div id='p_middle_left'></div>
    <div id='p_middle'>
        <div class='inside2'>

<div id='pwrapper2'>
    <div id='ptitle'><div class='sub-title'>"
.$royalnametitle." ".$name."</div></div>
    <div id='p4'>
            <div id='p5'><a href='levelup.php?id="
.$aid."'><img src='".$image."' alt='".$royalnametitle." ".$name."' id='p5image' /></a></div>
            <div id='p5'>
            <div id='p1'><a href='myadopts.php?act=manage&id="
.$aid."' class='button buttoncarefor center'>".$lang_caremenu_stats2_t."</a></div>
            <div id='p1'>"
.$levelupbutton."</div>
            <div id='p2'>"
.$lang_caremenu_biobutton."</div>
            <div id='p3'>"
.$lang_caremenu_occupationbutton."</div>
            <div id='p1'><a href='myadopts.php?act=stats&id="
.$aid."' class='button buttoncarefor center'>".$lang_caremenu_stats_t."</a></div>
            <div id='p2'><a href='myadopts.php?act=bbcode&id="
.$aid."' class='button buttoncarefor center'>".$lang_caremenu_codes_t."</a></div>
            <div id='p3'>"
.$renamebutton."</div>
            <div id='p1'><a href='myadopts.php?act=freeze&id="
.$aid."' class='button buttoncarefor center'>".$status2."</a></div>
            <div id='p1'><a href='myadopts.php?act=kill&id="
.$aid."' class='button buttoncarefor center'>".$lang_caremenu_setfree_t."</a></div>
            </div>
    </div>
</div>

        </div>
    </div>
    <div id='p_middle_right'></div>
    <div id='p_down_left'></div>
    <div id='p_down'></div>
    <div id='p_down_right'></div>
</div>
</div>
<!-- google_ad_section_end -->"
;

}
}
else{

// We cannot rename a frozen adoptable...

$article_title $lang_frozen_title;
$article_content "<!-- google_ad_section_start(weight=ignore) -->
<div class='npc3'><p class='titania2'><img src='templates/default/images/npc_1_s.png' width='70' height='70' border='0' alt='Titania' />"
.$lang_frozen1." <span class='bold'>".$royalnametitle." ".$name."</span>".$lang_fronze2." <a href='myadopts.php?act=freeze&id=".$id."&more=unfreeze'>".$lang_adoptremane_unfreeze_link."</a> <span class='bold'>".$royalnametitle." ".$name."".$lang_frozen3."</p></div>
<div id='pwrapper'>
<div id='p'>
    <div id='p_up_left'></div>
    <div id='p_up'></div>
    <div id='p_up_right'></div>
    <div id='p_middle_left'></div>
    <div id='p_middle'>
        <div class='inside2'>

<div id='pwrapper2'>
    <div id='ptitle'><div class='sub-title'>"
.$royalnametitle." ".$name."</div></div>
    <div id='p4'>
            <div id='p5'><a href='levelup.php?id="
.$aid."'><img src='".$image."' alt='".$royalnametitle." ".$name."' id='p5image' /></a></div>
            <div id='p5'>
            <div id='p1'><a href='myadopts.php?act=manage&id="
.$aid."' class='button buttoncarefor center'>".$lang_caremenu_stats2_t."</a></div>
            <div id='p1'>"
.$levelupbutton."</div>
            <div id='p2'>"
.$lang_caremenu_biobutton."</div>
            <div id='p3'>"
.$lang_caremenu_occupationbutton."</div>
            <div id='p1'><a href='myadopts.php?act=stats&id="
.$aid."' class='button buttoncarefor center'>".$lang_caremenu_stats_t."</a></div>
            <div id='p2'><a href='myadopts.php?act=bbcode&id="
.$aid."' class='button buttoncarefor center'>".$lang_caremenu_codes_t."</a></div>
            <div id='p3'>"
.$renamebutton."</div>
            <div id='p1'><a href='myadopts.php?act=freeze&id="
.$aid."' class='button buttoncarefor center'>".$status2."</a></div>
            <div id='p1'><a href='myadopts.php?act=kill&id="
.$aid."' class='button buttoncarefor center'>".$lang_caremenu_setfree_t."</a></div>
            </div>
    </div>
</div>

        </div>
    </div>
    <div id='p_middle_right'></div>
    <div id='p_down_left'></div>
    <div id='p_down'></div>
    <div id='p_down_right'></div>
</div>
</div>
<!-- google_ad_section_end -->"
;

}


}
else{

$article_title $err_idnoexist;
$article_content "<!-- google_ad_section_start(weight=ignore) -->
<div class='npc3'><p class='titania2'><img src='templates/default/images/npc_1_s.png' width='70' height='70' border='0' alt='Titania' />"
.$err_idnoexist_text."</p></div>
<!-- google_ad_section_end -->"
;

}
}
else{

$article_title $err_idnoexist;
$article_content "<!-- google_ad_section_start(weight=ignore) -->
<div class='npc3'><p class='titania2'><img src='templates/default/images/npc_1_s.png' width='70' height='70' border='0' alt='Titania' />"
.$err_idnoexist_text."</p></div>
<!-- google_ad_section_end -->"
;

}




Oh jeese, okay now why do you want the drop down menu for this page?

What purpose would it be for?

You need to explain this to me, because there is more then one function on this page.

arlecchina 09-24-2009 10:20 PM

RE: Drop-down menu for myadopt.php
 
I want users to easily be able to navigate from one adoptable to another when managing, viewing stats, getting codes, renaming, freezing, unfreezing and killing adoptables (which are all existing actions in brandon's original myadopt.php file).

So on each of the myadopt.php action pages I would like to have a drop-down menu that lists all of the user's existing adoptables. For example, if the user is on the rename page for their first adoptable (myadopts.php?act=rename&id=1), after they rename adoptable 1, they can then choose adoptable 2 from the drop-down menu allowing them to navigate to the adoptable 2's rename page (myadopts.php?act=rename&id=2).

This is more convenient for the user and reduces the number of steps they need to do in order to manage multiple adoptables.

Bloodrun 09-25-2009 06:04 AM

RE: Drop-down menu for myadopt.php
 
Quote:

Originally Posted by arlecchina
I want users to easily be able to navigate from one adoptable to another when managing, viewing stats, getting codes, renaming, freezing, unfreezing and killing adoptables (which are all existing actions in brandon's original myadopt.php file).

So on each of the myadopt.php action pages I would like to have a drop-down menu that lists all of the user's existing adoptables. For example, if the user is on the rename page for their first adoptable (myadopts.php?act=rename&id=1), after they rename adoptable 1, they can then choose adoptable 2 from the drop-down menu allowing them to navigate to the adoptable 2's rename page (myadopts.php?act=rename&id=2).

This is more convenient for the user and reduces the number of steps they need to do in order to manage multiple adoptables.

Well to be quite honest I don't know where to put it in the Rename page, because of the fact that the rename page gets the ID from the previous page, therefore you wouldn't be able to do the whole drop down menu on the rename page without instituting Ajax, because adding a drop down menu would mean you would have to move the person to another page. But you want them to stay on the rename page obviously so they could change each pet.

So im trying to think of what you should do...

I think the easiest thing to do, would be to not incorporate the drop down menu with the actual coding on the rename page, but to have it on the page, so that when you rename one pet the drop down menu will show on the success page. Then your users can choose another pet from the success screen, then just make the "Click Here to Submit" Button, or whatever your going to call it, lead back to the Rename page.

Please tell me you followed that, because it will be a little bit before I can work up an example for you.

arlecchina 09-25-2009 04:48 PM

RE: Drop-down menu for myadopt.php
 
Quote:

Originally Posted by Bloodrun
Well to be quite honest I don't know where to put it in the Rename page, because of the fact that the rename page gets the ID from the previous page, therefore you wouldn't be able to do the whole drop down menu on the rename page without instituting Ajax, because adding a drop down menu would mean you would have to move the person to another page. But you want them to stay on the rename page obviously so they could change each pet.

So im trying to think of what you should do...

I think the easiest thing to do, would be to not incorporate the drop down menu with the actual coding on the rename page, but to have it on the page, so that when you rename one pet the drop down menu will show on the success page. Then your users can choose another pet from the success screen, then just make the "Click Here to Submit" Button, or whatever your going to call it, lead back to the Rename page.

Please tell me you followed that, because it will be a little bit before I can work up an example for you.

Actually I don't want them to stay on the rename page to rename each pet. I understand that each pet has their own rename url (example: myadopts.php?act=rename&id=2). I just want the user to be able to easily navigate from one adoptable rename url to another pet's rename url without having to return to the manage adoptables page (myadopts.php) to choose the pet.

I think adding the drop down menu to the success page would be a good idea. The only problem I am really having is listing the existing adoptables the user owns on the rename page and other myadopts pages including the success page. If we could list them on the success page, I think that would solve my problem.

Please note that I will be away 09/26-10/3 so feel free to postpone working on any of this until I return. I really appreciate all your help. Thank you.

Bloodrun 09-25-2009 07:43 PM

RE: Drop-down menu for myadopt.php
 
Quote:

Originally Posted by arlecchina
Quote:

Originally Posted by Bloodrun
Well to be quite honest I don't know where to put it in the Rename page, because of the fact that the rename page gets the ID from the previous page, therefore you wouldn't be able to do the whole drop down menu on the rename page without instituting Ajax, because adding a drop down menu would mean you would have to move the person to another page. But you want them to stay on the rename page obviously so they could change each pet.

So im trying to think of what you should do...

I think the easiest thing to do, would be to not incorporate the drop down menu with the actual coding on the rename page, but to have it on the page, so that when you rename one pet the drop down menu will show on the success page. Then your users can choose another pet from the success screen, then just make the "Click Here to Submit" Button, or whatever your going to call it, lead back to the Rename page.

Please tell me you followed that, because it will be a little bit before I can work up an example for you.

Actually I don't want them to stay on the rename page to rename each pet. I understand that each pet has their own rename url (example: myadopts.php?act=rename&id=2). I just want the user to be able to easily navigate from one adoptable rename url to another pet's rename url without having to return to the manage adoptables page (myadopts.php) to choose the pet.

I think adding the drop down menu to the success page would be a good idea. The only problem I am really having is listing the existing adoptables the user owns on the rename page and other myadopts pages including the success page. If we could list them on the success page, I think that would solve my problem.

Please note that I will be away 09/26-10/3 so feel free to postpone working on any of this until I return. I really appreciate all your help. Thank you.

Alright very well, I know how to write, because I've written it several times, I just can't get to my copy right now, in fact I can't get to any of my codes right now, and its really bugging me so lol I will try my hardest to get it.


All times are GMT -5. The time now is 05:24 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.