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

    calendario per gestione booking online

    salve sto cercando di creare un piccolo booking online per gestire le prenotazioni di un b&b
    vorrei poter creare un calendario (planner) come quello nell'imagine dove vengono visualizzati i giorni in rosso in cui la camera è occupata e in verde in cui la camera è libera!
    ho già un calendario però come faccio a collegarlo al db?

    il calendario è il seguente:
    codice:
    session.LCID = 1040
    pagina = request.serverVariables("PATH_INFO")
    g = request.queryString("g")
    m = request.queryString("m")
    a = request.queryString("a")
    
    if len(g) > 0 and isNumeric(g) then
    g = cLng(g)
    else
    g = datePart("d",date())
    end if
    
    if len(m) > 0 and isNumeric(m) then
    m = cLng(m)
    else
    m = datePart("m",date())
    end if
    
    if len(a) > 0 and isNumeric(a) then
    a = cLng(a)
    else
    a = datePart("yyyy",date())
    end if
    
    dataCorrente = g & "/" & m & "/" & a
    mesePrecedente = dateAdd("m",-1,dataCorrente)
    meseSuccessivo = dateAdd("m",1,dataCorrente)
    
    response.write "<table width=""600"" border=""1"">" &vbCrLf
    response.write " <tr>" & vbCrLf
    response.write " <td colspan=""31""><-- Mese precedente " & monthName(m) & " " & a & " Mese successivo --></td>" & vbCrLf
    response.write " </tr>" &vbCrLf
    response.write " <tr>" & vbCrLf
    for i = 1 to 31
    classe = "spento"
    if isDate(i & "/" & m & "/" & a) then
    if i = g then classe = "accesso"
    
    
    giornoSettimana = datePart("w",i & "/" & m & "/" & a)
    gSettimana = weekDayName(datePart("w",i & "/" & m & "/" & a))
    
    if giornoSettimana = 1 Then
    color = "red"
    else
    color = "gray"
    end if
    
    response.write " <td width=""150"" class=""" & classe & """><span style='color:"&color&"';>" & i & "</span></td>" & vbCrLf
    
    end if
    next
    response.write " </tr>" & vbCrLf
    response.write "</table>" & vbCrLf
    Grazie
    Immagini allegate Immagini allegate

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.