PhpRiot
Follow phpriot on Twitter
Sponsored Link

Listing 2729

Submitted by ., 10 March 2010
<?php
    include("php/Variablen.inc.php");
 
    if (isset($_GET['woche'])) {
        $strWocheParameter = $_GET['woche'];
    }
    else {
        if(strlen(date("W")) == 1){
            $strWocheParameter = date("Y") ."0".date("W");
        }
        else{
            $strWocheParameter = date("Y") .date("W");
        }
    }
 
    if (isset($_GET['MANDANTID'])) {
        $intMandantID = $_GET['MANDANTID'];
    }
 
    $strSQLStmt  = "SELECT PARAM1 FROM system_konfigurationstabellen ";
    $strSQLStmt .= "WHERE MANDANTID=".(string)$intMandantID." AND TABID='APP' ";
    $strSQLStmt .= "AND SPRACHCODE='$strSprachcode' AND TABWERT='SPEISEPLAN'";
    $rs = $dbConn->Execute($strSQLStmt);
    $strVerzeichnis = $rs->fields['PARAM1'];
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Speiseplan</title>
<link rel="stylesheet" href="../Include/css/intranet.css" type="text/css">
</head>
 
<body topmargin="1" leftmargin="4">
<form name="speiseplan" action="speiseplan.php" method="get">
    <table border="0" width="100%">
        <tr>
            <!--<td rowspan="2" width="122"><img border="0" src="speiseplan_190_gedeck.gif" align="absmiddle"></td>-->
            <td width="150" valign="middle" >
                <h1>Speiseplan f&uuml;r ...</h1>
                
            </td>
            <td valign="middle">
                <input type="hidden" name="MANDANTID" value="<?php echo (string)$intMandantID; ?>">
                <select name="woche" onChange="speiseplan.submit()">
<?php
    for ($i=0; $i<=1; $i++) {
        $dtmTag = date("d");
        $dtmMonat = date("m");
        $dtmJahr = date("Y");
        $dtmMontag = date("d") - date("w",  mktime(0,0,0, $dtmMonat, $dtmTag ,$dtmJahr)) + 1;
        $Montage = intval($dtmMontag)+$i*7;
        $dtmVonDatum = $dtmJahr . "-" . $dtmMonat . "-" . $Montage;
        $strWocheAuswahl = date("Y") . date("W", strtotime($dtmVonDatum));
        
        if(strlen(date("W", strtotime($dtmVonDatum))) == 1){
            $strWocheAuswahl = date("Y") . "0".date("W", strtotime($dtmVonDatum));
        }
        echo "<option value=\"" . $strWocheAuswahl . "\"";
        
            if ($strWocheParameter == $strWocheAuswahl) {
                echo " selected";
            }
        echo ">KW " . date("W", strtotime($dtmVonDatum)) . "</option>";
    }
?>
                </select>
            </td>
            <td>
                Wenn Sie außer Haus sind, bitte Menü II abbestellen! --&gt; Tel. 244
                        </td>
        </tr>
<?php
    zurueckLink ($strSprachcode);
?>
    </table>
<?php
//echo ("$strVerzeichnis/SP_$strWocheParameter.html");
    if (file_exists("$strVerzeichnis/SP_$strWocheParameter.html")) {
        echo "<iframe src=\"$strVerzeichnis\SP_$strWocheParameter.html\" width=\"100%\" height=\"92%\">PDF kann nicht angezeigt werden</iframe>\n";
    }
    else {
        echo "<p>Speiseplan für diese Woche nicht gefunden!</p>\n";
    }
?>
</form>
 
</body>
</html>
<?php
    dbClose($dbConn);
?>
Submit a Follow Up