diff options
| author | Tarik Gasmi | 2007-10-26 10:41:22 +0200 |
|---|---|---|
| committer | Tarik Gasmi | 2007-10-26 10:41:22 +0200 |
| commit | 310554c02e4b51c5300f8bdf8ad15e3f0520bc53 (patch) | |
| tree | 277727e7c13eeaec94fe8089f547f3108b727bcc /ldap-site-mngmt/webinterface/computers | |
| parent | This should fix a small bug reported by Reiner for SuSE10.3 in stage3. (diff) | |
| download | core-310554c02e4b51c5300f8bdf8ad15e3f0520bc53.tar.gz core-310554c02e4b51c5300f8bdf8ad15e3f0520bc53.tar.xz core-310554c02e4b51c5300f8bdf8ad15e3f0520bc53.zip | |
LSM Webinterface, new actualized Version
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1401 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'ldap-site-mngmt/webinterface/computers')
31 files changed, 856 insertions, 681 deletions
diff --git a/ldap-site-mngmt/webinterface/computers/computers.dwt b/ldap-site-mngmt/webinterface/computers/computers.dwt index 8f52e884..933ab60d 100644 --- a/ldap-site-mngmt/webinterface/computers/computers.dwt +++ b/ldap-site-mngmt/webinterface/computers/computers.dwt @@ -5,18 +5,18 @@ <link rel='stylesheet' href='../styles.css' type='text/css'></head> <body> -<table cellpadding='0' cellspacing='0' border='0' width='95%' height='8%'> +<table cellpadding='0' cellspacing='0' border='0' width='100%' style='background-color: #F0F0F0;border-color: #505050; border-style: solid; border-width: 0 0 1 0;'> <tr> - <td width='35%'> + <td width='30%'> <table cellpadding='5' cellspacing='0' border='0' width='100%'> <tr valign='top'> <td width='1'></td> - <td><h2>Rechner und IP Management</h2></td> + <td><h2>Client / IP Management</h2></td> </tr> </table> </td> - <td width='40%'> + <td width='45%'> <table cellpadding='5' cellspacing='0' border='0' width='100%'> <tr valign='top' align='left'> <td> @@ -36,16 +36,13 @@ </table> </td> </tr> + <tr> + <td colspan='3'>{MAINMENU}</td> + </tr> </table> -<table cellpadding='5' cellspacing='0' border='0' width='95%' height='7%'> -<tr> - <td>{MAINMENU}</td> -</tr> -</table> - -<hr align='center' width='98%' noshade> - +<!--<hr align='center' width='98%' noshade>--> +<br> <table cellpadding='5' cellspacing='0' border='0' width='100%' height='85%'> diff --git a/ldap-site-mngmt/webinterface/computers/computers_menu.php b/ldap-site-mngmt/webinterface/computers/computers_menu.php index 97ff55fa..1ab98526 100644 --- a/ldap-site-mngmt/webinterface/computers/computers_menu.php +++ b/ldap-site-mngmt/webinterface/computers/computers_menu.php @@ -9,16 +9,16 @@ function createComputersMenu($rollen , $mnr, $auDN, $sbmnr, $mcnr) { if ( $mipb_array[0] == "" ){ $iprechnerlink = "no_ip.php?mnr=2"; }else{ - $iprechnerlink = "ip_rechner.php"; + $iprechnerlink = "ip_rechner.php?sort=ipaddress"; } # Struktur der Registerkartenleiste # Hauptmenu - $hauptmenu = array(array("link" => "computers.php", - "text" => "Übersicht", - "zugriff" => array("MainAdmin","HostAdmin","DhcpAdmin")), - array("link" => "hostoverview.php", - "text" => "Rechner", + $hauptmenu = array( #array("link" => "computers.php", + # "text" => "Übersicht", + # "zugriff" => array("MainAdmin","HostAdmin","DhcpAdmin")), + array("link" => "hostoverview.php?sort=hostname", + "text" => "Übersicht Rechner", "zugriff" => array("MainAdmin","HostAdmin","DhcpAdmin")), array("link" => $iprechnerlink, "text" => "IP Adressen Rechner", @@ -32,9 +32,9 @@ function createComputersMenu($rollen , $mnr, $auDN, $sbmnr, $mcnr) { #array("link" => "new_mcdef.php", # "text" => "Neue MachineConfig", # "zugriff" => array("MainAdmin","HostAdmin")), - array("link" => "new_pxe.php", - "text" => "Neues PXE Bootmenü", - "zugriff" => array("MainAdmin"))); + array("link" => "pxeconfigs.php", + "text" => "PXE Configs", + "zugriff" => array("MainAdmin","DhcpAdmin"))); # Submenus /*$computers_array = get_hosts($auDN,array("dn","hostname","ou")); @@ -69,13 +69,17 @@ function createComputersMenu($rollen , $mnr, $auDN, $sbmnr, $mcnr) { "text" => $mcdef_array[$n]['cn'], "zugriff" => array("MainAdmin","DhcpAdmin","HostAdmin")); } + + $newpxe[] = array("link" => "new_pxe.php", + "text" => "Neue PXE Config anlegen", + "zugriff" => array("MainAdmin","DhcpAdmin")); - $submenu = array(array(), + $submenu = array(#array(), $comps, array(), #$groups, #$defmc, - array()); + $newpxe); #echo "submenu: ";print_r($submenu);echo "<br><br>"; # Zusammenstellen der Menuleiste @@ -159,9 +163,9 @@ function createComputersMenu($rollen , $mnr, $auDN, $sbmnr, $mcnr) { <tr> <td width='8%'> </td> <td width='8%' align='right'><img src='../pics/".$zwisch2.".gif'></td> - <td width='5%' align='left' style='border-width:1 0 1 1;border-color:#000000;border-style:solid;padding:4;background-color:{FARBE_S}'> </td>
+ <td width='5%' align='left' style='border-width:1 0 1 1;border-color:#000000;border-style:solid;padding:4;background-color:{FARBE_S}'> </td> <td width='69%' align='left' style='border-width:1 1 1 0;border-color:#000000;border-style:solid;padding:4;padding-left:12px;background-color:{FARBE_S}'> - <a href='".$item2['link']."' style='text-decoration:none'><b class='standard_schrift'>".$item2['text']."</b></a></td> + <a href='".$item2['link']."' style='text-decoration:none'><code class='submenue_schrift'>".$item2['text']."</code></a></td> <td width='10%'> </td> </tr> "; @@ -218,7 +222,7 @@ function createComputersMenu($rollen , $mnr, $auDN, $sbmnr, $mcnr) { $farb="#505050"; } else { - + if(count($submenu[$i][0]) != 0){ if($maxmenu == $i+1){$zwisch="<a href='{LINK_M}' style='border-style=none;text-decoration:none'> <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";} diff --git a/ldap-site-mngmt/webinterface/computers/dhcphost.dwt b/ldap-site-mngmt/webinterface/computers/dhcphost.dwt index ba9a8872..3bb5e756 100644 --- a/ldap-site-mngmt/webinterface/computers/dhcphost.dwt +++ b/ldap-site-mngmt/webinterface/computers/dhcphost.dwt @@ -4,7 +4,7 @@ <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 1;'><h4>{HOSTLINK} Allgemein </a></h4></td> <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4><code class='font_object'>DHCP</code></h4></td> <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{RBSLINK} RBS/PXE </a></h4></td> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{HWLINK} Hardware </a></h4></td> + <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{HWLINK} Geo/Hardware </a></h4></td> <td> </td> </tr> <tr> @@ -33,7 +33,7 @@ {HOST_DHCPOPT} - <tr> + <!--<tr> <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Default Lease Time:</b></td> <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> <input type='Text' name='attribs[dhcpoptdefault-lease-time]' value='{DEFAULTLEASE}' size='30' class='medium_form_field'> @@ -46,7 +46,7 @@ <input type='Text' name='attribs[dhcpoptmax-lease-time]' value='{MAXLEASE}' size='30' class='medium_form_field'> <input type='hidden' name='oldattribs[dhcpoptmax-lease-time]' value='{MAXLEASE}'> </td> - </tr> + </tr>--> </table></td> </tr> @@ -56,6 +56,7 @@ <input type='hidden' name='oldfixadd' value='{OLDFIXADD}'> <input type='hidden' name='oldrbs' value='{OLDRBS}'> <input type='hidden' name='hostip' value='{IPADDRESS}'> + <input type='hidden' name='hostmac' value='{HWADDRESS}'> <input type='hidden' name='hostdn' value='{HOSTDN}'> <input type='hidden' name='sbmnr' value='{SBMNR}'> diff --git a/ldap-site-mngmt/webinterface/computers/dhcphost.php b/ldap-site-mngmt/webinterface/computers/dhcphost.php index 8a5f67fa..5e64000d 100644 --- a/ldap-site-mngmt/webinterface/computers/dhcphost.php +++ b/ldap-site-mngmt/webinterface/computers/dhcphost.php @@ -7,7 +7,7 @@ $webseite = "dhcphost.dwt"; include('computers_header.inc.php'); -$mnr = 1; +$mnr = 0; $sbmnr = -1; $mcnr = -1; @@ -24,9 +24,9 @@ createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); $hostDN = $_GET['dn']; # Rechner Daten -$attributes = array("hostname","domainname","ipaddress","hwaddress","description","hlprbservice", +$attributes = array("hostname","domainname","ipaddress","hwaddress","hlprbservice", "dhcphlpcont","dhcpoptfixed-address","dhcpopthardware","dhcpoptfilename", - "dhcpoptnext-server","dhcpoptmax-lease-time","dhcpoptdefault-lease-time","hw-mouse","hw-graphic","hw-monitor"); + "dhcpoptnext-server","dhcpoptmax-lease-time","dhcpoptdefault-lease-time"); $host = get_node_data($hostDN,$attributes); $hostip = explode('_',$host['ipaddress']); # print_r($hostip); echo "<br><br>"; @@ -145,9 +145,9 @@ if ($dhcphlpcont == ""){ <td class='tab_d_ohne'> </td> </tr> <tr valign='top'> - <td class='tab_d_ohne'><b>fixed-address:</b> </td> - <td class='tab_d_ohne'>".$fixedaddress." </td> - <td class='tab_d_ohne'> + <td class='tab_d'><b>fixed-address:</b> </td> + <td class='tab_d'>".$fixedaddress." </td> + <td class='tab_d'> <select name='fixadd' size='3' class='medium_form_selectbox'> ".$fixedaddselopt." </select> @@ -158,16 +158,15 @@ if ($dhcphlpcont == ""){ $template->assign(array("HOSTDN" => $hostDN, "HOSTNAME" => $host['hostname'], - "DOMAINNAME" => $host['domainname'], + #"DOMAINNAME" => $host['domainname'], "HWADDRESS" => $host['hwaddress'], "IPADDRESS" => $hostip[0], - "DESCRIPTION" => $host['description'], "OLDDHCP" => $objectDN, "OLDFIXADD" => $host['dhcpoptfixed-address'], - "OLDRBS" => $rbsDN, + "OLDRBS" => $rbsDN, "DHCPCONT" => $dhcp, - "HOST_DHCPOPT" => $host_dhcpopt, - "NEXTSERVER" => $host['dhcpoptnext-server'], + "HOST_DHCPOPT" => $host_dhcpopt, + "NEXTSERVER" => $host['dhcpoptnext-server'], "FILENAME" => $host['dhcpoptfilename'], "DEFAULTLEASE" => $dhcpdefaultlease, "MAXLEASE" => $dhcpmaxlease, diff --git a/ldap-site-mngmt/webinterface/computers/dhcphost_change.php b/ldap-site-mngmt/webinterface/computers/dhcphost_change.php index 9cd71f41..cbfa7f9f 100644 --- a/ldap-site-mngmt/webinterface/computers/dhcphost_change.php +++ b/ldap-site-mngmt/webinterface/computers/dhcphost_change.php @@ -6,12 +6,13 @@ $syntax = new Syntaxcheck; $dhcp = $_POST['dhcpcont']; $olddhcp = $_POST['olddhcp']; +$hostDN = $_POST['hostdn']; $hostip = $_POST['hostip']; +$hostmac = $_POST['hostmac']; $fixedaddress = $_POST['fixadd']; $oldfixedaddress = $_POST['oldfixadd']; $oldrbs = $_POST['oldrbs']; -$hostDN = $_POST['hostdn']; $sbmnr = $_POST['sbmnr']; $dhcp = htmlentities($dhcp); @@ -55,7 +56,7 @@ echo " <tr><td>"; ########################################## -# DHCP +# DHCP Einbindung if ($dhcp != "none" && $dhcp != $olddhcp){ if ($dhcp != ""){ @@ -73,16 +74,21 @@ if ($dhcp != "none" && $dhcp != $olddhcp){ $mesg = "Fehler beim ändern des DHCP Dienstes zu <b>".$dhcpcn."</b>!<br><br>"; } }else{ - if ( $hostip != "" ){ - $entrydhcp ['dhcpoptfixed-address'] = "ip"; - } - echo "DHCP add "; print_r($entrydhcp); echo "<br>"; - if ($result = ldap_mod_add($ds,$hostDN,$entrydhcp)){ - update_dhcpmtime(array()); - $mesg = "Rechner erfolgreich in DHCP <b>".$dhcpcn." [Abt.: ".$dhcpau."]</b> angemeldet<br><br>"; - }else{ - $mesg = "Fehler beim ändern des DHCP Dienstes zu <b>".$dhcpcn."</b>!<br><br>"; - } + if ( $hostmac != ""){ + if ( $hostip != "" ){ + $entrydhcp ['dhcpoptfixed-address'] = "ip"; + } + echo "DHCP add "; print_r($entrydhcp); echo "<br>"; + if ($result = ldap_mod_add($ds,$hostDN,$entrydhcp)){ + update_dhcpmtime(array()); + $mesg = "Rechner erfolgreich in DHCP <b>".$dhcpcn." [Abt.: ".$dhcpau."]</b> angemeldet<br><br>"; + }else{ + $mesg = "Fehler beim ändern des DHCP Dienstes zu <b>".$dhcpcn."</b>!<br><br>"; + } + }else{ + $mesg = "Es ist keine MAC Adresse für den Rechner eingetragen.<br> + Dies ist jedoch Voraussetzung für einen DHCP Eintrag.<br><br>"; + } } }else{ $entrydhcp ['dhcphlpcont'] = array(); @@ -106,7 +112,10 @@ if ($dhcp == "none"){ echo " DHCP none <br>"; } + +############################# # DHCP Option fixed-address + if ($fixedaddress != "none" && $fixedaddress != $oldfixedaddress){ if ($fixedaddress != ""){ $entryfixadd ['dhcpoptfixed-address'] = $fixedaddress; @@ -140,78 +149,81 @@ if ($fixedaddress != "none" && $fixedaddress != $oldfixedaddress){ } ##################################### -# Restliche Attribute (u.a. Description) - -$entryadd = array(); -$entrymod = array(); -$entrydel = array(); +# Restliche Attribute ... -foreach (array_keys($atts) as $key){ +#if (count($atts) != 0){ - if ( $oldatts[$key] == $atts[$key] ){ + $entryadd = array(); + $entrymod = array(); + $entrydel = array(); + foreach (array_keys($atts) as $key){ + + if ( $oldatts[$key] == $atts[$key] ){ + + } + if ( $oldatts[$key] == "" && $atts[$key] != "" ){ + # hier noch Syntaxcheck + $entryadd[$key] = $atts[$key]; + } + if ( $oldatts[$key] != "" && $atts[$key] != "" && $oldatts[$key] != $atts[$key] ){ + # hier noch Syntaxcheck + $entrymod[$key] = $atts[$key]; + } + if ( $oldatts[$key] != "" && $atts[$key] == "" ){ + # hier noch Syntaxcheck + $entrydel[$key] = $oldatts[$key]; + } } - if ( $oldatts[$key] == "" && $atts[$key] != "" ){ - # hier noch Syntaxcheck - $entryadd[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] != "" && $oldatts[$key] != $atts[$key] ){ - # hier noch Syntaxcheck - $entrymod[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] == "" ){ - # hier noch Syntaxcheck - $entrydel[$key] = $oldatts[$key]; - } -} - -#print_r($entryadd); echo "<br>"; -#print_r($entrymod); echo "<br>"; -#print_r($entrydel); echo "<br>"; - - -if (count($entryadd) != 0 ){ + #print_r($entryadd); echo "<br>"; - #echo "neu anlegen<br>"; - foreach (array_keys($entryadd) as $key){ - $addatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_add($ds,$hostDN,$entryadd)){ - $mesg = "Attribute ".$addatts." erfolgreich eingetragen<br><br>"; - update_dhcpmtime(array()); - }else{ - $mesg = "Fehler beim eintragen der Attribute ".$addatts."<br><br>"; - } -} - -if (count($entrymod) != 0 ){ #print_r($entrymod); echo "<br>"; - #echo "ändern<br>"; - foreach (array_keys($entrymod) as $key){ - $modatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_replace($ds,$hostDN,$entrymod)){ - $mesg = "Attribute ".$modatts." erfolgreich geaendert<br><br>"; - update_dhcpmtime(array()); - }else{ - $mesg = "Fehler beim aendern der Attribute ".$modatts."<br><br>"; - } -} - -if (count($entrydel) != 0 ){ #print_r($entrydel); echo "<br>"; - #echo "löschen<br>"; - foreach (array_keys($entrydel) as $key){ - $delatts .= "<b>".$key."</b>,"; + + + if (count($entryadd) != 0 ){ + #print_r($entryadd); echo "<br>"; + #echo "neu anlegen<br>"; + foreach (array_keys($entryadd) as $key){ + $addatts .= "<b>".$key."</b>,"; + } + if(ldap_mod_add($ds,$hostDN,$entryadd)){ + $mesg = "Attribute ".$addatts." erfolgreich eingetragen<br><br>"; + update_dhcpmtime(array()); + }else{ + $mesg = "Fehler beim eintragen der Attribute ".$addatts."<br><br>"; + } } - if(ldap_mod_del($ds,$hostDN,$entrydel)){ - $mesg = "Attribute ".$delatts." erfolgreich geloescht<br><br>"; - update_dhcpmtime(array()); - }else{ - $mesg = "Fehler beim loeschen der Attribute ".$delatts."<br><br>"; + + if (count($entrymod) != 0 ){ + #print_r($entrymod); echo "<br>"; + #echo "ändern<br>"; + foreach (array_keys($entrymod) as $key){ + $modatts .= "<b>".$key."</b>,"; + } + if(ldap_mod_replace($ds,$hostDN,$entrymod)){ + $mesg = "Attribute ".$modatts." erfolgreich geaendert<br><br>"; + update_dhcpmtime(array()); + }else{ + $mesg = "Fehler beim aendern der Attribute ".$modatts."<br><br>"; + } } -} - + + if (count($entrydel) != 0 ){ + #print_r($entrydel); echo "<br>"; + #echo "löschen<br>"; + foreach (array_keys($entrydel) as $key){ + $delatts .= "<b>".$key."</b>,"; + } + if(ldap_mod_del($ds,$hostDN,$entrydel)){ + $mesg = "Attribute ".$delatts." erfolgreich geloescht<br><br>"; + update_dhcpmtime(array()); + }else{ + $mesg = "Fehler beim loeschen der Attribute ".$delatts."<br><br>"; + } + } + +#} ##################### diff --git a/ldap-site-mngmt/webinterface/computers/host.dwt b/ldap-site-mngmt/webinterface/computers/host.dwt index 729e6d64..4b3780a2 100644 --- a/ldap-site-mngmt/webinterface/computers/host.dwt +++ b/ldap-site-mngmt/webinterface/computers/host.dwt @@ -4,7 +4,7 @@ <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 1;'><h4><code class='font_object'>Allgemein</code></h4></td> <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{DHCPLINK} DHCP </a></h4></td> <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{RBSLINK} RBS/PXE </a></h4></td> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{HWLINK} Hardware </a></h4></td> + <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{HWLINK} Geo/Hardware </a></h4></td> <td> </td> </tr> <tr> diff --git a/ldap-site-mngmt/webinterface/computers/host.php b/ldap-site-mngmt/webinterface/computers/host.php index 1778ffbb..454847bb 100644 --- a/ldap-site-mngmt/webinterface/computers/host.php +++ b/ldap-site-mngmt/webinterface/computers/host.php @@ -7,7 +7,7 @@ $webseite = "host.dwt"; include('computers_header.inc.php'); -$mnr = 1; +$mnr = 0; $sbmnr = -1; $mcnr = -1; diff --git a/ldap-site-mngmt/webinterface/computers/host_change.php b/ldap-site-mngmt/webinterface/computers/host_change.php index f32daef3..63e64f8a 100644 --- a/ldap-site-mngmt/webinterface/computers/host_change.php +++ b/ldap-site-mngmt/webinterface/computers/host_change.php @@ -79,34 +79,44 @@ if ( $oldhostname == $hostname ){ } if ( $oldhostname != "" && $hostname != "" && $oldhostname != $hostname ){ - echo "Hostname aendern<br>"; - # hier noch Syntaxcheck - # Formulareingaben anpassen - $exphn = explode(" ",$hostname); - foreach ($exphn as $word){$expuc[] = ucfirst($word);} - $hostname = implode(" ",$expuc); - $hostname = preg_replace ( '/\s+([0-9A-Z])/', '$1', $hostname); - - $newhostDN = "hostname=".$hostname.",cn=computers,".$auDN; - # print_r($newhostDN); echo "<br><br>"; - modify_host_dn($hostDN, $newhostDN); - $hostDN = $newhostDN; - - # newsubmenu holen...hosts neu holen, sortieren, ->position - #$newhosts = get_hosts($auDN,array("dn")); - #print_r($newhosts); echo "<br><br>"; - #foreach ($newhosts as $item){ - # $newdnarray [] = $item['dn']; - #} - #$key = array_search($newhostDN, $newdnarray); - #print_r($key); echo "<br>"; - - $url = 'host.php?dn='.$newhostDN.'&sbmnr='.$sbmnr; - + echo "Hostname ändern<br><br>"; + # Check ob Host schon existiert in AU/Domain + $brothers = get_hosts($auDN,array("hostname"),""); + if ( check_hostname($hostname) ){ + $url = "hostoverview.php"; + $mesg = "Es existiert bereits ein Rechner mit dem Namen $hostname!<br><br> + Bitte geben Sie einen anderen Namen ein, oder löschen + Sie zunächst den gleichnamigen Rechner.<br><br> + <a href=".$url." style='publink'><< Übersicht Rechner</a>"; + redirect(4, $url, $mesg, $addSessionId = TRUE); + die; + }else{ + # Formulareingaben anpassen + $exphn = explode(" ",$hostname); + foreach ($exphn as $word){$expuc[] = ucfirst($word);} + $hostname = implode(" ",$expuc); + $hostname = preg_replace ( '/\s+([0-9A-Z])/', '$1', $hostname); + + $newhostDN = "hostname=".$hostname.",cn=computers,".$auDN; + # print_r($newhostDN); echo "<br><br>"; + modify_host_dn($hostDN, $newhostDN); + $hostDN = $newhostDN; + + # newsubmenu holen...hosts neu holen, sortieren, ->position + #$newhosts = get_hosts($auDN,array("dn")); + #print_r($newhosts); echo "<br><br>"; + #foreach ($newhosts as $item){ + # $newdnarray [] = $item['dn']; + #} + #$key = array_search($newhostDN, $newdnarray); + #print_r($key); echo "<br>"; + + $url = 'host.php?dn='.$newhostDN.'&sbmnr='.$sbmnr; + } } if ( $oldhostname != "" && $hostname == "" ){ - echo "Hostname loeschen!<br> + echo "Hostname löschen!<br>>br> Dies ist Teil des DN, Sie werden den Rechner komplett löschen<br><br>"; echo "Wollen Sie den Rechner <b>".$oldhostname."</b> mit seinen Hardware-Profilen (MachineConfigs) und PXE Bootmenüs wirklich löschen?<br><br> @@ -214,9 +224,15 @@ if ( $oldmac != "" && $mac == "" ){ } else{ $entry['hwaddress'] = $oldmac; + $dhcptext = ""; + if ($dhcphlpcont != ""){ + $entry['dhcphlpcont'] = array(); + $dhcptext = "Da die MAC-Adresse Voruassetzung für den + Eintrag DHCP Dienst ist, wurde der Client dort ausgetragen.<br>"; + } $result = ldap_mod_del($ds,$hostDN,$entry); if($result){ - $mesg = "MAC erfolgreich geloescht<br><br>"; + $mesg = "MAC erfolgreich geloescht.<br>$dhcptext<br>"; }else{ $mesg = "Fehler beim loeschen der MAC<br><br>"; } diff --git a/ldap-site-mngmt/webinterface/computers/hostoverview.dwt b/ldap-site-mngmt/webinterface/computers/hostoverview.dwt index 50694f46..2771ff76 100644 --- a/ldap-site-mngmt/webinterface/computers/hostoverview.dwt +++ b/ldap-site-mngmt/webinterface/computers/hostoverview.dwt @@ -1,20 +1,26 @@ <table border='0' cellpadding='5' cellspacing='0' width='100%'> <tr> - <td colspan='2'><h3>Rechner <code class='font_object'>{AU}</code> </h3></td> + <td width='80%'> + <h3>Rechner <code class='font_object'>{AU}</code> </h3> + Übersicht der in <b>AU {AU}</b> angelegten <b>Rechnerobjekte</b> und Informationen zu diesen:<br> + Rechnername, IP/MAC Adresse, Status und Art der Einbindung in die zentralen Dienste DHCP / PXE-Remote-Boot (RBS) und eine Beschreibung.<br><br> + Zur <b>Verwaltungsmaske</b> eines bestimmten Rechners gelangen Sie durch klicken auf entsprechenden Rechnernamen.<br> + Die <b>Eingabemaske</b> für einen <b>neuen Rechner</b> erreichen Sie über den Menüpunkt links: "Neuen Rechner anlegen". + </td> + <td> </td> </tr> <tr> <td height='10'></td> </tr> - <tr><td> + <tr><td colspan='2'> <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> <tr> - <td width='18%' class='tab_h'><b>Rechnername</b></td> - <td width='14%' class='tab_h'><b>IP Adresse</b></td> - <td width='20%' class='tab_h'><b>MAC Adresse</b></td> - <td width='15%' class='tab_h'><b>DHCP</b></td> - <td width='10%' class='tab_h'> </td> - <td width='13%' class='tab_h'><b>RBS</b></td> - <td width='10%' class='tab_h'> </td> + <td width='17%' class='tab_h'><b><a href='hostoverview.php?sort=hostname' class='headerlink'>Rechnername</a></b></td> + <td width='13%' class='tab_h'><b><a href='hostoverview.php?sort=ipaddress' class='headerlink'>IP Adresse</a></b></td> + <td width='17%' class='tab_h'><b>MAC Adresse</b></td> + <td width='9%' class='tab_h'><b>DHCP</b></td> + <td width='16%' class='tab_h'><b>RBS</b></td> + <td width='29%' class='tab_h'><b>Beschreibung des Rechners</b></td> </tr> <!-- BEGIN DYNAMIC BLOCK: Rechner --> @@ -22,23 +28,13 @@ <td class='tab_d'><b>{HOSTNAME}</b> </td> <td class='tab_d'>{IPADDRESS} </td> <td class='tab_d'>{HWADDRESS} </td> - <td class='tab_d'>{DHCPCONT} </td> <td class='tab_d'>{FIXADD} </td> <td class='tab_d'>{RBSCONT} </td> - <td class='tab_d'>{NXTSRV} </td> + <td class='tab_d'>{DESC} </td> </tr> <!-- END DYNAMIC BLOCK: Rechner --> </table></td> </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td> - Zum Verwalten eines bestimmten Rechners, wählen Sie links entsprechenden Submenü-Eintrag.<br> - Um einen neuen Rechner anzulegen wählen Sie links "Neuer Rechner" - </td> - </tr> - + </table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/hostoverview.php b/ldap-site-mngmt/webinterface/computers/hostoverview.php index b59dbea6..b1728002 100644 --- a/ldap-site-mngmt/webinterface/computers/hostoverview.php +++ b/ldap-site-mngmt/webinterface/computers/hostoverview.php @@ -7,7 +7,7 @@ $webseite = "hostoverview.dwt"; include('computers_header.inc.php'); -$mnr = 1; +$mnr = 0; $sbmnr = -1; $mcnr = -1; @@ -19,18 +19,26 @@ createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); ################################################################################### +$sort = "hostname"; +$sort = $_GET['sort']; + $template->assign(array("DN" => "", "HOSTNAME" => "Noch keine Rechner angelegt", "DOMAINNAME" => "", "HWADDRESS" => "", - "IPADDRESS" => "", + "IPADDRESS" => "", "DHCPCONT" => "", "FIXADD" => "", - "RBSCONT" => "", - "NXTSRV" => "")); + "DESC" => "", + "RBSCONT" => "")); + +$attributes = array("dn","hostname","domainname","hwaddress","ipaddress","description","dhcphlpcont","dhcpoptfixed-address","hlprbservice","dhcpoptnext-server"); +$host_array = get_hosts($auDN,$attributes,$sort); +#print_r($host_array); -$attributes = array("dn","hostname","domainname","hwaddress","ipaddress","dhcphlpcont","dhcpoptfixed-address","hlprbservice","dhcpoptnext-server"); -$host_array = get_hosts($auDN,$attributes); +if ($sort == "ipaddress"){ + $host_array = array_natsort($host_array, "ipaddress", "ipaddress"); +} $template->define_dynamic("Rechner", "Webseite"); @@ -41,7 +49,7 @@ foreach ($host_array as $host){ $hostip = explode('_',$host['ipaddress']); $dhcpcont = ""; - $dhcpfixadd = ""; + $dhcpfixadd = "-"; if ( count($host['dhcphlpcont']) != 0 ){ $dhcpexpdn = ldap_explode_dn($host['dhcphlpcont'],1); $dhcpcn = $dhcpexpdn[0]; @@ -62,25 +70,25 @@ foreach ($host_array as $host){ } - - $rbscont = ""; + $rbscont = "-"; $dhcpnxtsrv = ""; if ( count($host['hlprbservice']) != 0 ){ $rbsexpdn = ldap_explode_dn($host['hlprbservice'],1); - $rbscont = $rbsexpdn[0]." <br>[".$rbsexpdn[2]."]"; + $dhcpnxtsrv = $host['dhcpoptnext-server']; + $rbscont = $rbsexpdn[0]." <br>[".$dhcpnxtsrv."]"; + - $dhcpnxtsrv = $host['dhcpoptnext-server']; } $template->assign(array("DN" => $host['dn'], "HOSTNAME" => $hostname, "DOMAINNAME" => $host['domainname'], "HWADDRESS" => $host['hwaddress'], - "IPADDRESS" => $hostip[0], + "IPADDRESS" => $hostip[0], "DHCPCONT" => $dhcpcont, "FIXADD" => $dhcpfixadd, "RBSCONT" => $rbscont, - "NXTSRV" => $dhcpnxtsrv, + "DESC" => $host['description'], "AUDN" => $auDN )); $template->parse("RECHNER_LIST", ".Rechner"); diff --git a/ldap-site-mngmt/webinterface/computers/hwhost.dwt b/ldap-site-mngmt/webinterface/computers/hwhost.dwt index c32c70c4..48c2cd1c 100644 --- a/ldap-site-mngmt/webinterface/computers/hwhost.dwt +++ b/ldap-site-mngmt/webinterface/computers/hwhost.dwt @@ -4,14 +4,14 @@ <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 1;'><h4>{HOSTLINK} Allgemein </a></h4></td> <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{DHCPLINK} DHCP </a></h4></td> <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{RBSLINK} RBS/PXE </a></h4></td> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4><code class='font_object'>Hardware</code></h4></td> + <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4><code class='font_object'>Geo/Hardware</code></h4></td> <td> </td> </tr> <tr> <td height='20'></td> </tr> <tr> - <td colspan='5'><h3>Hardware Optionen - Rechner <code class='font_object'> {HOSTNAME} </code> </h3></td> + <td colspan='5'><h3>Geo / Hardware Optionen - Rechner <code class='font_object'> {HOSTNAME} </code> </h3></td> </tr> <tr><td colspan='5'> @@ -20,11 +20,25 @@ <form action='hwhost_change.php' method='post'> <tr> - <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='55%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> + <td width='35%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> + <td width='65%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> </tr> <tr> + <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Geographic Location </b> (Gebäude, Raum, ...) <b>:</b></td> + <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> + <input type='Text' name='attribs[geolocation]' value='{GEOLOC}' size='50' class='medium_form_field'> + <input type='hidden' name='oldattribs[geolocation]' value='{GEOLOC}'> + </td> + </tr> + <tr> + <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Geo Coordinates: </b> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> + <input type='Text' name='attribs[geoattribut]' value='{GEOATT}' size='50' class='medium_form_field'> + <input type='hidden' name='oldattribs[geoattribut]' value='{GEOATT}'> + </td> + </tr> + <tr> <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>HW Mouse: </b> </td> <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> <input type='Text' name='attribs[hw-mouse]' value='{MOUSE}' size='30' class='medium_form_field'> diff --git a/ldap-site-mngmt/webinterface/computers/hwhost.php b/ldap-site-mngmt/webinterface/computers/hwhost.php index 0f6cc300..e0b1f7f8 100644 --- a/ldap-site-mngmt/webinterface/computers/hwhost.php +++ b/ldap-site-mngmt/webinterface/computers/hwhost.php @@ -7,7 +7,7 @@ $webseite = "hwhost.dwt"; include('computers_header.inc.php'); -$mnr = 1; +$mnr = 0; $sbmnr = -1; $mcnr = -1; @@ -24,7 +24,7 @@ createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); $hostDN = $_GET['dn']; $attributes = array("hostname","domainname","ipaddress","hwaddress","description","dhcphlpcont", - "hw-mouse","hw-graphic","hw-monitor"); + "hw-mouse","hw-graphic","hw-monitor","geolocation","geoattribut"); $host = get_node_data($hostDN,$attributes); $hostip = explode('_',$host['ipaddress']); @@ -33,11 +33,13 @@ $template->assign(array("HOSTDN" => $hostDN, "DOMAINNAME" => $host['domainname'], "HWADDRESS" => $host['hwaddress'], "IPADDRESS" => $hostip[0], - "DESCRIPTION" => $host['description'], - "DHCPCONT" => $host['dhcphlpcont'], - "MOUSE" => $host['hw-mouse'], + "DESCRIPTION" => $host['description'], + "DHCPCONT" => $host['dhcphlpcont'], + "GEOLOC" => $host['geolocation'], + "GEOATT" => $host['geoattribut'], + "MOUSE" => $host['hw-mouse'], "GRAPHIC" => $host['hw-graphic'], - "MONITOR" => $host['hw-monitor'], + "MONITOR" => $host['hw-monitor'], "DHCPLINK" => "<a href='dhcphost.php?dn=".$hostDN."&sbmnr=".$sbmnr."' class='headerlink'>", "HOSTLINK" => "<a href='host.php?dn=".$hostDN."&sbmnr=".$sbmnr."' class='headerlink'>", "RBSLINK" => "<a href='rbshost.php?dn=".$hostDN."&sbmnr=".$sbmnr."' class='headerlink'>", diff --git a/ldap-site-mngmt/webinterface/computers/hwhost_change.php b/ldap-site-mngmt/webinterface/computers/hwhost_change.php index 678471a4..83ab270d 100644 --- a/ldap-site-mngmt/webinterface/computers/hwhost_change.php +++ b/ldap-site-mngmt/webinterface/computers/hwhost_change.php @@ -104,7 +104,7 @@ if (count($entrydel) != 0 ){ } } -update_dhcpmtime(); +#update_dhcpmtime(array()); $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> diff --git a/ldap-site-mngmt/webinterface/computers/ip_rechner.dwt b/ldap-site-mngmt/webinterface/computers/ip_rechner.dwt index b300e88e..88d67316 100644 --- a/ldap-site-mngmt/webinterface/computers/ip_rechner.dwt +++ b/ldap-site-mngmt/webinterface/computers/ip_rechner.dwt @@ -8,8 +8,8 @@ <tr><td> <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> <tr> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Rechner Name</b></td> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>IP Adresse</b></td> + <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b><a href='ip_rechner.php?sort=hostname' class='headerlink'>Rechner Name</a></b></td> + <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b><a href='ip_rechner.php?sort=ipaddress' class='headerlink'>IP Adresse</a></b></td> <td width='50%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>DHCP</b></td> </tr> diff --git a/ldap-site-mngmt/webinterface/computers/ip_rechner.php b/ldap-site-mngmt/webinterface/computers/ip_rechner.php index 5870f503..fcc04883 100644 --- a/ldap-site-mngmt/webinterface/computers/ip_rechner.php +++ b/ldap-site-mngmt/webinterface/computers/ip_rechner.php @@ -9,7 +9,7 @@ include('computers_header.inc.php'); ############################################################################# -$mnr = 2; +$mnr = 1; $sbmnr = -1; $mcnr = -1; @@ -19,6 +19,9 @@ createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); ############################################################################# +$sort = "hostname"; +$sort = $_GET['sort']; + $template->assign(array("IP" => "", "OLDIP" => "", "DHCPCONT" => "", @@ -26,9 +29,13 @@ $template->assign(array("IP" => "", "HOSTNAME" => "Noch keine Rechner angelegt", "HOSTDN" => "")); -$host_array = get_hosts($auDN,array("dn","hostname","ipaddress","dhcphlpcont","dhcpoptfixed-address")); +$host_array = get_hosts($auDN,array("dn","hostname","ipaddress","dhcphlpcont","dhcpoptfixed-address"),$sort); # print_r ($host_array); +if ($sort == "ipaddress"){ + $host_array = array_natsort($host_array, "ipaddress", "ipaddress"); +} + $template->define_dynamic("Hosts", "Webseite"); foreach ($host_array as $host){ diff --git a/ldap-site-mngmt/webinterface/computers/menu.dwt b/ldap-site-mngmt/webinterface/computers/menu.dwt index 6cb4e63e..7d316674 100644 --- a/ldap-site-mngmt/webinterface/computers/menu.dwt +++ b/ldap-site-mngmt/webinterface/computers/menu.dwt @@ -5,12 +5,15 @@ <!-- BEGIN DYNAMIC BLOCK: Hauptmenu --> <tr valign='middle' align='left'> -
+ <td width='8%' align='right' style="border-style=none;">{ICON}</td> <td width="8%" align="left" style="border-width:1 0 1 1;border-color:#000000;border-style:solid;padding:5;background-color:{FARBE}"> </td> - <td width="5%" align="left" style="border-width:1 0 1 0;border-color:#000000;border-style:solid;padding:5;background-color:{FARBE}"> </td>
+ <td width="5%" align="left" style="border-width:1 0 1 0;border-color:#000000;border-style:solid;padding:5;background-color:{FARBE}"> </td> <td width="69%" align="left" style="border-width:1 1 1 0;border-color:#000000;border-style:solid;padding:5;background-color:{FARBE}"> - <a href="{LINK_M}" style="text-decoration:none"><b class="standard_schrift">{TEXT_M}</b></a></td>
+ <a href="{LINK_M}" style="text-decoration:none"> + <code class="submenue_schrift">{TEXT_M}</code> + </a> + </td> <td width='10%'> </td> </tr> diff --git a/ldap-site-mngmt/webinterface/computers/new_host.dwt b/ldap-site-mngmt/webinterface/computers/new_host.dwt index 43625f57..e2ae50ba 100644 --- a/ldap-site-mngmt/webinterface/computers/new_host.dwt +++ b/ldap-site-mngmt/webinterface/computers/new_host.dwt @@ -1,10 +1,10 @@ <table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Neuen Rechner anlegen:</h3></td> - </tr> - <tr> - <td height='20'></td> - </tr> + <tr> + <td> + <h3>Neuer Rechner in <code class='font_object'>{AU}</code> anlegen:</h3> + + </td> + </tr> <tr><td> <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> @@ -57,6 +57,26 @@ <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> <input type='Text' name='ip' value='{IP}' size='15' maxlength='15' class='medium_form_field'> </td> + </tr><tr> + <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>DHCP: </b> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> + <select name='dhcpcont' size='2' class='medium_form_selectbox'> + <option selected value='none'>----------</option> + {DHCPSELECT} + </select> + </td> + </tr> + <tr> + <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Geographic Location </b> (Gebäude, Raum, ...) <b>:</b> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> + <input type='Text' name='attribs[geolocation]' value='{GEOLOC}' size='30' class='medium_form_field'> + </td> + </tr> + <tr> + <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Geo Coordinates: </b> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> + <input type='Text' name='attribs[geoattribut]' value='{GEOATT}' size='30' class='medium_form_field'> + </td> </tr> <tr> <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>HW Mouse: </b> </td> @@ -76,15 +96,7 @@ <input type='Text' name='attribs[hw-monitor]' value='{MONITOR}' size='30' class='medium_form_field'> </td> </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>DHCP: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <select name='dhcpcont' size='2' class='medium_form_selectbox'> - <option selected value='none'>----------</option> - {DHCPSELECT} - </select> - </td> - </tr> + </table></td> </tr> diff --git a/ldap-site-mngmt/webinterface/computers/new_host.php b/ldap-site-mngmt/webinterface/computers/new_host.php index ad20b092..4ac144bc 100644 --- a/ldap-site-mngmt/webinterface/computers/new_host.php +++ b/ldap-site-mngmt/webinterface/computers/new_host.php @@ -7,7 +7,7 @@ $webseite = "new_host.dwt"; include('computers_header.inc.php'); -$mnr = 1; +$mnr = 0; $sbmnr = -1; $mcnr = -1; @@ -43,6 +43,8 @@ $template->assign(array("HOSTNAME" => $hostname, "MAC" => $mac, "IP" => $ip, "DHCPSELECT" => $dhcp_selectbox, + "GEOLOC" => "", + "GEOATT" => "", "MOUSE" => "", "GRAPHIC" => "", "MONITOR" => "", diff --git a/ldap-site-mngmt/webinterface/computers/new_pxe.dwt b/ldap-site-mngmt/webinterface/computers/new_pxe.dwt index 2a50e977..5bb7eee4 100644 --- a/ldap-site-mngmt/webinterface/computers/new_pxe.dwt +++ b/ldap-site-mngmt/webinterface/computers/new_pxe.dwt @@ -19,9 +19,9 @@ </td> </tr> <!--<tr valign='top'> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Remote Boot Dienst <br> - auswählen: </b> </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> + <td width='30%' class='tab_d'><b>Remote Boot Dienst <br> + auswählen: </b> </td> + <td colspan='2' class='tab_d'> <select name='rbs' size='5' class='medium_form_selectbox'> <option selected value='none'>----------</option> @@ -33,9 +33,9 @@ </td> </tr>--> <tr valign='top'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Ziel Objekt:</b><br> + <td class='tab_d'><b>Ziel Objekt:</b><br> (Mehrfachauswahl möglich) </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> + <td colspan='2' class='tab_d'> <select name='targets[]' size='8' multiple class='medium_form_selectbox'> <option selected value='none'>----- RECHNER spezif. PXE -----</option> <!-- BEGIN DYNAMIC BLOCK: Hosts --> @@ -50,8 +50,8 @@ </td> </tr> <tr valign='top'> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Gültigkeitsdauer <br>(Time Range): </b> </td> - <td width='40%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> + <td width='30%' class='tab_d'><b>Gültigkeitsdauer <br>(Time Range): </b> </td> + <td width='40%' class='tab_d'> <input type='Text' name='pxeday' value='{PXEDAY}' size='5' maxlength='5' class='medium_form_field'> <br> Eines der folgenden:<br> @@ -61,7 +61,7 @@ - <b>Wochentag</b> (Format: MO, DI, ... , SO) <br> - <b>X</b> für <b>täglich</b> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> + <td width='30%' class='tab_d'> <input type='Text' name='pxebeg' value='{PXEBEG}' size='2' maxlength='2' class='medium_form_field'> <b><font size='+1'>:00</b> - </font> <input type='Text' name='pxeend' value='{PXEEND}' size='2' maxlength='2' class='medium_form_field'> @@ -85,86 +85,76 @@ <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> <tr> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='70%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> + <td width='30%' class='tab_h'><b>Attribut</b></td> + <td width='70%' class='tab_h'><b>Wert</b></td> </tr> <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Default: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[default]' value='{DEFAULT}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[default]' value='{DEFAULT}'> + <td class='tab_d'><b>Default: </b> </td> + <td class='tab_d'> + <select name='attribs[default]' size='2' class='small_form_selectbox'> + <option selected value='vesamenu.c32'>vesamenu.c32</option> + <option value='menu.c32'>menu.c32</option> + </select> </td> </tr> <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Title: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> + <td class='tab_d'><b>Menu Title: </b> </td> + <td class='tab_d'> <input type='Text' name='attribs[menutitle]' value='{MENTIT}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[menutitle]' value='{MENTIT}'> </td> </tr> <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Master Passwd: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menumasterpasswd]' value='{MENMPW}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[menumasterpasswd]' value='{MENMPW}'> + <td class='tab_d'><b>Menu Master Passwd: </b> </td> + <td class='tab_d'> + <input type='Text' name='attribs[menumasterpasswd]' value='{MENMPW}' size='20' class='medium_form_field'> </td> </tr> <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Timeout: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[timeout]' value='{TIMEOUT}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[timeout]' value='{TIMEOUT}'> + <td class='tab_d'><b>Timeout: </b> </td> + <td class='tab_d'> + <input type='Text' name='attribs[timeout]' value='{TIMEOUT}' size='10' class='medium_form_field'> </td> </tr> <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>No Escape: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[noescape]' value='{NOESC}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[noescape]' value='{NOESC}'> + <td class='tab_d'><b>No Escape: </b> </td> + <td class='tab_d'> + <input type='Text' name='attribs[noescape]' value='{NOESC}' size='10' class='medium_form_field'> </td> </tr> <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Prompt: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[prompt]' value='{PROMPT}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[prompt]' value='{PROMPT}'> + <td class='tab_d'><b>Prompt: </b> </td> + <td class='tab_d'> + <input type='Text' name='attribs[prompt]' value='{PROMPT}' size='10' class='medium_form_field'> </td> </tr> <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Allow Options: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[allowoptions]' value='{ALLOW}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[allowoptions]' value='{ALLOW}'> + <td class='tab_d'><b>Allow Options: </b> </td> + <td class='tab_d'> + <input type='Text' name='attribs[allowoptions]' value='{ALLOW}' size='10' class='medium_form_field'> </td> </tr> <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>On Error: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[onerror]' value='{ONERR}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[onerror]' value='{ONERR}'> + <td class='tab_d'><b>On Error: </b> </td> + <td class='tab_d'> + <input type='Text' name='attribs[onerror]' value='{ONERR}' size='20' class='medium_form_field'> </td> </tr> <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>ON Timeout: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[ontimeout]' value='{ONTIME}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[ontimeout]' value='{ONTIME}'> + <td class='tab_d'><b>ON Timeout: </b> </td> + <td class='tab_d'> + <input type='Text' name='attribs[ontimeout]' value='{ONTIME}' size='20' class='medium_form_field'> </td> </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Client-Conf Dateiname <br>(File URI): </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> + <!--<tr> + <td class='tab_d'><b>Client-Conf Dateiname <br>(File URI): </td> + <td class='tab_d'> <input type='Text' name='conffile' value='{FILEURI}' size='50' class='medium_form_field'> </td> - </tr> + </tr>--> - <input type='hidden' name='nodedn' value='{NODEDN}'> - <input type='hidden' name='oldpxecn' value='{PXECN}'> <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> </table></td> </tr> <tr> diff --git a/ldap-site-mngmt/webinterface/computers/new_pxe.php b/ldap-site-mngmt/webinterface/computers/new_pxe.php index a6f479e3..3c4be824 100644 --- a/ldap-site-mngmt/webinterface/computers/new_pxe.php +++ b/ldap-site-mngmt/webinterface/computers/new_pxe.php @@ -8,14 +8,11 @@ $webseite = "new_pxe.dwt"; include('computers_header.inc.php'); $mnr = 2; -$sbmnr = -1; +$sbmnr = 0; $mcnr = -1; ################################################################################### -$sbmnr = $_GET['sbmnr']; -$mcnr = $_GET['mcnr']; - # Menuleisten erstellen createMainMenu($rollen, $mainnr); createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); @@ -31,38 +28,31 @@ $template->assign(array("PXECN" => $pxecn, "PXEDAY" => $pxeday, "PXEBEG" => $pxebeg, "PXEEND" => $pxeend, - # "LDAPURI" => "", - "FILEURI" => "", + #"FILEURI" => "", "RBS" => "", "RBSAU" => "", - "NFS" => "", - "NFSROOT" => "", - "TFTP" => "", - "TFTPROOT" => "", - "FILE" => "", - "ALLOW" => "", - "CONSOLE" => "", - "DEFAULT" => "menu.c32", - "DISPLAY" => "", - "FONT" => "", + "FILE" => "", + "ALLOW" => "", + #"CONSOLE" => "", + #"DISPLAY" => "", + #"FONT" => "", "IMPLICIT" => "", - "KBDMAP" => "", + #"KBDMAP" => "", "MENMPW" => "", - "MENTIT" => "", + "MENTIT" => "", "NOESC" => "1", - "ONERR" => "", + "ONERR" => "", "ONTIME" => "", - "PROMPT" => "0", - "SAY" => "", + "PROMPT" => "0", + #"SAY" => "", "SERIAL" => "", - "TIMEOUT" => "600", + "TIMEOUT" => "600", "NODEDN" => "cn=rbs,".$auDN, "HDN" => "none", "HN" => "", "GDN" => "none", "GN" => "", - "MNR" => $mnr, - "SBMNR" => $sbmnr)); + "MNR" => $mnr)); ############################################# # RB Dienste holen @@ -93,7 +83,7 @@ $template->define_dynamic("Altrbs", "Webseite"); $hostorgroup = $exp[0]; $hgexp = explode('=',$exp[0]); -$hosts_array = get_hosts($auDN,array("dn","hostname","hlprbservice","hwaddress")); +$hosts_array = get_hosts($auDN,array("dn","hostname","hlprbservice","hwaddress"),""); if ( count($hosts_array) != 0 ){ $template->define_dynamic("Hosts", "Webseite"); foreach ($hosts_array as $item){ diff --git a/ldap-site-mngmt/webinterface/computers/pxe.dwt b/ldap-site-mngmt/webinterface/computers/pxe.dwt index e20f8711..8ce34d26 100644 --- a/ldap-site-mngmt/webinterface/computers/pxe.dwt +++ b/ldap-site-mngmt/webinterface/computers/pxe.dwt @@ -1,7 +1,7 @@ <table border='0' cellpadding='5' cellspacing='0' width='100%'> <tr> - <td colspan='4' height='20'><h4><a href='{NODETYP}.php?dn={NODEDN}&mnr=1&sbmnr={SBMNR}&mcnr=-1' class='headerlink'><< Zurück zu Rechner {NODE}</a></h4></td> + <td colspan='4' height='20'><h4><a href='pxeconfigs.php' class='headerlink'><< Zurück zur Übersicht PXE Configs</a></h4></td> </tr> <tr> <td height='20'> </td> @@ -19,32 +19,63 @@ <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{BMLINK} Bootmenue </a></h4></td> <td> </td> </tr> - <tr> - <td height='20'></td> - </tr> - - <tr> - <td colspan='4'><h4>Allgemeine Parameter der PXE Konfiguration:</h4></td> + <tr> + <td height='40'></td> </tr> + <tr><td colspan='4'> <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - + <form action='pxe_change.php' method='post'> + <tr> - <td width='25%' style='border-color: black; border-style: solid; border-width: 3 0 1 0;'><b>Eindeutiger Name (cn):</b><br>(Bitte ohne Leerzeichen eingeben) </td> - <td width='5%' style='border-color: black; border-style: solid; border-width: 3 0 1 0;'> </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 3 0 1 0;'> + <td width='25%' class='tab_d'><b>Eindeutiger Name (cn):</b><br>(Bitte ohne Leerzeichen eingeben) </td> + <td width='5%' class='tab_d'> </td> + <td colspan='2' class='tab_d'> <font size='+2'><b>PXE_</b></font><input type='Text' name='pxecn' value='{PXECN}' size='50' class='medium_form_field'> <input type='hidden' name='oldpxecn' value='{PXECN}'> </td> </tr> - + </table> + <tr> + <td height='20'></td> + </tr> + + + + <tr><td colspan='4'> + <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> + <tr> + <td colspan='4' class='tab_h'><h4>PXE Konfiguration zuordnen (mit Time Range):</h4></td> + </tr> + <tr valign='top'> + <td class='tab_d'><b>Rechner / Gruppen</b><br> + (Mehrfachauswahl <br>möglich) </td> + <td class='tab_d'> </td> + <td class='tab_d'> + <select name='targethosts[]' size='8' multiple class='small_form_selectbox'> + <option selected value='none'>----- RECHNER -----</option> + <!-- BEGIN DYNAMIC BLOCK: Hosts --> + <option value='{HDN}'>{HN}</option> + <!-- END DYNAMIC BLOCK: Hosts --> + </select> + </td> + <td class='tab_d'> + <select name='targetgroups[]' size='8' multiple class='small_form_selectbox'> + <option selected value='none'>----- GRUPPEN -----</option> + <!-- BEGIN DYNAMIC BLOCK: Groups --> + <option value='{GDN}'>{GN}</option> + <!-- END DYNAMIC BLOCK: Groups --> + </select> + </td> + </tr> + <tr valign='top'> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Gültigkeitsdauer <br>(Time Range(s)): </b><br> - Zum Löschen einer Time Range<br>Häkchen setzen </td> - <td width='5%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> </td> - <td width='35%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> + <td width='25%' class='tab_d_ohne'><b>Gültigkeitsdauer <br>(Time Range(s)): </b><br> + Zum Löschen einer Time Range<br>Häkchen setzen </td> + <td width='5%' class='tab_d_ohne'> </td> + <td width='35%' class='tab_d_ohne'> Eines der folgenden:<br> - <b>Datum</b> (dd.mm, z.B. 21.03/01.11) <br> @@ -52,7 +83,7 @@ - <b>Wochentag</b> (MO, DI, ... , SO) <br> - <b>X</b> für <b>täglich</b> - <td width='35%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> + <td width='35%' class='tab_d_ohne'> - <b>Uhrzeit</b> (Format: hh, z.B. 07-19)<br> - <b>X</b> für rund um die Uhr @@ -61,16 +92,16 @@ <!-- BEGIN DYNAMIC BLOCK: TRanges --> <tr valign='top'> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> </td> - <td width='5%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> + <td width='25%' class='tab_d_ohne'> </td> + <td width='5%' class='tab_d_ohne'> <input type='checkbox' name='deltr[]' value='{PXEDAY}_{PXEBEG}_{PXEEND}'> </td> - <td width='35%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> + <td width='35%' class='tab_d_ohne'> <input type='Text' name='pxeday[]' value='{PXEDAY}' size='5' maxlength='5' class='medium_form_field'> <input type='hidden' name='oldpxeday[]' value='{PXEDAY}'> <br> - <td width='35%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> + <td width='35%' class='tab_d_ohne'> <input type='Text' name='pxebeg[]' value='{PXEBEG}' size='2' maxlength='2' class='medium_form_field'> <input type='hidden' name='oldpxebeg[]' value='{PXEBEG}'> <b><font size='+1'>:00</b> - </font> <input type='Text' name='pxeend[]' value='{PXEEND}' size='2' maxlength='2' class='medium_form_field'> @@ -80,12 +111,12 @@ <!-- END DYNAMIC BLOCK: TRanges --> <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>Neue Time Range hinzufügen </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> + <td class='tab_d'>Neue Time Range hinzufügen </td> + <td class='tab_d'> </td> + <td class='tab_d'> <input type='Text' name='newpxeday' value='' size='5' maxlength='5' class='medium_form_field'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> + <td class='tab_d'> <input type='Text' name='newpxebeg' value='' size='2' maxlength='2' class='medium_form_field'> <b><font size='+1'>:00</b> - </font> <input type='Text' name='newpxeend' value='' size='2' maxlength='2' class='medium_form_field'> @@ -95,45 +126,12 @@ </tr> </table></td> - </tr> - - + </tr> <tr> - <td height='20'></td> - </tr> - <tr> - <td colspan='4'><h4>PXE Dateiname:</h4> - Achtung: Änderungen hier können zu nicht verwendeten PXE Dateien führen!<br> - Sie sollten hier nur Änderungen vornehmen, wenn der PXE Datei offensichtlich ein falscher Name zugewiesen ist.<br> - Wird z.B. vom betroffenen Rechner die MAC Adresse geändert, so wird dies vom System automatisch an dieser Stelle nachvollzogen. - Diese Feld dient daher primär der Kontrolle.</td> - </tr> - <tr> - <td colspan='4'> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr valign='top'> - <td width='40%' style='border-color: black; border-style: solid; border-width: 3 0 1 0;'> - <b>PXE Dateiname(n): </b><br> - Bei PXE von Gruppen ist für jeden Mitgliedsrechner<br> - der PXE Dateiname aufgelistet. - </td> - <td style='border-color: black; border-style: solid; border-width: 3 0 1 0;'> - <!-- BEGIN DYNAMIC BLOCK: Filenames --> - <input type='Text' name='filename[]' value='{FILE}' size='40' class='medium_form_field'> - <input type='hidden' name='oldfilename[]' value='{FILE}'> - <!-- END DYNAMIC BLOCK: Filenames --> - <input type='Text' name='newfilename' value='' size='40' class='medium_form_field'> - </td> - </tr> - - </table></td> - </tr> - <tr> <td> <input type='hidden' name='nodedn' value='{NODEDN}'> <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='oldpxecn' value='{PXECN}'> + <input type='hidden' name='oldpxecn' value='{PXECN}'> <input type='hidden' name='mnr' value='{MNR}'> <input type='hidden' name='sbmnr' value='{SBMNR}'> <input type='hidden' name='mcnr' value='{MCNR}'> @@ -141,66 +139,8 @@ </form></td> </tr> - - - <tr> - <td height='50'></td> - </tr> - - <tr> - <td colspan='4'><h4>PXE Boot Menü <code class='font_object'>{PXECN}</code> kopieren:</h4> - Beachten Sie, dass die Time Ranges des PXE Boot Menüs nicht kopiert werden. Sie müssen diese anschließend - neu setzen. <br> - Geben Sie bitte den eindeutigen Namen des neuen PXE Boot Menüs an.</td> - </tr> - <tr> - <td colspan='4'> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'> - <form action='pxe_copy.php' method='post'> - - <tr valign='top'> - <td style='border-color: black; border-style: solid; border-width: 3 0 1 0;'><b>Ziel Objekt:</b><br> - (Mehrfachauswahl möglich) </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 3 0 1 0;'> - - <select name='copytargets[]' size='10' multiple class='medium_form_selectbox'> - <option selected value='none'>----------------------------</option> - <option value='{DEFDN}'>DEFAULT</option> - - <option value='none'>---- RECHNER -----</option> - <!-- BEGIN DYNAMIC BLOCK: Hosts --> - <option value='{HDN}'>{HN}</option> - <!-- END DYNAMIC BLOCK: Hosts --> - - <option value='none'>---- GRUPPEN -----</option> - <!-- BEGIN DYNAMIC BLOCK: Groups --> - <option value='{GDN}'>{GN}</option> - <!-- END DYNAMIC BLOCK: Groups --> - </select> - </td> - </tr> - <tr> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Eindeutiger Name (cn):</b><br>(Bitte ohne Leerzeichen eingeben) </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <font size='+2'><b>PXE_</b></font><input type='Text' name='pxecncp' value='{PXECN}' size='50' class='medium_form_field'> - <input type='hidden' name='oldpxecncp' value='{PXECN}'> - </td> - </tr> - - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='oldpxecn' value='{PXECN}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - <input type='hidden' name='deltr' value='{DELTR}'> - - </table></td> - </tr><tr><td> - <input type='Submit' name='apply' value='kopieren' class='small_loginform_button'> - </form></td></tr> - <tr> - <td height='50'></td> + <td height='60'></td> </tr> <tr> @@ -213,8 +153,8 @@ <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - Die PXE Config wird komplett gelöscht. + <td class='tab_d_ohne'> + Die PXE Config wird inklusive aller Client-Zuordnungen auf sie komplett gelöscht. </tr> <input type='hidden' name='dn' value='{PXEDN}'> diff --git a/ldap-site-mngmt/webinterface/computers/pxe.php b/ldap-site-mngmt/webinterface/computers/pxe.php index d4f86026..f92146a2 100644 --- a/ldap-site-mngmt/webinterface/computers/pxe.php +++ b/ldap-site-mngmt/webinterface/computers/pxe.php @@ -13,9 +13,7 @@ $mcnr = -1; ################################################################################### -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; -$mcnr = $_GET['mcnr']; +$mnr = $_GET['mnr']; # Menuleisten erstellen createMainMenu($rollen, $mainnr); @@ -24,6 +22,12 @@ createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); ################################################################################### $pxeDN = $_GET['dn']; + +$template->assign(array("HDN" => "", + "HN" => "", + "GDN" => "", + "GN" => "")); + # DN, CN des übergeordneten Nodes (Host oder Group) $pxednarray = ldap_explode_dn($pxeDN, 0); $nodeDN = implode(',',array_slice($pxednarray,2)); @@ -57,120 +61,48 @@ if (count($pxe['timerange']) > 1){ $template->parse("TRANGES_LIST", ".TRanges"); } -# Filenames -$template->define_dynamic("Filenames", "Webseite"); -if (count($pxe['filename']) > 1){ - foreach($pxe['filename'] as $fi){ - $template->assign(array("FILE" => $fi)); - $template->parse("FILENAMES_LIST", ".Filenames"); - } -}else{ - $exptime = explode('_',$pxe['filename']); - $template->assign(array("FILE" => $pxe['filename'])); - $template->parse("FILENAMES_LIST", ".Filenames"); -} $expcn = explode('_',$pxe['cn']); $name = array_slice($expcn,1); $pxecn = implode('_',$name); -# Bootmenü Einträge -$menuentries = get_menuentries($pxeDN,array("dn","menuposition","label","menulabel","menudefault","menupasswd","menuhide")); -# print_r($menuentries); echo "<br>"; -$maxpos = count($menuentries)+1; -# Globale Parameter $template->assign(array("PXEDN" => $pxeDN, "PXECN" => $pxecn, "TIMERANGE" => $pxe['timerange'], - "TFTP" => $rbsdata['tftpserverip'], - "TFTPFILE" => $rbsdata['tftpclientconfpath'], - #"LDAPURI" => $pxe['ldapuri'], - "FILEURI" => $pxe['fileuri'], - "NODEDN" => $nodeDN, - "NODE" => $nodednarray[0], - "DEFDN" => "cn=rbs,".$auDN, - "OPTLINK" => "<a href='pxe_globals.php?dn=".$pxeDN."&sbmnr=".$sbmnr."' class='headerlink'>", - "BMLINK" => "<a href='pxe_bootmenue.php?dn=".$pxeDN."&sbmnr=".$sbmnr."' class='headerlink'>", - "MNR" => $mnr, - "SBMNR" => $sbmnr, - "MCNR" => $mcnr)); - - -# Für Submenü Einträge -$template->assign(array("SUBRBSDN" => "", - "SUBRBSCN" => "", - "SUBRBSAU" => "")); -if (count($subrbs) != 0){ -$template->define_dynamic("Subrbs", "Webseite"); - foreach ($subrbs as $item){ - $rbsdnexp = ldap_explode_dn($item,1); - $subrbscn = $rbsdnexp[0]; - $subrbsau = $rbsdnexp[2]; - #$subrbsexp = explode(',',$item['dn']); - #$subrbsau = explode('=',$subrbsexp[2]); - $template->assign(array("SUBRBSDN" => $item, - "SUBRBSCN" => $subrbscn, - "SUBRBSAU" => "[ ".$subrbsau." ]")); - $template->parse("SUBRBS_LIST", ".Subrbs"); - } -} + "NODEDN" => $nodeDN, + "NODE" => $nodednarray[0], + "DEFDN" => "cn=rbs,".$auDN, + "OPTLINK" => "<a href='pxe_globals.php?dn=".$pxeDN."&mnr=".$mnr."' class='headerlink'>", + "BMLINK" => "<a href='pxe_bootmenue.php?dn=".$pxeDN."&mnr=".$mnr."' class='headerlink'>", + "MNR" => $mnr, + "SBMNR" => $sbmnr, + "MCNR" => $mcnr)); + -################################################ -# Bootmenü Einträge - -$template->define_dynamic("Bootmenu", "Webseite"); -$template->assign(array("MENDN" => "", - "MENULABEL" => "", - "ANZEIGE" => "Noch kein Bootmenü Eintrag angelegt", - "MEDEF" => "", - "MEPWD" => "", - "MEHIDE" => "", - "BGCDEF" => "", - "POSITION" => "")); -foreach ($menuentries as $me){ - $anzeige = ""; - if ($me['label'] != "" && $me['menulabel'] == ""){$anzeige .= $me['label'];} - if ($me['menulabel'] != ""){$anzeige .= $me['menulabel'];} - if ($me['menudefault'] == 1){$medef = "<b>D</b>"; $bgcdef = "background-color:#EEDD82;";} - if ($me['menupasswd'] != ""){$mepwd = "<b>P</b>";} - if ($me['menuhide'] == 1){$mehide = "<b>H</b>"; $bgcdef = "background-color:#A0A0A0;";} - $template->assign(array("MENDN" => $me['dn'], - "ANZEIGE" => "<a href='menuentry.php?dn=".$me['dn']."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr."' class='headerlink'>".$anzeige."</a>", - "ANZEIGENAME" => $anzeige, - "POSITION" => $me['menuposition'], - "MEDEF" => $medef, - "MEPWD" => $mepwd, - "MEHIDE" => $mehide, - "BGCDEF" => $bgcdef, - "AUDN" => $auDN)); - $template->parse("BOOTMENU_LIST", ".Bootmenu"); - $medef = ""; - $bgcdef = ""; -} ################################################ -# PXE kopieren +# PXE zuordnen $hostorgroup = $exp[0]; $hgexp = explode('=',$exp[0]); -$hosts_array = get_hosts($auDN,array("dn","hostname")); +$hosts_array = get_hosts($auDN,array("dn","hostname"),""); $groups_array = get_groups($auDN,array("dn","cn")); $template->define_dynamic("Hosts", "Webseite"); foreach ($hosts_array as $item){ $template->assign(array("HDN" => $item['dn'], "HN" => $item['hostname'])); - $template->parse("HOSTS_LIST", ".Hosts"); + $template->parse("HOSTS_LIST", ".Hosts"); } $template->define_dynamic("Groups", "Webseite"); foreach ($groups_array as $item){ $template->assign(array("GDN" => $item['dn'], "GN" => $item['cn'])); - $template->parse("GROUPS_LIST", ".Groups"); + $template->parse("GROUPS_LIST", ".Groups"); } $dnexp = ldap_explode_dn($pxeDN, 1); diff --git a/ldap-site-mngmt/webinterface/computers/pxe_add.php b/ldap-site-mngmt/webinterface/computers/pxe_add.php index ef245f4d..db1dabe2 100644 --- a/ldap-site-mngmt/webinterface/computers/pxe_add.php +++ b/ldap-site-mngmt/webinterface/computers/pxe_add.php @@ -11,8 +11,6 @@ $pxeend = $_POST['pxeend']; $pxeend = htmlentities($pxeend); $conffile = $_POST['conffile']; $conffile = htmlentities($conffile); $mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; $targets = $_POST['targets']; #print_r($targets); echo "<br>"; @@ -24,7 +22,7 @@ for ($i=0; $i<count($n); $i++){ } #echo "Zielobjekte: ";print_r($targets); echo "<br>"; -$pxeattribs = $_POST['pxeattribs']; +$pxeattribs = $_POST['attribs']; if (count($pxeattribs) != 0){ foreach (array_keys($pxeattribs) as $key){ $pxeatts[$key] = htmlentities($pxeattribs[$key]); @@ -37,7 +35,7 @@ $get_pxecn = str_replace ( " ", "_", $pxecn ); $get_pxeday = str_replace ( " ", "_", $pxeday ); $get_pxebeg = str_replace ( " ", "_", $pxebeg ); $get_pxeend = str_replace ( " ", "_", $pxeend ); -$url = "new_pxe.php?pxecn=".$get_pxecn."&pxeday=".$get_pxeday."&pxebeg=".$get_pxebeg."&pxeend=".$get_pxeend."&mnr=".$mnr."&sbmnr=".$sbmnr; +$url = "new_pxe.php?pxecn=".$get_pxecn."&pxeday=".$get_pxeday."&pxebeg=".$get_pxebeg."&pxeend=".$get_pxeend."&mnr=".$mnr; echo " <html> @@ -135,7 +133,6 @@ if ( $pxecn != "" && $pxecn != "Hier_PXE_NAME_eintragen" && $rbsDN != "none" ){ $pxebeg = preg_replace ( '/0([0-9])/', '$1', $pxebeg); $pxeend = preg_replace ( '/0([0-9])/', '$1', $pxeend); - print_r($nodeDN); # TimeRange auf Überschneidung mit vorhandenen checken if(check_timerange_pxe($pxeday,$pxebeg,$pxeend,$targetDN,"")){ $pxetimerange = $pxeday."_".$pxebeg."_".$pxeend; diff --git a/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.dwt b/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.dwt index ac6261b6..5c3986b3 100644 --- a/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.dwt +++ b/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.dwt @@ -1,7 +1,7 @@ <table border='0' cellpadding='5' cellspacing='0' width='100%'> <tr> - <td colspan='4' height='20'><h4><a href='{NODETYP}.php?dn={NODEDN}&mnr=1&sbmnr={SBMNR}&mcnr=-1' class='headerlink'><< Zurück zu Rechner {NODE}</a></h4></td> + <td colspan='4' height='20'><h4><a href='pxeconfigs.php' class='headerlink'><< Zurück zur Übersicht PXE Configs</a></h4></td> </tr> <tr> <td height='20'> </td> diff --git a/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.php b/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.php index e916048b..29d6e338 100644 --- a/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.php +++ b/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.php @@ -13,9 +13,7 @@ $mcnr = -1; ################################################################################### -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; -$mcnr = $_GET['mcnr']; +$mnr = $_GET['mnr']; # Menuleisten erstellen createMainMenu($rollen, $mainnr); @@ -87,12 +85,11 @@ $template->assign(array("PXEDN" => $pxeDN, "NODEDN" => $nodeDN, "NODE" => $nodednarray[0], "DEFDN" => "cn=rbs,".$auDN, - "PXELINK" => "<a href='pxe.php?dn=".$pxeDN."&sbmnr=".$sbmnr."' class='headerlink'>", - "OPTLINK" => "<a href='pxe_globals.php?dn=".$pxeDN."&sbmnr=".$sbmnr."' class='headerlink'>", + "PXELINK" => "<a href='pxe.php?dn=".$pxeDN."&mnr=".$mnr."' class='headerlink'>", + "OPTLINK" => "<a href='pxe_globals.php?dn=".$pxeDN."&mnr=".$mnr."' class='headerlink'>", "MNR" => $mnr, - "SBMNR" => $sbmnr, - "MCNR" => $mcnr)); - + "SBMNR" => $sbmnr)); + # Für Submenü Einträge $template->assign(array("SUBRBSDN" => "", @@ -147,48 +144,8 @@ foreach ($menuentries as $me){ } -################################################ -# PXE kopieren - -$hostorgroup = $exp[0]; -$hgexp = explode('=',$exp[0]); - - -$hosts_array = get_hosts($auDN,array("dn","hostname")); -$groups_array = get_groups($auDN,array("dn","cn")); - -$template->define_dynamic("Hosts", "Webseite"); -foreach ($hosts_array as $item){ - $template->assign(array("HDN" => $item['dn'], - "HN" => $item['hostname'])); - $template->parse("HOSTS_LIST", ".Hosts"); -} -$template->define_dynamic("Groups", "Webseite"); -foreach ($groups_array as $item){ - $template->assign(array("GDN" => $item['dn'], - "GN" => $item['cn'])); - $template->parse("GROUPS_LIST", ".Groups"); -} - -$dnexp = ldap_explode_dn($pxeDN, 1); -if ($dnexp[2] == "computers"){ - $nodetyp = "rbshost"; -} -if ($dnexp[2] == "groups"){ - $nodetyp = "group"; -} -# falls TR vorhanden dann soll sie gelöscht werden (flag deltr setzen) -if (count($pxe['timerange']) != 0){ - $template->assign(array("DELTR" => "1", - "NODETYP" => $nodetyp)); -} -else{ - $template->assign(array("DELTR" => "0", - "NODETYP" => $nodetyp)); -} - ################################################################################### include("computers_footer.inc.php"); -?> +?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/pxe_globals.dwt b/ldap-site-mngmt/webinterface/computers/pxe_globals.dwt index 78b89481..f0497183 100644 --- a/ldap-site-mngmt/webinterface/computers/pxe_globals.dwt +++ b/ldap-site-mngmt/webinterface/computers/pxe_globals.dwt @@ -1,7 +1,7 @@ <table border='0' cellpadding='5' cellspacing='0' width='100%'> <tr> - <td colspan='4' height='20'><h4><a href='{NODETYP}.php?dn={NODEDN}&mnr=1&sbmnr={SBMNR}&mcnr=-1' class='headerlink'><< Zurück zu Rechner {NODE}</a></h4></td> + <td colspan='4' height='20'><h4><a href='pxeconfigs.php' class='headerlink'><< Zurück zur Übersicht PXE Configs</a></h4></td> </tr> <tr> <td height='20'> </td> diff --git a/ldap-site-mngmt/webinterface/computers/pxe_globals.php b/ldap-site-mngmt/webinterface/computers/pxe_globals.php index 0bfdaee6..211a47c8 100644 --- a/ldap-site-mngmt/webinterface/computers/pxe_globals.php +++ b/ldap-site-mngmt/webinterface/computers/pxe_globals.php @@ -13,9 +13,7 @@ $mcnr = -1; ################################################################################### -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; -$mcnr = $_GET['mcnr']; +$mnr = $_GET['mnr']; # Menuleisten erstellen createMainMenu($rollen, $mainnr); @@ -57,27 +55,6 @@ if (count($pxe['timerange']) > 1){ $template->parse("TRANGES_LIST", ".TRanges"); } -# Filenames -$template->define_dynamic("Filenames", "Webseite"); -if (count($pxe['filename']) > 1){ - foreach($pxe['filename'] as $fi){ - $template->assign(array("FILE" => $fi)); - $template->parse("FILENAMES_LIST", ".Filenames"); - } -}else{ - $exptime = explode('_',$pxe['filename']); - $template->assign(array("FILE" => $pxe['filename'])); - $template->parse("FILENAMES_LIST", ".Filenames"); -} - -$expcn = explode('_',$pxe['cn']); -$name = array_slice($expcn,1); -$pxecn = implode('_',$name); - -# Bootmenü Einträge -$menuentries = get_menuentries($pxeDN,array("dn","menuposition","label","menulabel","menudefault","menupasswd","menuhide")); -# print_r($menuentries); echo "<br>"; -$maxpos = count($menuentries)+1; # Globale Parameter $template->assign(array("PXEDN" => $pxeDN, @@ -106,105 +83,11 @@ $template->assign(array("PXEDN" => $pxeDN, "NODEDN" => $nodeDN, "NODE" => $nodednarray[0], "DEFDN" => "cn=rbs,".$auDN, - "PXELINK" => "<a href='pxe.php?dn=".$pxeDN."&sbmnr=".$sbmnr."' class='headerlink'>", - "BMLINK" => "<a href='pxe_bootmenue.php?dn=".$pxeDN."&sbmnr=".$sbmnr."' class='headerlink'>", + "PXELINK" => "<a href='pxe.php?dn=".$pxeDN."&mnr=".$mnr."' class='headerlink'>", + "BMLINK" => "<a href='pxe_bootmenue.php?dn=".$pxeDN."&mnr=".$mnr."' class='headerlink'>", "MNR" => $mnr, - "SBMNR" => $sbmnr, - "MCNR" => $mcnr)); - - -# Für Submenü Einträge -$template->assign(array("SUBRBSDN" => "", - "SUBRBSCN" => "", - "SUBRBSAU" => "")); -if (count($subrbs) != 0){ -$template->define_dynamic("Subrbs", "Webseite"); - foreach ($subrbs as $item){ - $rbsdnexp = ldap_explode_dn($item,1); - $subrbscn = $rbsdnexp[0]; - $subrbsau = $rbsdnexp[2]; - #$subrbsexp = explode(',',$item['dn']); - #$subrbsau = explode('=',$subrbsexp[2]); - $template->assign(array("SUBRBSDN" => $item, - "SUBRBSCN" => $subrbscn, - "SUBRBSAU" => "[ ".$subrbsau." ]")); - $template->parse("SUBRBS_LIST", ".Subrbs"); - } -} - -################################################ -# Bootmenü Einträge - -$template->define_dynamic("Bootmenu", "Webseite"); -$template->assign(array("MENDN" => "", - "MENULABEL" => "", - "ANZEIGE" => "Noch kein Bootmenü Eintrag angelegt", - "MEDEF" => "", - "MEPWD" => "", - "MEHIDE" => "", - "BGCDEF" => "", - "POSITION" => "")); -foreach ($menuentries as $me){ - $anzeige = ""; - if ($me['label'] != "" && $me['menulabel'] == ""){$anzeige .= $me['label'];} - if ($me['menulabel'] != ""){$anzeige .= $me['menulabel'];} - if ($me['menudefault'] == 1){$medef = "<b>D</b>"; $bgcdef = "background-color:#EEDD82;";} - if ($me['menupasswd'] != ""){$mepwd = "<b>P</b>";} - if ($me['menuhide'] == 1){$mehide = "<b>H</b>"; $bgcdef = "background-color:#A0A0A0;";} - $template->assign(array("MENDN" => $me['dn'], - "ANZEIGE" => "<a href='menuentry.php?dn=".$me['dn']."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr."' class='headerlink'>".$anzeige."</a>", - "ANZEIGENAME" => $anzeige, - "POSITION" => $me['menuposition'], - "MEDEF" => $medef, - "MEPWD" => $mepwd, - "MEHIDE" => $mehide, - "BGCDEF" => $bgcdef, - "AUDN" => $auDN)); - $template->parse("BOOTMENU_LIST", ".Bootmenu"); - $medef = ""; - $bgcdef = ""; -} - - -################################################ -# PXE kopieren + "SBMNR" => $sbmnr)); -$hostorgroup = $exp[0]; -$hgexp = explode('=',$exp[0]); - - -$hosts_array = get_hosts($auDN,array("dn","hostname")); -$groups_array = get_groups($auDN,array("dn","cn")); - -$template->define_dynamic("Hosts", "Webseite"); -foreach ($hosts_array as $item){ - $template->assign(array("HDN" => $item['dn'], - "HN" => $item['hostname'])); - $template->parse("HOSTS_LIST", ".Hosts"); -} -$template->define_dynamic("Groups", "Webseite"); -foreach ($groups_array as $item){ - $template->assign(array("GDN" => $item['dn'], - "GN" => $item['cn'])); - $template->parse("GROUPS_LIST", ".Groups"); -} - -$dnexp = ldap_explode_dn($pxeDN, 1); -if ($dnexp[2] == "computers"){ - $nodetyp = "rbshost"; -} -if ($dnexp[2] == "groups"){ - $nodetyp = "group"; -} -# falls TR vorhanden dann soll sie gelöscht werden (flag deltr setzen) -if (count($pxe['timerange']) != 0){ - $template->assign(array("DELTR" => "1", - "NODETYP" => $nodetyp)); -} -else{ - $template->assign(array("DELTR" => "0", - "NODETYP" => $nodetyp)); -} ################################################################################### diff --git a/ldap-site-mngmt/webinterface/computers/pxeconfigs.dwt b/ldap-site-mngmt/webinterface/computers/pxeconfigs.dwt new file mode 100644 index 00000000..428eb13b --- /dev/null +++ b/ldap-site-mngmt/webinterface/computers/pxeconfigs.dwt @@ -0,0 +1,318 @@ +<table border='0' cellpadding='5' cellspacing='0' width='100%'> + <tr> + <td colspan='4'><h3>PXE Konfigurationen (Boot Menüs) <code class='font_object'> {AU} </code> </h3></td> + </tr> + + <tr><td colspan='4'> + <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> + <tr> + <td width='20%' class='tab_h'><b>PXE Config</b></td> + <td width='20%' class='tab_h'><b>gültig für Client(s)</b></td> + <td width='30%' class='tab_h'><b>Time Range (Gültigkeitsdauer)</b></td> + <td width='30%' class='tab_h'><b> </b></td> + </tr> + + + + <!-- BEGIN DYNAMIC BLOCK: Pxeconf --> + <tr valign='top'> + <td class='tab_d'>{PXECN} </td> + <td class='tab_d'>{PXECLIENTS} </td> + <td class='tab_d'>{TRANGES} </td> + <td class='tab_d'> </td> + </tr> + <!-- END DYNAMIC BLOCK: Pxeconf --> + + </table></td> + </tr> + + + <tr> + <td height='50'></td> + </tr> + + <tr> + <td colspan='4'><h4>Wochen Übersicht PXE Configs:</h4></td> + </tr> + <tr valign='top'> + <td width="70%"> + <table cellpadding='0' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> + <tr align='center'> + <td width='9%' style='border-color: black; border-style: solid; border-width: 2 0 2 2;'><b>Uhrzeit</b></td> + <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Montag</b></td> + <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Dienstag</b></td> + <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Mittwoch</b></td> + <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Donnerstag</b></td> + <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Freitag</b></td> + <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Samstag</b></td> + <td width='13%' style='border-color: black; border-style: solid; border-width: 2 2 2 1;'><b>Sonntag</b></td> + </tr> + <tr heigth='2' align='center'> + <td width='9%' style='border-color: black; border-style: solid; border-width: 0 0 0 2;'>0</td> + <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A0}'> </td> + <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B0}'> </td> + <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C0}'> </td> + <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D0}'> </td> + <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E0}'> </td> + <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F0}'> </td> + <td width='13%' style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G0}'> </td> + </tr> + <tr heigth='2' align='center'> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A1}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B1}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C1}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D1}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E1}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F1}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G1}'> </td> + </tr> + <tr heigth='2' align='center'> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>2</td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A2}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B2}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C2}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D2}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E2}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F2}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G2}'> </td> + </tr> + <tr heigth='2' align='center'> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A3}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B3}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C3}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D3}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E3}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F3}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G3}'> </td> + </tr> + <tr heigth='2' align='center'> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>4</td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A4}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B4}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C4}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D4}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E4}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F4}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G4}'> </td> + </tr> + <tr heigth='2' align='center'> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A5}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B5}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C5}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D5}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E5}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F5}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G5}'> </td> + </tr> + <tr heigth='2' align='center'> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>6</td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A6}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B6}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C6}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D6}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E6}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F6}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G6}'> </td> + </tr> + <tr heigth='2' align='center'> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A7}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B7}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C7}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D7}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E7}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F7}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G7}'> </td> + </tr> + <tr heigth='2' align='center'> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>8</td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A8}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B8}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C8}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D8}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E8}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F8}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G8}'> </td> + </tr> + <tr heigth='2' align='center'> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A9}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B9}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C9}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D9}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E9}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F9}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G9}'> </td> + </tr> + <tr heigth='2' align='center'> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>10</td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A10}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B10}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C10}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D10}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E10}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F10}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G10}'> </td> + </tr> + <tr heigth='2' align='center'> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A11}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B11}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C11}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D11}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E11}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F11}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G11}'> </td> + </tr> + <tr heigth='2' align='center'> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>12</td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A12}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B12}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C12}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D12}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E12}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F12}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G12}'> </td> + </tr> + <tr heigth='2' align='center'> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A13}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B13}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C13}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D13}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E13}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F13}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G13}'> </td> + </tr> + <tr heigth='2' align='center'> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>14</td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A14}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B14}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C14}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D14}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E14}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F14}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G14}'> </td> + </tr> + <tr heigth='2' align='center'> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A15}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B15}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C15}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D15}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E15}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F15}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G15}'> </td> + </tr> + <tr heigth='2' align='center'> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>16</td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A16}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B16}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C16}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D16}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E16}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F16}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G16}'> </td> + </tr> + <tr heigth='2' align='center'> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A17}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B17}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C17}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D17}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E17}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F17}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G17}'> </td> + </tr> + <tr heigth='2' align='center'> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>18</td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A18}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B18}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C18}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D18}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E18}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F18}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G18}'> </td> + </tr> + <tr heigth='2' align='center'> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A19}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B19}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C19}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D19}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E19}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F19}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G19}'> </td> + </tr> + <tr heigth='2' align='center'> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>20</td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A20}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B20}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C20}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D20}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E20}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F20}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G20}'> </td> + </tr> + <tr heigth='2' align='center'> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A21}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B21}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C21}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D21}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E21}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F21}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G21}'> </td> + </tr> + <tr heigth='2' align='center'> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>22</td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A22}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B22}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C22}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D22}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E22}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F22}'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G22}'> </td> + </tr> + <tr heigth='2' align='center'> + <td style='border-color: black; border-style: solid; border-width: 0 0 2 2;'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{A23}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{B23}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{C23}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{D23}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{E23}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{F23}'> </td> + <td style='border-color: black; border-style: solid; border-width: 0 2 2 1;{G23}'> </td> + </tr> + + </table></td> + + <td width="30%"> + <table cellpadding='3' cellspacing='3' border='1' align='left' width='50%' style='border-width: 0 0 0 0;'> + <tr> + <td width='65%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>PXE Config</b></td> + <td width='5%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> </td> + <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Farbe</b></td> + </tr> + + <tr> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'>No Config </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 1 1 1;'> </td> + </tr> + + <!-- BEGIN DYNAMIC BLOCK: Legende --> + <tr> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'>{PXEPLANDESC} </td> + <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> </td> + <td style='border-color: black; border-style: solid; border-width: 1 1 1 1;background-color:{COLOR};'> </td> + </tr> + <!-- END DYNAMIC BLOCK: Legende --> + + </table></td> + </tr> + +</table> diff --git a/ldap-site-mngmt/webinterface/computers/pxeconfigs.php b/ldap-site-mngmt/webinterface/computers/pxeconfigs.php new file mode 100644 index 00000000..95d1abfd --- /dev/null +++ b/ldap-site-mngmt/webinterface/computers/pxeconfigs.php @@ -0,0 +1,92 @@ +<?php + +include('../standard_header.inc.php'); + +# Dateiname und evtl. Pfad des Templates für die Webseite +$webseite = "pxeconfigs.dwt"; + +include('computers_header.inc.php'); + +################################################################################### + +$mnr = 2; +$sbmnr = -1; +$mcnr = -1; + +# Menuleisten erstellen +createMainMenu($rollen, $mainnr); +createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); + +################################################################################### + +$rbsDN = $_GET['rbsdn']; + +$template->assign(array("PXEDN" => "", + "PXECN" => "Noch keine PXE Boot Konfiguration angelegt", + "TRANGES" => "", + "PXECLIENTS" => "", + "RBS" => "", + "CN" => "")); + +$pxe_array = get_pxeconfigs2("",array("dn","cn","timerange","rbservicedn","pxeclientdn")); + +$template->define_dynamic("Pxeconf", "Webseite"); + +for ($i=0; $i<count($pxe_array); $i++){ + + # PXE Config Name + $pxename = "<a href='pxe.php?dn=".$pxe_array[$i]['dn']."&mnr=".$mnr."&sbmnr=".$i."' class='headerlink'>".$pxe_array[$i]['cn']."</a><br>"; + + # Timerange Komponenten + $trange = ""; + if (count($pxe_array[$i]['timerange']) > 1 ){ + foreach ($pxe_array[$i]['timerange'] as $tr){ + $exptime = array_merge(explode('_',$tr),$pxe_array[$i]['cn']); + $wopltranges[$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 / "; + } + }elseif (count($pxe_array[$i]['timerange']) == 1 ){ + $exptime = array_merge(explode('_',$pxe_array[$i]['timerange']), array($pxe_array[$i]['cn'])); + $wopltranges[$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"; + } + + # PXE Config Clients + $pxeclients = ""; + if (count($pxe_array[$i]['pxeclientdn']) > 1 ){ + #echo "ClientsARRAY: "; print_r($pxe_array[$i]['pxeclientdn']); echo "<br>"; + foreach ($pxe_array[$i]['pxeclientdn'] as $item) { + $pxecldn = ldap_explode_dn($item, 1); + $pxeclients .= $pxecldn[0]."<br>"; + } + + }elseif (count($pxe_array[$i]['pxeclientdn']) == 1 ){ + $pxecldn = ldap_explode_dn($pxe_array[$i]['pxeclientdn'], 1); + $pxeclients = $pxecldn[0]; + } + + $template->assign(array("PXEDN" => $pxe_array[$i]['dn'], + "PXECN" => $pxename, + "TRANGES" => $trange, + "PXECLIENTS" => $pxeclients, + "RBS" => $rbsDN, + "MNR" => $mnr, + "SBMNR" => $sbmnr, + "AUDN" => $auDN)); + $template->parse("PXECONF_LIST", ".Pxeconf"); + +} + + +include("pxe_wochenplan.php"); + + +################################################################################### + +include("computers_footer.inc.php"); + +?> diff --git a/ldap-site-mngmt/webinterface/computers/rbshost.dwt b/ldap-site-mngmt/webinterface/computers/rbshost.dwt index 59baf810..abff2cd8 100644 --- a/ldap-site-mngmt/webinterface/computers/rbshost.dwt +++ b/ldap-site-mngmt/webinterface/computers/rbshost.dwt @@ -3,7 +3,7 @@ <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 1;'><h4>{HOSTLINK} Allgemein </a></h4></td> <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{DHCPLINK} DHCP </a></h4></td> <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4><code class='font_object'> RBS/PXE </code></h4></td> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{HWLINK} Hardware </a></h4></td> + <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{HWLINK} Geo/Hardware </a></h4></td> <td> </td> </tr> <tr> diff --git a/ldap-site-mngmt/webinterface/computers/rbshost.php b/ldap-site-mngmt/webinterface/computers/rbshost.php index 101c5171..b28e0726 100644 --- a/ldap-site-mngmt/webinterface/computers/rbshost.php +++ b/ldap-site-mngmt/webinterface/computers/rbshost.php @@ -7,7 +7,7 @@ $webseite = "rbshost.dwt"; include('computers_header.inc.php'); -$mnr = 1; +$mnr = 0; $sbmnr = -1; $mcnr = -1; @@ -68,7 +68,7 @@ if (count($altrbs) != 0){ } } $rbs_selectbox .= "<option value=''>Kein RBS</option> - </select></td>"; + </select></td>"; # RBS Daten if ($rbsDN == ""){ @@ -128,7 +128,7 @@ $template->assign(array("HOSTDN" => $hostDN, # Rechnerspezifische PXEs -$hostpxeconfigs = get_pxeconfigs($hostDN, array("dn","cn","description","timerange")); +$hostpxeconfigs = get_pxeconfigs2($hostDN, array("dn","cn","description","timerange")); $template->assign(array("PXEDN" => "", "PXECN" => "Keine PXE Config angelegt", @@ -170,7 +170,8 @@ if (count($hostpxeconfigs) != 0){ $template->assign(array("DEFPXEDN" => "", "DEFPXECN" => "Keine PXE Config angelegt", "DEFPXEDESC" => "", - "DEFPXETR" => "",)); + "DEFPXETR" => "", + "PXEPLANDESC" => "")); $template->define_dynamic("Defpxes", "Webseite"); if ($rbsDN != ""){ @@ -206,7 +207,7 @@ if ($rbsDN != ""){ } } } -} +#} ########################################################## # PXE Wochenübersicht @@ -240,6 +241,8 @@ for ($i=0; $i<count($hostpxeconfigs); $i++){ include("pxe_wochenplan.php"); +} + ################################################################################### include("computers_footer.inc.php"); |
