Index: calendar.php
===================================================================
--- calendar.php	(revision 0)
+++ calendar.php	(revision 0)
@@ -0,0 +1,377 @@
+<?php
+$monthliste = '"'.t("January").'","'.t("February").'","'.t("March").'","'.t("April").'","'.t("May").'","'.t("June").'","'.t("July").'","'.t("August").'","'.t("September").'","'.t("October").'","'.t("November").'","'.t("December").'"';
+$list_starttime = intVal($_GET['time']);
+
+// Find out how many days into the past we should bother checking
+$result = mysql_query('SELECT TO_DAYS(min(starttime)) - TO_DAYS(NOW()) FROM program')
+or trigger_error('SQL Error: '.mysql_error(), FATAL);
+list($min_days) = mysql_fetch_row($result);
+mysql_free_result($result);
+// Find out how many days into the future we should bother checking
+$result = mysql_query('SELECT TO_DAYS(max(starttime)) - TO_DAYS(NOW()) FROM program')
+or trigger_error('SQL Error: '.mysql_error(), FATAL);
+list($max_days) = mysql_fetch_row($result);
+mysql_free_result($result);
+// Print out the list
+for ($i=$min_days;$i<=$max_days;$i++) {
+    $time = mktime(0,0,0, date('m'), date('d') + $i, date('Y'));
+    $date = date("Y-m-d", $time);
+    $arr .= $date."|" ;
+}
+?>
+<html>
+<head>
+<style>
+b           {font-weight: 900;}
+body	{margin: 1px; font-family: Verdana; cursor: default}
+td		{ font-size: 7pt}
+a:link	{color: black;font-decoration: none;text-decoration: none;}
+a:visited{color: black;	text-decoration: none;}
+a:hover.my{color: black;text-decoration: underline;}
+a:link.spe	{color: black; font-weight: bolder; }
+a:visited.spe	{color: black; }
+.arrow	{font-weight: bold}
+.prevnext	{background: none; color: gray; text-align:center;}
+.thismonth	{background: white; color: black; text-align:center;}
+.mytoday	{background: lightgray; color: white; text-align:center;}
+.today	{color: blue; text-align:center; font-weight: 900;} 
+</style>
+</head>
+
+<body bgcolor=white scroll=no onSelectStart="window.event.returnValue = false" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
+    
+<table border=0 width=126 heigth=129 cellspacing=0 cellpadding=0>
+  <tr> 
+    <td height="16" colspan=7 align=center bgcolor="#CCCCCC" id="IDToday"><a class=my href=javascript:ShowAK()><? echo date("l, j.n.Y",time());?></a></td>
+  </tr>
+
+  <tr> 
+    <td height="1" colspan=7 align=center bgcolor="#000000"></td>
+  </tr>
+
+  <tr height=10> 
+    <td valign=center align=center bgcolor="#CCCCCC"><a id=ID_Prev class=spe target=_self href=javascript:ShowPrevMonth(true)><img src="<?php echo skin_url ?>img/left.gif" border=0></a></td>
+    <td colspan=5 align=center bgcolor="#CCCCCC"><a class=my href=javascript:ShowMonth()><div id="IDCaption">&nbsp;</div></a></td>
+    <td valign=center align=center bgcolor="#CCCCCC"><a id=ID_Next class=spe target=_self href=javascript:ShowNextMonth(true)><img src="<?php echo skin_url ?>img/right.gif" border=0></a></td>
+  </tr>
+  <tr> 
+    <td width="18" align="center"> <font color="#000000">M</font></td>
+    <td width="18" align="center"> <font color="#000000">D</font></td>
+    <td width="18" align="center"> <font color="#000000">M</font></td>
+    <td width="18" align="center"> <font color="#000000">D</font></td>
+    <td width="18" align="center"> <font color="#000000">F</font></td>
+    <td width="18" align="center"> <font color="#000000">S</font></td>
+    <td width="18" align="center"> <font color="#000000">S</font></td>
+  </tr>
+   <tr><td height="1" colspan=7 bgcolor="#666666"></td></tr>
+ <tr height=12> 
+    <td id=dt_1></td>
+    <td id=dt_2></td>
+    <td id=dt_3></td>
+    <td id=dt_4></td>
+    <td id=dt_5></td>
+    <td id=dt_6></td>
+    <td id=dt_7></td>
+  </tr>
+  <tr height=12> 
+    <td id=dt_8></td>
+    <td id=dt_9></td>
+    <td id=dt_10></td>
+    <td id=dt_11></td>
+    <td id=dt_12></td>
+    <td id=dt_13></td>
+    <td id=dt_14></td>
+  </tr>
+  <tr height=12> 
+    <td id=dt_15></td>
+    <td id=dt_16></td>
+    <td id=dt_17></td>
+    <td id=dt_18></td>
+    <td id=dt_19></td>
+    <td id=dt_20></td>
+    <td id=dt_21></td>
+  </tr>
+  <tr height=12> 
+    <td id=dt_22></td>
+    <td id=dt_23></td>
+    <td id=dt_24></td>
+    <td id=dt_25></td>
+    <td id=dt_26></td>
+    <td id=dt_27></td>
+    <td id=dt_28></td>
+  </tr>
+  <tr height=12> 
+    <td id=dt_29></td>
+    <td id=dt_30></td>
+    <td id=dt_31></td>
+    <td id=dt_32></td>
+    <td id=dt_33></td>
+    <td id=dt_34></td>
+    <td id=dt_35></td>
+  </tr>
+  <tr height=12> 
+    <td id=dt_36></td>
+    <td id=dt_37></td>
+    <td id=dt_38></td>
+    <td id=dt_39></td>
+    <td id=dt_40></td>
+    <td id=dt_41></td>
+    <td id=dt_42></td>
+  </tr>
+  <tr>
+  <td height="1" colspan=7></td> 
+  </tr>
+  <tr height=12> 
+    <td valign=center align=center bgcolor="#CCCCCC"><a class=spe target=_self href=javascript:ShowPrevYear(true)><img src="<?php echo skin_url ?>img/left.gif" border=0></a></td>
+    <td colspan=5 align=center bgcolor="#CCCCCC" id="IDBottom"> jahr</td>
+    <td valign=center align=center bgcolor="#CCCCCC"><a class=spe target=_self href=javascript:ShowNextYear(true)><img src="<?php echo skin_url ?>img/right.gif" border=0></a></td>
+  </tr>
+  
+</table>
+   
+
+
+<script>
+// Zum verhindern das markiert wird!
+function disableselect(e){
+  return false
+}
+function reEnable(){
+  return true
+}
+
+document.onselectstart=new Function ("return false")
+if (window.sidebar)
+ {
+ document.onmousedown=disableselect
+ document.onclick=reEnable
+ }
+
+
+
+//Konstanten kalender...
+    var cnt = 0;
+
+    // constants
+    var c_base = 0;  // 0 - Sunday based week, 1 - Monday based week, etc.
+
+    // global variables
+    var g_month, g_year;
+
+    var txt
+
+    function numDays(Month, Year)
+      {
+      // day 0 of the next month is the last day of this month
+      return new Date(Year, Month + 1, 0).getDate();
+      }
+
+    function showMonth (Month, Year, HideFocus)
+      {
+
+      var evliste = "<? echo $arr; ?> "
+
+	for (tmp=1; tmp<43; tmp++)
+	{
+		fld = document.getElementById("dt_"+tmp);
+		fld.style.background = "#ffffff";
+	}
+	cnt = 0;
+
+      g_month = Month, g_year = Year;
+
+	var Monate = new Array(<?php echo $monthliste; ?>);
+
+      document.getElementById("IDCaption").innerHTML = Monate[g_month] + " " + Year;
+      document.getElementById("IDBottom").innerHTML = Year;
+
+
+      // tdColl = document.all.tags("td");
+
+      // get offset of the 1st day of the month
+      theFirst = new Date(Year, Month, 1);
+      offset = theFirst.getDay() - c_base;
+      if (offset <= 0)
+        offset += 7;
+
+      // fill out the previous month
+      nDays = numDays(Month - 1, Year); // OK for Month - 1 == -1 (Dec of previous year)
+      for (tdIndex = 1; tdIndex < offset; tdIndex++)
+        with (document.getElementById("dt_" + tdIndex))
+          {
+          className = "prevnext";
+          innerHTML = "<div onclick=clickPrev()>" + (nDays - offset + 1 + tdIndex) + "</div>";
+          }
+
+      // fill out this month
+      nDays = numDays(Month, Year);
+      now = new Date();
+
+      isMonthYear = (Month == now.getMonth()) && (Year == now.getFullYear());
+      for (date = 1; date <= nDays; date++, tdIndex++)
+	{
+	var addn1, addn2
+	addn1="";addn2="";
+	
+	if ((Number(Month)+1) < 10)
+	    addn1 = "0";
+	if (date < 10)
+	    addn2 = "0";
+	        
+	    txt = "<div onClick=FillDate(\"" + Year + addn1 + (Number(Month)+1) + addn2 + date + "\",\"" + tdIndex + "\")>" + date + "</div>";
+	
+
+
+
+
+
+
+
+	with (document.getElementById("dt_" + tdIndex))
+          {
+          isToday = isMonthYear && (date == now.getDate());
+          className = isToday ? "today" : "thismonth";
+
+          // var such = ("|" + date +"."+(Number(Month)+1)+"."+ Year);
+          
+          var nummon = (Number(Month)+1);
+          var nummonS = nummon.toString();
+          var numdateS = date.toString();
+          if (nummonS.length == 1) {nummonS = "0" + nummonS;}
+          if (numdateS.length == 1) {numdateS = "0" + numdateS;}
+          
+          var such = ("|" + Year + "-" + nummonS + "-"+ numdateS);
+
+          var Ergebnis = evliste.indexOf(such);
+          if(Ergebnis != -1)
+           { innerHTML = "<b>" + txt + "</b>"; }
+           else
+            innerHTML = txt; 
+          
+          }
+	}
+
+      // fill out the next month
+      for (date = 1 ; tdIndex < 43; date++, tdIndex++)
+          with (document.getElementById("dt_" + tdIndex))
+          {
+          className = "prevnext";
+          innerHTML = "<div onclick=clickNext()>" + date +"</div>";
+          }
+
+      }
+
+    function clickPrev()
+      {
+      ShowPrevMonth(true)
+      }
+
+    function clickNext()
+      {
+      ShowNextMonth(true)
+      }
+
+    function ShowPrevMonth(HideFocus)
+      {
+      if (g_month == 0)
+        showMonth(11, g_year - 1, HideFocus);
+      else
+        showMonth(g_month - 1, g_year, HideFocus);
+      }
+
+    function ShowPrevYear(HideFocus)
+      {
+        showMonth(g_month, g_year -1, HideFocus);
+      }
+      
+    function ShowThisMonth(HideFocus)
+      {
+      now = new Date();
+      showMonth(now.getMonth(), now.getFullYear(), HideFocus);
+      }
+
+    function ShowNextMonth(HideFocus)
+      {
+      if (g_month == 11)
+        showMonth(0, g_year + 1, HideFocus);
+      else
+        showMonth(g_month + 1, g_year, HideFocus);
+      }
+    function ShowNextYear(HideFocus)
+      {
+        showMonth(g_month, g_year + 1, HideFocus);
+      }
+    function FillDate(MyDate, SNr)
+      {
+
+	var tmp;
+	var fld;
+
+	for (tmp=1; tmp<43; tmp++)
+	{
+		fld = document.getElementById("dt_"+tmp);
+		fld.style.background = "#ffffff";
+	}
+
+
+	fld = document.getElementById("dt_"+SNr);
+
+	fld.style.background = "#cccccc";
+	
+ 	parent.location.href = "<?php echo root; ?>tv/list?hour=<?php echo date('H', $list_starttime); ?>&date=" + MyDate;
+      }
+     function FillDate2(tag,monat,jahr)
+      {
+
+        showMonth(monat-1, jahr , 0);
+        
+	var tmp;
+	var fld;
+
+	for (tmp=1; tmp<43; tmp++)
+	{
+		fld = document.getElementById("dt_"+tmp);
+		fld.style.background = "#ffffff";
+	}
+
+
+	fld = document.getElementById("dt_"+tag);
+
+	fld.style.background = "#cccccc";
+
+      }
+    function DoIt()
+      {
+      <? $mydate = date("j.n.Y",$list_starttime); ?>
+      var dtm = "<? echo @$mydate; ?>";
+      // alert (dtm);
+      if (dtm != "")
+      {
+      var tag, monat, jahr
+
+      tag = dtm.substr(0,dtm.indexOf("."));
+      monat = dtm.substr(dtm.indexOf(".")+1,dtm.lastIndexOf(".")-dtm.indexOf(".")-1);
+      jahr = dtm.substr(dtm.lastIndexOf(".")+1,4);
+      FillDate2(Number(tag)+1,Number(monat),Number(jahr));
+      }
+      }
+
+   DoIt();
+
+
+ function ShowAK()
+	{
+	for (tmp=1; tmp<43; tmp++)
+	 {
+		fld = document.getElementById("dt_"+tmp);
+		fld.style.background = "#ffffff";
+	 }
+	DoIt();
+	parent.location.href = "<?php echo root; ?>tv/list?hour=<?php echo date('H', $list_starttime); ?>&date=<? echo date("Ymd",time());?>";
+	}
+
+ function ShowMonth()
+	{
+	}
+  </script>
+</html>
Index: handler.php
===================================================================
--- handler.php	(revision 10781)
+++ handler.php	(working copy)
@@ -54,7 +54,7 @@
     require_once "includes/recording_schedules.php";
 
 // Unknown section?  Use the default
-    if (!in_array($Path[1], array('detail', 'channel', 'search', 'movies'))
+    if (!in_array($Path[1], array('detail', 'channel', 'search', 'movies', 'calendar'))
             && empty($Modules['tv']['links'][$Path[1]]))
         $Path[1] = 'list';
 
Index: tmpl/default/list.php
===================================================================
--- tmpl/default/list.php	(revision 10781)
+++ tmpl/default/list.php	(working copy)
@@ -60,30 +60,10 @@
                         echo ' SELECTED';
                     echo '>'.strftime($_SESSION['time_format'], strtotime("$h:00")).'</option>';
                 }
-                ?></select></td>
-            <td align="right"><?php echo t('Date') ?>:&nbsp;</td>
-            <td style="vertical-align:middle;" nowrap><img src="<?php echo skin_url ?>img/left.gif" onclick="MoveProgramListing(-1)">
-                <select name="date" onchange="get_element('program_listing').submit()"><?php
-            // Find out how many days into the past we should bother checking
-                $result = mysql_query('SELECT TO_DAYS(min(starttime)) - TO_DAYS(NOW()) FROM program')
-                    or trigger_error('SQL Error: '.mysql_error(), FATAL);
-                list($min_days) = mysql_fetch_row($result);
-                mysql_free_result($result);
-            // Find out how many days into the future we should bother checking
-                $result = mysql_query('SELECT TO_DAYS(max(starttime)) - TO_DAYS(NOW()) FROM program')
-                    or trigger_error('SQL Error: '.mysql_error(), FATAL);
-                list($max_days) = mysql_fetch_row($result);
-                mysql_free_result($result);
-            // Print out the list
-                for ($i=$min_days;$i<=$max_days;$i++) {
-                    $time = mktime(0,0,0, date('m'), date('d') + $i, date('Y'));
-                    $date = date("Ymd", $time);
-                    echo "<option value=\"$date\"";
-                    if ($date == date("Ymd", $list_starttime)) echo " selected";
-                    echo ">".strftime($_SESSION['date_listing_jump'] , $time)."</option>";
-                }
-                ?></select>
-                <img src="<?php echo skin_url ?>img/right.gif" onclick="MoveProgramListing(+1)"></td>
+                ?></select><input type=hidden name=date value="<?php echo date("Ymd", $list_starttime); ?>"></td>		
+            <td style="vertical-align:middle;" nowrap>
+                <iframe src="<?php echo root ?>tv/calendar?time=<?php echo $list_starttime; ?>" width=128 height=137 scrolling="no" frameborder=0></iframe>
+	    </td>
             <td align="center"><noscript><input type="submit" class="submit" value="<?php echo t('Jump') ?>"></noscript></td>
 
 
