Ir para conteúdo

Featured Replies

Postado

Pera lá... vocês estão entrando em detalhes desnecessario. Vamos começar do 0!

Você adicionou o valor 6 em page_access em sua conta, certo?

Após ter feito isso tente acessar http://127.0.0.1//index.php/admin

Creio que irá funcionar sem problemas. Agora me envie em spoiler o seu index.php.

════ҳ̸Ҳ̸ҳஜ۩۞۩ஜҳ̸Ҳ̸ҳ═══╗

Te Ajudei? Rep + e ficamos Quits

166420979_logoyanliimaornight.png.33f822b8970081a5b3646e85dbfd5934.png

Precisando de ajuda?

discord.png.1ecd188791d0141f74d99db371a2e0a4.png.890d5a38d7bcde75543c72b624a65de1.pngDiscord: Yan Liima #3702

Programador Júnior de LUA, PHP e JavaScript

Juntos somos lendas, separados somos Mitos!

╚══════════════════════════ҳ̸Ҳ̸ҳஜ۩۞۩ஜҳ̸Ҳ̸ҳ═════════════════════════════╝

  • Respostas 23
  • Visualizações 1.9k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Não tem erro, nem aparece o botao da administração.   Adminpanel.php nao existe:     Tenho esses arquivos de admin:  

  • @jakons tentei as duas formas e deu isso    

  • Certo, em seu config.php verifique essa linha: $config['adminAccess'] Deve estar assim: $config['adminAccess'] = 5; Caso estiver outro valor e você alterar, você terá que relogar novamen

Posted Images

Postado
  • Autor
1 minuto atrás, Yan Liima disse:

Pera lá... vocês estão entrando em detalhes desnecessario. Vamos começar do 0!

Você adicionou o valor 6 em page_access em sua conta, certo?

Após ter feito isso tente acessar http://127.0.0.1//index.php/admin

Creio que irá funcionar sem problemas. Agora me envie em spoiler o seu index.php.

 

 

Sim adicionei!

 

ao tentar acessar essa URL ele redirecionar para a pagina login, mesmo eu ja estando logado.

 

Segue em Spoiler >> Index.tpl

 

Spoiler

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="distribution" content="Global" />
        <meta name="author" content="Vean" />
        <meta name="robots" content="index,follow" />
        <meta name="description" content="Site Description." />
        <meta name="keywords" content="ots, open tibia server, ..." />
        {$head}
        <title>.::NarutoWarShinobi::.</title>
        <link rel="stylesheet" type="text/css" href="{$path}/templates/NQO-By Mateushurley/main.css" />
        <link href="{$path}/templates/NQO-By Mateushurley/favicon.ico" rel="shortcut icon" />
        <link href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet">
    </head>
     {$admin} 
    <!--Google-->
    <script type="text/javascript">

      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-15249041-2']);
      _gaq.push(['_trackPageview']);

      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();

    </script>
    <body>
        <div id="vt_page">
            <div id="vt_header"></div>
            <div id="vt_container">
                <div id="vt_menu">
                    <div id="vt_news_menu">
<center>
                        <div class="header"></div></center>
                        <ul>
                            <li><a href="{$path}">Novidades</a></li>
                            <li><a href="{$path}/index.php/bugtracker">Bugs Reportados</a></li>
                        </ul>
                    </div>
                    <div id="vt_account_menu"><center>
                        <div class="serv"></div></center>
                        <ul>
                            {if $logged == 1}
                            <li><a href="{$path}/index.php/account/">Minha Conta</a></li>
                            <li><a href="{$path}/index.php//p/v/pagseguro">Donate</a></li>
                            <li><a href="{$path}/index.php/p/v/gifts/">Shop</a></li>
                            <li><a href="{$path}/index.php/p/v/chars">Venda de Chars</a></li>
                            {else}
                            <li><a href="{$path}/index.php/account/create">Criar Conta</a></li>
                            <li><a href="{$path}/index.php/account/login">Login</a></li>
                            <li><a href="{$path}/index.php/p/v/pacc">Premmy Points</a></li>
                            <li><a href="{$path}/index.php/p/v/vpacc">Vantagens Premmy</a></li>
                            <li><a href="{$path}/index.php/p/v/chars">Venda de Chars</a></li>
                        
                            {/if}
                        </ul>
                    </div>
                    <div id="vt_community_menu">
                        <div class="comu"></div>
                        <ul>
                            <li><a href="{$path}/index.php/p/v/ts">Teamspeak</a></li>
                            <li><a href="{$path}/index.php/character/view">Procurar Personagem</a></li>
                            <li><a href="{$path}/index.php/guilds">Guilds</a></li>
                            <li><a href="{$path}/index.php/p/v/fragers">Top fraggers</a></li>    
                            <li><a href="{$path}/index.php/video">Videos</a></li>    
                            <!--<li><a href="{$path}/index.php/houses/main">Casas</a></li>    -->
                            <li><a href="{$path}/index.php/p/v/deaths">Ultimas Mortes</a></li>    
                            <li><a href="{$path}/index.php/p/v/gallery">Galeria</a></li>    
                            <li><a href="{$path}/index.php/highscores">Rank</a></li>    
                            <li><a href="{$path}/index.php/profile/community">Comunidade</a></li>
                             <li><a href="{$path}/index.php/character/online">Online</a></li>

                        </ul>
                    </div>
                    <div class="info"></div>
                    <ul>
                              <li><a href="{$path}/index.php/p/v/guia">Guia</a></li>
                            <li><a href="{$path}/index.php/p/v/faq">FAQ</a></li>
                            <li><a href="{$path}/index.php/p/v/regras">Regras</a></li>
                            </ul>
                    </div>
                <div id="vt_content">
                    {$main}
                </div>
                <div id="vt_panel">
                    <div class="top">
                        <div class="bot">
                            <div id="vt_panel_buttons">
                                <a href="" class="button">
                                     <span></span>
                                </a>
                                
                                <a href="{$path}/index.php/p/v/gifts" class="button2"></a>
                            <div class="vt_panel_module"><center>
                                <div class="header"></div></centeR>
                                {foreach from=$worlds key=id item=world}
                                <div>
                                    <b>Servidor:</b> {$world} <br />
                                    <b>Status:</b>  
                                    {if $serverOnline[$id]}
                                        <span style="color: green;font-weight: bold;">Online</span><br />
                                        <b>Uptime:</b> {$serverUptime[$id]} <br />
                                        <b>Players:</b> {$serverPlayers[$id]}/{$serverMax[$id]}<br /><br />
                                    {else}
                                        <span style="color: red;font-weight: bold;">Offline</span>
                                    {/if}
                                </div>

                                {/foreach}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div id="vt_footer">
                <div class="column first img-colunf">
                    <!--<a href="#"><img src="{$path}/templates/NQO-By Mateushurley/images/authornote.fw.png" alt="Designed by Mateushurley" /></a>-->
                </div>
                <div class="column second" style="color:#fff;width:100%;">
                    <p> NTOWar Shinobi Seus Direitos Reservados. 2019    <br> Personagens e ilustrações originais Copyright 2002 por Masashi Kishimoto. Todos os direitos reservados.        <p><small>Page rendered in: {$renderTime} {$admin}</small></p>
                </div>
                <div class="column third">

                </div>
            </div>
        </div>
    </body>
</html>

 

AJfwFit.png&key=fe4d679c24a3f021c13992ab

Postado
Agora, joaovitorbk9 disse:

 

Sim adicionei!

 

ao tentar acessar essa URL ele redirecionar para a pagina login, mesmo eu ja estando logado.

 

Segue em Spoiler >> Index.tpl

 

  Mostrar conteúdo oculto

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="distribution" content="Global" />
        <meta name="author" content="Vean" />
        <meta name="robots" content="index,follow" />
        <meta name="description" content="Site Description." />
        <meta name="keywords" content="ots, open tibia server, ..." />
        {$head}
        <title>.::NarutoWarShinobi::.</title>
        <link rel="stylesheet" type="text/css" href="{$path}/templates/NQO-By Mateushurley/main.css" />
        <link href="{$path}/templates/NQO-By Mateushurley/favicon.ico" rel="shortcut icon" />
        <link href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet">
    </head>
     {$admin} 
    <!--Google-->
    <script type="text/javascript">

      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-15249041-2']);
      _gaq.push(['_trackPageview']);

      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();

    </script>
    <body>
        <div id="vt_page">
            <div id="vt_header"></div>
            <div id="vt_container">
                <div id="vt_menu">
                    <div id="vt_news_menu">
<center>
                        <div class="header"></div></center>
                        <ul>
                            <li><a href="{$path}">Novidades</a></li>
                            <li><a href="{$path}/index.php/bugtracker">Bugs Reportados</a></li>
                        </ul>
                    </div>
                    <div id="vt_account_menu"><center>
                        <div class="serv"></div></center>
                        <ul>
                            {if $logged == 1}
                            <li><a href="{$path}/index.php/account/">Minha Conta</a></li>
                            <li><a href="{$path}/index.php//p/v/pagseguro">Donate</a></li>
                            <li><a href="{$path}/index.php/p/v/gifts/">Shop</a></li>
                            <li><a href="{$path}/index.php/p/v/chars">Venda de Chars</a></li>
                            {else}
                            <li><a href="{$path}/index.php/account/create">Criar Conta</a></li>
                            <li><a href="{$path}/index.php/account/login">Login</a></li>
                            <li><a href="{$path}/index.php/p/v/pacc">Premmy Points</a></li>
                            <li><a href="{$path}/index.php/p/v/vpacc">Vantagens Premmy</a></li>
                            <li><a href="{$path}/index.php/p/v/chars">Venda de Chars</a></li>
                        
                            {/if}
                        </ul>
                    </div>
                    <div id="vt_community_menu">
                        <div class="comu"></div>
                        <ul>
                            <li><a href="{$path}/index.php/p/v/ts">Teamspeak</a></li>
                            <li><a href="{$path}/index.php/character/view">Procurar Personagem</a></li>
                            <li><a href="{$path}/index.php/guilds">Guilds</a></li>
                            <li><a href="{$path}/index.php/p/v/fragers">Top fraggers</a></li>    
                            <li><a href="{$path}/index.php/video">Videos</a></li>    
                            <!--<li><a href="{$path}/index.php/houses/main">Casas</a></li>    -->
                            <li><a href="{$path}/index.php/p/v/deaths">Ultimas Mortes</a></li>    
                            <li><a href="{$path}/index.php/p/v/gallery">Galeria</a></li>    
                            <li><a href="{$path}/index.php/highscores">Rank</a></li>    
                            <li><a href="{$path}/index.php/profile/community">Comunidade</a></li>
                             <li><a href="{$path}/index.php/character/online">Online</a></li>

                        </ul>
                    </div>
                    <div class="info"></div>
                    <ul>
                              <li><a href="{$path}/index.php/p/v/guia">Guia</a></li>
                            <li><a href="{$path}/index.php/p/v/faq">FAQ</a></li>
                            <li><a href="{$path}/index.php/p/v/regras">Regras</a></li>
                            </ul>
                    </div>
                <div id="vt_content">
                    {$main}
                </div>
                <div id="vt_panel">
                    <div class="top">
                        <div class="bot">
                            <div id="vt_panel_buttons">
                                <a href="" class="button">
                                     <span></span>
                                </a>
                                
                                <a href="{$path}/index.php/p/v/gifts" class="button2"></a>
                            <div class="vt_panel_module"><center>
                                <div class="header"></div></centeR>
                                {foreach from=$worlds key=id item=world}
                                <div>
                                    <b>Servidor:</b> {$world} <br />
                                    <b>Status:</b>  
                                    {if $serverOnline[$id]}
                                        <span style="color: green;font-weight: bold;">Online</span><br />
                                        <b>Uptime:</b> {$serverUptime[$id]} <br />
                                        <b>Players:</b> {$serverPlayers[$id]}/{$serverMax[$id]}<br /><br />
                                    {else}
                                        <span style="color: red;font-weight: bold;">Offline</span>
                                    {/if}
                                </div>

                                {/foreach}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div id="vt_footer">
                <div class="column first img-colunf">
                    <!--<a href="#"><img src="{$path}/templates/NQO-By Mateushurley/images/authornote.fw.png" alt="Designed by Mateushurley" /></a>-->
                </div>
                <div class="column second" style="color:#fff;width:100%;">
                    <p> NTOWar Shinobi Seus Direitos Reservados. 2019    <br> Personagens e ilustrações originais Copyright 2002 por Masashi Kishimoto. Todos os direitos reservados.        <p><small>Page rendered in: {$renderTime} {$admin}</small></p>
                </div>
                <div class="column third">

                </div>
            </div>
        </div>
    </body>
</html>

 

 

Certo, em seu config.php verifique essa linha:

$config['adminAccess']

Deve estar assim:

$config['adminAccess'] = 5;

Caso estiver outro valor e você alterar, você terá que relogar novamente.

Sobre o index.php que eu pedi, é o que fica no inicio. htdocs/index.php.

════ҳ̸Ҳ̸ҳஜ۩۞۩ஜҳ̸Ҳ̸ҳ═══╗

Te Ajudei? Rep + e ficamos Quits

166420979_logoyanliimaornight.png.33f822b8970081a5b3646e85dbfd5934.png

Precisando de ajuda?

discord.png.1ecd188791d0141f74d99db371a2e0a4.png.890d5a38d7bcde75543c72b624a65de1.pngDiscord: Yan Liima #3702

Programador Júnior de LUA, PHP e JavaScript

Juntos somos lendas, separados somos Mitos!

╚══════════════════════════ҳ̸Ҳ̸ҳஜ۩۞۩ஜҳ̸Ҳ̸ҳ═════════════════════════════╝

Postado
  • Autor
3 minutos atrás, Yan Liima disse:

Certo, em seu config.php verifique essa linha:


$config['adminAccess']

Deve estar assim:


$config['adminAccess'] = 5;

Caso estiver outro valor e você alterar, você terá que relogar novamente.

Sobre o index.php que eu pedi, é o que fica no inicio. htdocs/index.php.

 

@Yan Liima 

não achei esse $config['adminAcess']

 

Desculpa, agora que vi mandei o tpl...

index.php

Spoiler

<?php
session_start();
ob_start();
$start = microtime(true); 
require("config.php");
if($config['server_name'] == "%SERVER_NAME%") {
header("Location: install/");
exit;
}
if(USING_WINDOWS && $config['engine']['loadManagement'])
    exit("Load management is not available on Windows. Please switch it off in config.php");
else if(USING_WINDOWS == 0 && $config['engine']['loadManagement']) {
    $process = sys_getloadavg(); 
    if ($process[0] > $config['engine']['maxLoad']) { 
        header('HTTP/1.1 503 Too busy, try again later'); 
        die('IDE Dropped connection with you. The server is too busy. Please try again later.');
    }
}
/*
|---------------------------------------------------------------
| PHP ERROR REPORTING LEVEL
|---------------------------------------------------------------
|
| By default CI & IDE runs with error reporting set to ALL.  For security
| reasons you are encouraged to change this when your site goes live.
| For more info visit: http://www.php.net/error_reporting
|
*/
    error_reporting(E_ALL);

/*
|---------------------------------------------------------------
| SYSTEM FOLDER NAME
|---------------------------------------------------------------
|
| This variable must contain the name of your "system" folder.
| Include the path if the folder is not in the same  directory
| as this file.
|
| NO TRAILING SLASH!
|
*/
    $system_folder = "system";

/*
|---------------------------------------------------------------
| APPLICATION FOLDER NAME
|---------------------------------------------------------------
|
| If you want this front controller to use a different "application"
| folder then the default one you can set its name here. The folder 
| can also be renamed or relocated anywhere on your server.
|
|
| NO TRAILING SLASH!
|
*/
    $application_folder = "application";
/*     
| Define template name
 */
    $template = $config['layout'];
    
/* Full website address including HTTP:// Without slash at the end! */
    $website = $config['website'];
    
/* Default time zone for the server must be set here. */
    date_default_timezone_set($config['timezone']);

/* Set the default title of a website. */
    $title = $config['title'];
/*
|===============================================================
| END OF USER CONFIGURABLE SETTINGS
|===============================================================
*/

    require("system/api.php");
    if(!DEFINED("API_KEY") or !DEFINED("API_PASS"))
        exit("This server does not have API_KEY or API_PASS set properly. If you are administrator of this server check the system/api.php in order to set the right properties, or try reinstalling this system. Err code: 150024042010");

    require("system/version.php");
        if(!DEFINED("VERSION"))
            exit("This server has not specified version of running system. If you are administrator of this server check the system/version.php file or download & install new version of this system. Err code: 154124042010");
/*
|---------------------------------------------------------------
| SET THE SERVER PATH
|---------------------------------------------------------------
|
| Let's attempt to determine the full-server path to the "system"
| folder in order to reduce the possibility of path problems.
| Note: We only attempt this if the user hasn't specified a 
| full server path.
|
*/
if(file_exists("system/users.php")) {$users = json_decode(file_get_contents("system/users.php"), TRUE); if(!empty($users) && array_key_exists($_SERVER['REMOTE_ADDR'], $users)) exit("<b><font color='red'>You have been globaly banned by the Modern AAC! Reason: ".$users[$_SERVER['REMOTE_ADDR']]."</b></font>");}                    
if (strpos($system_folder, '/') === FALSE)
{
    if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
    {
        $system_folder = realpath(dirname(__FILE__)).'/'.$system_folder;
    }
}
else
{
    // Swap directory separators to Unix style for consistency
    $system_folder = str_replace("\\", "/", $system_folder); 
}

if(!file_exists("templates/".$template."/index.tpl")) {
    exit("Template could not be loaded. Err code: 135604042010");
}

if(empty($_SESSION['access'])) $_SESSION['access'] = 0;
/*
|---------------------------------------------------------------
| DEFINE APPLICATION CONSTANTS
|---------------------------------------------------------------
|
| EXT        - The file extension.  Typically ".php"
| SELF        - The name of THIS file (typically "index.php")
| FCPATH    - The full server path to THIS file
| BASEPATH    - The full server path to the "system" folder
| APPPATH    - The full server path to the "application" folder
| CURRENT     - The full URL of current page
|
*/


define('EXT', '.php');
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
define('FCPATH', str_replace(SELF, '', __FILE__));
define('BASEPATH', $system_folder.'/');
define('CURRENT', "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']);
if (is_dir($application_folder))
{
    define('APPPATH', $application_folder.'/');
}
else
{
    if ($application_folder == '')
    {
        $application_folder = 'application';
    }
    define('APPPATH', BASEPATH.$application_folder.'/');
}
require_once(APPPATH.'/libraries/system.php');
$ide = new IDE;
if(!DEFINED("SYSTEM_STOP")) {
if(!@is_array($_SESSION['actions'])) $_SESSION['actions'] = array();
@array_unshift($_SESSION['actions'], array('time'=>time(), 'action'=>'Redirected to: http://'.$_SERVER['SERVER_ADDR'].$_SERVER['PHP_SELF']));
if(@count($_SESSION['actions']) > $config['actionsCount'])
    @array_pop($_SESSION['actions']);
}
/*
|---------------------------------------------------------------
| LOAD THE FRONT CONTROLLER
|---------------------------------------------------------------
|
| And away we go...
|
*/
require_once(APPPATH.'/libraries/Smarty.class.php');
require(APPPATH."libraries/POT/OTS.php");
require_once BASEPATH.'codeigniter/CodeIgniter'.EXT;
if(DEFINED('TITLE')) $config['title'] = TITLE;
$ide->loadEvent("onLoad");

/* Check the server's compatybility with the engine. */
if(!is_php($config['engine']['PHPversion'])) show_error("Your server runs verion of PHP older than ".$config['engine']['PHPversion'].". Please update in order to use this system. Err code: 140704042010");

if(!DEFINED("SYSTEM_STOP")) {
    $CI =& get_instance();
    $CI->load->helper("url");
    $controller = $CI->uri->segment(1);
    $method = $CI->uri->segment(2);
    
    #This is required in order to make work new community modules when upgrading from older Modern AAC versions.
    if($ide->isLogged() && $controller != "account" && $method != "setNickname" && empty($_SESSION['nickname'])) $ide->redirect(WEBSITE."/index.php/account/setNickname");
    
$contents = ob_get_contents();
$contents = wordWrapIgnoreHTML($contents, $config['wrap_words'], '<br />'); 
ob_end_clean();
require_once(APPPATH.'config/database.php');
/* Some basic actions */
if(empty($_SESSION['logged'])) $_SESSION['logged'] = 0;
$smarty = new Smarty;
    if(file_exists("templates/".$template."/alters/".$controller."_".$method."/index.tpl"))
        $smarty->template_dir = "templates/".$template."/alters/".$controller."_".$method;
    else if(file_exists("templates/".$template."/alters/".$controller."/index.tpl"))
        $smarty->template_dir = "templates/".$template."/alters/".$controller;
    else
        $smarty->template_dir = "templates/".$template;

$smarty->config_dir = ' configs';
$smarty->cache_dir = 'cache';
$smarty->compile_dir = 'compile';
@$logged = ($_SESSION['logged'] == 1) ? 1 : 0;
$head = '<link type="text/css" href="'.$website.'/public/css/system.css" rel="stylesheet" /><link type="text/css" href="'.$website.'/public/css/'.$config['UItheme'].'" rel="stylesheet" /><script type="text/javascript" src="'.$website.'/public/js/jquery-1.4.2.min.js"></script><script type="text/javascript" src="'.WEBSITE.'/public/js/jquery.ui.datetimepicker.js"></script><script type="text/javascript" src="'.$website.'/public/js/system.js"></script><script type="text/javascript" src="'.$website.'/public/js/jquery-ui-1.8.custom.min.js"></script><link rel="stylesheet" href="'.WEBSITE.'/public/css/tipsy.css" type="text/css" /><script type="text/javascript" src="'.WEBSITE.'/public/js/jquery.tipsy.js"></script><link rel="stylesheet" type="text/css" href="'.WEBSITE.'/public/css/tooltip.css" /> <script type="text/javascript" src="'.WEBSITE.'/public/js/tooltip.js"></script>';
require("system/template_variables.php");
if($ide->isAdmin())
    $smarty->assign('admin', '[<a href="'.$website.'/index.php/admin">Administration</a>]');
else
    $smarty->assign('admin', '');


/* POLL SYSTEM by tatu hunter
   DONT CHANGE IF YOU DONT KNOW WHAT ARE YOU DOING */
/*$CI->load->model('poll_model', 'poll');
$data['poll'] = $CI->poll->getLastPoll();

if($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['poll_id']) && $_POST['poll_id'] && isset($_POST['answer_id']) && $_POST['answer_id']) {
    $CI->poll->doVote($_POST);
    $data['poll'] = $CI->poll->getLastPoll();
}

$poll = $CI->load->view('poll', $data, true);
$smarty->assign('poll', $poll);
*/
/* END POLL SYSTEM */

$totaltime = round((microtime(true) - $start), 4); 
$smarty->assign('renderTime', $totaltime);
$smarty->assign('title', $config['title']);
$smarty->assign('controller', strtolower($controller));
$smarty->assign('method', strtolower($method));
$smarty->display('index.tpl');
if($ide->isAdmin() && $config['adminWindow']) {
    require("system/adminWindow.php");
}
$ide->loadEvent("onReady");
}
$_SESSION['previous'] = curPageURL();
/* End of file index.php */
/* Location: ./index.php */

 

Editado por joaovitorbk9 (veja o histórico de edições)

AJfwFit.png&key=fe4d679c24a3f021c13992ab

Postado
2 minutos atrás, joaovitorbk9 disse:

 

Desculpa, agora que vi mandei o tpl...

 

  Mostrar conteúdo oculto

<?php
session_start();
ob_start();
$start = microtime(true); 
require("config.php");
if($config['server_name'] == "%SERVER_NAME%") {
header("Location: install/");
exit;
}
if(USING_WINDOWS && $config['engine']['loadManagement'])
    exit("Load management is not available on Windows. Please switch it off in config.php");
else if(USING_WINDOWS == 0 && $config['engine']['loadManagement']) {
    $process = sys_getloadavg(); 
    if ($process[0] > $config['engine']['maxLoad']) { 
        header('HTTP/1.1 503 Too busy, try again later'); 
        die('IDE Dropped connection with you. The server is too busy. Please try again later.');
    }
}
/*
|---------------------------------------------------------------
| PHP ERROR REPORTING LEVEL
|---------------------------------------------------------------
|
| By default CI & IDE runs with error reporting set to ALL.  For security
| reasons you are encouraged to change this when your site goes live.
| For more info visit: http://www.php.net/error_reporting
|
*/
    error_reporting(E_ALL);

/*
|---------------------------------------------------------------
| SYSTEM FOLDER NAME
|---------------------------------------------------------------
|
| This variable must contain the name of your "system" folder.
| Include the path if the folder is not in the same  directory
| as this file.
|
| NO TRAILING SLASH!
|
*/
    $system_folder = "system";

/*
|---------------------------------------------------------------
| APPLICATION FOLDER NAME
|---------------------------------------------------------------
|
| If you want this front controller to use a different "application"
| folder then the default one you can set its name here. The folder 
| can also be renamed or relocated anywhere on your server.
|
|
| NO TRAILING SLASH!
|
*/
    $application_folder = "application";
/*     
| Define template name
 */
    $template = $config['layout'];
    
/* Full website address including HTTP:// Without slash at the end! */
    $website = $config['website'];
    
/* Default time zone for the server must be set here. */
    date_default_timezone_set($config['timezone']);

/* Set the default title of a website. */
    $title = $config['title'];
/*
|===============================================================
| END OF USER CONFIGURABLE SETTINGS
|===============================================================
*/

    require("system/api.php");
    if(!DEFINED("API_KEY") or !DEFINED("API_PASS"))
        exit("This server does not have API_KEY or API_PASS set properly. If you are administrator of this server check the system/api.php in order to set the right properties, or try reinstalling this system. Err code: 150024042010");

    require("system/version.php");
        if(!DEFINED("VERSION"))
            exit("This server has not specified version of running system. If you are administrator of this server check the system/version.php file or download & install new version of this system. Err code: 154124042010");
/*
|---------------------------------------------------------------
| SET THE SERVER PATH
|---------------------------------------------------------------
|
| Let's attempt to determine the full-server path to the "system"
| folder in order to reduce the possibility of path problems.
| Note: We only attempt this if the user hasn't specified a 
| full server path.
|
*/
if(file_exists("system/users.php")) {$users = json_decode(file_get_contents("system/users.php"), TRUE); if(!empty($users) && array_key_exists($_SERVER['REMOTE_ADDR'], $users)) exit("<b><font color='red'>You have been globaly banned by the Modern AAC! Reason: ".$users[$_SERVER['REMOTE_ADDR']]."</b></font>");}                    
if (strpos($system_folder, '/') === FALSE)
{
    if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
    {
        $system_folder = realpath(dirname(__FILE__)).'/'.$system_folder;
    }
}
else
{
    // Swap directory separators to Unix style for consistency
    $system_folder = str_replace("\\", "/", $system_folder); 
}

if(!file_exists("templates/".$template."/index.tpl")) {
    exit("Template could not be loaded. Err code: 135604042010");
}

if(empty($_SESSION['access'])) $_SESSION['access'] = 0;
/*
|---------------------------------------------------------------
| DEFINE APPLICATION CONSTANTS
|---------------------------------------------------------------
|
| EXT        - The file extension.  Typically ".php"
| SELF        - The name of THIS file (typically "index.php")
| FCPATH    - The full server path to THIS file
| BASEPATH    - The full server path to the "system" folder
| APPPATH    - The full server path to the "application" folder
| CURRENT     - The full URL of current page
|
*/


define('EXT', '.php');
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
define('FCPATH', str_replace(SELF, '', __FILE__));
define('BASEPATH', $system_folder.'/');
define('CURRENT', "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']);
if (is_dir($application_folder))
{
    define('APPPATH', $application_folder.'/');
}
else
{
    if ($application_folder == '')
    {
        $application_folder = 'application';
    }
    define('APPPATH', BASEPATH.$application_folder.'/');
}
require_once(APPPATH.'/libraries/system.php');
$ide = new IDE;
if(!DEFINED("SYSTEM_STOP")) {
if(!@is_array($_SESSION['actions'])) $_SESSION['actions'] = array();
@array_unshift($_SESSION['actions'], array('time'=>time(), 'action'=>'Redirected to: http://'.$_SERVER['SERVER_ADDR'].$_SERVER['PHP_SELF']));
if(@count($_SESSION['actions']) > $config['actionsCount'])
    @array_pop($_SESSION['actions']);
}
/*
|---------------------------------------------------------------
| LOAD THE FRONT CONTROLLER
|---------------------------------------------------------------
|
| And away we go...
|
*/
require_once(APPPATH.'/libraries/Smarty.class.php');
require(APPPATH."libraries/POT/OTS.php");
require_once BASEPATH.'codeigniter/CodeIgniter'.EXT;
if(DEFINED('TITLE')) $config['title'] = TITLE;
$ide->loadEvent("onLoad");

/* Check the server's compatybility with the engine. */
if(!is_php($config['engine']['PHPversion'])) show_error("Your server runs verion of PHP older than ".$config['engine']['PHPversion'].". Please update in order to use this system. Err code: 140704042010");

if(!DEFINED("SYSTEM_STOP")) {
    $CI =& get_instance();
    $CI->load->helper("url");
    $controller = $CI->uri->segment(1);
    $method = $CI->uri->segment(2);
    
    #This is required in order to make work new community modules when upgrading from older Modern AAC versions.
    if($ide->isLogged() && $controller != "account" && $method != "setNickname" && empty($_SESSION['nickname'])) $ide->redirect(WEBSITE."/index.php/account/setNickname");
    
$contents = ob_get_contents();
$contents = wordWrapIgnoreHTML($contents, $config['wrap_words'], '<br />'); 
ob_end_clean();
require_once(APPPATH.'config/database.php');
/* Some basic actions */
if(empty($_SESSION['logged'])) $_SESSION['logged'] = 0;
$smarty = new Smarty;
    if(file_exists("templates/".$template."/alters/".$controller."_".$method."/index.tpl"))
        $smarty->template_dir = "templates/".$template."/alters/".$controller."_".$method;
    else if(file_exists("templates/".$template."/alters/".$controller."/index.tpl"))
        $smarty->template_dir = "templates/".$template."/alters/".$controller;
    else
        $smarty->template_dir = "templates/".$template;

$smarty->config_dir = ' configs';
$smarty->cache_dir = 'cache';
$smarty->compile_dir = 'compile';
@$logged = ($_SESSION['logged'] == 1) ? 1 : 0;
$head = '<link type="text/css" href="'.$website.'/public/css/system.css" rel="stylesheet" /><link type="text/css" href="'.$website.'/public/css/'.$config['UItheme'].'" rel="stylesheet" /><script type="text/javascript" src="'.$website.'/public/js/jquery-1.4.2.min.js"></script><script type="text/javascript" src="'.WEBSITE.'/public/js/jquery.ui.datetimepicker.js"></script><script type="text/javascript" src="'.$website.'/public/js/system.js"></script><script type="text/javascript" src="'.$website.'/public/js/jquery-ui-1.8.custom.min.js"></script><link rel="stylesheet" href="'.WEBSITE.'/public/css/tipsy.css" type="text/css" /><script type="text/javascript" src="'.WEBSITE.'/public/js/jquery.tipsy.js"></script><link rel="stylesheet" type="text/css" href="'.WEBSITE.'/public/css/tooltip.css" /> <script type="text/javascript" src="'.WEBSITE.'/public/js/tooltip.js"></script>';
require("system/template_variables.php");
if($ide->isAdmin())
    $smarty->assign('admin', '[<a href="'.$website.'/index.php/admin">Administration</a>]');
else
    $smarty->assign('admin', '');


/* POLL SYSTEM by tatu hunter
   DONT CHANGE IF YOU DONT KNOW WHAT ARE YOU DOING */
/*$CI->load->model('poll_model', 'poll');
$data['poll'] = $CI->poll->getLastPoll();

if($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['poll_id']) && $_POST['poll_id'] && isset($_POST['answer_id']) && $_POST['answer_id']) {
    $CI->poll->doVote($_POST);
    $data['poll'] = $CI->poll->getLastPoll();
}

$poll = $CI->load->view('poll', $data, true);
$smarty->assign('poll', $poll);
*/
/* END POLL SYSTEM */

$totaltime = round((microtime(true) - $start), 4); 
$smarty->assign('renderTime', $totaltime);
$smarty->assign('title', $config['title']);
$smarty->assign('controller', strtolower($controller));
$smarty->assign('method', strtolower($method));
$smarty->display('index.tpl');
if($ide->isAdmin() && $config['adminWindow']) {
    require("system/adminWindow.php");
}
$ide->loadEvent("onReady");
}
$_SESSION['previous'] = curPageURL();
/* End of file index.php */
/* Location: ./index.php */

 

 

Está tudo certo. Ele já tem a linha em que mostrar o texto de redirecionamento para o painel do administrador:

$smarty->assign('admin', '[<a href="'.$website.'/index.php/admin">Administration</a>]');

Recomendo revisar os passos. Vai na seu banco de dados em accounts edite apenas o page_access para 6:

202637754_Semttulo.png.4e18cbd3446820ea873e2ca8f679a8a0.png

O group_id não é necessario editar, ele apenas tornaria a conta toda praticamente um god, assim, mesmo tendo um jogador na conta, ele teria alguns privilegios a mais.

Após editar o page_access relogue sua conta. No fim do site deve ter o "Administration"

 

════ҳ̸Ҳ̸ҳஜ۩۞۩ஜҳ̸Ҳ̸ҳ═══╗

Te Ajudei? Rep + e ficamos Quits

166420979_logoyanliimaornight.png.33f822b8970081a5b3646e85dbfd5934.png

Precisando de ajuda?

discord.png.1ecd188791d0141f74d99db371a2e0a4.png.890d5a38d7bcde75543c72b624a65de1.pngDiscord: Yan Liima #3702

Programador Júnior de LUA, PHP e JavaScript

Juntos somos lendas, separados somos Mitos!

╚══════════════════════════ҳ̸Ҳ̸ҳஜ۩۞۩ஜҳ̸Ҳ̸ҳ═════════════════════════════╝

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 520.1k

Informação Importante

Confirmação de Termo