Postado Junho 23, 2015 9 anos Tutorial Crie um arquivo chamado lottery.php e coloque: <?PHP $main_content .= '<center><h1>Lottery</h1><h3>Lotterys held at 9:00, 14:00, 19:00 and 24:00 hour, polish time.</h3></center><br><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><tr BGCOLOR="'.$config['site']['vdarkborder'].'"><td CLASS=white><center><b>Player Name</b></center></td><td CLASS=white width=184 colspan=2><center><b>Winning Item</b></center></td><td width=100 CLASS=white><center><b>World</b></center></td></tr>'; $lottery = $SQL->query('SELECT id, name, item, world_id FROM lottery WHERE world_id = 0 ORDER BY id DESC;'); foreach($lottery as $result) { $players++; if(is_int($players / 2)) $bgcolor = $config['site']['lightborder']; else $bgcolor = $config['site']['darkborder']; $main_content .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=35%><center><a href="?subtopic=characters&name='.urlencode($result['name']).'">'.$result['name'].'</a></center></td><TD WIDTH=5%><img src=\'/images/'.urlencode($result['item']).'.gif\'></td><TD WIDTH=30%><b>'.$result['item'].'</b></td><TD WIDTH=30%><center>NOME DO SEU SERVIDOR</center></td></tr>'; } $main_content .= '</table>'; ?> Agora abra index.php e procure por: case "latestnews": $topic = "Latest News"; $subtopic = "latestnews"; include("latestnews.php"); break; E em cima, coloque: case "lottery"; $subtopic = "lottery"; $topic = "Lottery"; include("lottery.php"); break; Créditos: Meferot
Postado Junho 24, 2015 9 anos Em nome da comunidade do TK, muito obrigado pela contribuição! Seu tópico de conteúdo foi aprovado e será movido para a seção adequada. Você ganhou 1 REP+!
Postado Julho 10, 2015 9 anos meu index.php tiene iso!! <?php // comment to show E_NOTICE [undefinied variable etc.], comment if you want make script and see all errors error_reporting(E_ALL ^ E_STRICT ^ E_NOTICE); // true = show sent queries and SQL queries status/status code/error message define('DEBUG_DATABASE', false); define('INITIALIZED', true); // if not defined before, set 'false' to load all normal if(!defined('ONLY_PAGE')) define('ONLY_PAGE', false); // check if site is disabled/requires installation include_once('./system/load.loadCheck.php'); // fix user data, load config, enable class auto loader include_once('./system/load.init.php'); // DATABASE include_once('./system/load.database.php'); if(DEBUG_DATABASE) Website::getDBHandle()->setPrintQueries(true); // DATABASE END // LOGIN if(!ONLY_PAGE) include_once('./system/load.login.php'); // LOGIN END // COMPAT // some parts in that file can be blocked because of ONLY_PAGE constant include_once('./system/load.compat.php'); // COMPAT END // LOAD PAGE include_once('./system/load.page.php'); // LOAD PAGE END // LAYOUT // with ONLY_PAGE we return only page text, not layout if(!ONLY_PAGE) include_once('./system/load.layout.php'); else echo $main_content; // LAYOUT END
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.