Visualizzazione dei risultati da 1 a 5 su 5
  1. #1

    css colore sfondo

    Ciao a tutti! quando aggiorna la pagina, si vede lo sfondo bianco, e poi appena la pagina finito di caricare torna il colore. Non è normale, perchè se c'è un colore di sfondo, anche se aggiorna la pagina, si deve vedere lo stesso il colore..
    Questo succede perchè ho il CSS esterno. La mia pagina è così strutturata
    Codice PHP:
    include("../web/core.php");
    include("../web/config.php");
    connectdb();
    $uip = getip();
    $action = $_GET["action"];
    $sid = $_GET["sid"];
    $page = $_GET["page"];
    $who = $_GET["who"];
    $uid = getuid_sid($sid);
    $sid = $_GET["sid"];
    $site = $_GET["site"];
    $theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
    $sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'"));
    $sitename = $sitename[0];

    if(($action != "") && ($action!="terms")) 

        $uid = getuid_sid($sid); 
        if((islogged($sid)==false)||($uid==0)) 
        { 
            echo '<card id="main" title="wapaa.lv">'; 
          echo '<p align="center">'; 
          echo 'You are not logged in
    '; 
          echo 'Or your session has been expired

    '; 
          echo '[url="index.php"]Home[/url]'; 
          echo '</p>'; 
          echo '</card>'; 
          echo '</wml>'; 
          exit(); 
        } 
    }

    echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">



    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html"/>
    <meta http-equiv="Cache-Control" content="no-cache" forua="true"/>';
    echo "<title>$sitename Upload Files</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "</head>";
    echo "<body bgcolor=\"#FFFFFF\" text=\"#000000\" link=\"#0000FF\" vlink=\"#800080\">";


    if ($upload="upload"&&$superdat_name){

    if (!eregi("\.(mid|gif|bmp|mid|midi|3gp|mp3|wav|jar|jad|jpeg|jpg|sis|mmf|amr|png|wbmp)$",$superdat_name)){
    print "[b]Unsupported File Extention![/b]";
    }else{
    $superdat_name = preg_replace(
                 '/[^a-zA-Z0-9\.\$\%\'\`\-\@\{\}\~\!\#\(\)\&\_\^]/'
                 ,'',str_replace(array(' ','%20',"'"),array('_','_', ""),$superdat_name));
    if(strlen($superdat_name)>53){ print "[b]Nome del file è troppo lungo![/b]";
    }else{
    if (empty($superdat)) {
    print "[b]Nessun file specificato!!![/b]";
    }else{
    copy("$superdat", "files/$superdat_name") or
    die("Couldn't copy file.");

    $ok = array("image/png","image/bmp","image/jpeg", "image/jpg", "image/gif");

    if(!in_array($_FILES["file"]["type"], $ok))
    exit("Estensione file non consentita!");

    $date=(date("D, j F Y"));
    $fsize=round($superdat_size/1024,1);
    $text = "&&$superdat_name&&$fsize KB&&$date&&$REMOTE_ADDR&&";
    $fz = "$fsize KB";
    if("$text"!="$check[1]"){
    $mysql=mysql_query("INSERT INTO ibwf_uploads SET id='', uid='".$uid."', filename='".$superdat_name."', filesize='".$fsize." KB', date='".$date."', uip='".$REMOTE_ADDR."'");
    echo mysql_error();
    }
    echo "[b]$superdat_name[/b] il tuo file è stato caricato con successo";
    }
    }
    }
    }
    ?>
    <?php
    echo "<FORM align=\"center\" ACTION=\"upload.php?sid=$sid&amp;site=$site\" METHOD=\"POST\" ENCTYPE=\"multipart/form-data\">";
    ?>
    [b]Seleziona file da caricare :[/b]

    <input align="center" type="file" name="superdat">

    <input align="center" type="hidden" name="upload" value="upload"/>
    <INPUT align="center" TYPE=SUBMIT NAME="submit" VALUE="Upload File!">

    </small>
     [b]<u>I file da caricare devono avere questi formati:</u>[/b]

    .jpg, .jpeg, .gif, .png, .bmp, wbmp, .mid, .midi, .mpg, .mmf, .amr, .mp3, .wav, .wmv , .avi, .3gp, .sis, .jar, .jad, .zip, .rar, .txt


    Nota es.: L'Indirizzo della tua Foto/Immagine sarà [url]http://universal3000.altervista.org/chat_universal2/uploaded/files/Animation6.gif[/url]

    ----------
    <?php echo "
    [size="
    1"]<a href=\"index.php?sid=$sid&amp;site=$site\">Files Caricati</a>[/size]"?>
    </FORM>
    <?php

    if($site=="wap"){
        echo 
    "

    <a href=\"../wap/index.php?action=main&amp;sid=
    $sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
    }else{
        echo 
    "

    <a href=\"../web/index.php?action=main&amp;sid=
    $sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
    }
    ?>
    </body>
    </html>
    ..e vorrei mettere CSS interno, ma non so come fare?

  2. #2
    Utente di HTML.it
    Registrato dal
    Sep 2001
    Messaggi
    21,188
    Quando si parla di CSS, il sorgente PHP non serve: occorre conoscere cosa arriva esattamente al browser. Lo puoi vedere dal browser stesso: click destro > visualizza sorgente

    Quello che devi controllare e` se la pagina e` una pagina HTML corretta, che inizia con il DOCTYPE, ha uno ed un solo <head>, ha uno ed un solo <body>, se i tag sono innestati correttamente, ecc.
    In questo i validatori (*) ti possono essere d'aiuto: essendo la pagina generata con PHP, devi usare l'opzione di inserire il link alla pagina.

    (*)
    validatore HTML
    validatore CSS
    Nuova politica di maggiore severita` sui titoli delle discussioni: (ri)leggete il regolamento
    No domande tecniche in messaggi privati

  3. #3
    Ho messo l'indirizzo della pagina nel convalidatore CSS , dice "complimenti nessun errore trovato", poi messo stesso indirozzo nel convalidatore html e dice " spiacente, la pagina non può essere controllata"! Qui metto il codice della pagina , ma non capisco dove sia l'errore
    Codice PHP:
    header("Cache-Control: no-cache, must-revalidate");
    header("Pragma: no-cache");
    //header('Content-type: application/vnd.wap.xhtml+xml'); 
    echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
    echo 
    "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
    ?>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta forua="true" http-equiv="Cache-Control" content="max-age=0"/>
    <meta forua="true" http-equiv="Cache-Control" content="must-revalidate"/>
    </head>
    <?php

    include("config.php"); 
    include(
    "core.php"); 
    connectdb();
    $action=$_GET["action"];
    $id=$_GET["id"];
    $sid $_GET["sid"];
    $rid=$_GET["rid"];
    $rpw=$_GET["rpw"];
    $uid getuid_sid($sid);
    $uexist isuser($uid);
    $theme mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
    $data date("H:i");

    if((
    islogged($sid)==false)||!$uexist)
        {
        echo 
    "<head>";
          echo 
    "<title>Error!!!</title>";
          echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">"
          echo 
    "</head>";
          echo 
    "<body>";
          echo 
    "<center>";
          echo 
    "Non sei loggato
    "
    ;
          echo 
    "O la tua sessione è scaduta

    "
    ;
          echo 
    "<a href=\"index.php\">Login</a>";
          echo 
    "</center>";
          echo 
    "</html>";
          echo 
    "</body>";
          exit();
        }
        
    if(
    isbanned($uid))
        {
          echo 
    "<head>";
          echo 
    "<title>Error!!!</title>";
          echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo 
    "</head>";
          echo 
    "<body>";
          echo 
    "<p align=\"center\">";
          echo 
    "<img src=\"../images/notok.gif\" alt=\"x\"/>
    "
    ;
          echo 
    "[b]Sei stato Bannato[/b]

    "
    ;
          
    $banto mysql_fetch_array(mysql_query("SELECT timeto, pnreas, exid FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1' OR uid='".$uid."' AND penalty='2'"));
        
    $banres mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'"));
          
    $remain $banto[0]- time();
          
    $rmsg gettimemsg($remain);
          echo 
    "[b]Tempo rimasto: [/b]$rmsg
    "
    ;
          
    $nick getnick_uid($banto[2]);
        echo 
    "[b]By: [/b]$nick
    "
    ;
        echo 
    "[b]Reason: [/b]$banto[1]";
          
    //echo "<a href=\"index.php\">Login</a>";
          
    echo "</p>";
          echo 
    "</body>";
          echo 
    "</html>";
          exit();
        }
        
    $isroom mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_rooms WHERE id='".$rid."'"));
        if(
    $isroom[0]==0)
        {
        echo 
    "<head>";
          echo 
    "<title>Error!!!</title>";
      echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo 
    "</head>";
          echo 
    "<body>";
          echo 
    "<center>";
          echo 
    "[b]La Room non esiste[/b]

    "
    ;
          echo 
    "<a href=\"index.php?action=chat&amp;sid=$sid\">Chatrooms</a>";
          echo 
    "</center>";
          echo 
    "</body>";
          echo 
    "</html>";
          exit();
        }
    $passworded mysql_fetch_array(mysql_query("SELECT pass FROM ibwf_rooms WHERE id='".$rid."'"));
        if(
    $passworded[0]!="")
        {
          if(
    $rpw!=$passworded[0])
          {
        echo 
    "<head>";
          echo 
    "<title>Error!!!</title>";
      echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo 
    "</head>";
          echo 
    "<body>";
          echo 
    "<center>";
          echo 
    "[b]Password Errata![/b]
    "
    ;
          echo 
    "Non è possibile entrare in questa stanza

    "
    ;
          echo 
    "<a href=\"index.php?action=chat&amp;sid=$sid\">Chatrooms</a>";
          echo 
    "</center>";
          echo 
    "</body>";
          echo 
    "</html>";
          exit();
          }
        }
        if(!
    canenter($rid,$sid))
        {
        echo 
    "<head>";
          echo 
    "<title>Error!!!</title>";
      echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo 
    "</head>";
          echo 
    "<body>";
          echo 
    "<center>";
          echo 
    "[b]Autorizzazione negata![/b]

    "
    ;
          echo 
    "<a href=\"index.php?action=chat&amp;sid=$sid\">Chatrooms</a>";
          echo 
    "</center>";
          echo 
    "</body>";
          echo 
    "</html>";
          exit();}
        
    addtochat($uid$rid);
            
    $timeto 300;
            
    $timenw time();
            
    $timeout $timenw-$timeto;
            
    $rooms mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'"));
            
    $rname $rooms[1];
            
    $nick getnick_sid($sid);
                
          if (
    $action=="")
          {
          echo 
    "<head>";
          echo 
    "<title>$rname</title>";
          echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          
    $unreadpopup=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_popups WHERE unread='1' AND touid='".$uid."'"));
          if (
    $unreadpopup[0]<1)
          {
          echo 
    "<meta http-equiv=\"refresh\" content=\"30; url=chat.php?time=";
          echo 
    "".date("dmHis")."";
          echo 
    "&amp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">";
          }
          echo 
    "</head>";
          echo 
    "<body>";
      
    $mmsg htmlspecialchars(getsetmood(getuid_sid($sid)));codiceecho "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
            echo 
    "</body>";
    }
    /////////////////////////////////////////////////////SAY

          
    else if ($action=="say")   
          {
         echo 
    "<head>";
          echo 
    "<title>Scrivi Msg</title>";
      echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo 
    "</head>";
          echo 
    "<body>";
          echo 
    "<p align=\"center\">";codice/////////////////////////////////////////////////////SAY2
          
    else if ($action=="say2")                   {
        echo 
    "<head>";
          echo 
    "<title>Inviare Privato</title>";
      echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo 
    "</head>";
          echo 
    "<body>";
          echo 
    "<p align=\"center\">";codice/////////////////////////////////////////////////////CHAT OPTIONS

            
    else if ($action=="options")   
                            {
             echo 
    "<head>";
          echo 
    "<title>Chat Opzioni</title>";
      echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo 
    "</head>";
          echo 
    "<body>";
              
    $mmsg htmlspecialchars(getsetmood(getuid_sid($sid)));codiceecho "<head>";
          echo 
    "<title>Chat UserList</title>";
      echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo 
    "</head>";
          echo 
    "<body>";
            echo 
    "


    "
    ;codiceecho "<head>";
          echo 
    "<title>Exposing ChatUser</title>";
      echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo 
    "</head>";
          echo 
    "<body>";
          echo 
    "<p align=\"center\">
    "
    ;codiceecho "<head>";
          echo 
    "<title></title>";
          echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo 
    "</head>";
          echo 
    "<body>";
          echo 
    "<p align=\"center\">
    "
    ;codiceecho "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a></p>";
          echo 
    "</body>";
    }
    ?>

  4. #4
    Utente di HTML.it
    Registrato dal
    Sep 2001
    Messaggi
    21,188
    IL CODICE PHP NON SERVE !!!

    Se vuoi aiuto devi postare il codice HTML, come arriva la browser, oppure postare un link.

    PS: ma quale DTD usi? E` una pagina solo per dispositivi mobili?
    Nuova politica di maggiore severita` sui titoli delle discussioni: (ri)leggete il regolamento
    No domande tecniche in messaggi privati

  5. #5
    Non so cos'è DTD. è visualizzabile per cellulari e pc, il link è questo
    http://universal3000.altervista.org/...2/web/chat.php
    ma per capire devi entrare nella community col cellulare andare nella stanza della chat..

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.