maelzerdata concepts in web
Erfahren Sie mehr über ...
PHP, MVC, TOMMPS, den Ludwigsfelder Frettich und die CartoffelRowders
public function getValue($sql){ // Funktion liefert genau einen Wert 1D $glob = new Globals; $connect = mysql_connect ($this->dbHost, $this->dbUser, $this->dbPass); $result = @mysql_db_query ($this->dbBase, $sql, $connect); $record = mysql_fetch_object($result); $query = mysql_query($sql) or die(mysql_error()); $counted = mysql_num_rows($query); $this->header[0] = mysql_field_name($query, 0); for($i = 0; $i < $counted; $i++) { $array[$i] = mysql_result($result, $i, 0); } return $array[0]; }
function getHoliday($year, $month, $day){ // Berechnung Brandenburg mit Refotag $tage = 60 * 60 * 24; $karfreitag = @date("Y-m-d", easter_date($year) - 2 * $tage); $ostersonntag = @date("Y-m-d", easter_date($year) * $tage); $ostermontag = @date("Y-m-d", easter_date($year) + 1 * $tage); $himmelfahrt = @date("Y-m-d", easter_date($year) + 39 * $tage); $pfingstmontag = @date("Y-m-d", easter_date($year) + 50 * $tage); if("".$month."-".$day."" == "01-01"){ return "Neujahr"; } else if("".$month."-".$day."" == "05-01"){ return "1. Mai"; } else if("".$month."-".$day."" == "10-03"){ return "Tag der Wiedervereinigung"; } else if("".$month."-".$day."" == "12-25"){ return "1. Weihnachtsfeiertag"; } else if("".$month."-".$day."" == "12-26"){ return "2. Weihnachtsfeiertag"; } else if("".$month."-".$day."" == "10-30"){ return "Reformationstag"; } else if("".$year."-".$month."-".$day."" == $karfreitag){ return "Karfreitag"; } else if("".$year."-".$month."-".$day."" == $ostersonntag){ return "Ostersonntag"; } else if("".$year."-".$month."-".$day."" == $ostermontag){ return "Ostermontag"; } else if("".$year."-".$month."-".$day."" == $himmelfahrt){ return "Christi Himmelfahrt"; } else if("".$year."-".$month."-".$day."" == $pfingstmontag){ return "Pfingstmontag"; } else{ return ""; } }