Visualizzazione dei risultati da 1 a 4 su 4

Discussione: script poll

  1. #1
    Utente di HTML.it L'avatar di Pepe91
    Registrato dal
    Jan 2005
    Messaggi
    218

    script poll

    ho un problemacon questoscrpt... mi dice alla linea 189 ...qualcuno mi corregge pls?

    Codice PHP:
    <html>

    <head>
    <meta http-equiv="Content-Language" content="it">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <title>HOME</title>
    </head>

    <body>

    <div align="center">
      <center>
      <table border="1" width="589" height="429" cellspacing="0" cellpadding="0" bordercolor="#000000" bordercolordark="#000000" bordercolorlight="#000000">
        <tr>
          <td width="449" height="26" colspan="2">HOME | CONTATTACI | SEGRETERIA |
            LINK | DOVE SIAMO</td>
          <td width="124" height="26">
            <p align="center">FLASH NEWS</td>
        </tr>
        <tr>
          <td width="449" height="96" colspan="2">
            <p align="center">header</td>
          <td width="124" height="96">
            <p align="center">...</td>
        </tr>
        <tr>
          <td width="111" height="30">
            <p align="center">MENU'</td>
          <td width="456" height="34" colspan="2">
            <p align="center">banner</td>
        </tr>
      </center>
      <tr>
        <td width="111" height="158" rowspan="2">
          <ul>[*]
              <p align="right">...[*]
              <p align="right">....[*]
              <p align="right">....[*]
              <p align="right">...[*]
              <p align="right">...[*]
              <p align="right">...[/list]
        </td>
        <center>
        <td width="332" height="28">
          <p align="center">ULTIMI ARTICOLI</td>
        <td width="124" height="31">
          <p align="center">NEWS SCROLL</td>
        </tr>
        <tr>
          <td width="332" height="124">
            <ul>[*]
                <p align="center">...[*]
                <p align="center">...[*]
                <p align="center">...[*]
                <p align="center">...[/list]
          </td>
          <td width="124" height="121">
            <p align="center">...</td>
        </tr>
        <tr>
          <td width="111" height="35">
            <p align="center">FORUM STAT</td>
          <td width="332" height="35">
            <p align="center">RACCOLTA FIRME</td>
          <td width="124" height="35">
            <p align="center">SONDAGGIO</td>
        </tr>
        <tr>
          <td width="111" height="53">
            <p align="center">......</td>
          <td width="332" height="53">
            <ul>[*]
                <p align="center">...[*]
                <p align="center">...[*]
                <p align="center">...[/list]
          </td>
          <td width="124" height="53"><div align="center"><?php






    include("sond.dat");
    include(
    "sond.inc");


    if(
    $vai)
    {

    if(
    $voto){
        if(!$
    $sond)
            {

    setcookie($sond,$voto,time()+2592000);

    $n[$voto] = $n[$voto]+1;

    $data"<?php
    \$n = array();
    \$n[1] = 
    $n[1];
    \$n[2] = 
    $n[2];
    \$n[3] = 
    $n[3];
    \$n[4] = 
    $n[4];
    \$n[5] = 
    $n[5];
    \$n[6] = 
    $n[6];
    \$n[7] = 
    $n[7];
    \$n[8] = 
    $n[8];
    \$n[9] = 
    $n[9];
    \$n[10]=
    $n[10];
    ?>"
    ;

    $fn 'sond.dat';
    $fp fopen($fnw);
    fputs($fp$data);
    fclose($fp);
    echo 
    "<meta http-equiv=\"refresh\" content=\"2; URL=$PHP_SELF?action=risult\">
    <h2>Grazie di aver votato!"
    ;

    }else{
    echo 
    "<meta http-equiv=\"refresh\" content=\"2; URL=$PHP_SELF?action=risult\">
    <h2>Hai già votato!"
    ;}
    }else{
    echo 
    "<meta http-equiv=\"refresh\" content=\"2; URL=$PHP_SELF\">
    <h2>Non hai espresso alcun voto!"
    ;}

    }else{


    if(
    $action=="risult"){
    echo 
    "<center><font face=\"Courier new\" size=\"2\" color=\"#000080\">
        [b]
    $titolo[/b]</font>
        <table bgcolor=\"#ADE3FF\" border=\"0\" cellpadding=\"4\">
        <font face=\"Courier new\" size=\"1\" color=\"white\">"
    ;

    for(
    $num=1$num<=10$num++){
    if(
    $t[$num]&&$t[$num]!=''){
    $tot_arr array_sum($n);
    if(
    $tot_arr!=0){
    $perc $n[$num]*100/$tot_arr;
    $percround($perc,2);
    $img round($perc, -1);
    }else{
    $perc '0';
    $img '0';}
    echo 
    "<tr>
         <td width=\"50\"><font size=\"2\">
         [b]
    $t[$num][/b]</td><td><img src=\"$img.gif\"></td>
          <td width=\"15\"><font size=\"2\">[b]
    $n[$num][/b]</td>
          <td width=\"20\"><font size=\"2\">
    $perc%</td></tr>";}
    else{break;}}

    echo 
    "<tr>
         <td width=\"50\"><font size=\"2\" color=\"#EE0000\">
         [b]TOTALE[/b]</td><td></td>
          <td width=\"15\"><font size=\"2\" color=\"#EE0000\">[b]
    $tot_arr[/b]</td>
          <td width=\"20\"><font size=\"2\" color=\"#EE0000\">100%</td></tr>
         </font></table><font size=\"2\"><a href=\"
    $PHP_SELF\">Indietro</a>";

    }else{

    $elem count($t);
    echo 
    "<form method=\"post\" action=\"$PHP_SELF\">
        <center><font face=\"Courier new\" size=\"2\" color=\"#000080\">
        [b]
    $titolo[/b]</font>
        <table bgcolor=\"#ADE3FF\" border=\"0\" cellpadding=\"0\">"
    ;

    for(
    $i=1$i<$elem$i++){
     if(
    $t[$i]){
    echo 
    "<tr><td><input type=\"radio\" name=\"voto\" value=\"$i\"></td>
        <td><font size=\"2\">
    $t[$i]</td></tr>";}}

    echo 
    "<tr><td></td><td>
        <input type=\"submit\" name=\"vai\" value=\"Vota!\">
        </td></tr></table><font size=\"2\">
        <a href=\"
    $PHP_SELF?action=risult\">Risultati</a></form>";}}</div></td>
        </
    tr>
      </
    table>
      </
    center>
    </
    div>

    </
    body>

    </
    html>

  2. #2
    Utente di HTML.it L'avatar di WEAB
    Registrato dal
    Jun 2006
    Messaggi
    43
    qual'è la riga 189?

  3. #3
    Utente di HTML.it L'avatar di Pepe91
    Registrato dal
    Jan 2005
    Messaggi
    218
    questa
    Codice PHP:
        <td><font size=\"2\">$t[$i]</td></tr>";}} 

  4. #4
    Codice PHP:
    <td><font size='2'>$t[$i]</td></tr>";}} 
    mancava un backslash davanti al primo quote "
    -Edit- il Forum mi filtra il primo \, ho sostituito i doppi apici con quelli singoli.

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 © 2025 vBulletin Solutions, Inc. All rights reserved.