Subversion-Projekte lars-tiefland.inventar

Revision

Revision 20 | Zur aktuellen Revision | Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
10 lars 1
<?php
2
 
3
	//$Id: hardware.class.php 6 2008-05-10 16:29:22Z lars $
4
 
5
	/**
6
	 * @package	Inventar Datenbank
7
	 * @author Lars Tiefland <ltiefland@gmail.com>
8
	 * @copyright 2008
9
	 **/
10
 
11
	class computer_hardware
12
	{
13
		private $id;
14
		private $comp_id;
15
		private $hardware_id;
16
		private $value;
17
 
18
		function __construct($id=0)
19
		{
20
			if($id)
21
			{
22
				$res=$GLOBALS["db"]->query("SELECT * FROM computer_hardware WHERE id=$id");
23
				$this->id=$id;
24
				$row=$res->fetchRow();
25
				$this->comp_id=$row["comp_id"];
26
				$this->hardware_id=$row["hardware_id"];
27
				$this->value=$row["value"];
28
			}
29
			else
30
			{
31
				$this->id=0;
32
				$this->value='';
33
				$this->hardware_id=0;
34
				$this->comp_id=0;
35
			}
36
		}
37
	}
38
 
39
?>