Hi Leute wollte gerne wissen. Welche abfrage ich machen muss um mir die Listenansicht daten des Kalender zu nehmen und quasi wie bei next wars anzeigen lassen kann?
Danke für die hilllfeee...
externer Link
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
<title>$data_id</title><?php # Copyright by Manuel # Support www.ilch.de defined ('main') or die ( 'no direct access' ); //Daten $month = date('n'); $year = date('Y'); $gday = 0; $view = 0; $eid = 0; if ($menu->getA(1) == 'v' AND is_numeric($menu->getE(1))) { $view = $menu->getE(1); } if ($menu->getA(2) == 'm' AND is_numeric($menu->getE(2)) AND $menu->getE(2) > 0 AND $menu->getE(2) < 13) { $month = $menu->getE(2); } if ($menu->getA(4) == 'd' AND is_numeric($menu->getE(4)) AND $menu->getE(4) > 0 AND $menu->getE(4) < 32) { $gday = $menu->getE(4); } if ($menu->getA(3) == 'y' AND is_numeric($menu->getE(3)) AND $menu->getE(3) > 2000 AND $menu->getE(3) < date('Y', (time()+pow(8,9)))) { $year = $menu->getE(3); } if ($menu->getA(2) == 'e' AND is_numeric($menu->getE(1))) { $eid = $menu->getE(2); } $arr_month = array('1'=>'Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'); $arr_day = array('So','Mo','Di','Mi','Do','Fr','Sa'); $days = date('t',mktime(0,0,0,$month,1,$year)); $start_col = date('w',mktime(0,0,0,$month,1,$year))-1; $rows = ceil($days/7); $day=1; $data = array (); $data_id = array (); $aus = array(); //Daten aus der MySQL $where1 = mktime(0 ,0,0,$month,1,$year); $where2 = mktime(24,0,0,$month,date('t',$where1),$year); $result = db_query("SELECT * FROM prefix_kalender WHERE ((time > ".$where1." AND time < ".$where2.") OR id = ".$eid.") AND ".$_SESSION['authright']." <= recht ORDER BY time LIMIT 200"); 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_id[$t_id] = $row; $data[$date][] = $row; } $ueid = 0; if (substr($eid, 0, 3) == 999) { $ueid = substr ($eid, 3); } $result = db_query("SELECT name, gebdatum, id FROM prefix_user WHERE MONTH(gebdatum) = ".$month." OR id = ".$ueid." ORDER BY gebdatum LIMIT 200"); while ($r = db_fetch_assoc($result)) { list($y,$m,$d) = explode('-',$r['gebdatum']); $date = mktime(0,0,0,$m,$d,date('Y')); $dateA = mktime(0,0,0,$m,$d,$y); $jetzt = time(); $alter = $jetzt - $dateA; if ($date > $jetzt) { $alter = date("Y",$alter) - 1970 +1; } else { $alter = date("Y",$alter) - 1970; } $row = array( 'title' => $alter.'. Geburtstag von '.$r['name'], 'text' => 'Der '.$alter.'. Geburtstag von [url=http://'.($_SERVER["HTTP_HOST"].$_SERVER["SCRIPT_NAME"]).'?user-details-'.$r['id'].'][b]'.$r['name'].'[/b][/url]', 'time' => $date + 99, 'id' => '999'.$r['id'], ); $data_id['999'.$r['id']] = $row; $data[$date][] = $row; } if ($view == 0) { $title_liste = $arr_month[$month].' '.$year; } elseif ($view == 1 && !empty($gday)) { $title_liste = 'Nur am '.$gday.' '.$arr_month[$month].' '.$year; } elseif ($view == 1) { $title_liste = 'Liste ab '.$arr_month[$month].' '.$year; } ?>
<?php # Copyright by Manuel # Support www.ilch.de defined ('main') or die ( 'no direct access' ); $result = db_query("SELECT `id`, `time`, `title` FROM `prefix_kalender` WHERE `time` >= ".mktime(0 ,0,0,date('n'),1,date('Y'))." AND ".$_SESSION['authright']." <= `recht` ORDER BY `time` LIMIT 10"); echo '<table>'; while($erg=db_fetch_object($result)){ echo '<tr><td valign="top"><b> » </b></td><td><a href="index.php?kalender-v0-e'.$erg->id.'" class="box"><span class="smalfont">Am '.date('d.m.Y',$erg->time).'<br/>Um '.date('H:i',$erg->time).' Uhr<br/>'.((strlen($erg->title)<18) ? $erg->title : substr($erg->title,0,15).'...').'</span></a></td></tr>'; } echo '</table>'; ?>
<?php # # Copyright by Manuel # # Support www.ilch.de # # # defined ('main') or die ( 'no direct access' ); # # $result = db_query("SELECT `id`, `time`, `title` FROM `prefix_kalender` WHERE ".$_SESSION['authright']." <= `recht` AND `time` >= ".time()." ORDER BY `time` LIMIT 10"); # echo '<table>'; # while($erg=db_fetch_object($result)){ # echo '<tr><td valign="top"><b> » </b></td><td><a href="index.php?kalender-v0-e'.$erg->id.'" class="box"><span class="smalfont">Am '.date('d.m.Y',$erg->time).'<br/>Um '.date('H:i',$erg->time).' Uhr<br/>'.((strlen($erg->title)<18) ? $erg->title : substr($erg->title,0,15).'...').'</span></a></td></tr>'; # } # echo '</table>';?>
Geschlossen | ||
Zurück zu Module und Modifikationen |