Ir para conteúdo
  • Cadastre-se

Site com Layout antigo, preciso de ajuda


Posts Recomendados

Opá gente, tudo bem com vocês ?
então, esse é o meu primeiro servidor e estou um pouco perdido na questão do website e gostaria da ajuda de vocês, meu poblema é esse, Segue as imagens

Fatal error: Uncaught Error: Call to undefined method Cache::save() in C:\xampp\htdocs\layout\sub\index.php:30 Stack trace: #0 C:\xampp\htdocs\index.php(9): include() #1 {main} thrown in C:\xampp\htdocs\layout\sub\index.php on line 30
image.thumb.png.9e798582b0d5f1d394d4c7f12fc79845.png

Notice: Undefined index: type in C:\xampp\htdocs\powergamers.php on line 18
string(435) "SELECT `a`.`id`, `b`.`player_id`, `a`.`name`, `a`.`vocation`, `a`.`level`, `a`.`group_id`, `a`.`experience`, `b`.`exphist_lastexp`, `b`.`exphist1`, `b`.`exphist2`, `b`.`exphist3`, `b`.`exphist4`, `b`.`exphist5`, `b`.`exphist6`, `b`.`exphist7`, (`a`.`experience` - `b`.`exphist_lastexp`) AS `expdiff` FROM `players` `a` JOIN `znote_players` `b` ON `a`.`id` = `b`.`player_id` WHERE `a`.`group_id` < 2 ORDER BY `expdiff` DESC LIMIT 25"
(query - SQL error)
Type: select_multi (select multiple rows from database)

Unknown column 'b.exphist_lastexp' in 'field list'

image.thumb.png.b137a02eec8a15d5e44a91332851753a.png

Fatal error: Uncaught Error: Call to undefined method Cache::save() in C:\xampp\htdocs\highscores.php:59 Stack trace: #0 {main} thrown in C:\xampp\htdocs\highscores.php on line 59

 

image.thumb.png.d0167eb342c886ba5a1f67705f1538d6.png

Link para o post
Compartilhar em outros sites
4 horas atrás, Brum disse:

Opá gente, tudo bem com vocês ?
então, esse é o meu primeiro servidor e estou um pouco perdido na questão do website e gostaria da ajuda de vocês, meu poblema é esse, Segue as imagens

Fatal error: Uncaught Error: Call to undefined method Cache::save() in C:\xampp\htdocs\layout\sub\index.php:30 Stack trace: #0 C:\xampp\htdocs\index.php(9): include() #1 {main} thrown in C:\xampp\htdocs\layout\sub\index.php on line 30
image.thumb.png.9e798582b0d5f1d394d4c7f12fc79845.png

Notice: Undefined index: type in C:\xampp\htdocs\powergamers.php on line 18
string(435) "SELECT `a`.`id`, `b`.`player_id`, `a`.`name`, `a`.`vocation`, `a`.`level`, `a`.`group_id`, `a`.`experience`, `b`.`exphist_lastexp`, `b`.`exphist1`, `b`.`exphist2`, `b`.`exphist3`, `b`.`exphist4`, `b`.`exphist5`, `b`.`exphist6`, `b`.`exphist7`, (`a`.`experience` - `b`.`exphist_lastexp`) AS `expdiff` FROM `players` `a` JOIN `znote_players` `b` ON `a`.`id` = `b`.`player_id` WHERE `a`.`group_id` < 2 ORDER BY `expdiff` DESC LIMIT 25"
(query - SQL error)
Type: select_multi (select multiple rows from database)

Unknown column 'b.exphist_lastexp' in 'field list'

image.thumb.png.b137a02eec8a15d5e44a91332851753a.png

Fatal error: Uncaught Error: Call to undefined method Cache::save() in C:\xampp\htdocs\highscores.php:59 Stack trace: #0 {main} thrown in C:\xampp\htdocs\highscores.php on line 59

 

image.thumb.png.d0167eb342c886ba5a1f67705f1538d6.png

Usando o Gesior ACC Maker ou Znote Acc?

 

Testa ae, se nao funciona me avise.

Execute o código SQL no phpmyadmin para o banco de dados:
 

ALTER TABLE `znote_players`
ADD `exphist_lastexp` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist1` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist2` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist3` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist4` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist5` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist6` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist7` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `onlinetimetoday` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime1` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime2` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime3` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime4` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime5` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime6` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime7` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetimeall` BIGINT( 20 ) NOT NULL DEFAULT '0';

 

UPDATE `znote_players` AS `z` INNER JOIN  `players` AS `p` ON `p`.`id`=`z`.`player_id` SET `z`.`exphist_lastexp`=`p`.`experience`

 

Editado por Mask Ghoul (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
19 horas atrás, Mask Ghoul disse:

Usando o Gesior ACC Maker ou Znote Acc?

 

Testa ae, se nao funciona me avise.

Execute o código SQL no phpmyadmin para o banco de dados:
 


ALTER TABLE `znote_players`
ADD `exphist_lastexp` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist1` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist2` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist3` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist4` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist5` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist6` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist7` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `onlinetimetoday` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime1` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime2` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime3` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime4` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime5` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime6` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime7` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetimeall` BIGINT( 20 ) NOT NULL DEFAULT '0';

 


UPDATE `znote_players` AS `z` INNER JOIN  `players` AS `p` ON `p`.`id`=`z`.`player_id` SET `z`.`exphist_lastexp`=`p`.`experience`

 

Tá, ja volto

19 horas atrás, Mask Ghoul disse:

Usando o Gesior ACC Maker ou Znote Acc?

 

Testa ae, se nao funciona me avise.

Execute o código SQL no phpmyadmin para o banco de dados:
 


ALTER TABLE `znote_players`
ADD `exphist_lastexp` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist1` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist2` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist3` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist4` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist5` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist6` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist7` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `onlinetimetoday` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime1` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime2` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime3` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime4` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime5` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime6` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime7` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetimeall` BIGINT( 20 ) NOT NULL DEFAULT '0';

 


UPDATE `znote_players` AS `z` INNER JOIN  `players` AS `p` ON `p`.`id`=`z`.`player_id` SET `z`.`exphist_lastexp`=`p`.`experience`

 

mask, o Codigo entrou, certinho, mas e agora?

Agora, Brum disse:

Tá, ja volto

mask, o Codigo entrou, certinho, mas e agora?

acredito que seja Znote Acc

 

queria tirar pelomenos essa da Home

Fatal error: Uncaught Error: Call to undefined method Cache::save() in C:\xampp\htdocs\layout\sub\index.php:30 Stack trace: #0 C:\xampp\htdocs\index.php(9): include() #1 {main} thrown in C:\xampp\htdocs\layout\sub\index.php on line 30

 

e se caso as outros erros não dece pra arrumar eu queri Retirar a TAG

tipo

Highscores

Latest Deaths

Link para o post
Compartilhar em outros sites
25 minutos atrás, Brum disse:

Tá, ja volto

mask, o Codigo entrou, certinho, mas e agora?

 

queria tirar pelomenos essa da Home

Fatal error: Uncaught Error: Call to undefined method Cache::save() in C:\xampp\htdocs\layout\sub\index.php:30 Stack trace: #0 C:\xampp\htdocs\index.php(9): include() #1 {main} thrown in C:\xampp\htdocs\layout\sub\index.php on line 30

 

e se caso as outros erros não dece pra arrumar eu queri Retirar a TAG

tipo

Highscores

Latest Deaths

Por favor poste a seu codigo em highscores.php , Lastest Deaths.php e index.php

Editado por Mask Ghoul (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
Agora, Mask Ghoul disse:

Por favor poste a seu codigo em highscores.php , Lastest Deaths.php e index.php

highscores

 

 

 

<?php require_once 'engine/init.php'; include 'layout/overall/header.php'; ?>
<br><table class="blackline">
    <tr>
        <td><img src="layout/images/blank.gif"></td>
    </tr>
</table>
<div class="titleheader">
    <h1>Highscores</h1>
</div>
<table class="blackline">
    <tr>
        <td><img src="layout/images/blank.gif"></td>
    </tr>
</table>
<?php

if ($config['log_ip']) {
    znote_visitor_insert_detailed_data(3);
}

// Fetch highscore type
$type = (isset($_GET['type'])) ? (int)getValue($_GET['type']) : 7;
if ($type > 9) $type = 7;

// Fetch highscore page
$page = getValue(@$_GET['page']);
if (!$page || $page == 0) $page = 1;
else $page = (int)$page;

$highscore = $config['highscore'];

$rows = $highscore['rows'];
$rowsPerPage = $highscore['rowsPerPage'];

function skillName($type) {
    $types = array(
        1 => "Club",
        2 => "Sword",
        3 => "Axe",
        4 => "Distance",
        5 => "Shielding",
        6 => "Fishing",
        7 => "Experience", // Hardcoded
        8 => "Magic Level", // Hardcoded
        9 => "Fist", // Since 0 returns false I will make 9 = 0. :)
    );
    return $types[(int)$type];
}

function pageCheck($index, $page, $rowPerPage) {
    return ($index < ($page * $rowPerPage) && $index >= ($page * $rowPerPage) - $rowPerPage) ? true : false;
}

$cache = new Cache('engine/cache/highscores');
if ($cache->hasExpired()) {
    $scores = fetchAllScores($rows, $config['TFSVersion'], $highscore['ignoreGroupId']);
    
    $cache->setContent($scores);
    $cache->save();
} else {
    $scores = $cache->load();
}

if ($scores) {
    ?>
    <h1>Ranking for <?php echo skillName($type); ?></h1>
    <form action="" method="GET">
        <select name="type">
            <option value="7" <?php if ($type == 7) echo "selected"; ?>>Experience</option>
            <option value="8" <?php if ($type == 8) echo "selected"; ?>>Magic</option>
            <option value="5" <?php if ($type == 5) echo "selected"; ?>>Shielding</option>
            <option value="2" <?php if ($type == 2) echo "selected"; ?>>Sword</option>
            <option value="1" <?php if ($type == 1) echo "selected"; ?>>Club</option>
            <option value="3" <?php if ($type == 3) echo "selected"; ?>>Axe</option>
            <option value="4" <?php if ($type == 4) echo "selected"; ?>>Distance</option>
            <option value="6" <?php if ($type == 6) echo "selected"; ?>>Fishing</option>
            <option value="9" <?php if ($type == 9) echo "selected"; ?>>Fist</option>
        </select>
        <select name="page">
            <?php
            $pages = (int)($highscore['rows'] / $highscore['rowsPerPage']);
            for ($i = 0; $i < $pages; $i++) {
                $x = $i + 1;
                if ($x == $page) echo "<option value='".$x."' selected>Page: ".$x."</option>";
                else echo "<option value='".$x."'>Page: ".$x."</option>";
            }
            ?>
        </select>
        <input type="submit" value=" View " class="btn btn-info">
    </form>
    <table id="highscoresTable" class="table table-striped table-hover">
        <tr class="yellow">
            <td>Rank</td>
            <td>Name</td>
            <td>Vocation</td>
            <td>Level</td>
            <?php if ($type === 7) echo "<td width='10%'>Experience</td>"; ?>
        </tr>
        <?php
        for ($i = 0; $i < count($scores[$type]); $i++) {
            if (pageCheck($i, $page, $rowsPerPage)) {
                ?>
                <tr>
                    <td><?php echo $i+1; ?></td>
                    <td><a href="characterprofile.php?name=<?php echo $scores[$type][$i]['name']; ?>"><?php echo $scores[$type][$i]['name']; ?></a></td>
                    <td><?php echo vocation_id_to_name($scores[$type][$i]['vocation']); ?></td>
                    <td><?php echo $scores[$type][$i]['value']; ?></td>
                    <?php if ($type === 7) echo "<td>". $scores[$type][$i]['experience'] ."</td>"; ?>
                </tr>
                <?php
            }
        }
        ?>
    </table>
    <?php
}
include 'layout/overall/footer.php'; ?>

Link para o post
Compartilhar em outros sites
17 minutos atrás, Brum disse:

highscores

 

 

 

<?php require_once 'engine/init.php'; include 'layout/overall/header.php'; ?>
<br><table class="blackline">
    <tr>
        <td><img src="layout/images/blank.gif"></td>
    </tr>
</table>
<div class="titleheader">
    <h1>Highscores</h1>
</div>
<table class="blackline">
    <tr>
        <td><img src="layout/images/blank.gif"></td>
    </tr>
</table>
<?php

if ($config['log_ip']) {
    znote_visitor_insert_detailed_data(3);
}

// Fetch highscore type
$type = (isset($_GET['type'])) ? (int)getValue($_GET['type']) : 7;
if ($type > 9) $type = 7;

// Fetch highscore page
$page = getValue(@$_GET['page']);
if (!$page || $page == 0) $page = 1;
else $page = (int)$page;

$highscore = $config['highscore'];

$rows = $highscore['rows'];
$rowsPerPage = $highscore['rowsPerPage'];

function skillName($type) {
    $types = array(
        1 => "Club",
        2 => "Sword",
        3 => "Axe",
        4 => "Distance",
        5 => "Shielding",
        6 => "Fishing",
        7 => "Experience", // Hardcoded
        8 => "Magic Level", // Hardcoded
        9 => "Fist", // Since 0 returns false I will make 9 = 0. :)
    );
    return $types[(int)$type];
}

function pageCheck($index, $page, $rowPerPage) {
    return ($index < ($page * $rowPerPage) && $index >= ($page * $rowPerPage) - $rowPerPage) ? true : false;
}

$cache = new Cache('engine/cache/highscores');
if ($cache->hasExpired()) {
    $scores = fetchAllScores($rows, $config['TFSVersion'], $highscore['ignoreGroupId']);
    
    $cache->setContent($scores);
    $cache->save();
} else {
    $scores = $cache->load();
}

if ($scores) {
    ?>
    <h1>Ranking for <?php echo skillName($type); ?></h1>
    <form action="" method="GET">
        <select name="type">
            <option value="7" <?php if ($type == 7) echo "selected"; ?>>Experience</option>
            <option value="8" <?php if ($type == 8) echo "selected"; ?>>Magic</option>
            <option value="5" <?php if ($type == 5) echo "selected"; ?>>Shielding</option>
            <option value="2" <?php if ($type == 2) echo "selected"; ?>>Sword</option>
            <option value="1" <?php if ($type == 1) echo "selected"; ?>>Club</option>
            <option value="3" <?php if ($type == 3) echo "selected"; ?>>Axe</option>
            <option value="4" <?php if ($type == 4) echo "selected"; ?>>Distance</option>
            <option value="6" <?php if ($type == 6) echo "selected"; ?>>Fishing</option>
            <option value="9" <?php if ($type == 9) echo "selected"; ?>>Fist</option>
        </select>
        <select name="page">
            <?php
            $pages = (int)($highscore['rows'] / $highscore['rowsPerPage']);
            for ($i = 0; $i < $pages; $i++) {
                $x = $i + 1;
                if ($x == $page) echo "<option value='".$x."' selected>Page: ".$x."</option>";
                else echo "<option value='".$x."'>Page: ".$x."</option>";
            }
            ?>
        </select>
        <input type="submit" value=" View " class="btn btn-info">
    </form>
    <table id="highscoresTable" class="table table-striped table-hover">
        <tr class="yellow">
            <td>Rank</td>
            <td>Name</td>
            <td>Vocation</td>
            <td>Level</td>
            <?php if ($type === 7) echo "<td width='10%'>Experience</td>"; ?>
        </tr>
        <?php
        for ($i = 0; $i < count($scores[$type]); $i++) {
            if (pageCheck($i, $page, $rowsPerPage)) {
                ?>
                <tr>
                    <td><?php echo $i+1; ?></td>
                    <td><a href="characterprofile.php?name=<?php echo $scores[$type][$i]['name']; ?>"><?php echo $scores[$type][$i]['name']; ?></a></td>
                    <td><?php echo vocation_id_to_name($scores[$type][$i]['vocation']); ?></td>
                    <td><?php echo $scores[$type][$i]['value']; ?></td>
                    <?php if ($type === 7) echo "<td>". $scores[$type][$i]['experience'] ."</td>"; ?>
                </tr>
                <?php
            }
        }
        ?>
    </table>
    <?php
}
include 'layout/overall/footer.php'; ?>

<?php require_once 'engine/init.php'; include 'layout/overall/header.php';

if ($config['log_ip']) {
    znote_visitor_insert_detailed_data(3);
}

// Fetch highscore type
$type = (isset($_GET['type'])) ? (int)getValue($_GET['type']) : 7;
if ($type > 9) $type = 7;

// Fetch highscore vocation
$configVocations = $config['vocations'];
//$debug['configVocations'] = $configVocations;

$vocationIds = array_keys($configVocations);

$vocation = 'all';
if (isset($_GET['vocation']) && is_numeric($_GET['vocation'])) {
    $vocation = (int)$_GET['vocation'];
    if (!in_array($vocation, $vocationIds)) {
        $vocation = "all";
    }
}

// Fetch highscore page
$page = getValue(@$_GET['page']);
if (!$page || $page == 0) $page = 1;
else $page = (int)$page;

$highscore = $config['highscore'];
$loadFlags = ($config['country_flags']['enabled'] && $config['country_flags']['highscores']) ? true : false;
$loadOutfits = ($config['show_outfits']['highscores']) ? true : false;

$rows = $highscore['rows'];
$rowsPerPage = $highscore['rowsPerPage'];

function skillName($type) {
    $types = array(
        1 => "Club",
        2 => "Sword",
        3 => "Axe",
        4 => "Distance",
        5 => "Shield",
        6 => "Fish",
        7 => "Experience", // Hardcoded
        8 => "Magic Level", // Hardcoded
        9 => "Fist", // Since 0 returns false I will make 9 = 0. :)
    );
    return $types[(int)$type];
}

function pageCheck($index, $page, $rowPerPage) {
    return ($index < ($page * $rowPerPage) && $index >= ($page * $rowPerPage) - $rowPerPage) ? true : false;
}

$cache = new Cache('engine/cache/highscores');
if ($cache->hasExpired()) {
    $vocGroups = fetchAllScores($rows, $config['TFSVersion'], $highscore['ignoreGroupId'], $configVocations, $vocation, $loadFlags, $loadOutfits);
    $cache->setContent($vocGroups);
    $cache->save();
} else {
    $vocGroups = $cache->load();
}

if ($vocGroups) {
    $vocGroup = (is_array($vocGroups[$vocation])) ? $vocGroups[$vocation] : $vocGroups[$vocGroups[$vocation]];
    ?>
<br><img src="layout/images/titles/t_highscores.png"/><p><br>
    <h1>Ranking for <?php echo skillName($type) ?></h1>

<table>    <tbody>

<tr><td style="background: none;">
<table id="highscoresTable" class="table table-striped table-hover">
        <tbody><tr bgcolor="#20222c">

<td width="6%"class="whites" style=" background-color: #5d5b5b; color: #f9f6f6; ">Rank</td>
<td width="40%" class="whites" style=" background-color: #5d5b5b; color: #f9f6f6; ">Name</td>
<td width="20%" class="whites" style=" background-color: #5d5b5b; color: #f9f6f6; ">Vocation</td>
<td width="15%" class="whites" style=" background-color: #5d5b5b; color: #f9f6f6; ">Level</td>
<?php if ($type === 7) echo "<td colspan='1' style='background-color: #5d5b5b; color: #f9f6f6;' >Experience</td>"; ?>
                    </tr>


        <?php
        for ($i = 0; $i < count($vocGroup[$type]); $i++) {

            if ($vocGroup[$type] === false) {
                ?>
                <tr>
                    <td colspan="5">Nothing to show here yet.</td>
                </tr>
                <?php
            } else {
                if (pageCheck($i, $page, $rowsPerPage)) {
                    $flag = ($loadFlags === true && strlen($vocGroup[$type][$i]['flag']) > 1) ? '<img src="' . $config['country_flags']['server'] . '/' . $vocGroup[$type][$i]['flag'] . '.png">  ' : '';
                    ?>
                    <tr>
                        <?php if ($loadOutfits): ?>
                            <td class="outfitColumn"><img src="<?php echo $config['show_outfits']['imageServer']; ?>?id=<?php echo $vocGroup[$type][$i]['type']; ?>&addons=<?php echo $vocGroup[$type][$i]['addons']; ?>&head=<?php echo $vocGroup[$type][$i]['head']; ?>&body=<?php echo $vocGroup[$type][$i]['body']; ?>&legs=<?php echo $vocGroup[$type][$i]['legs']; ?>&feet=<?php echo $vocGroup[$type][$i]['feet']; ?>" alt="img"></td>
                        <?php endif; ?>
                        <td><?php echo $i+1; ?></td>
                        <td><?php echo $flag; ?><a href="characterprofile.php?name=<?php echo $vocGroup[$type][$i]['name']; ?>"><?php echo $vocGroup[$type][$i]['name']; ?></a></td>
                        <td><?php echo vocation_id_to_name($vocGroup[$type][$i]['vocation']); ?></td>
                        <td><?php echo $vocGroup[$type][$i]['value']; ?></td>
                        <?php if ($type === 7) echo "<td>". $vocGroup[$type][$i]['experience'] ."</td>"; ?>
                    </tr>
                    <?php
                }
            }

        }
        ?>

    </table>
                                <th width="15%" valign="top" align="right">
                        <table border="0" cellpadding="1" cellspacing="1">
                            <tbody><tr bgcolor="#20222c">
                               
                                <td class="whites" style="
    background-color: #5d5b5b;
    color: #f9f6f6;
">Choose a Skill</td>
                            </tr>
                            <tr bgcolor="#1b1e26">
                                <td>
                                    <a href="highscores.php" class="size_xs">Experience</a><br>
                                    <a href="highscores.php?type=8&vocation=all&page=1" class="size_xs">Magic</a><br>
                                    <a href="highscores.php?type=5&vocation=all&page=1" class="size_xs">Shielding</a><br>
                                    <a href="highscores.php?type=4&vocation=all&page=1" class="size_xs">Distance</a><br>
                                    <a href="highscores.php?type=9&vocation=all&page=1" class="size_xs">Fist</a><br>
                                    <a href="highscores.php?type=2&vocation=all&page=1" class="size_xs">Sword</a><br>
                                    <a href="highscores.php?type=3&vocation=all&page=1" class="size_xs">Axe</a><br>
                                    <a href="highscores.php?type=1&vocation=all&page=1" class="size_xs">Club</a><br>
                                    <a href="highscores.php?type=6&vocation=all&page=1" class="size_xs">Fishing</a><br>
                                </td>
                            </tr>
                        </tbody></table>
                    </th></tr></tbody></table>   

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

 

Link para o post
Compartilhar em outros sites
Em 03/12/2020 em 20:29, Mask Ghoul disse:

<?php require_once 'engine/init.php'; include 'layout/overall/header.php';

if ($config['log_ip']) {
    znote_visitor_insert_detailed_data(3);
}

// Fetch highscore type
$type = (isset($_GET['type'])) ? (int)getValue($_GET['type']) : 7;
if ($type > 9) $type = 7;

// Fetch highscore vocation
$configVocations = $config['vocations'];
//$debug['configVocations'] = $configVocations;

$vocationIds = array_keys($configVocations);

$vocation = 'all';
if (isset($_GET['vocation']) && is_numeric($_GET['vocation'])) {
    $vocation = (int)$_GET['vocation'];
    if (!in_array($vocation, $vocationIds)) {
        $vocation = "all";
    }
}

// Fetch highscore page
$page = getValue(@$_GET['page']);
if (!$page || $page == 0) $page = 1;
else $page = (int)$page;

$highscore = $config['highscore'];
$loadFlags = ($config['country_flags']['enabled'] && $config['country_flags']['highscores']) ? true : false;
$loadOutfits = ($config['show_outfits']['highscores']) ? true : false;

$rows = $highscore['rows'];
$rowsPerPage = $highscore['rowsPerPage'];

function skillName($type) {
    $types = array(
        1 => "Club",
        2 => "Sword",
        3 => "Axe",
        4 => "Distance",
        5 => "Shield",
        6 => "Fish",
        7 => "Experience", // Hardcoded
        8 => "Magic Level", // Hardcoded
        9 => "Fist", // Since 0 returns false I will make 9 = 0. :)
    );
    return $types[(int)$type];
}

function pageCheck($index, $page, $rowPerPage) {
    return ($index < ($page * $rowPerPage) && $index >= ($page * $rowPerPage) - $rowPerPage) ? true : false;
}

$cache = new Cache('engine/cache/highscores');
if ($cache->hasExpired()) {
    $vocGroups = fetchAllScores($rows, $config['TFSVersion'], $highscore['ignoreGroupId'], $configVocations, $vocation, $loadFlags, $loadOutfits);
    $cache->setContent($vocGroups);
    $cache->save();
} else {
    $vocGroups = $cache->load();
}

if ($vocGroups) {
    $vocGroup = (is_array($vocGroups[$vocation])) ? $vocGroups[$vocation] : $vocGroups[$vocGroups[$vocation]];
    ?>
<br><img src="layout/images/titles/t_highscores.png"/><p><br>
    <h1>Ranking for <?php echo skillName($type) ?></h1>

<table>    <tbody>

<tr><td style="background: none;">
<table id="highscoresTable" class="table table-striped table-hover">
        <tbody><tr bgcolor="#20222c">

<td width="6%"class="whites" style=" background-color: #5d5b5b; color: #f9f6f6; ">Rank</td>
<td width="40%" class="whites" style=" background-color: #5d5b5b; color: #f9f6f6; ">Name</td>
<td width="20%" class="whites" style=" background-color: #5d5b5b; color: #f9f6f6; ">Vocation</td>
<td width="15%" class="whites" style=" background-color: #5d5b5b; color: #f9f6f6; ">Level</td>
<?php if ($type === 7) echo "<td colspan='1' style='background-color: #5d5b5b; color: #f9f6f6;' >Experience</td>"; ?>
                    </tr>


        <?php
        for ($i = 0; $i < count($vocGroup[$type]); $i++) {

            if ($vocGroup[$type] === false) {
                ?>
                <tr>
                    <td colspan="5">Nothing to show here yet.</td>
                </tr>
                <?php
            } else {
                if (pageCheck($i, $page, $rowsPerPage)) {
                    $flag = ($loadFlags === true && strlen($vocGroup[$type][$i]['flag']) > 1) ? '<img src="' . $config['country_flags']['server'] . '/' . $vocGroup[$type][$i]['flag'] . '.png">  ' : '';
                    ?>
                    <tr>
                        <?php if ($loadOutfits): ?>
                            <td class="outfitColumn"><img src="<?php echo $config['show_outfits']['imageServer']; ?>?id=<?php echo $vocGroup[$type][$i]['type']; ?>&addons=<?php echo $vocGroup[$type][$i]['addons']; ?>&head=<?php echo $vocGroup[$type][$i]['head']; ?>&body=<?php echo $vocGroup[$type][$i]['body']; ?>&legs=<?php echo $vocGroup[$type][$i]['legs']; ?>&feet=<?php echo $vocGroup[$type][$i]['feet']; ?>" alt="img"></td>
                        <?php endif; ?>
                        <td><?php echo $i+1; ?></td>
                        <td><?php echo $flag; ?><a href="characterprofile.php?name=<?php echo $vocGroup[$type][$i]['name']; ?>"><?php echo $vocGroup[$type][$i]['name']; ?></a></td>
                        <td><?php echo vocation_id_to_name($vocGroup[$type][$i]['vocation']); ?></td>
                        <td><?php echo $vocGroup[$type][$i]['value']; ?></td>
                        <?php if ($type === 7) echo "<td>". $vocGroup[$type][$i]['experience'] ."</td>"; ?>
                    </tr>
                    <?php
                }
            }

        }
        ?>

    </table>
                                <th width="15%" valign="top" align="right">
                        <table border="0" cellpadding="1" cellspacing="1">
                            <tbody><tr bgcolor="#20222c">
                               
                                <td class="whites" style="
    background-color: #5d5b5b;
    color: #f9f6f6;
">Choose a Skill</td>
                            </tr>
                            <tr bgcolor="#1b1e26">
                                <td>
                                    <a href="highscores.php" class="size_xs">Experience</a><br>
                                    <a href="highscores.php?type=8&vocation=all&page=1" class="size_xs">Magic</a><br>
                                    <a href="highscores.php?type=5&vocation=all&page=1" class="size_xs">Shielding</a><br>
                                    <a href="highscores.php?type=4&vocation=all&page=1" class="size_xs">Distance</a><br>
                                    <a href="highscores.php?type=9&vocation=all&page=1" class="size_xs">Fist</a><br>
                                    <a href="highscores.php?type=2&vocation=all&page=1" class="size_xs">Sword</a><br>
                                    <a href="highscores.php?type=3&vocation=all&page=1" class="size_xs">Axe</a><br>
                                    <a href="highscores.php?type=1&vocation=all&page=1" class="size_xs">Club</a><br>
                                    <a href="highscores.php?type=6&vocation=all&page=1" class="size_xs">Fishing</a><br>
                                </td>
                            </tr>
                        </tbody></table>
                    </th></tr></tbody></table>   

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

 

Mask, muito obrigado por responder

eu incluí esses codigos, mas aí mudou o erro pra 

Fatal error: Uncaught Error: Call to undefined method Cache::save() in C:\xampp\htdocs\highscores.php:59 Stack trace: #0 {main} thrown in C:\xampp\htdocs\highscores.php on line 59

 


 

 

Link para o post
Compartilhar em outros sites

Participe da conversa

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

Visitante
Responder

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

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

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

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

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo