Ciao a tutti,
vi allego uno screenshot di quello che mi succede alla pagina:
nel file php includo il menu:
Come vedete ho commentato la echo che mi causa il problema. Se è decommentata il layout è a posto, se come in questo caso è decommentata fa lo scherzo dell'allegato.codice:<?php //echo "Sei loggato come: " . $_SESSION['user']; echo "<div id=\"menu\"> <a href=\"./team.php\">Squadra</a> <a href=\"./formazione.php\">Formazione</a> <a href=\"./bacheca.php\">Bacheca</a> <a href=\"./logout.php\">Logout</a>"; if(strcmp($_SESSION['user'], "xxxxxxx") == 0){ echo "<a href=\"./registration.php\">Registra utenti</a>"; } echo "</div>"; ?>
Il css:
E questo è uno dei file php dove includo il menu:codice:html, body{ width:100%; height:100%; margin: 0 0 0 0px; padding: 0px; background: url("../images/banner.png") no-repeat top; background-color: #3fc26e; font-size: 14px; font-family: Verdana, Arial, "MS Trebuchet", sans-serif; } #main{ width:auto; height: auto; margin-left:auto; margin-right:auto; text-align: center; } #menu{ width: 600px; height: 40px; margin-top:135px; margin-left:auto; margin-right:auto; } #menu a{ text-decoration: none; color: black; font-size: 18px;; display: block; height: 26px; width: 100px; float:left; padding: 5px; margin-left: 10px; margin-right: 10px; text-align:center; } #team_box{ width:300px; border: 2px solid blue; float:left; } #module_box{ width:440px; border: 2px solid blue; text-align:center; float:left; background: url('../images/bg2.png') repeat; } #prob_team_box{ width:auto; border: 2px solid blue; text-align:center; float:left; font-size:10px; font-family: Verdana, Arial, "MS Trebuchet", sans-serif; } .prob_match{ font-size: 14px; font-weight: bold; } .player_sx{ border-bottom: 1px solid; width:100px; text-align: left; float:left; } .player_dx{ border-bottom: 1px solid; width:100px; text-align: right; float:left; } .login{ height:300px; width:500px; margin-left:auto; margin-right:auto; text-align: center; font-family: Verdana, Arial, "MS Trebuchet", sans-serif; font-size:14px; } .login_input{ height:24px; width: 240px; font-family: Verdana, Arial, "MS Trebuchet", sans-serif; font-weight: bold; font-size:12px; border: 3px solid #887777; color: #887777; margin-top:10px; margin-bottom:10px; background-color: #ccdddd; } .login_error{ width: 300px; color: #880000; font-family: Verdana, Arial, "MS Trebuchet", sans-serif; font-weight: bold; font-size:14px; text-align:center; border: 3px solid #880000; padding:5px; margin-left:auto; margin-right:auto; margin-bottom:20px; } .title{ text-align:center; font-size: 200%; text-decoration: underline; } .role{ height:30px; color: green; font-size:16px; background-color: #99CC66; border-bottom:1px solid black; } .team{ width: 10%; font-style: italic; display: inline-block; text-align: left; } .team_table{ border:3px solid green; } .player{ width:80%; text-align:left; display: inline-block; text-align: left; } #full_team{ width:400px; margin-left:auto; margin-right:auto; } .entry1{ background-color: #CCFFCC; border-bottom: 1px solid black; } .entry2{ background-color: #CCFF99; border-bottom: 1px solid black; } .mex1{ background-color: #CCFFCC; border-bottom: 1px solid black; } .mex2{ background-color: #CCFF99; border-bottom: 1px solid black; } .all_message{ float: left; width: 600px; } .modules{ height: 24px; text-align: center; font-size: 14px; border: 2px solid green; margin-left:10px; margin-right:10px; cursor: pointer; } .choose_player{ float:left; width:200px; font-size: 90%; text-align: center; } .full_team{ height:350px; } .bench{ float:right; margin-right:10px; } .titolari{ float:left; margin-left:10px; } .submit_team, .login_button, .submit_mex{ height: 24px; text-align: center; font-size: 14px; border: 3px solid green; margin-top:10px; margin-left:10px; margin-right:10px; } .write_mex{ font-family: Verdana, Arial, "MS Trebuchet", sans-serif; font-size:14px; border: 3px solid #887777; color: #887777; margin-top:10px; margin-bottom:10px; background-color: #ccdddd; } .small_nb{ font-size:70%; color: #999999; font-style: italic; }
La cosa strana è che prima di loggarsi la pagina index non presenta il problema, mentre dopo il login si:Codice PHP:<?php
include("./common/header.php");
if(!isset($_SESSION["user"])){
echo "Devi eseguire il login per accedere alla tua squadra.
Torna alla <a href=\"./index.php\">pagina principale</a> ed effetua il login.";
}
else{
include("./common/menu.php");
include("./common/lib/lib.php");
echo "<div id=\"main\"><div id=\"full_team\">";
load_team($_SESSION["user"]);
echo "</div></div>";
}
require_once("./common/footer.php");
?>
Non riesco a capire cosa causa questo problema.Codice PHP:<?php
require_once("./common/header.php");
if(!isset($_SESSION['user'])){
include("./login.php");
}
if(isset($_SESSION['user'])){
require_once("./common/menu.php");
}
require_once("./common/footer.php");
?>
Grazie a chi cercherà di aiutarmi!

Rispondi quotando