witam chodzi o stronę http://www.ipin.edu.pl/wordpress/konkursy/admin można się zalogować na nią i potem dodać ogłoszenie poprzez http://www.ipin.edu.pl/wordpress/konkursy/dodaj

chciałem przenieś ten kod na inną stronę też na WordPressie i nie działa logowanie nie wiem dlaczego dodam że nowa strona jest na serwerze IIS 7 ina bazie mysql.

Na podstronie dodaj nic się nie dzieje tak jak by zmienna "auth" nie była przekazywana czy ktoś ma pomysł jak to rozwiązać z góry dziękuje za pomoc.

pierw uruchamia się kod wklejony do WordPress czyli

<?php
if(count($bledy) > 0) {
?>
<div style="margin:10px 0px;border:1px solid red;float:left;width:100%;text-align:center;">
Błędnie podany login lub hasło.
</div>
<?php
}
if($_SESSION['auth'] === true) {
?>
<div style="margin:10px 0px;float:left;width:100%;text-align:center;">
Witaj <?php echo $_SESSION['login']; ?>.
</div>
<?php
} else {
?>

<form action="" method="post" id="form_reg">
<fieldset>
<label for="login">
<span class="label">
Login:
</span>

<input type="text" name="login" id="login" />
</label>
<label for="pass">
<span class="label">
Hasło:
</span>

<input type="password" name="pass" id="pass" />
</label>
</fieldset>
<div>
<input type="submit" value="Loguj" name="submit_loguj" /> 
</form>

<?php
}
?>

poniżej kod z pliku: dodaj_konkurs.php

<?php

include ("class/Connection.php");
include ("class/SmartyL.php");
include ("class/User.php");
//include ("logowanie.php");


$conn = new Connection();
$smarty = new SmartyL();
$user = new User();




$smarty->template_dir = '/inetpub/wwwroot/konkursy/templates';
$smarty->compile_dir = '/inetpub/wwwroot/konkursy/templates_c';
$smarty->cache_dir = '/inetpub/wwwroot/konkursy/cache';
$smarty->config_dir = '/inetpub/wwwroot/konkursy/configs';

$smarty->assign('server_url',$_SERVER['REDIRECT_URI']);
$smarty->assign('zalogowany',$user->auth());

if(($_GET['ok']==1) && $user->auth()) {
	$smarty->assign('ok',$_GET['ok']);
}
if(count($GLOBALS['bledy_form']) > 0) {
		$smarty->assign('dane',$GLOBALS['dane_form']);
		$smarty->assign('bledy',$GLOBALS['bledy_form']);
	}
	
$smarty->display('konkursy/dodaj.tpl');



?> 

oraz plik logowanie.php

<?php
include ("class/Connection.php");
include ("class/SmartyL.php");
include ("class/User.php");

if(isset($_POST['submit_loguj'])) {
	$user = new User();
	if($user->logowanie(htmlspecialchars($_POST['login']),htmlspecialchars($_POST['pass'])))
		header('Location: /konkursy/');
	else {
		$bledy = array('logowanie'=>1);
	}
}

?>