Translate

Senin, 24 September 2012

Membuat Kalender Menggunakan Notepad++




Script yang digunakan :





<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>K A L E N D E R</title>
</head>

<body>
<font face="Comic Sans MS">
<? class kalender{
    public static function tampil($bln='', $th=''){
        $bln=is_int($bln) ? $bln : date('m');
        $th=is_int($th) ? $th : date('Y');
     
        $time=mktime(0,0,0, $bln, 1, $th);
        $days=date('t', $time);
     
        ?>

<table  border="1" cellspacing="3" cellpadding="8">
  <tr>
    <td colspan="7" align="center" bgcolor="#999999"><b>
    <? echo strftime('%B %Y', $time);?></b>
    </td>
  </tr>

  <tr>
<th bgcolor="#CCCCCC" colspan="7"><font face="Comic Sans MS"><center>SEPTEMBER</center></font></th>
</tr>

  <tr>
    <th bgcolor="#CCCCCC">SENIN</th>
    <th bgcolor="#CCCCCC">SELASA</th>
    <th bgcolor="#CCCCCC">RABU</th>
    <th bgcolor="#CCCCCC">KAMIS</th>
    <th bgcolor="#CCCCCC">JUM'AT</th>
    <th bgcolor="#CCCCCC">SABTU</th>
    <th bgcolor="#CCCCCC"><font color=red>MINGGU</font></td></th>

</tr>

<tr>
<th bgcolor="#CCCCCC"></th>
<th bgcolor="#CCCCCC"></th>
<th bgcolor="#CCCCCC"></th>
<th bgcolor="#CCCCCC"></th>
<th bgcolor="#CCCCCC"></th>
<th bgcolor="#CCCCCC">1</th>
<th bgcolor="#CCCCCC"><font color="red">2</font></th>
</tr>

<tr>
<th bgcolor="#CCCCCC">3</th>
<th bgcolor="#CCCCCC">4</th>
<th bgcolor="#CCCCCC">5</th>
<th bgcolor="#CCCCCC">6</th>
<th bgcolor="#CCCCCC">7</th>
<th bgcolor="#CCCCCC">8</th>
<th bgcolor="#CCCCCC"><font color="red">9</font></th>
</tr>

<tr>
<th bgcolor="#CCCCCC">10</th>
<th bgcolor="#CCCCCC">11</th>
<th bgcolor="#CCCCCC">12</th>
<th bgcolor="#CCCCCC">13</th>
<th bgcolor="#CCCCCC">14</th>
<th bgcolor="#CCCCCC">15</th>
<th bgcolor="#CCCCCC"><font color="red">16</font></th>
</tr>

<tr>
<th bgcolor="#CCCCCC">17</th>
<th bgcolor="#CCCCCC">18</th>
<th bgcolor="#CCCCCC">19</th>
<th bgcolor="#CCCCCC">20</th>
<th bgcolor="#CCCCCC">21</th>
<th bgcolor="#CCCCCC">22</th>
<th bgcolor="#CCCCCC"><font color="red">23</font></th>
</tr>

<tr>
<th bgcolor="#CCCCCC">24</th>
<th bgcolor="#CCCCCC">25</th>
<th bgcolor="#CCCCCC">26</th>
<th bgcolor="#CCCCCC">27</th>
<th bgcolor="#CCCCCC">28</th>
<th bgcolor="#CCCCCC">29</th>
<th bgcolor="#CCCCCC"><font color="red">30</font></th>
</tr>
</table>
<?
}
}
kalender::tampil();
?>

</font>
</body>
</html>

Tidak ada komentar:

Posting Komentar