Subversion-Projekte lars-tiefland.openvz_admin

Revision

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

Revision 31 Revision 33
Zeile 12... Zeile 12...
12
		protected $dist_name;
12
		protected $dist_name;
13
		protected $id;
13
		protected $id;
14
		protected $template;
14
		protected $template;
15
		function __construct($dist=NULL)
15
		function __construct($dist=NULL)
16
		{
16
		{
-
 
17
			global $db;
17
			if(!is_null($ip))
18
			if(!is_null($dist))
18
			{
19
			{
19
				$sql="SELECT * FROM dists WHERE id=$dist";
20
				$sql="SELECT * FROM distributions WHERE id=$dist";
20
				$res=$db->query($sql);
21
				$res=$db->query($sql);
21
				$row=$res->fetchRow();
22
				$row=$res->fetchRow();
22
				$this->id=$row["dist_id"];
23
				$this->id=$row["dist_id"];
23
				$this->dist_name=$row["dist_name"];
24
				$this->dist_name=$row["dist_name"];
24
				$this->template=$row["template_name"];
25
				$this->template=$row["template_name"];
Zeile 38... Zeile 39...
38
		}
39
		}
Zeile 39... Zeile 40...
39
 
40
 
40
		static function getDists()		
41
		static function getDists()		
41
		{
42
		{
42
			global $db;
43
			global $db;
43
			$sql="SELECT dist_id, dist_name FROM dists";
44
			$sql="SELECT dist_id, dist_name FROM distributions";
44
			$res=$db->query($sql);
45
			$res=$db->query($sql);
45
			while($row=$res->fetchRow())
46
			while($row=$res->fetchRow())
46
			{
47
			{
47
				$out[$row["dist_id"]]=$row["dist_name"];
48
				$out[$row["dist_id"]]=$row["dist_name"];