Problema risolto Ho un errore col cms...

zBaggy Dev

Nuovo utente
Autore del topic
17 Settembre 2017
48
16
Miglior risposta
0
Rieccomi con un altro problema:
upload_2018-1-16_16-44-43.png
Potreste aiutarmi? Tapatalk Tapatalk #Magnesio #Magnesio C Cosimo Celeste
Grazie in anticipo!
 
Rieccomi con un altro problema:
View attachment 598
Potreste aiutarmi? Tapatalk Tapatalk #Magnesio #Magnesio C Cosimo Celeste
Grazie in anticipo!
Postami quel file, oppure sul config.php dopo <?php aggiungi
PHP:
Perfavore, Entra oppure Registrati per vedere i codici!
 
<?php

@session_start();

require_once 'config.php';

ini_set('display_errors', '1');

# Conexión Mysqli
$db = new MySqli($main->mysql['host'], $main->mysql['user'], $main->mysql['pass'], $main->mysql['db']);
$db->set_charset("utf8");

$nojs = get_browser(null, TRUE);
if ($nojs["javascript"] == 1) {
header("Location: " . $main->path . "/nojs.php");
}

function is_logged(){
if(isset($_SESSION['id'])){
return TRUE;
}else{
return FALSE;
}
}


function getRealIP() {
if (!empty($_SERVER['HTTP_CLIENT_IP'])){
return $_SERVER['HTTP_CLIENT_IP'];
}
if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){
return $_SERVER['HTTP_X_FORWARDED_FOR'];
} else{
return $_SERVER['REMOTE_ADDR'];
}
}

if(is_logged()){
$c = $db->query("SELECT * FROM users WHERE id=" . $_SESSION['id'] . "");
$row = $c->fetch_assoc();

$ban = $db->query("SELECT * FROM bans WHERE value='".$row['username']."'");
if($ban->num_rows > 0){
$_SESSION['ban'] = $row['username'];
if($_SERVER['REQUEST_URI'] !== "/banned"){
header("Location: " . $main->path . "/banned");
}
}
}

function hk_access(){
global $row, $main;
if(is_logged()){
if($row['rank'] >= $main->min_rank){
return TRUE;
}
}else{
return FALSE;
}
}
function getCaptcha(){
$an = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$su = strlen($an) - 1;
$_SESSION['captcha'] = substr($an, rand(0, $su), 1) .
substr($an, rand(0, $su), 1) .
substr($an, rand(0, $su), 1) .
substr($an, rand(0, $su), 1) .
substr($an, rand(0, $su), 1) .
substr($an, rand(0, $su), 1);
return $_SESSION['captcha'];

}

$vipb = $db->query("SELECT * FROM bans WHERE value='".getRealIP()."'");
if($vipb->num_rows > 0){
$_SESSION['ban'] = 'ip';
if($_SERVER['REQUEST_URI'] !== "/banned"){
header("Location: " . $main->path . "/banned");
error_reporting(0);
}
}

?>


#Vincè #Vincè