mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
- Löschen von Reservierungen im Tempus
- Bugfix beim löschen von Noten - Bugfix bei der Anzeige des Fachbereichkoordinators - Bilder von Mitarbeitern können jetzt übers FAS gelöscht werden
This commit is contained in:
@@ -159,5 +159,55 @@ class datum
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Liefert ein Datum im angegeben Format
|
||||
* ToDo: Liefert aktuellen Timestamp wenn Sonderzeichen uebergeben werden
|
||||
* zB '---'
|
||||
* @param $datum
|
||||
* @param $format
|
||||
* @return Formatierten Timestamp wenn ok, false im Fehlerfall
|
||||
*/
|
||||
function formatDatum($datum, $format='Y-m-d H:i:s')
|
||||
{
|
||||
if(trim($datum)=='')
|
||||
return '';
|
||||
|
||||
$ts='';
|
||||
|
||||
//2008-12-31
|
||||
if(ereg("([0-9]{4})-([0-9]{2})-([0-9]{2})",$datum, $regs))
|
||||
$ts = mktime(0,0,0,$regs[2],$regs[3],$regs[1]);
|
||||
|
||||
//2008-12-31 12:30
|
||||
if(ereg("([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2})",$datum, $regs))
|
||||
$ts = mktime($regs[4],$regs[5],0,$regs[2],$regs[3],$regs[1]);
|
||||
|
||||
//2008-12-31 12:30:15
|
||||
if(ereg("([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})",$datum, $regs))
|
||||
$ts = mktime($regs[4],$regs[5],$regs[6],$regs[2],$regs[3],$regs[1]);
|
||||
|
||||
//1.12.2008
|
||||
if(ereg("([0-9]{1,2}).([0-9]{1,2}).([0-9]{4})",$datum, $regs))
|
||||
$ts = mktime(0,0,0,$regs[2],$regs[1],$regs[3]);
|
||||
|
||||
//1.12.2008 12:30
|
||||
if(ereg("([0-9]{1,2}).([0-9]{1,2}).([0-9]{4}) ([0-9]{2}):([0-9]{2})",$datum, $regs))
|
||||
$ts = mktime($regs[4],$regs[5],0,$regs[2],$regs[1],$regs[3]);
|
||||
|
||||
//1.12.2008 12:30:15
|
||||
if(ereg("([0-9]{1,2}).([0-9]{1,2}).([0-9]{4}) ([0-9]{2}):([0-9]{2}):([0-9]{2})",$datum, $regs))
|
||||
$ts = mktime($regs[4],$regs[5],$regs[6],$regs[2],$regs[1],$regs[3]);
|
||||
|
||||
if($ts=='')
|
||||
{
|
||||
$ts = strtotime($datum);
|
||||
}
|
||||
|
||||
if($ts!='' && $ts>0)
|
||||
return date($format, $ts);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -403,8 +403,8 @@ class person
|
||||
' familienstand='.$this->addslashes($this->familienstand).','.
|
||||
' anzahlkinder='.$this->addslashes($this->anzahlkinder).','.
|
||||
' aktiv='.($this->aktiv?'true':'false').','.
|
||||
' insertamum=now(),'.
|
||||
' insertvon='.$this->addslashes($this->insertvon).','.
|
||||
//' insertamum='.$this->addslashes($this->insertamum).','.
|
||||
//' insertvon='.$this->addslashes($this->insertvon).','.
|
||||
' updateamum=now(),'.
|
||||
' updatevon='.$this->addslashes($this->updatevon).','.
|
||||
' geschlecht='.$this->addslashes($this->geschlecht).','.
|
||||
|
||||
@@ -212,5 +212,29 @@ class reservierung
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************
|
||||
// * Loescht eine Reservierung
|
||||
// * @param reservierung_id ID der zu leoschenden Reservierung
|
||||
// * @return true wenn ok, false im Fehlerfall
|
||||
// ************************************************************
|
||||
function delete($reservierung_id)
|
||||
{
|
||||
if(!is_numeric($reservierung_id))
|
||||
{
|
||||
$this->errormsg = 'Reservierung_id muss eine gueltige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
|
||||
$qry = "DELETE FROM campus.tbl_reservierung WHERE reservierung_id='$reservierung_id'";
|
||||
|
||||
if(pg_query($this->conn, $qry))
|
||||
return true;
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Loeschen der Reservierung';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -292,8 +292,8 @@ class wochenplan
|
||||
$mtag=substr($this->wochenplan->lehrstunden[$i]->datum, 8,2);
|
||||
$month=substr($this->wochenplan->lehrstunden[$i]->datum, 5,2);
|
||||
$jahr=substr($this->wochenplan->lehrstunden[$i]->datum, 0,4);
|
||||
$tag=date("w",mktime(12,0,0,$month,$mtag,$jahr));
|
||||
if ($tag==0)
|
||||
$tag=date("w",mktime(12,0,0,$month,$mtag,$jahr));
|
||||
if ($tag==0)
|
||||
$tag=7; //Sonntag
|
||||
//echo $tag.':'.$this->wochenplan->lehrstunden[$i]->datum.'<BR>';
|
||||
$stunde=$this->wochenplan->lehrstunden[$i]->stunde;
|
||||
@@ -924,7 +924,7 @@ class wochenplan
|
||||
echo '<button id="buttonSTPL'.$count++.'"
|
||||
tooltiptext="'.$titel.' - '.$anmerkung.' ('.$updatevonam.')"
|
||||
style="border-width:1px;'.((isset($farbe) && $farbe!='')?'background-color:#'.$farbe:'').';"
|
||||
styleOrig="border-width:1px;background-color:#'.$farbe.';" ';
|
||||
styleOrig="border-width:1px;'.((isset($farbe) && $farbe!='')?'background-color:#'.$farbe:'').'" ';
|
||||
if ($berechtigung->isBerechtigt('lv-plan',$stg_kz,'uid') || $berechtigung->isBerechtigt('lv-plan',0,'uid') || $berechtigung->isBerechtigt('admin',0,'uid') || $berechtigung->isBerechtigt('admin',$stg_kz,'uid'))
|
||||
echo ' context="stplPopupMenue" ';
|
||||
if ($berechtigung->isBerechtigt('lv-plan',$stg_kz,'u') || $berechtigung->isBerechtigt('lv-plan',0,'u') || $berechtigung->isBerechtigt('admin',0,'u') || $berechtigung->isBerechtigt('admin',$stg_kz,'u'))
|
||||
|
||||
Reference in New Issue
Block a user