powered by simpleCommunicator - 2.0.59     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / ASP.NET [игнор отключен] [закрыт для гостей] / Календарь
4 сообщений из 4, страница 1 из 1
Календарь
    #32655929
ktlts
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
ребят проблемка
сайт http://www.rabitadunyasi.info.az/
слева чуть ниже календарь
как видите он не работает
подключен к базе данных Accses

ни ссылки ни преход по месяцам ничерта не работает
помошите плиз рвазобратся в чем может быть дело
Sub Calendar(cmonth, cyear)
If cmonth = "" Then
cmonth = Mid(CurrDate,4,2)*1
End If
If cyear = "" Then
cyear = Mid(CurrDate,7,4)*1
End if

months = Array("Yanvar", "Fevral", "Mart", "Aprel", "May", "İyun", "İyul", "Avqust", "Sentyabr", "Oktyabr", "Noyabr", "Dekabr")

Set rst = Server.CreateObject("ADODB.Recordset")
SQL = "SELECT DISTINCT datest, nomern FROM art WHERE year(datest)="&cyear&" AND month(datest)="&cmonth
rst.Open SQL,Conn,3,1

Response.Write "<table border=0 cellpadding=2 cellspacing=0 width=100%>"&chr(13)
Response.Write "<tr bgcolor=red align=center>"&chr(13)
Response.Write "<td width=14% class=txt><font color=white>Be.</font></td><td width=14% class=txt><font color=white>Ça.</font></td><td width=14% class=txt><font color=white>Ç.</font></td><td width=14% class=txt><font color=white>Ca.</font></td><td width=14% class=txt><font color=white>C.</font></td><td bgcolor=#221786 width=14% class=txt><font color=#ffffff>Ş.</font></td><td bgcolor=#221786 width=14% class=txt><font color=#ffffff>В.</font></td>"&chr(13)
Response.Write "</tr>"&chr(13)

kalendar = Array (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
If weekday("01."&cmonth&"."&cyear) = 1 Then
d = 7
Else
d = weekday("01."&cmonth&"."&cyear) - 1
End If
If cmonth = 1 or cmonth = 3 or cmonth = 5 or cmonth = 7 or cmonth = 8 or cmonth = 10 or cmonth = 12 Then
mm = 31
Else
mm = 30
End If
If cmonth = 2 Then
If cyear / 4-int(cyear / 4) = 0 Then
mm = 29
Else
mm = 28
End If
End If
j = 0
For i = d - 1 To d + mm
j = j + 1
kalendar(i) = j
Next
i = 0
tt = 0
For k = 1 To int(((d + mm) / 7) + 1)
If tt = 1 and kalendar(i) > mm Then
Exit For
End If
Response.Write "<tr align=center>"
For j = 1 To 7
If cmonth - month(date) = 0 AND kalendar(i) - day(date) = 0 AND cyear - year(date) = 0 Then
Response.Write "<td bgcolor=red class=txt><font size=1>"
Else
If j = 6 OR j = 7 Then
Response.Write "<td class=txt><font size=1 color=#796DE7>"
Else
Response.Write "<td class=txt><font size=1>"
End If
End If
If kalendar(i) > 0 and kalendar(i) <= mm Then
If not rst.eof Then
If cmonth - month(rst("datest")) = 0 AND kalendar(i) - day(rst("datest")) = 0 AND cyear - year(rst("datest")) = 0 Then
If j = 6 OR j = 7 Then
Response.Write "<a href='index.asp?day_="&kalendar(i)&"&month_="&cmonth&"&year_="&cyear&"'><font color=#2B5374><b>"&kalendar(i)&"</a>"
Else
Response.Write "<a href='index.asp?day_="&kalendar(i)&"&month_="&cmonth&"&year_="&cyear&"'><font color=#000><b>"&kalendar(i)&"</a>"
End If
If not rst.eof Then
rst.MoveNext
End If
Else
Response.Write kalendar(i)
End If
Else
Response.Write kalendar(i)
End If
tt = 1
End If
Response.Write "</TD>"&chr(13)
i = i + 1
Next
Response.Write "</TR>"&chr(13)
j = j + 1
Next
Response.Write "<tr>"&chr(13)
Response.Write "<td colspan=7 align=center> </td>"&chr(13)
Response.Write "</tr>"&chr(13)
Response.Write "<tr>"&chr(13)
Response.Write "<td colspan=7 align=center>"&chr(13)

Response.Write "<form method=get action=index.asp>"&chr(13)
Response.Write "<select name=month_ class=txt>"&chr(13)
For i=1 to 12
ss = ""
if i-cmonth=0 then ss = " selected" end if
Response.Write "<option value="&i&" class=table "&ss&">"&months(i-1)&"</option>"&chr(13)
Next
Response.Write "</select>"&chr(13)
Response.Write "<select name=year_ class=txt>"&chr(13)
For i=2002 to 2005
ss = ""
if i-cyear=0 then ss = " selected" end if
Response.Write "<option value="&i&" class=table "&ss&">"&i&"</option>"&chr(13)
Next
Response.Write "</select><img src=null width=40 height=1><br>"&chr(13)
Response.Write "<input type=submit value=' Goster '>"&chr(13)

Response.Write "</td>"&chr(13)
Response.Write "</tr>"&chr(13)
Response.Write "</form>"&chr(13)
Response.Write "</table>"&chr(13)
rst.Close
End Sub
...
Рейтинг: 0 / 0
Календарь
    #32656089
Фотография big-duke
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
а может воспользоваться готовым календарем ?
я юзаю DHTML Calendar Widget
он поддерживает popup и flat mode, халявный и т.д.
работает нормально под asp и asp.net
...
Рейтинг: 0 / 0
Календарь
    #32656289
ktlts
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
можно
дай сылки плиз
...
Рейтинг: 0 / 0
Календарь
    #32657230
Фотография big-duke
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
...
Рейтинг: 0 / 0
4 сообщений из 4, страница 1 из 1
Форумы / ASP.NET [игнор отключен] [закрыт для гостей] / Календарь
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]