Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Proszę o pomoc!


awdqe

Rekomendowane odpowiedzi

Opublikowano

Witam, co trzeba wpisać by wyświetlało na stronie zawartość tabeli premium_points z bazy?

Chcę żeby było to pod wiadomością ile mamy dni pacc'a znajduje się to w 76 lini kodu.

 

A tu proszę kod:

  1. <?php 
    /*
        Copyright (C) 2007 - 2009  Nicaw
     
        This program is free software; you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        the Free Software Foundation; either version 2 of the License, or
        (at your option) any later version.
     
        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.
     
        You should have received a copy of the GNU General Public License along
        with this program; if not, write to the Free Software Foundation, Inc.,
        51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
    */
    include ("include.inc.php");
     
    try {
        $account = new Account();
        $account->load($_SESSION['account']);
    } catch(AccountNotFoundException $e) {
        $_SESSION['account'] = '';
        header('location: login.php?redirect=account.php');
        die();
    }
    $ptitle="Account - $cfg[server_name]";
    include ("header.inc.php");
    ?>
    <div id="content">
    <div class="top">Account</div>
    <div class="mid">
    <table style="width: 100%">
    <tr style="vertical-align: top"><td style="width: 200px;">
    <h3>Pick a Task</h3>
    <ul class="task-menu">
    <li onclick="ajax('ajax','modules/character_create.php','',true)" style="background-image: url(resource/user_add.png);">Create Character</li>
    <li onclick="ajax('ajax','modules/character_delete.php','',true)" style="background-image: url(resource/user_delete.png);">Delete Character</li>
    <?php if ($cfg['char_repair']){?>
    <li onclick="ajax('ajax','modules/character_repair.php','',true)" style="background-image: url(resource/user_edit.png);">Repair Character</li>
    <?php }?>
    <li onclick="ajax('ajax','modules/account_password.php','',true)" style="background-image: url(resource/key.png);">Change Password</li>
    <li onclick="ajax('ajax','modules/account_email.php','',true)" style="background-image: url(resource/email.png);">Change Email</li>
    <li onclick="ajax('ajax','modules/account_comments.php','',true)" style="background-image: url(resource/page_edit.png);">Edit Comments</li>
    <li onclick="ajax('ajax','modules/account_options.php','',true)" style="background-image: url(resource/wrench.png);">Account Options</li>
    <li onclick="ajax('ajax','modules/guild_create.php','',true)" style="background-image: url(resource/group_add.png);">Create Guild</li>
    <li onclick="window.location.href='login.php?logout&am  p;redirect=account.php'" style="background-image: url(resource/resultset_previous.png);">Logout</li>
     
    </ul>
    </td><td style="width: 130px;">
    <?php 
     
    if ($account->players){
    	echo '<h3>Characters</h3>'."\n";
    	echo '<ul class="task-menu">';
     
    	foreach ($account->players as $player){
    		echo '<li style="background-image: url(resource/user.png);" onclick="window.location.href=\'characters.php?pla  yer_id='.htmlspecialchars($player['id']).'\'">'.htmlspecialchars($player['name']).'</li>';
    	}
    	echo '</ul>';
    }
    if ($account->guilds){
    	echo '<h3>Guilds</h3>'."\n";
    	echo '<ul class="task-menu">';
    	foreach ($account->guilds as $guild){
    		echo '<li style="background-image: url(resource/group.png);" onclick="window.location.href=\'guilds.php?guild_i  d='.htmlspecialchars($guild['id']).'\'">'.htmlspecialchars($guild['name']).'</li>';
    	}
    	echo '</ul>';
    }
    ?>
    </td></tr>
    </table>
    <?php
    echo 'You have PPoints: ' - Co tu trzeba napisać?
    if(isset($account->attrs['premend']) && $account->attrs['premend'] > time()) {
        echo '<br><b>Premium status:</b> You have ';
        $days = ceil(($account->attrs['premend'] - time())/(3600*24));
        if($days <= 5) echo '<b style="color: red">';
            else echo '<b>';
        echo $days.'</b> day(s) left';
    }
    ?>
    <div id="ajax"></div>
    </div>
    <div class="bot"></div>
    </div>
    <?php 
    include ("footer.inc.php");
    ?>
    

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...