Ir para conteúdo
  • Cadastre-se

[Gesior ACC] Compra e Venda de personagens por pontos


Posts Recomendados

Compra e venda de personagens por pontos para Gesior ACC.
Vamos lá..

 

FOTOS:

 

Venda:

15622d1346255370-gesior-acc-buy-sell-cha

 

 

Compra:

15623d1346255762-gesior-acc-buy-sell-cha

 

15624d1346255807-gesior-acc-buy-sell-cha

 

 

Crie um arquivo dentro do htdocs, chamado buychar.php e dentro dele coloque:
 

<?PHP
    if($logged) {
        
        if ($action == '') {
        
        $main_content .= '<center>Here is the list of the current characters that are in the shop!</center>';
        $main_content .= '<BR>';
        $main_content .= '<TABLE BORDER=1 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD CLASS=white width="64px"><CENTER><B>Name</B></CENTER></TD><TD CLASS=white width="64px"><CENTER><B>Vocation</B></CENTER></TD><TD CLASS=white width="64px"><CENTER><B>Level</B></CENTER></TD><TD CLASS=white width="64px"><CENTER><B>Price</B></CENTER></TD><TD CLASS=white width="64px"><CENTER><B>Buy it</B></CENTER></TD></TR>';
        $getall = $SQL->query('SELECT `id`, `name`, `price`, `status` FROM `sellchar` ORDER BY `id`')or die(mysql_error());
        foreach ($getall as $tt) {
            $namer = $tt['name'];
            $queryt = $SQL->query("SELECT `name`, `vocation`, `level` FROM `players` WHERE `name` = '$namer'");
            foreach ($queryt as $ty) {
            if ($ty['vocation'] == 1) {
            $tu = 'Sorcerer';
        } else if ($ty['vocation'] == 2) {
            $tu = 'Druid';    
        } else if ($ty['vocation'] == 3) {
            $tu = 'Paladin';    
        } else if ($ty['vocation'] == 4) {
            $tu = 'Knight';
        } else if ($ty['vocation'] == 5) {
            $tu = 'Sorcerer';
        }  else if ($ty['vocation'] == 6) {
            $tu = 'Druid';    
        } else if ($ty['vocation'] == 7) {
            $tu = 'Paladin';    
        } else if ($ty['vocation'] == 8) {
            $tu = 'Knight';
        }
        $ee = $tt['name'];
        $ii = $tt['price'];
        $main_content .= '<TR BGCOLOR='.$config['site']['darkborder'].'><TD CLASS=black width="64px"><CENTER><B><a href="index.php?subtopic=characters&name='.$tt['name'].'">'.$tt['name'].'</a></B></CENTER></TD><TD CLASS=black width="64px"><CENTER><B>'.$tu.'</B></CENTER></TD><TD CLASS=black width="64px"><CENTER><B>'.$ty['level'].'</B></CENTER></TD><TD CLASS=black width="64px"><CENTER><B>'.$tt['price'].'</B></CENTER></TD><TD CLASS=black width="64px"><CENTER><B>
        <form action="?subtopic=buychar&action=buy" method="POST">
        <input type="hidden" name="char" value="'.$ee.'">
        <input type="hidden" name="price" value="'.$ii.'">
        <input type="submit" name="submit" value="Buy it"></B></CENTER></TD></TR></form>';
        }
        }
        $main_content .= '</TABLE>';
        
        }
        
        if ($action == 'buy') {
        
            $name = $_POST['char'];    
            $price = $_POST['price'];    
            $ceh = $SQL->query("SELECT `name` FROM `sellchar` WHERE `name` = '$name'");
            
            if ($ceh) {
            
            if ($name == '') {
            
            $main_content .= '<b><center>Select a character to buy first/b>';
            
            } else {
            
            $user_premium_points = $account_logged->getCustomField('premium_points');
            $user_id = $account_logged->getCustomField('id');
            
            if ($user_premium_points >= $price) {
                
            $check = $SQL->query("SELECT * FROM `sellchar` WHERE `name` = '$name'") or die(mysql_error());
            $check1 = $SQL->query("SELECT * FROM `players` WHERE `name` = '$name'") or die(mysql_error());
            $check2 = $SQL->query("SELECT `oldid` FROM `sellchar` WHERE `name` = '$name'");
            foreach ($check as $result) {
            foreach($check1 as $res) {
            foreach($check2 as $ress) {
            
            $oid = $ress['oldid'];    
            $main_content .= '<center>You bought<b> '.$name.' ( '.$res['level'].' ) </b>for  <b>'.$result['price'].' points.</b><br></center>';
            $main_content .= '<br>';
            $main_content .= '<center><b>The character is in your account, have fun!</b></center>';
            $execute1 = $SQL->query("UPDATE `accounts` SET `premium_points` = `premium_points` - '$price' WHERE `id` = '$user_id'");
            $execute2 = $SQL->query("UPDATE `players` SET `account_id` = '$user_id' WHERE `name` = '$name'");
            $execute2 = $SQL->query("UPDATE `accounts` SET `premium_points` = `premium_points` + '$price' WHERE `id` = '$oid'");
            $execute3 = $SQL->query("DELETE FROM `sellchar` WHERE `name` = '$name'");
            
            }
                }
            }
                
            } else {
                
                $main_content .= '<center><b>You dont have enought premium points</b></center>';
                
                    }
            
                }    
                
            } else {
                $main_content .= '<center><b>Character cannot be buyed</b></center>';
            }
        }
        
    } else {
        
        $main_content .= '<center>Please log in first!</center>';
    }
?>

 
depois crie um chamado sellchar.php e coloque isso:

<?PHP
    if($logged) {
        $main_content .= '<center><b>Here you can put your character on sale!</center></b><br>';
        $main_content .= 'If you put your character on sale anyone can buy it, you will lose acces to that character and you wont be able to log in with that character until someone buys it, you can also delete your offer by talking to an admin!<br><b>when someone buys your character you will get the price in points!</b>';
        $main_content .= '<br>';
        $main_content .= '<TABLE BORDER=1 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD CLASS=white width="64px"><CENTER><B>Sell your characters</B></CENTER></TD></TR>';
        $main_content .= '<TR BGCOLOR='.$config['site']['darkborder'].'><TD CLASS=black width="64px"><B></B>';
        
        $players_from_logged_acc = $account_logged->getPlayersList();
                            
                                $players_from_logged_acc->orderBy('name');
                                $main_content .= '<form action="" method="post"><select name="char">';
                                foreach($players_from_logged_acc as $player)
                                {
                                    $main_content .= '<option>'.$player->getName().'</option>';
                                }
        
        $main_content .= '</select>Select a character to sell<br>';
        $main_content .= '<input type="text" name="price" maxlength="10" size="4" >Select the price of the character<br>';
        $main_content .= '<input type="submit" name="submit" value="Sell character"></TD></TR>';
                            $main_content .= '</form></table>';
                            
                            if (isset($_POST['submit'])) {
                                
                            $char = stripslashes($_POST['char']);
                            $price = stripslashes($_POST['price']);
                            
                            if ($char && $price) {

                                if(is_numeric(trim($_POST['price']))) {
                                
                                        $check2 = $SQL->query("SELECT * FROM `players` WHERE `name` = '$char'") or die(mysql_error());
                                foreach ($check2 as $re) {
                                    $voc = $re['vocation'];
                                    $oid = $re['account_id'];
                                }
                                $check1 = $SQL->query("UPDATE `players` SET `account_id` = 1 WHERE `name` = '$char'") or die(mysql_error());
                                $check3 = $SQL->query("INSERT INTO `sellchar` VALUES ('','$char','$voc','$price','1','$oid')");
                                $main_content .= '<b><center>You added your character correctly, thanks!</b></center>';
                                header("Location: index.php?subtopic=buychar");
                                
                                } else {
                            
                                $main_content .= '<b><center>Set a numeric price!!</b></center>';
                                }
                                
                            } else {
                                    $main_content .= '<b><center>Fill out all fields!</b></center>';
                            }
                            
                        }
    } else {
        $main_content .= '<b><center>Please log in first!</b></center>';
    }
?>

 
depois disso vá em htdocs/layouts/layout que você usa/layouts e insira as duas páginas aonde você bem querer(sugiro que seja na aba shop, pois é venda e compra).. caso alguém não saiba posta aqui no tópico que eu ensino.
 
Agora adicione isso no index.php

case "sellchar";
                $topic = "Sell Char";
                $subtopic = "sellchar";
                include("sellchar.php");
    break;
    
    case "buychar";
                $topic = "Buy Char";
                $subtopic = "buychar";
                include("buychar.php");
    break;

 
Agora acesse a database do OT e insira este comando SQL

CREATE TABLE IF NOT EXISTS `sellchar` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(40) NOT NULL,
`vocation` int(11) NOT NULL,
`price` int(11) NOT NULL,
`status` varchar(40) NOT NULL,
`oldid` varchar(40) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Pronto para ser usado!!

 

 

 

 

obs1: Caso você não adicionou a página no layouts acesse assim:
 
127.0.0.1/?subtopic=sellchar
127.0.0.1/?subtopic=buychar

 

obs2: não tem como a pessoa que colocou a venda tirá-lo depois, se algum programador se habilitar a fazer o esquema aí para nós, fico grato.

 

 

 

 

--- Créditos ---

Raggaer

Helliab por trazer ao TK.

 

REP++ (y)

 

@helliabsantana

Link para o post
Compartilhar em outros sites
  • 1 year later...
  • 1 month later...

O Complicado é o cara colocar e depois não poder tirar, ou isso poderia ser habilitado somente para compra pro VIP points e nos mesmo adicionarmos os personagens para vender, e não o proprio player ter essa opção

Link para o post
Compartilhar em outros sites
  • 11 months later...

Ola amigo eu gostei do sistema e adicionei ao meu gesior.eu gostaria de saber como eu faco para colocar as  2 paginas no mu site.eu gostaria de colocar o SELLCHAR na parte  ACCOUNTS.ja no caso o BUYCHAR eu gostariade saber como adiciono uma opcao do lado >> do site embaixo do box top level  com uma foto que eu ja tenho.que a licr nela sera direcionr pra aba buy char entendeu ? se alguem ae puder ajudar.

ake esta meu layoult.hp  e meu chracter.php casoo seja necessario.

LAYOULT

 

<head>
  <title><?PHP echo $title ?></title>
  <meta name="description" content="Tibia is a free massive multiplayer online role playing game (MMORPG)." />
  <meta name="author" content="Gesior | Modified by Norix and WidNet" />
  <meta http-equiv="content-language" content="en" />
  <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
  <meta name="keywords" content="free online game, free multiplayer game, ots, open tibia server" />
  <link rel="shortcut icon" href="<?PHP echo $layout_name; ?>/images/server.ico" type="image/x-icon">
  <link rel="icon" href="<?PHP echo $layout_name; ?>/images/server.ico" type="image/x-icon">
  <?PHP echo $layout_header; ?>
  <link href="<?PHP echo $layout_name; ?>/basic.css" rel="stylesheet" type="text/css">
  <script type='text/javascript'> var IMAGES=0; IMAGES='<?PHP echo $layout_name; ?>/images'; var g_FormField='';  var LINK_ACCOUNT=0; LINK_ACCOUNT='';</script>
  <script type="text/javascript" src="<?PHP echo $layout_name; ?>/initialize.js"></script>
  <SCRIPT TYPE="text/javascript">
  <!-- // Framekiller
  setTimeout ("changePage()", 6000);
  function changePage()
  {
    if (parent.frames.length > 2) {
      if (browserTyp == "ie") {
        parent.location=document.location;
      } else {
        self.top.location=document.location;
      }
    }
  }
  // -->
  </SCRIPT>
</head>
<body onBeforeUnLoad="SaveMenu();" onUnload="SaveMenu();">
 <a name="top"></a>
  <div id="ArtworkHelper" style="background-image:url(<?PHP echo $layout_name; ?>/images/header/background-artwork9.jpg);" >
    <div id="Bodycontainer">
      <div id="ContentRow">
        <div id="MenuColumn">
          <div id="LeftArtwork">
            <img id="Statue_1" src="<?PHP echo $layout_name; ?>/images/header/animated-statue.gif" alt="logoartwork" />
            <img id="TibiaLogoArtworkTop" src="<?PHP echo $layout_name; ?>/images/header/tibia-logo-artwork-top.gif" onClick="window.location = '?subtopic=latestnews';" alt="logoartwork" />
            <img id="TibiaLogoArtworkBottom" src="<?PHP echo $layout_name; ?>/images/header/tibia-logo-artwork-bottom.gif" alt="logoartwork" />
            <img id="Statue_2" src="<?PHP echo $layout_name; ?>/images/header/animated-statue.gif" alt="logoartwork" />
          </div>
          
  <div id="Loginbox" >
    <div id="LoginTop" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/box-top.gif)" ></div>
    <div id="BorderLeft" class="LoginBorder" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif)" ></div>
    <div class="Loginstatus" style="background-image:url(<?PHP echo $layout_name; ?>/images/loginbox/loginbox-textfield-background.gif)" >
      <div id="LoginstatusText_1" class="LoginstatusText" style="background-image:url(<?PHP echo $layout_name; ?>/images/loginbox/loginbox-font-you-are-not-logged-in.gif)" ></div>
    </div>
    <div id="LoginButtonContainer" style="background-image:url(<?PHP echo $layout_name; ?>/images/loginbox/loginbox-textfield-background.gif)" >
      <div id="LoginButton" style="background-image:url(<?PHP echo $layout_name; ?>/images/buttons/sbutton.gif)" > 
        <div onClick="LoginButtonAction();" onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);"><div class="Button" style="background-image:url(<?PHP echo $layout_name; ?>/images/buttons/sbutton_over.gif)" ></div>
          <div id="ButtonText" ></div>
        </div>
      </div>
    </div>
    <div style="clear:both" ></div>
    <div class="Loginstatus" style="background-image:url(<?PHP echo $layout_name; ?>/images/loginbox/loginbox-textfield-background.gif)" >
      <div id="LoginstatusText_2" onClick="LoginstatusTextAction(this);" onMouseOver="MouseOverLoginBoxText(this);" onMouseOut="MouseOutLoginBoxText(this);" ><div id="LoginstatusText_2_1" class="LoginstatusText" style="background-image:url(<?PHP echo $layout_name; ?>/images/loginbox/loginbox-font-create-account.gif)" ></div><div id="LoginstatusText_2_2" class="LoginstatusText" style="background-image:url(<?PHP echo $layout_name; ?>/images/loginbox/loginbox-font-create-account-over.gif)" ></div></div>
    </div>
     <div id="BorderRight" class="LoginBorder" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif)" ></div>
    <div id="LoginBottom" class="Loginstatus" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/box-bottom.gif)" ></div>
  </div>
 
<div id='Menu'>
<div id='MenuTop' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/box-top.gif);'></div>
 
<div id='news' class='menuitem'>
<span onClick="MenuItemAction('news')">
  <div class='MenuButton' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/button-background.gif);'>
    <div onMouseOver='MouseOverMenuItem(this);' onMouseOut='MouseOutMenuItem(this);'><div class='Button' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/button-background-over.gif);'></div>
      <span id='news_Lights' class='Lights'>
        <div class='light_lu' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/green-light.gif);'></div>
        <div class='light_ld' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/green-light.gif);'></div>
 
        <div class='light_ru' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/green-light.gif);'></div>
      </span>
      <div id='news_Icon' class='Icon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-news.gif);'></div>
      <div id='news_Label' class='Label' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/label-news.png);'></div>
      <div id='news_Extend' class='Extend' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/plus.gif);'></div>
    </div>
  </div>
</span>
<div id='news_Submenu' class='Submenu'>
<a href='?subtopic=latestnews'>
  <div id='submenu_latestnews' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_latestnews' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Latest News</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
</a>
<a href='?subtopic=archive'>
  <div id='submenu_archive' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_archive' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>News Archive</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
</a>
<a href='?subtopic=changelog'>
  <div id='submenu_changelog' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_changelog' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Changelog</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
</a>
</div>
</div>
 
<div id='events' class='menuitem'>
<span onClick="MenuItemAction('events')">
  <div class='MenuButton' style='background-image:url(layouts/tibiacom/images/menu/button-background.gif);'>
    <div onMouseOver='MouseOverMenuItem(this);' onMouseOut='MouseOutMenuItem(this);'><div class='Button' style='background-image:url(layouts/tibiacom/images/menu/button-background-over.gif);'></div>
      <span id='events_Lights' class='Lights'>
        <div class='light_lu' style='background-image:url(layouts/tibiacom/images/menu/green-light.gif);'></div>
        <div class='light_ld' style='background-image:url(layouts/tibiacom/images/menu/green-light.gif);'></div>
        <div class='light_ru' style='background-image:url(layouts/tibiacom/images/menu/green-light.gif);'></div>
      </span>
      <div id='events_Icon' class='Icon' style='background-image:url(layouts/tibiacom/images/menu/icon-events.gif);'></div>
      <div id='events_Label' class='Label' style='background-image:url(layouts/tibiacom/images/menu/label-eventos.png);'></div>
      <div id='events_Extend' class='Extend' style='background-image:url(layouts/tibiacom/images/general/plus.gif);'></div>
 
    </div>
  </div>
</span>
 
<div id='events_Submenu' class='Submenu'>
<!-- a href='?subtopic=calendario'>
<div id='submenu_calendario' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
<div class='LeftChain' style='background-image:url(layouts/tibiacom/images/general/chain.gif);'></div>
<div id='ActiveSubmenuItemIcon_calendario' class='ActiveSubmenuItemIcon' style='background-image:url(layouts/tibiacom/images/menu/icon-activesubmenu.gif);'></div>
<div class='SubmenuitemLabel'>Calendário de Eventos</div>
<div class='RightChain' style='background-image:url(layouts/tibiacom/images/general/chain.gif);'></div>
  </div>
</a -->
<!-- a href='?subtopic=warofemperium'>
<div id='submenu_warofemperium' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
<div class='LeftChain' style='background-image:url(layouts/tibiacom/images/general/chain.gif);'></div>
<div id='ActiveSubmenuItemIcon_warofemperium' class='ActiveSubmenuItemIcon' style='background-image:url(layouts/tibiacom/images/menu/icon-activesubmenu.gif);'></div>
<div class='SubmenuitemLabel'>War of Emperium</div>
<div class='RightChain' style='background-image:url(layouts/tibiacom/images/general/chain.gif);'></div>
</div>
</a -->
<a href='?subtopic=battlefield'>
<div id='submenu_battlefield' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
<div class='LeftChain' style='background-image:url(layouts/tibiacom/images/general/chain.gif);'></div>
<div id='ActiveSubmenuItemIcon_battlefield' class='ActiveSubmenuItemIcon' style='background-image:url(layouts/tibiacom/images/menu/icon-activesubmenu.gif);'></div>
<div class='SubmenuitemLabel'>Battlefield Event</div>
<div class='RightChain' style='background-image:url(layouts/tibiacom/images/general/chain.gif);'></div>
</div>
</a>
<a href='?subtopic=castle'>
<div id='submenu_castle' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
<div class='LeftChain' style='background-image:url(layouts/tibiacom/images/general/chain.gif);'></div>
<div id='ActiveSubmenuItemIcon_battlefield' class='ActiveSubmenuItemIcon' style='background-image:url(layouts/tibiacom/images/menu/icon-activesubmenu.gif);'></div>
<div class='SubmenuitemLabel'>Castle of Honor</div>
<div class='RightChain' style='background-image:url(layouts/tibiacom/images/general/chain.gif);'></div>
</div>
</a>
<a href='?subtopic=Firestorm Event'>
<div id='submenu_Firestorm Event' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
<div class='LeftChain' style='background-image:url(layouts/tibiacom/images/general/chain.gif);'></div>
<div id='ActiveSubmenuItemIcon_battlefield' class='ActiveSubmenuItemIcon' style='background-image:url(layouts/tibiacom/images/menu/icon-activesubmenu.gif);'></div>
<div class='SubmenuitemLabel'>Firestorm Event</div>
<div class='RightChain' style='background-image:url(layouts/tibiacom/images/general/chain.gif);'></div>
</div>
</a>
<a href='?subtopic=lottery'>
<div id='submenu_lottery' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
<div class='LeftChain' style='background-image:url(layouts/tibiacom/images/general/chain.gif);'></div>
<div id='ActiveSubmenuItemIcon_lottery' class='ActiveSubmenuItemIcon' style='background-image:url(layouts/tibiacom/images/menu/icon-activesubmenu.gif);'></div>
<div class='SubmenuitemLabel'>Loteria</div>
<div class='RightChain' style='background-image:url(layouts/tibiacom/images/general/chain.gif);'></div>
</div>
</a>
</div>
</div>
 
<div id='account' class='menuitem'>
<span onClick="MenuItemAction('account')">
  <div class='MenuButton' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/button-background.gif);'>
    <div onMouseOver='MouseOverMenuItem(this);' onMouseOut='MouseOutMenuItem(this);'><div class='Button' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/button-background-over.gif);'></div>
      <span id='account_Lights' class='Lights'>
        <div class='light_lu' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/green-light.gif);'></div>
        <div class='light_ld' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/green-light.gif);'></div>
        <div class='light_ru' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/green-light.gif);'></div>
      </span>
      <div id='account_Icon' class='Icon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-account.gif);'></div>
      <div id='account_Label' class='Label' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/label-account.png);'></div>
      <div id='account_Extend' class='Extend' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/plus.gif);'></div>
    </div>
  </div>
</span>
<div id='account_Submenu' class='Submenu'>
<a href='?subtopic=accountmanagement'>
  <div id='submenu_accountmanagement' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_accountmanagement' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Account Management</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
</a>
<a href='?subtopic=createaccount'>
  <div id='submenu_createaccount' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_createaccount' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Create Account</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
</a>
<a href='?subtopic=lostaccount'>
  <div id='submenu_lostaccount' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_lostaccount' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Lost Account?</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
</a>
<a href='?subtopic=tibiarules'>
  <div id='submenu_tibiarules' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_tibiarules' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Server Rules</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
</a>
<a href='?subtopic=bugtracker'>
  <div id='submenu_bugtracker' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_bugtracker' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Bug Tracker</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
</a>
<?PHP
if($config['site']['download_page'] == 1)
echo "<a href='?subtopic=downloads'>
  <div id='submenu_downloads' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_downloads' class='ActiveSubmenuItemIcon' style='background-image:url(".$layout_name."/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Downloads</div>
    <div class='RightChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
  </div>
</a>";
if($group_id_of_acc_logged >= $config['site']['access_admin_panel'])
echo "<a href='?subtopic=adminpanel'>
  <div id='submenu_adminpanel' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_adminpanel' class='ActiveSubmenuItemIcon' style='background-image:url(".$layout_name."/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'><font color=\"red\">! Admin Panel !</font></div>
    <div class='RightChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
  </div>
</a>";
if($group_id_of_acc_logged > 0)
echo "<a href='?subtopic=namelock'>
  <div id='submenu_namelock' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_namelock' class='ActiveSubmenuItemIcon' style='background-image:url(".$layout_name."/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'><font color=\"red\">! Namelocks !</font></div>
    <div class='RightChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
  </div>
</a>";
if($group_id_of_acc_logged >= $config['site']['access_admin_panel'])
echo "<a href='?subtopic=polls'>
  <div id='submenu_polls' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_polls' class='ActiveSubmenuItemIcon' style='background-image:url(".$layout_name."/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'><font color=\"red\">! Manage Polls !</font></div>
    <div class='RightChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
  </div>
</a>";
?>
</div>
</div>
 
<div id='community' class='menuitem'>
<span onClick="MenuItemAction('community')">
  <div class='MenuButton' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/button-background.gif);'>
    <div onMouseOver='MouseOverMenuItem(this);' onMouseOut='MouseOutMenuItem(this);'><div class='Button' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/button-background-over.gif);'></div>
      <span id='community_Lights' class='Lights'>
        <div class='light_lu' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/green-light.gif);'></div>
        <div class='light_ld' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/green-light.gif);'></div>
        <div class='light_ru' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/green-light.gif);'></div>
      </span>
      <div id='community_Icon' class='Icon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-community.gif);'></div>
      <div id='community_Label' class='Label' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/label-community.png);'></div>
      <div id='community_Extend' class='Extend' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/plus.gif);'></div>
 
    </div>
  </div>
</span>
<div id='community_Submenu' class='Submenu'>
<a href='?subtopic=characters'>
  <div id='submenu_characters' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_characters' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Characters</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
 
  </div>
</a>
<a href='?subtopic=whoisonline'>
  <div id='submenu_whoisonline' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_whoisonline' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Who Is Online?</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
</a>
<a href='?subtopic=highscores'>
  <div id='submenu_highscores' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_highscores' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Highscores</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
</a>
<a href='?subtopic=fragers'>
  <div id='submenu_fragers' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_fragers' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Top Fragers</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
</a>
<a href='?subtopic=killstatistics'>
  <div id='submenu_killstatistics' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_killstatistics' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Last Kills</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
</a>
<a href='?subtopic=bans'>
  <div id='submenu_bans' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_bans' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Banishments</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
</a>
<a href='?subtopic=guilds'>
  <div id='submenu_guilds' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
 
    <div id='ActiveSubmenuItemIcon_guilds' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Guilds</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
</a>
<a href='?subtopic=polls'>
  <div id='submenu_polls' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_polls' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Polls</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
</a>
<a href='?subtopic=team'>
  <div id='submenu_team' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_team' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Support List</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
</a>
</div>
</div>
 
<?PHP
echo "<div id='forum' class='menuitem'>
         <span onClick=\"MenuItemAction('forum')\">
<div class='MenuButton' style='background-image:url(".$layout_name."/images/menu/button-background.gif);'>
    <div onMouseOver='MouseOverMenuItem(this);' onMouseOut='MouseOutMenuItem(this);'><div class='Button' style='background-image:url(".$layout_name."/images/menu/button-background-over.gif);'></div>
               <span id='forum_Lights' class='Lights'>
                <div class='light_lu' style='background-image:url(".$layout_name."/images/menu/green-light.gif);'></div>
                <div class='light_ld' style='background-image:url(".$layout_name."/images/menu/green-light.gif);'></div>
                <div class='light_ru' style='background-image:url(".$layout_name."/images/menu/green-light.gif);'></div>
               </span>
               <div id='forum_Icon' class='Icon' style='background-image:url(".$layout_name."/images/menu/icon-forum.gif);'></div>
               <div id='forum_Label' class='Label' style='background-image:url(".$layout_name."/images/menu/label-forum.gif);'></div>
               <div id='forum_Extend' class='Extend' style='background-image:url(".$layout_name."/images/general/plus.gif);'></div>
             </div>
           </div>
          </span>
       <div id='forum_Submenu' class='Submenu'>
          <a href='?subtopic=forum'>
           <div id='submenu_forum' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
             <div class='LeftChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
             <div id='ActiveSubmenuItemIcon_forum' class='ActiveSubmenuItemIcon' style='background-image:url(".$layout_name."/images/menu/icon-activesubmenu.gif);'></div>
             <div class='SubmenuitemLabel'>Server Forum</div>
             <div class='RightChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
           </div>
          </a>
        </div>  
       </div>";
?>
 
<div id='library' class='menuitem'>
<span onClick="MenuItemAction('library')">
  <div class='MenuButton' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/button-background.gif);'>
    <div onMouseOver='MouseOverMenuItem(this);' onMouseOut='MouseOutMenuItem(this);'><div class='Button' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/button-background-over.gif);'></div>
      <span id='library_Lights' class='Lights'>
        <div class='light_lu' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/green-light.gif);'></div>
        <div class='light_ld' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/green-light.gif);'></div>
        <div class='light_ru' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/green-light.gif);'></div>
      </span>
      <div id='library_Icon' class='Icon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-library1.gif);'></div>
      <div id='library_Label' class='Label' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/label-library.png);'></div>
      <div id='library_Extend' class='Extend' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/plus.gif);'></div>
    </div>
  </div>
</span>
<div id='library_Submenu' class='Submenu'>
<a href='?subtopic=creatures'>
  <div id='submenu_creatures' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_creatures' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Creatures</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
</a>
<a href='?subtopic=spells'>
  <div id='submenu_spells' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_spells' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Spells</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
</a>
<?PHP
if($config['site']['gallery_page'] == 1) 
echo "<a href='?subtopic=gallery'>
  <div id='submenu_gallery' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_gallery' class='ActiveSubmenuItemIcon' style='background-image:url(".$layout_name."/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Gallery</div>
    <div class='RightChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
  </div>
</a>";
if($config['site']['serverinfo_page'] == 1)
echo "<a href='?subtopic=serverinfo'>
  <div id='submenu_serverinfo' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_serverinfo' class='ActiveSubmenuItemIcon' style='background-image:url(".$layout_name."/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Server Info</div>
    <div class='RightChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
  </div>
</a>";
?>
<a href='?subtopic=experiencetable'>
  <div id='submenu_experiencetable' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_experiencetable' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Experience Table</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
</a>
</div>
</div>
 
<?PHP
if($config['site']['shop_system'] == 1) {
echo "<div id='shops' class='menuitem'>
<span onClick=\"MenuItemAction('shops')\">
  <div class='MenuButton' style='background-image:url(".$layout_name."/images/menu/button-background.gif);'>
    <div onMouseOver='MouseOverMenuItem(this);' onMouseOut='MouseOutMenuItem(this);'><div class='Button' style='background-image:url(".$layout_name."/images/menu/button-background-over.gif);'></div>
      <span id='shops_Lights' class='Lights'>
        <div class='light_lu' style='background-image:url(".$layout_name."/images/menu/green-light.gif);'></div>
        <div class='light_ld' style='background-image:url(".$layout_name."/images/menu/green-light.gif);'></div>
        <div class='light_ru' style='background-image:url(".$layout_name."/images/menu/green-light.gif);'></div>
      </span>
      <div id='shops_Icon' class='Icon' style='background-image:url(".$layout_name."/images/menu/icon-shops1.gif);'></div>
      <div id='shops_Label' class='Label' style='background-image:url(".$layout_name."/images/menu/label-shops.gif);'></div>
      <div id='shops_Extend' class='Extend' style='background-image:url(".$layout_name."/images/general/plus.gif);'></div>
    </div>
  </div>
</span>
</div>
<div id='shops_Submenu' class='Submenu'> 
<a href='?subtopic=vantagens'>
  <div id='submenu_vantagens' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_vantagens' class='ActiveSubmenuItemIcon' style='background-image:url(".$layout_name."/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'><div style=\"color: yellow;\">Vantag&eacute;ns VIP</div></div>
    <div class='RightChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
  </div>
</a>
<a href='?subtopic=confirmacao'>
  <div id='submenu_confirmacao' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_confirmacao' class='ActiveSubmenuItemIcon' style='background-image:url(".$layout_name."/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'><div style=\"color: pink;\">Confirmar Doa&ccedil;&atilde;o</div></div>
    <div class='RightChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
  </div>
</a>
<a href='?subtopic=doacao'>
  <div id='submenu_doacao' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_doacao' class='ActiveSubmenuItemIcon' style='background-image:url(".$layout_name."/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'><blink style=\"color: red;\">Doa&ccedil;&atilde;o</blink></div>
    <div class='RightChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
  </div>
</a>
<a href='?subtopic=shopsystem'>
  <div id='submenu_shopsystem' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_shopsystem' class='ActiveSubmenuItemIcon' style='background-image:url(".$layout_name."/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'><div style=\"color: green;\">Shop do Server</div></div>
    <div class='RightChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
  </div>
</a>";
if($logged)
echo "<a href='?subtopic=shopsystem&action=show_history'>
  <div id='submenu_show_history' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_show_history' class='ActiveSubmenuItemIcon' style='background-image:url(".$layout_name."/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Trans. History</div>
    <div class='RightChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
  </div>
</a>";
if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) 
echo "<a href='?subtopic=shopadmin'>
  <div id='submenu_shopadmin' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_shopadmin' class='ActiveSubmenuItemIcon' style='background-image:url(".$layout_name."/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'><font color=red>! Shop Admin !</font></div>
    <div class='RightChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>
  </div>
</a>";
echo "</div>";
}
?>
<div id='MenuBottom' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/box-bottom.gif);'></div>
</div>
  <script type='text/javascript'>InitializePage();</script></div>
        <div id="ContentColumn">
          <div class="Content">
            <div id="ContentHelper"><script type="text/javascript" src="<?PHP echo $layout_name; ?>/newsticker.js"></script>
<?PHP echo $news_content; ?>
    <div id="<?PHP echo $subtopic; ?>" class="Box">
    <div class="Corner-tl" style="background-image:url(<?PHP echo $layout_name; ?>/images/content/corner-tl.gif);"></div>
    <div class="Corner-tr" style="background-image:url(<?PHP echo $layout_name; ?>/images/content/corner-tr.gif);"></div>
    <div class="Border_1" style="background-image:url(<?PHP echo $layout_name; ?>/images/content/border-1.gif);"></div>
    <div class="BorderTitleText" style="background-image:url(<?PHP echo $layout_name; ?>/images/content/title-background-green.gif);"></div>
    <img class="Title"  src="headline.php?text=<?php echo $topic ?>" alt="Contentbox headline" />
    <div class="Border_2">
      <div class="Border_3">
        <div class="BoxContent" style="background-image:url(<?PHP echo $layout_name; ?>/images/content/scroll.gif);">
<?PHP echo $main_content; ?> 
      </div>
      </div>
    </div>
    <div class="Border_1" style="background-image:url(<?PHP echo $layout_name; ?>/images/content/border-1.gif);"></div>
 
    <div class="CornerWrapper-b"><div class="Corner-bl" style="background-image:url(<?PHP echo $layout_name; ?>/images/content/corner-bl.gif);"></div></div>
    <div class="CornerWrapper-b"><div class="Corner-br" style="background-image:url(<?PHP echo $layout_name; ?>/images/content/corner-br.gif);"></div></div>
  </div>
           </div>
          </div>
          <div id="Footer">
<?PHP
$time_end = microtime_float();
$time = $time_end - $time_start;
?>
          Account Maker made by Gesior. Layout by CipSoft GmbH.<br/>Page has been viewed <?PHP echo $page_views; ?> times. Load time: <?PHP echo round($time, 4); ?> seconds
          </div>
        </div>
        <div id="ThemeboxesColumn">
          <div id="RightArtwork">
            <img src="images/monsters/Flamesteed.gif" alt="Monster of the Week" name="Monster" id="Monster" onClick="window.location = '?subtopic=creatures&amp;creature=Flamesteed';" />
            <img id="PedestalAndOnline" src="<?PHP echo $layout_name; ?>/images/header/pedestal-and-online.gif" alt="Monster Pedestal and Players Online Box"/>
 <?PHP
 if(count($config['site']['worlds']) > 1)
 $whoisonlineworld = '?subtopic=whoisonline'; 
 else
 $whoisonlineworld = '?subtopic=whoisonline&world=0';
 ?>
             <div id="PlayersOnline" onClick="window.location='<?PHP echo $whoisonlineworld; ?>'">
 
 <?PHP
if($config['status']['serverStatus_online'] == 1)
echo $config['status']['serverStatus_players'].'<br />Players Online';
else
echo '<font color="red"><b>Server<br />OFFLINE</b></font>';
 ?>
 </div>
        </div>
 
<div id="Themeboxes">
 
    <div class="Bottom" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/box-top.gif);">
    </div>
    <div class="BigButtonOver" style="background-image:url(layouts/tibiacom/images/buttons/sbutton_over.gif);">
    </div>    
<?php include($layout_name.'/widget_rank.php'); ?>
   </div>    
<?PHP
if($config['site']['screenoftheday'] == 1) 
echo '<div id="ScreenshotBox" class="Themebox" style="background-image:url('.$layout_name.'/images/themeboxes/screenshot/screenshotbox.gif);">
      <a href="?subtopic=gallery" >
        <img id="ScreenshotContent" class="ThemeboxContent" src="images/screenshotoftheday.gif" alt="Screenshot of the Day" /></a>
    <div class="Bottom" style="background-image:url('.$layout_name.'/images/general/box-bottom.gif);"></div>
    </div>';
?>
<?PHP
$time = time();
$viewpoll = $SQL->query('SELECT * FROM z_polls where end > '.$time.' ORDER BY id DESC LIMIT 1');
foreach($viewpoll as $p)
$polls .= '<center>'.$p['question'].'</center>';
    if(count($p['id']) > 0)
     echo '<div id="CurrentPollBox" class="Themebox" style="background-image:url('.$layout_name.'/images/themeboxes/current-poll/currentpollbox.gif);">
      <div id="CurrentPollText">'.$polls.'</div>
      <a class="ThemeboxButton" href="?subtopic=polls&id= '.$p['id'].'" onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif);"><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div>
        <div class="ButtonText" style="background-image:url('.$layout_name.'/images/buttons/_sbutton_votenow.gif);"></div>
      </a>
    <div class="Bottom" style="background-image:url('.$layout_name.'/images/general/box-bottom.gif);"></div>
    </div>';
?>
<?PHP
if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) 
echo '<div id="CurrentPollBox" class="Themebox" style="background-image:url('.$layout_name.'/images/themeboxes/admin/admin.gif);">
      <div id="CurrentPollText">
<b><a href="?subtopic=adminpanel"><b>Admin Panel</b></a><b><br>
<b><a href="?subtopic=namelock"><b>Namelocks</b></a><b><br>
<b><a href="?subtopic=polls"><b>Manage Polls</b></a><b><br>
<b><a href="?subtopic=shopadmin"><b>Shop Admin</b></a><b></div>
    <div class="Bottom" style="background-image:url('.$layout_name.'/images/general/box-bottom.gif);"></div>
    </div>';
?>
        </div>
      </div>
     </div>
    </div>
  </div>
</body>
</html>
 

 

CHARACTER.PHP

 <?PHP

$name = stripslashes(ucwords(strtolower(trim($_REQUEST['name']))));
if(empty($name)) {
$main_content .= 'Here you can get detailed information about a certain player on '.$config['server']['serverName'].'.<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>';
}
elseif(($name == 'Sorcerer Sample') or ($name == 'Druid Sample') or ($name == 'Knight Sample') or ($name == 'Paladin Sample') or ($name == 'Account Manager') or ($name == 'Account Manager')){
$main_content .= 'Here you can get detailed information about a certain player on '.$config['server']['serverName'].'.<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>';
}
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=10 HEIGHT=1 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=20%>Name:</TD><TD><font color="';
$main_content .= ($player->isOnline()) ? 'green' : 'red';
$main_content .= '"><b>'.$player->getName().'</b></font>';
if($player->isDeleted())
$main_content .= '<font color="red"> [DELETED]</font>';
if($player->isNameLocked())
$main_content .= '<font color="red"> [NAMELOCK]</font>';
$main_content .= '</TD></TR>';
if($player->getOldName())
{
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
if($player->isNameLocked())
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Proposition:</TD><TD>'.$player->getOldName().'</TD></TR>';
else
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Old name:</TD><TD>'.$player->getOldName().'</TD></TR>';
}
           // BEGIN Position Showing *** Fixed by jerryb1988 from otfans.net
            $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 = 'GOD';}
 
            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($config['site']['show_marriage_info'])
{
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>';
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>';
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>Balance:</TD><TD>'.$player->getBalance().' Gold Coins.</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++;
$lastlogin = $player->getLastLogin();
if(empty($lastlogin))
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Last login:</TD><TD>Never logged in.</TD></TR>';
else
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Last login:</TD><TD>'.date("j F Y, g:i a", $lastlogin).'</TD></TR>';
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
if($config['site']['show_creationdate'] && $player->getCreated())
{
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Created:</TD><TD>'.date("j F Y, g:i a", $player->getCreated()).'</TD></TR>';
}
            //Outfit shower by Pening edited by loleslav
            // ** ADDED GM/CM/GOD outfits by Jerryb1988 from otfans.net
            if($config['site']['show_outfit']) {
                $id = $player->getCustomField("id");
                if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                $main_content .= '<TD BGCOLOR="'.$bgcolor.'">outfit:';
                $listaddon = array('75','128','129','130','131','132','133','134','135','136','137','138','139','140','141','142','143','144','145','146','147','148','149','150','151','152','153','154','155','158','159','251','252','266','268','269','270','273','278','279','288','289','302','324','325');
                $lookadd = array('0','1','2','3');
                foreach ($listaddon as $pid => $name)
                    foreach ($lookadd as $addo => $name) {
                        $addon1 = $SQL->query('SELECT * FROM players WHERE id = '.$id.' AND looktype = '.$listaddon[$pid].' AND lookaddons = '.$lookadd[$addo].';')->fetch();
                        if($addon1[looktype] == true ) {
                            $finaddon = $addon1[looktype] + $addon1[lookaddons] * 300;
                            $main_content .= '<TD style="background-color: '.$bgcolor.'"><img src="images/addons/'.$finaddon.'.gif"/></center></TD></TD>';
                        }
                    }
            }
            //end   Outfit shower by Pening edited by loleslav
/*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>Vip Status:</TD><TD>';  
            $main_content .= ($account->getPlayerVip_Time()) ? '<b><font color="green">VIP</font></b>' : '<b><font color="red">NOT VIP</font></b>';  
            
 
            $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><NOBR><b>Guild</b></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++;
            $lastlogin = $player->getLastLogin();
            if(empty($lastlogin))
                $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD><NOBR><b>Ultimo Acesso</b></TD><TD><b>Nunca Logou.</b></TD></TR>';
            else
                $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD><NOBR><b>Ultimo Acesso:</b></TD><TD>'.date("j F Y, g:i a", $lastlogin).'</TD></TR>';
                if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
            if($config['site']['show_creationdate'] && $player->getCreated())
            {
                $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD><NOBR><b>Char Criado:</b></TD><TD>'.date("j F Y, g:i a", $player->getCreated()).'</TD></TR>';
            }
 
if($config['site']['show_signature']) {
 
}
//modified status scripts by ballack13
$main_content .= '<table width=100%><tr>';
//equipment shower by ballack13
$id = $player->getCustomField("id");
$number_of_items = 1;
$main_content .= '<td align=center><table with=100% style="darkborder: solid 1px #888888;" CELLSPACING="1"><TR>';
                        $list = array('2','1','3','6','4','5','9','7','10','8');
                        foreach ($list as $pid => $name) {
                        $top = $SQL->query('SELECT * FROM player_items WHERE player_id = '.$id.' AND pid = '.$list[$pid].';')->fetch();
                           if($top[itemtype] == false) {
                           if($list[$pid] == '8') {
$main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Soul:<br/>'.$player->getSoul().'</td>';
}
if(is_int($number_of_items / 3)){
$main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$list[$pid].'.gif"/></TD></tr><tr>';
} else {
$main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$list[$pid].'.gif"/></TD>';
}
$number_of_items++;
}
else
{
                           if($list[$pid] == '8') {
$main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Soul:<br/>'.$player->getSoul().'</td>';
}
if(is_int($number_of_items / 3))
$main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$top[itemtype].'.gif" width="45"/></TD></tr><tr>';
else
$main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$top[itemtype].'.gif" width="45"/></TD>';
$number_of_items++;
}
                           if($list[$pid] == '8') {
$main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Cap:<br/>'.$player->getCap().'</td>';
}
}
$main_content .= '</tr></TABLE></td>';
            //Hp/Mana/Exp Status by ballack13
$hp = ($player->getHealth() / $player->getHealthMax() * 100);
$main_content .= '<td align=center ><table width=100%><tr><td align=center><table CELLSPACING="1" CELLPADDING="4"><tr><td BGCOLOR="#D4C0A1" align="left" width="20%"><b>Player Health:</b></td>
<td BGCOLOR="#D4C0A1" align="left">'.$player->getHealth().'/'.$player->getHealthMax().'<div style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: red; width: '.$hp.'%; height: 3px;"></td></tr>';
if ($player->getManaMax() > 0) {
$mana = ($player->getMana() / $player->getManaMax() * 100);
$main_content .= '<tr><td BGCOLOR="#F1E0C6" align="left"><b>Player Mana:</b></td><td BGCOLOR="#F1E0C6" align="left">'.$player->getMana().'/'.$player->getManaMax().'<div style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: blue; width: '.$mana.'%; height: 3px;"></td>'; 
} else {
$main_content .= '<tr><td BGCOLOR="#F1E0C6" align="left"><b>Player Mana:</b></td><td BGCOLOR="#F1E0C6" align="left">0/0<div style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: blue; width: 100%; height: 3px;"></td>'; }
$main_content .= '</tr></table><tr>';
$next = ($player->getLevel() + 1);
$exp = ((50 / 3) * ($player->getLevel() * $player->getLevel() * $player->getLevel()) - (100 * ($player->getLevel() * $player->getLevel())) + ((850/3) * $player->getLevel()) - 200);
$expnext = ((50 / 3) * ($next * $next * $next) - (100 * ($next * $next)) + ((850/3) * $next) - 200 - $player->getExperience());
$expresult = ($expnext / (($expnext  + $player->getExperience()) - $exp) * 100);
$main_content .= '<tr><table CELLSPACING="1" CELLPADDING="4"><tr><td BGCOLOR="'.$config['site']['lightborder'].'" align=left" width="20%"><b>Player Level:</b></td><td BGCOLOR="'.$config['site]['lightborder'].'" align="left">'.$player->getLevel().'</td></tr>
<tr><td BGCOLOR="'.$config['site']['darkborder'].'" align=left"><b>Player Experience:</b></td><td BGCOLOR="'.$config['site]['darkborder'].'" align="left">'.$player->getExperience().' EXP.</td></tr>
<tr><td BGCOLOR="'.$config['site']['lightborder'].'" align=left"><b>To Next Level:</b></td><td BGCOLOR="'.$config['site]['lightborder'].'" align="left">You need <b>'.$exp.' EXP</b> to Level <b>'.$next.'</b>.<div title="99.320604545 %" style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: red; width: '.$expresult.'%; height: 3px;"></td></tr></table></td></tr></table></tr></TABLE></td>';
if($config['site']['show_skills_info']) {
//Skills Pics v2. Table borders optimized by Absolute Mango
$main_content .= '<br/><table cellspacing="0" cellpadding="0" border="0" width="200" align="center"><caption><strong>Skills</strong></caption><tbody><tr>
            <td align="center"><a href="?subtopic=highscores&list=experience"><img src="images/skills/level.png" style="border: none;"/></a></td>
            <td align="center"><a href="?subtopic=highscores&list=magic"><img src="images/skills/ml.png" style="border: none;"/></a></td>
            <td align="center"><a href="?subtopic=highscores&list=fist"><img src="images/skills/fist.png" style="border: none;"/></a></td>
            <td align="center"><a href="?subtopic=highscores&list=club"><img src="images/skills/club.png" style="border: none;"/></a></td>
            <td align="center"><a href="?subtopic=highscores&list=sword"><img src="images/skills/sword.png" style="border: none;"/></a></td>
            <td align="center"><a href="?subtopic=highscores&list=axe"><img src="images/skills/axe.png" style="border: none;"/></a></td>
            <td align="center"><a href="?subtopic=highscores&list=distance"><img src="images/skills/dist.png" style="border: none;"/></a></td>
            <td align="center"><a href="?subtopic=highscores&list=shield"><img src="images/skills/def.png" style="border: none;"/></a></td>
            <td align="center"><a href="?subtopic=highscores&list=fishing"><img src="images/skills/fish.png" style="border: none;"/></a></td>
</tr></tbody></table>
<table cellspacing="0" cellpadding="0" border="1" width="360" align="center"><tbody><tr><tr bgcolor="'.$config['site']['darkborder'].'">
            <td align="center" width="38"><strong>Level</strong></td>
            <td align="center" width="38"><strong>ML</strong></td>
            <td align="center" width="42"><strong>Fist</strong></td>
            <td align="center" width="40"><strong>Club</strong></td>
            <td align="center" width="38"><strong>Swrd</strong></td>
            <td align="center" width="38"><strong>Axe</strong></td>
            <td align="center" width="38"><strong>Dist</strong></td>
            <td align="center" width="38"><strong>Shield</strong></td>
            <td align="center" width="38"><strong>Fish</strong></td></font>
        </tr>
        <tr bgcolor="'.$config['site']['lightborder'].'">
            <td align="center" width="38">'.$player->getLevel().'</td>
            <td align="center" width="38">'.$player->getMagLevel().'</td>
            <td align="center" width="38">'.$player->getSkill(0).'</td>
            <td align="center" width="38">'.$player->getSkill(1).'</td>
            <td align="center" width="38">'.$player->getSkill(2).'</td>
            <td align="center" width="38">'.$player->getSkill(3).'</td>
            <td align="center" width="38">'.$player->getSkill(4).'</td>
            <td align="center" width="38">'.$player->getSkill(5).'</td>
            <td align="center" width="38">'.$player->getSkill(6).'</td>
        </tr></tbody></table><div table align="center">&nbsp;<br />&nbsp;</div>';
//skill script end
}
//quest status by ballack13
$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>';
                        $quests = $config['site']['quests'];
                        foreach ($quests as $storage => $name) {
if(is_int($number_of_quests / 2))
$bgcolor = $config['site']['darkborder'];
else
$bgcolor = $config['site']['lightborder'];
$number_of_quests++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=95%>'.$storage.'</TD>';
                        $quest = $SQL->query('SELECT * FROM player_storage WHERE player_id = '.$id.' AND `key` = '.$quests[$storage].';')->fetch();
                           if($quest == false) {
$main_content .= '<TD><img src="images/false.png"/></TD></TR>';
                        }
else
{
$main_content .= '<TD><img src="images/true.png"/></TD></TR>';
}
}
 
$main_content .= '</TABLE></td></tr></table><br />';
$deads = 0;
 
//deaths list
$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=\"20%\" align=\"center\">".date("j M Y, H:i", $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>Deaths</B></TD></TR>' . $dead_add_content . '</TABLE><br />';
 
//end
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='.$config['site']['lightborder'].'><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='.$config['site']['darkborder'].'><TD WIDTH=20%>Location:</TD><TD>'.$account->getLocation().'</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='.$config['site']['lightborder'].'><TD WIDTH=20%>Last login:</TD><TD>'.date("j F Y, g:i a", $account->getLastLogin()).'</TD></TR>';
else
$main_content .= '<TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Last login:</TD><TD>Never logged in.</TD></TR>';
if($account->getCreated())
{
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Created:</TD><TD>'.date("j F Y, g:i a", $account->getCreated()).'</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>Account Status:</TD><TD>';
$main_content .= ($account->isPremium()) ? '<b><font color="green">Premium Account</font></b>' : '<b><font color="red">Free Account</font></b>';
if($account->isBanned())
if($account->getBanTime() > 0)
$main_content .= '<font color="red"> [banished until '.date("j F Y, G:i", $account->getBanTime()).']</font>';
else
$main_content .= '<font color="red"> [banished FOREVER]</font>';
$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> </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 = '<font color="red">Offline</font>';
else
$player_list_status = '<font color="green">Online</font>';
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=52%><NOBR>'.$player_number.'. '.$player_list->getName();
$main_content .= ($player_list->isDeleted()) ? '<font color="red"> [DELETED]</font>' : '';
$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%"><b>'.$player_list_status.'</b></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>';
}
}

?>

 


ja resolvi decha.

Link para o post
Compartilhar em outros sites
  • 5 months later...
Em 05/07/2013 07:53:16, Helliab disse:

Compra e venda de personagens por pontos para Gesior ACC.
Vamos lá..

 

FOTOS:

 

Venda:

15622d1346255370-gesior-acc-buy-sell-cha

 

 

Compra:

15623d1346255762-gesior-acc-buy-sell-cha

 

15624d1346255807-gesior-acc-buy-sell-cha

 

 

Crie um arquivo dentro do htdocs, chamado buychar.php e dentro dele coloque:
 


<?PHP
    if($logged) {
        
        if ($action == '') {
        
        $main_content .= '<center>Here is the list of the current characters that are in the shop!</center>';
        $main_content .= '<BR>';
        $main_content .= '<TABLE BORDER=1 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD CLASS=white width="64px"><CENTER><B>Name</B></CENTER></TD><TD CLASS=white width="64px"><CENTER><B>Vocation</B></CENTER></TD><TD CLASS=white width="64px"><CENTER><B>Level</B></CENTER></TD><TD CLASS=white width="64px"><CENTER><B>Price</B></CENTER></TD><TD CLASS=white width="64px"><CENTER><B>Buy it</B></CENTER></TD></TR>';
        $getall = $SQL->query('SELECT `id`, `name`, `price`, `status` FROM `sellchar` ORDER BY `id`')or die(mysql_error());
        foreach ($getall as $tt) {
            $namer = $tt['name'];
            $queryt = $SQL->query("SELECT `name`, `vocation`, `level` FROM `players` WHERE `name` = '$namer'");
            foreach ($queryt as $ty) {
            if ($ty['vocation'] == 1) {
            $tu = 'Sorcerer';
        } else if ($ty['vocation'] == 2) {
            $tu = 'Druid';    
        } else if ($ty['vocation'] == 3) {
            $tu = 'Paladin';    
        } else if ($ty['vocation'] == 4) {
            $tu = 'Knight';
        } else if ($ty['vocation'] == 5) {
            $tu = 'Sorcerer';
        }  else if ($ty['vocation'] == 6) {
            $tu = 'Druid';    
        } else if ($ty['vocation'] == 7) {
            $tu = 'Paladin';    
        } else if ($ty['vocation'] == 8) {
            $tu = 'Knight';
        }
        $ee = $tt['name'];
        $ii = $tt['price'];
        $main_content .= '<TR BGCOLOR='.$config['site']['darkborder'].'><TD CLASS=black width="64px"><CENTER><B><a href="index.php?subtopic=characters&name='.$tt['name'].'">'.$tt['name'].'</a></B></CENTER></TD><TD CLASS=black width="64px"><CENTER><B>'.$tu.'</B></CENTER></TD><TD CLASS=black width="64px"><CENTER><B>'.$ty['level'].'</B></CENTER></TD><TD CLASS=black width="64px"><CENTER><B>'.$tt['price'].'</B></CENTER></TD><TD CLASS=black width="64px"><CENTER><B>
        <form action="?subtopic=buychar&action=buy" method="POST">
        <input type="hidden" name="char" value="'.$ee.'">
        <input type="hidden" name="price" value="'.$ii.'">
        <input type="submit" name="submit" value="Buy it"></B></CENTER></TD></TR></form>';
        }
        }
        $main_content .= '</TABLE>';
        
        }
        
        if ($action == 'buy') {
        
            $name = $_POST['char'];    
            $price = $_POST['price'];    
            $ceh = $SQL->query("SELECT `name` FROM `sellchar` WHERE `name` = '$name'");
            
            if ($ceh) {
            
            if ($name == '') {
            
            $main_content .= '<b><center>Select a character to buy first/b>';
            
            } else {
            
            $user_premium_points = $account_logged->getCustomField('premium_points');
            $user_id = $account_logged->getCustomField('id');
            
            if ($user_premium_points >= $price) {
                
            $check = $SQL->query("SELECT * FROM `sellchar` WHERE `name` = '$name'") or die(mysql_error());
            $check1 = $SQL->query("SELECT * FROM `players` WHERE `name` = '$name'") or die(mysql_error());
            $check2 = $SQL->query("SELECT `oldid` FROM `sellchar` WHERE `name` = '$name'");
            foreach ($check as $result) {
            foreach($check1 as $res) {
            foreach($check2 as $ress) {
            
            $oid = $ress['oldid'];    
            $main_content .= '<center>You bought<b> '.$name.' ( '.$res['level'].' ) </b>for  <b>'.$result['price'].' points.</b><br></center>';
            $main_content .= '<br>';
            $main_content .= '<center><b>The character is in your account, have fun!</b></center>';
            $execute1 = $SQL->query("UPDATE `accounts` SET `premium_points` = `premium_points` - '$price' WHERE `id` = '$user_id'");
            $execute2 = $SQL->query("UPDATE `players` SET `account_id` = '$user_id' WHERE `name` = '$name'");
            $execute2 = $SQL->query("UPDATE `accounts` SET `premium_points` = `premium_points` + '$price' WHERE `id` = '$oid'");
            $execute3 = $SQL->query("DELETE FROM `sellchar` WHERE `name` = '$name'");
            
            }
                }
            }
                
            } else {
                
                $main_content .= '<center><b>You dont have enought premium points</b></center>';
                
                    }
            
                }    
                
            } else {
                $main_content .= '<center><b>Character cannot be buyed</b></center>';
            }
        }
        
    } else {
        
        $main_content .= '<center>Please log in first!</center>';
    }
?>

 
depois crie um chamado sellchar.php e coloque isso:


<?PHP
    if($logged) {
        $main_content .= '<center><b>Here you can put your character on sale!</center></b><br>';
        $main_content .= 'If you put your character on sale anyone can buy it, you will lose acces to that character and you wont be able to log in with that character until someone buys it, you can also delete your offer by talking to an admin!<br><b>when someone buys your character you will get the price in points!</b>';
        $main_content .= '<br>';
        $main_content .= '<TABLE BORDER=1 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD CLASS=white width="64px"><CENTER><B>Sell your characters</B></CENTER></TD></TR>';
        $main_content .= '<TR BGCOLOR='.$config['site']['darkborder'].'><TD CLASS=black width="64px"><B></B>';
        
        $players_from_logged_acc = $account_logged->getPlayersList();
                            
                                $players_from_logged_acc->orderBy('name');
                                $main_content .= '<form action="" method="post"><select name="char">';
                                foreach($players_from_logged_acc as $player)
                                {
                                    $main_content .= '<option>'.$player->getName().'</option>';
                                }
        
        $main_content .= '</select>Select a character to sell<br>';
        $main_content .= '<input type="text" name="price" maxlength="10" size="4" >Select the price of the character<br>';
        $main_content .= '<input type="submit" name="submit" value="Sell character"></TD></TR>';
                            $main_content .= '</form></table>';
                            
                            if (isset($_POST['submit'])) {
                                
                            $char = stripslashes($_POST['char']);
                            $price = stripslashes($_POST['price']);
                            
                            if ($char && $price) {

                                if(is_numeric(trim($_POST['price']))) {
                                
                                        $check2 = $SQL->query("SELECT * FROM `players` WHERE `name` = '$char'") or die(mysql_error());
                                foreach ($check2 as $re) {
                                    $voc = $re['vocation'];
                                    $oid = $re['account_id'];
                                }
                                $check1 = $SQL->query("UPDATE `players` SET `account_id` = 1 WHERE `name` = '$char'") or die(mysql_error());
                                $check3 = $SQL->query("INSERT INTO `sellchar` VALUES ('','$char','$voc','$price','1','$oid')");
                                $main_content .= '<b><center>You added your character correctly, thanks!</b></center>';
                                header("Location: index.php?subtopic=buychar");
                                
                                } else {
                            
                                $main_content .= '<b><center>Set a numeric price!!</b></center>';
                                }
                                
                            } else {
                                    $main_content .= '<b><center>Fill out all fields!</b></center>';
                            }
                            
                        }
    } else {
        $main_content .= '<b><center>Please log in first!</b></center>';
    }
?>

 
depois disso vá em htdocs/layouts/layout que você usa/layouts e insira as duas páginas aonde você bem querer(sugiro que seja na aba shop, pois é venda e compra).. caso alguém não saiba posta aqui no tópico que eu ensino.
 
Agora adicione isso no index.php


case "sellchar";
                $topic = "Sell Char";
                $subtopic = "sellchar";
                include("sellchar.php");
    break;
    
    case "buychar";
                $topic = "Buy Char";
                $subtopic = "buychar";
                include("buychar.php");
    break;

 
Agora acesse a database do OT e insira este comando SQL


CREATE TABLE IF NOT EXISTS `sellchar` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(40) NOT NULL,
`vocation` int(11) NOT NULL,
`price` int(11) NOT NULL,
`status` varchar(40) NOT NULL,
`oldid` varchar(40) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Pronto para ser usado!!

 

 

 

 

obs1: Caso você não adicionou a página no layouts acesse assim:
 
127.0.0.1/?subtopic=sellchar
127.0.0.1/?subtopic=buychar

 

obs2: não tem como a pessoa que colocou a venda tirá-lo depois, se algum programador se habilitar a fazer o esquema aí para nós, fico grato.

 

 

 

 

--- Créditos ---

Raggaer

Helliab por trazer ao TK.

 

REP++ (y)

 

@helliabsantana

NÃO SEI COMO POR No Laytou tem como ajudar?

Link para o post
Compartilhar em outros sites
  • 1 month later...
Em 27/02/2016 at 05:51, mikael rasat disse:

depois disso vá em htdocs/layouts/layout que você usa/layouts e insira as duas páginas aonde você bem querer(sugiro que seja na aba shop, pois é venda e compra).. caso alguém não saiba posta aqui no tópico que eu ensino.
 

Me ensina como colocar na aba shop fazendo favor? obrigado! 

Link para o post
Compartilhar em outros sites
  • 2 weeks later...
  • 4 months later...
  • 4 weeks later...
  • 4 months later...

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.

  • Conteúdo Similar

    • Por chateadoagr
      Bem-vindo ao Genesis Online Tibia (GOT), um mundo onde a civilização foi devastada por um apocalipse zumbi. Inspirado em referências como The Walking Dead e Resident Evil, o GOT desafia você a sobreviver em meio ao caos, enfrentando hordas de mortos-vivos, explorando ruínas perigosas e formando alianças estratégicas. Embarque nesta jornada épica de sobrevivência e descoberta, onde cada escolha molda seu destino em um cenário hostil repleto de desafios e perigos iminentes.
       
       
      Adentre o universo de Genesis Online Tibia (GOT), um jogo repleto de sistemas inovadores e emocionantes. Equipe-se com um vasto arsenal de armas para enfrentar as ameaças do apocalipse zumbi, enquanto o sistema autoloot simplifica suas conquistas. Desenvolva seu personagem através de um sistema de upgrade único, aprimorando habilidades e atributos para enfrentar desafios cada vez mais formidáveis.
       
      Explore um mundo imersivo onde o som desempenha um papel crucial, criando uma atmosfera envolvente e realista. Vasculhe cada canto em busca de recursos vitais, desvendando segredos e tesouros ocultos. Siga uma cativante história através de missões que expandem o enredo, revelando os mistérios por trás do apocalipse e oferecendo recompensas valiosas.
       
      Em Genesis Online Tibia, a jornada pela sobrevivência é repleta de ação, estratégia e emoção, convidando você a se aventurar em um mundo onde cada decisão molda seu destino e determina sua capacidade de enfrentar os desafios que aguardam.

      Em breve imagens do servidor!
       
       
    • Por Lion
      O sistema de medalhas do TibiaKing foi reativado.
      As medalhas serão entregues automaticamente, muitos de vocês podem já ter recebido.
      Aproximadamente 12.000 contas do Tk já foram notificadas.
       
      Medalhas Raras
      2 novas medalhas raros criados (Guardião da Aurora, Poder Áureo) Quanto mais participar do fórum mais chances tem de desbloquear os medalhas raras.  
      https://tibiaking.com/medalhas/
       
      Show Off:
      tkmedalhas.mp4
       
      Créditos:
      BrooMop (BW) Medalhões-base doados ao Tibia King.
      Tibia (Cipsoft) Molduras-base e itens copiados do Tibia Wiki.
      @Cat Criação de novos medalhões e animações.
       
       
    • Por rafaelvozinho
      Vagas abertas [-]
      Foxers, é com grande felicidade que anunciamos o processo seletivo para recrutamento de um novo Developer e Mapper para a nossa equipe. 
       
      Nós da staff chegamos nessa decisão por sermos apaixonados pelo bom e velho fox world que foi lançado anos atrás no 8.4, por sermos apaixonados sempre tentamos abrir um servidor de fox world porém sempre faltou aquela pitada de inovação, foi então que tivemos a brilhante ideia. Converter o fox do 8.4 para o 12.31 e inserir novidades como: novas caves, itens, monstros e não menos importante quests com sistemas inovadores!

       
      No momento estamos a procura das vagas citadas acima para pessoas que estão afim de crescer com o servidor e evoluir com o mesmo, nós procuramos pessoas dedicadas, que tenha disponibilidade de horario, disponibilidade de contato e dispostas a se dedicarem com o trabalho em equipe. 
      A inscrição poderá ser enviada como mensagem privada ao meu perfil aqui no tibiaking @Faysal, as pessoas que se inscreveram irão passar por uma analise e serão selecionadas para uma entrevista. Aos interessados favor ler as características das vagas disponiveis.
       
      Características [-]
       
      Developer
       - Função: Programador Lua/C++
       - Descrição: Desenvolvimento em Lua, C++, as unicas exigências que pedimos é a entrega dentro do prazo.
       - Idade: Temos preferência por pessoas com mais de 18 anos
       - Experiência: Conhecimento em programação em Lua e C++, ter conhecimento avançado será um grande diferencial.
       - Confiança: Procuramos desenvolvedores responsáveis a fim de prestar um bom serviço na área de desenvolvimento de nossos sistemas, conhecimento, confiança e segurança é primordial!
       
       
      Mapper
       
       - Função: Mapper
       - Descrição: Elaboração de novas áreas e estilização das já existentes
       - Idade: Temos preferência por pessoas com mais de 16 anos
       - Experiência: Conhecimento mediano em mapping, ter conhecimento avançado será um grande diferencial.
       - Confiança: Procuramos mappers responsáveis a fim de prestar um bom serviço na área. Conhecimento e criatividade são essenciais!
       
      Inscrição [-]
       
      Aguardamos as inscrições via Private Messenger aqui no fórum com as seguintes Informações:
       
       
       - Nome Completo: 
       - Idade:
       - Vaga Escolhida:
       - Whatsapp para contato:
       - Experiência:
       - Conhecimentos Adicionais:

      Obs: No campo Experiência utilizar as seguntes categorias: Trainee (novato), Junior (mediano), Pleno (avançado), Sênior (Profissional)
       
      Aguardamos sua inscrição.

      Atenciosamente,
      Rafael  - ADM Rafael - 51 999465729 whatsapp 
    • Por Kimoszin
      Ola pessoal, venho trazer aqui pra vocês outro script simples,

      - Para que server?
      Simples, quando a pessoal quer sair, ela pisa encima do tile e perde o pz, aconselho botar no temple, ou em lugares no-pvp
      Ela serve tambem para aqueles players que querem sair mais nao gostam de esperar o pz, ai apertam o exit...

      - Como posso 'instalar' um script desse em meu OTserver?
      Adicionar o actionID 7003 no tile que você quiser pelo map editor e ir em data\movements\scripts e depois movements.xml

      tilepz.lua

      function onStepIn(cid, item, frompos, topos) pos = getCreaturePosition(cid) if getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then doRemoveCondition(cid, CONDITION_INFIGHT) doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Seu battle foi removido.") doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE) else doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você nao esta em battle.") doSendMagicEffect(pos, CONST_ME_POFF) end end movements.xml <movevent type="StepIn" actionid="7003" event="script" value="tilepz.lua"/>

      Abraços.
    • Por Mateus Robeerto
      este é um tutorial de como usar um cliente com spr/dat estendido e protegido pelo CAB.
       
      fiz um video mostrando como usar um client com spr/dat estendido sem o error, basta seguir passo a passo o que eu fiz, em resumo voce precisara copiar seu dat estendido pra outro local para poder editar ele, salvando ele como não estendido e dps renomeando para poder usar junto com o original e compilando tudo com o programa cab...
       
      A DLL ajuda o cliente a ler as 2 dat (compilada pelo programa cab) , sem ela o cliente não abre, caso o teu cliente tenha o bug do ctrl+n ou alguns outros bugs que eu vi em alguns casos, a DLL tem a função de arrumar a maioria deles.
       
       
       
       
       
      LINK DOWNLOAD
       
       
      https://www.mediafire.com/file/kxqkywxeijk8hn2/programa_para_oldclient.rar/file
      ou
      creator cab
      https://drive.google.com/file/d/19b-EqpS-RmOQ_1o7ubb2a7j6RKcijjUa/view?usp=sharing
      scan https://www.virustotal.com/gui/file/4398e414d680ac26addbedc1f20bd59a82b546a1633abbb02b13d2f7150e950e/detection
      DLL
      https://drive.google.com/file/d/1T8XgwgHJAO9sgw5WR809GjMfej2NvP3n/view?usp=sharing
      SCAN https://www.virustotal.com/gui/file/539f0f7187c668457a14d87603e075ab5d1b6f6ac6a17aabf2b591fc3c177741/detection
       stup-pe hoohar o client
      https://drive.google.com/file/d/1cwR1wj3M8IsvxmIt5pQhZ4-DlFSMQVal/view?usp=sharing
      scan https://www.virustotal.com/gui/file/d06889d61474ee9480947956e52916fb997a3717e9f59d3ed830b5c780e81340/detection
       
       
       
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo