Subversion-Projekte lars-tiefland.inventar

Revision

Revision 10 | Revision 22 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 10 Revision 20
Zeile 32... Zeile 32...
32
				$this->value='';
32
				$this->value='';
33
				$this->hardware_id=0;
33
				$this->hardware_id=0;
34
				$this->comp_id=0;
34
				$this->comp_id=0;
35
			}
35
			}
36
		}
36
		}
-
 
37
		
-
 
38
		function toArray()
-
 
39
		{
-
 
40
			$ret["id"]=$this->id;
-
 
41
			$ret["comp_id"]=$this->comp_id;
-
 
42
			$ret["hw_id"]=$this->hardware_id;
-
 
43
			$hw=new hardware($this->hardware_id);
-
 
44
			$ret["hw_name"]=$hw->getName();
-
 
45
			$ret["value"]=$this->value;
-
 
46
			return $ret;
-
 
47
		}
-
 
48
		
-
 
49
		static function getHardware($c_id=0)
-
 
50
		{
-
 
51
			$query="SELECT * FROM computer_hardware WHERE comp_id=$c_id";
-
 
52
			$res=$GLOBALS["db"]->query($query);
-
 
53
			while($row=$res->fetchRow())
-
 
54
			{
-
 
55
				$ret[]=$row;
-
 
56
			}
-
 
57
			return $ret;
-
 
58
		}
37
	}
59
	}
Zeile 38... Zeile 60...
38
 
60
 
39
?>
61
?>