Jump to content

Recommended Posts

Posted

Im having a problem with the color of the dates in this script. Months etc shows like I want (white as I want it), but the dates are black and I want them white too, what am I missing?

><?/*********************************************************************

By Morgan Andersson 2002.

www.morgande.com
www.3dlr.com

If you use this script then please buy a domainname to support me.

************************************************************************/

define ('ADAY', (60*60*24));
$datearray = getdate();
$month = $datearray['mon'];
$year = $datearray['year'];

$start= mktime(0,0,0,$month,1,$year);
$firstdayarray = getdate($start);

$months = Array('Januari','Februari','Mars','April','Maj','Juni',
   'Juli','Augusti','September','Oktober','November','December');
$days = Array('Sön','Mån','Tis','Ons','Tor','Fre','Lör');

?>

<table border=1 cellpadding=1 bordercolor="339933" cellspacing="0">
 <tr> 
   <td colspan="7" bordercolor="339933"> 
     <div align="center"><font color="#ffffff"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
       <? echo "$datearray[month] $year";?>
       </font></b></font></div>
   </td>
 </tr>
 <?

foreach($days as $day)
{
?>
 <td bordercolor="339933"> 
   <div align="center"><font color="#ffffff"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="1"> 
     <?echo"$day";?>
     </font></b></font></div>
 </td>
 <?
}
for( $count=0;$count<(6*7);$count++)
{
$dayarray = getdate($start);
if((($count) % 7) == 0)
{
 if($dayarray['mon'] != $datearray['mon'])
	 break;
 echo "</tr><tr>";
}
if($count < $firstdayarray['wday'] || $dayarray['mon'] != $month)
{
 echo "<td bordercolor=339933><br></td>";
}
else
{
 if($dayarray['mday'] == $datearray['mday'])
 {
 ?>
 <td bgcolor="#339933" bordercolor="#339933"> 
   <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"> 
     <? echo "$dayarray[mday]";?>
     </font></div>
 </td>
 <?
   $start += ADAY;
 }
 else
 {
?>
 <td bordercolor="339933"> 
   <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"> 
     <? echo "$dayarray[mday]";?>
     </font></div>
 </td>
 <?
 $start += ADAY;
 }
}
}
?>
 </tr>
</table>

Posted

Talking to yourself, huh Thomas? :(

 

BTW, Happy Birthday to wee Ginnie! :D

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...