the contents that you just copied.
ok mine first
http://www.google.com
was going to search for nic modules
Moderators: macek, egami, gesf

sigix wrote:post your ctrl+v
the contents that you just copied.
![]()
ok mine first
http://www.google.com
was going to search for nic modules

{section name="row" loop=$calendar}
{section name="col" loop=$calendar[row]}
{assign var="date" value=$calendar[row][col]}
{assign var="todate" value=$calendar[row][col]}
{if $date == $selected_date}
<td class="day"><a href="{$date|date_format:$url_format}"><b>{$date|date_format:"%d"}</b></a></td>
{elseif $date != "63064800"}
<td class="day"><a href="{$date|date_format:$url_format}">{$date|date_format:"%d"}</td>
{else}
<td class="day"></td>
{/if}
{/section}
</tr>
{/section}



$handle = fopen("http://www.example.com/", "rb");
$contents = '';
while (!feof($handle)) {
$contents .= fread($handle, 8192);
}

)
<?php
class dato {
var $output;
function _construct() {
$monthname = array(1 =>'Januar','Februar','Mars','April','Mai','Juni','Juli', 'August','September','Oktober','November','Desember');
$day = date('d');
$month = date('n');
$year = date('Y');
/*
print_r($monthname);
*/
$first_day_of_month = date('w', mktime (0, 0 , 0, $month, 1, $year));
if($first_day_of_month == 0) $first_day_of_month = 7;
$days_in_month = cal_days_in_month(CAL_GREGORIAN, $month, $year);
$this->output = <<< kalender
<table>
<caption><strong>{$monthname[$month]} $year</strong></caption>
<tr>
<td title="Mandag">Man</td>
<td title="Tirsdag">Tir</td>
<td title="Onsdag">Ons</td>
<td title="Torsdag">Tor</td>
<td title="Fredag">Fre</td>
<td title="Lørdag">Lør</td>
<td title="Søndag">Søn</td>
</tr>
kalender;
$the_day = 0;
for($i = 1; $i < $days_in_month + $first_day_of_month; $i++) {
if( ($i % 7) == 1) {
$this->output .= "</tr>\n\n<tr class=\"newline\">\n";
}
if($first_day_of_month > $i) {
$this->output .= '<td> </td>' . "\n";
} else {
$the_day++;
if($the_day == date('d')) {
$this->output .= '<td style="background-color: brown;">' . $the_day . "</td>\n";
} else {
if($i % 7 == 0 ) {
$this->output .= '<td style="background-color: red;">' . $the_day . "</td>\n";
} else {
$this->output .= '<td>' . $the_day . "</td>\n";
}
}
}
}
while( ($i % 7) !=1){
$this->output .= '<td> </td>';
$i++;
}
$this->output .='</table>';
return $this->output;
}//end function _construct
}//end class dato
?>
<html>
<head>
<style type="text/css">
/*
*{
border: 1pt solid green;
}*/
</style>
<title>kalender</title>
</head>
<body>
</body>
<div id="kalender">
<?php
$dato = new dato;
echo $dato;
?>
</div>
</html>

Users browsing this forum: No registered users and 1 guest