From b9d2bd338f68aace2eb9e999896a787014ac7e46 Mon Sep 17 00:00:00 2001
From: Tarik Gasmi
Date: Thu, 7 Jun 2007 17:49:06 +0000
Subject: Aktuelle Version LDAP-Site-Mngmt Webinterface
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1156 95ad53e4-c205-0410-b2fa-d234c58c8868
---
ldap-site-mngmt/webinterface/computers/rbshost.php | 248 +++++++++++++++++++++
1 file changed, 248 insertions(+)
create mode 100644 ldap-site-mngmt/webinterface/computers/rbshost.php
(limited to 'ldap-site-mngmt/webinterface/computers/rbshost.php')
diff --git a/ldap-site-mngmt/webinterface/computers/rbshost.php b/ldap-site-mngmt/webinterface/computers/rbshost.php
new file mode 100644
index 00000000..83c2056d
--- /dev/null
+++ b/ldap-site-mngmt/webinterface/computers/rbshost.php
@@ -0,0 +1,248 @@
+
";
+$dhcphlpcont = $host['dhcphlpcont'];
+$objectDN = $dhcphlpcont;
+$rbsDN = $host['hlprbservice'];
+
+$rbs_dhcpopt = "";
+$host_dhcpopt = "";
+$dhcp_selectbox = "";
+
+
+# Falls nicht DHCP Dienst dann kein RBS Setup
+if ($dhcphlpcont == ""){
+
+ $rbs = "
+ Sie müssen den Rechner zuerst in einem DHCP Dienst anmelden, bevor Sie ihn
+ einem Remote Boot Dienst zuordnen können (DHCP Optionen!!).
|
+
+ ";
+}else{
+
+ ###########################################################
+ # RBS Setup # Nur wenn angezeigt wenn Host in DHCP
+ $rbs_selectbox = "";
+ $rbs_dhcpopt = "";
+ $altrbs = alternative_rbservices($rbsDN);
+
+
+ $rbs_selectbox .= "
+ | ";
+
+ # RBS Daten
+ if ($rbsDN == ""){
+
+ $rbs = "Remote Boot Dienst: |
+
+ Rechner ist in keinem Remote Boot Dienst angemeldet
|
+
+ RBS auswählen:
| ".$rbs_selectbox;
+ }else{
+
+ $rbs = "";
+ $rbsdata = get_node_data($rbsDN,array("tftpserverip"));
+ #print_r($rbsdata); echo "
";
+ $exp2 = explode(',',$host['hlprbservice']);
+ $exprbs = explode('=',$exp2[0]); $rbserv = $exprbs[1];
+ $exprbsau = explode('=',$exp2[2]); $rbsau = $exprbsau[1];
+ $rbs .= "
+ | Remote Boot Dienst: |
+
+ Remote Boot Service ".$rbserv." / AU ".$rbsau." |
+
+
+ | DHCP Option next-server (TFTP Boot Server IP): |
+ ".$host['dhcpoptnext-server']." |
+
+
+ | DHCP Option filename (initiale remote Bootdatei): |
+ ".$host['dhcpoptfilename']." |
+
+
+ RBS Einbindung ändern:
| ".$rbs_selectbox."
+
";
+
+ $rbs_dhcpopt = "
+ ";
+ }
+
+}
+
+$template->assign(array("HOSTDN" => $hostDN,
+ "HOSTNAME" => $host['hostname'],
+ "DOMAINNAME" => $host['domainname'],
+ "HWADDRESS" => $host['hwaddress'],
+ "IPADDRESS" => $hostip[0],
+ "DESCRIPTION" => $host['description'],
+ "OLDDHCP" => $objectDN,
+ "OLDFIXADD" => $host['dhcpoptfixed-address'],
+ "OLDRBS" => $rbsDN,
+ "RBS" => $rbs,
+ "HOSTLINK" => "";
+
+ $trange = "";
+ if (count($hostpxeconfigs[$i]['timerange']) > 1 ){
+ foreach ($hostpxeconfigs[$i]['timerange'] as $tr){
+ $exptime = array_merge(explode('_',$tr), array($hostpxeconfigs[$i]['cn']));
+ $timeranges[$i][] = $exptime; # Für grafische Wo-Ansicht
+ if ($exptime[0] == "X"){$exptime[0]="täglich";}
+ # if ($exptime[1] == "X" && $exptime[2] == "X"){$exptime[1] = ""; $exptime[2]= "";}
+ $trange .= $exptime[0].", von ".$exptime[1].":00 bis ".$exptime[2].":59
";
+ }
+ }else{
+ $exptime = array_merge(explode('_',$hostpxeconfigs[$i]['timerange']), array($hostpxeconfigs[$i]['cn']));
+ $timeranges[$i] = $exptime; # Für grafische Wo-Ansicht
+ if ($exptime[0] == "X"){$exptime[0]="täglich";}
+ # if ($exptime[1] == "X" && $exptime[2] == "X"){$exptime[1] = ""; $exptime[2]= "";}
+ $trange .= $exptime[0].", von ".$exptime[1].":00 bis ".$exptime[2].":59";
+ }
+ $template->assign(array("PXEDN" => $hostpxeconfigs[$i]['dn'],
+ "PXECN" => $pxelink,
+ "PXEDESC" => $hostpxeconfigs['description'],
+ "PXETR" => $trange, ));
+ $template->parse("RECHNERPXES_LIST", ".Rechnerpxes");
+
+ }
+}
+
+# Default PXEs des RBS
+$defaultpxeconfigs = get_pxeconfigs($rbsDN,array("dn","cn","description","timerange","filename"));
+
+$template->assign(array("DEFPXEDN" => "",
+ "DEFPXECN" => "Keine PXE Config angelegt",
+ "DEFPXEDESC" => "",
+ "DEFPXETR" => "",));
+$template->define_dynamic("Defpxes", "Webseite");
+
+if (count($defaultpxeconfigs) != 0){
+ for ($i=0;$i