<% ' Display a custom block ' IN : iBlockNumber (int) : superior to 0 (exemple 1, 2 ...) ' OUT : - Sub DisplayCustomBlock(iBlockNumber) ' Exemple for one block ' Add also a translation for the title of the block, for pattern.asp pages (as LANG_BLOCK_1 ...) If iBlockNumber > 0 Then Select Case iBlockNumber Case 1 : CreateTopTable "BlockTableName", "Block Title " & iBlockNumber Response.Write "Block content " & iBlockNumber CreateBottomTable "" Case 2 : CreateTopTable "BlockIFSearch", "Cerca sul web" IFEngineForms CreateBottomTable "" Case 3 : If bDisplayCalendario Then
'Se si vuole il calendario in cornice, togliere il commento alle righe CreateTopTable e CreateBottomTable
'CreateTopTable "Calendario", "Calendario" Dim Giorno, Mese, Anno, MeseNow, mesed, mesedopo, meseprima, DataInizio, CounterDay, Week, DayX Dim DayAttuale, sUrl, dt, i, dtInizio, s
if mese="" then Mese=MeseNow if mese="0" then Mese=MeseNow dtInizio=DateSerial(Year(dt), CInt(mese), 1) select case mese case 1 : mesed="Gennaio" case 2 : mesed="Febbraio" case 3 : mesed="Marzo" case 4 : mesed="Aprile" case 5 : mesed="Maggio" case 6 : mesed="Giugno" case 7 : mesed="Luglio" case 8 : mesed="Agosto" case 9 : mesed="Settembre" case 10: mesed="Ottobre" case 11: mesed="Novembre" case 12: mesed="Dicembre" case else end select
DataInizio= "01/" & Mese & "/" & Anno Mese = DatePart("M",DataInizio) i=0 dt=dtInizio CounterDay = 1 for Week=0 to 5 Response.Write "<tr>" & vbCRLF for DayX = 1 to 7 DayAttuale=Datepart("w",DataInizio,2) if DayAttuale = DayX then dt=DateAdd("d", dtInizio, i) i=i+1 if Mese=Month(DataInizio) then s="<td width=""20"" height=""10"" valign='middle' align='center' title="""& dt &""" " if CInt(CounterDay) = CInt(Giorno) and Mese = MeseNow then s=s& "class=myCalendardaystoday" else s=s& "class=myCalendardays" end if if CInt(CounterDay)<=9 then CounterDay="0"&CounterDay s=s&"><a href="""&GLOBAL_SITE_URL&GLOBAL_SITE_PATH&"eventi.asp?date=" &CDate( CounterDay & "/" & mese & "/" & Anno )&"""><font class=myCalendarDaynow>" if getEventiCount(dt)>0 then s=s& "<font class=myCalendardaysev>" & CounterDay & "</font>" else s=s& CounterDay end if s=s& "</a></font>" & vbCRLF Response.Write s Response.Write "</td>" & vbCRLF DataInizio=dateadd("d",1,DataInizio) CounterDay=CInt(CounterDay)+1 else Week=5 end if else Response.Write "<td valign='middle' align='center' width=""20"" height=""10"" bgcolor=""#DBDBDB""><font size='2' color=""#DBDBDB"">00</font></td>" & vbCRLF end if next Response.Write "</tr>" & vbCRLF next Response.Write "</table><br>" & vbCRLF 'CreateBottomTable "" Case 4 : CreateTopTable "prova", "menuprova" Response.Write sBullet & "<a href=""" & GLOBAL_SITE_PATH & """>prova</a><br>" & vbCRLF CreateBottomTable "" End If End Select End If End Sub %>
questo è il mio file block-inc mi da questo errore Microsoft VB_Script compilation error '800a0400'
Expected statement
/includes/blocks-inc.asp, line 131
Case 4 : ^ se qualcuno mi puoi aiutare che nn riesco proprio a capire dovè il problema :°° GRAZIE :*
25 settembre 2003 alle 14:48:18 Nel Case4, hai inserito una stringa del menù, a parte questo, hai inserito il Case 4 prima del END IF del blocco calendario:
Response.Write "</table><br>" & vbCRLF 'CreateBottomTable "" Case 4 : CreateTopTable "prova", "menuprova" Response.Write sBullet & "<a href=""" & GLOBAL_SITE_PATH & """>prova</a><br>" & vbCRLF CreateBottomTable "" End If End Select End If End Sub %>
ed inoltre, hai remmato con l'apostrofo il CreateBottomTable sempre dello stesso blocco. Riscrivi le righe blocco correttamente. Ciauzz Dj
--------------- A lavare la testa ai somari, ci si rimette l'acqua e il sapone!
25 settembre 2003 alle 15:32:06 si l'avevo remmato per disabilitarle mi sono scordate di levarle per farle vedere :P cmq ora provo come hai detto tu grazie :***
Log in
Cerca
Sostieni AspNuke
Un piccolo gesto per aiutarci a mantenere AspNuke.it online
Promo
MusicWebItalia.it Video Testi Traduzioni Spot Colonne sonore Accordi e Spartiti gratis.
Visitatori
Visitatori Correnti : 213 Membri : 0
Anna
Iscritti
Utenti: 18940
Ultimo iscritto : glauco Lista iscritti Messaggi privati: 3373Commenti: 2210Immagini: 39Downloads: 144Articoli: 49Pagine: 101Siti web: 558Notizie: 180Sondaggi: 11Preferiti: 5685537Post sui forum: 51195Libro degli ospiti: 4Eventi: 7