Subversion-Projekte lars-tiefland.openvz_admin

Revision

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

Revision 82 Revision 83
Zeile 1... Zeile 1...
1
<?php
1
<?php
2
	//$Id: vServer.class.php 82 2008-02-16 22:30:56Z lars $
2
	//$Id: vServer.class.php 83 2008-02-16 22:33:04Z lars $
3
	class vServer
3
	class vServer
4
	{
4
	{
5
	 	protected $status;
5
	 	protected $status;
6
	 	protected $name;
6
	 	protected $name;
7
	 	protected $hn_id;
7
	 	protected $hn_id;
Zeile 41... Zeile 41...
41
				$this->status["status"]="";
41
				$this->status["status"]="";
42
				$this->status["code"]="0";
42
				$this->status["code"]="0";
43
			}
43
			}
44
		}
44
		}
Zeile 45... Zeile 45...
45
		
45
		
46
		function getStatus($hn_id)
46
		function getStatus($hn_id=1)
47
		{
47
		{
48
			if(!$this->status)
48
			if(!$this->status)
Zeile 49... Zeile 49...
49
			{
49
			{
Zeile 101... Zeile 101...
101
			$id=0;
101
			$id=0;
102
			while($row=$res->fetchRow())
102
			while($row=$res->fetchRow())
103
			{
103
			{
104
				$vservers[$row["id"]]=$row;
104
				$vservers[$row["id"]]=$row;
105
				$v=new vServer($row["v_id"], $row["hn_id"]);
105
				$v=new vServer($row["v_id"], $row["hn_id"]);
106
				$ret=$v->getStatus();
106
				$ret=$v->getStatus($hn_id);
107
				$dist=new Dist($row["v_dist"]);
107
				$dist=new Dist($row["v_dist"]);
108
				$dist_info=$dist->toArray();
108
				$dist_info=$dist->toArray();
109
				$vservers[$id]["v_dist_name"]=$dist_info["dist_name"];
109
				$vservers[$id]["v_dist_name"]=$dist_info["dist_name"];
110
				$vservers[$id]["v_status"]=$ret["status"];
110
				$vservers[$id]["v_status"]=$ret["status"];
111
				$vservers[$id]["code"]=$ret["code"];
111
				$vservers[$id]["code"]=$ret["code"];