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

    gestione attività settimanali

    ciao a tutti.

    avrei bisogno di qualche suggerimento per realizzare con ASP una tabella dove vengono inserite attività diverse nei giorni della settimana a orari prestabiliti.

    Tenendo presente che i giorni della settimana sono fissi, l'amministratore dovrebbe poter inserire giorno per giorno una diversa attività sportiva per ogni fascia oraria.

    sapreste darmi qualche consiglio?

    Grazie
    Il mondo è solo percezione

  2. #2
    Hai gia' sviluppato qualcosa?

  3. #3
    al momento no, pensavo ad una interfaccia amichevole in cui l'istruttore di palestra potesse cambiare le attività giornaliere o settimanali.

    Le solite cose: database, login ecc...
    per il login non c'è problema, ma per la tabella.....

    il fatto è che ci sono troppe combinazioni: orario, giorno e attività e sono tutti campi incrociati.

    L'utente dovrebbe avere a video una tabella con i giorni e le fasce orarie e inserire solo le attività dove occorre, oppure avere i giorni e le attività e inserire solo gli orari dove occorre.

    Spero di essere stato chiaro.

    Grazie per l'aiuto.
    Il mondo è solo percezione

  4. #4
    Utente di HTML.it L'avatar di fiber81
    Registrato dal
    Oct 2002
    Messaggi
    328
    Secondo me è abbastanza semplice(sempre che abbia capito le tue esigenze), te lo risolvi con una tabella dove memorizzi data, ora, e la nota dell'attività.
    Poi trovi in giro script che generano un calendario "sinottico", modificandolo un pò potresti vedere i giorni in cui sono inserite attività ed inserirne delle nuove...
    Ci sono 10 tipi di persone al mondo, quelli che conoscono la numerazione binaria e quelli che non la conoscono!

  5. #5
    nella mia incommensurabile ignoranza, son avevo mai sentito parlare di calendario sinottico.
    Andrò subito ad informarmi.

    CMQ grazie, se ci fossero ulteriori consigli io "sono qui"
    Il mondo è solo percezione

  6. #6
    non ho trovato alcunchè...
    ho capito il discorso, ma non ho trovato nessuno script...cercherò ancora
    Il mondo è solo percezione

  7. #7
    Utente di HTML.it L'avatar di fiber81
    Registrato dal
    Oct 2002
    Messaggi
    328
    tipo il calendario di windows....
    Ci sono 10 tipi di persone al mondo, quelli che conoscono la numerazione binaria e quelli che non la conoscono!

  8. #8
    Utente di HTML.it L'avatar di fiber81
    Registrato dal
    Oct 2002
    Messaggi
    328
    Prova questo, l'avevo trovato in giro e modificato per renderlo un pò più carino:
    codice:
    <%
    Response.Expires = -1
    Response.ExpiresAbsolute = Now() - 2
    Response.AddHeader "pragma","no-cache"
    Response.AddHeader "cache-control","private"
    Response.CacheControl = "No-Store"
    
    Dim MyMonth 'Month of calendar
    Dim MyYear 'Year of calendar
    Dim FirstDay 'First day of the month. 1 = Monday
    Dim CurrentDay 'Used to print dates in calendar
    Dim Col 'Calendar column
    Dim Row 'Calendar row
    
    MyMonth = Request.Querystring("Month")
    MyYear = Request.Querystring("Year")
    
    If IsEmpty(MyMonth) then MyMonth = Month(Date)
    if IsEmpty(MyYear) then MyYear = Year(Date)
    
    Call ShowHeader (MyMonth, MyYear)
    
    FirstDay = WeekDay(DateSerial(MyYear, MyMonth, 1)) -1
    CurrentDay = 1
    
    'Let's build the calendar
    For Row = 0 to 5
    Response.write "<tr class=""giorni"">" & Chr(13)
    For Col = 0 to 6
    If Row = 0 and Col < FirstDay then
    response.write "<td></td>" & Chr(13)
    elseif CurrentDay > LastDay(MyMonth, MyYear) then
    response.write "<td></td>" & Chr(13)
    else
    response.write "<td"
    
    if CInt(MyMonth) = CInt(Month(Date)) and CInt(CurrentDay) = CInt(Day(Date)) then 
    response.write " bgcolor=""#0066FF"" align=""center"">"
    else 
    response.write " align=""center"">"
    end if
    
    If col = 0 OR SpecialDay(CurrentDay & "/" & MyMonth) Then 
    	Response.write "<font color=""#FF0000"">"& CurrentDay & "</font></td>" & Chr(13)
    Elseif CInt(MyMonth) = CInt(Month(Date)) and CInt(CurrentDay) = CInt(Day(Date)) then 
    	Response.write "<font color=""#FFFFFF"">" & CurrentDay & "</font></td>" & Chr(13)
    Else
    	Response.write CurrentDay & "</td>" & Chr(13)
    	
    End If
    
    CurrentDay = CurrentDay + 1
    End If
    
    Next
    response.write "</tr>" & Chr(13)
    If CurrentDay - 1 = LastDay(MyMonth, MyYear) Then Exit For
    Next
    
    response.write "</table></body></html>"
    
    
    '------ Sub and functions
    
    
    Sub ShowHeader(MyMonth,MyYear)
    %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
    <!--
    .giorni {
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 8pt;
    	color: #000000;
    	text-align: center;
    }
    .giorni_sett {
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 8pt;
    	color: #FFFFFF;
    	text-align: center;
    }
    -->
    </style>
    <title>Calendario</title></head>
    
    <body bgcolor="#FFFFFF">
    
    <table border="1" cellspacing="0" cellpadding="3" width="200" align="center" bordercolor="#0066FF">
    <tr align="center"> 
    <td colspan="7">
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td align="left">
    <font face="Arial, Helvetica, sans-serif" size="1">
    
    <%
    response.write "<a href = ""calendario.asp?"
    if MyMonth - 1 = 0 then 
    response.write "month=12&year=" & MyYear -1
    else 
    response.write "month=" & MyMonth - 1 & "&year=" & MyYear
    end if
    response.write """><font size=""-1""><</font></a>"
    %>
    
    </font>
    
    </td><td align="center">
    <font face="Arial, Helvetica, sans-serif" size="1">
    <%
    response.write "" & MonthName(MyMonth) & " " & MyYear & ""
    %>
    
    </font>
    
    </td><td align="right">
    <font face="Arial, Helvetica, sans-serif" size="1">
    <%
    response.write "<a href = ""calendario.asp?"
    if MyMonth + 1 = 13 then 
    response.write "month=1&year=" & MyYear + 1
    else 
    response.write "month=" & MyMonth + 1 & "&year=" & MyYear
    end if
    response.write """><font size=""-1"">></font></a>"
    %>
    
    </font>
    
    </td></tr></table>
    </td>
    </tr>
    <tr align="center" class="giorni_sett"> 
    	<td bgcolor="#0066FF">Dom</td>
    	<td bgcolor="#0066FF">Lun</td>
    	<td bgcolor="#0066FF">Mar</td>
    	<td bgcolor="#0066FF">Mer</td>
    	<td bgcolor="#0066FF">Gio</td>
    	<td bgcolor="#0066FF">Ven</td>
    	<td bgcolor="#0066FF">Sab</td>
    </tr>
    
    <%
    End Sub 'ShowHeader
    
    Function MonthName(MyMonth)
    	Select Case MyMonth
    		Case 1
    			MonthName = "Gennaio"
    		Case 2
    			MonthName = "Febbraio"
    		Case 3
    			MonthName = "Marzo"
    		Case 4
    			MonthName = "Aprile"
    		Case 5
    			MonthName = "Maggio"
    		Case 6
    			MonthName = "Giugno"
    		Case 7
    			MonthName = "Luglio"
    		Case 8
    			MonthName = "Agosto"
    		Case 9
    			MonthName = "Settembre"
    		Case 10
    			MonthName = "Ottobre"
    		Case 11
    			MonthName = "Novembre"
    		Case 12
    			MonthName = "Dicembre"
    		Case Else
    			MonthName = "ERROR!"
    	End Select
    End Function
    
    Function LastDay(MyMonth, MyYear)
    	Select Case MyMonth
    		Case 1, 3, 5, 7, 8, 10, 12
    			LastDay = 31
    	
    		Case 4, 6, 9, 11
    			LastDay = 30
    	
    		Case 2
    			If IsDate(MyYear & "-" & MyMonth & "-" & "29") Then LastDay = 29 Else LastDay = 28
    	
    		Case Else
    			LastDay = 0
    	
    	End Select
    End Function
    
    Function SpecialDay(MyDate)
    	fest = Array("1/1","6/1","15/8","1/11","8/12","25/12")
    	SpecialDay = False
    	For i = 0 To Ubound(fest)
    		If fest(i) = MyDate Then
    			SpecialDay = True
    			Exit Function
    		End If
    	Next
    End Function
    %>
    Ci sono 10 tipi di persone al mondo, quelli che conoscono la numerazione binaria e quelli che non la conoscono!

  9. #9
    ho provato....interessante, anche se faccio un po fatica a comprendere dove sia la parte interattiva.

    guarda qui:

    http://www.bodyline2000.com/orari.html

    questo dovrebbe essere il risultato finale.

    L'amministratore dovrebbe poter inserire solo gli orari dove occorre...

    grazie per l'aiuto
    Il mondo è solo percezione

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.