Ignore:
Timestamp:
04/21/13 02:01:57 (12 years ago)
Author:
Daniela Dorner
Message:
moved date menu to include file
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/dch/scheduling.php

    r15316 r15403  
    88<?php
    99
    10 if (!empty($_GET["date"]))
    11 {
    12     $date=date("Y-m-d", strtotime($_GET["date"]));
    13     $date2=date("Ymd", strtotime($_GET["date"]));
    14     //$path="../scheduling/".date("Y/m/d", strtotime($_GET["date"]));
    15 }
    16 else
    17 {
    18     $date=date("Y-m-d");
    19     $date2=date("Ymd");
    20     //$path="../scheduling/".date("Y/m/d");
    21 }
     10include ("dates.php");
    2211
     12echo "<body>\n";
     13echo "<form name='formular' action='scheduling.php' METHOD='GET'>\n";
     14echo "scheduling plots for ";
     15
     16$date=GetDates($_GET["date"], "scheduling");
     17$date2=date("Ymd", strtotime($date));
    2318$path="../scheduling/".date("Y/m/d", strtotime($date));
    2419
    25 $plusoneday=date("Y-m-d", strtotime($date." +1 day"));
    26 $minusoneday=date("Y-m-d", strtotime($date." -1 day"));
    27 $plusoneweek=date("Y-m-d", strtotime($date." +1 week"));
    28 $minusoneweek=date("Y-m-d", strtotime($date." -1 week"));
    29 $plustwoweeks=date("Y-m-d", strtotime($date." +2 week"));
    30 $minustwoweeks=date("Y-m-d", strtotime($date." -2 week"));
    31 $plusonemonth=date("Y-m-d", strtotime($date." +1 month"));
    32 $minusonemonth=date("Y-m-d", strtotime($date." -1 month"));
    33 $plusoneyear=date("Y-m-d", strtotime($date." +1 year"));
    34 $minusoneyear=date("Y-m-d", strtotime($date." -1 year"));
    35 $today=date("Y-m-d",mktime(0,0,0,date("m"), date("d"), date("Y")));
     20echo "</form>\n";
    3621
    37 
    38 
    39 echo "<body>";
    40 echo "<form action='scheduling.php' METHOD='GET'>\n";
    41 echo "scheduling plots for ";
    42 printf("<input name='date' type='text' size='10' maxlength='10' value='%s'>\n", $date);
    43 echo "<input type='submit' value='Show'>\n";
    44 printf("<input type='button' value='Today' onClick='self.location.href=\"scheduling.php?date=%s\"'>\n", $today);
    45 printf("<input type='button' value='+1Day' onClick='self.location.href=\"scheduling.php?date=%s\"'>\n", $plusoneday);
    46 printf("<input type='button' value='-1Day' onClick='self.location.href=\"scheduling.php?date=%s\"'>\n", $minusoneday);
    47 printf("<input type='button' value='+1Week' onClick='self.location.href=\"scheduling.php?date=%s\"'>\n", $plusoneweek);
    48 printf("<input type='button' value='-1Week' onClick='self.location.href=\"scheduling.php?date=%s\"'>\n", $minusoneweek);
    49 printf("<input type='button' value='+2Weeks' onClick='self.location.href=\"scheduling.php?date=%s\"'>\n", $plustwoweeks);
    50 printf("<input type='button' value='-2Weeks' onClick='self.location.href=\"scheduling.php?date=%s\"'>\n", $minustwoweeks);
    51 printf("<input type='button' value='+1Month' onClick='self.location.href=\"scheduling.php?date=%s\"'>\n", $plusonemonth);
    52 printf("<input type='button' value='-1Month' onClick='self.location.href=\"scheduling.php?date=%s\"'>\n", $minusonemonth);
    53 printf("<input type='button' value='+1Year' onClick='self.location.href=\"scheduling.php?date=%s\"'>\n", $plusoneyear);
    54 printf("<input type='button' value='-1Year' onClick='self.location.href=\"scheduling.php?date=%s\"'>\n", $minusoneyear);
    55 echo "</form>";
    5622if (is_dir($path))
    5723{
    58     printf("<a href='%s'>more files</a>",$path);
    59     echo "<table>";
    60     echo "<tr>";
     24    printf("<a href='%s'>more files</a>\n",$path);
     25    echo "<table>\n";
     26    echo "<tr>\n";
    6127    //printf("<td><img src='%s/visibility%s.png' alt='visibility'></td>", $path, $date);
    6228    //printf("<td valign='top'><img src='%s/legend%s.png' alt='legend'></td>", $path, $date);
    63     printf("<td><img src='%s/%s-ZenithDistance.png' alt='visibility'></td>", $path, $date2);
    64     printf("<td valign='top'><img src='%s/%s-Legend.png' alt='legend'></td>", $path, $date2);
    65     echo "</tr>";
    66     echo "<tr>";
     29    printf("<td><img src='%s/%s-ZenithDistance.png' alt='visibility'></td>\n", $path, $date2);
     30    printf("<td valign='top'><img src='%s/%s-Legend.png' alt='legend'></td>\n", $path, $date2);
     31    echo "</tr>\n";
     32    echo "<tr>\n";
    6733    //printf("<td><img src='%s/currents%s.png' alt='currents'></td>", $path, $date);
    6834    //printf("<td valign='top'><img src='%s/legend%s.png' alt='legend'></td>", $path, $date);
    69     printf("<td><img src='%s/%s-PredictedCurrent.png' alt='currents'></td>", $path, $date2);
    70     printf("<td valign='top'><img src='%s/%s-Legend.png' alt='legend'></td>", $path, $date2);
    71     echo "<tr>";
    72     printf("<td><img src='%s/%s-MoonDist.png' alt='moondist'></td>", $path, $date2);
    73     printf("<td valign='top'><img src='%s/%s-Legend.png' alt='legend'></td>", $path, $date2);
    74     echo "</tr>";
    75     echo "<tr>";
    76     printf("<td><img src='%s/%s-RelativeThreshold.png' alt='threshold'></td>", $path, $date2);
    77     printf("<td valign='top'><img src='%s/%s-Legend.png' alt='legend'></td>", $path, $date2);
    78     echo "</tr>";
    79     echo "</table>";
     35    printf("<td><img src='%s/%s-PredictedCurrent.png' alt='currents'></td>\n", $path, $date2);
     36    printf("<td valign='top'><img src='%s/%s-Legend.png' alt='legend'></td>\n", $path, $date2);
     37    echo "</tr>\n";
     38    echo "<tr>\n";
     39    printf("<td><img src='%s/%s-MoonDist.png' alt='moondist'></td>\n", $path, $date2);
     40    printf("<td valign='top'><img src='%s/%s-Legend.png' alt='legend'></td>\n", $path, $date2);
     41    echo "</tr>\n";
     42    echo "<tr>\n";
     43    printf("<td><img src='%s/%s-RelativeThreshold.png' alt='threshold'></td>\n", $path, $date2);
     44    printf("<td valign='top'><img src='%s/%s-Legend.png' alt='legend'></td>\n", $path, $date2);
     45    echo "</tr>\n";
     46    echo "</table>\n";
    8047}
    8148else
     
    8350
    8451
    85 echo "</body>";
    86 echo "</html>";
     52echo "</body>\n";
     53echo "</html>\n";
    8754?>
Note: See TracChangeset for help on using the changeset viewer.