Znalazłem w internecie taki oto skrypt kalendarza:
Cytat
<?php
function dzien_tyg_nr($mies,$rok)
{
@$dzien = date("N", mktime(0,0,0,$mies,1,$rok));
return $dzien;
}
function dni_mies($mies,$rok)
{
$dni = 31;
while (!checkdate($mies, $dni, $rok))
$dni--;
return $dni;
}
//zmienne kalendarza
@$m=date("m"); @$y=date("y"); @$aktualna=date("d-m-Y"); if($_GET['m']=='') {$miesiac=$m;} else {$miesiac=$_GET['m'];} if($_GET['y']=='') {$rok=$y;} else {$rok=$_GET['y'];}
$nr_kratki=1;
echo '<table border="1"><tr><td><b>Pn</b></td><td><b>Wt</b></td><td><b>Sr</b></td><td><b>Czw</b></td><td><b>Pt </b></td><td><b>So </b></td><td><b>N</b></td></tr>';
echo '<tr>';
for($i=1;$i<dzien_tyg_nr($miesiac,$rok);$i++) //ile pustych pol
{echo '<td> </td>'; $nr_kratki++;}
for($i=1;$i<dni_mies($miesiac,$rok) +1;$i++) //ile pelnych pol
{echo '<td>'.$i.'</td>'; $nr_kratki++; if($nr_kratki%8=='0') {echo '</tr><tr>'; $nr_kratki='1';}}
for($i=$nr_kratki;$i<8;$i++) //ile pustych pol
{echo '<td> </td>';}
echo '</tr></table><br/>';
echo $aktualna;
?>
1. W tym skrypcie wyświetlają mi się błędy takie jak:
Cytat
Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '2.0/DST' instead in C:\serwer\www\kalendarz2.php on line 23
Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '2.0/DST' instead in C:\serwer\www\kalendarz2.php on line 23
Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '2.0/DST' instead in C:\serwer\www\kalendarz2.php on line 23
Notice: Undefined index: m in C:\serwer\www\kalendarz2.php on line 23
Notice: Undefined index: y in C:\serwer\www\kalendarz2.php on line 23
Po zastosowaniu znaku @ część z nich się nie wyświetla, a 2 ostatnie się wyświetlają.
2. Czy można ten kalendarz ubrać w tą oto grafikę?:
[img=http://img26.imageshack.us/img26/2825/kalendarzb.th.jpg]3. Jak zrobić przegląd kalendarza na kolejne miesiące np. mamy maj a chce zobaczyć jakie ważne wydarzenie będzie w czerwcu lub w lipcu?
4. Jak zrobić wydarzenia na każdy dzień(na jeden dzień będzie przypadało jedno wydarzenie, nie więcej).
5. Pomożecie podłączyć jego do bazy MySQL?
Nie podajcie mi kodu - chce sam spróbować to zrobić. Dajcie mi jedynie tylko wskazówki.
Edit: To jak pomożecie?