Ir para conteúdo
  • Cadastre-se

Znote AAC [Ajuda] Aparecer valor de um storage no site


Posts Recomendados

Olá, eu possuo um sistema de reset por storage.

 

A storage do reset é: 378378

 

Eu gostaria que essa storage aparecesse no perfil de um player da seguinte forma:

 

(ilustrei um exemplo no paint)

 

Untitled.jpg

 

meu characterprofile.php

Citar

<?php require_once 'engine/init.php'; include 'layout/overall/header.php';
 
if ($config['log_ip']) 
{
    znote_visitor_insert_detailed_data(4);
}

if (isset($_GET['name']) === true && empty($_GET['name']) === false) 
{
    $name = getValue($_GET['name']);
    $user_id = user_character_exist($name);
    
    if ($user_id !== false) 
    {    
        if ($config['TFSVersion'] == 'TFS_10') 
        {
            $profile_data = user_character_data($user_id, 'account_id', 'name', 'level', 'vocation', 'health', 'healthmax', 'experience', 'mana', 'manamax', 'sex', 'lastlogin');
            $profile_data['online'] = user_is_online_10($user_id);
            
            if ($config['Ach']) 
            {
                $achievementPoints = mysql_select_single("SELECT SUM(`value`) AS `sum` FROM `player_storage` WHERE `key` LIKE '30___' AND `player_id`=(int)$user_id");
            }
            
        } 
        else 
        {
            $profile_data = user_character_data($user_id, 'name', 'account_id', 'level', 'vocation', 'health', 'healthmax', 'experience', 'mana', 'manamax', 'lastlogin', 'online', 'sex');
        }
        
        $profile_znote_data = user_znote_character_data($user_id, 'created', 'hide_char', 'comment');
        $account_data = user_znote_account_data($profile_data['account_id'], 'flag');
        
        $guild_exist = false;
        
        if (get_character_guild_rank($user_id) > 0) 
        {
            $guild_exist = true;
            $guild = get_player_guild_data($user_id);
            $guild_name = get_guild_name($guild['guild_id']);
        }
        
        ?>
        
        <!-- PROFILE MARKUP HERE-->
        
        <!-- Profile name -->
        <h1><font class="profile_font" name="profile_font_header">Perfil: <?php echo $profile_data['name']; ?></font></h1>
            <ul class="unstyled">

<?php
/*/
/   Player character profile EQ shower
/   Based on code from CorneX
/   Written to Znote AAC by Znote.
/   Should work on all TFS versions.
/   Znote AAC 1.4+
/*/

// Item image server
$imageServer = $config['shop']['imageServer'];
$imageType = $config['shop']['imageType'];
if (count($imageType) < 3) $imageType = 'gif';
// Fetch player equipped data
$PEQD = mysql_select_multi("SELECT `player_id`, `pid`, `itemtype`, `count` FROM `player_items` WHERE `player_id`='$user_id' AND `pid`<'11'");
// If player have equipped items
if ($PEQD !== false) {
    // PEQD = Player EQ Data
    $PEQ = array(
        1 => false,
        2 => false,
        3 => false,
        4 => false,
        5 => false,
        6 => false,
        7 => false,
        8 => false,
        9 => false,
        10 => false,
    );
    // Fill player equipments array with fetched data results (PEQD)
    foreach ($PEQD as $EQ) $PEQ[$EQ['pid']] = "http://{$imageServer}/".$EQ['itemtype'].".{$imageType}";
    ?>
    <!-- Fix item positions CSS -->
    <style type="text/css">
    /* CSS by CorneX */
    .signBgrnd {
        background-image:url('eq/outfit.png');
        background-repeat:no-repeat;
        position:relative;
        float: right;
        margin:10px;
        padding:10px;
        height:153px;
        width:118px;
    }
    /* Weapon */
    .signBgrnd .wep {
        position: absolute;
        top: 56px;
        left: 6px;
        width: 32px;
        height: 32px;
    }
    .signBgrnd .wep img {
        background-image:url('eq/bg.png');
        max-width: 100%;
    }
    /* Armor */
    .signBgrnd .arm {
        position: absolute;
        top: 41px;
        left: 43px;
        width: 32px;
        height: 32px;
    }
    .signBgrnd .arm img {
        background-image:url('eq/bg.png');
        max-width: 100%;
    }
    /* Helmet */
    .signBgrnd .helm {
        position: absolute;
        top: 5px;
        left: 43px;
        width: 32px;
        height: 32px;
    }
    .signBgrnd .helm img {
        background-image:url('eq/bg.png');
        max-width: 100%;
    }
    /* legs */
    .signBgrnd .legs {
        position: absolute;
        top: 79px;
        left: 43px;
        width: 32px;
        height: 32px;
    }
    .signBgrnd .legs img {
        background-image:url('eq/bg.png');
        max-width: 100%;
    }
    /* boots */
    .signBgrnd .boots {
        position: absolute;
        top: 116px;
        left: 43px;
        width: 32px;
        height: 32px;
    }
    .signBgrnd .boots img {
        background-image:url('eq/bg.png');
        max-width: 100%;
    }
    /* ring */
    .signBgrnd .ring {
        position: absolute;
        top: 93px;
        left: 6px;
        width: 32px;
        height: 32px;
    }
    .signBgrnd .ring img {
        background-image:url('eq/bg.png');
        max-width: 100%;
    }
    /* amulet */
    .signBgrnd .amulet {
        position: absolute;
        top: 20px;
        left: 7px;
        width: 32px;
        height: 32px;
    }
    .signBgrnd .amulet img {
        background-image:url('eq/bg.png');
        max-width: 100%;
    }
    /* backpack */
    .signBgrnd .backpack {
        position: absolute;
        top: 20px;
        left: 80px;
        width: 32px;
        height: 32px;
    }
    .signBgrnd .backpack img {
        background-image:url('eq/bg.png');
        max-width: 100%;
    }
    /* shield */
    .signBgrnd .shield {
        position: absolute;
        top: 56px;
        left: 80px;
        width: 32px;
        height: 32px;
    }
    .signBgrnd .shield img {
        background-image:url('eq/bg.png');
        max-width: 100%;
    }
    /* arrow */
    .signBgrnd .arrow {
       position: absolute;
       top: 93px;
       left: 80px;
       width: 32px;
       height: 32px;
    }
    .signBgrnd .arrow img {
        background-image:url('eq/bg.png');
        max-width: 100%;
    }
    </style>
    <!-- Render HTML -->
    <div class="signBgrnd">
        <div class="helm">
            <?php
            if ($PEQ[1] != false) {
                ?>
                <img src="<?php echo $PEQ[1]; ?>" alt="Image of player helmet">
                <?php
            }
            ?>
        </div>
        <div class="amulet">
            <?php
            if ($PEQ[2] != false) {
                ?>
                <img src="<?php echo $PEQ[2]; ?>" alt="Image of player amulet">
                <?php
            }
            ?>
        </div>
        <div class="wep">
            <?php
            if ($PEQ[6] != false) {
                ?>
                <img src="<?php echo $PEQ[6]; ?>" alt="Image of player left hand">
                <?php
            }
            ?>
        </div>
        <div class="ring">
            <?php
            if ($PEQ[9] != false) {
                ?>
                <img src="<?php echo $PEQ[9]; ?>" alt="Image of player ring">
                <?php
            }
            ?>
        </div>
        <div class="arm">
            <?php
            if ($PEQ[4] != false) {
                ?>
                <img src="<?php echo $PEQ[4]; ?>" alt="Image of player armor">
                <?php
            }
            ?>
        </div>
        <div class="legs">
            <?php
            if ($PEQ[7] != false) {
                ?>
                <img src="<?php echo $PEQ[7]; ?>" alt="Image of player legs">
                <?php
            }
            ?>
        </div>
        <div class="boots">
            <?php
            if ($PEQ[8] != false) {
                ?>
                <img src="<?php echo $PEQ[8]; ?>" alt="Image of player boots">
                <?php
            }
            ?>
        </div>
        <div class="backpack">
            <?php
            if ($PEQ[3] != false) {
                ?>
                <img src="<?php echo $PEQ[3]; ?>" alt="Image of player backpack">
                <?php
            }
            ?>
        </div>
        <div class="shield">
            <?php
            if ($PEQ[5] != false) {
                ?>
                <img src="<?php echo $PEQ[5]; ?>" alt="Image of player shield">
                <?php
            }
            ?>
        </div>
        <div class="arrow">
            <?php
            if ($PEQ[10] != false) {
                ?>
                <img src="<?php echo $PEQ[10]; ?>" alt="Image of player arrow">
                <?php
            }
            ?>
        </div>
    </div>
    <?php
}
?>    <!-- END EQ SHOWER -->

<?php

/*/
/   Znote AAC 1.4+ detailed character info (HP, MP, lvL, Exp, skills)
/   HTML code based on code from Gesior
/*/
$tableWidth = 540;
if ($config['TFSVersion'] != 'TFS_10') {
    $playerData = mysql_select_multi("SELECT `value` FROM `player_skills` WHERE `player_id`='$user_id' LIMIT 7;");
    $playerData['fist'] = $playerData[0]['value']; unset($playerData[0]);
    $playerData['club'] = $playerData[1]['value']; unset($playerData[1]);
    $playerData['sword'] = $playerData[2]['value']; unset($playerData[2]);
    $playerData['axe'] = $playerData[3]['value']; unset($playerData[3]);
    $playerData['dist'] = $playerData[4]['value']; unset($playerData[4]);
    $playerData['shield'] = $playerData[5]['value']; unset($playerData[5]);
    $playerData['fish'] = $playerData[6]['value']; unset($playerData[6]);

    $player = mysql_select_single("SELECT `health`, `healthmax`, `mana`, `manamax`, `experience`, `maglevel`, `level` FROM `players` WHERE `id`='$user_id' LIMIT 1;");
    $playerData['magic'] = $player['maglevel'];
    $playerData['exp'] = array(
        'now' => $player['experience'],
        'next' => (int)(level_to_experience($player['level']+1) - $player['experience']),
        'percent' => (int)(($player['experience'] - level_to_experience($player['level'])) / (level_to_experience($player['level']+1) - $player['experience']) * 100)
    );
    $playerData['health'] = array(
        'now' => $player['health'],
        'max' => $player['healthmax'],
        'percent' => (int)($player['health'] / $player['healthmax'] * 100),
    );
    $playerData['mana'] = array(
        'now' => $player['mana'],
        'max' => $player['manamax'],
        'percent' => (int)($player['mana'] / $player['manamax'] * 100),
    );
} else {
    $player = mysql_select_single("SELECT `health`, `healthmax`, `mana`, `manamax`, `experience`, `skill_fist`, `skill_club`, `skill_sword`, `skill_axe`, `skill_dist`, `skill_shielding`, `skill_fishing`, `maglevel`, `level` FROM `players` WHERE `id`='$user_id' LIMIT 1;");
    $playerData = array(
        'fist' => $player['skill_fist'],
        'club' => $player['skill_club'],
        'sword' => $player['skill_sword'],
        'axe' => $player['skill_axe'],
        'dist' => $player['skill_dist'],
        'shield' => $player['skill_shielding'],
        'fish' => $player['skill_fishing'],
        'magic' => $player['maglevel'],
        'exp' => array(
            'now' => $player['experience'],
            'next' => (int)(level_to_experience($player['level']+1) - $player['experience']),
            'percent' => (int)(($player['experience'] - level_to_experience($player['level'])) / (level_to_experience($player['level']+1) - $player['experience']) * 100)
        ),
        'health' => array(
            'now' => $player['health'],
            'max' => $player['healthmax'],
            'percent' => (int)($player['health'] / $player['healthmax'] * 100),
        ),
        'mana' => array(
            'now' => $player['mana'],
            'max' => $player['manamax'],
            'percent' => (int)($player['mana'] / $player['manamax'] * 100),
        )
    );
}
// Incase they have more health/mana than they should due to equipment bonus etc
if ($playerData['exp']['percent'] > 100) $playerData['exp']['percent'] = 100;
if ($playerData['health']['percent'] > 100) $playerData['health']['percent'] = 100;
if ($playerData['mana']['percent'] > 100) $playerData['mana']['percent'] = 100;
//data_dump($playerData, false, "Player Data");
?>
<!-- PLAYER SKILLS TABLE -->
<table cellspacing="1" cellpadding="4" style="width: <?php echo $tableWidth; ?>px;">
    <tr class="yellow">
        <th>Fist</th>
        <th>Club</th>
        <th>Sword</th>
        <th>Axe</th>
        <th>Dist</th>
        <th>Shield</th>
        <th>Fish</th>
        <th>Magic</th>
    </tr>
    <tr>
        <td bgcolor="#D4C0A1" align="left">
            <?php echo $playerData['fist']; ?>
        </td>
        <td bgcolor="#D4C0A1" align="left">
            <?php echo $playerData['club']; ?>
        </td>
        <td bgcolor="#D4C0A1" align="left">
            <?php echo $playerData['sword']; ?>
        </td>
        <td bgcolor="#D4C0A1" align="left">
            <?php echo $playerData['axe']; ?>
        </td>
        <td bgcolor="#D4C0A1" align="left">
            <?php echo $playerData['dist']; ?>
        </td>
        <td bgcolor="#D4C0A1" align="left">
            <?php echo $playerData['shield']; ?>
        </td>
        <td bgcolor="#D4C0A1" align="left">
            <?php echo $playerData['fish']; ?>
        </td>
        <td bgcolor="#D4C0A1" align="left">
            <?php echo $playerData['magic']; ?>
        </td>
    </tr>
</table>
<!-- PLAYER INFO TABLE -->
<table cellspacing="1" cellpadding="4" style="width: <?php echo $tableWidth; ?>px;">
    <tr>
        <td bgcolor="#F1E0C6" align="left" width="20%">
            <b>Player HP:</b>
        </td>
        <td bgcolor="#F1E0C6" align="left">
            <?php echo $playerData['health']['now'].'/'.$playerData['health']['max']; ?>
            <div style="width: 100%; height: 3px; border: 1px solid #000;">
                <div style="background: red; width: <?php echo $playerData['health']['percent']; ?>%; height: 3px;">
                </div>
            </div>
        </td>
    </tr>
    <tr>
        <td bgcolor="#D4C0A1" align="left">
            <b>Player MP:</b>
        </td>
        <td bgcolor="#D4C0A1" align="left">
            <?php echo $playerData['mana']['now'].'/'.$playerData['mana']['max']; ?>
            <div style="width: 100%; height: 3px; border: 1px solid #000;">
                <div style="background: blue; width: <?php echo $playerData['mana']['percent']; ?>%; height: 3px;">
                </div>
            </div>
        </td>
    </tr>
    <tr>
        <td bgcolor="#D4C0A1" align="left">
            <b>Player XP:</b>
        </td>
        <td bgcolor="#D4C0A1" align="left">
            <?php echo number_format($playerData['exp']['now'], 0, "", " "); ?> Experience.
        </td>
    </tr>
    <tr>
        <td bgcolor="#F1E0C6" align="left">
            <b>To Next Lvl:</b>
        </td>
        <td bgcolor="#F1E0C6" align="left">
            Need <b><?php echo number_format($playerData['exp']['next'], 0, "", " "); ?> experience (<?php echo 100-$playerData['exp']['percent']; ?>%)</b> to Level <b><?php echo $player['level']+1; ?></b>.
            <div title="99.320604545 %" style="width: 100%; height: 3px; border: 1px solid #000;">
                <div style="background: red; width: <?php echo $playerData['exp']['percent']; ?>%; height: 3px;"></div>
            </div>
        </td>
    </tr>
</table>
<!-- END detailed character info -->

                <?php 
                if ($config['country_flags'])
                { ?>
                    <!-- Player country data -->
                    <li><font class="profile_font" name="profile_font_country">Country: <?php echo '<img src="\flags\\' . $account_data['flag'] . '.png">'; ?></font></li><?php
                } ?>

                <!-- Player male / female -->
                
                
                <li>
                

                    <font class="profile_font" name="profile_font_level">Sexo: 
                        <?php 
                        if ($profile_data['sex'] == 1) 
                        {
                            echo 'Masculino';
                        } 
                        else 
                        {
                            echo 'Feminino';
                        }
                        ?>
                    </font>
                </li>
                
                <!-- Player level -->
                <li>
                    <font class="profile_font" name="profile_font_level">Level: 
                        <?php 
                        echo $profile_data['level']; 
                        ?>
                    </font>
                </li>
                
                <!-- Player vocation -->
                <li><font class="profile_font" name="profile_font_vocation">Classe: <?php echo vocation_id_to_name($profile_data['vocation']); ?></font></li>
                
                <!-- Player guild -->
                <?php 
                if ($guild_exist) 
                {
                ?>
                <li>
                    <font class="profile_font" name="profile_font_vocation">
                        <b><?php echo $guild['rank_name']; ?> </b> of <a href="guilds.php?name=<?php echo $guild_name; ?>"><?php echo $guild_name; ?></a>
                    </font>
                </li>
                <?php
                }
                ?>
                <!-- Player last login -->
                <li>
                    <font class="profile_font" name="profile_font_lastlogin">Last Login: 
                    <?php
                    if ($profile_data['lastlogin'] != 0) 
                    {
                        echo getClock($profile_data['lastlogin'], true, true);
                    } 
                    else 
                    {
                        echo 'Never.';
                    }
                    ?>
                    </font>
                </li>
                
                <!-- Achievement start -->
                <?php 
                if ($config['Ach']) 
                { 
                    foreach ($achievementPoints as $achievement) 
                    {
                        //if player doesn't have any achievement points it won't echo the line below.
                        if ($achievement > 0)
                        {
                            echo '<li>Achievement Points: ' . $achievement . '</li>'; 
                        }
                    }
                }
                ?>
                <!-- Achievement end -->
                
                <!-- Display house start -->
                <?php
                if ($config['TFSVersion'] !== 'TFS_02') 
                {
                    $townid = ($config['TFSVersion'] === 'TFS_03') ? 'town' : 'town_id';
                    $houses = mysql_select_multi("SELECT `id`, `owner`, `name`, `$townid` AS `town_id` FROM `houses` WHERE `owner` = $user_id;");
                    
                    if ($houses) 
                    {
                        $playerlist = array();
                        foreach ($houses as $h) 
                        {
                            if ($h['owner'] > 0)
                            {
                                $playerlist[] = $h['owner'];
                            }
                                
                            if ($profile_data['id'] = $h['owner']) 
                            {
                            ?>
                                <li>House: <?php echo $h['name']; ?>, <?php 
                                    foreach ($config['towns'] as $key => $value) 
                                    {
                                        if ($key == $h['town_id']) 
                                        {
                                            echo $value;
                                        }
                                    }
                             ?>
                                </li>
                            <?php
                            }
                        }
                    }
                }
                ?>
                <!-- Display house end -->
                
                <!-- Display player status -->
                <li><font class="profile_font" name="profile_font_status">Status:</font> <?php
                if ($config['TFSVersion'] == 'TFS_10') 
                {
                    if ($profile_data['online']) 
                    {
                        echo '<font class="profile_font" name="profile_font_online" color="green"><b>ONLINE</b></font>';
                    } 
                    else 
                    {
                        echo '<font class="profile_font" name="profile_font_online" color="red"><b>OFFLINE</b></font>';
                    }
                } 
                else 
                {
                    if ($profile_data['online']) 
                    {
                        echo '<font class="profile_font" name="profile_font_online" color="green"><b>ONLINE</b></font>';
                    } 
                    else 
                    {
                        echo '<font class="profile_font" name="profile_font_online" color="red"><b>OFFLINE</b></font>';
                    }
                }
                ?>
                </li>
                <!-- Display player status end -->
                
                <!-- Player created -->
                <li><font class="profile_font" name="profile_font_created">Created: <?php echo getClock($profile_znote_data['created'], true); ?></font></li>
                
                <!-- Player Comment -->
                <?php
                //if player doesnt have set a comment dont show it.
                if (!empty($profile_znote_data['comment']))
                { ?>
                    <li>
                        <font class="profile_font" name="profile_font_comment">Comment:</font><br>
                        <textarea name="profile_comment_textarea" cols="70" rows="10" readonly="readonly" class="span12"><?php echo $profile_znote_data['comment']; ?></textarea>
                    </li>
                <?php
                }
                ?>
                
                <!-- Achievements start -->
                <?php if ($config['Ach']) 
                { ?>            
                    <h3 class="header-ok">Achievements</h3>
                    <div id="accordion">
                        <h3>Show/hide player achievements</h3>
                        <div>
                            <table class="table table-striped table-bordered">
                                <tbody>
                                    <style>
                                        #secondD {
                                            margin-left:0px;
                                        }
                                    </style>
                                    <?php
                                    foreach ($config['achievements'] as $key => $achiv) 
                                    {
                                        $uery = mysql_select_single("SELECT `player_id`, `value`, `key` FROM `player_storage` WHERE `player_id`='$user_id' AND `key`='$key' LIMIT 1;");
                                        if (!empty($uery) || $uery !== false) 
                                        {
                                            foreach ($uery as $luery) 
                                            {
                                                if ($luery == $key) 
                                                {
                                                    if (!array_key_exists($key, $achiv)) 
                                                    {
                                                        echo '<tr><td width="17%">' .$achiv[0]. '</td><td>' .$achiv[1]. '</td>';
                                                        
                                                        if (!isset($achiv['secret'])) 
                                                        {
                                                            echo '<td><img id="secondD" src="http://img04.imgland.net/PuMz0mVqSG.gif"></td>';
                                                        }
                                                        
                                                        echo '<td>'. $achiv['points'] .'</td>';
                                                        echo '<tr>';
                                                    }
                                                }
                                            }
                                        }
                                    }
                                    ?>
                                </tbody>
                            </table>
                        </div>
                    </div><br>
                <?php
                } 
                ?>
                <!-- Achievements end -->
                
                <!-- DEATH LIST -->
                <li>
                    <b>Death List:</b><br>
                    <?php
                    if ($config['TFSVersion'] == 'TFS_02') 
                    {
                        $array = user_fetch_deathlist($user_id);
                        if ($array) 
                        {
                        ?>
                            <ul>
                            <?php
                            // Design and present the list
                            foreach ($array as $value) 
                            { ?>
                                <li>
                                <?php
                                $value['time'] = getClock($value['time'], true);
                                
                                if ($value['is_player'] == 1) 
                                {
                                    $value['killed_by'] = 'player: <a href="characterprofile.php?name='. $value['killed_by'] .'">'. $value['killed_by'] .'</a>';
                                } 
                                else 
                                {
                                    $value['killed_by'] = 'monster: '. $value['killed_by'] .'.';
                                }
                                
                                echo '['. $value['time'] .'] Killed at level '. $value['level'] .' by '. $value['killed_by']; ?>
                                </li>
                            <?php
                            }
                            ?>
                            </ul>
                            <?php
                        } 
                        else 
                        {
                            echo '<b><font color="green">Esse jogador nunca morreu.</font></b>';
                        }
                    } 
                    else if ($config['TFSVersion'] == 'TFS_10') 
                    {
                        $deaths = mysql_select_multi("SELECT 
                            `player_id`, `time`, `level`, `killed_by`, `is_player`, 
                            `mostdamage_by`, `mostdamage_is_player`, `unjustified`, `mostdamage_unjustified` 
                            FROM `player_deaths` 
                            WHERE `player_id`=$user_id ORDER BY `time` DESC LIMIT 10;");

                        if ($deaths)
                        { 
                            foreach ($deaths as $d) 
                            {
                                ?>
                                <li>
                                    <?php echo "<b>".getClock($d['time'], true, true)."</b>";
                                    $lasthit = ($d['is_player']) ? "<a href='characterprofile.php?name=".$d['killed_by']."'>".$d['killed_by']."</a>" : $d['killed_by'];
                                    echo ": Killed at level ".$d['level']." by $lasthit";
                                    if ($d['unjustified']) 
                                    {echo " <font color='red' style='font-style: italic;'>(unjustified)</font>";}
                                
                                    $mostdmg = ($d['mostdamage_by'] !== $d['killed_by']) ? true : false;
                                    
                                    if ($mostdmg) 
                                    {
                                        $mostdmg = ($d['mostdamage_is_player']) ? "<a href='characterprofile.php?name=".$d['mostdamage_by']."'>".$d['mostdamage_by']."</a>" : $d['mostdamage_by'];
                                        echo "<br>and by $mostdmg.";
                                        
                                        if ($d['mostdamage_unjustified']) 
                                        { echo " <font color='red' style='font-style: italic;'>(unjustified)</font>"; }
                                    } 
                                    else 
                                    { echo " <b>(soloed)</b>"; }
                                    ?>
                                </li>
                                <?php
                            }
                        }
                        else 
                        {
                            echo '<b><font color="green">Esse jogador nunca morreu.</font></b>'; 
                        }
                    } 
                    else if ($config['TFSVersion'] == 'TFS_03') 
                    {
                        //mysql_select_single("SELECT * FROM players WHERE name='TEST DEBUG';");
                        $array = user_fetch_deathlist03($user_id);
                        
                        if ($array) 
                        {?>
                            <ul>
                                <?php
                                // Design and present the list
                                foreach ($array as $value) 
                                { ?>
                                    <li>
                                    <?php
                                    $value[3] = user_get_killer_id(user_get_kid($value['id']));
                                    
                                    if ($value[3] !== false && $value[3] >= 1) 
                                    {
                                        $namedata = user_character_data((int)$value[3], 'name');
                                        
                                        if ($namedata !== false) 
                                        {
                                            $value[3] = $namedata['name'];
                                            $value[3] = 'player: <a href="characterprofile.php?name='. $value[3] .'">'. $value[3] .'</a>';
                                        } 
                                        else 
                                        {
                                            $value[3] = 'deleted player.';
                                        }
                                    } 
                                    else 
                                    {
                                        $value[3] = user_get_killer_m_name(user_get_kid($value['id']));
                                        
                                        if ($value[3] === false) 
                                        { $value[3] = 'deleted player.'; }
                                    }
                                    
                                    echo '['. getClock($value['date'], true) .'] Killed at level '. $value['level'] .' by '. $value[3];
                                    echo '</li>';
                                }
                                ?>
                            </ul>
                            <?php
                        } 
                        else { echo '<b><font color="green">Este jogador nunca morreu.</font></b>'; }
                    }
                    ?>
                </li>
                <!-- END DEATH LIST -->
                
                <!-- QUEST PROGRESSION -->
                <?php
                $totalquests = 0;
                $completedquests = 0;
                $firstrun = 1;
                
                if ($config['EnableQuests'] == true) 
                {
                    $sqlquests =  mysql_select_multi("SELECT `player_id`, `key`, `value` FROM player_storage WHERE `player_id` = $user_id");
                    foreach ($config['quests'] as $cquest) 
                    {
                        $totalquests = $totalquests + 1;
                        foreach ($sqlquests as $dbquest) 
                        {
                            if ($cquest[0] == $dbquest['key'] && $cquest[1] == $dbquest['value']) 
                            {
                                $completedquests = $completedquests + 1;
                            }
                        }
                        if ($cquest[3] == 1) 
                        {
                            if ($completedquests != 0) 
                            {
                                if ($firstrun == 1) 
                                {
                                ?>
                                    <li>
                                        <b> Quest progression </b>
                                        <table id="characterprofileQuest" class="table table-striped table-hover">
                                            <tr class="yellow">
                                                <th>Quest:</th>
                                                <th>progression:</th>
                                            </tr>
                                <?php
                                $firstrun = 0;
                                }
                                $completed = $completedquests / $totalquests * 100;
                                ?>
                                <tr>
                                    <td><?php echo $cquest[2]; ?></td>
                                    <td id="progress">
                                        <span id="percent"><?php echo round($completed); ?>%</span>
                                        <div id="bar" style="width: '.$completed.'%"></div>
                                    </td>
                                </tr>
                                <?php
                            }
                            
                            $completedquests = 0;
                            $totalquests = 0;
                            
                        }
                    }
                }
                
                if ($firstrun == 0) 
                { ?>
                    </table></li>
                <?php
                }
                ?>
                <!-- END QUEST PROGRESSION -->
                
                <!-- CHARACTER LIST -->
                <?php
                if (user_character_hide($profile_data['name']) != 1 && user_character_list_count(user_character_account_id($name)) > 1) 
                {
                ?>
                    <li>
                        <b>Outros personagens visiveis desta conta:</b><br>
                        <?php
                        $characters = user_character_list(user_character_account_id($profile_data['name']));
                        // characters: [0] = name, [1] = level, [2] = vocation, [3] = town_id, [4] = lastlogin, [5] = online
                        if ($characters && count($characters) > 0) 
                        {
                            ?>
                            <table id="characterprofileTable" class="table table-striped table-hover">
                                <tr class="yellow">
                                    <th>Nome:</th>
                                    <th>Level:</th>
                                    <th>Classe:</th>
                                    <th>Ultimo Login:</th>
                                    <th>Status:</th>
                                </tr>
                                
                                <?php
                                // Design and present the list
                                foreach ($characters as $char) 
                                {
                                    if ($char['name'] != $profile_data['name']) 
                                    {
                                        if (hide_char_to_name(user_character_hide($char['name'])) != 'hidden') 
                                        { ?>
                                            <tr>
                                                <td><a href="characterprofile.php?name=<?php echo $char['name']; ?>"><?php echo $char['name']; ?></a></td>
                                                <td><?php echo (int)$char['level']; ?></td>
                                                <td><?php echo $char['vocation']; ?></td>
                                                <td><?php echo $char['lastlogin']; ?></td>
                                                <td><?php echo $char['online']; ?></td>
                                            </tr>
                                        <?php
                                        }
                                    }
                                }
                            ?>
                            </table>
                            <?php
                        } 
                        else 
                        {
                            echo '<b><font color="green">Esse jogar nunca morreu.</font></b>';
                        }
                        ?>
                    </li>
                <?php
                }
                ?>
                <!-- END CHARACTER LIST -->
                
                <li>
                    <font class="profile_font" name="profile_font_share_url">Address: 
                    <a href="
                        <?php 
                        if ($config['htwrite']) 
                        { 
                            echo "http://" . $_SERVER['HTTP_HOST']."/" . $profile_data['name']; 
                        }
                        else 
                        { 
                            echo "http://" . $_SERVER['HTTP_HOST'] . "/characterprofile.php?name=" . $profile_data['name']; 
                        }    
                        ?>">
                        <?php
                        if ($config['htwrite']) 
                        { 
                            echo "http://".$_SERVER['HTTP_HOST']."/". $profile_data['name']; 
                        }
                        else 
                        { 
                            echo "http://".$_SERVER['HTTP_HOST']."/characterprofile.php?name=". $profile_data['name']; 
                        }
                        ?>
                </a></font></li>
            </ul>
        <!-- END PROFILE MARKUP HERE-->
        
        <?php
    } 
    else 
    {
        echo htmlentities(strip_tags($name, ENT_QUOTES)) . ' does not exist.';
    }

else 
{
    header('Location: index.php');
}

include 'layout/overall/footer.php'; ?>
 

 

 

Caso a pessoa que me ajudar queira, eu recompenso em 30 reais de pontos vip no meu servidor que é o tibiacanob.com

Link para o post
Compartilhar em outros sites

Participe da conversa

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

Visitante
Responder

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

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

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

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

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por Qwizer
      MercadoPago Checkout Transparente (CC)
       
      Abaixo Segue código PHP de pagamento via cartão de credito pelo mercado pago com retorno automático para quem quiser adaptar em seus sites ter uma direção de onde ir 
      testado em Znote e MyAcc.
       

       
       
      https://mega.nz/folder/m4QkWBLS#PIvJ_scVm7w8-5FLlStTHg  
    • Por luanluciano93
      Olá, esse tutorial é uma parte do tópico principal: "Tutorial completo de infraestrutura para montar um servidor TFS 1.x no Ubuntu 22.04" ... 

      Aqui ensinaremos como instalar e configurar o ZnoteACC.
       
      PASSO 1 - COMO INSTALAR O ZNOTE ACC
       
      O projeto principal do Znote está no github e existem duas ramificações principais:
      - A primeira, nomeada de MASTER no github (Znote AAC 1.6) suporta as engines OTHire, TFS 0.2, TFS 0.3/4, TFS 1.3 e Distributions based on these (such as OTX) = https://github.com/Znote/ZnoteAAC/tree/master
      - A segunda, nomeada de V2 no github (Znote AAC 2.0) suporta as engines TFS 1.4 ou superior e OTservBR-Global = https://github.com/Znote/ZnoteAAC/tree/v2
       
      Portanto, verifique o versão que suporta a engine que você irá usar e faça o download em CODE e depois DOWNLOAD ZIP:

       
      Após extrair os arquivos, usando o WinSCP, passe os arquivos para a pasta "www" (criada no tutorial instalando o PHP), localizada em /home/ ....
       
      PASSO 2 - IMPORTANDO A DATABASE DO ZNOTE ACC
       
      Após passar os arquivos do site para a pasta "www", atualize o seu site no navegador e irá aparecer isso: 
       

      Clicando no link "Znote ACC shema", irá baixar a database do site Znote que precisará ser importada no phpmyadmin.
       
      Para isso, entre em seu phpmyadmin pelo navegador (IP/phpmyadmin, ou o outro destino que você escolheu conforme o tópico de instalação do phpmyadmin) 

       
      Entre na dabatase criada para o servidor, conforme explicado na tutorial de configuração do servidor, e agora clique em "IMPORTAR" e depois em "escolher arquivo":
       

       
      E então selecione o arquivo que você baixou clicando no link "Znote ACC shema" . Se você não tiver um arquivo, use o padrão do ZNOTE ACC: https://raw.githubusercontent.com/Znote/ZnoteAAC/master/engine/database/znote_schema.sql
       
      E por fim, clique em EXECUTAR.
       

       
      Para finalizar a conexão do site com o banco de dados da máquina, com o WinSCP entre em /home/www/config.php e ajuste os dados da conexão mysql: 
       

       
      Salve e teste novamente a conexão do site pelo navegador.
       
      PASSO 3 - CONFIGURANDO O ZNOTE ACC
       
      Com o WinSCP entre novamente em /home/www/config.php e ajuste todas as configurações conforme a sua necessidade, Irei cimentar sobre algumas mais importantes ...
       
      - modifique $config['ServerEngine'] com a versão correta do TFS que você está executando. (TFS_02, TFS_03, TFS_10, OUTROS). Ex: $config['ServerEngine'] = 'TFS_10';
      - modifique $config['page_admin_access'] com o(s) nome(s) da sua conta de administrador. (Após criar um conta essa a account aqui indicada, ela terá acesso de administrador no site)
      - modifique $config['server_path'] com o caminho para o servidor. Ex: $config['server_path'] = '/home/otserv';
       
      - Para o site armazenar cache na memória/RAM é preciso instalar a extensão do PHP chamada APCu. Use o seguinte comando:
      sudo apt install php-apcu E mude em 'memory' para true na paste de $config['cache']
       
      - Na página de galeria é usado o IMGUR como host de imagem e é preciso registrar o aplicativo com eles e adicionar o ID do cliente/secreto. Para isso use o tutorial do Znote: https://github.com/Znote/ZnoteAAC/wiki/IMGUR-powered-Gallery-page
       
      - Para o envio de e-mails do site será usado o PHPMailer. Para usá-lo considere usar a última versão estável lançada do PHPMailer ou você pode ter problemas. Baixe o PHPMailer: https://github.com/PHPMailer/PHPMailer/releases e depois extraia para dentro da pasta "www" (onde este arquivo config.php está localizado) Renomeie a pasta para "PHPMailer". Em seguida, ajuste as configurações de correio SMTP com os dados do seu provedor de e-mail no config.php.
       
      Para usar o PHPMailer usando uma conta GMAIL deverá ficar assim:
      'host' => "smtp.gmail.com", // Outgoing mail server host. 'securityType' => 'tls', // ssl or tls 'port' => 587, // SMTP port number - likely to be 465(ssl) or 587(tls) 'email' => '[email protected]', 'username' => '[email protected]', // Likely the same as email 'password' => 'email-senha', // The password. Lembrando que a porta 587 deverá ser aberta no firewall do servidor.
       
      - Para usar o recaptcha do google no site você deverá criar uma conta em: https://www.google.com/recaptcha/
      E caso queira usar a opção $config['captcha_use_curl'] = true; deverá usar o comando abaixo para instalar a extensão cURL do PHP:
      sudo apt install php-curl
      - Para trocar a logo da guild é necessário a extensão GD do PHP, para instala-lo basta usar o comando:
      sudo apt install php-gd - Após o comando de instalação do GB, use os comandos a seguir para dar permissão ao arquivo que gera as novas imagens ... 
      cd /home/www/engine/function & sudo chmod 777 -R general.php - Dê permissão também a pasta de cache do site ... 
      cd /home/www/engine & sudo chmod 777 -R cache - Para usar algumas funções do sistema do Pagseguro no ZnoteAAC é necessário instalar o PHP XML, para instala-lo basta usar o comando:
      sudo apt install php-xml  
      PASSO 4 - CONFIGURANDO O ZNOTE ACC JUNTO AO NGINX
       
      Usando o WinSCP, vá até a pasta /etc/nginx/sites-available/ e altere o default onde tem ...
      try_files $uri $uri/ =404; Por isso: 
      index index.html index.php; try_files $uri $uri/ /index.php?$args; Fazendo isso, você ativará o mod_rewrite no nginx.
       
      Acima dessa linha: 
      location / { Você pode adicionar o código a seguir para mascarar diretórios conhecidos do Znote AAC:
       
      location /LUA { deny all; return 404; } location /engine/cache { deny all; return 404; } location /special { allow 127.0.0.1; deny all; }  
      Depois das alterações é necessário recarregar o nginx:
      sudo systemctl reload nginx  
      A princípio é isso!
       
      Siga as atualizações no tópico principal: "Tutorial completo de infraestrutura para montar um servidor TFS 1.x no Ubuntu 22.04" ... 
       
       
      Fontes: 
      - https://github.com/Znote/ZnoteAAC
      - https://kenfavors.com/code/enabling-nginx-mod_rewrite/
      - https://github.com/DevelopersPL/otshosting-provisioning
    • Por GamerGoiano
      O Tutorial foi feito por mim, qualquer dúvida pode postar nos comentários.
       
      1. Instale o Xampp atual e instale
      https://www.apachefriends.org/pt_br/index.html
      2. Va em C:\xampp e abra o xampp-control.exe
      3. Inicie o Apache e o MySQL

      4. Baixe o Znote AAC (É o mais fácil de usar)
      https://github.com/Znote/ZnoteAAC
       
      5. Va até C:\xampp\htdocs e apague tudo que está la dentro
      6. Extraia o site Znote AAC que voce baixou, copia todo o conteúdo e cola dentro da pasta htdocs.
      Ficando assim:

       
      7.  Acesse http://127.0.0.1/phpmyadmin e clique em Novo
       
      8. Escreva o nome do banco de dados, eu escolhi Tibia e no lado direito escolha Agrupamento (Collation) e clique em Criar.

       
      9. Clique no banco de dados que voce criou no menu esquerdo (Tibia) e clique em Importar
      .
       
      10. Clique em escolher arquivo e selecione o arquivo de banco de dados no seu computador
       
      11. Escolha o arquivo schema.sql que está na pasta tfs 1.2 do servidor do link e clique em Executar (ta no final da página o botão)
      https://www.xtibia.com/forum/topic/250614-tfs-12-1098-sources-otclient-com-tela-maior/
      12. Acesse http://127.0.0.1/ e copie tudo do quadrado
       
      Basta clicar no quadrado e dar CTRL A e CTRL C
       
      13. Volte no phpmyadmin, clique no banco de dados que criamos (Tibia) e clique no botão SQL
       
      14. Cole o conteúdo que voce copiou e clique em executar e espere carregar
       
      15. Va em C:\xampp\htdocs e abra o arquivo config.php 
      "Recomendo abrir com o notepad ++ pra ficar mais didático para principiantes"
      16. Faça essas mudanças:
      Troque a linha 21 e 22 pro titulo e descrição do site.
      Linha 23
      $config['site_url'] = "http://demo.znote.eu";
      Troque http://demo.znote.eu por http://127.0.0.1
      Linha 26
      $config['server_path'] = '';
      Coloque dentro de aspas o diretório do seu servidor, por exemplo:
      'C:\Users\Braz\Desktop\tfs 1.2 + otclient\tfs 1.2
      Linhas 33     
      $config['sqlUser'] = 'tfs13';
      Troca tfs13 por root
      Linha 36
      $config['sqlPassword'] = 'tfs13';
      Apague tfs13
      Linha 39
      $config['sqlDatabase'] = 'tfs13';
      Troque tfs13 por Tibia (É o banco de dados que criamos)
      17. O site ja está funcionando, agora va na pasta do servidor e abra o config.lua e deixe igual está embaixo e salve.
       
      18. Pronto! Agora seu site vai usar o banco de dados para criar contas e seu servidor está preparado para reconhecer as contas e personagens criados.
       
    • Por dumazin
      Ola, estou usando um layout do Znoteaac, que tem a função de Registro/Conta, que ao logar na sua conta a imagem muda, porem o codigo em si nao funciona, voce loga na conta e a imagem continua como "Registrar". Alguem teria alguma solução ? 
       
      Codigo:
       
      Imagem:

    • Por Alexv45
      Olá a todos,
       
      Hoje tenho o prazer de anunciar que acabei de terminar um tema do pirata disponível para todos no ZnoteAAC.
       
      https://imgur.com/bQGS2f9
       
      Veja a web ao vivo: Clique Aqui
      Download ( tema official ) : Clique Aqui
       
      Créditos: Motor: ZnoteAAC
      Layout: ZnoteAAC Criado por Alex45
       

       
      Em formação:
       
      O Fundo é um vídeo. Ser um fundo de vídeo significa que cada conteúdo deve ser, se for maior que o tamanho da página em um overflow-scroll, consulte em shop.php para ver o código html dentro do estilo.
      Testado em TFS 1.3, 12.64.
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo