summaryrefslogtreecommitdiffstats
path: root/ldap-site-mngmt/webinterface/computers/ip_rechner.php
diff options
context:
space:
mode:
authorTarik Gasmi2007-09-27 16:40:23 +0200
committerTarik Gasmi2007-09-27 16:40:23 +0200
commitecc473303fbee5f5466d2477157b5fd682357003 (patch)
tree2776e2d1d44543e60e15fba30d98d630a551c59c /ldap-site-mngmt/webinterface/computers/ip_rechner.php
parentAdded text to PXE image "please select" and "use arrow keys". Dirks idea. (diff)
downloadcore-ecc473303fbee5f5466d2477157b5fd682357003.tar.gz
core-ecc473303fbee5f5466d2477157b5fd682357003.tar.xz
core-ecc473303fbee5f5466d2477157b5fd682357003.zip
Reorganized LSM Webinterface
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1353 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'ldap-site-mngmt/webinterface/computers/ip_rechner.php')
-rw-r--r--ldap-site-mngmt/webinterface/computers/ip_rechner.php69
1 files changed, 69 insertions, 0 deletions
diff --git a/ldap-site-mngmt/webinterface/computers/ip_rechner.php b/ldap-site-mngmt/webinterface/computers/ip_rechner.php
new file mode 100644
index 00000000..5870f503
--- /dev/null
+++ b/ldap-site-mngmt/webinterface/computers/ip_rechner.php
@@ -0,0 +1,69 @@
+<?php
+
+include('../standard_header.inc.php');
+
+# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+$webseite = "ip_rechner.dwt";
+
+include('computers_header.inc.php');
+
+#############################################################################
+
+$mnr = 2;
+$sbmnr = -1;
+$mcnr = -1;
+
+# Menuleiste erstellen
+createMainMenu($rollen, $mainnr);
+createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr);
+
+#############################################################################
+
+$template->assign(array("IP" => "",
+ "OLDIP" => "",
+ "DHCPCONT" => "",
+ "FIXADD" => "",
+ "HOSTNAME" => "Noch keine Rechner angelegt",
+ "HOSTDN" => ""));
+
+$host_array = get_hosts($auDN,array("dn","hostname","ipaddress","dhcphlpcont","dhcpoptfixed-address"));
+# print_r ($host_array);
+
+$template->define_dynamic("Hosts", "Webseite");
+
+foreach ($host_array as $host){
+ $hostip = explode('_',$host['ipaddress']);
+
+ $dhcpcont = "";
+ $fixadd = "";
+ if ( count($host['dhcphlpcont']) != 0 ){ #&& $host['ipaddress'] == "" ){
+ $dhcpcont = " dynamisch";
+ #$fixadd = $host['dhcpoptfixed-address'];
+ #}elseif( count($host['dhcphlpcont']) != 0 && $host['ipaddress'] != "" ){
+ if ( $host['dhcpoptfixed-address'] == "ip") {
+ $dhcpcont = " fix";
+ #$fixadd = $host['dhcpoptfixed-address'];
+ }
+ if ( $host['dhcpoptfixed-address'] == "hostname") {
+ $dhcpcont = " fix (&uuml;ber DNS Name)";
+ #$fixadd = $host['dhcpoptfixed-address'];
+ }
+ $fixadd = $host['dhcpoptfixed-address'];
+ }
+
+ $template->assign(array("IP" => $hostip[0],
+ "OLDIP" => $hostip[0],
+ "DHCPCONT" => $dhcpcont,
+ "FIXADD" => $fixadd,
+ "HOSTNAME" => $host['hostname'],
+ "HOSTDN" => $host['dn'],
+ "AUDN" => $auDN ));
+ $template->parse("HOSTS_LIST", ".Hosts");
+}
+
+
+#####################################################################################
+
+include("computers_footer.inc.php");
+
+?>