Visualizzazione dei risultati da 1 a 2 su 2

Discussione: event_calendar

  1. #1

    event_calendar

    Salve

    ho scaricato il clandario eventi da html.it
    event_calendar

    installandolo mi da questo errore

    Notice: Use of undefined constant event_ - assumed 'event_' in event_calendar.php on line 56
    Notice: Use of undefined constant event_ - assumed 'event_' in event_calendar.php on line 60

    ma sapendone mezza di php... non capisco...

    ecco il codice a partire dalla riga 56

    Codice PHP:
        if(${event_.$day} == "") {
        
    $event_display "There are no events for today.";
        }
        else {
        
    $event_display = ${event_.$day};
        } 
    ...di che tipo di errore si tratta?


    e di seguito.... tutto il codice
    Codice PHP:
    <?php
        
    /*
        Silentum Event Calendar v1.0.0
        Modified March 4, 2007
        event_calendar.php copyright 2006, 2007 "HyperSilence"
        */

        
    $date time();

        
    $day date("d"$date);
        
    $month date("m"$date);
        
    $year date("Y"$date);

        
    // These are the events displayed underneath the calendar
        // Events will be changed each day according to the list below
        // If you don't want events enabled, change the following variable to false

        
    $enable_events true;

        
    $event_01 "First day of the month events go here.";
        
    $event_02 "Second day of the month events go here.";
        
    $event_03 "Third day of the month events go here.";
        
    $event_04 "Fourth day of the month events go here.";
        
    $event_05 "Fifth day of the month events go here.";
        
    $event_06 "Sixth day of the month events go here.";
        
    $event_07 "Seventh day of the month events go here.";
        
    $event_08 "Eighth day of the month events go here.";
        
    $event_09 "Ninth day of the month events go here.";
        
    $event_10 "Tenth day of the month events go here.";
        
    $event_11 "Eleventh day of the month events go here.";
        
    $event_12 "Twelfth day of the month events go here.";
        
    $event_13 "Thirteenth day of the month events go here.";
        
    $event_14 "Fourteenth day of the month events go here.";
        
    $event_15 "Fifteenth day of the month events go here.";
        
    $event_16 "Sixteenth day of the month events go here.";
        
    $event_17 "Seventeenth day of the month events go here.";
        
    $event_18 "Eighteenth day of the month events go here.";
        
    $event_19 "Nineteenth day of the month events go here.";
        
    $event_20 "Twentieth day of the month events go here.";
        
    $event_21 "Twenty first day of the month events go here.";
        
    $event_22 "Twenty second day of the month events go here.";
        
    $event_23 "Twenty third day of the month events go here.";
        
    $event_24 "Twenty fourth day of the month events go here.";
        
    $event_25 "Twenty fifth day of the month events go here.";
        
    $event_26 "Twenty sixth day of the month events go here.";
        
    $event_27 "Twenty seventh day of the month events go here.";
        
    $event_28 "Twenty eighth day of the month events go here.";
        
    $event_29 "Twenty ninth day of the month events go here.";
        
    $event_30 "Thirtieth day of the month events go here.";
        
    $event_31 "Thirty first day of the month events go here.";

        
    //
        // Nothing is REQUIRED to be changed after this
        //

        
    if(${event_.$day} == "") {
        
    $event_display "There are no events for today.";
        }
        else {
        
    $event_display = ${event_.$day};
        }

        
    $first_day mktime(0,0,0,$month1$year);
        
    $title date("F"$first_day);
        
    $day_of_week date("D"$first_day);

        switch(
    $day_of_week) {
        case 
    "Sun"$blank 0; break;
        case 
    "Mon"$blank 1; break;
        case 
    "Tue"$blank 2; break;
        case 
    "Wed"$blank 3; break;
        case 
    "Thu"$blank 4; break;
        case 
    "Fri"$blank 5; break;
        case 
    "Sat"$blank 6; break;
        }

        
    $days_in_month cal_days_in_month(0$month$year);
    ?>
    <h2>Silentum Event Calendar v1.0.0</h2>
    <?php
        
    echo "<table border=\"3\" cellpadding=\"2\" cellspacing=\"4\" style=\"background: #aaa; color: #000; text-align: center\" width=\"140\">
        <tr>
            <td colspan=\"7\" style=\"background: #ddd; color: #00d;\">[b]
    $title$year[/b]</td>
        </tr>
        <tr>
            <td style=\"background: #eee; color: #000\" width=\"20\">[b]Sun.[/b]</td>
            <td style=\"background: #eee; color: #000\" width=\"20\">[b]Mon.[/b]</td>
            <td style=\"background: #eee; color: #000\" width=\"20\">[b]Tue.[/b]</td>
            <td style=\"background: #eee; color: #000\" width=\"20\">[b]Wed.[/b]</td>
            <td style=\"background: #eee; color: #000\" width=\"20\">[b]Thu.[/b]</td>
            <td style=\"background: #eee; color: #000\" width=\"20\">[b]Fri.[/b]</td>
            <td style=\"background: #eee; color: #000\" width=\"20\">[b]Sat.[/b]</td>
        </tr>
        <tr>
        "
    ;

        
    $day_count 1;
        
    $day_number 1;

        while(
    $blank 0) {
        echo 
    "    <td></td>
        "
    ;
        
    $blank $blank-1;
        
    $day_count++;
        }

        while(
    $day_number <= $days_in_month) {
        if(
    $day_number $day) {
        echo 
    "    <td style=\"background: #bbb; border: 2px solid #ccc; color: #000\"><del>[i]$day_number[/i]</del></td>
        "
    ;
        }
        elseif(
    $day_number == $day) {
        echo 
    "    <td style=\"background: #fff; border: 2px solid #555; color: #000\">[b]$day_number[/b]</td>
        "
    ;
        }
        else {
        echo 
    "    <td style=\"background: #ccc; border: 2px solid #ddd; color: #000\">$day_number</td>
        "
    ;
        }
        
    $day_number++;
        
    $day_count++;

        if(
    $day_count 7) {
        echo 
    "</tr>
        <tr>
        "
    ;
        
    $day_count 1;
        }
        }

        while(
    $day_count && $day_count <= 7) {
        echo 
    "    <td></td>
        "

        
    $day_count++;
        }

        echo 
    "</tr>
    </table>


    <hr />
        
    "
    ;

        if(
    $enable_events == true) {
        echo 
    "
    [b]Events for "
    .$title." ".$day.", ".$year."[/b]

    "
    ;
        echo 
    $event_display."
    "
    ;
        }
    ?>



    Powered by: [url="http://hypersilence.net"]Silentum Event Calendar v1.0.0[/url]
    </p>
        }

  2. #2
    ah... a parte l'errore avrei anche un'altra domanda....

    ... si puo' modificare in modo da visualizzare gli eventi di ogni giorno cliccandoci sopra?

    ora visualizza solo gli eventi di oggi...

    ma se voglio vedere cosa c'è domani come faccio? :master:

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.