diff --git a/include/firma.class.php b/include/firma.class.php index 5e60cadb1..4b400c8d9 100644 --- a/include/firma.class.php +++ b/include/firma.class.php @@ -34,6 +34,10 @@ class firma //Tabellenspalten var $firma_id; // @var integer var $name; // @var string + var $adresse; // @var string + var $email; // @var string + var $telefon; // @var string + var $fax; // @var string var $anmerkung; // @var string var $ext_id; // @var integer var $insertamum; // @var timestamp @@ -196,10 +200,14 @@ class firma $qry='UPDATE public.tbl_firma SET '. 'firma_id='.$this->addslashes($this->firma_id).', '. 'name='.$this->addslashes($this->name).', '. + 'adresse='.$this->addslashes($this->adresse).', '. + 'email='.$this->addslashes($this->email).', '. + 'telefon='.$this->addslashes($this->telefon).', '. + 'fax='.$this->addslashes($this->fax).', '. 'anmerkung='.$this->addslashes($this->anmerkung).', '. - 'updateamum= now(), '. - 'updatevon='.$this->addslashes($this->updatevon).' '. - 'firmentyp='.$this->addslashes($this->firmentyp_kurzbz).' '. + 'updateamum= now(), '. + 'updatevon='.$this->addslashes($this->updatevon).', '. + 'firmentyp_kurzbz='.$this->addslashes($this->firmentyp_kurzbz).' '. 'WHERE firma_id='.$this->addslashes($this->firma_id).';'; } //echo $qry; @@ -213,7 +221,7 @@ class firma { if($row = pg_fetch_object($result)) { - $this->firma_id = $row->firma_id; + $this->firma_id = $row->id; pg_query($this->conn, 'COMMIT'); return true; } diff --git a/include/projektarbeit.class.php b/include/projektarbeit.class.php index 0609b2151..01547081d 100644 --- a/include/projektarbeit.class.php +++ b/include/projektarbeit.class.php @@ -132,7 +132,7 @@ class projektarbeit $this->errormsg = 'Note muß ein numerischer Wert sein - student_uid: '.$this->student_uid; return false; } - if(!is_numeric($this->Punkte)) + if(!is_numeric($this->punkte)) { $this->errormsg = 'Punkte muß ein numerischer Wert sein - student_uid: '.$this->student_uid; return false; @@ -187,8 +187,9 @@ class projektarbeit { //Neuen Datensatz einfuegen - $qry='INSERT INTO lehre.tbl_projektarbeit (projekttyp_kurzbz, titel, lehreinheit_id, student_uid,firma_id, note. punkte, beginn, ende, faktor, - freigegeben, gesperrtbis, themenbereich, anmerkung, ext_id, insertamum, insertvon, updateamum, updatevon) VALUES('. + $qry='INSERT INTO lehre.tbl_projektarbeit (projekttyp_kurzbz, titel, lehreinheit_id, student_uid, firma_id, note, punkte, + beginn, ende, faktor, freigegeben, gesperrtbis, stundensatz, gesamtstunden, themenbereich, anmerkung, + ext_id, insertamum, insertvon, updateamum, updatevon) VALUES('. $this->addslashes($this->projekttyp_kurzbz).', '. $this->addslashes($this->titel).', '. $this->addslashes($this->lehreinheit_id).', '. @@ -199,7 +200,7 @@ class projektarbeit $this->addslashes($this->beginn).', '. $this->addslashes($this->ende).', '. $this->addslashes($this->faktor).', '. - ($this->freigegeben?'true':'false').','. + ($this->freigegeben?'true':'false').', '. $this->addslashes($this->gesperrtbis).', '. $this->addslashes($this->stundensatz).', '. $this->addslashes($this->gesamtstunden).', '. @@ -231,7 +232,7 @@ class projektarbeit 'beginn='.$this->addslashes($this->beginn).', '. 'ende='.$this->addslashes($this->ende).', '. 'faktor='.$this->addslashes($this->faktor).', '. - 'freigegeben='.($this->freigegeben?'true':'false').','. + 'freigegeben='.($this->freigegeben?'true':'false').', '. 'gesperrtbis='.$this->addslashes($this->gesperrtbis).', '. 'stundensatz='.$this->addslashes($this->stundensatz).', '. 'gesamtstunden='.$this->addslashes($this->gesamtstunden).', '. @@ -239,7 +240,7 @@ class projektarbeit 'anmerkung='.$this->addslashes($this->anmerkung).', '. 'updateamum= now(), '. 'updatevon='.$this->addslashes($this->updatevon).' '. - 'firmentyp='.$this->addslashes($this->firmentyp_kurzbz).' '. + //'firmentyp='.$this->addslashes($this->firmentyp_kurzbz).' '. 'WHERE projektarbeit_id='.$this->addslashes($this->projektarbeit_id).';'; } //echo $qry;