Navigazione

    Privacy - Termini e condizioni
    © 2020 Search On Media Group S.r.l.
    • Registrati
    • Accedi
    • CATEGORIES
    • Discussioni
    • Non letti
    • Recenti
    • Hashtags
    • Popolare
    • Utenti
    • Stream
    • Interest
    • Categories
    1. Home
    2. mimo
    3. Post
    M

    mimo

    @mimo

    • Profilo
    • Chi segue 0
    • Da chi è seguito 0
    • Discussioni 1
    • Post 1
    • Migliore 0
    • Gruppi 0
    Iscrizione Ultimo Accesso
    0
    Reputazione
    3
    Post
    0
    Visite al profilo
    0
    Da chi è seguito
    0
    Chi segue
    User Newbie

    Post creati da mimo

    • calendario

      Ciao a tutti vi spiego il mio problema
      ho un database con due date
      data **dal **
      data al
      **ho intenzione di visualizare nel calendario **
      i giorni compresi tra queste due date
      ad esempio
      dal 10/01/2010
      al 15/01/2010

      vi posto il codice e vi evidenzio la parte che non va
      la tabella mi stampa dal giorno 1 gennaio al 10 gennaio
      gli altri giorni non vengono visualizzati tantomeno i giorni compresi tra le due date

      mi potete aiutare grazie

      <%
      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=""2""><a href=""" & pagina & "?g=" & datePart("d",mesePrecedente) & "&m=" & datePart("m",mesePrecedente) & "&a=" & datePart("yyyy",mesePrecedente) & """><-- Mese precedente</a> " & monthName(m) & " " & a & " <a href=""" & pagina & "?g=" & datePart("d",meseSuccessivo) & "&m=" & datePart("m",meseSuccessivo) & "&a=" & datePart("yyyy",meseSuccessivo) & """>Mese successivo --></a></td>" & vbCrLf
      response.write " </tr><table>" &vbCrLf
      for i = 1 to 31
      classe = "spento"
      if isDate(i & "/" & m & "/" & a) then
      if i = g then classe = "accesso"
      response.write "<table border=""1""> <tr>" & vbCrLf
      giornoSettimana = datePart("w",i & "/" & m & "/" & a)
      gSettimana = weekDayName(datePart("w",i & "/" & m & "/" & a))
      if giornoSettimana = 1 Then
      color = "red"
      else
      color = "gray"
      end if
      if giornoSettimana = 1 Then
      color = "red"
      else
      color = "gray"
      end if
      if not (rsAllUsers.EOF) then
      dal = rsAllUsers.Fields.Item("dal").Value
      al = rsAllUsers.Fields.Item("al").Value
      **'Estrapolo il giorno **
      inizio = Day(dal)
      fine = Day(al)

      if not (rsAllUsers.EOF) then
      if i = inizio then
      evento=i
      rsAllUsers.movenext
      else
      evento=""
      end if
      end if

      **response.write "<td width=""80"" class=""" & classe & """><span style='color:"&color&"; background:"&bgcolor&"' ;>" & i & " " & gSettimana & "</span></td><td>" & evento & "</td>" **
      evento=""

      end if
      end if
      next
      response.write "</tr></table>" & vbCrLf
      %>
      <%
      rsAllUsers.Close()
      %>

      postato in Coding
      M
      mimo