No zamieniłem tak jak napisłaes nospor ale i tak nie działa, najdziwniejsze jest to że tam gdzie mam przekierowanie do index.php nie przenosimnie tam ! Dlaczego
Jeżeli zamiast isset dam empty również nie działa... a gdy mam isset na localhoscie u mnie w domu. gdzie register_globals mam na on wszystko jest ok, no ale tam gdzie register_globals jest off nie dizłaOto cały mój kod:
plik index.php:
<?php
require_once('functions/engine.php');
$default_theme = 'default';
set_theme();
$upage_title = "Witam";
$t_folder = 'theme';
//require('functions/mysql.php');
//include('functions/news.php');
//include("grafika/styl.php");
# Elementy szkieletu strony
include_once(''.$t_folder.'/'.$theme.'/header.php');
include_once(''.$t_folder.'/'.$theme.'/left.php');
include_once(''.$t_folder.'/'.$theme.'/right.php');
# Treść strony
include_once(''.$t_folder.'/'.$theme.'/content.php');
# Stopka
include_once(''.$t_folder.'/'.$theme.'/footer.php');
?>
plik engine.php:
<?php
// Uzytkownik do bazy danych
// Hasło do bazy danych
// Adres do bazy danych
define('DB_HOST', 'localhost');
// Nazwa bazy danych
define('DB_NAME', 'kportal_goin_pl');
// Łączenie do bazy MySQL
//$dbc = mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) or DIE ('Nie udało się połączyć z bazą danych <BR>' . mysql_error());
// Wybieranie bazy danych
//mysql_select_db (DB_NAME) or DIE ('Nie udało się wybrać bazy danych <BR>' . mysql_error());
// Tytuł strony
$page_title = 'KPortal - strona domowa Krystiana Podemskiego';
// Słowa kluczowe strony
$keywords = "Strona domowa, Krystian Podemski, Vieri, php, mysql, programowanie, skrypty
, tutoriale, o mnie";
// Opis strony
$description = "Strona domowa - Krystiana Podemskiego";
function set_theme() {
global $set_theme, $logs, $theme, $default_theme;
if(isset($_GET['set_theme']) && $_GET['set_theme']!='') { $theme = $_GET['set_theme'];
$theme = $set_theme;
header("Location: index.php"); }
}
$theme = $default_theme;
} else {
$theme = $default_theme;
}
}
function stheme_form() {
echo '<center><form></FORM><select name="set_theme" OnChange="selecturl(this)">';
if($r<>'.' AND
$r<>'..' AND
is_dir('theme/'.$r)) {
if($r==$theme) $napis = ' selected'; else $napis ='';
$v = 'index.php?set_theme='.$r;
echo '<option value="'.$v.'"'.$napis.'>'.$r.'</option>';
}
}
echo '</select></form></center>';
}
?>
No np. plik header.php:
echo'
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
<title>'.$page_title.' - '.$upage_title.'</title>
<meta name="description" content="'.$description.'">
<meta name="keywords" content="'.$keywords.'">
<link rel="stylesheet" type="text/css" href="'.$t_folder.'/'.$theme.'/styl.css" />
';
?>
<!-- (C) 2004 stat.pl - ver 1.0 / Strona glowna witryny -->
<script type="text/javascript">
document.writeln('<'+'scr'+'ipt type="text/javascript" src="http://s4.hit.stat.pl/_'+(new Date()).getTime()+'/script.js?id=bVnldEuu0Rw6SNPFSNWlEsbiTBLwdZCJqYo3E78s1Aj.87/l=11"></'+'scr'+'ipt>');
</script>
<script LANGUAGE="JavaScript">
function selecturl(s) {
var gourl = s.options[s.selectedIndex].value; window.top.location.href = gourl;
}
</SCRIPT>
</head>
<body>
<div id="zawartosc">
<div id="naglowek">
<?
<img src="'.$t_folder.'/'.$theme.'/grafika/logo.jpg" alt="Strona domowa Krystiana Podemskiego" width="870" height="150" /></div>
';