Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Tem um calendáriozinho em ASp aqui que funciona em Windows 2000 português belezinha, mas kuando passei para o WIndows 2003 Server Inglês deu pau. Ele roda de boa, mas ñ monta os kuadros com os dias, só deixa realçado o mês ...
O código é o seguinte:
####### início do código ##########
<%Server.ScriptTimeOut = 3%>
<%Dim giorno,mese,anno,tmese,day1,primog
giorno = request("giorno")
If giorno = "" then
giorno = day(now())
End If
mese = request("mese")
If mese = "" then
mese = month(now())
End If
anno = request("anno")
If anno = "" then
anno = year(now())
End If
If mese = 12 then
mese2 = 1
anno2 = anno+1
else
mese2 = mese+1
anno2 = anno
End If
day1 = Cdate("1"+"/"+Cstr(mese)+"/"+Cstr(anno))
dayoff = Cdate("1"+"/"+Cstr(mese2)+"/"+Cstr(anno2))-1
primog = Weekday(Cdate("1"+"/"+Cstr(mese)+"/"+Cstr(anno)))-1
ultimog = Weekday(dayoff)-1
If ultimog = 0 then
ultimog = 7
End If
If primog = 0 then
primog = 7
End If
Select Case mese
case 1
tmese = "Jan"
case 2
tmese = "Fev"
case 3
tmese = "Mar"
case 4
tmese = "Abr"
case 5
tmese = "Mai"
case 6
tmese = "Jun"
case 7
tmese = "Jul"
case 8
tmese = "Ago"
case 9
tmese = "Set"
case 10
tmese = "Out"
case 11
tmese = "Nov"
case 12
tmese = "Dez"
End Select
x=1
%>
<style type="text/css"><!--//by Studio VII Sparber001
a:link {color: #000000}
a:active {color: #000000}
a:visited {color: #000000}
a:hover {color: #FF0000}
body {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #333333}
td {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #333333}
li {color: #339966; list-style-type: square}
ul {color: #339966; list-style-type: square}
ol {color: #339966}
.mytext {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #000000}
a.mytext:link {color: #000000; text-decoration: none}
a.mytext:visited {color: #000000; text-decoration: none}
a.mytext:active {color: #000000; text-decoration: none}
a.mytext:hover {color: #FF0000; text-decoration: none}
-->
</style>
<title>Calendário</title>
<script language="JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a*.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a**;}}*
}
*function MM_callJS(jsStr) { //v2.0*
* return eval(jsStr)*
}
//-->
*</script>*
*<body bgcolor="#FFFFFF" link="#000000" vlink="#000000" alink="#000000">*
*<table width="190" border="0" cellspacing="1" cellpadding="1">*
* <tr bgcolor="#CCCCCC"> *
* <td><a href="cal.asp?mese=<%if mese > 1 then response.write mese-1 else response.write 12 End If%>&anno=<%if mese > 1 then response.write anno else response.write anno-1 End If%>"><img src="imgs/prev.gif" width="10" height="18" border="0"></a></td>*
* <td width="50%" bordercolor="#666666"> *
* <div align="center"> <b><font color="#FFFFFF"><%=tmese%>*
* </font></b></div>*
* </td>*
* <td width="50%" bordercolor="#666666"> *
* <div align="center"><b><font color="#FFFFFF"><%=anno%></font></b></div>*
* </td>*
* <td><a href="cal.asp?mese=<%if mese < 12 then response.write mese+1 else response.write 1 End If%>&anno=<%if mese < 12 then response.write anno else response.write anno+1 End If%>"><img src="imgs/next.gif" width="10" height="18" border="0"></a></td>*
* </tr>*
* <tr> *
* <td colspan="4"> *
* <table width="100%" border="1" cellspacing="0" cellpadding="1" bordercolor="#CCCCCC">*
* <tr bgcolor="#FFFFFF"> *
* <td> *
* <div align="center"><font color="#000000">S</font></div></td>*
* <td> *
* <div align="center"><font color="#000000">T</font></div></td>*
* <td> *
* <div align="center"><font color="#000000">Q</font></div></td>*
* <td> *
* <div align="center"><font color="#000000">Q</font></div></td>*
* <td> *
* <div align="center"><font color="#000000">S</font></div></td>*
* <td> *
* <div align="center"><font color="#000000">S</font></div></td>*
* <td> *
* <div align="center"><font color="#000000">D</font></div></td>*
* </tr>*
* <tr> *
<%
giorno1 = (day1-primog+x)
Do While giorno1 <= (dayoff+7-ultimog)%>
<td <%If day(day1-primog+x)=day(now()) and month(day1-primog+x)=month(now()) then response.write "bgcolor=""#FFCC33""" End If%>><div align="center"><font color ="<%if giorno1 >= day1 and giorno1 <= dayoff then
response.write "#000000"
Else
response.write "#CCCCCC"
End If%>">
<%if giorno1 >= day1 and giorno1 <= dayoff then%>
<%=day(day1-primog+x)%>
<%else%>
<%=day(day1-primog+x)%>
<%End If%>
</font></div></td>
<%If weekday(day1 - primog + x - 1) = 7 Then
response.write "</tr>"
End If%>
<%
giorno1 = giorno1 + 1
x=x+1
loop%>
* </table>*
* </td>*
* </tr>*
*</table>*
*<table width="190" height="44" border="0" cellpadding="0" cellspacing="0">*
* <tr> *
* <td width="1" height="44"> *
* <div align="right"></div>*
* </td>*
* <td width="189"> *
* <div align="center">*
* <p class="mytext"><a href="cal.asp?mese=<%=month(now())%>&anno=<%=year(now())%>" target="_self"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><br><strong>Mês *
* Atual</strong></font></a><br>*
* </p>*
* </div>*
* </td>*
* </tr>*
*</table>*
*<table width="190" border="0" cellspacing="0" cellpadding="0">*
* <tr>*
* <td valign="bottom"> *
* <form name="form1" method="post" action="cal.asp" target = "_self">*
* <table width="170" border="0" cellspacing="0" cellpadding="0">*
* <tr>*
* <td> *
* <div align="center">*
* <select name="mese" size="1">*
* <option value="1">Jan</option>*
* <option value="2">Fev</option>*
* <option value="3">Mar</option>*
* <option value="4">Abr</option>*
* <option value="5">Mai</option>*
* <option value="6">Jun</option>*
* <option value="7">Jul</option>*
* <option value="8">Ago</option>*
* <option value="9">Set</option>*
* <option value="10">Out</option>*
* <option value="11">Nov</option>*
* <option value="12" selected>Dez</option>*
* </select>*
* </div>*
* </td>*
* <td> *
* <div align="center">*
* <select name="anno" size="1">*
* <option selected><%=year(now())%></option>*
<%y = 1
do while y <= 6%>
<option><%=year(now())+y%></option>
<%y = y + 1
loop%>
* </select>*
* </div>*
* </td>*
* <td>*
* <div align="center">*
* <input name="imageField" type="image" src="/imgs/seta.jpg" width="11" height="16" border="0">*
* </div>*
* </td>*
* </tr>*
* </table>*
* <div align="right"><strong onClick="MM_callJS('window.close()')"></strong></div>*
* </form>*
* </td>*
* </tr>*
*</table>*
####### fim do código ##########
ALGUÉM ME DE UMA AJUDA PLEASE !!!!!!
http://forum.imasters.com.br/public/style_emoticons/default/cry.gif
Carregando comentários...