[Znote AAC] Characterprofile EQ shower

cmarofpicka

Member
Joined
Mar 6, 2011
Messages
118
Best answers
0
Reaction score
7
Location
Serbia ,Belgrade
I got this error Undefined index: imageType in /home/otsmanager/www/public_html/characterprofile.php on line 31 can sombody help me to fix it ?
 

Amiroslo

Excellent OT User
Joined
Jul 28, 2009
Messages
6,694
Best answers
5
Reaction score
694
I got this error Undefined index: imageType in /home/otsmanager/www/public_html/characterprofile.php on line 31 can sombody help me to fix it ?
Use this instead

PHP:
    <?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'];
// 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'].".gif";
    ?>
    <!-- Fix item positions CSS -->
    <style type="text/css">
    /* CSS by CorneX */
    .signBgrnd {
        background-image:url('eq/outfit.png');
        background-repeat:no-repeat;
        position:relative;
    display: inline-block;
        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 -->
 
Last edited:

Ray Rewind

Doctor
Joined
Jun 6, 2009
Messages
1,348
Best answers
0
Reaction score
74
Location
Germany
Use this instead

PHP:
    <?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'];
// 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'].".gif";
    ?>
    <!-- Fix item positions CSS -->
    <style type="text/css">
    /* CSS by CorneX */
    .signBgrnd {
        background-image:url('eq/outfit.png');
        background-repeat:no-repeat;
        position:relative;
    display: inline-block;
        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 -->

Blank page. with this
 

Mystara

New Member
Joined
Oct 21, 2014
Messages
12
Best answers
0
Reaction score
1
I love this. Here is a screenshot on how I positioned it on my Character Profile Page.

 

Adse

New Member
Joined
Aug 22, 2014
Messages
21
Best answers
0
Reaction score
1
Looks good, will try it out.
 

Mystara

New Member
Joined
Oct 21, 2014
Messages
12
Best answers
0
Reaction score
1
can you show code :)?
Make the following changes to the original code:

HTML:
<!-- Render HTML -->
    <div class="signBgrnd" style="float: right;">
Insert the entire code in your characterprofile.php on a blank line before:

PHP:
        <ul class="unstyled">

            <li><font class="profile_font" name="profile_font_level">Sex:<?php
                if ($profile_data['sex'] == 1) {
                    echo 'Male';
                } else {
                    echo 'Female';
                }
                ?></font></li>
 

Ray Rewind

Doctor
Joined
Jun 6, 2009
Messages
1,348
Best answers
0
Reaction score
74
Location
Germany
Make the following changes to the original code:

HTML:
<!-- Render HTML -->
    <div class="signBgrnd" style="float: right;">
Insert the entire code in your characterprofile.php on a blank line before:

PHP:
        <ul class="unstyled">

            <li><font class="profile_font" name="profile_font_level">Sex:<?php
                if ($profile_data['sex'] == 1) {
                    echo 'Male';
                } else {
                    echo 'Female';
                }
                ?></font></li>
I did all the changes you told me :p Too bad it is not working I show you my whole code mate ! :)

I have to seperate my code in 2 posts

PHP:
<?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 = $_GET['name'];
   
    if (user_character_exist($name)) {
        $user_id = user_character_id($name);
        $profile_data = user_character_data($user_id, 'name', 'level', 'vocation', 'lastlogin', 'online');
        $profile_znote_data = user_znote_character_data($user_id, 'created', 'hide_char', 'comment');
       
        $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']);
        }
        ?>
       
       
       
        
    <?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'];
// 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'].".gif";
    ?>
    <!-- Fix item positions CSS -->
    <style type="text/css">
    /* CSS by CorneX */
    .signBgrnd {
        background-image:url('eq/outfit.png');
        background-repeat:no-repeat;
        position:relative;
    display: inline-block;
        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" style="float: right;">
        <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 -->
 

Ray Rewind

Doctor
Joined
Jun 6, 2009
Messages
1,348
Best answers
0
Reaction score
74
Location
Germany
here is the rest

PHP:
<!-- DEATH LIST -->
                <li>
                    <b>Death List:</b><br>
                    <?php
                    if ($config['TFSVersion'] == 'TFS_02') {
                        $array = user_fetch_deathlist($user_id);
                        if ($array) {
                            //print_r($array);
                            ?>
                            <ul>
                                <?php
                                // Design and present the list
                                foreach ($array as $value) {
                                    echo '<li>';
                                    // $value[0]
                                    $value[1] = date($config['date'],$value[1]);                               
                                    if ($value[4] == 1) {
                                        $value[3] = 'player: <a href="characterprofile.php?name='. $value[3] .'">'. $value[3] .'</a>';
                                    } else {
                                        $value[3] = 'monster: '. $value[3] .'.';
                                    }
                                   
                                    echo '['. $value[1] .'] Killed at level '. $value[2] .' by '. $value[3];
                                    echo '</li>';
                                }
                            ?>
                            </ul>
                            <?php
                            } else {
                                echo '<b><font color="green">This player has never died.</font></b>';
                            }
                            //Done.
                        }
                        if ($config['TFSVersion'] == 'TFS_03') {
                            $array = user_fetch_deathlist03($user_id);
                            if ($array) {
                            ?>
                            <ul>
                                <?php
                                // Design and present the list
                                foreach ($array as $value) {
                                    echo '<li>';
                                    $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 '['. date($config['date'],$value['date']) .'] Killed at level '. $value['level'] .' by '. $value[3];
                                    echo '</li>';
                                }
                            ?>
                            </ul>
                            <?php
                            } else {
                                echo '<b><font color="green">This player has never died.</font></b>';
                            }
                        }
                        ?>
                </li>
               
                <!-- END DEATH LIST -->
               
                <table id="questTable">
    <?php
    $completed = '<font color="green">[Completed]</font>';
    $notstarted = '<font color="red">Not started</font>';
    function Progress($min, $max, $design = '<font color="orange">[x%]</font>') {
        $design = explode("x%",$design);
        $percent = ($min / $max) * 100;
        return $design[0] . $percent . $design[1];
    }
    $quests = array(
        // Simple quests
        'Annihilator' => 30015,
        'Inquestion' => 6076,
       

        // Advanced quest with progress par:
        'Svargrond Arena' => array(
            42381,
            3,
        ),
    );
    ?>
    <tr class="yellow">
        <td>Quest</td>
        <td>Status</td>
    </tr>
    <?php
    // Rolling through quests
    foreach ($quests as $key => $quest) {

        // Is quest NOT an array (advanced quest?)
        if (!is_array($quest)) {
            // Query to find quest results
            $query = mysql_select_single("SELECT `value` FROM `player_storage` WHERE `key`='$quest' AND `player_id`='$user_id' AND `value`='1' LIMIT 1;");

            if ($query !== false) $quest = $completed;
            else $quest = $notstarted;

        } else {
            $query = mysql_select_single("SELECT `value` FROM `player_storage` WHERE `key`='".$quest[0]."' AND `player_id`='$user_id' AND `value`>'0' LIMIT 1;");
            if (!$query) $quest = $notstarted;
            else {
                if ($query['value'] >= $quest[1]) $quest = $completed;
                else $quest = Progress($query['value'], $quest[1]);
            }
        }
        ?>
        <tr>
            <td><?php echo $key; ?></td>
            <td><?php echo $quest; ?></td>
        </tr>
        <?php
    }
    ?>
</table>
                <!-- CHARACTER LIST -->
                <?php
                if (user_character_hide($profile_data['name']) != 1 && user_character_list_count(user_character_account_id($name)) > 1) {
                ?>
                    <li>
                        <b>Other visible characters on this account:</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) > 1) {
                            ?>
                            <table id="characterprofileTable">
                                <tr class="yellow">
                                    <td>
                                        Name:
                                    </td>
                                    <td>
                                        Level:
                                    </td>
                                    <td>
                                        Vocation:
                                    </td>
                                    <td>
                                        Last login:
                                    </td>
                                    <td>
                                        Status:
                                    </td>
                                </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') {
                                            echo '<tr>';
                                            echo '<td><a href="characterprofile.php?name='. $char['name'] .'">'. $char['name'] .'</a></td>';
                                            echo '<td>'. $char['level'] .'</td>';
                                            echo '<td>'. $char['vocation'] .'</td>';
                                            echo '<td>'. $char['lastlogin'] .'</td>';
                                            echo '<td>'. $char['online'] .'</td>';
                                            echo '</tr>';
                                        }
                                    }
                                }
                            ?>
                            </table>
                            <?php
                            } else {
                                echo '<b><font color="green">This player has never died.</font></b>';
                            }
                                //Done.
                            ?>
                    </li>
                <?php
                }
                ?>
                <!-- END CHARACTER LIST -->
       

        <?php
    } else {
        echo htmlentities(strip_tags($name, ENT_QUOTES)).' does not exist.';
    }
} else {
    header('Location: index.php');
}

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

Mystara

New Member
Joined
Oct 21, 2014
Messages
12
Best answers
0
Reaction score
1
Can you show me a screenshot of the page?

Mine is using the basic Znote AAC design. I'm not using any special layout.

I also did mine slightly different because I'm a bit particular about making sure the code is correct so this part:

HTML:
    <!-- Fix item positions CSS -->
    <style type="text/css">
    /* CSS by CorneX */
    .signBgrnd {
        background-image:url('eq/outfit.png');
        background-repeat:no-repeat;
        position:relative;
    display: inline-block;
        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>
Is actually in my overall header.php to ensure it is coded correctly.
 

Ray Rewind

Doctor
Joined
Jun 6, 2009
Messages
1,348
Best answers
0
Reaction score
74
Location
Germany
Can you show me a screenshot of the page?

Mine is using the basic Znote AAC design. I'm not using any special layout.

I also did mine slightly different because I'm a bit particular about making sure the code is correct so this part:

HTML:
    <!-- Fix item positions CSS -->
    <style type="text/css">
    /* CSS by CorneX */
    .signBgrnd {
        background-image:url('eq/outfit.png');
        background-repeat:no-repeat;
        position:relative;
    display: inline-block;
        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>
Is actually in my overall header.php to ensure it is coded correctly.
sure here u go :)

 

Mystara

New Member
Joined
Oct 21, 2014
Messages
12
Best answers
0
Reaction score
1
Try This

PHP:
<?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 = $_GET['name'];

    if (user_character_exist($name)) {
        $user_id = user_character_id($name);
        $profile_data = user_character_data($user_id, 'name', 'level', 'vocation', 'lastlogin', 'online');
        $profile_znote_data = user_znote_character_data($user_id, 'created', 'hide_char', 'comment');

        $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']);
        }

        /* /
          /   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'];
// 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'] . ".gif";
            }
            ?>
            <!-- Fix item positions CSS -->
            <style type="text/css">
                /* CSS by CorneX */
                .signBgrnd {
                    background-image:url('eq/outfit.png');
                    background-repeat:no-repeat;
                    position:relative;
                    display: inline-block;
                    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" style="float: right;">
                <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 -->
 

Mystara

New Member
Joined
Oct 21, 2014
Messages
12
Best answers
0
Reaction score
1
PHP:
<!-- DEATH LIST -->
        <li>
            <b>Death List:</b><br />
            <?php
            if ($config['TFSVersion'] == 'TFS_02') {
                $array = user_fetch_deathlist($user_id);
                if ($array) {
                    //print_r($array);
                    ?>
                    <ul>
                        <?php
                        // Design and present the list
                        foreach ($array as $value) {
                            echo '<li>';
                            // $value[0]
                            $value[1] = date($config['date'], $value[1]);
                            if ($value[4] == 1) {
                                $value[3] = 'player: <a href="characterprofile.php?name=' . $value[3] . '">' . $value[3] . '</a>';
                            } else {
                                $value[3] = 'monster: ' . $value[3] . '.';
                            }

                            echo '[' . $value[1] . '] Killed at level ' . $value[2] . ' by ' . $value[3];
                            echo '</li>';
                        }
                        ?>
                    </ul>
                    <?php
                } else {
                    echo '<b><font color="green">This player has never died.</font></b>';
                }
                //Done.
            }
            if ($config['TFSVersion'] == 'TFS_03') {
                $array = user_fetch_deathlist03($user_id);
                if ($array) {
                    ?>
                    <ul>
                        <?php
                        // Design and present the list
                        foreach ($array as $value) {
                            echo '<li>';
                            $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 '[' . date($config['date'], $value['date']) . '] Killed at level ' . $value['level'] . ' by ' . $value[3];
                            echo '</li>';
                        }
                        ?>
                    </ul>
                    <?php
                } else {
                    echo '<b><font color="green">This player has never died.</font></b>';
                }
            }
            ?>
        </li>

        <!-- END DEATH LIST -->

        <table id="questTable">
            <?php
            $completed = '<font color="green">[Completed]</font>';
            $notstarted = '<font color="red">Not started</font>';

            function Progress($min, $max, $design = '<font color="orange">[x%]</font>') {
                $design = explode("x%", $design);
                $percent = ($min / $max) * 100;
                return $design[0] . $percent . $design[1];
            }

            $quests = array(
                // Simple quests
                'Annihilator' => 30015,
                'Inquestion' => 6076,
                // Advanced quest with progress par:
                'Svargrond Arena' => array(
                    42381,
                    3,
                ),
            );
            ?>
            <tr class="yellow">
                <td>Quest</td>
                <td>Status</td>
            </tr>
            <?php
            // Rolling through quests
            foreach ($quests as $key => $quest) {

                // Is quest NOT an array (advanced quest?)
                if (!is_array($quest)) {
                    // Query to find quest results
                    $query = mysql_select_single("SELECT `value` FROM `player_storage` WHERE `key`='$quest' AND `player_id`='$user_id' AND `value`='1' LIMIT 1;");

                    if ($query !== false) {
                        $quest = $completed;
                    } else {
                        $quest = $notstarted;
                    }
                } else {
                    $query = mysql_select_single("SELECT `value` FROM `player_storage` WHERE `key`='" . $quest[0] . "' AND `player_id`='$user_id' AND `value`>'0' LIMIT 1;");
                    if (!$query) {
                        $quest = $notstarted;
                    } else {
                        if ($query['value'] >= $quest[1]) {
                            $quest = $completed;
                        } else {
                            $quest = Progress($query['value'], $quest[1]);
                        }
                    }
                }
                ?>
                <tr>
                    <td><?php echo $key; ?></td>
                    <td><?php echo $quest; ?></td>
                </tr>
                <?php
            }
            ?>
        </table>
        <!-- CHARACTER LIST -->
        <ul>
            <?php
            if (user_character_hide($profile_data['name']) != 1 && user_character_list_count(user_character_account_id($name)) > 1) {
                ?>
                <li>
                    <b>Other visible characters on this account:</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) > 1) {
                        ?>
                        <table id="characterprofileTable">
                            <tr class="yellow">
                                <td>
                                    Name:
                                </td>
                                <td>
                                    Level:
                                </td>
                                <td>
                                    Vocation:
                                </td>
                                <td>
                                    Last login:
                                </td>
                                <td>
                                    Status:
                                </td>
                            </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') {
                                        echo '<tr>';
                                        echo '<td><a href="characterprofile.php?name=' . $char['name'] . '">' . $char['name'] . '</a></td>';
                                        echo '<td>' . $char['level'] . '</td>';
                                        echo '<td>' . $char['vocation'] . '</td>';
                                        echo '<td>' . $char['lastlogin'] . '</td>';
                                        echo '<td>' . $char['online'] . '</td>';
                                        echo '</tr>';
                                    }
                                }
                            }
                            ?>
                        </table>
                        <?php
                    } else {
                        echo '<b><font color="green">This player has never died.</font></b>';
                    }
                    //Done.
                    ?>
                </li></ul>
            <?php
        }
        ?>
        <!-- END CHARACTER LIST -->


        <?php
    } else {
        echo htmlentities(strip_tags($name, ENT_QUOTES)) . ' does not exist.';
    }
} else {
    header('Location: index.php');
}

include 'layout/overall/footer.php';
?>
[/PHP]
 

Mystara

New Member
Joined
Oct 21, 2014
Messages
12
Best answers
0
Reaction score
1
I actually see another mistake. Add these two corrections

HTML:
<!-- DEATH LIST --><ul>
.
.
.
.
 <!-- END DEATH LIST --></ul>
 

Mystara

New Member
Joined
Oct 21, 2014
Messages
12
Best answers
0
Reaction score
1
The code is checking out properly. Here it is reformatted again.

PHP:
<?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 = $_GET['name'];

    if (user_character_exist($name)) {
        $user_id = user_character_id($name);
        $profile_data = user_character_data($user_id, 'name', 'level', 'vocation', 'lastlogin', 'online');
        $profile_znote_data = user_znote_character_data($user_id, 'created', 'hide_char', 'comment');

        $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']);
        }
        ?>
        <?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'];
// 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'] . ".gif";
            }
            ?>
            <!-- Fix item positions CSS -->
            <style type="text/css">
                /* CSS by CorneX */
                .signBgrnd {
                    background-image:url('eq/outfit.png');
                    background-repeat:no-repeat;
                    position:relative;
                    display: inline-block;
                    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" style="float: right;">
                <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 -->
Part two to follow.
 

Mystara

New Member
Joined
Oct 21, 2014
Messages
12
Best answers
0
Reaction score
1
PHP:
        <!-- DEATH LIST -->
        <ul><li>
                <b>Death List:</b><br />
                <?php
                if ($config['TFSVersion'] == 'TFS_02') {
                    $array = user_fetch_deathlist($user_id);
                    if ($array) {
                        //print_r($array);
                        ?>
                        <ul>
                            <?php
                            // Design and present the list
                            foreach ($array as $value) {
                                echo '<li>';
                                // $value[0]
                                $value[1] = date($config['date'], $value[1]);
                                if ($value[4] == 1) {
                                    $value[3] = 'player: <a href="characterprofile.php?name=' . $value[3] . '">' . $value[3] . '</a>';
                                } else {
                                    $value[3] = 'monster: ' . $value[3] . '.';
                                }

                                echo '[' . $value[1] . '] Killed at level ' . $value[2] . ' by ' . $value[3];
                                echo '</li>';
                            }
                            ?>
                        </ul>
                        <?php
                    } else {
                        echo '<b><font color="green">This player has never died.</font></b>';
                    }
                    //Done.
                }
                if ($config['TFSVersion'] == 'TFS_03') {
                    $array = user_fetch_deathlist03($user_id);
                    if ($array) {
                        ?>
                        <ul>
                            <?php
                            // Design and present the list
                            foreach ($array as $value) {
                                echo '<li>';
                                $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 '[' . date($config['date'], $value['date']) . '] Killed at level ' . $value['level'] . ' by ' . $value[3];
                                echo '</li>';
                            }
                            ?>
                        </ul>
                        <?php
                    } else {
                        echo '<b><font color="green">This player has never died.</font></b>';
                    }
                }
                ?>
            </li></ul>

        <!-- END DEATH LIST -->

        <table id="questTable">
            <?php
            $completed = '<font color="green">[Completed]</font>';
            $notstarted = '<font color="red">Not started</font>';

            function Progress($min, $max, $design = '<font color="orange">[x%]</font>') {
                $design = explode("x%", $design);
                $percent = ($min / $max) * 100;
                return $design[0] . $percent . $design[1];
            }

            $quests = array(
                // Simple quests
                'Annihilator' => 30015,
                'Inquestion' => 6076,
                // Advanced quest with progress par:
                'Svargrond Arena' => array(
                    42381,
                    3,
                ),
            );
            ?>
            <tr class="yellow">
                <td>Quest</td>
                <td>Status</td>
            </tr>
            <?php
            // Rolling through quests
            foreach ($quests as $key => $quest) {

                // Is quest NOT an array (advanced quest?)
                if (!is_array($quest)) {
                    // Query to find quest results
                    $query = mysql_select_single("SELECT `value` FROM `player_storage` WHERE `key`='$quest' AND `player_id`='$user_id' AND `value`='1' LIMIT 1;");

                    if ($query !== false) {
                        $quest = $completed;
                    } else {
                        $quest = $notstarted;
                    }
                } else {
                    $query = mysql_select_single("SELECT `value` FROM `player_storage` WHERE `key`='" . $quest[0] . "' AND `player_id`='$user_id' AND `value`>'0' LIMIT 1;");
                    if (!$query) {
                        $quest = $notstarted;
                    } else {
                        if ($query['value'] >= $quest[1]) {
                            $quest = $completed;
                        } else {
                            $quest = Progress($query['value'], $quest[1]);
                        }
                    }
                }
                ?>
                <tr>
                    <td><?php echo $key; ?></td>
                    <td><?php echo $quest; ?></td>
                </tr>
                <?php
            }
            ?>
        </table>
        <!-- CHARACTER LIST -->
        <ul>
            <?php
            if (user_character_hide($profile_data['name']) != 1 && user_character_list_count(user_character_account_id($name)) > 1) {
                ?>
                <li>
                    <b>Other visible characters on this account:</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) > 1) {
                        ?>
                        <table id="characterprofileTable">
                            <tr class="yellow">
                                <td>
                                    Name:
                                </td>
                                <td>
                                    Level:
                                </td>
                                <td>
                                    Vocation:
                                </td>
                                <td>
                                    Last login:
                                </td>
                                <td>
                                    Status:
                                </td>
                            </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') {
                                        echo '<tr>';
                                        echo '<td><a href="characterprofile.php?name=' . $char['name'] . '">' . $char['name'] . '</a></td>';
                                        echo '<td>' . $char['level'] . '</td>';
                                        echo '<td>' . $char['vocation'] . '</td>';
                                        echo '<td>' . $char['lastlogin'] . '</td>';
                                        echo '<td>' . $char['online'] . '</td>';
                                        echo '</tr>';
                                    }
                                }
                            }
                            ?>
                        </table>
                        <?php
                    } else {
                        echo '<b><font color="green">This player has never died.</font></b>';
                    }
                    //Done.
                    ?>
                </li></ul>
            <?php
        }
        ?>
        <!-- END CHARACTER LIST -->


        <?php
    } else {
        echo htmlentities(strip_tags($name, ENT_QUOTES)) . ' does not exist.';
    }
} else {
    header('Location: index.php');
}

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

Ray Rewind

Doctor
Joined
Jun 6, 2009
Messages
1,348
Best answers
0
Reaction score
74
Location
Germany
This line

Code:
                $PEQ[$EQ['pid']] = "http://{$imageServer}/" . $EQ['itemtype'] . ".gif";
Looks wierd
 

Mystara

New Member
Joined
Oct 21, 2014
Messages
12
Best answers
0
Reaction score
1
I honestly cannot tell you why it will not display correctly on yours. Looking through the code it appears correct.
 
Top