Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php if(!file_exists("_system/license.key")) { header("location: install/install.php"..

Decoded Output download

<?php 
if(!file_exists("_system/license.key")) 
{ 
	header("location: install/install.php"); 
} 
	require_once("_system/_config.php"); 
	require_once("_system/_database.php"); 
	require_once("_system/func_wallet/_time2reset_mtopup.php"); 
 
	if(isset($_SESSION['uid']) || isset($_SESSION['username'])) 
	{ 
		$sql_player = 'SELECT * FROM authme WHERE id = "'.$_SESSION['uid'].'"'; 
		$query_player = $connect->query($sql_player); 
 
		if($query_player->num_rows <= 0) 
		{ 
			session_destroy(); 
 
				//* REFRESH 
			echo "<meta http-equiv='refresh' content='0 ;'>"; 
		} 
		else 
		{ 
			$player = $query_player->fetch_assoc(); 
		} 
	} 
 
	if($time2reset_mtopup <= time()) 
	{ 
		file_put_contents('_system/func_wallet/_time2reset_mtopup.php','<?php $time2reset_mtopup = '.strtotime('first day of next month midnight').'; ?>'); 
		$connect->query("UPDATE authme SET topup_m = 0, topup_w = 0"); 
 
		//* REFRESH 
		echo "<meta http-equiv='refresh' content='0 ;'>"; 
	} 
                $sql_setting = 'SELECT * FROM setting'; 
		$query_setting = $connect->query($sql_setting); 
                $setting = $query_setting->fetch_assoc(); 
                $sql_download = 'SELECT * FROM download'; 
		$query_download = $connect->query($sql_download); 
                $download = $query_download->fetch_assoc(); 
?> 
<!DOCTYPE html> 
<html lang="th"> 
    <head> 
            <meta charset="utf-8"> 
            <title><?php echo $setting['name_server'];?></title> 
            <link href="assets/css/kanit.css" rel="stylesheet"> 
            <link rel="stylesheet" href="assets/css/style-theme.css"> 
            <link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.7.0/css/all.css" integrity="sha384-6jHF7Z3XI3fF4XZixAuSu0gGKrXwoX/w3uFPxC56OtjChio7wtTGJWRW53Nhx6Ev" crossorigin="anonymous"> 
			<link rel="stylesheet" href="assets/fa/css/font-awesome.css?1"> 
            <link rel="stylesheet" href="assets/css/sweetalert2.min.css" > 
            <link rel="stylesheet" href="assets/css/mary.css"> 
            <link rel="stylesheet" href="assets/css/lt.css"> 
            <script src="assets/js/sweetalert2.all.min.js"></script> 
            <link rel="icon" href="<?php echo $setting['icon']; ?>"> 
            <meta http-equiv=Content-Type content="text/html; charset=UTF-8"> 
            <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
            <meta name="viewport" content="width=device-width, initial-scale=1"> 
            <meta> 
    </head> 
<style type="text/css"> 
body,td,th { 
font-family: 'Kanit', sans-serif; 
font-size: 15px; 
} 
body 
{ 
  background: url(<?php echo $setting['bg'];?>) no-repeat center center fixed; 
    -webkit-background-size: cover; 
    -moz-background-size: cover; 
    -o-background-size: cover; 
    background-size: cover; 
} 
.lp-panel { 
color: black; 
font-size: 18px; 
background: rgba(255,255,255.1); 
padding: 20px; 
} 
.lp-menu { 
padding: 11px; 
font-size: 17px; 
border-bottom: 1px solid white; 
text-decoration: none !important; 
color: black; 
transition-duration: 0.3s; 
background: rgba(238,238,238,1) 
} 
.lp-menu:hover { 
border-left: 6.5px solid transparent; 
color: black; 
background: rgba(223,223,223,1) 
} 
.lp-title-input { 
color: white; 
background: rgba(0,0,0,0.5); 
border: 0px; 
border-radius: 0px; 
} 
.lp-input { 
font-size:16px; 
background: rgba(255,255,255,1); 
border-radius: 0px; 
color: black; 
} 
.lp-input:disabled { 
background: rgba(0,0,0,0.1); 
} 
.modal-content 
 { 
 border-radius: 0px; 
 border: solid 1px white; 
     padding:9px 15px; 
     background-color: rgba(255,255,255,1); 
 } 
 .lp-card { 
color: black; 
background: rgba(255,255,255.1); 
} 
</style> 
<script type="text/javascript"> 
    func(); 
    var seconds = 5 /*SECONDS, UPDATE INTERVAL*/; 
    setInterval(function(){ 
        func(); 
    }, seconds * 1000); 
    function func(){  
    // IP  () 
        var ip = "<?php echo $setting['ip_server']; ?>"; 
        var xhr = new XMLHttpRequest(); 
        xhr.open("GET", "https://eu.mc-api.net/v3/server/info/" + ip, true); 
        xhr.onreadystatechange = function() { 
                if (xhr.readyState == 4) { 
                        data = JSON.parse(xhr.responseText); 
                        if (data.status) { 
                                document.getElementById("sta").innerHTML="<span id='sta' <span style='color: green;font-size: 18px;'>Online</span>"; 
                                document.getElementById("bar").innerHTML=data.players.online + "/" + data.players.max; 
                                document.getElementById("bar").style.width = Math.round(100*(data.players.online/data.players.max)) + "%"; 
                        } else { 
                                document.getElementById("bar").innerHTML="0/0"; 
                                 document.getElementById("sta").innerHTML="<span id='sta' <span style='color: red;font-size: 18px;'>Offline</span>"; 
                        } 
                } 
        } 
        xhr.send(); 
    }; 
</script> 
 
<body style="color:#000;"> 
        <div style="width:1200px; max-width:100%; margin:auto; margin-top:40px;"> 
<div id="header" style="margin-bottom:10px;"> 
<div class="header"> 
<div id="header" style="margin-bottom:10px;"> 
</div> 
        <div style="text-align:center; margin-top:20px;margin-bottom:30px;"> 
    <img class="animated infinite pulse" style="width: 25%;" src="<?php echo $setting['icon']; ?>"> 
  </div> 
   
    <nav class="navbar navbar-expand-lg sticky-top navbar-light bg-light"> 
        <div class="container"> 
                <ul class="navbar-nav mr-auto pt-3 pt-lg-0"> 
                    <li class="nav-item dropdown">  
      <li class="nav-item"> 
        <a class="nav-link" href="?page=home"><img src="menu/main.png" style="width:37px;height:37px;"></i><span class="pull-right"> 
                <span id="xnav-upp">&nbsp;&nbsp;<b>Home</span></b> 
                <br> 
                <span id="xnav-btt">&nbsp;&nbsp;</span> 
              </span><span class="sr-only">(current)</span></a> 
	</li>&nbsp;&nbsp;	 
    <li class="nav-item">	 
        <a class="nav-link" href="?page=shop&server=1"><img src="menu/shop.png" style="width:37px;height:37px;"></i><span class="pull-right"> 
                <span id="xnav-upp">&nbsp;&nbsp;<b>Shop</span></b> 
                <br> 
                <span id="xnav-btt">&nbsp;&nbsp;</span> 
              </span><span class="sr-only">(current)</span></a> 
      </li>&nbsp;&nbsp; 
    <li class="nav-item">	 
        <a class="nav-link" href="?page=topup"><img src="menu/topup.png" style="width:37px;height:37px;"></i><span class="pull-right"> 
                <span id="xnav-upp">&nbsp;&nbsp;<b>Topup</span></b> 
                <br> 
                <span id="xnav-btt">&nbsp;&nbsp;</span> 
              </span><span class="sr-only">(current)</span></a> 
      </li>&nbsp;&nbsp; 
    <li class="nav-item">	 
        <a class="nav-link" href="?page=promotion"><img src="menu/redeem.png" style="width:37px;height:37px;"></i><span class="pull-right"> 
                <span id="xnav-upp">&nbsp;&nbsp;<b>Promotion</span></b> 
                <br> 
                <span id="xnav-btt">&nbsp;&nbsp;</span> 
              </span><span class="sr-only">(current)</span></a> 
      </li>&nbsp;&nbsp; 
                </ul> 
                <ul class="navbar-nav pb-3 pb-lg-0"> 
                    <?php if(!$_SESSION['username']){ ?> 
    <li class="nav-item">	 
        <a class="nav-link" href="?page=login"><img src="menu/login.png" style="width:37px;height:37px;"></i><span class="pull-right"> 
                <span id="xnav-upp">&nbsp;&nbsp;<b>LOGIN</span></b> 
                <br> 
                <span id="xnav-btt">&nbsp;&nbsp;</span> 
              </span><span class="sr-only">(current)</span></a> 
      </li>&nbsp;&nbsp;		   
    <li class="nav-item">	 
        <a class="nav-link" href="?page=register"><img src="menu/register.png" style="width:37px;height:37px;"></i><span class="pull-right"> 
                <span id="xnav-upp">&nbsp;&nbsp;<b>REGISTER</span></b> 
                <br> 
                <span id="xnav-btt">&nbsp;&nbsp;</span> 
              </span><span class="sr-only">(current)</span></a> 
      </li>&nbsp;&nbsp;	 
                    <?php }else{ ?> 
    <li class="nav-item <?php if($_GET['page'] == "log"){echo 'active';}else{} ?>"> 
		<a class="nav-link" href="?page=log"><img src="menu/log.png" style="width:37px;height:37px;"></i><span class="pull-right"> 
                <span id="xnav-upp">&nbsp;&nbsp;<b>Log</span></b> 
                <br> 
                <span id="xnav-btt">&nbsp;&nbsp;</span> 
              </span><span class="sr-only">(current)</span></a> 
				 
      </li>&nbsp;&nbsp; 
    <li class="nav-item <?php if($_GET['page'] == "logout"){echo 'active';}else{} ?>"> 
		<a class="nav-link" href="?page=logout"><img src="menu/logout.png" style="width:37px;height:37px;"></i><span class="pull-right"> 
                <span id="xnav-upp">&nbsp;&nbsp;<b>LogOut</span></b> 
                <br> 
                <span id="xnav-btt">&nbsp;&nbsp;</span> 
              </span><span class="sr-only">(current)</span></a> 
      </li>&nbsp;&nbsp; 
                    <?php } ?> 
                </ul> 
            </div> 
        </div> 
    </nav> 
<br>   
     <div class="card card-transparent" style="padding: 20px;color: black; -webkit-box-shadow: 0px 5px 30px -5px #000000; 
  -moz-box-shadow: 0px 5px 30px -5px #000000; 
    box-shadow: 0px 5px 30px -5px #000000;"> 
	 
					<div class="col-md-12"> 
						<div class="input-group mb-3"> 
	  						<div class="input-group-prepend"> 
	    						<span class="input-group-text lp-title-input bg-success btn-line-b text-white"> :</span> 
	  						</div> 
							<marquee class="form-control form-control-lg lp-input" onmouseout="this.start()" onmouseover="this.stop()"> 
								<?php echo $setting['announce']; ?> 
							</marquee> 
						</div> 
					</div>  
   
    <a href="#" class="twitch-widget" id="twitch-widget" target="_blank"></a><br><br> 
    <main> 
        <div class="container"> 
            <div class="row"> 
                <div class="col-lg-8"> 
                   <?php 
                    if(!$_GET){$_GET["page"] = 'home';} 
                    if(!$_GET["page"]) 
                    { 
                      $_GET["page"] = "home"; 
                    } 
                     if($_GET["page"] == "home"){ 
                         include_once __DIR__.'/_page/home.php'; 
                    }elseif($_GET['page'] == "shop"){ 
                        include_once __DIR__.'/_page/shop.php'; 
                    }elseif($_GET['page'] == "download"){ 
                        include_once __DIR__.'/_page/download.php'; 
                    }elseif($_GET['page'] == "topup"){ 
                        include_once __DIR__.'/_page/topup.php'; 
                    }elseif($_GET['page'] == "log"){ 
                        include_once __DIR__.'/_page/log.php'; 
                    }elseif($_GET['page'] == "gift"){ 
                        include_once __DIR__.'/_page/gift.php';	 
                    }elseif($_GET['page'] == "giftpromotion"){ 
                        include_once __DIR__.'/_page/giftpromotion.php';						 
                    }elseif($_GET['page'] == "confirm"){ 
                        include_once __DIR__.'/_page/confirm.php';				 
                    }elseif($_GET['page'] == "confirmpromotion"){ 
                        include_once __DIR__.'/_page/confirmpromotion.php';	 
                    }elseif($_GET['page'] == "promotion"){ 
                        include_once __DIR__.'/_page/promotion.php'; 
                    }elseif($_GET['page'] == "login"){ 
                        include_once __DIR__.'/_page/login.php'; 
                    }elseif($_GET['page'] == "register"){ 
                        include_once __DIR__.'/_page/register.php'; 
                    }elseif($_GET['page'] == "logout"){ 
                        include_once __DIR__.'/_page/logout.php'; 
                    }elseif($_GET['page'] == "redeem"){ 
                        include_once __DIR__.'/_page/redeem.php'; 
                    }elseif($_GET['page'] == "user"){ 
                        include_once __DIR__.'/_page/user.php'; 
                    }elseif($_SESSION['uid'] && $player['status'] == "admin" && $_GET['page'] == "backend"){ 
                        include_once __DIR__.'/backend/index.php'; 
                    }else{ 
                                            echo '<div class="alert alert-danger"><i class="fa fa-warning"></i>404 </div>'; 
                                            echo '<meta http-equiv="refresh" content="2;URL=?page=home">'; 
                                        } 
                     ?> 
                </div> 
<div class="col-lg-4"> 
<div class="card border-0 shadow mb-4 d-none d-lg-block"> 
<div class="card-body"> 
<?php if($_SESSION['username']){ ?> 
<h5 class="m-0"><i class="fa fa-user fa-fw"></i> </h5> 
<hr> 
<text style="font-size: 16px;">  
<center><img src="https://minotar.net/armor/bust/<?php echo $_SESSION['realname']; ?>/175"><br></center> 
<hr> 
         <div class="input-group mb-3"> 
  <div class="input-group-prepend"> 
    <span class="input-group-text lp-title-input bg-success btn-line-b text-white"><i class="fa fa-user"></i>&nbsp;</span> 
  </div> 
<input class="form-control form-control-lg lp-input mypointlive" value="<?php echo $_SESSION['realname']; ?>" disabled/> 
</div> 
        
<div class="input-group mb-3" style="margin-top: -10px;"> 
  <div class="input-group-prepend"> 
    <span class="input-group-text lp-title-input bg-success btn-line-b text-white"><i class="fa fa-credit-card"></i>&nbsp;</span> 
  </div> 
<input class="form-control form-control-lg lp-input" value="<?php echo number_format($player['topup']); ?>.00 " disabled/> 
</div> 
            <div class="input-group mb-3" style="margin-top: -10px;"> 
  <div class="input-group-prepend"> 
    <span class="input-group-text lp-title-input bg-warning btn-line-b text-white"><i class="fa fa-credit-card"></i>&nbsp;</span> 
  </div> 
<input class="form-control form-control-lg lp-input" value="<?php echo number_format($player['points']); ?>.00 " disabled/> 
</div> 
<div class="input-group mb-3" style="margin-top: -10px;"> 
  <div class="input-group-prepend"> 
    <span class="input-group-text lp-title-input bg-primary btn-line-b text-white"><i class="fa fa-credit-card"></i>&nbsp;</span> 
  </div> 
<input class="form-control form-control-lg lp-input" value="<?php echo number_format($player['rp']); ?>.00 " disabled/> 
</div> 
 
            </text> 
            <hr class="is-divider" data-content="" style="margin: 1.5rem 0;"> 
<div class="d-flex flex-column" style="width: 100%"> 
<a class="btn btn-success btn-block" href="?page=user"><i class="fa fa-user fa-lg"></i><br><b>PROFILE</b><br>[  ]</a> 
<a class="btn btn-primary btn-block" href="?page=gift"><i class="fa fa-gift fa-lg"></i><br><b>GIFT</b><br>[  ]</a> 
<a class="btn btn-warning btn-block" href="?page=promotion"><i class="fa fa-gift fa-lg"></i><br><b>PROMOTION</b><br>[  ]</a> 
</div><hr> 
<?php }else{ ?> 
<h5 class="m-0"><i class="fa fa-user fa-fw"></i> </h5> 
<hr> 
<form method="post" action=""> 
<input type="hidden" name="login_submit"> 
<div class="form-group"> 
<input type="text"  name="username" class="form-control" placeholder=" : "> 
</div> 
<div class="form-group"> 
<input type="password"  name="password" class="form-control" placeholder=" : "> 
</div> 
<button type="submit" class="btn btn-block btn-outline-success mb-3"><i class="fa fa-sign-in fa-fw"></i> </button> 
</form> 
<?php } ?> 
</div> 
</div> 
<?php 
	require __DIR__ . '/_system/status/_MinecraftQuery.php'; 
	require __DIR__ . '/_system/status/_MinecraftQueryException.php'; 
	use xPaw\MinecraftQuery; 
	use xPaw\MinecraftQueryException; 
	 
	$MCQuery = new MinecraftQuery(); 
?> 
 <div class="card border-0 shadow mb-4"> 
<div class="card-body"> 
    <h5 class="m-0"><i class="fa fa-signal"></i>  </h5> 
	<hr> 
  <span id="hover" style="font-size:15px;"><i class="fa fa-fw fa-server"></i>&nbsp;IP Server : <?php echo $setting['ip_server']; ?></span><br> 
  <span id="hover" style="font-size:15px;"><i class="fa fa-fw fa-power-off"></i>&nbsp; :</span> <span id="sta"></span><br> 
  <span id="hover" style="font-size:15px;"><i class="fa fa-fw fa-tag"></i>&nbsp; : <?php echo $setting['version_server']; ?></span><br> 
  <span id="hover" style="font-size:15px;"><i class="fa fa-fw fa-users"></i>&nbsp; : <span id="bar"></span></span> 
</div> 
</div> 
 
<div class="card border-0 shadow mb-4"> 
<div class="card-body"> 
<h5 class="m-0"><i class="fa fa-trophy"></i>&nbsp;</h5> 
<hr> 
 
<?php 
$sql_list = 'SELECT * FROM authme ORDER BY topup DESC LIMIT 5'; 
$query_list = $connect->query($sql_list); 
 
$sql_last = 'SELECT * FROM activities WHERE (action = "TOPUP Truewallet" || action = "TOPUP TrueMoney") ORDER BY id DESC'; 
$query_last = $connect->query($sql_last); 
?> 
<table class="table table-striped ranking_tb" border="0" style="font-size:13px;"> 
  <thead> 
    <tr> 
      <th scope="col"></th> 
      <th scope="col"></th> 
    </tr> 
  </thead> 
  <tbody> 
    <?php 
    if($query_list->num_rows > 0) 
    { 
      while($list_topup = $query_list->fetch_assoc()) 
      { 
        ?> 
        <tr> 
          <td> 
            <img src="https://minotar.net/avatar/<?php echo $list_topup['username']; ?>/28" class="mr-3" width="28"><?php echo $list_topup['realname']; ?> 
          </td> 
          <td> 
            <?php echo number_format($list_topup['topup'],2); ?> <i class="fa fa-adjust"></i> 
          </td> 
        </tr> 
        <?php 
      } 
    } 
    else 
    { 
      ?> 
      <tr> 
        <td> 
          <img src="https://minotar.net/avatar/steve/28" class="mr-3" width="28"> 
        </td> 
        <td> 
          <?php echo number_format("0",2); ?> <i class="fa fa-coins text-dark"></i> 
        </td> 
      </tr> 
      <?php 
    } 
    ?> 
  </tbody> 
</table> 
</div> 
</div> 
 
<div class="card border-0 shadow mb-4"> 
<div class="card-body"> 
<h5 class="m-0"><i class="fa fa-trophy"></i>&nbsp;</h5> 
<hr> 
 
<?php 
$sql_last = 'SELECT * FROM activities WHERE (action = "TOPUP Truewallet" || action = "TOPUP TrueMoney") ORDER BY id DESC LIMIT 1'; 
$query_last = $connect->query($sql_last); 
?> 
<table class="table table-striped ranking_tb" border="0" style="font-size:13px;"> 
  <thead> 
    <tr> 
      <th scope="col"></th> 
      <th scope="col"></th> 
    </tr> 
  </thead> 
  <tbody> 
    <?php 
    if($query_last->num_rows > 0) 
    { 
      while($last_topup = $query_last->fetch_assoc()) 
      { 
        ?> 
        <tr> 
          <td> 
            <img src="https://minotar.net/avatar/<?php echo $last_topup['username']; ?>/28" class="mr-3" width="28"><?php echo $last_topup['username']; ?> 
          </td> 
          <td> 
            <?php echo number_format($last_topup['topup_amount'],2); ?> <i class="fa fa-adjust"></i> 
          </td> 
        </tr> 
        <?php 
      } 
    } 
    else 
    { 
      ?> 
      <tr> 
        <td> 
          <img src="https://minotar.net/avatar/steve/28" class="mr-3" width="28"> 
        </td> 
        <td> 
          <?php echo number_format("0",2); ?> <i class="fas fa-coins text-dark"></i> 
        </td> 
      </tr> 
      <?php 
    } 
    ?> 
  </tbody> 
</table> 
</div> 
</div> 
						 
<div class="card border-0 shadow mb-4"> 
<div class="card-body"> 
<h5 class="m-0"><img src="img/discord.png" style="width: 30px;"></i> </h5> 
<hr> 
	<iframe id="discord" src="https://discordapp.com/widget?id=<?php echo $setting['discord_id']; ?>&theme=dark" height="500" allowtransparency="true" frameborder="0" style="width: 100%"></iframe>  
</div></div>						 
                    </div> 
            </div> 
			<div class="container" style="padding-top:20px;padding-bottom:20px;"> 
            <div class="row"> 
              <div class="col-7"> 
                <div class="input-group mb-3"> 
                  <div class="input-group-prepend"> 
                    <span class="input-group-text bg-dark text-light">IP :</span> 
                  </div> 
                  <input type="text" class="form-control form-control-lg" onclick="this.select()" readonly="" style="text-align:center;" value="<?php echo $setting['ip_server']; ?>"> 
                  <div class="input-group-append"> 
                    <span class="input-group-text bg-dark text-light"> <?php echo $setting['version_server']; ?></span> 
                  </div> 
                </div> 
                <div style="color:#F3F3F3; margin-bottom:10px;"> 
                  <?php echo $setting['detail_server']; ?> 
                </div> 
 
              </div> 
              <div class="col-5"> 
                <iframe src="https://www.facebook.com/plugins/page.php?href=<?php echo urlencode($setting['page_facebook']); ?>&amp;tabs&amp;width=440&amp;height=400&amp;small_header=false&amp;adapt_container_width=true&amp;hide_cover=false&amp;show_facepile=true&amp;appId=1402610513369583" height="215" style="border:none;overflow:hidden;width:100%;" scrolling="no" frameborder="0" allowtransparency="true"></iframe> 
        </div> 
    </main> 
</div>	 
<hr class="style-six"> 
<div class="table-responsive" style="border:0;" > 
<table class="table borderless" border="0" width="auto" height="auto"> 
<tbody> 
<tr> 
<td width="100"> 
<img src="<?php echo $setting['icon']; ?>" width="50" height="50"> 
</td> 
<td style="color: #fff;"> 
 Copyright  2019 Miximizes V.0.1 | <a target="_blank" class="foot_hover"  href="backend"></a><br> 
 Webshop And System By <a class="foot_hover" target="_blank" href="https://www.facebook.com/thesahaporn">Miximizes</a> 
</td> 
</tr> 
</tbody> 
</table> 
</div> 
</html> 
 
 <?php 
	if(isset($_POST['login_submit'])) 
	{ 
		$msg = ''; 
		$alert = 'error'; 
		$msg_alert = '!'; 
 
		$username = $connect->real_escape_string($_POST['username']); 
		$sql = 'SELECT * FROM authme WHERE username = "'.$username.'"'; 
		$a = $connect->query($sql); 
		$a_num = $a->num_rows; 
		if($a_num == 1) 
		{ 
			$password_info = $a->fetch_assoc(); 
			$sha_info = explode("$",$password_info['password']); 
			$salt = $sha_info[2]; 
			$sha256_password = hash('sha256', $_POST['password']); 
			$sha256_password .= $sha_info[2]; 
 
			if(strcasecmp(trim($sha_info[3]),hash('sha256', $sha256_password)) == 0){ 
				$sql_user = 'SELECT * FROM authme WHERE username = "'.$username.'"'; 
				$query_user = $connect->query($sql_user); 
				$fetch_user = $query_user->fetch_assoc(); 
 
				//* SET SESSION 
				$_SESSION['uid'] = $fetch_user['id']; 
				$_SESSION['username'] = $fetch_user['username']; 
				$_SESSION['realname'] = $fetch_user['realname']; 
 
 
				$msg = ': '.$_SESSION['realname']; 
				$alert = 'success'; 
				$msg_alert = '!'; 
			} 
			else 
			{ 
				$msg = ''; 
				$alert = 'error'; 
				$msg_alert = '!'; 
			} 
		} 
		else 
		{ 
			$msg = ''; 
			$alert = 'error'; 
			$msg_alert = '!'; 
		} 
 
		?> 
			<script> 
				swal("<?php echo $msg_alert; ?>", "<?php echo $msg; ?>", "<?php echo $alert; ?>", { 
					button: "Reload", 
				}) 
				.then((value) => { 
					window.location.href = window.location.href; 
				}); 
			</script> 
		<?php 
	} 
         
if(isset($_POST['submit']) == "redeem") 
{ 
    if($_SESSION['username']){ 
    $code = $_POST['redeem_code']; 
 
    $redeem_q = $connect->query("SELECT * FROM redeem WHERE code = '".$code."'"); 
    $redeem = $redeem_q->fetch_assoc(); 
 
    if($redeem_q->num_rows != 0) 
    { 
        $update_q = $connect->query("UPDATE authme set points = points + '".$redeem['cmd']."' WHERE username = '".$_SESSION['username']."'"); 
        //alert 
            $msg = ''; 
			$alert = 'success'; 
			$msg_alert = '!'; 
        $delete_redeem = $connect->query("DELETE FROM redeem WHERE id = '".$redeem['id']."'"); 
    } 
    else 
    { 
        $msg = ''; 
			$alert = 'error'; 
			$msg_alert = '!'; 
    } ?> 
        <script> 
				swal("<?php echo $msg_alert; ?>", "<?php echo $msg; ?>", "<?php echo $alert; ?>", { 
					button: "Reload", 
				}) 
				.then((value) => { 
					window.location.href = window.location.href; 
				}); 
			</script>                
    <script> 
				swal("<?php echo $msg_alert; ?>", "<?php echo $msg; ?>", "<?php echo $alert; ?>", { 
					button: "Reload", 
				}) 
				.then((value) => { 
					window.location.href = window.location.href; 
				}); 
			</script>  
                        <?php 
} 
} 
?>

Did this file decode correctly?

Original Code

<?php
if(!file_exists("_system/license.key"))
{
	header("location: install/install.php");
}
	require_once("_system/_config.php");
	require_once("_system/_database.php");
	require_once("_system/func_wallet/_time2reset_mtopup.php");

	if(isset($_SESSION['uid']) || isset($_SESSION['username']))
	{
		$sql_player = 'SELECT * FROM authme WHERE id = "'.$_SESSION['uid'].'"';
		$query_player = $connect->query($sql_player);

		if($query_player->num_rows <= 0)
		{
			session_destroy();

				//* REFRESH
			echo "<meta http-equiv='refresh' content='0 ;'>";
		}
		else
		{
			$player = $query_player->fetch_assoc();
		}
	}

	if($time2reset_mtopup <= time())
	{
		file_put_contents('_system/func_wallet/_time2reset_mtopup.php','<?php $time2reset_mtopup = '.strtotime('first day of next month midnight').'; ?>');
		$connect->query("UPDATE authme SET topup_m = 0, topup_w = 0");

		//* REFRESH
		echo "<meta http-equiv='refresh' content='0 ;'>";
	}
                $sql_setting = 'SELECT * FROM setting';
		$query_setting = $connect->query($sql_setting);
                $setting = $query_setting->fetch_assoc();
                $sql_download = 'SELECT * FROM download';
		$query_download = $connect->query($sql_download);
                $download = $query_download->fetch_assoc();
?>
<!DOCTYPE html>
<html lang="th">
    <head>
            <meta charset="utf-8">
            <title><?php echo $setting['name_server'];?></title>
            <link href="assets/css/kanit.css" rel="stylesheet">
            <link rel="stylesheet" href="assets/css/style-theme.css">
            <link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.7.0/css/all.css" integrity="sha384-6jHF7Z3XI3fF4XZixAuSu0gGKrXwoX/w3uFPxC56OtjChio7wtTGJWRW53Nhx6Ev" crossorigin="anonymous">
			<link rel="stylesheet" href="assets/fa/css/font-awesome.css?1">
            <link rel="stylesheet" href="assets/css/sweetalert2.min.css" >
            <link rel="stylesheet" href="assets/css/mary.css">
            <link rel="stylesheet" href="assets/css/lt.css">
            <script src="assets/js/sweetalert2.all.min.js"></script>
            <link rel="icon" href="<?php echo $setting['icon']; ?>">
            <meta http-equiv=Content-Type content="text/html; charset=UTF-8">
            <meta http-equiv="X-UA-Compatible" content="IE=edge">
            <meta name="viewport" content="width=device-width, initial-scale=1">
            <meta>
    </head>
<style type="text/css">
body,td,th {
font-family: 'Kanit', sans-serif;
font-size: 15px;
}
body
{
  background: url(<?php echo $setting['bg'];?>) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}
.lp-panel {
color: black;
font-size: 18px;
background: rgba(255,255,255.1);
padding: 20px;
}
.lp-menu {
padding: 11px;
font-size: 17px;
border-bottom: 1px solid white;
text-decoration: none !important;
color: black;
transition-duration: 0.3s;
background: rgba(238,238,238,1)
}
.lp-menu:hover {
border-left: 6.5px solid transparent;
color: black;
background: rgba(223,223,223,1)
}
.lp-title-input {
color: white;
background: rgba(0,0,0,0.5);
border: 0px;
border-radius: 0px;
}
.lp-input {
font-size:16px;
background: rgba(255,255,255,1);
border-radius: 0px;
color: black;
}
.lp-input:disabled {
background: rgba(0,0,0,0.1);
}
.modal-content
 {
 border-radius: 0px;
 border: solid 1px white;
     padding:9px 15px;
     background-color: rgba(255,255,255,1);
 }
 .lp-card {
color: black;
background: rgba(255,255,255.1);
}
</style>
<script type="text/javascript">
    func();
    var seconds = 5 /*SECONDS, UPDATE INTERVAL*/;
    setInterval(function(){
        func();
    }, seconds * 1000);
    function func(){ 
    // IP  ()
        var ip = "<?php echo $setting['ip_server']; ?>";
        var xhr = new XMLHttpRequest();
        xhr.open("GET", "https://eu.mc-api.net/v3/server/info/" + ip, true);
        xhr.onreadystatechange = function() {
                if (xhr.readyState == 4) {
                        data = JSON.parse(xhr.responseText);
                        if (data.status) {
                                document.getElementById("sta").innerHTML="<span id='sta' <span style='color: green;font-size: 18px;'>Online</span>";
                                document.getElementById("bar").innerHTML=data.players.online + "/" + data.players.max;
                                document.getElementById("bar").style.width = Math.round(100*(data.players.online/data.players.max)) + "%";
                        } else {
                                document.getElementById("bar").innerHTML="0/0";
                                 document.getElementById("sta").innerHTML="<span id='sta' <span style='color: red;font-size: 18px;'>Offline</span>";
                        }
                }
        }
        xhr.send();
    };
</script>

<body style="color:#000;">
        <div style="width:1200px; max-width:100%; margin:auto; margin-top:40px;">
<div id="header" style="margin-bottom:10px;">
<div class="header">
<div id="header" style="margin-bottom:10px;">
</div>
        <div style="text-align:center; margin-top:20px;margin-bottom:30px;">
    <img class="animated infinite pulse" style="width: 25%;" src="<?php echo $setting['icon']; ?>">
  </div>
  
    <nav class="navbar navbar-expand-lg sticky-top navbar-light bg-light">
        <div class="container">
                <ul class="navbar-nav mr-auto pt-3 pt-lg-0">
                    <li class="nav-item dropdown"> 
      <li class="nav-item">
        <a class="nav-link" href="?page=home"><img src="menu/main.png" style="width:37px;height:37px;"></i><span class="pull-right">
                <span id="xnav-upp">&nbsp;&nbsp;<b>Home</span></b>
                <br>
                <span id="xnav-btt">&nbsp;&nbsp;</span>
              </span><span class="sr-only">(current)</span></a>
	</li>&nbsp;&nbsp;	
    <li class="nav-item">	
        <a class="nav-link" href="?page=shop&server=1"><img src="menu/shop.png" style="width:37px;height:37px;"></i><span class="pull-right">
                <span id="xnav-upp">&nbsp;&nbsp;<b>Shop</span></b>
                <br>
                <span id="xnav-btt">&nbsp;&nbsp;</span>
              </span><span class="sr-only">(current)</span></a>
      </li>&nbsp;&nbsp;
    <li class="nav-item">	
        <a class="nav-link" href="?page=topup"><img src="menu/topup.png" style="width:37px;height:37px;"></i><span class="pull-right">
                <span id="xnav-upp">&nbsp;&nbsp;<b>Topup</span></b>
                <br>
                <span id="xnav-btt">&nbsp;&nbsp;</span>
              </span><span class="sr-only">(current)</span></a>
      </li>&nbsp;&nbsp;
    <li class="nav-item">	
        <a class="nav-link" href="?page=promotion"><img src="menu/redeem.png" style="width:37px;height:37px;"></i><span class="pull-right">
                <span id="xnav-upp">&nbsp;&nbsp;<b>Promotion</span></b>
                <br>
                <span id="xnav-btt">&nbsp;&nbsp;</span>
              </span><span class="sr-only">(current)</span></a>
      </li>&nbsp;&nbsp;
                </ul>
                <ul class="navbar-nav pb-3 pb-lg-0">
                    <?php if(!$_SESSION['username']){ ?>
    <li class="nav-item">	
        <a class="nav-link" href="?page=login"><img src="menu/login.png" style="width:37px;height:37px;"></i><span class="pull-right">
                <span id="xnav-upp">&nbsp;&nbsp;<b>LOGIN</span></b>
                <br>
                <span id="xnav-btt">&nbsp;&nbsp;</span>
              </span><span class="sr-only">(current)</span></a>
      </li>&nbsp;&nbsp;		  
    <li class="nav-item">	
        <a class="nav-link" href="?page=register"><img src="menu/register.png" style="width:37px;height:37px;"></i><span class="pull-right">
                <span id="xnav-upp">&nbsp;&nbsp;<b>REGISTER</span></b>
                <br>
                <span id="xnav-btt">&nbsp;&nbsp;</span>
              </span><span class="sr-only">(current)</span></a>
      </li>&nbsp;&nbsp;	
                    <?php }else{ ?>
    <li class="nav-item <?php if($_GET['page'] == "log"){echo 'active';}else{} ?>">
		<a class="nav-link" href="?page=log"><img src="menu/log.png" style="width:37px;height:37px;"></i><span class="pull-right">
                <span id="xnav-upp">&nbsp;&nbsp;<b>Log</span></b>
                <br>
                <span id="xnav-btt">&nbsp;&nbsp;</span>
              </span><span class="sr-only">(current)</span></a>
				
      </li>&nbsp;&nbsp;
    <li class="nav-item <?php if($_GET['page'] == "logout"){echo 'active';}else{} ?>">
		<a class="nav-link" href="?page=logout"><img src="menu/logout.png" style="width:37px;height:37px;"></i><span class="pull-right">
                <span id="xnav-upp">&nbsp;&nbsp;<b>LogOut</span></b>
                <br>
                <span id="xnav-btt">&nbsp;&nbsp;</span>
              </span><span class="sr-only">(current)</span></a>
      </li>&nbsp;&nbsp;
                    <?php } ?>
                </ul>
            </div>
        </div>
    </nav>
<br>  
     <div class="card card-transparent" style="padding: 20px;color: black; -webkit-box-shadow: 0px 5px 30px -5px #000000;
  -moz-box-shadow: 0px 5px 30px -5px #000000;
    box-shadow: 0px 5px 30px -5px #000000;">
	
					<div class="col-md-12">
						<div class="input-group mb-3">
	  						<div class="input-group-prepend">
	    						<span class="input-group-text lp-title-input bg-success btn-line-b text-white"> :</span>
	  						</div>
							<marquee class="form-control form-control-lg lp-input" onmouseout="this.start()" onmouseover="this.stop()">
								<?php echo $setting['announce']; ?>
							</marquee>
						</div>
					</div> 
  
    <a href="#" class="twitch-widget" id="twitch-widget" target="_blank"></a><br><br>
    <main>
        <div class="container">
            <div class="row">
                <div class="col-lg-8">
                   <?php
                    if(!$_GET){$_GET["page"] = 'home';}
                    if(!$_GET["page"])
                    {
                      $_GET["page"] = "home";
                    }
                     if($_GET["page"] == "home"){
                         include_once __DIR__.'/_page/home.php';
                    }elseif($_GET['page'] == "shop"){
                        include_once __DIR__.'/_page/shop.php';
                    }elseif($_GET['page'] == "download"){
                        include_once __DIR__.'/_page/download.php';
                    }elseif($_GET['page'] == "topup"){
                        include_once __DIR__.'/_page/topup.php';
                    }elseif($_GET['page'] == "log"){
                        include_once __DIR__.'/_page/log.php';
                    }elseif($_GET['page'] == "gift"){
                        include_once __DIR__.'/_page/gift.php';	
                    }elseif($_GET['page'] == "giftpromotion"){
                        include_once __DIR__.'/_page/giftpromotion.php';						
                    }elseif($_GET['page'] == "confirm"){
                        include_once __DIR__.'/_page/confirm.php';				
                    }elseif($_GET['page'] == "confirmpromotion"){
                        include_once __DIR__.'/_page/confirmpromotion.php';	
                    }elseif($_GET['page'] == "promotion"){
                        include_once __DIR__.'/_page/promotion.php';
                    }elseif($_GET['page'] == "login"){
                        include_once __DIR__.'/_page/login.php';
                    }elseif($_GET['page'] == "register"){
                        include_once __DIR__.'/_page/register.php';
                    }elseif($_GET['page'] == "logout"){
                        include_once __DIR__.'/_page/logout.php';
                    }elseif($_GET['page'] == "redeem"){
                        include_once __DIR__.'/_page/redeem.php';
                    }elseif($_GET['page'] == "user"){
                        include_once __DIR__.'/_page/user.php';
                    }elseif($_SESSION['uid'] && $player['status'] == "admin" && $_GET['page'] == "backend"){
                        include_once __DIR__.'/backend/index.php';
                    }else{
                                            echo '<div class="alert alert-danger"><i class="fa fa-warning"></i>404 </div>';
                                            echo '<meta http-equiv="refresh" content="2;URL=?page=home">';
                                        }
                     ?>
                </div>
<div class="col-lg-4">
<div class="card border-0 shadow mb-4 d-none d-lg-block">
<div class="card-body">
<?php if($_SESSION['username']){ ?>
<h5 class="m-0"><i class="fa fa-user fa-fw"></i> </h5>
<hr>
<text style="font-size: 16px;"> 
<center><img src="https://minotar.net/armor/bust/<?php echo $_SESSION['realname']; ?>/175"><br></center>
<hr>
         <div class="input-group mb-3">
  <div class="input-group-prepend">
    <span class="input-group-text lp-title-input bg-success btn-line-b text-white"><i class="fa fa-user"></i>&nbsp;</span>
  </div>
<input class="form-control form-control-lg lp-input mypointlive" value="<?php echo $_SESSION['realname']; ?>" disabled/>
</div>
       
<div class="input-group mb-3" style="margin-top: -10px;">
  <div class="input-group-prepend">
    <span class="input-group-text lp-title-input bg-success btn-line-b text-white"><i class="fa fa-credit-card"></i>&nbsp;</span>
  </div>
<input class="form-control form-control-lg lp-input" value="<?php echo number_format($player['topup']); ?>.00 " disabled/>
</div>
            <div class="input-group mb-3" style="margin-top: -10px;">
  <div class="input-group-prepend">
    <span class="input-group-text lp-title-input bg-warning btn-line-b text-white"><i class="fa fa-credit-card"></i>&nbsp;</span>
  </div>
<input class="form-control form-control-lg lp-input" value="<?php echo number_format($player['points']); ?>.00 " disabled/>
</div>
<div class="input-group mb-3" style="margin-top: -10px;">
  <div class="input-group-prepend">
    <span class="input-group-text lp-title-input bg-primary btn-line-b text-white"><i class="fa fa-credit-card"></i>&nbsp;</span>
  </div>
<input class="form-control form-control-lg lp-input" value="<?php echo number_format($player['rp']); ?>.00 " disabled/>
</div>

            </text>
            <hr class="is-divider" data-content="" style="margin: 1.5rem 0;">
<div class="d-flex flex-column" style="width: 100%">
<a class="btn btn-success btn-block" href="?page=user"><i class="fa fa-user fa-lg"></i><br><b>PROFILE</b><br>[  ]</a>
<a class="btn btn-primary btn-block" href="?page=gift"><i class="fa fa-gift fa-lg"></i><br><b>GIFT</b><br>[  ]</a>
<a class="btn btn-warning btn-block" href="?page=promotion"><i class="fa fa-gift fa-lg"></i><br><b>PROMOTION</b><br>[  ]</a>
</div><hr>
<?php }else{ ?>
<h5 class="m-0"><i class="fa fa-user fa-fw"></i> </h5>
<hr>
<form method="post" action="">
<input type="hidden" name="login_submit">
<div class="form-group">
<input type="text"  name="username" class="form-control" placeholder=" : ">
</div>
<div class="form-group">
<input type="password"  name="password" class="form-control" placeholder=" : ">
</div>
<button type="submit" class="btn btn-block btn-outline-success mb-3"><i class="fa fa-sign-in fa-fw"></i> </button>
</form>
<?php } ?>
</div>
</div>
<?php
	require __DIR__ . '/_system/status/_MinecraftQuery.php';
	require __DIR__ . '/_system/status/_MinecraftQueryException.php';
	use xPaw\MinecraftQuery;
	use xPaw\MinecraftQueryException;
	
	$MCQuery = new MinecraftQuery();
?>
 <div class="card border-0 shadow mb-4">
<div class="card-body">
    <h5 class="m-0"><i class="fa fa-signal"></i>  </h5>
	<hr>
  <span id="hover" style="font-size:15px;"><i class="fa fa-fw fa-server"></i>&nbsp;IP Server : <?php echo $setting['ip_server']; ?></span><br>
  <span id="hover" style="font-size:15px;"><i class="fa fa-fw fa-power-off"></i>&nbsp; :</span> <span id="sta"></span><br>
  <span id="hover" style="font-size:15px;"><i class="fa fa-fw fa-tag"></i>&nbsp; : <?php echo $setting['version_server']; ?></span><br>
  <span id="hover" style="font-size:15px;"><i class="fa fa-fw fa-users"></i>&nbsp; : <span id="bar"></span></span>
</div>
</div>

<div class="card border-0 shadow mb-4">
<div class="card-body">
<h5 class="m-0"><i class="fa fa-trophy"></i>&nbsp;</h5>
<hr>

<?php
$sql_list = 'SELECT * FROM authme ORDER BY topup DESC LIMIT 5';
$query_list = $connect->query($sql_list);

$sql_last = 'SELECT * FROM activities WHERE (action = "TOPUP Truewallet" || action = "TOPUP TrueMoney") ORDER BY id DESC';
$query_last = $connect->query($sql_last);
?>
<table class="table table-striped ranking_tb" border="0" style="font-size:13px;">
  <thead>
    <tr>
      <th scope="col"></th>
      <th scope="col"></th>
    </tr>
  </thead>
  <tbody>
    <?php
    if($query_list->num_rows > 0)
    {
      while($list_topup = $query_list->fetch_assoc())
      {
        ?>
        <tr>
          <td>
            <img src="https://minotar.net/avatar/<?php echo $list_topup['username']; ?>/28" class="mr-3" width="28"><?php echo $list_topup['realname']; ?>
          </td>
          <td>
            <?php echo number_format($list_topup['topup'],2); ?> <i class="fa fa-adjust"></i>
          </td>
        </tr>
        <?php
      }
    }
    else
    {
      ?>
      <tr>
        <td>
          <img src="https://minotar.net/avatar/steve/28" class="mr-3" width="28">
        </td>
        <td>
          <?php echo number_format("0",2); ?> <i class="fa fa-coins text-dark"></i>
        </td>
      </tr>
      <?php
    }
    ?>
  </tbody>
</table>
</div>
</div>

<div class="card border-0 shadow mb-4">
<div class="card-body">
<h5 class="m-0"><i class="fa fa-trophy"></i>&nbsp;</h5>
<hr>

<?php
$sql_last = 'SELECT * FROM activities WHERE (action = "TOPUP Truewallet" || action = "TOPUP TrueMoney") ORDER BY id DESC LIMIT 1';
$query_last = $connect->query($sql_last);
?>
<table class="table table-striped ranking_tb" border="0" style="font-size:13px;">
  <thead>
    <tr>
      <th scope="col"></th>
      <th scope="col"></th>
    </tr>
  </thead>
  <tbody>
    <?php
    if($query_last->num_rows > 0)
    {
      while($last_topup = $query_last->fetch_assoc())
      {
        ?>
        <tr>
          <td>
            <img src="https://minotar.net/avatar/<?php echo $last_topup['username']; ?>/28" class="mr-3" width="28"><?php echo $last_topup['username']; ?>
          </td>
          <td>
            <?php echo number_format($last_topup['topup_amount'],2); ?> <i class="fa fa-adjust"></i>
          </td>
        </tr>
        <?php
      }
    }
    else
    {
      ?>
      <tr>
        <td>
          <img src="https://minotar.net/avatar/steve/28" class="mr-3" width="28">
        </td>
        <td>
          <?php echo number_format("0",2); ?> <i class="fas fa-coins text-dark"></i>
        </td>
      </tr>
      <?php
    }
    ?>
  </tbody>
</table>
</div>
</div>
						
<div class="card border-0 shadow mb-4">
<div class="card-body">
<h5 class="m-0"><img src="img/discord.png" style="width: 30px;"></i> </h5>
<hr>
	<iframe id="discord" src="https://discordapp.com/widget?id=<?php echo $setting['discord_id']; ?>&theme=dark" height="500" allowtransparency="true" frameborder="0" style="width: 100%"></iframe> 
</div></div>						
                    </div>
            </div>
			<div class="container" style="padding-top:20px;padding-bottom:20px;">
            <div class="row">
              <div class="col-7">
                <div class="input-group mb-3">
                  <div class="input-group-prepend">
                    <span class="input-group-text bg-dark text-light">IP :</span>
                  </div>
                  <input type="text" class="form-control form-control-lg" onclick="this.select()" readonly="" style="text-align:center;" value="<?php echo $setting['ip_server']; ?>">
                  <div class="input-group-append">
                    <span class="input-group-text bg-dark text-light"> <?php echo $setting['version_server']; ?></span>
                  </div>
                </div>
                <div style="color:#F3F3F3; margin-bottom:10px;">
                  <?php echo $setting['detail_server']; ?>
                </div>

              </div>
              <div class="col-5">
                <iframe src="https://www.facebook.com/plugins/page.php?href=<?php echo urlencode($setting['page_facebook']); ?>&amp;tabs&amp;width=440&amp;height=400&amp;small_header=false&amp;adapt_container_width=true&amp;hide_cover=false&amp;show_facepile=true&amp;appId=1402610513369583" height="215" style="border:none;overflow:hidden;width:100%;" scrolling="no" frameborder="0" allowtransparency="true"></iframe>
        </div>
    </main>
</div>	
<hr class="style-six">
<div class="table-responsive" style="border:0;" >
<table class="table borderless" border="0" width="auto" height="auto">
<tbody>
<tr>
<td width="100">
<img src="<?php echo $setting['icon']; ?>" width="50" height="50">
</td>
<td style="color: #fff;">
 Copyright  2019 Miximizes V.0.1 | <a target="_blank" class="foot_hover"  href="backend"></a><br>
 Webshop And System By <a class="foot_hover" target="_blank" href="https://www.facebook.com/thesahaporn">Miximizes</a>
</td>
</tr>
</tbody>
</table>
</div>
</html>

 <?php
	if(isset($_POST['login_submit']))
	{
		$msg = '';
		$alert = 'error';
		$msg_alert = '!';

		$username = $connect->real_escape_string($_POST['username']);
		$sql = 'SELECT * FROM authme WHERE username = "'.$username.'"';
		$a = $connect->query($sql);
		$a_num = $a->num_rows;
		if($a_num == 1)
		{
			$password_info = $a->fetch_assoc();
			$sha_info = explode("$",$password_info['password']);
			$salt = $sha_info[2];
			$sha256_password = hash('sha256', $_POST['password']);
			$sha256_password .= $sha_info[2];

			if(strcasecmp(trim($sha_info[3]),hash('sha256', $sha256_password)) == 0){
				$sql_user = 'SELECT * FROM authme WHERE username = "'.$username.'"';
				$query_user = $connect->query($sql_user);
				$fetch_user = $query_user->fetch_assoc();

				//* SET SESSION
				$_SESSION['uid'] = $fetch_user['id'];
				$_SESSION['username'] = $fetch_user['username'];
				$_SESSION['realname'] = $fetch_user['realname'];


				$msg = ': '.$_SESSION['realname'];
				$alert = 'success';
				$msg_alert = '!';
			}
			else
			{
				$msg = '';
				$alert = 'error';
				$msg_alert = '!';
			}
		}
		else
		{
			$msg = '';
			$alert = 'error';
			$msg_alert = '!';
		}

		?>
			<script>
				swal("<?php echo $msg_alert; ?>", "<?php echo $msg; ?>", "<?php echo $alert; ?>", {
					button: "Reload",
				})
				.then((value) => {
					window.location.href = window.location.href;
				});
			</script>
		<?php
	}
        
if(isset($_POST['submit']) == "redeem")
{
    if($_SESSION['username']){
    $code = $_POST['redeem_code'];

    $redeem_q = $connect->query("SELECT * FROM redeem WHERE code = '".$code."'");
    $redeem = $redeem_q->fetch_assoc();

    if($redeem_q->num_rows != 0)
    {
        $update_q = $connect->query("UPDATE authme set points = points + '".$redeem['cmd']."' WHERE username = '".$_SESSION['username']."'");
        //alert
            $msg = '';
			$alert = 'success';
			$msg_alert = '!';
        $delete_redeem = $connect->query("DELETE FROM redeem WHERE id = '".$redeem['id']."'");
    }
    else
    {
        $msg = '';
			$alert = 'error';
			$msg_alert = '!';
    } ?>
        <script>
				swal("<?php echo $msg_alert; ?>", "<?php echo $msg; ?>", "<?php echo $alert; ?>", {
					button: "Reload",
				})
				.then((value) => {
					window.location.href = window.location.href;
				});
			</script>               
    <script>
				swal("<?php echo $msg_alert; ?>", "<?php echo $msg; ?>", "<?php echo $alert; ?>", {
					button: "Reload",
				})
				.then((value) => {
					window.location.href = window.location.href;
				});
			</script> 
                        <?php
}
}
?>

Function Calls

header 1
file_exists 1

Variables

None

Stats

MD5 f4ace4c92535521fdca37879c75a69d4
Eval Count 0
Decode Time 157 ms