mysql changes

This commit is contained in:
lopar 2018-11-05 21:34:35 +02:00
parent ca91707466
commit 7514cd121a
2 changed files with 6 additions and 26 deletions

View File

@ -1,4 +1,4 @@
<? <?php
session_start(); session_start();
if (!isset($_SESSION['uid'])) { if (!isset($_SESSION['uid'])) {
header('Location: index.php'); header('Location: index.php');

30
vip.php
View File

@ -2,7 +2,7 @@
session_start(); session_start();
if (!($_SESSION['uid'] > 0)) header("Location: index.php"); if (!($_SESSION['uid'] > 0)) header("Location: index.php");
include "config.php"; include "config.php";
$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;")); #$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;"));
include "functions.php"; include "functions.php";
if ($user['battle'] != 0) { if ($user['battle'] != 0) {
header('location: fbattle.php'); header('location: fbattle.php');
@ -12,34 +12,14 @@ if ($user['in_tower'] == 1) {
header('Location: towerin.php'); header('Location: towerin.php');
die(); die();
} }
$al = mysql_fetch_assoc(mysql_query("SELECT * FROM `aligns` WHERE `align` = '{$user['align']}' LIMIT 1;")); $al = db::c()->query('SELECT `accses` FROM `aligns` WHERE `align` = ?i',$user['align'])->fetch_assoc();
header("Cache-Control: no-cache"); header("Cache-Control: no-cache");
?> ?>
<HTML> <HTML>
<HEAD> <HEAD>
<link rel=stylesheet type="text/css" href="css/main.css"> <link rel=stylesheet href="css/main.css">
<meta content="text/html; charset=utf-8" http-equiv=Content-type> <meta charset=utf-8">
<META Http-Equiv=Cache-Control Content="no-cache, max-age=0, must-revalidate, no-store">
<meta http-equiv=PRAGMA content=NO-CACHE>
<META Http-Equiv=Expires Content=0>
<style>
.row {
cursor: pointer;
}
</style>
<script type="text/javascript">
function show(ele) {
var srcElement = document.getElementById(ele);
if (srcElement != null) {
if (srcElement.style.display == "block") {
srcElement.style.display = 'none';
}
else {
srcElement.style.display = 'block';
}
}
}
</script>
<SCRIPT> <SCRIPT>
var Hint3Name = ''; var Hint3Name = '';