Subversion-Projekte lars-tiefland.openvz_admin

Revision

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

Revision 21 Revision 24
Zeile 6... Zeile 6...
6
	 	protected $name;
6
	 	protected $name;
7
	 	protected $hn_id;
7
	 	protected $hn_id;
8
	 	protected $dist;
8
	 	protected $dist;
9
	 	protected $dist_id;
9
	 	protected $dist_id;
10
	 	protected $v_id;
10
	 	protected $v_id;
11
	 	function __construct($v_id=0, $hn_id=1)
11
	 	function __construct($v_id=NULL, $hn_id=1)
12
	 	{
12
	 	{
13
	 	 	global $db;
13
	 	 	global $db;
14
			if($v_id)
14
			if(is_numeric($v_id))
15
			{
15
			{
16
				$sql="SELECT * FROM vservers, distributions WHERE v_id=$v_id AND hn_id=$hn_id AND dist_id=v_dist";
16
				$sql="SELECT * FROM vservers, distributions WHERE v_id=$v_id AND hn_id=$hn_id AND dist_id=v_dist";
17
				$res=$db->query($sql);
17
				$res=$db->query($sql);
18
				if(!PEAR::isError($res))
18
				if(!PEAR::isError($res))
19
				{
19
				{
Zeile 36... Zeile 36...
36
				$this->v_id=0;
36
				$this->v_id=0;
37
				$this->dist_id=1;
37
				$this->dist_id=1;
38
				$this->dist="gentoo";
38
				$this->dist="gentoo";
39
				$this->hn_id=1;
39
				$this->hn_id=1;
40
				$this->name="";
40
				$this->name="";
41
				$this->status="running";
41
				$this->status["status"]="";
-
 
42
				$this->status["code"]="0";
42
			}
43
			}
43
		}
44
		}
Zeile 44... Zeile 45...
44
		
45
		
45
		function getStatus()
46
		function getStatus()