Subversion-Projekte lars-tiefland.openvz_admin

Revision

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

Revision 61 Revision 90
Zeile 1... Zeile 1...
1
<?php
1
<?php
2
	//$Id: ip.class.php 61 2007-10-03 14:30:16Z lars $
2
	//$Id: ip.class.php 90 2008-02-16 23:20:03Z lars $
3
/**
3
/**
4
 * @author Lars Tiefland
4
 * @author Lars Tiefland
5
 * @copyright 2007
5
 * @copyright 2007
Zeile 6... Zeile 6...
6
 
6
 
Zeile 55... Zeile 55...
55
		}
55
		}
Zeile 56... Zeile 56...
56
		
56
		
57
		static function getIPs($used=0, $dns=0, $gw=0)		
57
		static function getIPs($used=0, $dns=0, $gw=0)		
58
		{
58
		{
59
			global $db;
59
			global $db;
60
			$sql="SELECT id, ip FROM ips WHERE used=$used AND dns=$dns AND gw=$gw";
60
			$sql="SELECT id, ip FROM ips WHERE dns=$dns AND gw=$gw";
61
			$res=$db->query($sql);
61
			$res=$db->query($sql);
62
			$out[-1]="Bitte w&auml;hlen!";
62
			$out[-1]="Bitte w&auml;hlen!";
63
			while($row=$res->fetchRow())
63
			while($row=$res->fetchRow())
-
 
64
			{
-
 
65
				if(!$used)
-
 
66
				{
-
 
67
					$sql2="SELECT * FROM host_2_ip WHERE ip=".$row["ip"];
-
 
68
					$res2=$db->query($sql2);
-
 
69
					if(!$res2->numRows())
64
			{
70
					{
-
 
71
						$out[$row["id"]]=$row["ip"];
-
 
72
					}
65
				$out[$row["id"]]=$row["ip"];
73
				}
66
			}
74
			}
67
			return $out;
75
			return $out;
68
		}
76
		}
69
	}
77
	}
70
?>
78
?>