Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- ob_start('ob_gzhandler');
- if($_SERVER['REMOTE_ADDR'] !== '31.185.125.145')
- error_reporting(0);
- $time = microtime(true);
- if(!isset($_GET['subtopic']) || !($subtopic = $_GET['subtopic'])) {
- $subtopic = 'latestnews';
- }
- foreach(array(
- 'home' => array('latestnews' => 'Latest News'/*, 'archive' => 'News Archive'*/),
- 'account' => array('accountmanagement' => 'Account Management', 'createaccount' => 'Create Account', 'downloads' => 'Downloads', 'lostaccount' => 'Lost Account?'),
- 'community' => array('characters' => 'Characters', 'whoisonline' => 'Who is online?', 'highscores' => 'Highscores', 'houses' => 'Houses', 'guilds' => 'Guilds', 'guildwars' => 'Guild Wars', 'deaths' => 'Latest Deaths', 'frags' => 'Top Fraggers', 'addonmakers' => 'Addonmakers', 'questmakers' => 'Top Questmakers'/*, 'elo' => 'Elo Ranking'*/, 'achievements' => 'Achievements'),
- 'library' => array('achievements' => 'Achievements', 'serverinfo' => 'Serverinfo', 'items' => 'Items', 'mounts' => 'Mounts', 'tasks' => 'Tasks', 'topcountries' => 'Top Countries', 'killstatistics' => 'Kill Statistics'/*, 'zombie' => 'Zombie Highscores'*/, 'bans' => 'Ban List', 'topguilds' => 'Top Guilds', 'polls' => 'Polls', 'pg' => 'Powergamers', 'experiencetable' => 'Experience Table'),
- 'forum' => array('forum' => 'Forum Board','ticket' => 'Ticket Board'),
- 'shop' => array('buycoins' => 'Buy Coins', 'shop' => 'Donation Gifts', 'egypt' => 'Vodafone', 'shophistory' => 'Shop History', 'pay' => 'PayPal', 'bitcoin' => 'Bitcoin', 'paygol' => 'PayGol', 'payg' => 'PayG', 'paygol_f' => 'PayGol Success', 'paygol_c' => 'PayGol Failure', 'paygol_lt' => 'PayGol', 'paygol_lt_f' => 'PayGol Success', 'paygol_lt_c' => 'PayGol Failure'/*, 'polls' => 'Polls'*/),
- 'help' => array('ticketroom' => 'Ticket Room','faq' => 'FAQ', 'rules' => 'Server Rules', 'staff' => 'Staff'),
- 'admin' => array('adminpanel' => 'Admin Panel', 'shopadmin' => 'Shop Admin', 'changes' => 'Changes', 'codes' => 'Code Generator')
- ) as $k => $v) {
- foreach($v as $a => $b) {
- if($a === $subtopic) {
- $topic = array($k, $b);
- unset($k, $v, $a, $b);
- break;
- }
- }
- }
- if(!isset($topic)) {
- header('Location: /news');
- exit;
- }
- session_start();
- $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : NULL;
- $SQL = NULL; $qn=0; $qtime=0; $qstr = '';
- require 'config.php';
- function connect() {
- global $host, $dbname, $user, $pass;
- try {
- $GLOBALS['SQL'] = new PDO('mysql:host='.$host.';dbname='.$dbname, $user, $pass, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING, PDO::MYSQL_ATTR_COMPRESS => true, PDO::ATTR_PERSISTENT => true));
- }
- catch(PDOException $e) {
- die($e->getMessage());
- }
- }
- function query($q) {
- global $SQL;
- if($SQL === NULL)
- connect();
- ++$GLOBALS['qn'];
- $t = microtime(true);
- $res = $q[0] === 'S' ? $SQL->query($q) : $SQL->exec($q);
- $t = microtime(true) - $t;
- $GLOBALS['qtime'] += $t;
- return $res;
- }
- function quote($s) {
- global $SQL;
- if($SQL === NULL)
- connect();
- return $SQL->quote($s);
- }
- function lastInsertId() {
- global $SQL;
- if($SQL === NULL)
- connect();
- return $SQL->lastInsertId();
- }
- function redir($s) {
- header('Location: '.$s);
- exit;
- }
- function check_account_name($s) {
- $l = strlen($s);
- return $l >= 1 && $l <= 30 && strspn($s, 'QWERTYUIOPASDFGHJKLZXCVBNM0123456789') === $l;
- }
- function check_password($s) {
- $l = strlen($s);
- return $l >= 1 && $l <= 30 && strspn($s, 'qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789_') === $l;
- }
- function check_name($s) {
- $l = strlen($s);
- return $l >= 3 && $l <= 25 && strspn($s, 'qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM \'') === $l;
- }
- function timestr($t) {
- define('YEAR', 365 * 86400);
- define('MONTH', 30 * 86400);
- define('WEEK', 7 * 86400);
- define('DAY', 86400);
- define('HOUR', 3600);
- define('MINUTE', 60);
- if($t >= time())
- $t = $t - time();
- else
- $t = time() - $t;
- if($t >= YEAR) {
- $t = (int)($t / YEAR);
- $s = 'year';
- }
- elseif($t >= MONTH) {
- $t = (int)($t / MONTH);
- $s = 'month';
- }
- elseif($t >= WEEK) {
- $t = (int)($t / WEEK);
- $s = 'week';
- }
- elseif($t >= DAY) {
- $t = (int)($t / DAY);
- $s = 'day';
- }
- elseif($t >= HOUR) {
- $t = (int)($t / HOUR);
- $s = 'hour';
- }
- elseif($t >= MINUTE) {
- $t = (int)($t / MINUTE);
- $s = 'minute';
- }
- else
- $s = 'second';
- return $t .' '.$s.($t === 1 ? '' : 's');
- }
- if($subtopic === 'accountmanagement' && isset($_GET['page']) && $_GET['page'] === 'logout')
- session_unset();
- elseif($subtopic === 'createaccount' && isset($_POST['step']) && $_POST['step'] === 'docreate') {
- include('pages/createaccount2.inc');
- }
- $logged = false; $gid = 0;
- if(isset($_SESSION['account'])) {
- $acc = $_SESSION['account'];
- $pw = $_SESSION['password'];
- $first = false;
- }
- elseif(isset($_POST['account_login']) && isset($_POST['password_login'])) {
- $acc = strtoupper($_POST['account_login']);
- $pw = $_POST['password_login'];
- $first = true;
- }
- if(isset($acc)) {
- if( !$first || (check_account_name($acc) && check_password($pw)) ) {
- if($first) {
- if($sha1)
- $a = query("SELECT id FROM accounts WHERE name = '$acc' AND password=SHA1(CONCAT(salt, ".quote($pw)."))");
- else
- $a = query("SELECT id FROM accounts WHERE name = '$acc' AND password=".quote($pw));
- }
- else {
- if($sha1)
- $a = query("SELECT id,name,password,premdays,email,`key`,premium_points,page_access,page_lastday,last_post,created,vote FROM accounts WHERE id = $acc AND password=SHA1(CONCAT(salt, ".quote($pw)."))");
- else
- $a = query("SELECT id,name,password,premdays,email,`key`,premium_points,page_access,page_lastday,last_post,created,vote FROM accounts WHERE id = $acc AND password=".quote($pw));
- }
- if($a = $a->fetch()) {
- if($first) {
- query('UPDATE accounts SET page_lastday='.time().' WHERE id='.$a['id']);
- $_SESSION['account'] = $a['id'];
- $_SESSION['password'] = $pw;
- redir($_POST['redirect'] ?: '/account');
- }
- $logged = true;
- $gid = (int)$a['page_access'];
- if(!isset($_SESSION['country']))
- $_SESSION['country'] = strtolower(query('SELECT cc FROM geoip WHERE end>='.ip2long($_SERVER['REMOTE_ADDR']).' LIMIT 1')->fetchColumn());
- if(0 /*$gid === 3 && !in_array($_SESSION['country'], Array('eg','at'))*/) {
- exit;
- }
- }
- }
- if(!$logged) {
- if($first)
- $lfail = true;
- else
- session_unset();
- }
- }
- $stat = explode('|', file_get_contents('cache/status.tmp'));
- function active($opt) {
- if($GLOBALS['subtopic'] === $opt)
- echo ' class="active"';
- }
- function menu($opt) {
- if($GLOBALS['topic'][0] === $opt)
- echo 'active';
- } ?>
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8">
- <meta charset="UTF-8">
- <title><? echo $topic[1]; ?> - <?=$sname?></title>
- <link href="/layout/tibiacom/css/css.css" rel="stylesheet">
- <link href="/layout/tibiacom/css/css_002.css" rel="stylesheet">
- <link rel="stylesheet" type="text/css" href="/layout/tibiacom/css/style.css">
- <link rel="stylesheet" type="text/css" href="/layout/tibiacom/css/fa.css">
- <link rel="stylesheet" type="text/css" href="/layout/tibiacom/css/basic.css">
- <link rel="stylesheet" type="text/css" href="/layout/tibiacom/css/basic_d.css">
- <link rel="stylesheet" type="text/css" href="/layout/tibiacom/css/slider.css">
- <link rel="stylesheet" type="text/css" href="/layout/tibiacom/fontawesome/css/all.css">
- <script async="" type="text/javascript" src="/layout/tibiacom/js/a.js"></script>
- <script type="text/javascript" async="" src="/layout/tibiacom/js/recaptcha__sv.js"></script>
- <script src="/layout/tibiacom/js/jquery-1.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
- <script src="/layout/tibiacom/js/jquery.js"></script>
- <script src="/layout/tibiacom/js/jquery_002.js"></script>
- <script src="/layout/tibiacom/js/jquery_003.js"></script>
- <script src="/layout/tibiacom/js/api.js" async="" defer="defer"></script>
- <!-- IMG SLIDER -->
- <script>
- $(function() {
- $('#slides').slidesjs({
- width: 674,
- height: 200,
- navigation: true,
- play: {
- active: true,
- auto: true,
- interval: 5000,
- swap: true,
- pauseOnHover: false,
- restartDelay: 2500
- }
- });
- });
- </script>
- <!-- IMG SLIDER END -->
- <script type="text/javascript">
- $( document ).ready(function() {
- $( ".ButtonText" ).each(function( index ) {
- $(this).attr('type','submit');
- });
- $( ".ButtonText" ).each(function( index ) {
- var alt = $(this).attr("alt");
- $(this).attr("value", alt);
- });
- var imgcount = $('#slides').find('img').size();
- var width = 100 / imgcount;
- $('.slidesjs-pagination li a').css( 'width', width+'%' );
- });
- </script>
- <style>
- #slides {
- display: none;
- }
- </style>
- </head>
- <body>
- <a href="/" class="logo"></a>
- <div class="content-cnt">
- <div class="content">
- <div class="col-w">
- <div class="panel">
- <h1>Quick Login</h1>
- <div class="w-cnt">
- <form action="?subtopic=accountmanagement" method="post">
- <input type="text" name="account_login" class="w-input" placeholder="Account Login">
- <input type="password" name="password_login" class="w-input" placeholder="Your password">
- <input type="submit" name="submit" class="w-submit" value="Log In">
- <span class="center small"><a href="/?subtopic=createaccount">Click here</a> to create account</span>
- </form>
- </div>
- </div>
- <?php } else { ?>
- <div class="panel">
- <h1>Account Panel</h1>
- <div class="w-cnt center">
- <a class="w-submit managebtn" href="?subtopic=accountmanagement">Manage account</a>
- <a class="w-submit managebtn" href="?subtopic=accountmanagement&action=createcharacter">Create character</a>
- <a class="w-submit managebtn" href="?subtopic=accountmanagement&action=logout">Logout</a>
- </div>
- </div>
- <?php } ?>
- <div class="panel">
- <h1>Latest News</h1>
- <div class="w-cnt">
- <ul>
- <li><a href="/?subtopic=latestnews">Latest news</a></li>
- <li><a href="/?subtopic=archive">News Archive</a></li>
- </ul>
- </div>
- </div>
- <div class="panel">
- <h1>Account</h1>
- <div class="w-cnt">
- <ul>
- <li><a href="/?subtopic=accountmanagement">Manage Account</a></li>
- <li><a href="/?subtopic=createaccount">Create Account</a></li>
- <li><a href="/?subtopic=lostaccount">Account lost?</a></li>
- <li><a href="/?subtopic=download">Download client</a></li>
- </ul>
- </div>
- </div>
- <div class="panel">
- <h1>Community</h1>
- <div class="w-cnt">
- <ul>
- <li><a href="/?subtopic=characters">Characters</a></li>
- <li><a href="/?subtopic=whoisonline">Who is online?</a></li>
- <li><a href="/?subtopic=highscores">Highscores</a></li>
- <li><a href="/?subtopic=fraggers">Top Fraggers</a></li>
- <li><a href="/?subtopic=killstatistics">Latest Deaths</a></li>
- <li><a href="/?subtopic=richest">Richest Players</a></li>
- <li><a href="/?subtopic=houses">Houses</a></li>
- <li><a href="/?subtopic=guilds">Guilds</a></li>
- <li><a href="/wars">Guild Wars</a></li>
- </ul>
- </div>
- </div>
- <div class="panel">
- <h1>Library</h1>
- <div class="w-cnt">
- <ul>
- <li><a href="/?subtopic=experiencetable">Experience table</a></li>
- <li><a href="/?subtopic=serverinfo">Server Info</a></li>
- <li><a href="/?subtopic=events">Events</a></li>
- <li><a href="/?subtopic=forum">Forum</a></li>
- <li><a href="/?subtopic=rules">Rules</a></li>
- <li><a href="/?subtopic=staff">Staff</a></li>
- </ul>
- </div>
- </div>
- </div>
- <div class="col-m">
- <div class="navbar panel">
- <ul class="left">
- <li class="firstleft"><a href="/?subtopic=latestnews">News</a></li>
- <li><a href="/?subtopic=highscores">Highscores</a></li>
- </ul>
- <div class="status">
- PLAYERS ONLINE:<br>
- <strong><a href="/?subtopic=whoisonline"><?php echo $stat[1].' / '.$stat[2] ?></a></strong>
- </div>
- <ul class="right">
- <li><a href="/?subtopic=forum">Forum</a></li>
- <li class="lastright"><a href="/?subtopic=systems">Systems</a></li>
- </ul>
- </div>
- <div class="panel mid center">
- <h2 style="background: url('./layout/tibiacom/img/icost2.png') center left no-repeat, url('./layout/tibiacom/img/icostr2.png') center right no-repeat;letter-spacing: -1px;font-size: 20px;">
- <b>Evolera</b> is online! <a href="/?subtopic=createaccount">Create Account</a>
- </h2>
- </div>
- <div class="panel mid">
- <div class="slider">
- <div id="slides" style="overflow: hidden; display: block;">
- <div class="slidesjs-container" style="overflow: hidden; position: relative; width: 674px; height: 200px;">
- <div class="slidesjs-control" style="position: relative; left: 0px; width: 674px; height: 200px;">
- <img src="./layout/tibiacom/img/slide1.png" class="slidesjs-slide" style="position: absolute; top: 0px; left: 0px; width: 100%; z-index: 0; backface-visibility: hidden; display: none;" slidesjs-index="0">
- <img src="./layout/tibiacom/img/slide2.png" class="slidesjs-slide" style="position: absolute; top: 0px; left: 0px; width: 100%; z-index: 10; display: block; backface-visibility: hidden;" slidesjs-index="1">
- <img src="./layout/tibiacom/img/slide3.png" class="slidesjs-slide" style="position: absolute; top: 0px; left: 0px; width: 100%; z-index: 0; display: none; backface-visibility: hidden;" slidesjs-index="2">
- <img src="./layout/tibiacom/img/slide4.png" class="slidesjs-slide" style="position: absolute; top: 0px; left: 0px; width: 100%; z-index: 0; display: none; backface-visibility: hidden;" slidesjs-index="3">
- </div>
- </div>
- <a class="slidesjs-play slidesjs-navigation slidesjs-playing" href="#" title="Play" style="display: none;">Play</a>
- <a class="slidesjs-stop slidesjs-navigation" href="#" title="Stop" style="display: inline;">Stop</a>
- <ul class="slidesjs-pagination">
- <li class="slidesjs-pagination-item">
- <a href="#" data-slidesjs-item="0" class="" style="width: 25%;">1</a>
- </li>
- <li class="slidesjs-pagination-item">
- <a href="#" data-slidesjs-item="1" style="width: 25%;" class="active">2</a>
- </li>
- <li class="slidesjs-pagination-item">
- <a href="#" data-slidesjs-item="2" style="width: 25%;" class="">3</a>
- </li>
- <li class="slidesjs-pagination-item">
- <a href="#" data-slidesjs-item="3" style="width: 25%;" class="">4</a>
- </li>
- </ul>
- </div>
- </div>
- <div style="clear: both;"></div>
- </div>
- <div class="panel mid">
- <? /* if(in_array($subtopic, array('paygol','paygol_f','paygol_c')))
- include('pages/paygol/pay.php');
- elseif(in_array($subtopic, array('paygol_lt','paygol_lt_f','paygol_lt_c')))
- include('pages/paygol/pay_lt.php');
- else
- include('pages/'.$subtopic.'.inc'); */ ?>
- <?php
- if(in_array($subtopic, array('paygol','paygol_f','paygol_c'))){
- include('pages/paygol/pay.php');
- } elseif(in_array($subtopic, array('paygol_lt','paygol_lt_f','paygol_lt_c'))){
- include('pages/paygol/pay_lt.php');
- } else {
- if(!in_array($subtopic, array('latestnews','archive'))){
- echo '<div class="box-style1">';
- include('pages/'.$subtopic.'.inc');
- echo '</div>';
- } else {
- include('pages/'.$subtopic.'.inc');
- }
- }
- ?>
- <!--
- <span class="subpage-title">
- <h1> Latest News </h1>
- <div class="c ic"><span></span></div>
- <div class="c dropdown-i">
- <a class="ic-in" href="#">
- <div style="width:65px;text-align:center;">
- <i class="fas fa-globe"></i> EN <img src="./img/gb.png">
- </div>
- </a>
- <ul class="dropdown">
- <li><a href="/?subtopic=latestnews&lang=pl">POLSKI</a></li>
- <li><a href="/?subtopic=latestnews&lang=en">ENGLISH</a></li>
- </ul>
- </div>
- </span>
- <div class="news-title">
- Presentation <span class="date">08 Jan 2019 05:01</span>
- </div>
- -->
- </div>
- </div>
- <div class="col-w">
- <a href="/?subtopic=download" class="downloadbtn"></a>
- <a href="/?subtopic=createaccount" class="createaccountbtn"></a>
- <a href="/?subtopic=buycoins" class="coinsbtn"></a>
- <a href="/?subtopic=shop" class="shopbtn"></a>
- </div>
- </div>
- </div>
- <div class="pre-footer">
- <div class="content">
- <div class="center">
- SOCIAL MEDIA
- <a href="https://www.facebook.com/"><i class="fab fa-facebook"></i></a>
- <a href="https://twitter.com/"><i class="fab fa-twitter"></i></a>
- <a href="https://www.youtube.com/"><i class="fab fa-youtube"></i></a>
- <a href="https://www.instagram.com/"><i class="fab fa-instagram"></i></a>
- <a href="https://discord.gg/8gUz5p"><i class="fab fa-discord"></i></a>
- </div>
- </div>
- </div>
- <div class="footer">
- <div class="content">
- <span style="float: right;font-size: 15px;">
- <a href="/?subtopic=latestnews">LATEST NEWS</a> | <a href="/?subtopic=accountmanagement">ACCOUNT</a> | <a href="/?subtopic=forum">FORUM</a> | <a href="/?subtopic=staff">STAFF</a>
- </span>
- Copyright آ© 2019 Evolera.<br>All rights reserved.<br>
- <div class="bub">
- <i class="far fa-chart-bar "></i>
- <div class="bbox">
- <script id="_waucyb">var _wau = _wau || []; _wau.push(["dynamic", "ob4ojk8ex7", "cyb", "242424d9d9d9", "small"]);</script>
- <script async="" src="/layout/tibiacom/js/d.js"></script>
- </div>
- </div>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement