Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 15

Discussione: Calendario eventi!

  1. #1
    Utente di HTML.it
    Registrato dal
    Apr 2008
    Messaggi
    266

    Calendario eventi!

    Salve raga, qui su html.it nella sezione php ho trovato un calendario per l'inserimento di eventi.
    Ogni volta che inserisco un evento dentro il calendario mi spunta il nome dell'evento e se clicco mi apre una pop-up con la descrizione e (se ci sono) altri eventi:

    IMG:


    Quello che vorrei fare io è la seguente:

    Che invece di spuntare l'evento, mi spunti un img.

    Ecco il file con tutte le funzioni dello script:

    Codice PHP:
    <?php
    /*******************************************************
    * functions.php -
    *    phpEventCalendar global include file
    *******************************************************/

    function auth($login ''$passwd ''
    {
        
    session_start();
        
    $auth     0;
        
    $register false;
        
    $authdata null;
        
        if (isset(
    $_SESSION['authdata'])) {
            
    $authdata $_SESSION['authdata'];
        }
        
        
    # return false if login neither passed to func, nor in session
        
    if (empty($login) && empty($authdata['login'])) {
            return 
    0;
        }

        
    # get login passed to function
        
    if (!empty($login)) {
            
    $username $login;
            
    $pw       $passwd;
            
    $register true;
        } else {
            
    $username $authdata['login'];
            
    $pw       $authdata['password'];
        }
        
        
    mysql_connect(DB_HOSTDB_USERDB_PASS) or die(mysql_error());
        
    mysql_select_db(DB_NAME) or die(mysql_error());
        
        
    $sql "
            SELECT * FROM " 
    DB_TABLE_PREFIX "users 
            WHERE username = '" 
    $username "'";
        
    $result mysql_query($sql) or die(mysql_error());
        
    $row mysql_fetch_assoc($result);
        
        
    # validate login, and register session data if appropriate 
        
    if ( $pw == $row["password"] ) {
            
    $auth $row['userlevel'];

            if (
    $register) {
                
    $_SESSION['authdata'] = array(
                    
    'login'     => $row['username'], 
                    
    'password'  => $row['password'], 
                    
    'userlevel' => $row['userlevel'], 
                    
    'uid'       => $row['uid'],
                );
            }
        } else {
            
    # if passwords didn't match, delete authdata session data 
            
    unset($_SESSION['authdata']);
        }
           return 
    $auth;
    }

    # ###################################################################

    function monthPullDown($month$montharray)
    {
        echo 
    "<select name=\"month\">\n";

        
    $selected[$month 1] = ' selected="selected"';

        for(
    $i=0;$i 12$i++) {
            
    $val $i 1;
            
    $sel = (isset($selected[$i])) ? $selected[$i] : "";
            echo 
    "    <option value=\"$val\"$sel>$montharray[$i]</option>\n";
        }
        echo 
    "</select>\n\n";
    }

    # ###################################################################

    function yearPullDown($year)
    {
        echo 
    "<select name=\"year\">\n";

        
    $selected[$year] = ' selected="selected"';
        
    $years_before_and_after 3;
        
    $start_year $year $years_before_and_after;
        
    $end_year   $year $years_before_and_after;

        for(
    $i=$start_year;$i <= $end_year$i++) {
            
    $sel = (isset($selected[$i])) ? $selected[$i] : "";
            echo 
    "    <option value=\"$i\"$sel>$i</option>\n";
        }
        echo 
    "</select>\n\n";
    }

    # ###################################################################

    function dayPullDown($day)
    {
        echo 
    "<select name=\"day\">\n";

        
    $selected[$day] = ' selected="selected"';

        for(
    $i=1;$i <= 31$i++) {
            
    $sel = (isset($selected[$i])) ? $selected[$i] : "";
            echo 
    "    <option value=\"$i\"$sel>$i</option>\n";
        }
        echo 
    "</select>\n\n";
    }

    # ###################################################################

    function hourPullDown($hour$namepre)
    {
        echo 
    "\n<select name=\"" $namepre "_hour\">\n";
        
        
    $selected[$hour] = ' selected="selected"';

        for(
    $i=0;$i <= 12$i++) {
            
    $sel = (isset($selected[$i])) ? $selected[$i] : "";
            echo 
    "    <option value=\"$i\"$sel>$i</option>\n";
        }
        echo 
    "</select>\n\n";
    }

    # ###################################################################

    function minPullDown($min$namepre)
    {
        echo 
    "\n<select name=\"" $namepre "_min\">\n";
        
        
    $selected[$min] = ' selected="selected"';

        for(
    $i=0;$i 60$i+=5) {
            
    $disp_min sprintf("%02d"$i);
            
    $sel = (isset($selected[$i])) ? $selected[$i] : "";
            echo 
    "\t<option value=\"$i\"$sel>$disp_min</option>\n";
        }

        echo 
    "</select>\n\n";
    }

    # ###################################################################

    function amPmPullDown($pm$namepre)
    {
        
    $sel ' selected="selected"';
        
    $am  null;
        if (
    $pm) { $pm $sel; } else { $am $sel; }

        echo 
    "\n<select name=\"" $namepre "_am_pm\">\n";
        echo 
    "    <option value=\"0\"$am>am</option>\n";
        echo 
    "    <option value=\"1\"$pm>pm</option>\n";
        echo 
    "</select>\n\n";
    }

    # ###################################################################

    function javaScript()
    {
    ?>
        <script language="javascript">
        function submitMonthYear() {
            document.monthYear.method = "post";
            document.monthYear.action = 
                "index.php?month=" + document.monthYear.month.value + 
                "&year=" + document.monthYear.year.value;
            document.monthYear.submit();
        }
        
        function postMessage(day, month, year) {
            eval(
            "page" + day + " = window.open('eventform.php?d=" + day + "&m=" + 
            month + "&y=" + year + "', 'postScreen', 'toolbar=0,scrollbars=1," +
            "location=0,statusbar=0,menubar=0,resizable=1,width=340,height=400');"
            );
        }
        
        function openPosting(pId) {
            eval(
            "page" + pId + " = window.open('eventdisplay.php?id=" + pId + 
            "', 'mssgDisplay', 'toolbar=0,scrollbars=1,location=0,statusbar=0," +
            "menubar=0,resizable=1,width=340,height=400');"
            );
        }
        
        function loginPop(month, year) {
            eval("logpage = window.open('login.php?month=" + month + "&year=" + 
            year + "', 'mssgDisplay', 'toolbar=0,scrollbars=1,location=0," +
            "statusbar=0,menubar=0,resizable=1,width=340,height=400');"
            );
        }
        </script>
    <?php
    }

    # ###################################################################

    function footprint($auth$m$y
    {
        global 
    $lang;
        
        echo 
    "
        <span class=\"footprint\"> 
        
    \n "
    ;
        
        if ( 
    $auth == ) {
            echo 
    "
            <a href=\"useradmin.php\">" 
    $lang['adminlnk'] . "</a> |
            <a href=\"login.php?action=logout&month=
    $m&year=$y\">" 
            
    $lang['logout'] . "</a>";
        } elseif ( 
    $auth == ) {
            echo 
    "
            <a href=\"useradmin.php?flag=changepw\">" 
    $lang['changepw'] . "</a> |
            <a href=\"login.php?action=logout&month=
    $m&year=$y\">"
             
    $lang['logout'] . " </a>";
        } else {
            echo 
    "<a href=\"javascript:loginPop($m$y)\">"
            
    $lang['login'] . "</a>";
        }
        echo 
    " </span>";
    }

    # ###################################################################

    function scrollArrows($m$y)
    {
        
    // set variables for month scrolling
        
    $nextyear  = ($m != 12) ? $y $y 1;
        
    $prevyear  = ($m != 1)  ? $y $y 1;
        
    $prevmonth = ($m == 1)  ? 12 $m 1;
        
    $nextmonth = ($m == 12) ? 1  $m 1;

        return 
    "
        <a href=\"index.php?month=" 
    $prevmonth "&year=" $prevyear "\">
        <img src=\"images/leftArrow.gif\" border=\"0\"></a>
        <a href=\"index.php?month=" 
    $nextmonth "&year=" $nextyear "\">
        <img src=\"images/rightArrow.gif\" border=\"0\"></a>
        "
    ;
    }

    # ###################################################################

    function writeCalendar($month$year)
    {
        
    $str getDayNameHeader();
        
    $eventdata getEventDataArray($month$year);

        
    # get first row position of first day of month.
        
    $weekpos getFirstDayOfMonthPosition($month$year);

        
    # get user permission level
        
    $auth = (isset($_SESSION['authdata'])) 
            ? 
    $_SESSION['authdata']['userlevel'
            : 
    false;

        
    # get number of days in month
        
    $days date("t"mktime(0,0,0,$month,1,$year));

        
    # initialize day variable to zero, unless $weekpos is zero
        
    if ($weekpos == 0$day 1; else $day 0;
        
        
    # initialize today's date variables for color change
        
    $timestamp mktime() + CURR_TIME_OFFSET 3600;
        
    $d date('j'$timestamp); 
        
    $m date('n'$timestamp); 
        
    $y date('Y'$timestamp);

        
    # lookup for testing whether day is today
        
    $today["$y-$m-$d"] = 1;

        
    # loop writes empty cells until it reaches position of 1st day of 
        # month ($wPos).  It writes the days, then fills the last row with empty 
        # cells after last day
        
    while($day <= $days) {
            
    $str .="<tr>\n";
            
            
    # write row
            
    for($i=0;$i 7$i++) {
                
    # if cell is a day of month
                
    if($day && $day <= $days) {
                    
    # set css class today if cell represents current date
                    
    $class = (isset($today["$year-$month-$day"])) ? 'today' 'day';

                    
    $str .= "
                    <td class=\"
    {$class}_cell\" valign=\"top\">
                    <span class=\"day_number\">\n"
    ;
                    
                    if (
    $auth) {
                        
    $str .= "
                        <a href=\"javascript: postMessage(
    $day$month$year)\">
                        
    $day</a>";
                    } else {
                        
    $str .= "$day";
                    }    
                    
    $str .= "</span>
    "
    ;
                    
                    if (isset(
    $eventdata[$day]["title"])) {
                        
    // enforce title limit
                        
    $eventcount count($eventdata[$day]["title"]);
        
                        if (
    MAX_TITLES_DISPLAYED $eventcount) {
                            
    $eventcount MAX_TITLES_DISPLAYED;
                        }
                        
                        
    // write title link if day's postings 
                        
    for($j=0;$j $eventcount;$j++) {
                            
    $str .= "
                            <span class=\"title_txt\">
                            -<a href=\"javascript:openPosting("
                            
    $eventdata[$day]["id"][$j] . ")\">"
                            
    $eventdata[$day]["title"][$j] . "</a></span>";
                        }
                    }

                    
    $str .= "</td>\n";
                    
    $day++;
                } elseif(
    $day == 0)  {
                     
    $str .= "
                    <td class=\"empty_day_cell\" valign=\"top\"></td>\n"
    ;
                    
    $weekpos--;
                    if (
    $weekpos == 0$day++;
                 } else {
                    
    $str .= "
                    <td class=\"empty_day_cell\" valign=\"top\"></td>\n"
    ;
                }
             }
            
    $str .= "</tr>\n\n";
        }
        
    $str .= "</table>\n\n";
        return 
    $str;
    }

    # ###################################################################

    function getDayNameHeader()
    {
        global 
    $lang;

        
    // adjust day name order if weekstart not Sunday
        
    if (WEEK_START != 0) {
            for(
    $i=0$i WEEK_START$i++) {
                
    $tempday array_shift($lang['abrvdays']);
                
    array_push($lang['abrvdays'], $tempday);
            }
        }

        
    $s "<table cellpadding=\"1\" cellspacing=\"1\" border=\"0\">\n<tr>\n";

        foreach(
    $lang['abrvdays'] as $day) {
            
    $s .= "\t<td class=\"column_header\">$day</td>\n";
        }

        
    $s .= "</tr>\n\n";
        return 
    $s;
    }

    # ###################################################################

    function getEventDataArray($month$year)
    {
        
    $eventdata null;
        
    mysql_connect(DB_HOSTDB_USERDB_PASS) or die(mysql_error());
        
    mysql_select_db(DB_NAME) or die(mysql_error());
        
        
    $sql "SELECT id, d, title, start_time, end_time, ";
        
        if (
    TIME_DISPLAY_FORMAT == "12hr") {
            
    $sql .= "TIME_FORMAT(start_time, '%l:%i%p') AS stime, ";
            
    $sql .= "TIME_FORMAT(end_time, '%l:%i%p') AS etime ";
        } elseif (
    TIME_DISPLAY_FORMAT == "24hr") {
            
    $sql .= "TIME_FORMAT(start_time, '%H:%i') AS stime, ";
            
    $sql .= "TIME_FORMAT(end_time, '%H:%i') AS etime ";
        } else {
            echo 
    "Bad time display format, check your configuration file.";
        }
        
        
    $sql .= "
            FROM " 
    DB_TABLE_PREFIX "mssgs WHERE m = $month AND y = $year
            ORDER BY start_time"
    ;
        
        
    $result mysql_query($sql) or die(mysql_error());
        
        while(
    $row mysql_fetch_assoc($result)) {
            
    $day $row["d"];
            
    $eventdata[$day]["id"][] = $row["id"];

            
    # set title string; limit char length and append ellipsis if necessary
            
    $title stripslashes($row["title"]);
            
    $eventdata[$day]["title"][] = (strlen($title) > TITLE_CHAR_LIMIT)
                ? 
    substr($title0TITLE_CHAR_LIMIT) . '...'
                
    $title
            
            
    # set time string
            
    if (!($row["start_time"] == "55:55:55" 
                
    && $row["end_time"] == "55:55:55")) {
                
    $starttime 
                    
    = ($row["start_time"] == "55:55:55") ? "- -" $row["stime"];
                
    $endtime 
                    
    = ($row["end_time"] == "55:55:55") ? "- -" $row["etime"];
                
                
    $timestr "
                <div align=\"right\" class=\"time_str\">
                (
    $starttime - $endtime)</div>\n";
            } else {
                
    $timestr "
    "
    ;
            }
            
    $eventdata[$day]["timestr"][] = $timestr;
        }
        return 
    $eventdata;
    }

    # ###################################################################

    function getFirstDayOfMonthPosition($month$year)
    {
        
    $weekpos date("w"mktime(0,0,0,$month,1,$year));

        
    // adjust position if weekstart not Sunday
        
    if (WEEK_START != 0) {
            if (
    $weekpos WEEK_START) {
                
    $weekpos $weekpos WEEK_START;
            } else {
                
    $weekpos $weekpos WEEK_START;
            }
        }
        return 
    $weekpos;
    }

    # ###################################################################

    ?>
    Grazie anticipatamente!

  2. #2
    Utente di HTML.it
    Registrato dal
    Apr 2008
    Messaggi
    266
    up pls

  3. #3
    Utente di HTML.it
    Registrato dal
    Apr 2008
    Messaggi
    266
    Nessuna risposta?
    Magari ho sbagliato a esprimermi?
    Se avete bisogno di più codice ditemelo (anche se penso che le funzioni son tutte li).
    Però cortesemente datemi qualche risposta o qualche consiglio non dico di postarmi il codice bello completo.. qualche conoscenza del php c'è quindi avrei bisogno almeno di qualche dritta se non chiedo troppo.

  4. #4
    Utente di HTML.it L'avatar di bstefano79
    Registrato dal
    Feb 2004
    Messaggi
    2,520
    non si capisce cosa vuoi fare!!!! dove deve spuntare l'immagine???

  5. #5
    Utente di HTML.it L'avatar di Fractals87
    Registrato dal
    Apr 2008
    Messaggi
    1,202
    protresti darmi il link dove hai scaricato questo calendario?!?
    Che mestiere difficile.....essere da soli ancora di più

  6. #6
    Utente di HTML.it
    Registrato dal
    Apr 2008
    Messaggi
    266
    Se guardi l'immagine vedrai che per ogni giorno del mese (dove è stato inserito) c'è uno o due eventi fino ad un max di 4 eventi al giorno. nella foto ce ne sono solo due ad esempio giorno 1 aprile ce ne sono due e il 14 ce ne sta uno solo. Ora io vorrei che: al posto del titolo dell'evento mi spuntasse un'img (ad es: evento) anche se gli eventi sono due o 4.

    Lo script funziona in questo modo:
    Inserisco l'evento dall'amministrazione e dopo mi stampa il titolo dell'evento nel giorno in cui è stato messo, se clicco sull'evento mi apre una pop up con quell'evento e gli altri aventi di quel giorno.

    Spero di esseremi espresso correttamente stavolta.

    codice pop-up:

    Codice PHP:
    <?php
    require("config.php");
    require(
    "./lang/lang." LANGUAGE_CODE ".php");
    require(
    "functions.php");

    $auth    auth();
    $id     $_GET['id'];

    mysql_connect(DB_HOSTDB_USERDB_PASS) or die(mysql_error());
    mysql_select_db(DB_NAME) or die(mysql_error());

    $sql "SELECT d, m, y FROM " DB_TABLE_PREFIX "mssgs WHERE id=" $id;
    $result mysql_query($sql) or die(mysql_error());
    $row mysql_fetch_array($result);

    $d             $row["d"];
    $m             $row["m"];
    $y             $row["y"];
    $dateline     $lang['months'][$m-1] . $d$y";
    $wday         date("w"mktime(0,0,0,$m,$d,$y));

    writeHeader($m$y$dateline$wday$auth);

    // display selected posting first
    writePosting($id$auth);

    // give some space
    echo '[img]images/clear.gif[/img]<br clear="all">';

    // query for rest of this day's postings
    $sql "SELECT id, start_time FROM " DB_TABLE_PREFIX "mssgs ";
    $sql .= "WHERE y = " $y " AND m = " $m " AND d = " $d " AND id != $id ";
    $sql .= "ORDER BY start_time ASC";

    $result mysql_query($sql) or die(mysql_error());

    if (
    mysql_num_rows($result)) {
        echo 
    '<span class="display_header">' $lang['otheritems'] . '</span>';
        echo 
    '<br clear="all">[img]/images/clear.gif[/img]<br clear="all">';
        
        
    // display rest of this day's postings
        
    while ($row mysql_fetch_array($result)) {
            
    writePosting($row[0], $auth);
            echo 
    '[img]images/clear.gif[/img]<br clear="all">';
        }
    }

    echo 
    "</body></html>";


    function 
    writeHeader($m$y$dateline$wday$auth)
    {
        global 
    $lang;
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
        <title>Eventi</title>
        <link rel="stylesheet" type="text/css" href="css/popwin.css">
    <?php if ($auth) { ?>
        <script language="JavaScript">
            function deleteConfirm(eid) {
                var msg = "<?php echo $lang['deleteconfirm'?>";
                
                if (confirm(msg)) {
                    opener.location = "eventsubmit.php?flag=delete&id=" + eid + "&month=<?php echo $m ?>&year=<?php echo $y ?>";
                    window.setTimeout('window.close()', 1000);
                } else {
                    return;
                }
            }
        </script>
    <?php    ?>
    </head>
    <body>


    <table cellspadding="0" cellspacing="0" border="0" width="300">
    <tr>
        <td><span class="display_header"><?php echo $dateline ?></span></td>
        <td align="right"><span class="display_header"><?php echo $lang['days'][$wday?></span></td>
    </tr>
    </table>

    [img]images/clear.gif[/img]<br clear="all">
    <?php
    }

    function 
    writePosting($id$auth)
    {
        global 
    $lang;
        
        
    mysql_connect(DB_HOSTDB_USERDB_PASS) or die(mysql_error());
        
    mysql_select_db(DB_NAME) or die(mysql_error());
        
        
    $sql "SELECT y, m, d, title, text, start_time, end_time, ";
        
    $sql .= DB_TABLE_PREFIX "users.uid, fname, lname, ";
        
        if (
    TIME_DISPLAY_FORMAT == "12hr") {
            
    $sql .= "TIME_FORMAT(start_time, '%l:%i%p') AS stime, ";
            
    $sql .= "TIME_FORMAT(end_time, '%l:%i%p') AS etime ";
        } elseif (
    TIME_DISPLAY_FORMAT == "24hr") {
            
    $sql .= "TIME_FORMAT(start_time, '%H:%i') AS stime, ";
            
    $sql .= "TIME_FORMAT(end_time, '%H:%i') AS etime ";
        } else {
            echo 
    "Bad time display format, check your configuration file.";
        }
        
        
    $sql .= "FROM " DB_TABLE_PREFIX "mssgs ";
        
    $sql .= "LEFT JOIN " DB_TABLE_PREFIX "users ";
        
    $sql .= "ON (" DB_TABLE_PREFIX "mssgs.uid = " DB_TABLE_PREFIX "users.uid) ";
        
    $sql .= "WHERE id = " $id;
        
        
    $result mysql_query($sql) or die(mysql_error());
        
    $row mysql_fetch_assoc($result);
        
        
    $title        stripslashes($row["title"]);
        
    $body        stripslashes(str_replace("\n""
    "
    $row["text"]));
        
    $postedby     $lang['postedby'] . " " $row['fname'] . " " $row['lname'];
        
        if (!(
    $row["start_time"] == "55:55:55" && $row["end_time"] == "55:55:55")) {
            if (
    $row["start_time"] == "55:55:55")
                
    $starttime "- -";
            else
                
    $starttime $row["stime"];
                
            if (
    $row["end_time"] == "55:55:55")
                
    $endtime "- -";
            else
                
    $endtime $row["etime"];
            
            
    $timestr "$starttime - $endtime";
        } else {
            
    $timestr "";
        }
        
        if (
    $auth == || ($auth != && $_SESSION['authdata']['uid'] == $row['uid'])) {
            
    $editstr "<span class=\"display_edit\">";
            
    $editstr .= "[<a href=\"eventform.php?id=" $id "\">edit</a>]";
            
    $editstr .= "[<a href=\"#\" onClick=\"deleteConfirm(" $id ");\">delete</a>]</span>";
        } else {
            
    $editstr "";
        }
    ?>
        <table cellspacing="0" cellpadding="0" border="0" width="300">
            <tr><td bgcolor="#000000">
                <table cellspacing="1" cellpadding="1" border="0" width="100%">
                    <tr>
                        <td class="display_title_bg"><table cellspacing="0" cellpadding="0" border="0" width="100%"><tr>
                                <td width="100%"><span class="display_title"><?php echo $title ?></span></td>
                                <td>[img]images/clear.gif[/img]</td>
                                <td align="right" nowrap="yes"><span class="display_title"><?php echo $timestr ?></span></td>
                        </tr></table></td>
                    </tr>
                    <tr><td class="display_txt_bg">
                        <table cellspacing="1" cellpadding="1" border="0" width="100%">
                            <tr>
                                <td><span class="display_txt"><?php echo $body ?></span></td>
                            </tr>
                            <tr>
                                <td align="right"><span class="display_user"><?php echo $postedby ?></td>
                            </tr>
                            <tr>
                                <td align="right"><?php echo $editstr ?></td>
                            </tr>
                        </table>
                    </td></tr>
                </table>
        </td></tr></table>
    <?php
    }
    ?>

  7. #7
    Utente di HTML.it L'avatar di bstefano79
    Registrato dal
    Feb 2004
    Messaggi
    2,520
    allora la parte di codice che dovresti modificare mi sa che è questa

    Codice PHP:
    if (isset($eventdata[$day]["title"])) 

        
    // enforce title limit 
        
    $eventcount count($eventdata[$day]["title"]); 
         
        if (
    MAX_TITLES_DISPLAYED $eventcount) { 
               
    $eventcount MAX_TITLES_DISPLAYED
        } 
                         
        
    // write title link if day's postings  
        
    for($j=0;$j $eventcount;$j++) { 
            
    $str .= 
            <span class=\"title_txt\"> 
             -<a href=\"java-script:openPosting(" 
             
    $eventdata[$day]["id"][$j] . ")\">" 
             
    $eventdata[$day]["title"][$j] . "</a></span>"
        } 

    prova a sostituire con

    Codice PHP:
    if (isset($eventdata[$day]["title"])) 

          
    $str .= "
          <span class=\"title_txt\"> 
          -<a href=\"java-script:openPosting(" 
          
    $eventdata[$day]["id"][0] . ")\">" 
             
    ."<img src=\"immagine.jpg\" /></a></span>"


  8. #8
    Utente di HTML.it
    Registrato dal
    Apr 2008
    Messaggi
    266
    Ho fatto in questo modo però se ci clicco mi dice:

    Impossibile aprire questo indirizzo: il protocollo (java-script) non è associato ad alcun programma.

    Codice PHP:
    if (isset($eventdata[$day]["title"])) 

          
    $str .= "
          <span class=\"title_txt\"> 
          -<a href=\"java-script:openPosting(" 
          
    $eventdata[$day]["id"][0] . ")\">" 
             
    ."<img src=\"immagine.jpg\" border=\"0\" /></a></span>"
    }
        
    // write title link if day's postings  
        
    for($j=0;$j $eventcount;$j++) { 
            
    $str .= 
            <span class=\"title_txt\"> 
             -<a href=\"java-script:openPosting(" 
             
    $eventdata[$day]["id"][$j] . ")\">" 
             
    $eventdata[$day]["title"][$j] . "</a></span>"
        } 

  9. #9
    Utente di HTML.it L'avatar di bstefano79
    Registrato dal
    Feb 2004
    Messaggi
    2,520
    il for toglilo

  10. #10
    Utente di HTML.it
    Registrato dal
    Apr 2008
    Messaggi
    266
    ho tolto il for, ma l'errore resta sempre quello
    Impossibile aprire questo indirizzo: il protocollo (java-script) non è associato ad alcun programma.

    Forse bisogna sistemare il file js?

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.