daher die frage ist es möglich das so zu gestalten das sagen wir die zahlen Weiß sind und nur dann die zahl Fett Rot wird wenn etwas eingetragen wurde ?
das würde mir sehr helfen
hier mal die php und css
calender php aus den boxes
<?php
# Copyright by Manuel
# Support www.ilch.de
defined ('main') or die ( 'no direct access' );
$m = date('n');
$j = date('Y');
$where1 = mktime(0 ,0,0,$m,1,$j);
$where2 = mktime(24,0,0,$m,date('t',$where1),$j);
$data = array();
$result = db_query('SELECT *
FROM prefix_kalender
WHERE (time > '.$where1.' AND time < '.$where2.')
AND '.$_SESSION['authright'].' <= recht
ORDER BY time LIMIT 50');
while ($row = db_fetch_assoc($result)) {
$t_id = $row['id'];
$t_d = date('j', $row['time']);
$t_m = date('n', $row['time']);
$t_y = date('Y', $row['time']);
$date = mktime(0,0,0,$t_m,$t_d,$t_y);
$data[$date][] = $row;
}
echo getCalendar($m, $j, '?kalender-v1-m{mon}-y{jahr}-d{tag}', '?kalender-v0-m{mon}-y{jahr}', $data, 1);
?>
calender php aus dem func Ordner
<?php
# Copyright by Manuel
# Support www.ilch.de
defined ('main') or die ( 'no direct access' );
function getCalendar($mon, $jahr, $url, $urlod, $data, $cellpadding=2) {
# lege einige variablen fest
$ak_tag = date('j');
$ak_mon = date('n');
$ak_jahr = date('Y');
$days = date('t',mktime(0,0,0,$mon,1,$jahr));
$fw = str_replace(0,7,date('w',mktime(0,0,0,$mon,1,$jahr))) -1;
$next_mon = $mon +1;
$last_mon = $mon -1;
$next_jahr = $jahr;
$last_jahr = $jahr;
if ($next_mon > 12) {
$next_jahr = $jahr +1;
$next_mon = 1;
}
if ($last_mon == 0) {
$last_jahr = $jahr -1;
$last_mon = 12;
}
# erstelle return string
$return_str = '';
$return_str .= '<table width="200px" height="200px" class="hack3" cellpadding="'.$cellpadding.'" cellspacing="1" border="0">';
$return_str .= '<tr class="hack1">';
$return_str .= '<th><a href="'.str_replace('{mon}',$last_mon, str_replace('{jahr}',$last_jahr, $urlod)).'"><b><</b></a></th>';
$return_str .= '<th colspan="5" align="center">'.$mon.'. '.$jahr.'</th>';
$return_str .= '<th><class="hack1"><a href="'.str_replace('{mon}',$next_mon, str_replace('{jahr}',$next_jahr, $urlod)).'"><b>></b></a></th>';
$return_str .= '</tr><tr class="hack2">';
$return_str .= '<class="td2"><td>Mo</td><td>Di</td><td>Mi</td><td>Do</td><td>Fr</td><td>Sa</td><td>So</td>';
$return_str .= '</tr><tr class="hack1">';
$return_str .= str_repeat ('<td> </td>', $fw);
for($i=1;$i<=$days;$i++) {
if (($i+$fw-1) % 7 == 0 AND $i > 1) { $return_str .= '</tr><tr>'; }
if ($i == $ak_tag AND $mon == $ak_mon AND $jahr == $ak_jahr) { $class = 'hack1'; } else { $class = 'hack1'; }
$surl = str_replace('{mon}', $mon, str_replace('{tag}',$i, str_replace('{jahr}',$jahr, $url)));
if (isset($data[mktime (0,0,0,$mon,$i,$jahr)])) { $out_i = '<b title="'.$data[mktime (0,0,0,$mon,$i,$jahr)][0]['title'].'">'.$i.'</b>'; $class = 'hack4'; } else { $out_i = $i; }
$return_str .= '<td class="'.$class.'" align="center"><a href="'.$surl.'">'.$out_i.'</a></td>';
}
$return_str .= str_repeat ('<td class="hack1"> </td>', (7-(($i+$fw-1) % 7)) % 7 );
$return_str .= '</tr></table>';
return ($return_str);
}
?>
und die style css
@charset "utf-8";
/* CSS Document */
body {
background-color: #333333;
background-image: url('Bilder/DDvX_bg.jpg') ;
background-attachment:fixed;
background-position: 50% 0%;
background-repeat:no-repeat;
background-size: 100%;
margin:0;
padding:0;
}
td
{
font-family: Verdana;
font-size: 12px;
color: #FFF;
}
a, #left_col .Cmite a, #left_col .Cnorm a, #left_col .Cdark a
{
color: #d00000;
font-family: Verdana;
font-size: 14px;
text-decoration: none;
}
a.
{
color: #666;
}
a:hover
{
text-decoration: none;
}
a.box
{
color: #d00000;
font-family: Verdana;
font-size: 11px;
text-decoration: underline;
}
a.box:hover
{
text-decoration: none;
color: #C10000;
}
.Chead
{
background: #252525;
background-image: url('Bilder/chead.png') ;
color: #c5c5c5;
}
.Chead a
{
color: #d00000;
}
.Chead td, .Chead td strong, .Chead h4, .Chead td b
{
background: #5e0000;
color: #c5c5c5;
}
.Callg
{
background-color: #EFEFEF;
color: #FFF;
}
.Callg td
{
color: #000000;
}
.Cnorm
{
background-color: #070707;
}
.Cmite
{
background-color: #000000;
}
.Cdark
{
background-color: #222222;
}
.rand
{
border: solid #222222 1px;
}
.smalfont
{
font-size: 12px;
text-decoration: none;
}
.border
{
background-color: #303030;
}
hr
{
height: 0px;
border: solid #660000 0px;
border-top-width: 1px;
}
input, textarea, select
{
color: #000000;
font: 12px Verdana;
border-color: #851818;
border-width: 1px;
border-style: solid;
font-weight: none;
text-decoration: none;
background-color: #EFEFEF;
}
.hack1
{
color: #FFFFFF;
background-color: #000000;
}
.hack2
{
color: #FFFFFF;
background-color: #000000;
}
.hack3 a
{
color: #FFFFFF;
background-color: #000000;
}
.hack4 a
{
font-size: 15px;
color: #D00000;
background-color: #000000;
}
verwendete ilch Version: 1.1 P
betroffene Homepage: bloodyocean.de
Zuletzt modifiziert von yahooh am 22.11.2014 - 14:51:12



