- Anpassungen für Mehrsprachige Tage

This commit is contained in:
Andreas Österreicher
2011-08-12 08:53:22 +00:00
parent 191e6a4f20
commit 3570b31dba
5 changed files with 36 additions and 38 deletions
+3 -3
View File
@@ -118,9 +118,9 @@ echo '"Datum"'.$trenn;
for ($ts=$ts_beginn;$ts<$ts_ende; $ts+=$datum_obj->ts_day)
{
$tag=date('d',$ts);
$wt=date('w',$ts);
$wt=date('N',$ts);
$monat=date('M',$ts);
echo '"'.$tagbez[$wt].' '.$tag.'.'.$monat.'"'.$trenn;
echo '"'.$tagbez[1][$wt].' '.$tag.'.'.$monat.'"'.$trenn;
}
$zs=new zeitsperre();
foreach ($mitarbeiter as $ma)
@@ -131,7 +131,7 @@ foreach ($mitarbeiter as $ma)
{
$tag=date('d',$ts);
$monat=date('M',$ts);
$wt=date('w',$ts);
$wt=date('N',$ts);
$grund=$zs->getTyp($ts);
$erbk=$zs->getErreichbarkeit($ts);
echo '"'.$grund.' - '.$erbk.'"'.$trenn;
+1 -1
View File
@@ -174,7 +174,7 @@ if(!$person->load($uid))
for ($j=1; $j<7; $j++)
{
echo '<TR><TD>'.$tagbez[$j].'</TD>';
echo '<TR><TD>'.$tagbez[1][$j].'</TD>';
for ($i=0;$i<$num_rows_stunde;$i++)
{
if (isset($wunsch[$j][$i+1]))
+2 -2
View File
@@ -97,7 +97,7 @@ Anzahl der Lektoren: <?PHP echo $anz_lektoren; ?>
<?php
for ($j=1; $j<7; $j++)
{
echo '<TR><TD>'.$tagbez[$j].'</TD>';
echo '<TR><TD>'.$tagbez[1][$j].'</TD>';
for ($i=0;$i<$num_rows_stunde;$i++)
{
$pos=$wunsch[$j][$i+1][4]+$wunsch[$j][$i+1][5];
@@ -134,7 +134,7 @@ Details
<?php
for ($j=1; $j<7; $j++)
{
echo '<TR><TD>'.$tagbez[$j].'</TD>';
echo '<TR><TD>'.$tagbez[1][$j].'</TD>';
for ($i=0;$i<$num_rows_stunde;$i++)
{
echo '<TD>';
+29 -31
View File
@@ -20,36 +20,34 @@
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
*/
/**
* kopiert von stdplan/profile/zeitwuensche.php mit dem Unterschied,
* dass der User hier parametrisiert ist + Speichern läuft hier über
* POST statt GET - ist aber Geschmacksache
*
*/
require_once('../../config/vilesci.config.inc.php');
require_once('../../include/basis_db.class.php');
if (!$db = new basis_db())
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
/**
* kopiert von stdplan/profile/zeitwuensche.php mit dem Unterschied,
* dass der User hier parametrisiert ist + Speichern läuft hier über
* POST statt GET - ist aber Geschmacksache
*
*/
require_once('../../config/vilesci.config.inc.php');
require_once('../../include/basis_db.class.php');
include('../../include/functions.inc.php');
include('../../include/globals.inc.php');
include('../../include/functions.inc.php');
include('../../include/globals.inc.php');
if (!$db = new basis_db())
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
if (isset($_GET['uid']))
{
$uid=$_GET['uid'];
}
else if (isset($_POST['uid']))
{
$uid=$_POST['uid'];
}
if (!isset($uid))
{
die( "uid nicht gesetzt");
}
if (isset($_GET['uid']))
{
$uid=$_GET['uid'];
}
else if (isset($_POST['uid']))
{
$uid=$_POST['uid'];
}
if (!isset($uid))
{
die( "uid nicht gesetzt");
}
//Stundentabelleholen
@@ -67,19 +65,19 @@
//echo $$var;
$gewicht=$_POST[$var];
$stunde=$i+1;
$query="SELECT * FROM campus.tbl_zeitwunsch WHERE mitarbeiter_uid='$uid' AND stunde=$stunde AND tag=$t";
$query="SELECT * FROM campus.tbl_zeitwunsch WHERE mitarbeiter_uid='".addslashes($uid)."' AND stunde='$stunde' AND tag='$t'";
if(! $erg_wunsch=$db->db_query($query))
die($db->db_last_error());
$num_rows_wunsch=$db->db_num_rows($erg_wunsch);
if ($num_rows_wunsch==0)
{
$query="INSERT INTO campus.tbl_zeitwunsch (mitarbeiter_uid, stunde, tag, gewicht) VALUES ('$uid', $stunde, $t, $gewicht)";
$query="INSERT INTO campus.tbl_zeitwunsch (mitarbeiter_uid, stunde, tag, gewicht) VALUES ('$uid', '$stunde', '$t', '$gewicht')";
if(!($erg=$db->db_query($query)))
die($db->db_last_error());
}
elseif ($num_rows_wunsch==1)
{
$query="UPDATE campus.tbl_zeitwunsch SET gewicht=$gewicht WHERE mitarbeiter_uid='$uid' AND stunde=$stunde AND tag=$t";
$query="UPDATE campus.tbl_zeitwunsch SET gewicht=$gewicht WHERE mitarbeiter_uid='$uid' AND stunde='$stunde' AND tag='$t'";
//echo $query;
if(!($erg=$db->db_query($query)))
die($db->db_last_error());
@@ -149,7 +147,7 @@
<?php
for ($j=1; $j<7; $j++)
{
echo '<TR><TD>'.$tagbez[$j].'</TD>';
echo '<TR><TD>'.$tagbez[1][$j].'</TD>';
for ($i=0;$i<$num_rows_stunde;$i++)
{
$index=$wunsch[$j][$i+1];
+1 -1
View File
@@ -294,7 +294,7 @@ if(isset($_GET['type']) && ($_GET['type']=='edit' || $_GET['type']=='new'))
<SELECT name="wochentag" id="wochentag">
<OPTION value="">-- keine Auswahl --</OPTION>';
foreach($tagbez as $key=>$day)
foreach($tagbez[1] as $key=>$day)
{
if($key==$cj->wochentag && $cj->wochentag!='')
$selected='selected="selected"';