Ir para conteúdo
  • Cadastre-se

Show/Hide Conteudo de uma pagina


Posts Recomendados

Bom tenho uma pagina characters.php do meu gesior que mostra um "quest status" porem quando se adiciona muitas quests fica feia a page então eu gostaria de sabe se é possivel fazer como que tivesse um botão para mostrar e esconder(Show/Hide)  este quest status...

 

Imagem do quest status:

KWiecZ9.jpg

 

Eu gostaria que fosse algo estilo o SPOILER aqui do fórum:

 

Assim:

Quest status aqui dentro, com um botão para mostrar ou esconder ele.

 

Outro exemplo esta aqui muito mais fácil de se entender:

http://cyntara.org/character/Character/

 

no meio desta page esta assim:

» Additional Information (Show)

» Quests (Show)

» Deaths (Show)

» Recent Kills (Show)

Quando se clica neste Show ele mostra as informações...

Acho que deu pra entender :D

 

Meu characters.php:

<?PHP

$name = stripslashes(ucwords(strtolower(trim($_REQUEST['name']))));
if(empty($name)) {
$main_content .= '
<FORM ACTION="?subtopic=characters" METHOD=post>
<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR>
<TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white>
<B>Search Character</B>
</TD></TR><TR>
<TD BGCOLOR="'.$config['site']['darkborder'].'">
<TABLE BORDER=0 CELLPADDING=1>
<TR><TD>Name:</TD>
<TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD>
<TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18>
</TD></TR></TABLE></TD></TR></TABLE></FORM>';
}
else
{
if(check_name($name)) {
$player = $ots->createObject('Player');
$player->find($name);
if($player->isLoaded()) {
$account = $player->getAccount();
$main_content .= '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=0 HEIGHT=01 BORDER=0></TD><TD><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Character Information</B></TD></TR>';
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=22%>Name:</TD><TD>';
$main_content .= $player->getName();
if($player->isDeleted())
$main_content .= '&#160;<font color="red"><b>[DELETED]</b></font>';
if($player->isNameLocked())
$main_content .= '&#160;<font color="red">[NAMELOCK]</font>';
$main_content .= '<div style="float:right;"><a href="index.php?subtopic=report_name&name='.$player->getName().'"><img src="'.$layout_name.'/images/buttons/sbutton_reportname.gif" /></div>
</TD></TR>';
 
$group = $player->getGroup();
if ($group == 2){$group_name = 'Tutor';}
if ($group == 3){$group_name = 'Senior Tutor';}
if ($group == 4){$group_name = 'Gamemaster';}
if ($group == 5){$group_name = 'Community Manager';}
if ($group == 6){$group_name = 'Administrator';}
 
if($group != 1){
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Position:</TD><TD>'.$group_name.'</TD></TR>';
}
// END Position Showing
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Sex:</TD><TD>';
$main_content .= ($player->getSex() == 0) ? 'female' : 'male';
$main_content .= '</TD></TR>';
if($player->getMarriage()){
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Marital status:</TD><TD>';
$marriage = new OTS_Player();
$marriage->load($player->getMarriage());
if($marriage->isLoaded())
$main_content .= 'married to <a href="?subtopic=characters&name='.urlencode($marriage->getName()).'"><b>'.$marriage->getName().'</b></a></TD></TR>';
else
$main_content .= 'single</TD></TR>';
}
 
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Profession:</TD><TD>'.$vocation_name[$player->getWorld()][$player->getPromotion()][$player->getVocation()].'</TD></TR>';
 
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Level:</TD><TD>'.$player->getLevel().'</TD></TR>';
 
/* Achievements Points */
            $achievementPoints = $SQL->query('SELECT SUM(`value`) AS `sum` FROM `player_storage` WHERE `key` LIKE "200%" AND `player_id` = ' . $player->getId())->fetch();
            
            if(!$achievementPoints['sum']) { $achPoints = '0'; } else { $achPoints = $achievementPoints['sum']; }
            
            if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Achievement Points:</TD><TD>'.$achPoints.'</TD></TR>';
/* Achievements Points END*/  
 
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>World:</TD><TD>'.$config['site']['worlds'][$player->getWorld()].'</TD></TR>';
if(!empty($towns_list[$player->getWorld()][$player->getTownId()])){
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Residence:</TD><TD>'.$towns_list[$player->getWorld()][$player->getTownId()].'</TD></TR>';
}
 
$house = $SQL->query('SELECT `houses`.`name`, `houses`.`town`, `houses`.`paid` FROM `houses` WHERE `houses`.`world_id` = '.$player->getWorld().' AND `houses`.`owner` = '.$player->getId().';')->fetchAll();
if(count($house) != 0)
{
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>House:</TD><TD colspan="2">'.$house[0]['name'].' ('.$towns_list[$player->getWorld()][$house[0]['town']].')';
if ($house[0]['paid']){$main_content .=&nbsp;is paid until '.date("M j Y", $house[0]['paid]);}
$main_content .='.</TD></TR>';
}
$rank_of_player = $player->getRank();
if(!empty($rank_of_player)){
{
$guild_id = $rank_of_player->getGuild()->getId();
$guild_name = $rank_of_player->getGuild()->getName();
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Guild Membership:</TD><TD>'.$rank_of_player->getName().' of the <a href="?subtopic=guilds&action=show&guild='.$guild_id.'">'.$guild_name.'</a></TD></TR>';
}
}
 
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
if($player->getLastLogin())
$main_content .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH="20%">Last login:</TD><TD>'.date("M j Y, H:i:s T", $player->getLastLogin()).'</TD></TR>';
else
$main_content .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH="20%">Last login:</TD><TD>Never logged in.</TD></TR>';
// VIP STATUS 
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Account Status:</TD><TD>';  
$main_content .= ($account->isPremium()) ? 'Premium Account' : 'Free Account';
//Comment System
$comment = $player->getComment();
$newlines   = array("\r\n", "\n", "\r");
$comment_with_lines = str_replace($newlines, '<br />', $comment, $count);
if($count < 50)
$comment = $comment_with_lines;
if(!empty($comment))
{
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;  
$main_content .= ' <TR BGCOLOR="'.$bgcolor.'"><TD VALIGN="top">Comment:</TD><TD> '.$comment.'</TD></TR>';
}
 
//Outfit
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= ' <TR BGCOLOR="'.$bgcolor.'"><TD>Outfit:</TD><TD> 
<center>
<div style="position: relative; width: 32px; height: 32px;">
<div style="background-image: url(\'outfitter.php?id='.$player->getLookType().'&addons='.$player->getLookAddons().'&head='.$player->getLookHead().'&body='.$player->getLookBody().'&legs='.$player->getLookLegs().'&feet='.$player->getLookFeet().'\'); position: absolute; width: 64px; height: 80px; background-position: bottom right; background-repeat: no-repeat; right: 250px; bottom: 0px;">
</div>
</div>
</center>
<tr>
 
</tr> ';
if ($player->getCustomField("show_outfit") == 1){
 
}
 
/*
                Achievements website script by Archez.
                http://otland.net/members/archez/
                Achievements in-game functions and script by darkhaos.
                http://otland.net/members/darkhaos/
                A person that made this script possible, Chris.
                http://otland.net/members/chris/
                ------------------------------------------------------
                Merely scripted for Gesior AAC.
                ------------------------------------------------------
            */
                
                $achievements = $SQL->query('SELECT `key`, `player_id` FROM `player_storage` WHERE `key` LIKE "200%" AND `player_id` = ' . $player->getId())->fetchAll();
 
                $main_content .= '</br><table border=0 cellspacing="1" cellpadding="4" width=100%><tr bgcolor="'.$config['site']['vdarkborder'].'"><td colspan="2" class=white><b>Account Achievements</b></td></tr>';
                
                if(!$achievements)
                {
                    $main_content .= '<tr bgcolor="'.$config['site']['lightborder'].'"><td>There are no achievements set to be displayed for this character.</td></tr>';
                }
                else
                {
                    $number_of_rows = 0;
                    
                    foreach($achievements as $row)
                    {
                        if(!array_key_exists(($row['key'] - 19999 ), $achievements))
                        {
                            if($row['key'] - 20000 <= 54) { $grade = '<img src="images/achievements/grade.gif" />'; }
                            elseif($row['key'] - 20000 <= 79) { $grade = '<img src="images/achievements/grade.gif" /> <img src="images/achievements/grade.gif" />'; }
                            elseif($row['key'] - 20000 >= 80) { $grade = ' <img src="images/achievements/grade.gif" /> <img src="images/achievements/grade.gif" /> <img src="images/achievements/grade.gif" />'; }
 
                            $secret = false;
                            
                            if(in_array(($row['key'] - 20000), $config['archez']['secret']))
                            {
                                $secret = '<img src="images/achievements/secret.gif" />';
                            }
                            
                            if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; }
                            
                            $main_content .= '<tr bgcolor="'.$bgcolor.'"><td width="20%">'.$grade.'</td><td>' . $config['archez']['achievements'][$row['key'] - 20000] . '<span style="float:right;">'.$secret.'</span></td></tr>';
                            
                            $number_of_rows++;
                        }
                    }
                }
                
                $main_content .= '<tr>
<td>&nbsp;</td>
</tr></table>';
                
            /* END OF ACHIEVEMENTS */ 
 
$deads = 0;
$player_deaths = $SQL->query('SELECT `id`, `date`, `level` FROM `player_deaths` WHERE `player_id` = '.$player->getId().' ORDER BY `date` DESC LIMIT 0,10;');
foreach($player_deaths as $death)
{
if(is_int($number_of_rows / 2))
$bgcolor = $config['site']['darkborder']; else $bgcolor = $config['site']['lightborder'];
 
$number_of_rows++; $deads++;
$dead_add_content .= "<tr bgcolor=\"".$bgcolor."\">
<td width=\"30%\" align=\"center\">".date("M j Y, H:i:s T", $death['date'])."</td>
<td>";
$killers = $SQL->query("SELECT environment_killers.name AS monster_name, players.name AS player_name, players.deleted AS player_exists FROM killers LEFT JOIN environment_killers ON killers.id = environment_killers.kill_id
LEFT JOIN player_killers ON killers.id = player_killers.kill_id LEFT JOIN players ON players.id = player_killers.player_id
WHERE killers.death_id = ".$SQL->quote($death['id'])." ORDER BY killers.final_hit DESC, killers.id ASC")->fetchAll();
 
$i = 0;
$count = count($killers);
foreach($killers as $killer)
{
$i++;
if(in_array($i, array(1, $count)))
$killer['monster_name'] = str_replace(array("an ", "a "), array("", ""), $killer['monster_name']);
 
if($killer['player_name'] != "")
{
if($i == 1)
$dead_add_content .= "Killed at level <b>".$death['level']."</b> by ";
else if($i == $count)
$dead_add_content .= " and by ";
else
$dead_add_content .= ", ";
 
if($killer['monster_name'] != "")
$dead_add_content .= $killer['monster_name']." summoned by ";
 
if($killer['player_exists'] == 0)
$dead_add_content .= "<a href=\"index.php?subtopic=characters&name=".urlencode($killer['player_name'])."\">";
 
$dead_add_content .= $killer['player_name'];
if($killer['player_exists'] == 0)
$dead_add_content .= "</a>";
}
else
{
if($i == 1)
$dead_add_content .= "Died at level <b>".$death['level']."</b> by ";
else if($i == $count)
$dead_add_content .= " and by ";
else
$dead_add_content .= ", ";
 
$dead_add_content .= $killer['monster_name'];
}
 
if($i == $count)
$dead_add_content .= "";
}
 
$dead_add_content .= ".</td></tr>";
}
 
if($deads > 0)
$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Character Deaths</B></TD></TR>' . $dead_add_content . '</TABLE><br />';
 
//end
 
            //New Quest status// 
            $id = $player->getCustomField("id"); 
            $number_of_quests = 0; 
            $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD align="left" COLSPAN=2 CLASS=white><B>Quests</B></TD></TD align="right"></TD></TR>';         
        $questCount = 0; 
        foreach ($config["site"]["quests"] as $questName => $questData) { 
            $backgroundColor = is_int($questCount / 2) ? $config["site"]["darkborder"] : $config["site"]["lightborder"]; 
            $questCount   = $questCount + 1; $questStatus = $SQL->query("SELECT * FROM `player_storage` WHERE `player_id` = ".$id." AND `key` = ".$questData["storageid"].";")->fetch(); 
            $questPercent = (($questStatus["value"] - $questData["startvalue"])/$questData["endvalue"]) * 100; 
            $main_content         .= "<tr bgcolor=\"".$backgroundColor."\"><td width=\"55%\">".$questName."</td><td width=\"45%\" style=\"text-align:center;\">".$questPercent."%<div style=\"background-color:white; margin-top:-14px; width: 100%; height: 12px; border: 1px solid #DDD;\"><div style=\"background: green; width: ".$questPercent."%; height: 12px;\"></div></div></td></tr>";         
        } 
        //New Quest status// 
 
if(!$player->getHideChar()) {
$main_content .= '<TABLE BORDER=0><TR><TD></TD></TR></TABLE><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Account Information</B></TD></TR>';
if($account->getRLName())
{
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=20%>Real name:</TD><TD>'.$account->getRLName().'</TD></TR>';
}
if($account->getLocation())
{
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=20%>Location:</TD><TD>'.$account->getLocation().'</TD></TR>';
}
$group = $player->getGroup();
if ($group == 2){$group_name = 'Tutor <img alt="" src="images/star.png" /> <img alt="" src="images/star.png" /> ';}
if ($group == 3){$group_name = 'Senior Tutor <img alt="" src="images/star.png" /> <img alt="" src="images/star.png" /> ';}
if ($group == 4){$group_name = 'Gamemaster <img alt="" src="images/star.png" /> <img alt="" src="images/star.png" /> ';}
if ($group == 5){$group_name = 'Community Manager <img alt="" src="images/star.png" /> <img alt="" src="images/star.png" /> ';}
if ($group == 6){$group_name = 'Administrator <img alt="" src="images/star.png" /> <img alt="" src="images/star.png" /> ';}
 
if($group != 1){
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Position:</TD><TD>'.$group_name.'</TD></TR>';
}
if($player->getCreated())
{
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Created:</TD><TD>'.date("M j Y, H:i:s T", $player->getCreated()).'</TD></TR>';
}
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
if($account->getLastLogin())
$main_content .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH="20%">Last login:</TD><TD>'.date("M j Y, H:i:s T", $account->getLastLogin()).'</TD></TR>';
 
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$ban_types = array(1 => 'IP Banishment', 2 => 'Namelock', 3 => 'Account Banishment', 4 => 'Notation', 5 => 'Until Deletion');
$ban_reason = array("Offensive Name", "Invalid Name Format", "Unsuitable Name", "Name Inciting Rule Violation", "Offensive Statement", "Spamming", "Illegal Advertising", "Off-Topic Public Statement", "Non-English Public Statement", "Inciting Rule Violation", "Bug Abuse", "Game Weakness Abuse", "Using Unofficial Software to Play", "Hacking", "Multi-Clienting", "Account Trading or Sharing", "Threatening Gamemaster", "Pretending to Have Influence on Rule Enforcer", "False Report to Gamemaster", "Destructive Behaviour", "Excessive Unjustified Player Killing", "Invalid Payment", "Spoiling Auction");
$players_banned = $SQL->query('SELECT * FROM `bans` WHERE `value` = '.$account->getCustomField('id').'')->fetchAll();
foreach($players_banned as $player) {
if($account->isBanned())
if($account->getBanTime() > 0)
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Banished:</td><td><font color="red"><b>Account Banishment</b>&#160;<br /><b>Expires:</b>&nbsp;'.date("j F Y, G:i A", $account->getBanTime()).' - '.$ban_reason[$player['reason']].'</font></td></tr>';
else
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Banished:</td><td><font color="red"><b>Banished Forever</font></td></tr>';
}
$main_content .= '</TD></TR></TABLE>';
$main_content .= '<br /><TABLE BORDER=0><TR><TD></TD></TR></TABLE><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=5 CLASS=white><B>Characters</B></TD></TR>
<TR BGCOLOR='.$config['site']['darkborder'].'><TD><B>Name</B></TD><TD><B>World</B></TD><TD><B>Level</B></TD><TD><b>Status</b></TD><TD><B>&#160;</B></TD></TR>';
$account_players = $account->getPlayersList();
$account_players->orderBy('name');
$player_number = 0;
foreach($account_players as $player_list)
{
if(!$player_list->getHideChar())
{
$player_number++;
if(is_int($player_number / 2))
$bgcolor = $config['site']['darkborder'];
else
$bgcolor = $config['site']['lightborder'];
if(!$player_list->isOnline())
$player_list_status = '';
else
$player_list_status = '<b style="color:green;">online</b>';
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=52%><NOBR>'.$player_number.'.&#160;'.$player_list->getName();
$main_content .= '</NOBR></TD><TD WIDTH=15%>'.$config['site']['worlds'][$player_list->getWorld()].'</TD><TD WIDTH=25%>'.$player_list->getLevel().' '.$vocation_name[$player_list->getWorld()][$player_list->getPromotion()][$player_list->getVocation()].'</TD><TD WIDTH="8%">'.$player_list_status.'</TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION="?subtopic=characters" METHOD=post><TR><TD><INPUT TYPE=hidden NAME=name VALUE="'.$player_list->getName().'"><INPUT TYPE=image NAME="View '.$player_list->getName().'" ALT="View '.$player_list->getName().'" SRC="'.$layout_name.'/images/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></FORM></TABLE></TD></TR>';
}
}
$main_content .= '</TABLE></TD><TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD></TR></TABLE>';
}
$main_content .= '<br /><br /><FORM ACTION="?subtopic=characters" METHOD=post><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR='.$config['site]['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>';
$main_content .= '</TABLE>';
}
else
$search_errors[] = 'Character <b>'.$name.'</b> does not exist.';
}
else
$search_errors[] = 'This name contains invalid letters. Please use only A-Z, a-z and space.';
if(!empty($search_errors))
{
$main_content .= '
<div class="SmallBox" >
<div class="MessageContainer" >
<div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>
<div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
<div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
<div class="ErrorMessage" >
<div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>
<div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>
<div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div>
<b>The Following Errors Have Occurred:</b><br />';
foreach($search_errors as $search_error)
$main_content .= '<li>'.$search_error;
$main_content .= '</div>
<div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>
<div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
<div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
</div>
</div>
<br />';
$main_content .= '<BR /><FORM ACTION="?subtopic=characters" METHOD=post><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR='.$config['site]['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>';
}
}

?>

Editado por Markin (veja o histórico de edições)

16/11/2014

23/11/2014

 

RIP AnneMotta 21/01/2012 - 15/01/2014

Liga das lendas: DIAMOND É A META

6qpqBbJ.png

Link para o post
Compartilhar em outros sites

Estou a um tempo tentando usar os códigos do que o guido mandou porem ainda não consegui, consegui introduzir o botão porem não consegui colocar o quest system dentro do botão.

16/11/2014

23/11/2014

 

RIP AnneMotta 21/01/2012 - 15/01/2014

Liga das lendas: DIAMOND É A META

6qpqBbJ.png

Link para o post
Compartilhar em outros sites

Amigos, eu já disse acima que o gesior usa isso na página 'wars' é só olhar o exemplo ... 

<?php

#FUNÇÃO
$main_content .= "
<script type=\"text/javascript\"><!--
function show_hide(flip)
{
        var tmp = document.getElementById(flip);
        if(tmp)
        tmp.style.display = tmp.style.display == 'none' ? '' : 'none';
}
--></script>";

#LINK
$main_content .= " <a onclick=\"show_hide('war-details:teste1'); return false;\" style=\"cursor: pointer;\">&raquo; Details &laquo;</a>";

#SHOW
$main_content .= " <div id=\"war-details:teste1\" style=\"display: none;> TEXTO </div>";

?>

Eu não testei, e nem sei se vai funcionar, só peguei o exemplo que ta lá e separei pra vocês ... 

Link para o post
Compartilhar em outros sites

Eu não tenho nenhuma noção de php por isso mesmo com um 'exemplo' na page wars eu não consigo adaptar.

16/11/2014

23/11/2014

 

RIP AnneMotta 21/01/2012 - 15/01/2014

Liga das lendas: DIAMOND É A META

6qpqBbJ.png

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo