Zmienilem display_errors na ON
a co do short_open_tags , to bylo ustawione:
short_open_tag = On
I ciągle wywala białą stronę.
Przedstawiam ten index.php odpowiadający za te logowanie.
<?php
include('Smarty.class.php');
$smarty = new Smarty;
require_once('config.php');
session_start();
if($_POST['f_login'] and $_POST['f_haslo']){
$login = htmlspecialchars($_POST['f_login']);
$sql = "select * from `vt_users` where `login`='".$login."'";
$wiersz = mysql_fetch_array(mysql_query($sql));
echo mysql_error();
if($wiersz['login']==$login and $wiersz['haslo']==md5($_POST['f_haslo'])){
$_SESSION['login_id']=$wiersz['id'];
$_SESSION['admin']='tak';
$_SESSION['login_port']=$wiersz['port'];
$_SESSION['login']=$wiersz['login'];
$_SESSION['login_publiczny']=$wiersz['publiczny'];
$_SESSION['zalogowany']='tak';
$_SESSION['login_pakiet']=$wiersz['pakiet'];
$sql="insert into `vt_logi` SET `user_id`='".$wiersz['id']."', `ip`='".$_SERVER['REMOTE_ADDR']."', `data`='".date("Y-m-d H:i:s")."', `login`='".$wiersz['login']."', `tresc`='4'";
mysql_query($sql);
}else{
$sql="select * from `vt_junior` where `login`='".$login."'";
$wiersz = mysql_fetch_array(mysql_query($sql));
if($wiersz['login']==$login and $wiersz['haslo']==md5($_POST['f_haslo'])){
$_SESSION['login']=$wiersz['login'];
$_SESSION['junior_id']=$wiersz['id'];
$_SESSION['junior_prawa']=$wiersz['prawo'];
$sql="insert into `vt_logi` SET `user_id`='".$wiersz['user_id']."', `ip`='".$_SERVER['REMOTE_ADDR']."', `data`='".date("Y-m-d H:i:s")."', `login`='".$wiersz['login']."', `tresc`='4'";
mysql_query($sql);
$sql = "select * from `vt_users` where `id`='".$wiersz['user_id']."'";
$wiersz = mysql_fetch_array(mysql_query($sql));
$_SESSION['login_id']=$wiersz['id'];
$_SESSION['login_port']=$wiersz['port'];
$_SESSION['login_pakiet']=$wiersz['pakiet'];
$_SESSION['zalogowany']='tak';
$_SESSION['junior']='tak';
}
else{
$smarty->assign('msg','1');
$smarty->assign('wiadomosc','Zly login lub haslo!');
}
}
}elseif($_GET['f']=='wyloguj'){
$_SESSION['login_id']='';
$_SESSION['login_port']='';
$_SESSION['login']='';
$_SESSION['login_publiczny']='';
$_SESSION['zalogowany']='';
header('Location: http://81.89.108.83');
session_destroy();
}
if($_SESSION['login_id'] and $_SESSION['zalogowany']=='tak'){
if(!eregi('ban;',$_SESSION['junior_prawa']) and $_SESSION['admin']!='tak'){$smarty->assign('mban','1');}
if(!eregi('ustawienia',$_SESSION['junior_prawa']) and $_SESSION['admin']!='tak'){$smarty->assign('mustawienia','1');}
if(!eregi('logi;',$_SESSION['junior_prawa']) and $_SESSION['admin']!='tak'){$smarty->assign('mlogi','1');}
if(!eregi('junior;',$_SESSION['junior_prawa']) and $_SESSION['admin']!='tak'){$smarty->assign('mjunior','1');}
$plik='files/u_'.basename(htmlspecialchars($_GET['f'])).'.php';
if(file_exists($plik)){
require_once($plik);
}else{
require_once('files/u_serwer.php');
}
$smarty->display('strona.tpl');
}
else{
header('Location: http://81.89.108.83');
$smarty->display('login.tpl');
}
?>