non :s
<table bgcolor="<? echo $tblbgcolor ?>" border="0" cellpadding="0" cellspacing="1" width="120">
<tr>
<td colspan="7">
</td>
</tr>
<tr>
<td class="mthheading" width="<? echo $tablewidth ?>%">
<? $monthchange = $monthno-1; $yearchange=$year;
if ($monthchange==0){ $monthchange=12; $yearchange=$year-1;} else { $yearchange=$year; }
?>
<a class="std" href="<? echo $_SERVER['PHP_SELF']."?monthno=".$monthchange."&year=".$yearchange ?>">
<img src="images/leftarrow.gif" border="0" alt="<? echo date('M', mktime(0, 0, 0, $monthchange, 1, $yearchange))." ".$yearchange ?>" />
</a></td>
<td class="mthheading" colspan="5" width="<? echo $tablewidth*5 ?>%"><? echo $lang["$monthfulltext"] ?></td>
<td class="mthheading" width="<? echo $tablewidth ?>%">
<? $monthchange = $monthno+1;
if ($monthchange==13){ $monthchange=1; $yearchange=$year+1;} else { $yearchange=$year; }
?>
<a class="std" href="<? echo $_SERVER['PHP_SELF']."?monthno=".$monthchange."&year=".$yearchange ?>">
<img src="images/rightarrow.gif" border="0" alt="<? echo date('M', mktime(0, 0, 0, $monthchange, 1, $yearchange))." ".$yearchange ?>" /></a>
</td>
</tr>
<tr>
<? if ($sundayfirst) { ?>
<td class="tdsunday"><? echo $lang['Sun'] ; ?></td>
<td class="tdday"><? echo $lang['Mon'] ; ?></td>
<td class="tdday"><? echo $lang['Tue'] ; ?></td>
<td class="tdday"><? echo $lang['Wed'] ; ?></td>
<td class="tdday"><? echo $lang['Thu'] ; ?></td>
<td class="tdday"><? echo $lang['Fri'] ; ?></td>
<td class="tdday"><? echo $lang['Sat'] ; ?></td>
<? } else { ?>
<td class="tdday"><? echo $lang['Mon'] ; ?></td>
<td class="tdday"><? echo $lang['Tue'] ; ?></td>
<td class="tdday"><? echo $lang['Wed'] ; ?></td>
<td class="tdday"><? echo $lang['Thu'] ; ?></td>
<td class="tdday"><? echo $lang['Fri'] ; ?></td>
<td class="tdday"><? echo $lang['Sat'] ; ?></td>
<td class="tdsunday"><? echo $lang['Sun'] ; ?></td>
<? } ?>
</tr>
<tr>
<?
$day_of_wk = date("w", mktime(0, 0, 0, $monthno, 1, $year));
if ($sundayfirst) {
if ($day_of_wk <> 0){
for ($i=0; $i<$day_of_wk; $i++)
{ ?>
<td class="tddate"> </td>
<?
}
}
}
else {
if ($day_of_wk == 0) { $day_of_wk = 7 ; }
if ($day_of_wk != 1){
for ($i=1; $i<$day_of_wk; $i++)
{ ?>
<td class="tddate"> </td>
<?
}
}
}
for ($date_of_mth = 1; $date_of_mth <= $day_in_mth; $date_of_mth++) {
$date_no = date("j", mktime(0, 0, 0, $monthno, $date_of_mth, $year));
$day_of_wk = date("w", mktime(0, 0, 0, $monthno, $date_of_mth, $year));
if (!$sundayfirst) { if ($day_of_wk == 0) $day_of_wk = 7 ; }
$currentdate = date("Y-m-j", mktime(0, 0, 0, $monthno, $date_of_mth, $year) );
$sql = "SELECT * FROM event WHERE date = '$currentdate'" ;
$results = mysql_query($sql) or die("Cannot query the database.<br>" . mysql_error());
$event = mysql_num_rows($results);
// change Dateformat
if ( $dateformat == 1 ){
$currentdate = date("Y-m-j", mktime(0, 0, 0, $monthno, $date_of_mth, $year) ); }
else { $currentdate = date("j-m-Y", mktime(0, 0, 0, $monthno, $date_of_mth, $year) ); }
////////////////////
if ( $date_no == gmtdate('j', time(), $timezone ) && $monthno == gmtdate('n', time(), $timezone ) ){
if ($event > 0 ) {
$alt = "<span class=\"soustitre\">".$lang['Events']."</span> : <br />";
while ($row = mysql_fetch_array($results)) {
$edate = $row["date"];
$alt.="<ul><span class=texte> <b>: : </b>".$row['event_desc']."</span></ul><br>";
}
$alt = strip_tags($alt, "<b><p><br><u><i><img>" );
if ($mode==1)
{ //viewevent.php?eventdate=
//$linkdate ="<a class=\"std\" href=\"".$_SERVER['PHP_SELF']."?view=1&eventdate=".$currentdate."\" title=\"$alt\">".$date_no."</a>";
$linkdate ="<a onmouseover=\"this.T_WIDTH=210;this.T_SHADOWWIDTH=2;this.T_BGCOLOR='#ffffff'; return escape('".$alt."')\"
href=\"http://www.lateuf.be/date-".$edate.".html\" >".$date_no."</a>";
}
elseif($mode==3)
{
//$linkdate ="<a class=\"std\" href=\"viewevent.php?eventdate=".$currentdate."\" title=\"$alt\" target=\"_new\">".$date_no."</a>";
$linkdate ="<a onmouseover=\"this.T_WIDTH=210;this.T_SHADOWWIDTH=2;this.T_BGCOLOR='#ffffff'; return escape('".$alt."')\"
href=\"http://www.lateuf.be/date-".$edate.".html\">".$date_no."</a>";
}
elseif($mode==2)
{
//$linkdate ="<a class=\"std\" href=\"viewevent.php?eventdate=".$currentdate."\" title=\"$alt\" target=\"_new\">".$date_no."</a>";
$linkdate ="<a onmouseover=\"this.T_WIDTH=210;this.T_SHADOWWIDTH=2;this.T_BGCOLOR='#ffffff'; return escape('".$alt."')\"
href=\"http://www.lateuf.be/date-".$edate.".html\">".$date_no."</a>";
}
}
else { $linkdate = $date_no ; }
?>
<td class="tdtoday"><? echo $linkdate ?></td>
<? }
else{
if ($event > 0 ){
$alt = "".$lang['Events']." : <br />";
while ($row = mysql_fetch_array($results)) {
$edate = $row["date"];
//$alt.=" ".$row['event_desc']."\r\n";
$alt.="<ul><img src=images/pointfonce2.gif width=22 height=13 alt=> <span class=texte>".$row['event_desc']."</span></ul><br>";
}
$alt.="<br>";
$alt = strip_tags($alt, "<b><span><p><br><li><u><i><img>" );
//$alt = str_replace($healthy, $yummy, $phrase);
if ($mode==1)
{
//$linkdate ="<a class=\"std\" href=\"".$_SERVER['PHP_SELF']."?view=1&eventdate=".$currentdate."\" title=\"$alt\">".$date_no."</a>";
$linkdate ="<a onmouseover=\"this.T_WIDTH=250;this.T_SHADOWWIDTH=2;this.T_BGCOLOR='#242424'; return escape('".$alt."')\"
href=\"http://www.lateuf.be/date-".$edate.".html\" >".$date_no."</a>";
}
if ($mode==3)
{
//$linkdate ="<a class=\"std\" href=\"".$_SERVER['PHP_SELF']."?view=1&eventdate=".$currentdate."\" title=\"$alt\">".$date_no."</a>";
$linkdate ="<a onmouseover=\"this.T_WIDTH=250;this.T_SHADOWWIDTH=2;this.T_BGCOLOR='#242424'; return escape('".$alt."')\"
href=\"http://www.lateuf.be/date-".$edate.".html\" >".$date_no."</a>";
}
elseif($mode==2)
{
// $linkdate ="<a class=\"std\" href=\"viewevent.php?eventdate=".$currentdate."\" title=\"$alt\" target=\"_new\">".$date_no."</a>";
$linkdate ="<a onmouseover=\"this.T_WIDTH=250;this.T_SHADOWWIDTH=2;this.T_BGCOLOR='#242424'; return escape('".$alt."')\"
href=\"http://www.lateuf.be/date-".$edate.".html\" >".$date_no."</a>";
}
}
else { $linkdate = $date_no ; }
if ($day_of_wk == 0 or $day_of_wk == 7 ) { $class = "sunday"; } else { $class = "tddate"; }
?>
<td class="<? echo $class ?>"><? echo $linkdate ?></td>
<!--td class="tddate"><? echo $linkdate ?></td-->
<? }
if ($sundayfirst) {
if ( $day_of_wk == 6 ) { ?></tr><tr><? }
if ( $day_of_wk < 6 && $date_of_mth == $day_in_mth ) {
for ( $i = $day_of_wk ; $i < 6; $i++ ) {
?><td class="tddate"> </td><? echo "\n"; }
?></tr><?
}
}
else {
if ( $day_of_wk == 7 ) { ?></tr><tr><? }
if ( $day_of_wk < 7 && $date_of_mth == $day_in_mth ) {
for ( $i = $day_of_wk ; $i < 7; $i++ ) {
?><td class="tddate"> </td><? echo "\n"; }
?></tr><?
}
}
}
?>
</table><br>
<? //}}
?>
je suis desesperé
j'ai l'impression que je n'y arriverai finallement pas...
Modifié par jicao1 (19 May 2006 - 22:34)