Hi Leute,
bitte um eure Hilfe, bin schon den ganzen Tag an diesem Kalender und komm nun nicht mehr weiter...
Hatte zuerst den Kalender in einem separatem html Fenster. Möchte ihn nun in ein JavaScript erzeugtes Fenster einbetten und ihn weiterblättern lassen.
Problem ist der Aufruf der index Seite beim Klicken auf das nächste Monat.
Was brauch ich, damit das weiterblättern im selben Fenster ohne Reload möglich ist?
Verwendet wird: yui framework für das JS Fenster
Kalender wird direkt in der html seite generiert - php brauch ich zwischendurch für die korrekten ausgaben + zusätze aus der DB (teilweise entfernt da unrelevant)
HERZLICHEN DANK für eure Hilfe!!!
LG
ModernWeb
Testseite
Thema gehört eher zu JavaScript - SORRY!
bitte um eure Hilfe, bin schon den ganzen Tag an diesem Kalender und komm nun nicht mehr weiter...
Hatte zuerst den Kalender in einem separatem html Fenster. Möchte ihn nun in ein JavaScript erzeugtes Fenster einbetten und ihn weiterblättern lassen.
Problem ist der Aufruf der index Seite beim Klicken auf das nächste Monat.
Was brauch ich, damit das weiterblättern im selben Fenster ohne Reload möglich ist?
Verwendet wird: yui framework für das JS Fenster
Kalender wird direkt in der html seite generiert - php brauch ich zwischendurch für die korrekten ausgaben + zusätze aus der DB (teilweise entfernt da unrelevant)
HERZLICHEN DANK für eure Hilfe!!!
LG
ModernWeb
Testseite
Thema gehört eher zu JavaScript - SORRY!
PHP:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Simple Panel Example</title>
<link rel="stylesheet" type="text/css" href="./build/fonts/fonts-min.css" />
<link rel="stylesheet" type="text/css" href="./build/container/assets/skins/sam/container.css" />
<script type="text/javascript" src="./build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="./build/dragdrop/dragdrop-min.js"></script>
<script type="text/javascript" src="./build/container/container-min.js"></script>
</head>
<body class=" yui-skin-sam">
<script>
YAHOO.namespace("example.container");
function init() {
// Instantiate a Panel from markup
YAHOO.example.container.panel1 = new YAHOO.widget.Panel("panel1", { width:"900px", visible:false, constraintoviewport:true } );
YAHOO.example.container.panel1.render();
YAHOO.util.Event.addListener("show1", "click", YAHOO.example.container.panel1.show, YAHOO.example.container.panel1, true);
}
YAHOO.util.Event.addListener(window, "load", init);
</script>
<div id="container">
<div>
<button id="show1">Show panel1</button>
</div>
<div id="panel1">
<div class="hd">Kalender</div>
<div class="bd">
<div id="frame">
<div id="calendar">
<?
if (!isset($_REQUEST["year"])) { $year= date("Y"); } else { $year=$_REQUEST["year"]; };
if (!isset($_REQUEST["month"])) { $month = date("n"); } else { $month=$_REQUEST["month"]; };
$thismonth = getdate(mktime(0,0,0,$month,1,$year));
$startdate = $thismonth['wday'];
$maxday = date("t",mktime(0, 0, 0, $month, 1, $year));
$daysi = 1-$startdate-1;
$currentday = getdate();;
$currentdate = $currentday['mday'];
$currentmonth = $currentday['mon'];
if ($month==12) {
$next_year = $year + 1;
$next_month = 1;
$prev_year = $year;
$prev_month = 11;
} elseif ($month==1) {
$next_year = $year;
$next_month = 2;
$prev_year = $year-1;
$prev_month = 12;
} else {
$next_year = $year;
$next_month = $month + 1;
$prev_year = $year;
$prev_month = $month - 1;
};
if ($month<10) { $Smonth='0'.$month; } else { $Smonth=$month; };
if ($prev_month<10) { $Sprev_month='0'.$prev_month; } else { $Sprev_month=$prev_month; };
if ($next_month<10) { $Snext_month='0'.$next_month; } else { $Snext_month=$next_month; };
?>
<table width="100%" border="0" cellpadding="0" cellspacing="2">
<tr align="center">
<td height="25px" align="left" bgcolor="#FFFFFF">
<?php
if($prev_month < $currentmonth) { echo '<p style="color:#020267; font-size:12px">' . $OPTIONS["months"][$Sprev_month] . ' ' . $prev_year . '</p>';} else { echo '
<a href="index.php?year=' . $prev_year . '&month=' . $prev_month . '" ' .
'style="color:#020267; text-decoration:none; font-size:12px";><< ' . $OPTIONS["months"][$Sprev_month] . ' ' . $prev_year . '</a>
';}
?>
</td>
<td bgcolor="#FFFFFF"><strong style="color:#020267; font-size:14px; font-weight:bold"><? echo $OPTIONS["months"][$Smonth].' '.$year; ?></strong></td>
<td align="right" bgcolor="#FFFFFF">
<?php
if(($next_month - $currentmonth) < 3) { // nur max die n�chsten 3 monate vorbl�ttern
echo "<a href=\"index.php?year=$next_year&month=$next_month\"";
echo "style=\"color:#020267; text-decoration:none; font-size:12px\">".$OPTIONS['months'][$Snext_month]." ".$next_year." >></a>";
}
else {
echo "<p style=\"color:#020267; font-size:12px\">".$OPTIONS['months'][$Snext_month]." ".$next_year."</p>";
}
?>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="2" bgcolor="#FFFFFF">
<tr>
<td width="15%" height="20" align="center" bgcolor="#020267" style="font-size:12px; color:#FFFFFF"><strong>Sonntag</strong></td>
<td width="14%" align="center" bgcolor="#020267" style="font-size:11px; color:#FFFFFF"><strong>Montag</strong></td>
<td width="14%" align="center" bgcolor="#020267" style="font-size:11px; color:#FFFFFF"><strong>Dienstag</strong></td>
<td width="14%" align="center" bgcolor="#020267" style="font-size:11px; color:#FFFFFF"><strong>Mittwoch</strong></td>
<td width="14%" align="center" bgcolor="#020267" style="font-size:11px; color:#FFFFFF"><strong>Donnerstag</strong></td>
<td width="14%" align="center" bgcolor="#020267" style="font-size:11px; color:#FFFFFF"><strong>Freitag</strong></td>
<td width="15%" align="center" bgcolor="#020267" style="font-size:11px; color:#FFFFFF"><strong>Samstag</strong></td>
</tr>
<?
for ($i=1; $i<7; $i++) {
?><tr><?
for ($id=1; $id<8; $id++) {
$daysi++;
if ($currentdate==$daysi AND $month==$currentmonth) { $border=' style="border:2px solid #000000"'; } else { $border=''; };
?><td align='center' valign='middle' bgcolor='#ECECEC' <? echo $border; ?>><?
if ($daysi>0 and $daysi<=$maxday) {
if ($daysi<10) { $Sdaysi='0'.$daysi; } else { $Sdaysi=$daysi; };
?>
<table width="100%" height="80px" border="0" cellpadding="2" cellspacing="0">
<tr>
<td align="left" style="color:#000000; font-size:11px; font-weight:bold"><? echo $daysi; ?></td>
</tr>
<tr>
<td align="right" style="font-size:11px; background-color:<?
error_reporting(NULL);
if(($dt_php2 < $dt2) || (array_search(constant('HOLIDAY'), $resertimes))) {
?>"> <?
}
else if(array_search(constant('TIMESLOT_1'), $resertime)) {
?>"><font color="#000000">Geräteeinschulung</font><?
}
else
{
if ($SLOTS["$year-$Smonth-$Sdaysi"]["time1"]["booked"]==$max_anz) { // $month<7 ... ~3 wochen lang f�r ger�teschulungen raum zu kernzeiten belegt
echo '#CC0000"';
?>">ausgebucht<?
}
else
{
echo '#CCCCCC; cursor:pointer" onMouseOver="this.style.backgroundColor=\'#020267\'; this.innerText=\'reservieren\'" onMouseOut="this.style.backgroundColor=\'#CCCCCC\'; this.innerText=\'06:00-07:30\'" onclick="wopen(\''."$year-$Smonth-$Sdaysi".'\',\'1\')"';
?>">06:00-07:30<?
}
};
?>
</td>
</tr>
<tr>
<td align="right" style="font-size:11px; background-color:<?
if(($dt_php2 < $dt2) || (array_search(constant('HOLIDAY'), $resertimes))) {
?>"> <?
}
else if(array_search(constant('TIMESLOT_2'), $resertimes)) {
?>"><font color="#000000">Geräteeinschulung</font><?
}
else
{
if ($SLOTS["$year-$Smonth-$Sdaysi"]["time1"]["booked"]==$max_anz) {
echo '#CC0000"';
?>">ausgebucht<?
}
else
{
echo '#b1b1b1; cursor:pointer" onMouseOver="this.style.backgroundColor=\'#020267\'; this.innerText=\'reservieren\'" onMouseOut="this.style.backgroundColor=\'#b1b1b1\'; this.innerText=\'07:30-09:00\'" onclick="wopen(\''."$year-$Smonth-$Sdaysi".'\',\'2\')"';
?>">07:30-09:00<?
}
};
?>
</td>
</tr>
<tr>
<td align="right" style="font-size:11px; background-color:<?
if(($dt_php2 < $dt2) || (array_search(constant('HOLIDAY'), $resertimes))) {
?>"> <?
}
else if(array_search(constant('TIMESLOT_3'), $resertimes)) {
?>"><font color="#000000">Geräteeinschulung</font><?
}
else
{
if ($SLOTS["$year-$Smonth-$Sdaysi"]["time1"]["booked"]==$max_anz) {
echo '#CC0000"';
?>">ausgebucht<?
}
else
{
echo '#938f8f; cursor:pointer" onMouseOver="this.style.backgroundColor=\'#020267\'; this.innerText=\'reservieren\'" onMouseOut="this.style.backgroundColor=\'#938f8f\'; this.innerText=\'09:00-10:30\'" onclick="wopen(\''."$year-$Smonth-$Sdaysi".'\',\'3\')"';
?>">09:00-10:30<?
}
};
?>
</td>
</tr>
<tr>
<td align="right" style="font-size:11px; background-color:<?
if(($dt_php2 < $dt2) || (array_search(constant('HOLIDAY'), $resertimes))) {
?>"> <?
}
else if(array_search(constant('TIMESLOT_4'), $resertimes)) {
?>"><font color="#000000">Geräteeinschulung</font><?
}
else
{
if ($SLOTS["$year-$Smonth-$Sdaysi"]["time1"]["booked"]==$max_anz) {
echo '#CC0000"';
?>">ausgebucht<?
}
else
{
echo '#8b8888; cursor:pointer" onMouseOver="this.style.backgroundColor=\'#020267\'; this.innerText=\'reservieren\'" onMouseOut="this.style.backgroundColor=\'#8b8888\'; this.innerText=\'10:30-12:00\'" onclick="wopen(\''."$year-$Smonth-$Sdaysi".'\',\'4\')"';
?>">10:30-12:00<?
}
};
?>
</td>
</tr>
<tr>
<td align="right" style="font-size:11px; background-color:<?
if(($dt_php2 < $dt2) || (array_search(constant('HOLIDAY'), $resertimes))) {
?>"> <?
}
else if(array_search(constant('TIMESLOT_5'), $resertimes)) {
?>"><font color="#000000">Geräteeinschulung</font><?
}
else
{
if ($SLOTS["$year-$Smonth-$Sdaysi"]["time1"]["booked"]==$max_anz) {
echo '#CC0000"';
?>">ausgebucht<?
}
else
{
echo '#7f7f7f; cursor:pointer" onMouseOver="this.style.backgroundColor=\'#020267\'; this.innerText=\'reservieren\'" onMouseOut="this.style.backgroundColor=\'#7f7f7f\'; this.innerText=\'12:00-13:30\'" onclick="wopen(\''."$year-$Smonth-$Sdaysi".'\',\'5\')"';
?>">12:00-13:30<?
}
};
?>
</td>
</tr>
<tr>
<td align="right" style="font-size:11px; background-color:<?
if(($dt_php2 < $dt2) || (array_search(constant('HOLIDAY'), $resertimes))) {
?>"> <?
}
else if(array_search(constant('TIMESLOT_6'), $resertimes)) {
?>"><font color="#000000">Geräteeinschulung</font><?
}
else
{
if ($SLOTS["$year-$Smonth-$Sdaysi"]["time1"]["booked"]==$max_anz) {
echo '#CC0000"';
?>">ausgebucht<?
}
else
{
echo '#7b7878; cursor:pointer" onMouseOver="this.style.backgroundColor=\'#020267\'; this.innerText=\'reservieren\'" onMouseOut="this.style.backgroundColor=\'#7b7878\'; this.innerText=\'13:30-15:00\'" onclick="wopen(\''."$year-$Smonth-$Sdaysi".'\',\'6\')"';
?>">13:30-15:00<?
}
};
?>
</td>
</tr>
<tr>
<td align="right" style="font-size:11px; background-color:<?
if(($dt_php2 < $dt2) || (array_search(constant('HOLIDAY'), $resertimes))) {
?>"> <?
}
else if(array_search(constant('TIMESLOT_7'), $resertimes)) {
?>"><font color="#000000">Geräteeinschulung</font><?
}
else
{
if ($SLOTS["$year-$Smonth-$Sdaysi"]["time1"]["booked"]==$max_anz) {
echo '#CC0000"';
?>">ausgebucht<?
}
else
{
echo '#696666; cursor:pointer" onMouseOver="this.style.backgroundColor=\'#020267\'; this.innerText=\'reservieren\'" onMouseOut="this.style.backgroundColor=\'#696666\'; this.innerText=\'16:00-17:30\'" onclick="wopen(\''."$year-$Smonth-$Sdaysi".'\',\'7\')"';
?>">16:00-17:30<?
}
};
?>
</td>
</tr>
<tr>
<td align="right" style="font-size:11px; background-color:<?
if(($dt_php2 < $dt2) || (array_search(constant('HOLIDAY'), $resertimes))) {
?>"> <?
}
else if(array_search(constant('TIMESLOT_8'), $resertimes)) {
?>"><font color="#000000">Geräteeinschulung</font><?
}
else
{
if ($SLOTS["$year-$Smonth-$Sdaysi"]["time1"]["booked"]==$max_anz) {
echo '#CC0000"';
?>">ausgebucht<?
}
else
{
echo '#5b5858; cursor:pointer" onMouseOver="this.style.backgroundColor=\'#020267\'; this.innerText=\'reservieren\'" onMouseOut="this.style.backgroundColor=\'#5b5858\'; this.innerText=\'17:30-19:00\'" onclick="wopen(\''."$year-$Smonth-$Sdaysi".'\',\'8\')"';
?>">17:30-19:00<?
}
};
?>
</td>
</tr>
<tr>
<td align="right" style="font-size:11px; background-color:<?
if(($dt_php2 < $dt2) || (array_search(constant('HOLIDAY'), $resertimes))) {
?>"> <?
}
else if(array_search(constant('TIMESLOT_9'), $resertimes)) {
?>"><font color="#000000">Geräteeinschulung</font><?
}
else
{
if ($SLOTS["$year-$Smonth-$Sdaysi"]["time1"]["booked"]==$max_anz) {
echo '#CC0000"';
?>">ausgebucht<?
}
else
{
echo '#4d4a4a; cursor:pointer" onMouseOver="this.style.backgroundColor=\'#020267\'; this.innerText=\'reservieren\'" onMouseOut="this.style.backgroundColor=\'#4d4a4a\'; this.innerText=\'19:00-20:30\'" onclick="wopen(\''."$year-$Smonth-$Sdaysi".'\',\'9\')"';
?>">19:00-20:30<?
}
};
?>
</td>
</tr>
<tr>
<td align="right" style="font-size:11px; background-color:<?
if(($dt_php2 < $dt2) || (array_search(constant('HOLIDAY'), $resertimes))) {
?>"> <?
}
else if(array_search(constant('TIMESLOT_10'), $resertimes)) {
?>"><font color="#000000">Geräteeinschulung</font><?
}
else
{
if ($SLOTS["$year-$Smonth-$Sdaysi"]["time1"]["booked"]==$max_anz) {
echo '#CC0000"';
?>">ausgebucht<?
}
else
{
echo '#333333; cursor:pointer" onMouseOver="this.style.backgroundColor=\'#020267\'; this.innerText=\'reservieren\'" onMouseOut="this.style.backgroundColor=\'#333333\'; this.innerText=\'20:30-22:00\'" onclick="wopen(\''."$year-$Smonth-$Sdaysi".'\',\'10\')"';
?>">20:30-22:00<?
}
};
?>
</td>
</tr>
</table>
<?
} else {
echo " ";
};
?></td><?
if ($daysi>=$maxday){
$i=7;
};
};
?></tr><?
};
?>
</table>
</div>
</div>
</div>
<div class="ft">End of Panel #1</div>
</div>
</div>
</body>
</html>
Zuletzt bearbeitet von einem Moderator: