Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- #Decode by Reza Aksa
- session_start();
- include("config.php");
- include("configInfo.php");
- error_reporting(~E_NOTICE);
- $result = pg_query("select * from accounts where login='$_SESSION[login_true]'") or die ("Err Can not to result");
- $dbarr =pg_fetch_array($result);
- ?>
- <?php
- include_once('connect.php');
- $cPlayer = $connec->prepare('SELECT player_id FROM accounts');
- $cPlayer->execute();
- $countPlayer = $cPlayer->rowCount();
- $cPlayer1 = $connec->prepare('SELECT player_id FROM accounts');
- $cPlayer1->execute();
- $countPlayer1 = $cPlayer1->rowCount();
- $cPlayerOnline = $connec->prepare('SELECT player_id FROM accounts WHERE online = true');
- $cPlayerOnline->execute();
- $countPlayerOnline = $cPlayerOnline->rowCount();
- ?>
- <?php
- include('config.php');
- error_reporting(~E_NOTICE);
- $user_login = addslashes(trim($_POST['user_login']));
- $pwd_login = addslashes(trim($_POST['pwd_login']));
- $hashpass = hash_hmac('md5', $pwd_login, '/x!a@r-$r%an¨.&e&+f*f(f(a)');
- if(isset($_POST['user_login']) and isset($_POST['pwd_login'])) {
- ?>
- <?php
- if(isset($_POST["button"]))
- if ($_POST["button"] == "เข้าสู่ระบบ") {
- if(trim($_POST["user_login"] && ($_POST["pwd_login"])) == "" )
- {
- ?>
- <script type="text/javascript">
- localStorage.setItem("swal",
- swal(
- 'Do not leave empty!',
- 'ห้ามเว้นว่าง',
- 'error'
- )
- </script>
- <?php
- echo "<meta http-equiv='refresh' content='1 ;url=./?page=home'>";
- }
- ?>
- <?php
- $result = pg_query("select login,password from accounts where login='$user_login' and password='$hashpass' ");
- $num = pg_num_rows($result) ;
- ?>
- <?php
- if($num <=0 )
- {
- ?>
- <script type="text/javascript">
- swal(
- 'Username or Password Invalid!',
- 'อีเมล์หรือรหัสผ่านไม่ถูกต้อง',
- 'error'
- )
- </script>
- <?php
- echo "<meta http-equiv='refresh' content='1 ;url=./?page=home'>";
- }else{
- $_SESSION['login_true'] = $_POST['user_login'];
- ?>
- <script type="text/javascript">
- swal(
- 'Success!',
- 'เข้าสู่ระบบสำเร็จ!',
- 'success'
- )
- </script>
- <?php
- echo "<meta http-equiv='refresh' content='1 ;url=./?page=home'>";
- }}}
- ?>
- <?php
- if(isset($_POST["button"]))
- {
- if ($_POST["button"] == "เเก้ไอดีค้าง")
- {
- pg_query("UPDATE accounts SET online = false WHERE login = '".$_SESSION['login_true']."'");
- ?>
- <script type="text/javascript">
- swal(
- 'Success!',
- 'เเก้ไขไอดีค้างสำเร็จ!',
- 'success'
- )
- </script>
- <?php
- echo "<meta http-equiv='refresh' content='1 ;url=./?page=home'>";
- }}
- ?>
-
- <?php
- if (!isset($_SESSION['login_true'])) { ?>
- <form class="form-horizontal" method="post">
- <div class="row">
- <!-- col-md-3 -->
- <div class="col-md-3">
- <div class="card text-white bg-dark" align="left" style="margin-top: 10px;">
- <div class="card-header" style="padding: 10px;">
- <b><i class="fa fa-sign-in"></i> LOGIN</b> <small></small>
- </div>
- <div class="card-body">
- <form class="form-horizontal" method="post">
- <div class="form-group">
- <label class="control-label col-sm-2 text-light" for="user_login"><i class=" fa fa-user-circle-o text-info" style="font-size:25px"></i></label>
- <div class="col-sm-10">
- <input type="txt" class="form-control hvr-grow-shadow" id="user_login" placeholder="Enter Username" name="user_login" style="font-size:20px">
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-sm-2 text-light" for="user_login"><i class="fa fa-key text-info" style="font-size:25px"></i></label>
- <div class="col-sm-10">
- <input type="password" class="form-control hvr-grow-shadow" id="pwd_login" placeholder="Enter password" name="pwd_login" style="font-size:20px">
- </div>
- </div>
- </form>
- <center>
- <button type="submit" name="button" class="btn btn-success" value="เข้าสู่ระบบ" style="font-size:15px">LOGIN | เข้าสู่ระบบ</button>
- </center>
- <!-- <a href="./?page=register"><input type="button" class="btn btn-info" value="REG | สมัครสมาชิก"></a> -->
- </div>
- <!--div class="card-body">
- <div class="row">
- <div class="col-md-6 offset-md-3">
- <form id="login-form">
- <input type="hidden" name="action" value="login">
- <div class="form-group">
- <label for="username"><i class="fa fa-user"></i> Username :</label>
- <input class="form-control hvr-grow-shadow" type="text" name="username" id="username" placeholder="ชื่อสมาชิก" autofocus>
- </div>
- <div class="form-group">
- <label for="password"><i class="fa fa-lock"></i> Password :</label>
- <input class="form-control hvr-grow-shadow" type="password" name="password" id="password" placeholder="รหัสผ่านบัญชี">
- </div>
- </form>
- <button type="submit" name="button" class="btn btn-success btn-block hvr-icon-wobble-horizontal" value="เข้าสู่ระบบ"><i class="fa fa-sign-in hvr-icon"></i>เข้าสู่ระบบ</button>
- <a class="btn btn-danger btn-block hvr-icon-wobble-horizontal" href="./?page=register"><i class="fa fa-user-plus hvr-icon"></i> สมัครสมาชิก</a>
- </div>
- </div>
- </div-->
- </div>
- <?php
- } else {
- ?>
- <!-- ล็อกอินเเล้ว -->
- <div class="row">
- <!-- col-md-3 -->
- <div class="col-md-3">
- <div class="card text-white bg-dark" align="left" style="margin-top: 10px;">
- <div class="card-header" style="padding: 10px;">
- <b><i class="fa fa-address-card"></i> ข้อมูลผู้เล่น</b> <small></small>
- </div>
- <div class="card-body">
- <form class="form-horizontal" method="post">
- </form>
- <div class="text-light">
- <i class="fa fa-user"></i> ไอดีผู้ใช้ : <?php echo $dbarr['login']; ?>
- <br>
- <i class="far fa-address-card"></i> ชื่อในเกมส์ : <?php echo $dbarr['player_name']; ?>
- <br>
- <i class="far fa-address-book"></i> ยศ : <img src="img_rank/<?php echo $dbarr['rank']; ?>.png" width="20" height="20">
- <br>
- <i class="fa fa-pie-chart"></i> EXP : <?php echo $dbarr['exp']; ?>
- <br>
- <i class="fa fa-money"></i> Point : <?php echo $dbarr['gp']; ?>
- <br>
- <i class="fa fa-money"></i> Cash : <?php echo $dbarr['money']; ?>
- <br>
- <i class="fa fa-btc"></i> <?php echo $CoinWeb; ?> : <?php echo $dbarr['coinweb']; ?>
- </div>
-
- <form class="form-horizontal" method="post">
- <center>
- <button type="submit" name="button" class="btn btn-info" value="เเก้ไอดีค้าง" style="font-size:18px">เเก้ไอดีค้างในเกม</button><hr>
- <a href="./?page=logout"><button type="button" class="btn btn-danger btn-block" style="font-size:18px">ออกจากระบบ</button></a>
- </center>
- </div>
- </form>
- </div>
- <?php }?>
-
- <div class="card text-white bg-dark" align="left" style="margin-top: 20px;">
- <div class="card-header" style="padding: 5px;">
- <b><i class="fa fa-d"></i> ดาวน์โหลด</b> <small></small>
- </div>
- <div class="card-body">
- <div class="row">
- <div class="col-md-12">
- <center>
- <a target="_blank" href="<?php echo $DonwloadClient ;?>"><button type="button" class="btn btn-success"style="font-size:14px">Download | ดาวน์โหลดตัวเกม</button></a>
- <hr><a target="_blank" href="<?php echo $Fix ;?>"><button type="button" class="btn btn-danger" style="font-size:14px">Download | เเก้ไข Launcher Error</button></a>
- <hr><a target="_blank" href="<?php echo $FixCat ;?>"><button type="button" class="btn btn-danger" style="font-size:14px">Download | เเก้ไข เด้งแมว</button></a>
- </center>
- </div>
- </div>
- </div>
- </div>
-
- <div class="card text-white bg-dark" align="left" style="margin-top: 10px;">
- <div class="card-header" style="padding: 10px;">
- <b><i "fa fa-facebook-official" aria-hidden="true"></i> แฟนเพจ</b> <small></small>
- </div>
- <div class="card-body">
- <div class="fb-page" data-href="<?php echo $page ;?>" data-tabs="timeline" data-width="300" data-height="70" data-small-header="true" data-adapt-container-width="true" data-hide-cover="true" data-show-facepile="true"><blockquote cite="<?php echo $page ;?>" class="fb-xfbml-parse-ignore"><a href="<?php echo $page ;?>"><?php echo $namepage ;?></a></blockquote></div>
- </div>
- </div>
- </div>
- <!--end col-md-3 -->
- <!-- col-md-6 -->
- <div class="col-md-6">
- <div class="card text-white bg-dark" align="left" style="margin-top: 10px;">
- <div class="card-header" style="padding: 10px;">
- <b><i "fa fa-facebook-official" aria-hidden="true"></i> <?php echo $NameNotes ;?></b> <small></small>
- </div>
- <div class="card-body">
- <div id="newscarousel" class="carousel slide carousel-fade" data-ride="carousel" style="height: 400px !important">
- <ol class="carousel-indicators">
- </ol>
- <div class="carousel-inner">
- <div class="carousel-item active"><img src="promote.jpg" class="d-block w-100" style="height: 400px !important"></div>
- </div>
- </div>
- </div>
- </div>
-
- <div class="card text-white bg-dark" align="left" style="margin-bottom: 10px;">
- <div class="card-header" style="padding: 5px;">
- <b><i class="fa fa-newspaper-o"></i> NEWS & UPDATE</b> <small></small>
- </div>
- <div class="card-body">
- <p><a href="#" style="color: #FFF;text-decoration: none;"><span class="badge badge-success">ข่าวสาร</span> <b><?php echo $NewUpdate1; ?></b> - <?php echo $NewUpdate11; ?></a></p>
- <p><a href="#" style="color: #FFF;text-decoration: none;"><span class="badge badge-success">ข่าวสาร</span> <b><?php echo $NewUpdate2; ?></b> - <?php echo $NewUpdate22; ?></a></p>
- <p><a href="#" style="color: #FFF;text-decoration: none;"><span class="badge badge-success">ข่าวสาร</span> <b><?php echo $NewUpdate3; ?></b> - <?php echo $NewUpdate33; ?></a></p></div>
- </div>
-
- <div class="card text-white bg-dark" align="left" style="margin-top: 10px;">
- <div class="card-header" style="padding: 10px;">
- <b><i "fa fa-facebook-official" aria-hidden="true"></i> ตารางยศ</b> <small></small>
- </div>
- <div class="card-body">
- <img src="rank.jpg" width="100%" height="100%">
- </div>
- </div>
- </div>
- <div class="col-md-3">
- <div class="card text-white bg-dark" align="left" style="margin-top: 10px;">
- <div class="card-header" style="padding: 5px;">
- <b><i class="fa fa-signal"></i> SERVER STATUS</b> <small></small>
- </div>
- <div class="card-body">
- <center><p><img src="dist/images/star.png" width="25" height="25;"> EXP Boosted : <span class="badge badge-info"><?php echo $expboot; ?> %</span></p>
- <p><img src="dist/images/star.png" width="25" height="25;"> Money Boosted : <span class="badge badge-info"><?php echo $pointboot; ?> %</span></p></center><hr>
- <ul class="list-unstyled">
- <li class="media" style="border-bottom: 1px dashed rgba(255,255,255,0.4)">
- <img class="mr-3" src="dist/images/sv.svg" width="48">
- <div class="media-body">
- <h4 class="mt-0" style="font-size:20px">Server Status</h4>
- <span class='text-success'><b><i class='fa fa-check'></i> ออนไลน์</b></span> </div>
- </li>
- <li class="media" style="border-bottom: 1px dashed rgba(255,255,255,0.4)">
- <img class="mr-3" src="dist/images/account.svg" width="48">
- <div class="media-body">
- <h4 class="mt-0" style="font-size:20px">Account ID</h4>
- <i class="fa fa-users text-info"></i> <?php echo pg_escape_string($countPlayer1); ?> บัญชี
- </div>
- </li>
- <li class="media">
- <img class="mr-3" src="dist/images/player.svg" width="48">
- <div class="media-body">
- <h4 class="mt-0" style="font-size:20px">Online</h4>
- <i class="fa fa-circle-o-notch fa-spin text-success"></i> <?php echo pg_escape_string($countPlayerOnline); ?> คน
- </div>
- </li>
- </ul>
- </div>
- </div>
- <br>
- <div class="card text-white bg-dark" align="left" style="margin-top: 10px;">
- <div class="card-header" style="padding: 5px;">
- <b><i class="fa fa-user-o"></i> Top 5 ผู้เล่น</b> <small></small>
- </div>
- <div class="card-body">
- <table id="myTable" class="table text-light" style="color: #FFF;text-decoration: none;">
- <thead>
- <tr>
- <th>อันดับ</th>
- <th>ยศ</th>
- <th>ชื่อ</th>
- </tr>
- </thead>
- <tbody>
- <?php
- //include('config.php');
- error_reporting(~E_NOTICE);
- $strRank = "SELECT * FROM accounts order by exp desc limit 5 ";
- $qrRank = pg_query($strRank);
- $num = 0;
- while ($rsRank = pg_fetch_array($qrRank)) {
- ?>
- <tr>
- <td>1</td>
- <td><p><img src="img_rank/<?php echo $rsRank['rank']; ?>.png" width="20" height="20"><p></td>
- <td><?php echo $rsRank['player_name'];?></td>
- </tr>
- <?php } ?>
- </tbody>
- </table>
- </div>
- </div>
- <br>
- <div class="card text-white bg-dark" align="left" style="margin-top: 10px;">
- <div class="card-header" style="padding: 5px;">
- <b><i class="fa fa-asterisk"></i> Top 5 แคลน</b> <small></small>
- </div>
- <div class="card-body">
- <table id="myTable" class="table text-light" style="color: #FFF;text-decoration: none;">
- <thead>
- <tr>
- <th>อันดับ</th>
- <th>รูปแคลน</th>
- <th>ชื่อ</th>
- </tr>
- </thead>
- <?php
- //include('config.php');
- error_reporting(~E_NOTICE);
- $strRank = "SELECT * FROM clan_data order by clan_exp desc limit 5 ";
- $qrRank = pg_query($strRank);
- $num = 0;
- while ($rsRank = pg_fetch_array($qrRank)) {
- $huaclan = "SELECT * FROM accounts where player_id = '".$rsRank['owner_id']."'";
- $qrhuaclan = pg_query($huaclan);
- $srhuaclan = pg_fetch_array($qrhuaclan);
- ?>
- <tr>
- <td><?php echo $srhuaclan['player_name'];?></td>
- <td><?php echo $rsRank['clan_rank'];?></td>
- <td><?php echo $rsRank['clan_name'];?></td>
- </tr>
- <?php } ?>
- </table>
- </div>
- </div>
- </div> </div>
- <div id="fb-root"></div>
- <script>(function(d, s, id) {
- var js, fjs = d.getElementsByTagName(s)[0];
- if (d.getElementById(id)) return;
- js = d.createElement(s); js.id = id;
- js.src = 'https://connect.facebook.net/th_TH/sdk.js#xfbml=1&version=v3.2&appId=2539916342900591&autoLogAppEvents=1';
- fjs.parentNode.insertBefore(js, fjs);
- }(document, 'script', 'facebook-jssdk'));</script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement