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

    Modificare il calendario

    Ragazzi il calendario che feci, e che funziona tutto devo fare delle modifiche, praticamente qando il giorno è completo con tutte e tre prenotazione , diventa rosso e non linkabile, mentre tutti gli altri giorni , che non sono stati prenotati o cmq non completamente , in tutte le loro fasce orarie, dovrebbero apparire link, appena inserisco il link nel codice, il calendario non funziona più. Mette tutti i link linkabili.

    codice è sempre questo


    Codice PHP:
    wqwq
    <link href="style.css" rel="stylesheet" type="text/css" />
       <script language="javascript">
           function popup(theURL) {
                 window.open(theURL,"Finestra","scrollbars=no,top=200,left=200,width=400,height=450");
           }
           </script>
           
    <?php
    function ShowCalendar($m,$y)
    {
      if ((!isset(
    $_GET['d']))||($_GET['d'] == ""))
      {
        
    $m $m;
        
    $y $y;
      }else{
        
    $m = (int)@strftime"%m" ,(int)$_GET['d']);
        
    $y = (int)@strftime"%Y" ,(int)$_GET['d']);
        
    $m $m;
        
    $y $y;
      }

      
    $precedente = @mktime(000$m -11$y);
      
    $successivo = @mktime(000$m +11$y);

      
    $nomi_mesi = array("",
        
    "Gen",
        
    "Feb",
        
    "Mar",
        
    "Apr",
        
    "Mag",
        
    "Giu",
        
    "Lug",
        
    "Ago",
        
    "Set",
        
    "Ott",
        
    "Nov",
        
    "Dic"
      
    );

      
    $nomi_giorni = array(
        
    "Lun",
        
    "Mar",
        
    "Mer",
        
    "Gio",
        
    "Ven",
        
    "Sab",
        
    "Dom"
      
    );

      
    $cols 7;
      
    $days = @date("t",@mktime(000$m1$y)); 
      
    $lunedi= @date("w",@mktime(000$m1$y));
      if(
    $lunedi==0$lunedi 7;

      echo 
    "<table>\n"
      echo 
    "<tr>\n
      <td class='testo' colspan=\""
    .$cols."\">
      <a href=\"?d=" 
    $precedente "\">&lt;&lt;</a>
      " 
    $nomi_mesi[$m] . " " $y 
      <a href=\"?d=" 
    $successivo "\">&gt;&gt;</a></td></tr>";
      foreach(
    $nomi_giorni as $v)
      {
        echo 
    "<td class='testo'>[b]".$v."[/b]</td>\n";
      }
      echo 
    "</tr>";

      for(
    $j 1$j<$days+$lunedi$j++)
      {
        if(
    $j%$cols+1==0)
        {
          echo 
    "<tr>\n";
        }

        if(
    $j<$lunedi)
        {
          echo 
    "<td> </td>\n";
        }else{
          
    $day$j-($lunedi-1);
          
    $data = @strtotime(@date($y."-".$m."-".$day));
          
          
    $oggi = @strtotime(@date("Y-m-d"));
          @include 
    'config.php';
          
    $sql "SELECT str_data, prima, seconda , terza FROM ortobotanico";
          
    $result = @mysql_query($sql) or die (mysql_error());
          if(@
    mysql_num_rows($result) > 0)
          
          {
            while(
    $fetch = @mysql_fetch_array($result))
            {
              
    $str_data $fetch['str_data'];
              
    $prima $fetch['prima'];
              
    $seconda $fetch['seconda'];
              
    $terza $fetch['terza'];
            if (
    $str_data == $data && $prima == 'Completo' && $seconda =='Completo' && $terza == 'Completo' )
            
              
              {
              
                
    $day "<font class='numeri'>$day</font>";
                 
              } 
              
            }
          }

          if(
    $data != $oggi)
          {
            echo 
    "<td><font class='testo'>".$day."</font></td>";
          }else{
            echo 
    "<td><font class='testo'>[b]".$day."[/b]</font></td>";
          }
        }

        if(
    $j%$cols==0)
        {
          echo 
    "</tr>";
        }
      }
      echo 
    "<tr></tr>";
      echo 
    "</table>";
    }

    @
    mysql_close();
    @
    ShowCalendar(@date("n"),@date("Y"));
     
    ?>
    vi rigrazio per le risposte

  2. #2
    Nessuno saprebbe dirmi come poterlo modificare?

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.