diff options
Diffstat (limited to 'ldap-site-mngmt/webinterface/computers')
79 files changed, 0 insertions, 10907 deletions
diff --git a/ldap-site-mngmt/webinterface/computers/computers.dwt b/ldap-site-mngmt/webinterface/computers/computers.dwt deleted file mode 100644 index 933ab60d..00000000 --- a/ldap-site-mngmt/webinterface/computers/computers.dwt +++ /dev/null @@ -1,85 +0,0 @@ -<html> - -<head> - <title>{SEITENTITEL}</title> - <link rel='stylesheet' href='../styles.css' type='text/css'></head> -<body> - -<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='30%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr valign='top'> - <td width='1'></td> - <td><h2>Client / IP Management</h2></td> - </tr> - </table> - </td> - - <td width='45%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr valign='top' align='left'> - <td> - <h4><a href='../start.php' class='headerlink'>Startseite</a> - >> <a href='../au/au.php' class='headerlink'>{AU}</a> [ {DOMAIN} ]</h4> - </td> - </tr> - </table> - </td> - <td width='25%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%' align='right'> - <tr valign='top' align='right'> - <td> - {LOGIN} - </td> - </tr> - </table> - </td> - </tr> - <tr> - <td colspan='3'>{MAINMENU}</td> - </tr> -</table> - -<!--<hr align='center' width='98%' noshade>--> -<br> - - -<table cellpadding='5' cellspacing='0' border='0' width='100%' height='85%'> - - <tr valign='top' height='100%'> - <td width='28%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr> - <td> - - {NAVIGATION} - - </td> - </tr> - <tr> - <td> - - {IPBLOCKS} - - </td> - </tr> - </table> - </td> - - <td width='72%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr><td> - - {HAUPTFENSTER} - - </td></tr> - </table> - </td> - - </tr> -</table> - -</body> - -</html> diff --git a/ldap-site-mngmt/webinterface/computers/computers.php b/ldap-site-mngmt/webinterface/computers/computers.php deleted file mode 100644 index ea365d76..00000000 --- a/ldap-site-mngmt/webinterface/computers/computers.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "computers_start.dwt"; - -include('computers_header.inc.php'); - -$mnr = 0; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/computers_footer.inc.php b/ldap-site-mngmt/webinterface/computers/computers_footer.inc.php deleted file mode 100644 index 7849823e..00000000 --- a/ldap-site-mngmt/webinterface/computers/computers_footer.inc.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -$template->assign(array("PFAD" => $START_PATH)); - -# Daten in die Vorlage parsen -$template->parse("LOGIN", "Login"); -$template->parse("MAINMENU", "Mmenu"); -$template->parse("NAVIGATION", "Menu"); -$template->parse("IPBLOCKS", "IPBlocks"); -$template->parse("HAUPTFENSTER", "Webseite"); -$template->parse("PAGE", "Vorlage"); - -# Fertige Seite an den Browser senden -$template->FastPrint("PAGE"); - -# Abmelden vom LDAP -ldap_unbind($ds); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/computers_header.inc.php b/ldap-site-mngmt/webinterface/computers/computers_header.inc.php deleted file mode 100644 index d6bc3746..00000000 --- a/ldap-site-mngmt/webinterface/computers/computers_header.inc.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php - -# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt. -$titel = "Computers Management"; -# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc. -$mainnr = 1; - - -$template = new FastTemplate("."); -# dem erstellten Template-Objekt eine Vorlage zuweisen -$definedTemplates = array("Vorlage" => "computers.dwt", - "Login" => "../logout_form.inc.dwt", - "Mmenu" => "../hauptmenue.dwt", - "Menu" => "menu.dwt", - "IPBlocks" => "../common/ipblocks.dwt", - "Webseite" => $webseite); -if (isset($additionalTemplates)) { - foreach ($additionalTemplates as $templateKey => $templateFile) { - $definedTemplates[$templateKey] = $templateFile; - } -} -$template->define($definedTemplates); -$template->assign(array("SEITENTITEL" => $titel, "AU" => $au_ou, "DOMAIN" => $assocdom, "USERCN" => $usercn)); - - -include("computers_menu.php"); -include("../common/ip_blocks.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/computers_menu.php b/ldap-site-mngmt/webinterface/computers/computers_menu.php deleted file mode 100644 index 1ab98526..00000000 --- a/ldap-site-mngmt/webinterface/computers/computers_menu.php +++ /dev/null @@ -1,250 +0,0 @@ -<?php - -function createComputersMenu($rollen , $mnr, $auDN, $sbmnr, $mcnr) { - - global $template, $ds, $suffix, $START_PATH; - - $mipb_array = get_maxipblocks_au($auDN); - #print_r($mipb_array); - if ( $mipb_array[0] == "" ){ - $iprechnerlink = "no_ip.php?mnr=2"; - }else{ - $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?sort=hostname", - "text" => "Übersicht Rechner", - "zugriff" => array("MainAdmin","HostAdmin","DhcpAdmin")), - array("link" => $iprechnerlink, - "text" => "IP Adressen Rechner", - "zugriff" => array("MainAdmin","DhcpAdmin","HostAdmin")), - #array("link" => "groupoverview.php", - # "text" => "Rechnergruppen", - # "zugriff" => array("MainAdmin")), - #array("link" => "machineconfig_default.php", - # "text" => "Default MachineConfigs", - # "zugriff" => array("MainAdmin","HostAdmin")), - #array("link" => "new_mcdef.php", - # "text" => "Neue MachineConfig", - # "zugriff" => array("MainAdmin","HostAdmin")), - array("link" => "pxeconfigs.php", - "text" => "PXE Configs", - "zugriff" => array("MainAdmin","DhcpAdmin"))); - - # Submenus - /*$computers_array = get_hosts($auDN,array("dn","hostname","ou")); - for($n=0;$n<count($computers_array);$n++){ - - $comps[] = array("link" => "host.php?dn=".$computers_array[$n]['dn']."&sbmnr=".$n, - "text" => $computers_array[$n]['hostname'], - "zugriff" => array("MainAdmin","HostAdmin","DhcpAdmin")); - # print_r($comps); echo "<br>"; - }*/ - $comps[] = array("link" => "new_host.php?sbmnr=0", #.$n, - "text" => "Neuen Rechner anlegen", - "zugriff" => array("MainAdmin","DhcpAdmin","HostAdmin")); - - $groups_array = get_groups($auDN,array("dn","cn")); - for($n=0;$n<count($groups_array);$n++){ - - $groups = array(); - $groups[] = array("link" => "group.php?dn=".$groups_array[$n]['dn']."&sbmnr=".$n, - "text" => $groups_array[$n]['cn'], - "zugriff" => array("MainAdmin","DhcpAdmin","HostAdmin")); - - } - $groups[] = array("link" => "new_group.php?sbmnr=".$n, - "text" => "Neue Gruppe anlegen", - "zugriff" => array("MainAdmin","DhcpAdmin","HostAdmin")); - - # default machine-configs - $mcdef_array = get_machineconfigs("cn=computers,".$auDN,array("dn","cn","timerange")); - for($n=0;$n<count($mcdef_array);$n++){ - $defmc [] = array("link" => "mcdef.php?dn=".$mcdef_array[$n]['dn']."&mnr=3&sbmnr=".$n, - "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(), - $comps, - array(), - #$groups, - #$defmc, - $newpxe); - #echo "submenu: ";print_r($submenu);echo "<br><br>"; - - # Zusammenstellen der Menuleiste - $template->define_dynamic("Hauptmenu", "Menu"); - $template->define_dynamic("Submenu", "Menu"); - $i=0; - - $maxmenu = count($hauptmenu); - foreach($hauptmenu as $item){ - $template->clear_parse("SUBMENU_LIST"); - - if($item['zugriff'] === "alle" || vergleicheArrays($rollen , $item['zugriff'])) { - - ######################################################################### - # SUBMENU - - $subempty = 0; - $j=0; - $maxsub = count($submenu[$mnr]); - #echo "_"; print_r($maxsub); echo "_"; - if($maxsub > 0){ - foreach($submenu[$mnr] as $item2) { - - if($item2['zugriff'] === "alle" || vergleicheArrays($rollen, $item2['zugriff'])) { - - - if($i != $mnr){ - $template->assign(array("SUB" => "")); - # "LINK_S" => "", - # "TEXT_S" => "")); - $template->parse("SUBMENU_LIST", ".Submenu"); - $template->clear_dynamic("Submenu"); - } - else{ - if ($j==0) { - if ($sbmnr==0) { - if($maxsub == 1){$zwisch2="branchbottom2";} - else {$zwisch2="branch2";} - $lastaktive=true; - $farb="#505050"; - } - else{ - if ($maxsub == 1) {$zwisch2="branchbottom2";} - # Wenn Unter-Unter-Menu ... - #if(count($subsubmenu[$i][$j][0]) != 0){ - #if($maxsub == 1){$zwisch2="<a href='".$item2['link']."' style='border-style=none;text-decoration:none'> - # <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";} - #else {$zwisch2="<a href='".$item2['link']."' style='border-style=none;text-decoration:none'> - # <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";} - #} - else{$zwisch2="branch2";} - $farb="#A0A0A0"; - $lastaktive=false; - } - } - else { - if ($sbmnr==$j) { - if($maxsub == $j+1){$zwisch2="branchbottom2";} - else {$zwisch2="branch2";} - $lastaktive=true; - $farb="#505050"; - } - else { - if ($maxsub == $j+1) {$zwisch2="branchbottom2";} - # Wenn Unter-Unter-Menu ... - #if(count($subsubmenu[$i][$j][0]) != 0){ - # if($maxsub == $i+1){$zwisch2="<a href='".$item2['link']."' style='border-style=none;text-decoration:none'> - # <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";} - # else {$zwisch2="<a href='".$item2['link']."' style='border-style=none;text-decoration:none'> - # <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";} - #} - else{$zwisch2="branch2";} - $farb="#A0A0A0"; - $lastaktive=false; - } - } - $htmlcode= " - <tr height='4'> - <td></td><td align='right'><img src='../pics/line2.gif' height='4'></td><td></td><td></td> - </tr> - <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='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'><code class='submenue_schrift'>".$item2['text']."</code></a></td> - <td width='10%'> </td> - </tr> - "; - $template->assign(array("SUB" => $htmlcode)); - $template->assign(array("FARBE_S" => $farb)); - $template->parse("SUBMENU_LIST", ".Submenu"); - $template->clear_dynamic("Submenu"); - } - } - else { - $subempty++; - } - $j=$j+1; - } - } - if($subempty == count($submenu[$mnr])) { - $template->assign(array("SUB" => "")); - # "LINK_S" => "", - # "TEXT_S" => "")); - $template->parse("SUBMENU_LIST", ".Submenu"); - $template->clear_dynamic("Submenu"); - - } - # SUBMENU - ##################################################################### - - if ($i==0) { - if ($mnr==0) { - if(count($submenu[$i][0]) != 0){ - if($maxmenu == 1){$zwisch="";} # {$zwisch="<img style='border-width:0;border-style=none;' src='../pics/minus2.gif'>";} - else {$zwisch="";} - }else{$zwisch="";} - $lastaktive=true; - $farb="#505050"; - } - else{ - if(count($submenu[$i][0]) != 0){ - if($maxmenu == 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>";} - else {$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>";} - }else{$zwisch="";} - $farb="#A0A0A0"; - $lastaktive=false; - } - } - else { - if ($mnr==$i) { - if(count($submenu[$mnr][0]) != 0){ - if($maxmenu == $i+1){$zwisch="";} - else {$zwisch="";} - }else{$zwisch="";} - $lastaktive=true; - $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>";} - else {$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>";} - }else{$zwisch="";} - $farb="#A0A0A0"; - $lastaktive=false; - } - } - $template->assign(array("ICON" => $zwisch, - "FARBE" => $farb, - "LINK_M" => $item["link"], - "TEXT_M" => $item["text"])); - $template->parse("HAUPTMENU_LIST", ".Hauptmenu"); - $template->clear_dynamic("Hauptmenu"); - } - $i=$i+1; - } - if ($lastaktive) {$template->assign(array("ENDE" => ""));} - else{ - $template->assign(array("ENDE" => "")); - } -} -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/computers_menu.save.php b/ldap-site-mngmt/webinterface/computers/computers_menu.save.php deleted file mode 100644 index 183d9309..00000000 --- a/ldap-site-mngmt/webinterface/computers/computers_menu.save.php +++ /dev/null @@ -1,188 +0,0 @@ -<?php - -function createComputersMenu($roles , $mnr, $auDN, $sbmnr) { - - global $template, $ds, $suffix, $START_PATH; - - # Struktur der Registerkartenleiste - # Hauptmenu - $hauptmenu = array(array("link" => "computers.php", - "text" => "Übersicht", - "zugriff" => "alle"), - array("link" => "hostoverview.php", - "text" => "Rechner", - "zugriff" => array("MainAdmin")), - array("link" => "computers.php", - "text" => "Neuen Rechner anlegen", - "zugriff" => array("MainAdmin")), - array("link" => "groupoverview.php", - "text" => "Rechnergruppen", - "zugriff" => array("MainAdmin")), - array("link" => "computers.php", - "text" => "Neue Gruppe anlegen", - "zugriff" => array("MainAdmin"))); - - # Submenu - $computers_array = get_hosts($auDN,array("dn","hostname","ou")); - for($n=0;$n<count($computers_array);$n++){ - $comps[] = array("link" => "host.php?dn=".$computers_array[$n]['dn']."&sbmnr=".$n, - "text" => $computers_array[$n]['hostname'], - "zugriff" => array("MainAdmin")); - } - $groups_array = get_groups($auDN,array("dn","cn")); - for($n=0;$n<count($groups_array);$n++){ - $groups[] = array("link" => "group.php?dn=".$groups_array[$n]['dn']."&sbmnr=".$n, - "text" => $groups_array[$n]['cn'], - "zugriff" => array("MainAdmin")); - } - $submenu = array(array(array()), - $comps, - array(array()), - $groups, - array(array())); - - $rollen = array_keys($roles); - - # Zusammenstellen der Menuleiste - $template->define_dynamic("Hauptmenu", "Menu"); - $template->define_dynamic("Submenu", "Menu"); - $i=0; - - $maxmenu = count($hauptmenu); - foreach($hauptmenu as $item){ - $template->clear_parse("SUBMENU_LIST"); - - if($item['zugriff'] === "alle" || vergleicheArrays($rollen , $item['zugriff'])) { - $subempty = 0; - $j=0; - $maxsub = count($submenu[$mnr]); - foreach($submenu[$mnr] as $item2) { - - if($item2['zugriff'] === "alle" || vergleicheArrays($rollen, $item2['zugriff'])) { - if($i != $mnr){ - $template->assign(array("SUB" => "")); - # "LINK_S" => "", - # "TEXT_S" => "")); - $template->parse("SUBMENU_LIST", ".Submenu"); - $template->clear_dynamic("Submenu"); - } - else{ - if ($j==0) { - if ($sbmnr==0) { - if($maxsub == 1){$zwisch="branchbottom2";} - else {$zwisch="branch2";} - $lastaktive=true; - $farb="#505050"; - } - else{ - if($maxsub == 1){$zwisch="branchbottom2";} - else {$zwisch="branch2";} - $farb="#A0A0A0"; - $lastaktive=false; - } - } - else { - if ($sbmnr==$j) { - if($maxsub == $j+1){$zwisch="branchbottom2";} - else {$zwisch="branch2";} - $lastaktive=true; - $farb="#505050"; - } - else { - $farb="#A0A0A0"; - if($maxsub == $j+1){$zwisch="branchbottom2";} - else {$zwisch="branch2";} - # if ($lastaktive) {$zwisch="branch";} - # else {$zwisch="branch";} - $lastaktive=false; - } - } - $htmlcode= " - <tr height='4'> - <td></td><td align='right'><img src='../pics/line2.gif' height='4'></td><td></td><td></td> - </tr> - <tr> - <td width='10%'> </td> - <td width='15%' align='right'><img src='../pics/".$zwisch.".gif'></td>
- <td width='65%' align='left' style='border-width:1 1 1 1;border-color:#000000;border-style:solid;padding:5;padding-left:30px;background-color:{FARBE_S}'> - <a href='".$item2['link']."' style='text-decoration:none'><b class='standard_schrift'>".$item2['text']."</b></a></td> - <td width='10%'> </td> - </tr> - "; - $template->assign(array("SUB" => $htmlcode)); - $template->assign(array("FARBE_S" => $farb)); - $template->parse("SUBMENU_LIST", ".Submenu"); - $template->clear_dynamic("Submenu"); - } - } - else { - $subempty++; - } - $j=$j+1; - - } - if($subempty == count($submenu[$mnr])) { - $template->assign(array("SUB" => "")); - # "LINK_S" => "", - # "TEXT_S" => "")); - $template->parse("SUBMENU_LIST", ".Submenu"); - $template->clear_dynamic("Submenu"); - } - - if ($i==0) { - if ($mnr==0) { - if(count($submenu[$i][0]) != 0){ - if($maxmenu == 1){$zwisch="";} # {$zwisch="<img style='border-width:0;border-style=none;' src='../pics/minus2.gif'>";} - else {$zwisch="";} - }else{$zwisch="";} - $lastaktive=true; - $farb="#505050"; - } - else{ - if(count($submenu[$i][0]) != 0){ - if($maxmenu == 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>";} - else {$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>";} - }else{$zwisch="";} - $farb="#A0A0A0"; - $lastaktive=false; - } - } - else { - if ($mnr==$i) { - if(count($submenu[$mnr][0]) != 0){ - if($maxmenu == $i+1){$zwisch="";} - else {$zwisch="";} - }else{$zwisch="";} - $lastaktive=true; - $farb="#505050"; - } - else { - $farb="#A0A0A0"; - 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>";} - else {$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>";} - }else{$zwisch="";} - #if ($lastaktive) {$zwisch="";} - #else {$zwisch="";} - $lastaktive=false; - } - } - $template->assign(array("ICON" => $zwisch, - "FARBE" => $farb, - "LINK_M" => $item["link"], - "TEXT_M" => $item["text"])); - $template->parse("HAUPTMENU_LIST", ".Hauptmenu"); - $template->clear_dynamic("Hauptmenu"); - } - $i=$i+1; - } - if ($lastaktive) {$template->assign(array("ENDE" => ""));} - else{ - $template->assign(array("ENDE" => "")); - } -} -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/computers_start.dwt b/ldap-site-mngmt/webinterface/computers/computers_start.dwt deleted file mode 100644 index 378e5d76..00000000 --- a/ldap-site-mngmt/webinterface/computers/computers_start.dwt +++ /dev/null @@ -1,42 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='90%'> - <tr> - <td colspan='2'><h3>Modul - Rechner und Rechnergruppen Management: </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td> - <p>Dieses Modul dient der Verwaltung der Rechner und Rechnergruppen in ihrer Abteilung - (AU), inklusive ihrer spezifischen Rechner- und PXE Boot Konfigurationen<br> - Benutzen Sie die Navigation links, um die einzelnen Verwaltungsbereiche anzusteuern:</p> - <ul> - <li><p><b>Rechner</b></p> - Hier verwalten Sie ihre Rechner (anlegen, bearbeiten, löschen), und können zu dem - einige Hardware-Parameter festlegen. Daneben verwalten Sie hier rechner-spezifische - Computer-Profile (MachineConfig) und PXE Boot Konfigurationen. - </li> - <li><p><b>Rechnergruppen</b></p> - Hier verwalten Sie die Rechnergruppen (anlegen, bearbeiten, löschen), sowie - ihre gemeinsamen Hardware-Parameter. Daneben verwalten Sie hier gruppen-spezifische - Computer-Profile (MachineConfig) und PXE Boot Konfigurationen. - </li> - <!-- <li><p><b>Default MachineConfig</b></p> - Hier verwalten Sie ihre Default Computer-Profile (bearbeiten, löschen, kopieren), - d.h. Computer-Profile, die beim booten von Rechnern verwendet werden, für die - keine rechner- oder gruppen-spezifischen MachineConfigs angelegt sind. - </li> - <li><p><b>Neue MachineConfig</b></p> - Hier köennen Sie neue Computer-Profile (MachineConfigs) als rechner-, gruppen- - spezifische, oder Default MachineConfigs anlegen. - </li> --> - <li><p><b>Neues PXE Bootmenü</b></p> - Hier können Sie neue PXE Bootmenüs (PXEConfigs) für ihre Rechner oder - Rechnergruppen anlegen. - </li> - </ul> - - </td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/delete_confirm.php b/ldap-site-mngmt/webinterface/computers/delete_confirm.php deleted file mode 100644 index 32eb4cf4..00000000 --- a/ldap-site-mngmt/webinterface/computers/delete_confirm.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$dn = $_POST['dn']; -$name = $_POST['name']; -$dhcphlpcont = $_POST['dhcphlpcont']; -$delurl = $_POST['delurl']; -$backurl = $_POST['backurl']; -$successurl = $_POST['successurl']; - -$pxedn = $_POST['pxedn']; -echo " -<html> -<head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> - <tr> - <td> - Wollen Sie das Objekt <b>".$name."</b> wirklich löschen?<br><br> - <form action='".$delurl."' method='post'> - Falls ja:<br><br> - <input type='hidden' name='dn' value='".$dn."'> - <input type='hidden' name='name' value='".$name."'> - <input type='hidden' name='dhcphlpcont' value='".$dhcphlpcont."'> - <input type='hidden' name='successurl' value='".$successurl."'> - <input type='hidden' name='pxedn' value='".$pxedn."'> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'><br><br> - </form> - <form action='".$backurl."' method='post'> - Falls, nein:<br><br> - <input type='Submit' name='apply' value='zurück' class='small_loginform_button'> - </form> - </td> - </tr> -</table> -</body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/dhcphost.dwt b/ldap-site-mngmt/webinterface/computers/dhcphost.dwt deleted file mode 100644 index 3bb5e756..00000000 --- a/ldap-site-mngmt/webinterface/computers/dhcphost.dwt +++ /dev/null @@ -1,69 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - - <tr> - <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} Geo/Hardware </a></h4></td> - <td> </td> - </tr> - <tr> - <td height='20'></td> - </tr> - <tr> - <td colspan='5'><h3>DHCP Setup - Rechner <code class='font_object'> {HOSTNAME} </code> </h3></td> - </tr> - - <tr><td colspan='5'> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='dhcphost_change.php' method='post'> - - <tr> - <td width='25%' class='tab_h'><b>DHCP Administration - Diensteinbindung, Optionen</b></td> - <td width='25%' class='tab_h'><b> </b></td> - <td width='50%' class='tab_h'><b> </b></td> - </tr> - - <tr valign='top'> - - {DHCPCONT} - - </tr> - - {HOST_DHCPOPT} - - <!--<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'> - <input type='hidden' name='oldattribs[dhcpoptdefault-lease-time]' value='{DEFAULTLEASE}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Max Lease Time:</b></td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <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>--> - - </table></td> - </tr> - - - <input type='hidden' name='olddhcp' value='{OLDDHCP}'> - <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}'> - - <tr> - <td colspan='4'><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/dhcphost.php b/ldap-site-mngmt/webinterface/computers/dhcphost.php deleted file mode 100644 index 5e64000d..00000000 --- a/ldap-site-mngmt/webinterface/computers/dhcphost.php +++ /dev/null @@ -1,185 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "dhcphost.dwt"; - -include('computers_header.inc.php'); - -$mnr = 0; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$hostDN = $_GET['dn']; - -# Rechner Daten -$attributes = array("hostname","domainname","ipaddress","hwaddress","hlprbservice", - "dhcphlpcont","dhcpoptfixed-address","dhcpopthardware","dhcpoptfilename", - "dhcpoptnext-server","dhcpoptmax-lease-time","dhcpoptdefault-lease-time"); -$host = get_node_data($hostDN,$attributes); -$hostip = explode('_',$host['ipaddress']); -# print_r($hostip); echo "<br><br>"; -$dhcphlpcont = $host['dhcphlpcont']; -$dhcpmaxlease = $host['dhcpoptmax-lease-time']; -$dhcpdefaultlease = $host['dhcpoptdefault-lease-time']; -$objectDN = $dhcphlpcont; -$rbsDN = $host['hlprbservice']; - -$rbs_dhcpopt = ""; -$host_dhcpopt = ""; -$dhcp_selectbox = ""; - -########################################################## -# DHCP Setup - -# DHCP Daten -if ($dhcphlpcont == ""){ - $objecttype = "nodhcp"; - - # DHCP Selectbox - $altdhcp = alternative_dhcpobjects($objecttype,$objectDN,$hostip[0]); - $dhcp_selectbox .= "<td class='tab_d'> - <select name='dhcpcont' size='3' class='medium_form_selectbox'> - <option selected value='none'>----------</option>"; - if (count($altdhcp) != 0){ - foreach ($altdhcp as $item){ - $dhcp_selectbox .= " - <option value='".$item['dn']."'>".$item['cn']." ".$item['au']."</option>"; - } - } - $dhcp_selectbox .= "<option value=''>Kein DHCP</option> - </select></td>"; - - $dhcp = "<td class='tab_d_ohne' colspan='2'><b>Eingebunden in DHCP Dienst: </b> </td> - <td class='tab_d_ohne'> - Rechner ist in keinem DHCP Dienst angemeldet<br></td></tr> - <tr valign='top'><td class='tab_d' colspan='2'> - DHCP Dienst auswählen: <br></td>".$dhcp_selectbox; - - $rbs = "<td class='tab_d_ohne' colspan='2'> - Sie müssen den Rechner zuerst in einem DHCP Dienst anmelden, bevor Sie ihn - einem Remote Boot Dienst zuordnen können <br>(DHCP Optionen!!).<br></td> - </tr> - <input type='hidden' name='rbs' value='".$rbsDN."'>"; -}else{ - # Host in Service oder Subnet? - $objecttype = "service"; - $dhcp = ""; - - /*$ocarray = get_node_data($dhcphlpcont,array("objectclass","dhcphlpcont")); - #print_r($ocarray); echo "<br>"; - $sub = array_search('dhcpSubnet', $ocarray['objectclass']); - #print_r($sub); - if ($sub !== false ){ - $objecttype = "subnet"; - $exp0 = explode(',',$dhcphlpcont); - $expsub = explode('=',$exp0[0]); $dhcpsub = $expsub[1]; - $dhcp .= "Subnet <b>".$dhcpsub."</b> / "; - $dhcphlpcont = $ocarray['dhcphlpcont']; - }*/ - - $exp1 = explode(',',$dhcphlpcont); - $expdhcp = explode('=',$exp1[0]); $dhcpserv = $expdhcp[1]; - $expdhcpau = explode('=',$exp1[2]); $dhcpau = $expdhcpau[1]; - - # DHCP Selectbox - $altdhcp = alternative_dhcpobjects($objecttype,$objectDN,$hostip[0]); - $dhcp_selectbox .= "<td class='tab_d'> - <select name='dhcpcont' size='3' class='medium_form_selectbox'> - <option selected value='none'>----------</option>"; - if (count($altdhcp) != 0){ - foreach ($altdhcp as $item){ - $dhcp_selectbox .= " - <option value='".$item['dn']."'>".$item['cn']." ".$item['au']."</option>"; - } - } - $dhcp_selectbox .= "<option value=''>Kein DHCP</option> - </select></td>"; - - $dhcp .= "<td class='tab_d_ohne' colspan='2'><b>Eingebunden in DHCP Dienst: </b> </td> - <td class='tab_d_ohne'> - Service <b>".$dhcpserv."</b> / AU <b>".$dhcpau."</b><br></td></tr> - <tr valign='top'><td class='tab_d' colspan='2'> - DHCP Dienst ändern: <br></td>".$dhcp_selectbox; - - - $fixedaddselopt = "<option selected value='none'>------------</option>"; - switch ( $host['dhcpoptfixed-address'] ){ - case "": - $fixedaddress = "<b> - </b> <br>(dynamische Vergabe)"; - if ( $hostip[0] != "" ){ - $fixedaddselopt .= "<option value='ip'>".$hostip[0]." (IP Adresse)</option>"; - } - $fixedaddselopt .= "<option value='hostname'>".$host['hostname']." (Hostname)</option>"; - break; - case "ip": - $fixedaddress = "<b>".$hostip[0]."</b><br>(Fixe IP Adresse)"; - $fixedaddselopt .= "<option value='hostname'>".$host['hostname']." (Hostname)</option> - <option value=''>kein Eintrag (dynamische IP Vergabe)</option>"; - break; - case "hostname": - $fixedaddress = "<b>".$host['hostname']."</b><br>(Fixe IP Adresse über DNS aufgelöst)"; - if ( $hostip[0] != "" ){ - $fixedaddselopt .= "<option value='ip'>".$hostip[0]." (IP Adresse)</option>"; - } - $fixedaddselopt .= "<option value=''>kein Eintrag (dynamisch)</option>"; - break; - } - - - $host_dhcpopt = "<tr><td class='tab_d_ohne' colspan='2'><b>DHCP Optionen:</b></td></tr> - <tr valign='top'> - <td class='tab_d_ohne'><b>hardware ethernet: </b> </td> - <td class='tab_d_ohne'><b>".$host['hwaddress']."</b> </td> - <td class='tab_d_ohne'> </td> - </tr> - <tr valign='top'> - <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> - </td> - </tr>"; - -} - -$template->assign(array("HOSTDN" => $hostDN, - "HOSTNAME" => $host['hostname'], - #"DOMAINNAME" => $host['domainname'], - "HWADDRESS" => $host['hwaddress'], - "IPADDRESS" => $hostip[0], - "OLDDHCP" => $objectDN, - "OLDFIXADD" => $host['dhcpoptfixed-address'], - "OLDRBS" => $rbsDN, - "DHCPCONT" => $dhcp, - "HOST_DHCPOPT" => $host_dhcpopt, - "NEXTSERVER" => $host['dhcpoptnext-server'], - "FILENAME" => $host['dhcpoptfilename'], - "DEFAULTLEASE" => $dhcpdefaultlease, - "MAXLEASE" => $dhcpmaxlease, - "HOSTLINK" => "<a href='host.php?dn=".$hostDN."&sbmnr=".$sbmnr."' class='headerlink'>", - "RBSLINK" => "<a href='rbshost.php?dn=".$hostDN."&sbmnr=".$sbmnr."' class='headerlink'>", - "HWLINK" => "<a href='hwhost.php?dn=".$hostDN."&sbmnr=".$sbmnr."' class='headerlink'>", - "AUDN" => $auDN, - "SBMNR" => $sbmnr)); - - - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/dhcphost_change.php b/ldap-site-mngmt/webinterface/computers/dhcphost_change.php deleted file mode 100644 index cbfa7f9f..00000000 --- a/ldap-site-mngmt/webinterface/computers/dhcphost_change.php +++ /dev/null @@ -1,236 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$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']; - -$sbmnr = $_POST['sbmnr']; - -$dhcp = htmlentities($dhcp); -$olddhcp = htmlentities($olddhcp); - -# sonstige Attribute -$attribs = $_POST['attribs']; -if (count($attribs) != 0){ - foreach (array_keys($attribs) as $key){ - $atts[$key] = htmlentities($attribs[$key]); - } -} -#print_r($atts); echo "<br><br>"; -$oldattribs = $_POST['oldattribs']; -if (count($oldattribs) != 0){ - foreach (array_keys($oldattribs) as $key){ - $oldatts[$key] = htmlentities($oldattribs[$key]); - } -} -#print_r($oldatts); echo "<br><br>"; - -/*echo "new dhcp:"; print_r($dhcp); echo "<br>"; -echo "old dhcp:"; print_r($olddhcp); echo "<br>"; -echo "new rbs:"; print_r($rbs); echo "<br>"; -echo "old rbs:"; print_r($oldrbs); echo "<br>"; -echo "Host DN:"; print_r($hostDN); echo "<br>"; -echo "submenuNR:"; print_r($sbmnr); echo "<br><br>";*/ - - -$seconds = 2; -$url = 'dhcphost.php?dn='.$hostDN.'&sbmnr='.$sbmnr; - -echo " -<html> -<head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -########################################## -# DHCP Einbindung - -if ($dhcp != "none" && $dhcp != $olddhcp){ - if ($dhcp != ""){ - $exp = ldap_explode_dn($dhcp, 1); - $dhcpcn = $exp[0]; - $dhcpau = $exp[2]; - - $entrydhcp ['dhcphlpcont'] = $dhcp; - if ($olddhcp != ""){ - echo "DHCP replace "; print_r($olddhcp); echo " with "; print_r($entrydhcp); echo "<br>"; - if ($result = ldap_mod_replace($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{ - 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(); - if ( $oldfixedaddress != "" ){ - $entrydhcp ['dhcpoptfixed-address'] = array(); - } - #if ( $oldrbs != "" ){ - # $entrydhcp ['hlprbservice'] = array(); - #} - echo "DHCP delete "; echo "<br>"; - if ($result = ldap_mod_del($ds,$hostDN,$entrydhcp)){ - update_dhcpmtime(array()); - $mesg = "Rechner erfolgreich aus DHCP gelöscht<br><br>"; - }else{ - $mesg = "Fehler beim löschen aus DHCP Dienst!<br><br>"; - } - } - -} -if ($dhcp == "none"){ - echo " DHCP none <br>"; -} - - -############################# -# DHCP Option fixed-address - -if ($fixedaddress != "none" && $fixedaddress != $oldfixedaddress){ - if ($fixedaddress != ""){ - $entryfixadd ['dhcpoptfixed-address'] = $fixedaddress; - if ($oldfixedaddress != ""){ - echo "Fixed Address ändern"; echo "<br>"; - if ($result = ldap_mod_replace($ds,$hostDN,$entryfixadd)){ - update_dhcpmtime(array()); - $mesg = "Option Fixed-Address erfolgreich auf <b>".$fixedaddress."</b> geändert<br><br>"; - }else{ - $mesg = "Fehler beim ändern der Option Fixed-Address auf <b>".$fixedaddress."</b>!<br><br>"; - } - }else{ - echo "Fixed Address auf IP Adresse setzen"; echo "<br>"; - if ($result = ldap_mod_add($ds,$hostDN,$entryfixadd)){ - update_dhcpmtime(array()); - $mesg = "Option Fixed-Address erfolgreich auf <b>".$fixedaddress."</b> gesetzt<br><br>"; - }else{ - $mesg = "Fehler beim setzen der Option Fixed-Address auf <b>".$fixedaddress."</b>!<br><br>"; - } - } - }else{ - $entryfixadd ['dhcpoptfixed-address'] = array(); - echo "No Fixed Address"; echo "<br>"; - if ($result = ldap_mod_del($ds,$hostDN,$entryfixadd)){ - update_dhcpmtime(array()); - $mesg = "Option Fixed-Address erfolgreich gelöscht<br><br>"; - }else{ - $mesg = "Fehler beim löschen der Option Fixed-Address!<br><br>"; - } - } -} - -##################################### -# Restliche Attribute ... - -#if (count($atts) != 0){ - - $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]; - } - } - - #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(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>"; - } - } - -#} - -##################### - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/group.dwt b/ldap-site-mngmt/webinterface/computers/group.dwt deleted file mode 100644 index cda53f18..00000000 --- a/ldap-site-mngmt/webinterface/computers/group.dwt +++ /dev/null @@ -1,397 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Daten bearbeiten Gruppe <code class='font_object'>{GROUPCN}</code> </h3></td> - </tr> - <tr> - <td height='20'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='group_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> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Eindeutiger Gruppenname (cn):</b><br>(Teil des dn, ohne Leerzeichen eingeben) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='groupcn' value='{GROUPCN}' size='40' class='medium_form_field'> - <input type='hidden' name='oldgroupcn' value='{GROUPCN}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Beschreibung: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='groupdesc' value='{GROUPDESC}' size='40' class='medium_form_field'> - <input type='hidden' name='oldgroupdesc' value='{GROUPDESC}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Gruppen-Rechner:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - - <b>Aktuelle Mitglieder</b> (zum Löschen bitte Häkchen setzen):<br> - <!-- BEGIN DYNAMIC BLOCK: Members --> - <input type='checkbox' name='delmember[]' value='{MEMBERDN}' size='40' class='medium_form_field'> {MEMBER}<br> - <!-- END DYNAMIC BLOCK: Members --> - <br> - - <b>Als neues Mitglied aufnehmen</b> (Mehrfachauswahl möglich)<br> - <select name='addmember[]' size='{HOSTNUMBER}' multiple class='medium_form_selectbox'> - <option selected value='none'>----------</option> - - <!-- BEGIN DYNAMIC BLOCK: Hosts --> - <option value='{HDN}_{HN}'>{HN}</option> - <!-- END DYNAMIC BLOCK: Hosts --> - - </select> - </td> - </tr> - - - <input type='hidden' name='groupdn' value='{GROUPDN}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - - </table></td> - </tr> - <tr> - <td><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - <tr> - <td height='40'></td> - </tr> - - <tr> - <td colspan='2'><h4>Gruppe - <code class='font_object'>{GROUPCN}</code> - löschen:</h4></td> - </tr> - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'> - <form action='delete_confirm.php' method='post'> - - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - Die Rechnergruppe wird komplett gelöscht, <br>d.h. inklusive aller spezifisch für sie angelegten - Hardware-Profile (MachineConfig) und PXE Bootmenüs. - </tr> - - <input type='hidden' name='dn' value='{GROUPDN}'> - <input type='hidden' name='name' value='{GROUPCN}'> - <input type='hidden' name='delurl' value='group_delete.php'> - <input type='hidden' name='backurl' value='group.php?dn={GROUPDN}&sbmnr={SBMNR}'> - - - </table></td> - </tr> - <tr> - <td> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'> - </form></td> - </tr> - - - <tr> - <td height='50'></td> - </tr> - - <tr> - <td colspan='2'><h4>Wochen Übersicht Machine Configs Gruppe <code class='font_object'>{GROUPCN}</code> :</h4></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <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> - </tr> - - <tr> - <td height='10'></td> - </tr> - <tr> - <td colspan='2'><h4>Legende:</h4></td> - </tr> - <tr><td> - <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>Machine 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;'>Keine Konfiguration </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;'>{DESCRIPTION} </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>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/group.php b/ldap-site-mngmt/webinterface/computers/group.php deleted file mode 100644 index cfacd649..00000000 --- a/ldap-site-mngmt/webinterface/computers/group.php +++ /dev/null @@ -1,115 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "group.dwt"; - -include('computers_header.inc.php'); - -$mnr = 2; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$groupDN = $_GET['dn']; - -$group = get_node_data($groupDN,array("cn","description","member","dhcphlpcont")); - -$template->assign(array("GROUPDN" => $groupDN, - "GROUPCN" => $group['cn'], - "GROUPDESC" => $group['description'], - # "MEMBERS" => $anzahlmember, - "MEMBER" => $group['member'], - "DHCPCONT" => $group['dhcphlpcont'], - "AUDN" => $auDN, - "SBMNR" => $sbmnr)); - -$template->define_dynamic("Members", "Webseite"); - -if ( count($group['member']) == 1 ){ - $member = $group['member']; - $group = array(); - $group['member'][] = $member; -} - -if ( count($group['member']) != 0 ){ - sort($group['member']); - foreach ($group['member'] as $member){ - $exp = explode(',',$member); - $memberexp = explode('=',$exp[0]); - $membername = $memberexp[1]; - $template->assign(array("MEMBERDN" => $member, - "MEMBER" => $membername)); - $template->parse("MEMBERS_LIST", ".Members"); - } -} - -############################################## -# neues Member anlegen ... -$hosts_array = get_hosts($auDN,array("dn","hostname")); -# print_r($hosts_array); echo "<br><br>"; -$groups = get_groups($auDN, array("member")); -$template->assign(array("HN" => "")); - -foreach ($groups as $group){ - for ($i=0; $i < count($hosts_array); $i++){ - if (count($group['member']) > 1){ - foreach ($group['member'] as $item){ - if ($hosts_array[$i]['dn'] == $item){ - array_splice($hosts_array, $i, 1); - $i--; # da ja ein Member gelöscht wurde - } - } - } - if (count($group['member']) == 1){ - if ($hosts_array[$i]['dn'] == $group['member']){ - array_splice($hosts_array, $i, 1); - } - } - } -} -#print_r($hosts_array);echo"<br>"; - -$template->define_dynamic("Hosts", "Webseite"); -foreach ($hosts_array as $item){ - $template->assign(array("HDN" => $item['dn'], - "HN" => $item['hostname'], - "HOSTNUMBER" => 5)); - $template->parse("HOSTS_LIST", ".Hosts"); -} - - -########################################################## -# MC Wochenübersicht -$mc_array = get_machineconfigs($groupDN,array("dn","cn","timerange","description")); -# print_r($mc_array); -for ($i=0; $i<count($mc_array); $i++){ - # Timerange Komponenten - if (count($mc_array[$i]['timerange']) > 1 ){ - foreach ($mc_array[$i]['timerange'] as $tr){ - $exptime = array_merge(explode('_',$tr),$mc_array[$i]['description']); - $timeranges[$i][] = $exptime; # Für grafische Wo-Ansicht - } - }else{ - $exptime = array_merge(explode('_',$mc_array[$i]['timerange']), $mc_array[$i]['description']); - $timeranges[$i] = $exptime; # Für grafische Wo-Ansicht - } -} -include("mc_wochenplan.php"); - - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/group_add.php b/ldap-site-mngmt/webinterface/computers/group_add.php deleted file mode 100644 index dfc7fbe7..00000000 --- a/ldap-site-mngmt/webinterface/computers/group_add.php +++ /dev/null @@ -1,84 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$groupcn = $_POST['groupcn']; -$groupdesc = $_POST['groupdesc']; -$addmember = $_POST['addmember']; - -$groupcn = htmlentities($groupcn); -$groupdesc = htmlentities($groupdesc); - -/* -echo "AU dn:"; print_r($auDN); echo "<br>"; -echo "groupcn:"; print_r($groupcn); echo "<br>"; -echo "groupdesc:"; print_r($groupdesc); echo "<br>"; -echo "members to add:"; print_r($addmember); echo "<br>"; -*/ - -$seconds = 2; - -echo " -<html> -<head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $groupcn != ""){ - - # Formulareingaben anpassen - $expgr = explode(" ",$groupcn); - foreach ($expgr as $word){$expuc[] = ucfirst($word);} - $groupcn = implode(" ",$expuc); - $groupcn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $groupcn); - - # Host Objekt anlegen - $brothers = get_hosts($auDN,array("groupcn")); - $brother = 0; - foreach ($brothers as $item){ - if( $item['groupcn'] == $groupcn ){ - $mesg = "Es existiert bereits eine Gruppe mit dem eingegebenen Namen (CN)!<br> - Bitte geben Sie einen anderen Namen (CN) ein.<br><br>"; - $get_groupdesc = str_replace ( " ", "_", $groupdesc ); - $url = "new_group.php?groupcn=Hier_anderen_CN_eingeben&groupdesc=".$get_groupdesc; - $brother = 1; - break; - } - } - if ($brother == 0){ - $groupDN = "cn=".$groupcn.",cn=groups,".$auDN; - # print_r($groupDN); echo "<br>"; - - if (add_group($groupDN,$groupcn,$groupdesc,$addmember)){ - $mesg .= "<br>Neue Rechnergruppe erfolgreich angelegt<br>"; - } - else{ - $mesg .= "<br>Fehler beim anlegen der Rechnergruppe!<br>"; - } - - $url = 'groupoverview.php'; - } -} - - -elseif ( $groupcn == ""){ - - $get_groupdesc = str_replace ( " ", "_", $groupdesc ); - $mesg = "Sie haben den CN der neuen Gruppe nicht angegeben. Dieser ist aber ein notwendiges Attribut.<br> - Bitte geben Sie ihn an.<br><br>"; - $url = "new_group.php?ou=Hier_CN_eingeben&groupdesc=".$get_groupdesc; -} - - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/group_change.php b/ldap-site-mngmt/webinterface/computers/group_change.php deleted file mode 100644 index cb26a429..00000000 --- a/ldap-site-mngmt/webinterface/computers/group_change.php +++ /dev/null @@ -1,252 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$groupcn = $_POST['groupcn']; -$oldgroupcn = $_POST['oldgroupcn']; -$groupdesc = $_POST['groupdesc']; -$oldgroupdesc = $_POST['oldgroupdesc']; - -$delmember = $_POST['delmember']; - -$addmember = $_POST['addmember']; -$n = array_search('none',$addmember); -if ($n === 0 ){array_splice($addmember, $n, 1);} - -$groupDN = $_POST['groupdn']; -$sbmnr = $_POST['sbmnr']; - -$syntax = new Syntaxcheck; - -$groupcn = htmlentities($groupcn); -$oldgroupcn = htmlentities($oldgroupcn); -$groupdesc = htmlentities($groupdesc); -$oldgroupdesc = htmlentities($oldgroupdesc); - -/* -echo "new groupcn:"; print_r($groupcn); echo "<br>"; -echo "old groupcn:"; print_r($oldgroupcn); echo "<br>"; -echo "new groupdesc:"; print_r($groupdesc); echo "<br>"; -echo "old groupdesc:"; print_r($oldgroupdesc); echo "<br><br>"; - -echo "members to delete:"; print_r($delmember); echo "<br><br>"; -echo "members to add:"; print_r($addmember); echo "<br><br>"; - -echo "Group DN:"; print_r($groupDN); echo "<br>"; -echo "submenuNR:"; print_r($submenu); echo "<br><br>"; -*/ - -$seconds = 2; -$url = 'group.php?dn='.$groupDN.'&sbmnr='.$sbmnr; - -echo " -<html> -<head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -############################################## -# CN (DN) - -if ( $oldgroupcn == $groupcn ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( $oldgroupcn != "" && $groupcn != "" && $oldgroupcn != $groupcn ){ - echo "Gruppenname aendern<br>"; - # hier noch Syntaxcheck - # Formulareingaben anpassen - $expgr = explode(" ",$groupcn); - foreach ($expgr as $word){$expuc[] = ucfirst($word);} - $groupcn = implode(" ",$expuc); - $groupcn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $groupcn); - - - $newgroupDN = "cn=".$groupcn.",cn=groups,".$auDN; - print_r($newgroupDN); echo "<br><br>"; - - modify_group_dn($groupDN, $newgroupDN); - - # newsubmenu holen... - $url = 'group.php?dn='.$newgroupDN.'&sbmnr='.$sbmnr; -} - -if ( $oldgroupcn != "" && $groupcn == "" ){ - echo "Gruppenname loeschen!<br> - Dieses ist Teil des DN, Sie werden die Gruppe komplett löschen<br><br>"; - echo "Wollen Sie die Gruppe <b>".$oldgroupcn."</b>mit seinen Hardware-Profilen (MachineConfigs) - und PXE Bootmenüs wirklich löschen?<br><br> - <form action='group_delete.php' method='post'> - Falls ja:<br><br> - <input type='hidden' name='dn' value='".$groupDN."'> - <input type='hidden' name='name' value='".$oldgroupcn."'> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'><br><br> - </form> - <form action='".$url."' method='post'> - Falls, nein:<br><br> - <input type='Submit' name='apply' value='zurück' class='small_loginform_button'> - </form>"; - $seconds = 600; -} - - -######################################## -# Member löschen/aufnehmen - -if ( count($delmember) == 0 || count($addmember) == 0 ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( count($delmember) != 0 ){ - echo "Gruppen-Mitglieder löschen<br>"; - # hier noch Syntaxcheck - # print_r($delmember); echo "<br><br>"; - - $i = 0; - foreach ($delmember as $member){ - $entry['member'][$i] = $member; - $i++; - } - #print_r($entry); echo "<br><br>"; - - if ($result = ldap_mod_del($ds,$groupDN,$entry)){ - # Fehler hier muessen die verbliebenen Members hin!!! - # Filenames in PXEs die an der Gruppe hängen anpassen - $pxes = get_pxeconfigs($groupDN,array("dn")); - foreach ($pxes as $pxe){ - if ( $entry['member'] > 1 ){ - $j = 0; - foreach ($entry['member'] as $host){ - $macdata = get_node_data($host, array("hwaddress")); - $entryfilename ['filename'][$j] = "01-".$macdata['hwaddress']; - $j++; - } - } - if ( $entry['member'] == 1 ){ - $macdata = get_node_data($entry['member'], array("hwaddress")); - $entryfilename ['filename'] = "01-".$macdata['hwaddress']; - } - ldap_mod_del($ds,$pxe['dn'],$entryfilename); - } - $mesg = "Gruppen-Mitglieder erfolgreich gelöscht<br><br>"; - }else{ - $mesg = "Fehler beim löschen der Gruppen-Mitglieder<br><br>"; - } -} - -if ( count($addmember) != 0 ){ - - echo "Gruppen-Mitglieder anlegen<br>"; - # hier noch Syntaxcheck - $members = get_node_data($groupDN,array("member")); - if ( count($members['member']) == 1 ){ - $member = $members['member']; - $members = array(); - $members['member'][] = $member; - } - if (count($members['member']) != 0){ - foreach ($members['member'] as $member){ - $entry2['member'][] = $member; - } - } - $i = 0; - foreach ($addmember as $member){ - $exp = explode('_',$member); - # Falls ein neues Mitglied keine MAC hat und an der Gruppe PXEs hängen - # dann wird diese nicht aufgenommen ... - $macdata = get_node_data($exp[0], array("hwaddress")); - $pxes = get_pxeconfigs($groupDN,array("dn","filename")); - if ( count($pxes) != 0 && $macdata['hwaddress'] == "" ){ - echo "Rechner ".$exp[1]." hat keine MAC Adresse eingetragen. <br> - Fü die Gruppe sind PXE Bootmenüs definiert. <br> - Da MACs für die PXE Datei notwendig ist wird der Rechner nicht aufgenommen!"; - } - else{ - $entry2['member'][] = $exp[0]; - } - $i++; - - } - - #print_r($entry2); echo "<br><br>"; - - if ($result = ldap_mod_replace($ds, $groupDN, $entry2)){ - - # PXEs die an der Gruppe hängen anpassen - $pxes = get_pxeconfigs($groupDN,array("dn")); - foreach ($pxes as $pxe){ - if ( $entry2['member'] > 1 ){ - $j = 0; - foreach ($entry2['member'] as $host){ - $macdata = get_node_data($host, array("hwaddress")); - $entryfilename ['filename'][$j] = "01-".$macdata['hwaddress']; - $j++; - } - } - if ( $entry2['member'] == 1 ){ - $macdata = get_node_data($entry2['member'], array("hwaddress")); - $entryfilename ['filename'] = "01-".$macdata['hwaddress']; - } - ldap_mod_replace($ds,$pxe['dn'],$entryfilename); - } - $mesg = "Gruppen-Mitglieder erfolgreich angelegt<br><br>"; - }else{ - $mesg = "Fehler beim anlegen der Gruppen-Mitglieder<br><br>"; - } -} - - -##################################### -# Description - -if ( $oldgroupdesc == $groupdesc ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( $oldgroupdesc == "" && $groupdesc != "" ){ - echo "Gruppen-Beschreibung neu anlegen<br>"; - # hier noch Syntaxcheck - $entry['description'] = $groupdesc; - if($result = ldap_mod_add($ds,$groupDN,$entry)){ - $mesg = "Gruppen-Beschreibung erfolgreich eingetragen<br><br>"; - }else{ - $mesg = "Fehler beim eintragen der Gruppen-Beschreibung<br><br>"; - } -} - -if ( $oldgroupdesc != "" && $groupdesc != "" && $oldgroupdesc != $groupdesc ){ - echo "Gruppen-Beschreibung aendern<br>"; - # hier noch Syntaxcheck - $entry['description'] = $groupdesc; - if($result = ldap_mod_replace($ds,$groupDN,$entry)){ - $mesg = "Gruppen-Beschreibung erfolgreich geaendert<br><br>"; - }else{ - $mesg = "Fehler beim aendern der Gruppen-Beschreibung<br><br>"; - } -} - -if ( $oldgroupdesc != "" && $groupdesc == "" ){ - echo "Gruppen-Beschreibung loeschen<br>"; - # hier noch Syntaxcheck - $entry['description'] = $oldgroupdesc; - if($result = ldap_mod_del($ds,$groupDN,$entry)){ - $mesg = "Gruppen-Beschreibung erfolgreich geloescht<br><br>"; - }else{ - $mesg = "Fehler beim loeschen der Gruppen-Beschreibung<br><br>"; - } -} - - - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/group_delete.php b/ldap-site-mngmt/webinterface/computers/group_delete.php deleted file mode 100644 index 2a7e3d29..00000000 --- a/ldap-site-mngmt/webinterface/computers/group_delete.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$groupDN = $_POST['dn']; -$groupcn = $_POST['name']; -$groupDN = htmlentities($groupDN); -$groupcn = htmlentities($groupcn); - -/* -echo "AU dn:"; print_r($auDN); echo "<br>"; -echo "groupdn:"; print_r($groupDN); echo "<br>"; -echo "groupcn:"; print_r($groupcn); echo "<br>"; -*/ - -$seconds = 1; -$url = 'groupoverview.php'; - -echo " -<html> -<head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $groupDN != ""){ - - if ( delete_group($groupDN) ){ - $mesg = "Rechnergruppe <b>".$groupcn."</b> erfolgreich gelöscht!<br><br>"; - } - else{ - $mesg = "Fehler beim löschen der Rechnergruppe <b>".$groupcn."</b> !<br><br>"; - } - -} - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/groupoverview.dwt b/ldap-site-mngmt/webinterface/computers/groupoverview.dwt deleted file mode 100644 index d875c3be..00000000 --- a/ldap-site-mngmt/webinterface/computers/groupoverview.dwt +++ /dev/null @@ -1,38 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Rechnergruppen <code class='font_object'>{AU}</code> </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr> - <td width='20%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Rechnergruppe</b></td> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Anzahl Rechner</b></td> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>DHCP</b></td> - </tr> - - - - <!-- BEGIN DYNAMIC BLOCK: Gruppen --> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{GROUPCN} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{MEMBERS} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{DHCPCONT} </td> - </tr> - <!-- END DYNAMIC BLOCK: Gruppen --> - - </table></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td> - Zum Verwalten einer bestimmten Gruppe, wählen Sie links entsprechenden Submenü-Eintrag.<br> - - </td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/groupoverview.php b/ldap-site-mngmt/webinterface/computers/groupoverview.php deleted file mode 100644 index d14b9d0f..00000000 --- a/ldap-site-mngmt/webinterface/computers/groupoverview.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "groupoverview.dwt"; -include('computers_header.inc.php'); - -$mnr = 2; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$template->assign(array("DN" => "", - "GROUPCN" => "Noch keine Rechnergruppen angelegt", - "GROUPDESC" => "", - "MEMBERS" => "", - "DHCPCONT" => "")); - -$attributes = array("dn","cn","member","description","dhcphlpcont"); -$group_array = get_groups($auDN,$attributes); - -$template->define_dynamic("Gruppen", "Webseite"); - -foreach ($group_array as $group){ - - $groupname = "<a href='group.php?dn=".$group['dn']."&sbmnr=".$i."' class='headerlink'>".$group['cn']."</a>"; - $anzahlmember = count($group['member']); - - if ( count($group['dhcphlpcont']) != 0 ){ - $subnetCN = explode('cn=',$group['dhcphlpcont']); - $subnet = explode(',', $subnetCN[1]); - $dhcpcont = "Subnet $subnet[0]"; - }else{$dhcpcont = "";} - - $template->assign(array("DN" => $group['dn'], - "GROUPCN" => $groupname, - "GROUPDESC" => $group['description'], - "MEMBERS" => $anzahlmember, - # "MEMBER" => $group['member'], - "DHCPCONT" => $dhcpcont, - "AUDN" => $auDN )); - $template->parse("GRUPPEN_LIST", ".Gruppen"); -} - - - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/host.dwt b/ldap-site-mngmt/webinterface/computers/host.dwt deleted file mode 100644 index 4b3780a2..00000000 --- a/ldap-site-mngmt/webinterface/computers/host.dwt +++ /dev/null @@ -1,126 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - - <tr> - <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} Geo/Hardware </a></h4></td> - <td> </td> - </tr> - <tr> - <td height='20'></td> - </tr> - - <tr> - <td colspan='5'><h3>Administration Rechner <code class='font_object'> {HOSTNAME} </code> </h3></td> - </tr> - - <tr><td colspan='5'> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='host_change.php' method='post'> - - <tr> - <td width='45%' class='tab_h'><b>Attribut</b></td> - <td width='55%' class='tab_h'><b>Wert</b></td> - </tr> - - <tr height='50'> - <td class='tab_d'><b>Eindeutiger Rechnername (hostname):</b><br>(Teil des dn, ohne Leerzeichen eingeben) </td> - <td class='tab_d'> - <input type='Text' name='hostname' value='{HOSTNAME}' size='40' class='medium_form_field'> - <input type='hidden' name='oldhostname' value='{HOSTNAME}'> - </td> - </tr> - <tr height='50'> - <td class='tab_d'><b>Rechner Beschreibung: </td> - <td class='tab_d'> - <input type='Text' name='desc' value='{DESCRIPTION}' size='40' class='medium_form_field'> - <input type='hidden' name='olddesc' value='{DESCRIPTION}'> - - </td> - </tr> - <tr height='50'> - <td class='tab_d'><b>MAC Adresse:</b> </td> - <td class='tab_d'> - <input type='Text' name='mac' value='{HWADDRESS}' size='17' maxlength='17' class='medium_form_field'> - <input type='hidden' name='oldmac' value='{HWADDRESS}'> - (Format hex:hex:hex:hex:hex:hex) - </td> - </tr> - <tr height='50'> - <td class='tab_d'><b>IP Adresse:</b> </td> - <td class='tab_d'> - <input type='Text' name='ip' value='{IPADDRESS}' size='15' maxlength='15' class='medium_form_field'> - <input type='hidden' name='oldip' value='{IPADDRESS}'> - (Format xx.xx.xx.xx) - </td> - </tr> - - <input type='hidden' name='dhcphlpcont' value='{DHCPCONT}'> - <input type='hidden' name='dhcptype' value='{DHCPTYPE}'> - <input type='hidden' name='fixadd' value='{FIXADD}'> - <input type='hidden' name='hostdn' value='{HOSTDN}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - - </table></td> - </tr> - <tr> - <td colspan='4'><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - <!--<tr> - <td height='40'></td> - </tr> - - <tr> - <td colspan='4'><h4>Rechner <code class='font_object'>{HOSTNAME}</code> kopieren:</h4> - Geben Sie bitte den eindeutigen, noch nicht verwendeten Namen des neuen Rechnerobjekts an.</td> - </tr> - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'> - <form action='host_copy.php' method='post'> - - </table></td> - </tr><tr><td> - <input type='Submit' name='apply' value='kopieren' class='small_loginform_button'> - </form></td></tr> - - <tr>--> - - <tr> - <td height='50'></td> - </tr> - - <tr> - <td colspan='4'><h4>Rechner <code class='font_object'>{HOSTNAME}</code> löschen:</h4></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='delete_confirm.php' method='post'> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - Der Rechner wird komplett gelöscht, <br>d.h. inklusive aller spezifisch für ihn angelegten - Hardware-Profile (MachineConfig) und PXE Bootmenüs. - </tr> - - <input type='hidden' name='dn' value='{HOSTDN}'> - <input type='hidden' name='name' value='{HOSTNAME}'> - <input type='hidden' name='dhcphlpcont' value='{DHCPCONT}'> - <input type='hidden' name='delurl' value='host_delete.php'> - <input type='hidden' name='backurl' value='host.php?dn={HOSTDN}&sbmnr={SBMNR}'> - - </table></td> - </tr> - <tr> - <td> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'> - </form></td> - </tr> - - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/host.php b/ldap-site-mngmt/webinterface/computers/host.php deleted file mode 100644 index 454847bb..00000000 --- a/ldap-site-mngmt/webinterface/computers/host.php +++ /dev/null @@ -1,92 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "host.dwt"; - -include('computers_header.inc.php'); - -$mnr = 0; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$hostDN = $_GET['dn']; - -$attributes = array("hostname","domainname","ipaddress","hwaddress","description","dhcphlpcont","dhcpoptfixed-address", - "hw-mouse","hw-graphic","hw-monitor"); -$host = get_node_data($hostDN,$attributes); -$hostip = explode('_',$host['ipaddress']); - -# dhcp Typ -if ($host['dhcphlpcont'] == ""){ - $dhcptype = "nodhcp"; -}else{ - $ocarray = get_node_data($host['dhcphlpcont'],array("objectclass")); - $subnet = array_search('dhcpSubnet', $ocarray['objectclass']); - if ($subnet !== false ){ - $dhcptype = "subnet"; - } - $service = array_search('dhcpService', $ocarray['objectclass']); - if ($service !== false ){ - $dhcptype = "service"; - } -} -#print_r($dhcptype); - -$template->assign(array("HOSTDN" => $hostDN, - "HOSTNAME" => $host['hostname'], - "DOMAINNAME" => $host['domainname'], - "HWADDRESS" => $host['hwaddress'], - "IPADDRESS" => $hostip[0], - "DESCRIPTION" => $host['description'], - "DHCPCONT" => $host['dhcphlpcont'], - "DHCPTYPE" => $dhcptype, - "FIXADD" => $host['dhcpoptfixed-address'] , - "MOUSE" => $host['hw-mouse'], - "GRAPHIC" => $host['hw-graphic'], - "MONITOR" => $host['hw-monitor'], - "DHCPLINK" => "<a href='dhcphost.php?dn=".$hostDN."&sbmnr=".$sbmnr."' class='headerlink'>", - "RBSLINK" => "<a href='rbshost.php?dn=".$hostDN."&sbmnr=".$sbmnr."' class='headerlink'>", - "HWLINK" => "<a href='hwhost.php?dn=".$hostDN."&sbmnr=".$sbmnr."' class='headerlink'>", - "AUDN" => $auDN, - "SBMNR" => $sbmnr)); - - -########################################################## -# MC Wochenübersicht -$mc_array = get_machineconfigs($hostDN,array("dn","cn","timerange","description")); -# print_r($mc_array); -for ($i=0; $i<count($mc_array); $i++){ - # Timerange Komponenten - if (count($mc_array[$i]['timerange']) > 1 ){ - foreach ($mc_array[$i]['timerange'] as $tr){ - $exptime = array_merge(explode('_',$tr),$mc_array[$i]['description']); - $timeranges[$i][] = $exptime; # Für grafische Wo-Ansicht - } - }else{ - $exptime = array_merge(explode('_',$mc_array[$i]['timerange']), $mc_array[$i]['description']); - $timeranges[$i] = $exptime; # Für grafische Wo-Ansicht - } -} -include("mc_wochenplan.php"); - -########################################################### -# PXE Wochenübersicht - - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/host_add.php b/ldap-site-mngmt/webinterface/computers/host_add.php deleted file mode 100644 index 0f01fe75..00000000 --- a/ldap-site-mngmt/webinterface/computers/host_add.php +++ /dev/null @@ -1,103 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$hostname = $_POST['hostname']; -$hostdesc = $_POST['hostdesc']; -$mac = $_POST['mac']; -$ip = $_POST['ip']; -$dhcp = $_POST['dhcpcont']; - -$hostname = htmlentities($hostname); -$hostdesc = htmlentities($hostdesc); -$mac = htmlentities($mac); -$mac = strtolower($mac); -$ip = htmlentities($ip); - -/* -echo "AU dn:"; print_r($auDN); echo "<br>"; -echo "hostname:"; print_r($hostname); echo "<br>"; -echo "hostdesc:"; print_r($hostdesc); echo "<br>"; -echo "mac:"; print_r($mac); echo "<br>"; -echo "ip:"; print_r($ip); echo "<br><br>"; -*/ - -$attribs = $_POST['attribs']; -if (count($attribs) != 0){ - foreach (array_keys($attribs) as $key){ - $atts[$key] = htmlentities($attribs[$key]); - } -} - -$seconds = 2; - -echo " -<html> -<head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $hostname != ""){ - - # Formulareingaben anpassen - $exphn = explode(" ",$hostname); - foreach ($exphn as $word){$expuc[] = ucfirst($word);} - $hostname = implode(" ",$expuc); - $hostname = preg_replace ( '/\s+([0-9A-Z])/', '$1', $hostname); - - # Host Objekt anlegen - $brothers = get_hosts($auDN,array("hostname")); - $brother = 0; - foreach ($brothers as $item){ - if( $item['hostname'] == $hostname ){ - $mesg = "Es existiert bereits ein Rechner mit dem eingegebenen HOSTNAME!<br> - Bitte geben Sie einen anderen HOSTNAME ein.<br><br>"; - $get_hostdesc = str_replace ( " ", "_", $hostdesc ); - $get_mac = str_replace ( " ", "_", $mac ); - $get_ip = str_replace ( " ", "_", $ip ); - $url = "new_host.php?hostname=Hier_anderen_HOSTNAME_eingeben&hostdesc=".$get_hostdesc."&mac=".$get_mac."&ip=".$ip; - $brother = 1; - break; - } - } - if ($brother == 0){ - $hostDN = "HostName=".$hostname.",cn=computers,".$auDN; - # print_r($hostDN); echo "<br>"; - - if (add_host($hostDN,$hostname,$hostdesc,$mac,$ip,$atts,$dhcp)){ - $mesg .= "<br>Neuer Rechner erfolgreich angelegt<br>"; - } - else{ - $mesg .= "<br>Fehler beim anlegen des Rechners!<br>"; - } - - # DHCP - - $url = 'hostoverview.php'; - } -} - - -elseif ( $hostname == ""){ - - $get_hostdesc = str_replace ( " ", "_", $hostdesc ); - $get_mac = str_replace ( " ", "_", $mac ); - $get_ip = str_replace ( " ", "_", $ip ); - $mesg = "Sie haben den HOSTNAME des neuen Rechners nicht angegeben. Dieser ist aber ein notwendiges Attribut.<br> - Bitte geben Sie ihn an.<br><br>"; - $url = "new_host.php?ou=Hier_HOSTNAME_eingeben&hostdesc=".$get_hostdesc."&mac=".$get_mac."&ip=".$ip; -} - - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/host_change.php b/ldap-site-mngmt/webinterface/computers/host_change.php deleted file mode 100644 index 63e64f8a..00000000 --- a/ldap-site-mngmt/webinterface/computers/host_change.php +++ /dev/null @@ -1,427 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$hostname = $_POST['hostname']; -$oldhostname = $_POST['oldhostname']; -$mac = $_POST['mac']; -$oldmac = $_POST['oldmac']; -$ip = $_POST['ip']; -$oldip = $_POST['oldip']; -$desc = $_POST['desc']; -$olddesc = $_POST['olddesc']; - -$dhcphlpcont = $_POST['dhcphlpcont']; -$dhcptype = $_POST['dhcptype']; -$fixadd = $_POST['fixadd']; -$hostDN = $_POST['hostdn']; -$sbmnr = $_POST['sbmnr']; - -$syntax = new Syntaxcheck; - -$hostname = htmlentities($hostname); -$oldhostname = htmlentities($oldhostname); -$mac = htmlentities($mac); -$mac = strtolower($mac); -$oldmac = htmlentities($oldmac); -$ip = htmlentities($ip); -$oldip = htmlentities($oldip); -$desc = htmlentities($desc); -$olddesc = htmlentities($olddesc); - -/* -# sonstige Attribute -$attribs = $_POST['attribs']; -if (count($attribs) != 0){ - foreach (array_keys($attribs) as $key){ - $atts[$key] = htmlentities($attribs[$key]); - } -} -#print_r($atts); echo "<br><br>"; -$oldattribs = $_POST['oldattribs']; -if (count($oldattribs) != 0){ - foreach (array_keys($oldattribs) as $key){ - $oldatts[$key] = htmlentities($oldattribs[$key]); - } -}*/ -#print_r($oldatts); echo "<br><br>"; - -/* -echo "new hostname:"; print_r($hostname); echo "<br>"; -echo "old hostname:"; print_r($oldhostname); echo "<br>"; -echo "new mac:"; print_r($mac); echo "<br>"; -echo "old mac:"; print_r($oldmac); echo "<br>"; -echo "new ip:"; print_r($ip); echo "<br>"; -echo "old ip:"; print_r($oldip); echo "<br>"; -echo "new desc:"; print_r($desc); echo "<br>"; -echo "old desc:"; print_r($olddesc); echo "<br><br>"; -echo "Host DN:"; print_r($hostDN); echo "<br>"; -echo "submenuNR:"; print_r($submenu); echo "<br><br>"; -*/ - -$seconds = 2; -$url = 'host.php?dn='.$hostDN.'&sbmnr='.$sbmnr; - -echo " -<html> -<head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -############################################## -# Hostname - -if ( $oldhostname == $hostname ){ - $mesg = "keine Aenderung<br>"; -} - -if ( $oldhostname != "" && $hostname != "" && $oldhostname != $hostname ){ - 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 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> - <form action='host_delete.php' method='post'> - Falls ja:<br><br> - <input type='hidden' name='dn' value='".$hostDN."'> - <input type='hidden' name='name' value='".$oldhostname."'> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'><br><br> - </form> - <form action='".$url."' method='post'> - Falls, nein:<br><br> - <input type='Submit' name='apply' value='zurück' class='small_loginform_button'> - </form>"; - $seconds = 600; -} - - - -##################################### -# MAC - -if ( $oldmac == $mac ){ - #$mesg = "keine Aenderung<br>"; -} - -if ( $oldmac == "" && $mac != "" ){ - echo "MAC neu anlegen<br>"; - # hier noch Syntaxcheck - if( $syntax->check_mac_syntax($mac) ){ - $entry['hwaddress'] = $mac; - $result = ldap_mod_add($ds,$hostDN,$entry); - if($result){ - $mesg = "MAC erfolgreich eingetragen<br><br>"; - }else{ - $mesg = "Fehler beim eintragen der MAC<br><br>"; - } - }else{ - echo "Falsche MAC Syntax<br><br>"; - } -} - -if ( $oldmac != "" && $mac != "" && $oldmac != $mac ){ - echo "MAC aendern<br>"; - # hier noch Syntaxcheck - if( $syntax->check_mac_syntax($mac) ){ - $entry['hwaddress'] = $mac; - $pxemac = str_replace (":","-",$mac); - $pxeoldmac = str_replace (":","-",$oldmac); - $result = ldap_mod_replace($ds,$hostDN,$entry); - if($result){ - # in den PXEs auch ändern - $pxes = get_pxeconfigs($hostDN,array("dn","filename")); - if ( count($pxes) != 0 ){ - foreach ($pxes as $pxe){ - $entrynewmac ['filename'] = "01-".$pxemac; - ldap_mod_replace($ds,$pxe['dn'],$entrynewmac); - } - } - # und in Gruppen PXEs - $groups = get_groups_member($auDN,array("dn"),$hostDN); - if ( count($groups) != 0 ){ - $pxes = get_pxeconfigs($groups[0]['dn'],array("dn","filename")); - if ( count($pxes) != 0 ){ - foreach ($pxes as $pxe){ - if (count($pxe['filename']) > 1){ - for ($i=0; $i<count($pxe['filename']); $i++){ - if ($pxe['filename'][$i] == $pxeoldmac){ - $entrynewmac ['filename'][$i] = "01-".$pxemac; - }else{ - $entrynewmac ['filename'][$i] = $pxe['filename'][$i]; - } - } - } - if (count($pxe['filename']) == 1 && $pxe['filename'][$i] == $pxeoldmac){ - $entrynewmac ['filename'] = "01-".$pxemac; - } - ldap_mod_replace($ds,$pxe['dn'],$entrynewmac); - } - } - } - $mesg = "MAC erfolgreich geaendert<br><br> - Falls Rechner-Konfiguration via File, <b>Client-Conf</b> Dateiname in untergeordneten <br> - PXEs bitte auch ändern"; - }else{ - $mesg = "Fehler beim aendern der MAC<br><br>"; - } - }else{ - echo "Falsche MAC Syntax<br><br>"; - } -} - -if ( $oldmac != "" && $mac == "" ){ - echo "MAC loeschen<br>"; - # check ob PXEs am Rechnerobjekt hängen - $pxes = get_pxeconfigs($hostDN,array("dn","filename")); - $groups = get_groups_member($auDN,array("dn"),$hostDN); - if ( count($groups) != 0 ){ - $pxes2 = get_pxeconfigs($groups[0]['dn'],array("dn","filename")); - } - if ( count($pxes) != 0 || count($pxes2) != 0){ - echo "Für den Rechner sind PXE Bootmenüs angelegt welche die MAC Adresse als <br> - Dateinamen verwenden. Sie köennen die MAC erst löschen, wenn Sie diese PXEs <br> - entfernt haben.<br><br> - MAC nicht gelöscht!"; - } - 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>$dhcptext<br>"; - }else{ - $mesg = "Fehler beim loeschen der MAC<br><br>"; - } - } -} - - -######################################## -# IP - -if ( $oldip == $ip ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( $oldip == "" && $ip != "" ){ - echo "IP neu anlegen<br>"; - # hier noch Syntaxcheck - if( $syntax->check_ip_syntax($ip) ){ - $newip_array = array($ip,$ip); - $newip = implode('_',$newip_array); - # print_r($newip); echo "<br><br>"; - if (new_ip_host($newip,$hostDN,$auDN)){ - $mesg = "IP erfolgreich eingetragen<br><br>"; - #if ($dhcptype == "subnet"){ - # adjust_hostip_dhcpsubnet($ip,$hostDN,$dhcphlpcont); - #} - }else{ - $mesg = "Fehler beim eintragen der IP<br><br>"; - } - } - else{echo "Falsche IP Syntax<br><br>";} -} - -if ( $oldip != "" && $ip != "" && $oldip != $ip ){ - echo "IP aendern<br>"; - # hier noch Syntaxcheck - if( $syntax->check_ip_syntax($ip) ){ - $newip_array = array($ip,$ip); - $newip = implode('_',$newip_array); - # print_r($newip); echo "<br><br>"; - $oldip_array = array($oldip,$oldip); - $oldipp = implode('_',$oldip_array); - if (modify_ip_host($newip,$hostDN,$auDN,$fixadd)){ - $mesg = "IP erfolgreich geaendert<br><br>"; - if ($dhcptype == "subnet"){ - adjust_hostip_dhcpsubnet($ip,$hostDN,$dhcphlpcont); - } - adjust_hostip_tftpserverip($oldip,$ip); - }else{ - $mesg = "Fehler beim aendern der IP<br><br>"; - # oldip die schon gelöscht wurde wieder einfügen - new_ip_host($oldipp,$hostDN,$auDN); - } - } - else{echo "Falsche IP Syntax<br><br>";} -} - -if ( $oldip != "" && $ip == "" ){ - echo "IP loeschen<br>"; - - if(delete_ip_host($hostDN,$auDN)){ - $mesg = "IP erfolgreich geloescht<br><br>"; - adjust_hostip_tftpserverip($oldip,""); - }else{ - $mesg = "Fehler beim loeschen der IP<br><br>"; - } -} - - -##################################### -# Description - -if ( $olddesc == $desc ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( $olddesc == "" && $desc != "" ){ - echo "Rechner-Beschreibung neu anlegen<br>"; - # hier noch Syntaxcheck - $entry['description'] = $desc; - $result = ldap_mod_add($ds,$hostDN,$entry); - if($result){ - $mesg = "Rechner-Beschreibung erfolgreich eingetragen<br><br>"; - }else{ - $mesg = "Fehler beim eintragen der Rechner-Beschreibung<br><br>"; - } -} - -if ( $olddesc != "" && $desc != "" && $olddesc != $desc ){ - echo "Rechner-Beschreibung aendern<br>"; - # hier noch Syntaxcheck - $entry['description'] = $desc; - $result = ldap_mod_replace($ds,$hostDN,$entry); - if($result){ - $mesg = "Rechner-Beschreibung erfolgreich geaendert<br><br>"; - }else{ - $mesg = "Fehler beim aendern der Rechner-Beschreibung<br><br>"; - } -} - -if ( $olddesc != "" && $desc == "" ){ - echo "Rechner-Beschreibung loeschen<br>"; - # hier noch Syntaxcheck - $entry['description'] = $olddesc; - $result = ldap_mod_del($ds,$hostDN,$entry); - if($result){ - $mesg = "Rechner-Beschreibung erfolgreich geloescht<br><br>"; - }else{ - $mesg = "Fehler beim loeschen der Rechner-Beschreibung<br><br>"; - } -} - -#################################### -# restliche Attribute -/* -$entryadd = array(); -$entrymod = array(); -$entrydel = array(); - -foreach (array_keys($atts) as $key){ - - if ( $oldatts[$key] == $atts[$key] ){ - #$mesg = "keine Aenderung<br>"; - } - 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>"; - }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>"; - }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>"; - }else{ - $mesg = "Fehler beim loeschen der Attribute ".$delatts."<br><br>"; - } -} - -*/ -if ( $dhcphlpcont != "" ){ - update_dhcpmtime(array()); -} - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/host_delete.php b/ldap-site-mngmt/webinterface/computers/host_delete.php deleted file mode 100644 index 4d7a935b..00000000 --- a/ldap-site-mngmt/webinterface/computers/host_delete.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$hostDN = $_POST['dn']; -$hostname = $_POST['name']; -$dhcphlpcont = $_POST['dhcphlpcont']; -$hostDN = htmlentities($hostDN); -$hostname = htmlentities($hostname); - -/* -echo "AU dn:"; print_r($auDN); echo "<br>"; -echo "hostdn:"; print_r($hostDN); echo "<br>"; -echo "hostname:"; print_r($hostname); echo "<br>"; -*/ - -$seconds = 1; -$url = 'hostoverview.php'; - -echo " -<html> -<head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $hostDN != ""){ - - if ( delete_host($hostDN) ){ - if ( $dhcphlpcont != "" ){ - update_dhcpmtime(array()); - } - $mesg = "Rechner <b>".$hostname."</b> erfolgreich gelöscht!<br><br>"; - } - else{ - $mesg = "Fehler beim löschen von Rechner <b>".$hostname."</b> !<br><br>"; - } - -} - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/hostoverview.dwt b/ldap-site-mngmt/webinterface/computers/hostoverview.dwt deleted file mode 100644 index 2771ff76..00000000 --- a/ldap-site-mngmt/webinterface/computers/hostoverview.dwt +++ /dev/null @@ -1,40 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <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 colspan='2'> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr> - <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 --> - <tr valign='top' height='45'> - <td class='tab_d'><b>{HOSTNAME}</b> </td> - <td class='tab_d'>{IPADDRESS} </td> - <td class='tab_d'>{HWADDRESS} </td> - <td class='tab_d'>{FIXADD} </td> - <td class='tab_d'>{RBSCONT} </td> - <td class='tab_d'>{DESC} </td> - </tr> - <!-- END DYNAMIC BLOCK: Rechner --> - - </table></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 deleted file mode 100644 index b1728002..00000000 --- a/ldap-site-mngmt/webinterface/computers/hostoverview.php +++ /dev/null @@ -1,102 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "hostoverview.dwt"; - -include('computers_header.inc.php'); - -$mnr = 0; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$sort = "hostname"; -$sort = $_GET['sort']; - -$template->assign(array("DN" => "", - "HOSTNAME" => "Noch keine Rechner angelegt", - "DOMAINNAME" => "", - "HWADDRESS" => "", - "IPADDRESS" => "", - "DHCPCONT" => "", - "FIXADD" => "", - "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); - -if ($sort == "ipaddress"){ - $host_array = array_natsort($host_array, "ipaddress", "ipaddress"); -} - -$template->define_dynamic("Rechner", "Webseite"); - -$i = 0; -foreach ($host_array as $host){ - - $hostname = "<a href='host.php?dn=".$host['dn']."&sbmnr=".$i."' class='headerlink'>".$host['hostname']."</a>"; - $hostip = explode('_',$host['ipaddress']); - - $dhcpcont = ""; - $dhcpfixadd = "-"; - if ( count($host['dhcphlpcont']) != 0 ){ - $dhcpexpdn = ldap_explode_dn($host['dhcphlpcont'],1); - $dhcpcn = $dhcpexpdn[0]; - #$ocarray = get_node_data($host['dhcphlpcont'],array("objectclass","dhcphlpcont")); - #$sub = array_search('dhcpSubnet', $ocarray['objectclass']); - #if ($sub !== false ){ - # $dhcpcont = "Subnet ".$dhcpexpdn[0]." <br>[".$dhcpexpdn[2]."]"; - #}else{ - $dhcpcont = $dhcpexpdn[0]." <br>[".$dhcpexpdn[2]."]"; - #} - $dhcpfixadd = "dyn"; - if ( $host['dhcpoptfixed-address'] == "ip" ){ - $dhcpfixadd = "fix"; - } - if ( $host['dhcpoptfixed-address'] == "hostname" ){ - $dhcpfixadd = "fix (DNS)"; - } - } - - - $rbscont = "-"; - $dhcpnxtsrv = ""; - if ( count($host['hlprbservice']) != 0 ){ - $rbsexpdn = ldap_explode_dn($host['hlprbservice'],1); - $dhcpnxtsrv = $host['dhcpoptnext-server']; - $rbscont = $rbsexpdn[0]." <br>[".$dhcpnxtsrv."]"; - - - } - - $template->assign(array("DN" => $host['dn'], - "HOSTNAME" => $hostname, - "DOMAINNAME" => $host['domainname'], - "HWADDRESS" => $host['hwaddress'], - "IPADDRESS" => $hostip[0], - "DHCPCONT" => $dhcpcont, - "FIXADD" => $dhcpfixadd, - "RBSCONT" => $rbscont, - "DESC" => $host['description'], - "AUDN" => $auDN )); - $template->parse("RECHNER_LIST", ".Rechner"); - - $i++; -} - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/hwhost.dwt b/ldap-site-mngmt/webinterface/computers/hwhost.dwt deleted file mode 100644 index 48c2cd1c..00000000 --- a/ldap-site-mngmt/webinterface/computers/hwhost.dwt +++ /dev/null @@ -1,74 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - - <tr> - <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'>Geo/Hardware</code></h4></td> - <td> </td> - </tr> - <tr> - <td height='20'></td> - </tr> - <tr> - <td colspan='5'><h3>Geo / Hardware Optionen - Rechner <code class='font_object'> {HOSTNAME} </code> </h3></td> - </tr> - - <tr><td colspan='5'> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='hwhost_change.php' method='post'> - - <tr> - <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'> - <input type='hidden' name='oldattribs[hw-mouse]' value='{MOUSE}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>HW Graphic: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[hw-graphic]' value='{GRAPHIC}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[hw-graphic]' value='{GRAPHIC}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>HW Monitor: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[hw-monitor]' value='{MONITOR}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[hw-monitor]' value='{MONITOR}'> - </td> - </tr> - - <input type='hidden' name='hostdn' value='{HOSTDN}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - - </table></td> - </tr> - <tr> - <td colspan='4'><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/hwhost.php b/ldap-site-mngmt/webinterface/computers/hwhost.php deleted file mode 100644 index e0b1f7f8..00000000 --- a/ldap-site-mngmt/webinterface/computers/hwhost.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "hwhost.dwt"; - -include('computers_header.inc.php'); - -$mnr = 0; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$hostDN = $_GET['dn']; - -$attributes = array("hostname","domainname","ipaddress","hwaddress","description","dhcphlpcont", - "hw-mouse","hw-graphic","hw-monitor","geolocation","geoattribut"); -$host = get_node_data($hostDN,$attributes); -$hostip = explode('_',$host['ipaddress']); - -$template->assign(array("HOSTDN" => $hostDN, - "HOSTNAME" => $host['hostname'], - "DOMAINNAME" => $host['domainname'], - "HWADDRESS" => $host['hwaddress'], - "IPADDRESS" => $hostip[0], - "DESCRIPTION" => $host['description'], - "DHCPCONT" => $host['dhcphlpcont'], - "GEOLOC" => $host['geolocation'], - "GEOATT" => $host['geoattribut'], - "MOUSE" => $host['hw-mouse'], - "GRAPHIC" => $host['hw-graphic'], - "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'>", - "AUDN" => $auDN, - "SBMNR" => $sbmnr)); - - -########################################################## -# MC Wochenübersicht -$mc_array = get_machineconfigs($hostDN,array("dn","cn","timerange","description")); -# print_r($mc_array); -for ($i=0; $i<count($mc_array); $i++){ - # Timerange Komponenten - if (count($mc_array[$i]['timerange']) > 1 ){ - foreach ($mc_array[$i]['timerange'] as $tr){ - $exptime = array_merge(explode('_',$tr),$mc_array[$i]['description']); - $timeranges[$i][] = $exptime; # Für grafische Wo-Ansicht - } - }else{ - $exptime = array_merge(explode('_',$mc_array[$i]['timerange']), $mc_array[$i]['description']); - $timeranges[$i] = $exptime; # Für grafische Wo-Ansicht - } -} -include("mc_wochenplan.php"); - -########################################################### -# PXE Wochenübersicht - - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/hwhost_change.php b/ldap-site-mngmt/webinterface/computers/hwhost_change.php deleted file mode 100644 index 83ab270d..00000000 --- a/ldap-site-mngmt/webinterface/computers/hwhost_change.php +++ /dev/null @@ -1,116 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$syntax = new Syntaxcheck; - -$hostDN = $_POST['hostdn']; -$sbmnr = $_POST['sbmnr']; - -# sonstige Attribute -$attribs = $_POST['attribs']; -if (count($attribs) != 0){ - foreach (array_keys($attribs) as $key){ - $atts[$key] = htmlentities($attribs[$key]); - } -} -#print_r($atts); echo "<br><br>"; -$oldattribs = $_POST['oldattribs']; -if (count($oldattribs) != 0){ - foreach (array_keys($oldattribs) as $key){ - $oldatts[$key] = htmlentities($oldattribs[$key]); - } -} -#print_r($oldatts); echo "<br><br>"; - - -$seconds = 2; -$url = 'hwhost.php?dn='.$hostDN.'&sbmnr='.$sbmnr; - -echo " -<html> -<head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -#################################### -# restliche Attribute - -$entryadd = array(); -$entrymod = array(); -$entrydel = array(); - -foreach (array_keys($atts) as $key){ - - if ( $oldatts[$key] == $atts[$key] ){ - #$mesg = "keine Aenderung<br>"; - } - 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>"; - }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>"; - }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>"; - }else{ - $mesg = "Fehler beim loeschen der Attribute ".$delatts."<br><br>"; - } -} - -#update_dhcpmtime(array()); - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/ip_rechner.dwt b/ldap-site-mngmt/webinterface/computers/ip_rechner.dwt deleted file mode 100644 index 88d67316..00000000 --- a/ldap-site-mngmt/webinterface/computers/ip_rechner.dwt +++ /dev/null @@ -1,40 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Folgende IP Adressen haben Sie an Rechner vergeben: </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <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><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> - - <form action='ip_rechner_change.php' method='post'> - - <!-- BEGIN DYNAMIC BLOCK: Hosts --> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{HOSTNAME} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='newip[]' value='{IP}' size='15' class='medium_form_field'></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> {DHCPCONT} </td> - </tr> - <input type='hidden' name='oldip[]' value='{OLDIP}'> - <input type='hidden' name='hostdn[]' value='{HOSTDN}'> - <input type='hidden' name='fixadd[]' value='{FIXADD}'> - <input type='hidden' name='audn[]' value='{AUDN}'> - - <!-- END DYNAMIC BLOCK: Hosts --> - - </table></td> - </tr> - <tr> - <td> - <input type='Submit' name='apply' value='anwenden' class='small_loginform_button'></form> - </td> - </tr> -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/ip_rechner.php b/ldap-site-mngmt/webinterface/computers/ip_rechner.php deleted file mode 100644 index fcc04883..00000000 --- a/ldap-site-mngmt/webinterface/computers/ip_rechner.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# 3. Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "ip_rechner.dwt"; - -include('computers_header.inc.php'); - -############################################################################# - -$mnr = 1; -$sbmnr = -1; -$mcnr = -1; - -# Menuleiste erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -############################################################################# - -$sort = "hostname"; -$sort = $_GET['sort']; - -$template->assign(array("IP" => "", - "OLDIP" => "", - "DHCPCONT" => "", - "FIXADD" => "", - "HOSTNAME" => "Noch keine Rechner angelegt", - "HOSTDN" => "")); - -$host_array = get_hosts($auDN,array("dn","hostname","ipaddress","dhcphlpcont","dhcpoptfixed-address"),$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){ - $hostip = explode('_',$host['ipaddress']); - - $dhcpcont = ""; - $fixadd = ""; - if ( count($host['dhcphlpcont']) != 0 ){ #&& $host['ipaddress'] == "" ){ - $dhcpcont = " dynamisch"; - #$fixadd = $host['dhcpoptfixed-address']; - #}elseif( count($host['dhcphlpcont']) != 0 && $host['ipaddress'] != "" ){ - if ( $host['dhcpoptfixed-address'] == "ip") { - $dhcpcont = " fix"; - #$fixadd = $host['dhcpoptfixed-address']; - } - if ( $host['dhcpoptfixed-address'] == "hostname") { - $dhcpcont = " fix (über DNS Name)"; - #$fixadd = $host['dhcpoptfixed-address']; - } - $fixadd = $host['dhcpoptfixed-address']; - } - - $template->assign(array("IP" => $hostip[0], - "OLDIP" => $hostip[0], - "DHCPCONT" => $dhcpcont, - "FIXADD" => $fixadd, - "HOSTNAME" => $host['hostname'], - "HOSTDN" => $host['dn'], - "AUDN" => $auDN )); - $template->parse("HOSTS_LIST", ".Hosts"); -} - - -##################################################################################### - -include("computers_footer.inc.php"); - -?> diff --git a/ldap-site-mngmt/webinterface/computers/ip_rechner_change.php b/ldap-site-mngmt/webinterface/computers/ip_rechner_change.php deleted file mode 100644 index 4db8bed0..00000000 --- a/ldap-site-mngmt/webinterface/computers/ip_rechner_change.php +++ /dev/null @@ -1,122 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -$hostDN = $_POST['hostdn']; -$oldip = $_POST['oldip']; -$newip = $_POST['newip']; -$fixadd = $_POST['fixadd']; - -$syntax = new Syntaxcheck; -$url = "ip_rechner.php"; - -echo " -<html> -<head> - <title>IP Address Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - - -$diff1 = array_keys(array_diff_assoc($oldip,$newip)); -$diff2 = array_keys(array_diff_assoc($newip,$oldip)); -$tochange = array_unique(array_merge($diff1,$diff2)); - -foreach ($tochange as $i){ - - if ( $oldip[$i] == "" && $newip[$i] != "" ){ - echo "neue IP";echo "<br>";echo "<br>"; - echo "<br>"; - echo "alte IP: ";print_r($oldip[$i]);echo "<br>"; - echo "neue IP: ";print_r($newip[$i]);echo "<br>"; - - if ($syntax->check_ip_syntax($newip[$i])){ - echo "korrekte IP Syntax"; - $newip[$i] = htmlentities($newip[$i]); - $newip_array = array($newip[$i],$newip[$i]); - #print_r($newip_array); - $newipp = implode('_',$newip_array); - #print_r($newipp); - $oldip[$i] = htmlentities($oldip[$i]); - if (new_ip_host($newipp,$hostDN[$i],$auDN)){ - $mesg = "Neue IP Adresse eingetragen<br>"; - # falls Rechner in DHCP -> fixed-address auf IP Setzen... - # und update_dhcpmtime(array()); - }else{$mesg = "Fehler beim eintragen der neuen IP Adresse<br>";} - }else{echo "falsche IP Syntax";} - - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='ip_rechner.php' style='publink'>back</a>"; - redirect(4, $url, $mesg, $addSessionId = TRUE); - } - - elseif ( $oldip[$i] != "" && $newip[$i] != "" ){ - echo "aendern IP";echo "<br>";echo "<br>"; - echo "<br>"; - echo "alte IP: ";print_r($oldip[$i]);echo "<br>"; - echo "neue IP: ";print_r($newip[$i]);echo "<br>"; - - if ($syntax->check_ip_syntax($newip[$i])){ - echo "korrekte IP Syntax"; - $newip[$i] = htmlentities($newip[$i]); - $newip_array = array($newip[$i],$newip[$i]); - #print_r($newip_array); - $newipp = implode('_',$newip_array); - #print_r($newipp); - $oldip[$i] = htmlentities($oldip[$i]); - $oldip_array = array($oldip[$i],$oldip[$i]); - $oldipp = implode('_',$oldip_array); - if (modify_ip_host($newipp,$hostDN[$i],$auDN,$fixadd[$i])){ - $mesg = "IP Adresse geaendert<br>"; - adjust_hostip_tftpserverip($oldip[$i],$newip[$i]); - # Falls Rechner in DHCP - update_dhcpmtime(array()); - }else{ - $mesg = "Fehler beim aendern der IP Adresse<br>"; - # oldip die schon gelöscht wurde wieder einfügen - new_ip_host($oldipp,$hostDN[$i],$auDN);} - }else{echo "falsche IP Syntax";} - - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='ip_rechner.php' style='publink'>back</a>"; - redirect(4, $url, $mesg, $addSessionId = TRUE); - } - - elseif ( $oldip[$i] != "" && $newip[$i] == "" ){ - echo "loeschen IP";echo "<br>";echo "<br>"; - echo "<br>"; - echo "alte IP: ";print_r($oldip[$i]);echo "<br>"; - echo "neue IP: ";print_r($newip[$i]);echo "<br>"; - - echo "korrekte IP Syntax"; - $newip[$i] = htmlentities($newip[$i]); - $oldip[$i] = htmlentities($oldip[$i]); - if (delete_ip_host($hostDN[$i],$auDN)){ - $mesg = "IP Adresse geloescht<br>"; - adjust_hostip_tftpserverip($oldip[$i],""); - # falls Rechner in DHCP -> fixed-address auf dynamic/Hostname setzen - update_dhcpmtime(array()); - }else{$mesg = "Fehler beim loeschen der IP Adresse<br>";} - - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='ip_rechner.php' style='publink'>back</a>"; - redirect(4, $url, $mesg, $addSessionId = TRUE); - } - - else{ - $mesg = "keine Aenderung<br>"; - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='ip_rechner.php' style='publink'>back</a>"; - redirect(3, $url, $mesg, $addSessionId = TRUE); - } - -} - -echo " -</td></tr></table> -</head> -</html>"; -?> diff --git a/ldap-site-mngmt/webinterface/computers/machineconfig_default.dwt b/ldap-site-mngmt/webinterface/computers/machineconfig_default.dwt deleted file mode 100644 index 3596a0ce..00000000 --- a/ldap-site-mngmt/webinterface/computers/machineconfig_default.dwt +++ /dev/null @@ -1,323 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Default MachineConfigs (Konfigurationen) <code class='font_object'> {AU} </code> </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr> - <td width='40%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Machine Config</b></td> - <td width='60%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Gültigkeitsdauer (Time Range)</b></td> - </tr> - - - - <!-- BEGIN DYNAMIC BLOCK: Machineconf --> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{MCDESC} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{TRANGES} </td> - </tr> - <!-- END DYNAMIC BLOCK: Machineconf --> - - </table></td> - </tr> - <tr> - <td height='50'></td> - </tr> - - <tr> - <td colspan='2'><h4>Wochen Übersicht:</h4></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <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> - </tr> - - <tr> - <td height='10'></td> - </tr> - <tr> - <td colspan='2'><h4>Legende:</h4></td> - </tr> - <tr><td> - <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>Machine 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;'>Keine Konfiguration </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;'>{MCDESC} </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/machineconfig_default.php b/ldap-site-mngmt/webinterface/computers/machineconfig_default.php deleted file mode 100644 index ff52ced8..00000000 --- a/ldap-site-mngmt/webinterface/computers/machineconfig_default.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "machineconfig_default.dwt"; - -include('computers_header.inc.php'); - -$mnr = 3; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$template->assign(array("MCDN" => "", - "MCCN" => "Noch keine Default MachineConfig angelegt", - "TRANGES" => "", - "MCDESC" => "Noch keine Default MachineConfig angelegt")); - - -$mc_array = get_machineconfigs("cn=computers,".$auDN,array("dn","cn","timerange","description")); -# print_r($mc_array); - - -$template->define_dynamic("Machineconf", "Webseite"); - -for ($i=0; $i<count($mc_array); $i++){ - # Timerange Komponenten - $trange = ""; - if (count($mc_array[$i]['timerange']) > 1 ){ - foreach ($mc_array[$i]['timerange'] as $tr){ - $exptime = array_merge(explode('_',$tr),$mc_array[$i]['description']); - $timeranges[$i][] = $exptime; # Für grafische Wo-Ansicht - if ($exptime[0] == "X"){$exptime[0]="täglich";} - # if ($exptime[1] == "X" && $exptime[2] == "X"){$exptime[1] = ""; $exptime[2]= "";} - $trange .= $exptime[0].", von ".$exptime[1].":00 bis ".$exptime[2].":59 / "; - } - }else{ - $exptime = array_merge(explode('_',$mc_array[$i]['timerange']), $mc_array[$i]['description']); - $timeranges[$i] = $exptime; # Für grafische Wo-Ansicht - if ($exptime[0] == "X"){$exptime[0]="täglich";} - # if ($exptime[1] == "X" && $exptime[2] == "X"){$exptime[1] = ""; $exptime[2]= "";} - $trange .= $exptime[0].", von ".$exptime[1].":00 bis ".$exptime[2].":59"; - } - - $template->assign(array("MCDN" => $mc_array[$i]['dn'], - "MCCN" => $mc_array[$i]['cn'], - "TRANGES" => $trange, - "MCDESC" => $mc_array[$i]['description'], - "AUDN" => $auDN)); - $template->parse("MACHINECONF_LIST", ".Machineconf"); -} - -#get_entry_number($mc_array[3]['dn'],"machineconfig"); - -include("mc_wochenplan.php"); - - -################################################################################### - -include("computers_footer.inc.php"); - -?> diff --git a/ldap-site-mngmt/webinterface/computers/mc_wochenplan.php b/ldap-site-mngmt/webinterface/computers/mc_wochenplan.php deleted file mode 100644 index 3df7ab82..00000000 --- a/ldap-site-mngmt/webinterface/computers/mc_wochenplan.php +++ /dev/null @@ -1,154 +0,0 @@ -<?php - -##################################### -# Wochenübersicht - -$template->assign(array("A0" => "","B0" => "","C0" => "","D0" => "","E0" => "","F0" => "","G0" => "", - "A1" => "","B1" => "","C1" => "","D1" => "","E1" => "","F1" => "","G1" => "", - "A2" => "","B2" => "","C2" => "","D2" => "","E2" => "","F2" => "","G2" => "", - "A3" => "","B3" => "","C3" => "","D3" => "","E3" => "","F3" => "","G3" => "", - "A4" => "","B4" => "","C4" => "","D4" => "","E4" => "","F4" => "","G4" => "", - "A5" => "","B5" => "","C5" => "","D5" => "","E5" => "","F5" => "","G5" => "", - "A6" => "","B6" => "","C6" => "","D6" => "","E6" => "","F6" => "","G6" => "", - "A7" => "","B7" => "","C7" => "","D7" => "","E7" => "","F7" => "","G7" => "", - "A8" => "","B8" => "","C8" => "","D8" => "","E8" => "","F8" => "","G8" => "", - "A9" => "","B9" => "","C9" => "","D9" => "","E9" => "","F9" => "","G9" => "", - "A10" => "","B10" => "","C10" => "","D10" => "","E10" => "","F10" => "","G10" => "", - "A11" => "","B11" => "","C11" => "","D11" => "","E11" => "","F11" => "","G11" => "", - "A12" => "","B12" => "","C12" => "","D12" => "","E12" => "","F12" => "","G12" => "", - "A13" => "","B13" => "","C13" => "","D13" => "","E13" => "","F13" => "","G13" => "", - "A14" => "","B14" => "","C14" => "","D14" => "","E14" => "","F14" => "","G14" => "", - "A15" => "","B15" => "","C15" => "","D15" => "","E15" => "","F15" => "","G15" => "", - "A16" => "","B16" => "","C16" => "","D16" => "","E16" => "","F16" => "","G16" => "", - "A17" => "","B17" => "","C17" => "","D17" => "","E17" => "","F17" => "","G17" => "", - "A18" => "","B18" => "","C18" => "","D18" => "","E18" => "","F18" => "","G18" => "", - "A19" => "","B19" => "","C19" => "","D19" => "","E19" => "","F19" => "","G19" => "", - "A20" => "","B20" => "","C20" => "","D20" => "","E20" => "","F20" => "","G20" => "", - "A21" => "","B21" => "","C21" => "","D21" => "","E21" => "","F21" => "","G21" => "", - "A22" => "","B22" => "","C22" => "","D22" => "","E22" => "","F22" => "","G22" => "", - "A23" => "","B23" => "","C23" => "","D23" => "","E23" => "","F23" => "","G23" => "")); - -#print_r($timeranges); echo "<br>"; - -# vom spezifischsten zum unspezifischsten : -# FR_0_7 -> FR_X_X -> X_0_7 -> X_X_X -$daytime = array(); -$timex = array(); -$dayx = array(); -$allx = array(); -$legend = array(); -if(count($timeranges) != 0){ -foreach ($timeranges as $tr){ - if (count($tr[0]) > 1){ - foreach ($tr as $item){ - if ($item[0] != "X" && $item[1] != "X" && $item[2] != "X" && ($item[0] == "MO" || $item[0] == "DI" || $item[0] == "MI" || $item[0] == "DO" || $item[0] == "FR" || $item[0] == "SA" || $item[0] == "SO")){ - $daytime[] = $item; - } - if ($item[0] != "X" && $item[1] == "X" && $item[2] == "X"){ - $timex[] = $item; - } - if ($item[0] == "X" && $item[1] != "X" && $item[2] != "X"){ - $dayx[] = $item; - } - if ($item[0] == "X" && $item[1] == "X" && $item[2] == "X"){ - $allx[] = $item; - } - } - }else{ - if ($tr[0] != "X" && $tr[1] != "X" && $tr[2] != "X" && ($tr[0] == "MO" || $tr[0] == "DI" || $tr[0] == "MI" || $tr[0] == "DO" || $tr[0] == "FR" || $tr[0] == "SA" || $tr[0] == "SO")){ - $daytime[] = $tr; - } - if ($tr[0] != "X" && $tr[1] == "X" && $tr[2] == "X"){ - $timex[] = $tr; - } - if ($tr[0] == "X" && $tr[1] != "X" && $tr[2] != "X"){ - $dayx[] = $tr; - } - if ($tr[0] == "X" && $tr[1] == "X" && $tr[2] == "X"){ - $allx[] = $tr; - } - } -} - -#print_r($daytime); echo "<br>"; -#print_r($timex); echo "<br>"; -#print_r($dayx); echo "<br>"; -#print_r($allx); echo "<br>"; - -$daycode = array("MO" => "A", "DI" => "B", "MI" => "C", "DO" => "D", "FR" => "E", "SA" => "F", "SO" => "G"); -$allxcolors = array("#BEBEBE","A0A0A0","#696969","#EEDFCC","#D8BFD8","#505050"); -$dayxcolors = array("#483D8B","#7B68EE","#191970","#8470FF","#708090","#6A5ACD"); -$timexcolors = array("#CDC673","#A2CD5A","#BDB76B","#8B864E","#6B8E23","#CDBE70"); -$daytimecolors = array("880000","#CD6839","#CC3300","#CC6600","#993300","#8B4C39"); - - -if (count($allx) != 0){ - $c = 0; - foreach ($allx as $range){ - foreach ($daycode as $dc){ - for ($i = 0; $i <= 23; $i++){ - $template->assign(array($dc.$i => "background-color:".$allxcolors[$c].";")); - } - } - $legend[] = array($range ,$allxcolors[$c]); - $c++; - } -} - -if (count($dayx) != 0){ - $c = 0; - foreach ($dayx as $range){ - foreach ($daycode as $dc){ - for ($i = $range[1]; $i<= $range[2]; $i++){ - $template->assign(array($dc.$i => "background-color:".$dayxcolors[$c].";")); - } - } - $legend[] = array($range ,$dayxcolors[$c]); - $c++; - } -} - -if (count($timex) != 0){ - $c = 0; - foreach ($timex as $range){ - $dc = $daycode[$range[0]]; - for ($i = 0; $i<= 23; $i++){ - $template->assign(array($dc.$i => "background-color:".$timexcolors[$c].";")); - } - $legend[] = array($range ,$timexcolors[$c]); - $c++; - } -} - -if (count($daytime) != 0){ - $c = 0; - foreach ($daytime as $range){ - $dc = $daycode[$range[0]]; - for ($i = $range[1]; $i<= $range[2]; $i++){ - $template->assign(array($dc.$i => "background-color:".$daytimecolors[$c].";")); - } - $legend[] = array($range ,$daytimecolors[$c]); - $c++; - } -} - -} - -$template->assign(array("MCDESC" => "")); -#print_r($legend); -if (count($legend) != 0){ - $template->define_dynamic("Legende", "Webseite"); - foreach ($legend as $item){ - # Timerange Komponente - $color = $item[1]; - $template->assign(array("TR1" => $item[0][0], - "TR2" => $item[0][1], - "TR3" => $item[0][2], - "MCDESC" => $item[0][3], - "COLOR" => $color)); - $template->parse("LEGENDE_LIST", ".Legende"); - } -} - - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/mcdef.dwt b/ldap-site-mngmt/webinterface/computers/mcdef.dwt deleted file mode 100644 index 15f48548..00000000 --- a/ldap-site-mngmt/webinterface/computers/mcdef.dwt +++ /dev/null @@ -1,293 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>MachineConfig <code class='font_object'> {MCCN} </code> </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td colspan='2'><h4>Allgemein:</h4></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='mcdef_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;'> - <font size='+2'><b>MC_</b></font><input type='Text' name='mccn' value='{MCCN}' size='50' class='medium_form_field'> - <input type='hidden' name='oldmccn' value='{MCCN}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Machine Config <br>Beschreibung: </td> - <td width='5%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcdesc' value='{MCDESC}' size='60' class='medium_form_field'> - <input type='hidden' name='oldmcdesc' value='{MCDESC}'> - - </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> </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;'> - Eines der folgenden:<br> - - - <b>Datum</b> (dd.mm, z.B. 21.03/01.11) <br> - - <b>Monatstag</b> (dd, z.B. 01 oder 25) <br> - - <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;'> - - <b>Uhrzeit</b> (Format: hh, z.B. 07-19)<br> - - <b>X</b> für rund um die Uhr - - </td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: TRanges --> - <tr valign='top'> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'>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;'> - <input type='checkbox' name='deltr[]' value='{MCDAY}_{MCBEG}_{MCEND}'> - </td> - <td width='35%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - <input type='Text' name='mcday[]' value='{MCDAY}' size='5' maxlength='5' class='medium_form_field'> - <input type='hidden' name='oldmcday[]' value='{MCDAY}'> <br> - - - <td width='35%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - <input type='Text' name='mcbeg[]' value='{MCBEG}' size='2' maxlength='2' class='medium_form_field'> - <input type='hidden' name='oldmcbeg[]' value='{MCBEG}'> <b><font size='+1'>:00</b> - </font> - <input type='Text' name='mcend[]' value='{MCEND}' size='2' maxlength='2' class='medium_form_field'> - <input type='hidden' name='oldmcend[]' value='{MCEND}'> <b><font size='+1'>:59</b> Uhr</font><br> - </td> - </tr> - <!-- 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;'> - <input type='Text' name='newmcday' value='' size='5' maxlength='5' class='medium_form_field'> - - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='newmcbeg' value='' size='2' maxlength='2' class='medium_form_field'> - <b><font size='+1'>:00</b> - </font> - <input type='Text' name='newmcend' value='' size='2' maxlength='2' class='medium_form_field'> - <b><font size='+1'>:59</b> Uhr</font><br> - - </td> - </tr> - - </table></td> - </tr> - - <tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>Dienste:</h4></td> - </tr> - - <tr><td> - <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> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start X: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[start-x]' value='{X}' size='10' maxlength='3' class='medium_form_field'> - <input type='hidden' name='oldattribs[start-x]' value='{X}'> ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start SNMP: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[start-snmp]' value='{SNMP}' size='10' maxlength='3' class='medium_form_field'> - <input type='hidden' name='oldattribs[start-snmp]' value='{SNMP}'> ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start SSHD: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[start-sshd]' value='{SSHD}' size='10' maxlength='3' class='medium_form_field'> - <input type='hidden' name='oldattribs[start-sshd]' value='{SSHD}'> ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start XDMCP: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[start-xdmcp]' value='{XDMCP}' size='10' maxlength='3' class='medium_form_field'> - <input type='hidden' name='oldattribs[start-xdmcp]' value='{XDMCP}'> ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start RWHOD: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[start-rwhod]' value='{RWHOD}' size='10' maxlength='3' class='medium_form_field'> - <input type='hidden' name='oldattribs[start-rwhod]' value='{RWHOD}'> ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start PRINT DAEMON: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[start-printdaemon]' value='{PRINTD}' size='10' maxlength='3' class='medium_form_field'> - <input type='hidden' name='oldattribs[start-printdaemon]' value='{PRINTD}'> ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>TEX Enable: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[tex-enable]' value='{TEX}' size='10' maxlength='3' class='medium_form_field'> - <input type='hidden' name='oldattribs[tex-enable]' value='{TEX}'> ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start CRON: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[start-cron]' value='{CRON}' size='10' maxlength='3' class='medium_form_field'> - <input type='hidden' name='oldattribs[start-cron]' value='{CRON}'> ( yes | no ) - </td> - </tr> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Crontab Entries:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <!-- BEGIN DYNAMIC BLOCK: Crontab --> - <input type='Text' name='crontab[]' value='{CRONTAB}' size='60' class='medium_form_field'> - <input type='hidden' name='oldcrontab[]' value='{CRONTAB}'> <br> - <!-- END DYNAMIC BLOCK: Crontab --> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Language: </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[language]' value='{LANG}' size='10' maxlength='2' class='medium_form_field'> - <input type='hidden' name='oldattribs[language]' value='{LANG}'> - - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>NETBIOS Workgroup: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[netbios-workgroup]' value='{NETBIOS}' size='40' class='medium_form_field'> - <input type='hidden' name='oldattribs[netbios-workgroup]' value='{NETBIOS}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>VMWARE: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[vmware]' value='{VMWARE}' size='40' class='medium_form_field'> - <input type='hidden' name='oldattribs[vmware]' value='{VMWARE}'> - </td> - </tr> - - <input type='hidden' name='nodedn' value='{NODEDN}'> - <input type='hidden' name='mcdn' value='{MCDN}'> - <input type='hidden' name='oldmccn' value='{MCCN}'> - <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> - <td><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - <tr> - <td height='40'></td> - </tr> - - <tr> - <td colspan='2'><h4>MachineConfig <code class='font_object'>{MCCN}</code> kopieren:</h4> - Beachten Sie, dass die Time Ranges der Machine Config nicht mit kopiert werden.<br> - Sie müssen diese anschließend neu setzen. <br> - Geben Sie bitte den eindeutigen Namen des neuen MachineConfig-Objektes an. - </tr> - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'> - <form action='mcdef_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>MC_</b></font><input type='Text' name='mccncp' value='{MCCN}' size='50' class='medium_form_field'> - <input type='hidden' name='oldmccncp' value='{MCCN}'> - </td> - </tr> - - <input type='hidden' name='mcdn' value='{MCDN}'> - <input type='hidden' name='oldmccn' value='{MCCN}'> - <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='40'></td> - </tr> - - <tr> - <td colspan='2'><h4>Default MachineConfig <code class='font_object'>{MCCN}</code> löschen:</h4></td> - </tr> - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'> - <form action='delete_confirm.php' method='post'> - - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - Die MachineConfig wird komplett gelöscht. - </tr> - - <input type='hidden' name='dn' value='{MCDN}'> - <input type='hidden' name='name' value='{MCCN}'> - <input type='hidden' name='delurl' value='mcdef_delete.php'> - <input type='hidden' name='backurl' value='mcdef.php?dn={MCDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}'> - - - </table></td> - </tr><tr><td> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'> - </form></td></tr> - -</table> diff --git a/ldap-site-mngmt/webinterface/computers/mcdef.php b/ldap-site-mngmt/webinterface/computers/mcdef.php deleted file mode 100644 index 51a760ba..00000000 --- a/ldap-site-mngmt/webinterface/computers/mcdef.php +++ /dev/null @@ -1,132 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "mcdef.dwt"; - -include('computers_header.inc.php'); - -$mnr = -1; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; -$mcnr = $_GET['mcnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$mcDN = $_GET['dn']; - -$attributes = array("dn","cn","description","timerange","language","start-x","start-snmp","start-sshd", - "start-xdmcp","start-rwhod","start-cron","start-printdaemon","crontab-entries", - "tex-enable","netbios-workgroup","vmware"); -$mc = get_node_data($mcDN,$attributes); -#print_r($mc); - -$exp = explode(',',$mcDN); -$node = array_slice($exp,1); -$nodeDN = implode(',',$node); - -# Timerange Komponenten -$template->define_dynamic("TRanges", "Webseite"); -if (count($mc['timerange']) > 1){ - foreach($mc['timerange'] as $tr){ - $exptime = explode('_',$tr); - $template->assign(array("MCDAY" => $exptime[0], - "MCBEG" => $exptime[1], - "MCEND" => $exptime[2])); - $template->parse("TRANGES_LIST", ".TRanges"); - } -}else{ - $exptime = explode('_',$mc['timerange']); - $template->assign(array("MCDAY" => $exptime[0], - "MCBEG" => $exptime[1], - "MCEND" => $exptime[2])); - $template->parse("TRANGES_LIST", ".TRanges"); -} - -$expcn = explode('_',$mc['cn']); -$name = array_slice($expcn,1); -$mccn = implode('_',$name); - -$template->assign(array("MCDN" => $mcDN, - "MCCN" => $mccn, - "MCDESC" => $mc['description'], - "LANG" => $mc['language'], - "X" => $mc['start-x'], - "SNMP" => $mc['start-snmp'], - "SSHD" => $mc['start-sshd'], - "XDMCP" => $mc['start-xdmcp'], - "RWHOD" => $mc['start-rwhod'], - "CRON" => $mc['start-cron'], - "CRONTAB" => "", - "PRINTD" => $mc['start-printdaemon'], - "TEX" => $mc['tex-enable'], - "NETBIOS" => $mc['netbios-workgroup'], - "VMWARE" => $mc['vmware'], - "NODEDN" => $nodeDN, - "DEFDN" => "cn=computers,".$auDN, - "MNR" => $mnr, - "SBMNR" => $sbmnr, - "MCNR" => $mcnr)); - -$template->define_dynamic("Crontab", "Webseite"); -if ( count($mc['crontab-entries']) != 0 ){ - if ( count($mc['crontab-entries']) > 1 ){ - foreach ($mc['crontab-entries'] as $crontab){ - $template->assign(array("CRONTAB" => $crontab)); - $template->parse("CRONTAB_LIST", ".Crontab"); - } - } - if ( count($mc['crontab-entries']) == 1 ){ - $template->assign(array("CRONTAB" => $mc['crontab-entries'])); - $template->parse("CRONTAB_LIST", ".Crontab"); - } -} -$template->assign(array("CRONTAB" => "")); -$template->parse("CRONTAB_LIST", ".Crontab"); - -################################################ -# MC 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"); -} - - -# falls TR vorhanden dann soll sie gelöscht werden (flag deltr setzen) -if (count($mc['timerange']) != 0){ - $template->assign(array("DELTR" => "1")); -} -else{ - $template->assign(array("DELTR" => "0")); -} - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/mcdef_add.php b/ldap-site-mngmt/webinterface/computers/mcdef_add.php deleted file mode 100644 index efb86e87..00000000 --- a/ldap-site-mngmt/webinterface/computers/mcdef_add.php +++ /dev/null @@ -1,160 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$mccn = $_POST['mccn']; $mccn = htmlentities($mccn); -$mcdesc = $_POST['mcdesc']; $mcdesc = htmlentities($mcdesc); -$mcday = $_POST['mcday']; $mcday = htmlentities($mcday); -$mcbeg = $_POST['mcbeg']; $mcbeg = htmlentities($mcbeg); -$mcend = $_POST['mcend']; $mcend = htmlentities($mcend); - -$nodeDN = $_POST['nodedn']; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - -$targets = $_POST['targets']; -#print_r($targets); echo "<br>"; -$n = array_keys($targets,'none'); -#print_r($n); echo "<br>"; -for ($i=0; $i<count($n); $i++){ - $match = array_search('none',$targets); - array_splice($targets, $match, 1); -} -#echo "Zielobjekte: ";print_r($targets); echo "<br>"; - -$mcattribs = $_POST['mcattribs']; -if (count($mcattribs) != 0){ - foreach (array_keys($mcattribs) as $key){ - $mcatts[$key] = htmlentities($mcattribs[$key]); - } -} -# print_r($mcatts); echo "<br><br>"; - -$seconds = 2; -$get_mccn = str_replace ( " ", "_", $mccn ); -$get_mcdesc = str_replace ( " ", "_", $mcdesc ); -$get_mcday = str_replace ( " ", "_", $mcday ); -$get_mcbeg = str_replace ( " ", "_", $mcbeg ); -$get_mcend = str_replace ( " ", "_", $mcend ); -$url = "new_mcdef.php?mccn=".$get_mccn."&mcdesc=".$get_mcdesc."&mcday=".$get_mcday."&mcbeg=".$get_mcbeg."&mcend=".$get_mcend."&mnr=".$mnr."&sbmnr=".$sbmnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $mccn != "" && $mccn != "Hier_MC_NAME_eintragen"){ - - $mccn = "MC_".$mccn; - # Formulareingaben anpassen - $expmc = explode(" ",$mccn); - foreach ($expmc as $word){$expuc[] = ucfirst($word);} - $mccn = implode(" ",$expuc); - $mccn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $mccn); - - $mctimerange = ""; - - if (count($targets) != 0){ - foreach ($targets as $targetDN){ - - $exptargetdn = ldap_explode_dn($targetDN, 1); - $targetcn = $exptargetdn[0]; - $targettype = $exptargetdn[1]; - - # Check auf eindeutigen MC-Namen am Zielobjekt - $brothers = get_machineconfigs($targetDN,array("cn")); - $brother = 0; - foreach ($brothers as $item){ - if( $item['cn'] == $mccn ){ - $mesg = "Es existiert bereits ein PXE Boot Menü mit dem eingegebenen Namen!<br> - Bitte geben Sie einen anderen Namen ein.<br><br>"; - $url = "new_mcdef.php?mccn=".$get_mccn."&mcday=".$get_mcday."&mcbeg=".$get_mcbeg."&mcend=".$get_mcend."&mnr=".$mnr."&sbmnr=".$sbmnr; - $brother = 1; - break; - } - } - if ($brother == 0){ - - if ( $mcday != "" && $mcbeg != "" && $mcend != "" && $mcbeg <= $mcend ){ - - # TimeRange Syntax checken - $syntax = new Syntaxcheck; - if ($syntax->check_timerange_syntax($mcday,$mcbeg,$mcend)){ - - # in Grossbuchstaben - if (preg_match("/([a-z]+)/",$mcday)){$mcday = strtoupper($mcday);} - if (preg_match("/([a-z]+)/",$mcbeg)){$mcbeg = strtoupper($mcbeg);} - if (preg_match("/([a-z]+)/",$mcend)){$mcend = strtoupper($mcend);} - - # führende Nullen weg - $mcbeg = preg_replace ( '/0([0-9])/', '$1', $mcbeg); - $mcend = preg_replace ( '/0([0-9])/', '$1', $mcend); - - # TimeRange auf Überschneidung mit vorhandenen checken - if(check_timerange($mcday,$mcbeg,$mcend,$targetDN,"")){ - $mctimerange = $mcday."_".$mcbeg."_".$mcend; - } - else{ - $mesg = "Es existiert bereits eine MachineConfig, die sich mit der eingegebenen Time Range - überschneidet!<br> - Die neue MachineConfig wird ohne Time Range angelegt.<br> - Bitte geben Sie diese anschließend ein.<br><br>"; - } - } - else{ - $mesg = "Falsche Syntax in der Time-Range-Eingabe! Die neue MachineConfig wird ohne Time Range angelegt.<br> - Bitte geben Sie diese anschließend ein.<br><br>"; - } - } - else{ - $mesg = "Keine vollständige Time-Range-Eingabe! Die neue MachineConfig wird ohne Time Range angelegt.<br> - Bitte geben Sie diese anschließend ein.<br><br>"; - } - - $mcDN = "cn=".$mccn.",".$targetDN; - print_r($mcDN); echo "<br>"; - - if (add_mc($mcDN,$mccn,$mctimerange,$mcdesc,$mcattribs)){ - $mesg .= "<br>Neue MachineConfig erfolgreich angelegt<br>"; - if ($targettype == "computers"){ - $url = "mcdef.php?dn=".$mcDN."&mnr=1"; - } - if ($targettype == "groups"){ - $url = "mcdef.php?dn=".$mcDN."&mnr=2"; - } - if ($targettype == $au_ou){ - $url = "machineconfig_default.php"; - } - } - else{ - $mesg .= "<br>Fehler beim anlegen der MachineConfig!<br>"; - } - } - } - } - else{ - $mesg .= "<br>Sie haben kein Ziel angegeben!<br>"; - } -} - -elseif ( $mccn == "" || $mccn == "Hier_MC_NAME_eintragen"){ - - $mesg = "Sie haben den Namen der neuen Machine Config nicht angegeben. Dieser ist aber ein notwendiges Attribut.<br> - Bitte geben Sie ihn an.<br><br>"; - $url = "new_mcdef.php?mccn=Hier_MC_NAME_eintragen&mcdesc=".$get_mcdesc."&mcday=".$get_mcday."&mcbeg=".$get_mcbeg."&mcend=".$get_mcend."&mnr=".$mnr."&sbmnr=".$sbmnr; -} - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/mcdef_change.php b/ldap-site-mngmt/webinterface/computers/mcdef_change.php deleted file mode 100644 index 4aaa29fe..00000000 --- a/ldap-site-mngmt/webinterface/computers/mcdef_change.php +++ /dev/null @@ -1,402 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$mccn = "MC_".$_POST['mccn']; -$mcdesc = $_POST['mcdesc']; $mcdesc = htmlentities($mcdesc); - -$mcday = $_POST['mcday']; -$mcbeg = $_POST['mcbeg']; -$mcend = $_POST['mcend']; -foreach (array_keys($mcday) as $key){ - $mcday[$key] = htmlentities($mcday[$key]); -} -foreach (array_keys($mcbeg) as $key){ - $mcbeg[$key] = htmlentities($mcbeg[$key]); -} -foreach (array_keys($mcend) as $key){ - $mcend[$key] = htmlentities($mcend[$key]); -} - -$deltr = $_POST['deltr']; - -$newmcday = $_POST['newmcday']; $newmcday = htmlentities($newmcday); -$newmcbeg = $_POST['newmcbeg']; $newmcbeg = htmlentities($newmcbeg); -$newmcend = $_POST['newmcend']; $newmcend = htmlentities($newmcend); - -$oldmcdesc = $_POST['oldmcdesc']; $oldmcdesc = htmlentities($oldmcdesc); -$oldmcday = $_POST['oldmcday']; -$oldmcbeg = $_POST['oldmcbeg']; -$oldmcend = $_POST['oldmcend']; - -$crontab = $_POST['crontab']; -$oldcrontab = $_POST['oldcrontab']; -foreach (array_keys($crontab) as $key){ - $crontab[$key] = htmlentities($crontab[$key]); -} - -$mcDN = $_POST['mcdn']; -$oldmccn = "MC_".$_POST['oldmccn']; - -$nodeDN = $_POST['nodedn']; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - -# sosntige Attribute -$attribs = $_POST['attribs']; -if (count($attribs) != 0){ - foreach (array_keys($attribs) as $key){ - $atts[$key] = htmlentities($attribs[$key]); - } -} -#print_r($atts); echo "<br><br>"; -$oldattribs = $_POST['oldattribs']; -if (count($oldattribs) != 0){ - foreach (array_keys($oldattribs) as $key){ - $oldatts[$key] = htmlentities($oldattribs[$key]); - } -} -#print_r($oldatts); echo "<br><br>"; - - -$seconds = 2; -$url = "mcdef.php?dn=".$mcDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -############################################## -# MC CN (DN) - -if ( $oldmccn == $mccn ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( $oldmccn != "" && $mccn != "" && $oldmccn != $mccn ){ - echo "Machine Config Name aendern<br>"; - # hier noch Syntaxcheck - # Formulareingaben anpassen - $expmc = explode(" ",$mccn); - foreach ($expmc as $word){$expuc[] = ucfirst($word);} - $mccn = implode(" ",$expuc); - $mccn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $mccn); - - - $newmcDN = "cn=".$mccn.",".$nodeDN; - print_r($newmcDN); echo "<br><br>"; - - if(modify_mc_dn($mcDN, $newmcDN)){ - $mesg = "MC Name erfolgreich geändert<br><br>"; - $mcDN = $newmcDN; - }else{ - $mesg = "Fehler beim ändern des MC Name!<br><br>"; - } - - - # newsubmenu holen... - $url = "mcdef.php?dn=".$newmcDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; -} - -if ( $oldmccn != "" && $mccn == "" ){ - echo "Gruppenname loeschen!<br> - Dieses ist Teil des DN, Sie werden die MachineConfig komplett löschen<br><br>"; - echo "Wollen Sie die MachineConfig <b>".$oldmccn."</b> wirklich löschen?<br><br> - <form action='mcdef_delete.php' method='post'> - Falls ja:<br><br> - <input type='hidden' name='dn' value='".$mcDN."'> - <input type='hidden' name='name' value='".$oldmccn."'> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'><br><br> - </form> - <form action='".$url."' method='post'> - Falls, nein:<br><br> - <input type='Submit' name='apply' value='zurück' class='small_loginform_button'> - </form>"; - $seconds = 600; -} - - -########################################## -# bereits vorhandene TimeRange(s) bearbeiten - -$entrymodtr = array(); -$modtr = 0; -# TimeRanges zusammensetzen -# $t = 0; # Laufvariable für $entrymodtr, da nicht jede Timerange ok sein muss -for ($i=0; $i<count($mcday); $i++){ - -$oldmctimerange = $oldmcday[$i]."_".$oldmcbeg[$i]."_".$oldmcend[$i]; - -if ( ($mcbeg[$i] <= $mcend[$i]) && ( ($mcday[$i] != $oldmcday[$i] && $mcday[$i] != "") || ($mcbeg[$i] != $oldmcbeg[$i] && $mcbeg[$i] != "") || ($mcend[$i] != $oldmcend[$i] && $mcend[$i] != "")) ){ - - - # TimeRange Syntax checken - $syntax = new Syntaxcheck; - if ($syntax->check_timerange_syntax($mcday[$i],$mcbeg[$i],$mcend[$i])){ - - # in Grossbuchstaben - if (preg_match("/([a-z]+)/",$mcday[$i])){$mcday[$i] = strtoupper($mcday[$i]);} - if (preg_match("/([a-z]+)/",$mcbeg[$i])){$mcbeg[$i] = strtoupper($mcbeg[$i]);} - if (preg_match("/([a-z]+)/",$mcend[$i])){$mcend[$i] = strtoupper($mcend[$i]);} - - # führende Nullen weg - $mcbeg[$i] = preg_replace ( '/0([0-9])/', '$1', $mcbeg[$i]); - $mcend[$i] = preg_replace ( '/0([0-9])/', '$1', $mcend[$i]); - - # TimeRange auf Überschneidung mit vorhandenen checken außer mit eigener alter TR da diese - # ja geändert werden soll - if(check_timerange($mcday[$i],$mcbeg[$i],$mcend[$i],$nodeDN,$oldmctimerange)){ - - $mctimerange = $mcday[$i]."_".$mcbeg[$i]."_".$mcend[$i]; - $entrymodtr ['timerange'][$i] = $mctimerange; - $modtr = 1; - - } - else{ - $mesg = "Es existiert bereits eine MachineConfig, die sich mit der eingegebenen Time Range - überschneidet!<br> - Bitte geben Sie eine andere Time Range ein.<br><br>"; - $entrymodtr ['timerange'][$i] = $oldmctimerange; - } - } - else{ - $mesg = "Falsche Syntax in der Timerange-Eingabe!<br> - Bitte geben Sie die erneut Time Range ein.<br><br>"; - $entrymodtr ['timerange'][$i] = $oldmctimerange; - } - -} - - -elseif ( $mcday[$i] == "" || $mcbeg[$i] == "" || $mcend[$i] == "" || $mcbeg[$i] > $mcend[$i]){ - - $mesg = "Sie haben die Time Range <b>Nr.".$i."</b> nicht vollständig angegeben. Diese ist aber ein notwendiges Attribut.<br> - Diese Time Range wird nicht bearbeitet.<br><br>"; - $entrymodtr ['timerange'][$i] = $oldmctimerange; -} - -else{$entrymodtr ['timerange'][$i] = $oldmctimerange;} -} # Ende for-Schleife für jede Timerange -# jetzt noch alle gesammelten Änderungen Durchführen ... -if ($modtr == 1){ - # erst ändern - echo "Ändern: "; print_r($entrymodtr); echo "<br>"; - if($result = ldap_mod_replace($ds,$mcDN,$entrymodtr)){ - $mesg = "TimeRanges erfolgreich geändert<br><br>"; - }else{ - $mesg = "Fehler beim ändern der TimeRanges!<br><br>"; - } -} - - -if ( count($deltr) != 0 && $modtr == 0 ){ - # Time Range löschen - $j = 0; - foreach ($deltr as $delrange){ - $entrydeltr ['timerange'][$j] = $delrange; - $j++; - } - # dann löschen - echo "Löschen: "; print_r($entrydeltr); echo "<br>"; - if($result = ldap_mod_del($ds,$mcDN,$entrydeltr)){ - $mesg = "TimeRanges erfolgreich gelöscht<br><br>"; - }else{ - $mesg = "Fehler beim löschen der TimeRanges!<br><br>"; - } -}elseif(count($deltr) != 0 && $modtr == 1){ - echo "Nur Ändern (gleichzeitig Löschen und Ändern geht nicht)"; -} - -##################################### -# TimeRange hinzufügen - -if ( $newmcday != "" && $newmcbeg != "" && $newmcend != "" && $newmcbeg <= $newmcend ){ - - # TimeRange Syntax checken - $syntax = new Syntaxcheck; - if ($syntax->check_timerange_syntax($newmcday,$newmcbeg,$newmcend)){ - - # in Grossbuchstaben - if (preg_match("/([a-z]+)/",$newmcday)){$newmcday = strtoupper($newmcday);} - if (preg_match("/([a-z]+)/",$newmcbeg)){$newmcbeg = strtoupper($newmcbeg);} - if (preg_match("/([a-z]+)/",$newmcend)){$newmcend = strtoupper($newmcend);} - - # führende Nullen weg - $newmcbeg = preg_replace ( '/0([0-9])/', '$1', $newmcbeg); - $newmcend = preg_replace ( '/0([0-9])/', '$1', $newmcend); - - # TimeRange auf Überschneidung mit vorhandenen checken - if(check_timerange($newmcday,$newmcbeg,$newmcend,$nodeDN,"")){ - - $newmctimerange = $newmcday."_".$newmcbeg."_".$newmcend; - $entrytr ['timerange'] = $newmctimerange; - if($result = ldap_mod_add($ds,$mcDN,$entrytr)){ - $mesg = "Zusätzliche TimeRange erfolgreich eingetragen<br><br>"; - }else{ - $mesg = "Fehler beim eintragen der zusätzlichen TimeRange!<br><br>"; - } - }else{ - $mesg = "Es existiert bereits eine MachineConfig, die sich mit der eingegebenen Time Range - überschneidet!<br> - Bitte geben Sie eine andere Time Range ein.<br><br>"; - } - }else{ - $mesg = "Falsche Syntax in der Timerange-Eingabe!<br> - Bitte geben Sie die erneut Time Range ein.<br><br>"; - } -} - -##################################### -# MC Description - -if ( $oldmcdesc == $mcdesc ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( $oldmcdesc == "" && $mcdesc != "" ){ - echo "MC-Beschreibung neu anlegen<br>"; - # hier noch Syntaxcheck - $entrymc['description'] = $mcdesc; - if(ldap_mod_add($ds,$mcDN,$entrymc)){ - $mesg = "MC-Beschreibung erfolgreich eingetragen<br><br>"; - }else{ - $mesg = "Fehler beim eintragen der MC-Beschreibung<br><br>"; - } -} - -if ( $oldmcdesc != "" && $mcdesc != "" && $oldmcdesc != $mcdesc ){ - echo "MC-Beschreibung aendern<br>"; - # hier noch Syntaxcheck - $entrymc['description'] = $mcdesc; - if(ldap_mod_replace($ds,$mcDN,$entrymc)){ - $mesg = "MC-Beschreibung erfolgreich geaendert<br><br>"; - }else{ - $mesg = "Fehler beim aendern der MC-Beschreibung<br><br>"; - } -} - -if ( $oldmcdesc != "" && $mcdesc == "" ){ - echo "Rechner-Beschreibung loeschen<br>"; - # hier noch Syntaxcheck - $entrymc['description'] = $oldmcdesc; - if(ldap_mod_del($ds,$mcDN,$entrymc)){ - $mesg = "MC-Beschreibung erfolgreich geloescht<br><br>"; - }else{ - $mesg = "Fehler beim loeschen der MC-Beschreibung<br><br>"; - } -} - -##################################### -# Crontab Entries - -if (count($crontab) != 0 && (count(array_diff_assoc($crontab,$oldcrontab)) != 0 || count(array_diff_assoc($oldcrontab,$crontab)) != 0) ){ - - $crontabentry = array(); - foreach ($crontab as $ct){ - if ($ct != ""){ - $crontabentry ['crontab-entries'][] = $ct; - } - } - $oldcrontabentry = array(); - foreach ($oldcrontab as $oldct){ - if ($oldct != ""){ - $oldcrontabentry ['crontab-entries'][] = $oldct; - } - } - - if (count($crontabentry) == 0){ - echo "Crontab Eintrag löschen<br>"; - ldap_mod_del($ds,$mcDN,$oldcrontabentry); - }else{ - echo "Crontab Eintrag ändern<br>"; - print_r($crontabentry); - ldap_mod_replace($ds,$mcDN,$crontabentry); - } -} - -##################################### -# Restliche Attribute - -$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]; - } -} - -#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,$mcDN,$entryadd)){ - $mesg = "Attribute ".$addatts." erfolgreich eingetragen<br><br>"; - }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,$mcDN,$entrymod)){ - $mesg = "Attribute ".$modatts." erfolgreich geaendert<br><br>"; - }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,$mcDN,$entrydel)){ - $mesg = "Attribute ".$delatts." erfolgreich geloescht<br><br>"; - }else{ - $mesg = "Fehler beim loeschen der Attribute ".$delatts."<br><br>"; - } -} - - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/mcdef_copy.php b/ldap-site-mngmt/webinterface/computers/mcdef_copy.php deleted file mode 100644 index 313b22fc..00000000 --- a/ldap-site-mngmt/webinterface/computers/mcdef_copy.php +++ /dev/null @@ -1,111 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$mcDN = $_POST['mcdn']; -$mccn = "MC_".$_POST['mccncp']; -$oldmccn = "MC_".$_POST['oldmccncp']; - -$deltr = $_POST['deltr']; - -$nodeDN = $_POST['nodedn']; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - -$copytargets = $_POST['copytargets']; -#print_r($copytargets); echo "<br>"; -$n = array_keys($copytargets,'none'); -#print_r($n); echo "<br>"; -for ($i=0; $i<count($n); $i++){ - $match = array_search('none',$copytargets); - array_splice($copytargets, $match, 1); -} -print_r($copytargets); echo "<br>"; - - -$seconds = 2; -$url = "mcdef.php?dn=".$mcDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $mccn != ""){ - - # Formulareingaben anpassen - $expmc = explode(" ",$mccn); - foreach ($expmc as $word){$expuc[] = ucfirst($word);} - $mccn = implode(" ",$expuc); - $mccn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $mccn); - - - if (count($copytargets) != 0){ - foreach ($copytargets as $targetDN){ - - $brothers = get_machineconfigs($targetDN,array("cn")); - $brother = 0; - foreach ($brothers as $item){ - if( $item['cn'] == $mccn ){ - $mesg = "Es existiert bereits eine Machine Config mit dem eingegebenen Namen!<br> - Bitte geben Sie einen anderen Namen ein.<br><br>"; - $url = "mcdef.php?dn=".$mcDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - $brother = 1; - break; - } - } - if ($brother == 0){ - - print_r($targetDN); echo "<br>"; - $exptarget = explode(',',$targetDN); - $target = explode('=',$exptarget[0]); - - $newmcDN = "cn=".$mccn.",".$targetDN; - print_r($newmcDN); echo "<br>"; - - - if (dive_into_tree_cp($mcDN,$newmcDN)){ - if($deltr == 1){ - $entrydel ['timerange'] = array(); - # Timeranges im neuen Objekt löschen - if (ldap_mod_del($ds,$newmcDN,$entrydel)){ - $mesg .= "<br>MachineConfig erfolgreich nach ".$target[1]." kopiert<br>"; - } - else{ - ldap_delete($ds,$newmcDN); - $mesg .= "<br>Fehler beim kopieren der MachineConfig nach <b>".$target[1]."</b><br>"; - } - } - } - else{ - $mesg .= "<br>Fehler beim kopieren der MachineConfig nach <b>".$target[1]."</b><br>"; - } - } - } - } - else{ - $mesg .= "<br>Sie haben kein Ziel angegeben!<br>"; - } -} - -elseif ( $mccn == ""){ - - $mesg = "Sie haben den Namen der neuen Machine Config nicht angegeben. Dieser ist aber ein notwendiges Attribut.<br> - Bitte geben Sie ihn an.<br><br>"; - $url = "mcdef.php?dn=".$mcDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; -} - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/mcdef_delete.php b/ldap-site-mngmt/webinterface/computers/mcdef_delete.php deleted file mode 100644 index e191f703..00000000 --- a/ldap-site-mngmt/webinterface/computers/mcdef_delete.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$mcDN = $_POST['dn']; -$mccn = $_POST['name']; - -$seconds = 1; -$url = 'machineconfig_default.php'; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $mcDN != ""){ - - if ( dive_into_tree_del($mcDN,"") ){ - $mesg = "Machine Config <b>".$mccn."</b> erfolgreich gelöscht!<br><br>"; - } - else{ - $mesg = "Fehler beim löschen der Machine Config <b>".$mccn."</b> !<br><br>"; - } - -} - - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/menu.dwt b/ldap-site-mngmt/webinterface/computers/menu.dwt deleted file mode 100644 index 7d316674..00000000 --- a/ldap-site-mngmt/webinterface/computers/menu.dwt +++ /dev/null @@ -1,32 +0,0 @@ - -<table cellpadding='0' cellspacing='0' border='0' width='100%'> - - - <!-- 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="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"> - <code class="submenue_schrift">{TEXT_M}</code> - </a> - </td> - <td width='10%'> </td> - - </tr> - - <!-- BEGIN DYNAMIC BLOCK: Submenu --> - - {SUB} - - <!-- END DYNAMIC BLOCK: Submenu --> - - <tr height='5'> - </tr> - -<!-- END DYNAMIC BLOCK: Hauptmenu --> - -</table> diff --git a/ldap-site-mngmt/webinterface/computers/menuentry.dwt b/ldap-site-mngmt/webinterface/computers/menuentry.dwt deleted file mode 100644 index 57c1e0d7..00000000 --- a/ldap-site-mngmt/webinterface/computers/menuentry.dwt +++ /dev/null @@ -1,249 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td height='20'><h4><a href='pxe.php?dn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}' class='headerlink'><< Zurück zu PXE Config {PXECN}</a></h4></td> - </tr> - <tr> - <td height='20'> </td> - </tr> - <tr> - <td colspan='2'><h3>Boot Menü Eintrag <code class='font_object'> {MECN} </code> </h3></td> - </tr> - <tr> - <td height='20'> </td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='menuentry_change.php' method='post'> - - <tr> - <td width='40%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='60%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Eindeutiger Name (cn):</b><br>(Teil des dn, ohne Leerzeichen eingeben) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mecn' value='{MECN}' size='50' class='medium_form_field'> - <input type='hidden' name='oldmecn' value='{MECN}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Label:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[label]' value='{LABEL}' size='50' class='medium_form_field'> - <input type='hidden' name='oldattribs[label]' value='{LABEL}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Generisches Boot Image: </b><br><br>(Angeboten von) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <h4>{GMECN}</h4> Abteilung: {GMEOU} [Remote Boot Dienst: {GMERBS}] - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Label:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menulabel]' value='{MELABEL}' size='50' class='medium_form_field'> - <input type='hidden' name='oldattribs[menulabel]' value='{MELABEL}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Default:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menudefault]' value='{MEDEF}' size='50' class='medium_form_field'> - <input type='hidden' name='oldattribs[menudefault]' value='{MEDEF}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Passwd:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menupasswd]' value='{MEPASSWD}' size='50' class='medium_form_field'> - <input type='hidden' name='oldattribs[menupasswd]' value='{MEPASSWD}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Hide:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menuhide]' value='{MEHIDE}' size='50' class='medium_form_field'> - <input type='hidden' name='oldattribs[menuhide]' value='{MEHIDE}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Localboot:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[localboot]' value='{LOCALBOOT}' size='50' class='medium_form_field'> - <input type='hidden' name='oldattribs[localboot]' value='{LOCALBOOT}'> - </td> - </tr> - - </table></td> - </tr> - <tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>APPEND Parameter:</h4></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td width='20%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='80%' 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>Client Konfiguration via: </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[clientconfvia]' value='{CCV}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[clientconfvia]' value='{CCV}'> ( dhcp | file | ldap ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>vga: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[vga]' value='{VGA}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[vga]' value='{VGA}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>splash: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[splash]' value='{SPLASH}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[splash]' value='{SPLASH}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>vci: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[vci]' value='{VCI}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[vci]' value='{VCI}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>no ldsc: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[noldsc]' value='{NOLDSC}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[noldsc]' value='{NOLDSC}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>elevator: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[elevator]' value='{ELEVATOR}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[elevator]' value='{ELEVATOR}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>apic: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[apic]' value='{APIC}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[apic]' value='{APIC}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Union FS: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[unionfs]' value='{UNIONFS}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[unionfs]' value='{UNIONFS}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>cowloop: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[cowloop]' value='{COWLOOP}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[cowloop]' value='{COWLOOP}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Debug Level: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[debug]' value='{DEBUG}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[debug]' value='{DEBUG}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menü Position: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='menpos' value='{MENPOS}' size='2' class='medium_form_field'> - <input type='hidden' name='oldmenpos' value='{MENPOS}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Submenü Verweis: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[submenulink]' value='{SUBMENULINK}' size='50' class='medium_form_field'> - <br> - Dieses Feld sollte nur bei Verweisen auf Submenüs den vollständigen Link zu diesen enthalten - <br>(d.h. <TFTP-Server-IP>::/<TFTP-PXE-Pfad>/<Timerange>/<PXE-Dateiname>). <br> - Bei Textzeilen und Leerzeilen muss hier <b>"self"</b> stehen. <br> - Bei normalen Menüeinträgen (inklusive Localboot) muss diese Feld <b>leer</b> sein. - <input type='hidden' name='oldattribs[submenulink]' value='{SUBMENULINK}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Kernel: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[kernel]' value='{KERNEL}' size='50' class='medium_form_field'> - <br> - Angabe hier nur sinnvoll bei Leer-, Textzeilen oder Submenüverweisen, <br> - denn Eingabe wird, wenn der Menüeintrag auf ein generisches Boot Image verweist (siehe oben) <br> - bei der PXE Datei Generierung überschrieben. - <input type='hidden' name='oldattribs[kernel]' value='{KERNEL}'> - </td> - </tr> - - <input type='hidden' name='medn' value='{MEDN}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='timespan' value='{TIMERANGE}'> - <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> - <td><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - - <tr> - <td height='40'></td> - </tr> - - <tr> - <td colspan='2'><h4>Boot Menü Eintrag <code class='font_object'>{MECN}</code> löschen:</h4></td> - </tr> - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'> - <form action='delete_confirm.php' method='post'> - - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - Das generische Boot Image wird komplett gelöscht. - </tr> - - <input type='hidden' name='dn' value='{MEDN}'> - <input type='hidden' name='name' value='{MECN}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='delurl' value='menuentry_delete.php'> - <input type='hidden' name='successurl' value='pxe.php?dn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}'> - <input type='hidden' name='backurl' value='menuentry.php?dn={MEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}'> - - - </table></td> - </tr> - <tr> - <td> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'> - </form></td> - </tr> - - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/menuentry.php b/ldap-site-mngmt/webinterface/computers/menuentry.php deleted file mode 100644 index 386178a3..00000000 --- a/ldap-site-mngmt/webinterface/computers/menuentry.php +++ /dev/null @@ -1,165 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "menuentry.dwt"; - -include('computers_header.inc.php'); - -$mnr = -1; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; -$mcnr = $_GET['mcnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$meDN = $_GET['dn']; - -$attributes = array("cn","genericmenuentrydn","label","menulabel","menudefault","menupasswd","vga","splash", - "noldsc","elevator","clientconfvia","apic", - "cowloop","unionfs","debug","vci","menuhide","menuposition","localboot","kernel","submenulink"); -$me = get_node_data($meDN,$attributes); -#print_r($me); - -# PXE DN -$exp = explode(',',$meDN); -$node = array_slice($exp,1); -$exppxecn = explode('=',$node[0]); -$pxecn = $exppxecn[1]; -$pxeDN = implode(',',$node); - -# Generic Menu Entry -$expgbm = ldap_explode_dn ($me['genericmenuentrydn'],1); -$gmecn = $expgbm[0]; -$gmerbs = $expgbm[1]; -$gmeou = $expgbm[3]; - -# PXE/RBS Daten -$pxe = get_node_data($pxeDN,array("rbservicedn","timerange")); -$timerange = $pxe['timerange']; -$rbsDN = $pxe['rbservicedn']; -$exp = explode(',',$rbsDN); -$exprbsau = explode('=',$exp[2]); $rbsau = $exprbsau[1]; -$rbsdata = get_node_data($rbsDN,array("cn","nfsserverip","exportpath","tftpserverip","tftppath")); - -# Bootmenu Daten -$template->assign(array("MEDN" => $meDN, - "MECN" => $me['cn'], - "GMECN" => $gmecn, - "GMEOU" => $gmeou, - "GMERBS" => $gmerbs, - "LABEL" => $me['label'], - "MELABEL" => $me['menulabel'], - "MEDEF" => $me['menudefault'], - "MEPASSWD" => $me['menupasswd'], - "MEHIDE" => $me['menuhide'], - "VGA" => $me['vga'], - "SPLASH" => $me['splash'], - "NOLDSC" => $me['noldsc'], - "ELEVATOR" => $me['elevator'], - "VCI" => $me['vci'], - "CCV" => $me['clientconfvia'], - "APIC" => $me['apic'], - "COWLOOP" => $me['cowloop'], - "UNIONFS" => $me['unionfs'], - "DEBUG" => $me['debug'], - "MENPOS" => $me['menuposition'], - "LOCALBOOT" => $me['localboot'], - "KERNEL" => $me['kernel'], - "SUBMENULINK" => $me['submenulink'], - "PXEDN" => $pxeDN, - "PXECN" => $pxecn, - "TIMERANGE" => $timerange, - "MNR" => $mnr, - "SBMNR" => $sbmnr, - "MCNR" => $mcnr)); - -#$template->define_dynamic("Submenulink", "Webseite"); -#if (count($me['submenulink']) != 0){ -# foreach ($me['submenulink'] as $sbml){ -# $template->assign(array("SUBMENULINK" => $sbml)); -# $template->parse("SUBMENULINK_LIST", ".Submenulink"); -# } -#} - -# Alternative RB Dienste holen -$altrbs = get_rbservices($auDN,array("dn","cn")); -if (count($altrbs) != 0){ - for ($i=0; $i < count($altrbs); $i++){ - if ($rbsDN == $altrbs[$i]['dn']){ - array_splice($altrbs, $i, 1); - } - } -} - - -if (count($altrbs) != 0){ -$template->define_dynamic("Altrbs", "Webseite"); - foreach ($altrbs as $item){ - $altrbsexp = explode(',',$item['dn']); - $altrbsau = explode('=',$altrebsexp[2]); - $template->assign(array("ALTRBSDN" => $item['dn'], - "ALTRBSCN" => $item['cn'], - "ALTRBSAU" => "[ ".$altrbsau[1]." ]")); - $template->parse("ALTRBS_LIST", ".Altrbs"); - } -}else{ - $template->assign(array("ALTRBSDN" => "", - "ALTRBSCN" => "", - "ALTRBSAU" => "")); -} - -################################################ -# Bootmenü Einträge - -$menuentries = get_menuentries($pxeDN,array("dn","menuposition","label","menulabel")); -#print_r($menuentries); echo "<br>"; - -$template->define_dynamic("Bootmenu", "Webseite"); - -foreach ($menuentries as $me){ - $template->assign(array("MENDN" => $me['dn'], - "MENULABEL" => $me['menulabel'], - "POSITION" => $me['menuposition'], - "AUDN" => $auDN)); - $template->parse("BOOTMENU_LIST", ".Bootmenu"); -} - - -################################################ -# 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"); -} - -################################################################################### - -include("computers_footer.inc.php"); - -?> diff --git a/ldap-site-mngmt/webinterface/computers/menuentry_add.php b/ldap-site-mngmt/webinterface/computers/menuentry_add.php deleted file mode 100644 index 4f02d2a6..00000000 --- a/ldap-site-mngmt/webinterface/computers/menuentry_add.php +++ /dev/null @@ -1,263 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$mecn = $_POST['mecn']; $mecn = htmlentities($mecn); -$gbmDN = $_POST['gbm']; -$menpos = $_POST['menpos']; -$maxpos = $_POST['maxpos']; - -$typ = $_POST['typ']; -$pxeDN = $_POST['pxedn']; -$timespan = $_POST['timerange']; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - -$meattribs = $_POST['attribs']; -if (count($meattribs) != 0){ - foreach (array_keys($meattribs) as $key){ - $meatts[$key] = htmlentities($meattribs[$key]); - } -} -# print_r($meatts); echo "<br><br>"; - -# PXE Typ (computers/groups) für Submenulinks -$pxearray = ldap_explode_dn($pxeDN, 1); -$pxetype = $pxearray[2]; - -$seconds = 2; -$get_mecn = str_replace ( " ", "_", $mecn ); -$url = "pxe_bootmenue.php?dn=".$pxeDN."&mecn=".$get_mecn."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; -# switch wäre besser ... -if ($typ == "newme" && $typ != "local" && $typ != "text" && $typ != "leer" && $typ != "submenu" ){ - - if ( $mecn != "" && $mecn != "Hier_NAME_eintragen" && $gbmDN != "none" ){ - - # Formulareingaben anpassen - $expme = explode(" ",$mecn); - foreach ($expme as $word){$expuc[] = ucfirst($word);} - $mecn = implode(" ",$expuc); - $mecn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $mecn); - - if ($menpos != ""){ - # Syntaxcheck Menüposition - #$syntax = new Syntaxcheck; - #if (!($syntax->check_menuposition($menpos))){ - # $menpos = $maxpos; - #} - }else{ - $menpos = $maxpos; - } - if (strlen($menpos) == 1){ - $menpos = "0".$menpos; - } - # nun doch führende Nullen erzwingen - # also obsolet: $menpos = preg_replace ( '/0([0-9])/', '$1', $menpos); - - $meDN = "cn=".$mecn.",".$pxeDN; - - if (add_me($meDN,$mecn,$gbmDN,$menpos,$meatts,$pxeDN)){ - $mesg .= "<br>Neuen Menü Eintrag erfolgreich angelegt<br>"; - $url = "pxe_bootmenue.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr;; - } - else{ - $mesg .= "<br>Fehler beim anlegen des Menü Eintrags!<br>"; - } - } - - elseif ( $mecn == "" || $mecn == "Hier_NAME_eintragen" || $gbmDN == "none" ){ - - $mesg = "Sie haben den Namen des neuen Menü Eintrags nicht angegeben oder kein - Generisches Boot Image ausgewählt. Beide sind aber ein notwendige Attribute.<br> - Bitte geben Sie sie an.<br><br>"; - $url = "new_menuentry.php?mecn=Hier_NAME_eintragen&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - } -} - -# Localboot Zeile hinzufügen -elseif ($typ == "local" && $typ != "newme" && $typ != "text" && $typ != "leer" && $typ != "submenu" ){ - - # Menu Position - $menpos = $_POST['localpos']; - if ($menpos != ""){ - # Syntaxcheck Menüposition - #$syntax = new Syntaxcheck; - #if (!($syntax->check_menuposition($menpos))){ - # $menpos = $maxpos; - #} - }else{ - $menpos = $maxpos; - } - if (strlen($menpos) == 1){ - $menpos = "0".$menpos; - } - # nun doch führende Nullen erzwingen - # also obsolet: $menpos = preg_replace ( '/0([0-9])/', '$1', $menpos); - - # CN bilden - $brothers = get_menuentries($pxeDN,array("dn","cn")); - $i=1; - $localcn = "localboot".$i; - if(count($brothers) != 0){ - for ($c=0; $c<count($brothers); $c++){ - foreach ($brothers as $item){ - if ($localcn == strtolower($item['cn'])){ - $i++; - $localcn = "localboot".$i; - } - } - } - } - $meDN = "cn=".$localcn.",".$pxeDN; - $entry ['objectclass'][0] = "MenuEntry"; - $entry ['objectclass'][1] = "top"; - $entry ['cn'] = $localcn; - $entry ['menuposition'] = $menpos; - $entry ['label'] = $localcn; - $entry ['menulabel'] = $_POST['locallabel']; - $entry ['menupasswd'] = $_POST['localpasswd']; - $entry ['localboot'] = "level 0"; - $pos = preg_replace ( '/0([0-9])/', '$1', $menpos); - increment_menupositions($pxeDN,$pos); # andere jeweils um 1 erhöhen - if (ldap_add($ds,$meDN,$entry)){ - $mesg .= "Localboot Zeile erfolgeich an Position ".$menpos." eingetragen"; - }else{ - $mesg .= "Fehler beim eintragen der Localboot Zeile!"; - } - $url = "pxe_bootmenue.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; -} - - -# Text Zeile hinzufügen -elseif ($typ == "text" && $typ != "newme" && $typ != "local" && $typ != "leer" && $typ != "submenu" ){ - - # Menu Position - $menpos = $_POST['textpos']; - if ($menpos != ""){ - # Syntaxcheck Menüposition - #$syntax = new Syntaxcheck; - #if (!($syntax->check_menuposition($menpos))){ - # $menpos = $maxpos; - #} - }else{ - $menpos = $maxpos; - } - if (strlen($menpos) == 1){ - $menpos = "0".$menpos; - } - # nun doch führende Nullen erzwingen - # also obsolet: $menpos = preg_replace ( '/0([0-9])/', '$1', $menpos); - - $text = $_POST['text']; - if($text != "" && $text != "TEXT"){ - $brothers = get_menuentries($pxeDN,array("dn","cn")); - $i=1; - $textcn = "textzeile".$i; - if(count($brothers) != 0){ - for ($c=0; $c<count($brothers); $c++){ - foreach ($brothers as $item){ - if ($textcn == strtolower($item['cn'])){ - $i++; - $textcn = "textzeile".$i; - } - } - } - } - $meDN = "cn=".$textcn.",".$pxeDN; - $entry ['objectclass'][0] = "MenuEntry"; - $entry ['objectclass'][1] = "top"; - $entry ['cn'] = $textcn; - $entry ['menuposition'] = $menpos; - $entry ['label'] = $text; - $entry ['kernel'] = "menu.c32"; - # Submenulink auf sich selbst - $pxedata = get_node_data($pxeDN,array("filename")); - $entry ['submenulink'] = "self"; - - $pos = preg_replace ( '/0([0-9])/', '$1', $menpos); - increment_menupositions($pxeDN,$pos); # andere jeweils um 1 erhöhen - if (ldap_add($ds,$meDN,$entry)){ - $mesg .= "Textzeile erfolgeich an Position ".$menpos." eingetragen"; - }else{ - $mesg .= "Fehler beim eintragen der Textzeile!"; - } - $url = "pxe_bootmenue.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - } -} - - -elseif ($typ == "leer" && $typ != "newme" && $typ != "local" && $typ != "text" && $typ != "submenu" ){ - - # Menu Position - $menpos = $_POST['leerpos']; - if ($menpos != ""){ - # Syntaxcheck Menüposition - #$syntax = new Syntaxcheck; - #if (!($syntax->check_menuposition($menpos))){ - # $menpos = $maxpos; - #} - }else{ - $menpos = $maxpos; - } - if (strlen($menpos) == 1){ - $menpos = "0".$menpos; - } - # nun doch führende Nullen erzwingen - # also obsolet: $menpos = preg_replace ( '/0([0-9])/', '$1', $menpos); - - # CN bilden - $brothers = get_menuentries($pxeDN,array("dn","cn")); - $i=1; - $leercn = "leerzeile".$i; - if(count($brothers) != 0){ - for ($c=0; $c<count($brothers); $c++){ - foreach ($brothers as $item){ - if ($leercn == strtolower($item['cn'])){ - $i++; - $leercn = "leerzeile".$i; - } - } - } - } - $meDN = "cn=".$leercn.",".$pxeDN; - $entry ['objectclass'][0] = "MenuEntry"; - $entry ['objectclass'][1] = "top"; - $entry ['cn'] = $leercn; - $entry ['menuposition'] = $menpos; - $entry ['kernel'] = "menu.c32"; - # Submenulink auf sich selbst - $pxedata = get_node_data($pxeDN,array("filename")); - $entry ['submenulink'] = "self"; - - # wieder führende Nullen weg für increment_menpos - $pos = preg_replace ( '/0([0-9])/', '$1', $menpos); - increment_menupositions($pxeDN,$pos); # andere jeweils um 1 erhöhen - if (ldap_add($ds,$meDN,$entry)){ - $mesg .= "Leerzeile erfolgeich an Position ".$menpos." eingetragen"; - }else{ - $mesg .= "Fehler beim eintragen der Leerzeile!"; - } - $url = "pxe_bootmenue.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; -} - - -elseif ($typ == "submenu" && $typ != "newme" && $typ != "local" && $typ != "text" && $typ != "leer" ){ -} - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/menuentry_change.php b/ldap-site-mngmt/webinterface/computers/menuentry_change.php deleted file mode 100644 index bf461f1f..00000000 --- a/ldap-site-mngmt/webinterface/computers/menuentry_change.php +++ /dev/null @@ -1,208 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$mecn = $_POST['mecn']; $mecn = htmlentities($mecn); -$oldmecn = $_POST['oldmecn']; - -$menpos = $_POST['menpos']; -if (strlen($menpos) == 1){ - $menpos = "0".$menpos; -} -$oldmenpos = $_POST['oldmenpos']; -if (strlen($oldmenpos) == 1){ - $oldmenpos = "0".$oldmenpos; -} - -$meDN = $_POST['medn']; -$pxeDN = $_POST['pxedn']; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - -$attribs = $_POST['attribs']; -if (count($attribs) != 0){ - foreach (array_keys($attribs) as $key){ - $atts[$key] = htmlentities($attribs[$key]); - } -} -# print_r($meatts); echo "<br><br>"; -$oldattribs = $_POST['oldattribs']; -if (count($oldattribs) != 0){ - foreach (array_keys($oldattribs) as $key){ - $oldatts[$key] = htmlentities($oldattribs[$key]); - } -} -#print_r($oldatts); echo "<br><br>"; - - - -$seconds = 2; -$get_mecn = str_replace ( " ", "_", $mecn ); -$url = "menuentry.php?dn=".$meDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -############################################## -# ME CN (DN) - -if ( $oldmecn == $mecn ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( $oldmecn != "" && $mecn != "" && $oldmecn != $mecn ){ - echo "Menü Eintrag Name aendern<br>"; - # hier noch Syntaxcheck - # Formulareingaben anpassen - $expme = explode(" ",$mecn); - foreach ($expme as $word){$expuc[] = ucfirst($word);} - $mecn = implode(" ",$expuc); - $mecn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $mecn); - - - $newmeDN = "cn=".$mecn.",".$pxeDN; - print_r($newmeDN); echo "<br><br>"; - - if(modify_me_dn($meDN, $newmeDN)){ - $mesg = "Menü Eintrag Name erfolgreich geändert<br><br>"; - $meDN = $newmeDN; - }else{ - $mesg = "Fehler beim ändern des PMenü Eintrag Namen!<br><br>"; - } - - - # newsubmenu holen... - $url = "menuentry.php?dn=".$newmeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; -} - -if ( $oldmecn != "" && $mecn == "" ){ - echo "Menü Eintrag Name loeschen!<br> - Dieses ist Teil des DN, Sie werden den Menü Eintrag komplett löschen<br><br>"; - echo "Wollen Sie den Menü Eintrag <b>".$oldmecn."</b> wirklich löschen?<br><br> - <form action='menuentry_delete.php' method='post'> - Falls ja:<br><br> - <input type='hidden' name='dn' value='".$meDN."'> - <input type='hidden' name='name' value='".$oldmecn."'> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'><br><br> - </form> - <form action='".$url."' method='post'> - Falls, nein:<br><br> - <input type='Submit' name='apply' value='zurück' class='small_loginform_button'> - </form>"; - $seconds = 600; -} - - -################################### -# Menu Position - -if ( $menpos == $oldmenpos || $menpos == "" ){ - # keine Änderung -} - -if ( $menpos != "" && $oldmenpos != $menpos ){ - echo "Menü Position ändern<br><br>"; - # Syntax Check fehlt noch - - # switch partner finden - $secmeDN = get_dn_menuposition($pxeDN,$menpos); - $entrysec ['menuposition'] = $oldmenpos; - if (ldap_mod_replace($ds,$secmeDN,$entrysec)){ - $entry ['menuposition'] = $menpos; - if (ldap_mod_replace($ds,$meDN,$entry)){ - #cleanup_menupositions($pxeDN); - $mesg .= "Menü Position erfolgeich nach <b>".$menpos."</b> geändert"; - }else{ - $mesg .= "Fehler beim ändern der Menü Position!"; - } - }else{ - $mesg .= "Fehler beim ändern der Menü Position!"; - } -} - -################################### -# restliche Attribute - -$entryadd = array(); -$entrymod = array(); -$entrydel = array(); - -foreach (array_keys($atts) as $key){ - - if ( $oldatts[$key] == $atts[$key] ){ - # nix - } - 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,$meDN,$entryadd)){ - $mesg = "Attribute ".$addatts." erfolgreich eingetragen<br><br>"; - }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,$meDN,$entrymod)){ - $mesg = "Attribute ".$modatts." erfolgreich geaendert<br><br>"; - }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,$meDN,$entrydel)){ - $mesg = "Attribute ".$delatts." erfolgreich geloescht<br><br>"; - }else{ - $mesg = "Fehler beim loeschen der Attribute ".$delatts."<br><br>"; - } -} - -################################### -# Ende, noch Redirect - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/menuentry_delete.php b/ldap-site-mngmt/webinterface/computers/menuentry_delete.php deleted file mode 100644 index ba06eb55..00000000 --- a/ldap-site-mngmt/webinterface/computers/menuentry_delete.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$meDN = $_POST['dn']; -$mecn = $_POST['name']; - -$pxeDN = $_POST['pxedn']; - -$seconds = 1; -$url = $_POST['successurl']; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $meDN != ""){ - - if ( dive_into_tree_del($meDN,"") ){ - cleanup_menupositions($pxeDN); - $mesg = "Bootmenü Eintrag <b>".$mecn."</b> erfolgreich gelöscht!<br><br>"; - } - else{ - $mesg = "Fehler beim löschen des Bootmenü Eintrags <b>".$mecn."</b> !<br><br>"; - } - -} - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/menuposition_down.php b/ldap-site-mngmt/webinterface/computers/menuposition_down.php deleted file mode 100644 index 53e82a21..00000000 --- a/ldap-site-mngmt/webinterface/computers/menuposition_down.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$meDN = $_GET['dn']; -$oldpos = $_GET['pos']; - -$pxeDN = $_GET['pxedn']; -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; -$mcnr = $_GET['mcnr']; - -$me = get_menuentries($pxeDN,array("cn")); -$maxpos = count($me); - -$oldpos = preg_replace ( '/0([0-9])/', '$1', $oldpos); -if ($oldpos < $maxpos){ - - $newpos = $oldpos +1; - if (strlen($newpos) == 1){ - $newpos = "0".$newpos; - } - if (strlen($oldpos) == 1){ - $oldpos = "0".$oldpos; - } - - if ($secmeDN = get_dn_menuposition($pxeDN,$newpos)){ - #echo "other meDN:"; print_r($secmeDN); echo "<br>"; - $entrysec ['menuposition'] = $oldpos; - if ($result = ldap_mod_replace($ds,$secmeDN,$entrysec)){ - $entrymenu ['menuposition'] = $newpos; - $result = ldap_mod_replace($ds,$meDN,$entrymenu); - } - } -} -$seconds = 0; -$url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr."&#menu"; -$mesg = ""; -#$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> -# Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/menuposition_up.php b/ldap-site-mngmt/webinterface/computers/menuposition_up.php deleted file mode 100644 index 4a314aca..00000000 --- a/ldap-site-mngmt/webinterface/computers/menuposition_up.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$meDN = $_GET['dn']; -$oldpos = $_GET['pos']; - -$pxeDN = $_GET['pxedn']; -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; -$mcnr = $_GET['mcnr']; - -$oldpos = preg_replace ( '/0([0-9])/', '$1', $oldpos); -if ($oldpos != 1){ - - $newpos = $oldpos-1; - if (strlen($newpos) == 1){ - $newpos = "0".$newpos; - } - if (strlen($oldpos) == 1){ - $oldpos = "0".$oldpos; - } - - if ($secmeDN = get_dn_menuposition($pxeDN,$newpos)){ - #echo "other meDN:"; print_r($secmeDN); echo "<br>"; - $entrysec ['menuposition'] = $oldpos; - if ($result = ldap_mod_replace($ds,$secmeDN,$entrysec)){ - $entrymenu ['menuposition'] = $newpos; - $result = ldap_mod_replace($ds,$meDN,$entrymenu); - } - - } -} -$seconds = 0; -$url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr."&#menu"; -$mesg = ""; -#$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> -# Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/new_group.dwt b/ldap-site-mngmt/webinterface/computers/new_group.dwt deleted file mode 100644 index ea9accf0..00000000 --- a/ldap-site-mngmt/webinterface/computers/new_group.dwt +++ /dev/null @@ -1,101 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Neue Rechnergruppe anlegen:</h3></td> - </tr> - <tr> - <td height='20'></td> - </tr> - <tr> - <td colspan='2'><h4>Notwendige Attribute (müssen angegeben werden):</h3></td> - </tr> - - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='group_add.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> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Gruppen Name (cn):</b><br>(Teil des dn, ohne Leerzeichen eingeben) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='groupcn' value='{GROUPCN}' size='40' class='medium_form_field'> - </td> - </tr> - - </table></td> - </tr> - <tr> - <td height='40'></td> - </tr> - <tr> - <td><h4>Optionale Attribute:</h3></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <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> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Gruppen-Rechner:</b><br>(Mehrfachauswahl möglich) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <!-- BEGIN DYNAMIC BLOCK: Members --> - - <!-- END DYNAMIC BLOCK: Members --> - - <select name='addmember[]' size='{HOSTNUMBER}' multiple class='medium_form_selectbox'> - <option selected value='none'>----------</option> - - <!-- BEGIN DYNAMIC BLOCK: Hosts --> - <option value='{HDN}_{HOSTNAME}'>{HOSTNAME}</option> - <!-- END DYNAMIC BLOCK: Hosts --> - - </select> - </td> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Gruppen Beschreibung: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='groupdesc' value='{GROUPDESC}' size='40' class='medium_form_field'> - </td> - </tr> - - - </tr> - </table></td> - </tr> - - <tr> - <td height='25'></td> - </tr> - <tr> - <td><h4>Gruppe als Group-Objekt in den DHCP Dienst aufnehmen (optional):</h3></td> - </tr> - - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>DHCP Objekt</b></td> - <td width='55%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Auswahl</b></td> - </tr> - - </table></td> - </tr> - - <tr> - <td height='5'></td> - </tr> - <tr> - <td style='border-width: 0 0 0 0;'><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'> - </form></td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/new_group.php b/ldap-site-mngmt/webinterface/computers/new_group.php deleted file mode 100644 index 6d5f4257..00000000 --- a/ldap-site-mngmt/webinterface/computers/new_group.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "new_group.dwt"; - -include('computers_header.inc.php'); - -$mnr = 2; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - - -$groupcn = str_replace ( "_", " ", $_GET['groupcn']); -$groupdesc = str_replace ( "_", " ", $_GET['groupdesc']); - - - -$template->assign(array("GROUPCN" => $groupcn, - "GROUPDESC" => $groupdesc, - "AUDN" => $auDN)); - -# DHCP Stuff ... - - -############################################## -# neues Member anlegen ... -$hosts_array = get_hosts($auDN,array("dn","hostname")); -# print_r($users_array); echo "<br><br>"; -$groups = get_groups($auDN, array("member")); -# print_r($groups); -$template->assign(array("HOSTNAME" => "")); - -if (count($groups) != 0){ - foreach ($groups as $group){ - for ($i=0; $i < count($hosts_array); $i++){ - foreach ($group['member'] as $item){ # ist hier sicher dass member ein array ist auch bei 1 member? - if ($hosts_array[$i]['dn'] == $item){ - array_splice($hosts_array, $i, 1); - $i--; - } - } - } - } -} -# if (count($users_array) != 0){ - $template->define_dynamic("Hosts", "Webseite"); - foreach ($hosts_array as $item){ - $template->assign(array("HDN" => $item['dn'], - "HOSTNAME" => $item['hostname'], - "HOSTNUMBER" => 5)); - $template->parse("HOSTS_LIST", ".Hosts"); - } - - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/new_host.dwt b/ldap-site-mngmt/webinterface/computers/new_host.dwt deleted file mode 100644 index e2ae50ba..00000000 --- a/ldap-site-mngmt/webinterface/computers/new_host.dwt +++ /dev/null @@ -1,112 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <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;'> - - <form action='host_add.php' method='post'> - - <tr> - <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Notwendiges Attribut</b></td> - <td width='55%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Rechner Name (hostname):</b><br>(Teil des dn, ohne Leerzeichen eingeben) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='hostname' value='{HOSTNAME}' size='40' class='medium_form_field'> - </td> - </tr> - - </table></td> - </tr> - <tr> - <td height='25'></td> - </tr> - <tr> - <td><h4>Optionale Attribute:</h3></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <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> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Rechner Beschreibung: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='hostdesc' value='{HOSTDESC}' size='40' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>MAC Adresse (HWAddress) :</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mac' value='{MAC}' size='17' maxlength='17' class='medium_form_field'> - Bsp.: 00:12:03:aa:54:e6 - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>IP Adresse:</b> </td> - <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> - <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'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>HW Graphic: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[hw-graphic]' value='{GRAPHIC}' 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 Monitor: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[hw-monitor]' value='{MONITOR}' size='30' class='medium_form_field'> - </td> - </tr> - - - </table></td> - </tr> - - <tr> - <td height='5'></td> - </tr> - <tr> - <td style='border-width: 0 0 0 0;'><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'> - </form></td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/new_host.php b/ldap-site-mngmt/webinterface/computers/new_host.php deleted file mode 100644 index 4ac144bc..00000000 --- a/ldap-site-mngmt/webinterface/computers/new_host.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "new_host.dwt"; - -include('computers_header.inc.php'); - -$mnr = 0; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - - -$hostname = str_replace ( "_", " ", $_GET['hostname']); -$hostdesc = str_replace ( "_", " ", $_GET['hostdesc']); -$mac = str_replace ( "_", " ", $_GET['mac']); -$ip = str_replace ( "_", " ", $_GET['ip']); - -# DHCP Einbindung -$objecttype = "nodhcp"; -$dhcp_selectbox = ""; -$altdhcp = alternative_dhcpobjects($objecttype,"",""); -if (count($altdhcp) != 0){ - foreach ($altdhcp as $item){ - $dhcp_selectbox .= " - <option value='".$item['dn']."'>".$item['cn']." ".$item['au']."</option>"; - } -} - -$template->assign(array("HOSTNAME" => $hostname, - "HOSTDESC" => $hostdesc, - "MAC" => $mac, - "IP" => $ip, - "DHCPSELECT" => $dhcp_selectbox, - "GEOLOC" => "", - "GEOATT" => "", - "MOUSE" => "", - "GRAPHIC" => "", - "MONITOR" => "", - "AUDN" => $auDN)); - - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/new_mcdef.dwt b/ldap-site-mngmt/webinterface/computers/new_mcdef.dwt deleted file mode 100644 index 72ebf72d..00000000 --- a/ldap-site-mngmt/webinterface/computers/new_mcdef.dwt +++ /dev/null @@ -1,184 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Neue Default MachineConfig anlegen:</h3></td> - </tr> - <tr> - <td height='10'> </td> - </tr> - <tr> - <td colspan='2'><h4>Allgemein:</h4></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='mcdef_add.php' method='post'> - <tr> - <td width='30%' 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 colspan='2' style='border-color: black; border-style: solid; border-width: 3 0 1 0;'> - <font size='+2'><b>MC_</b></font><input type='Text' name='mccn' value='{MCCN}' size='50' class='medium_form_field'> - </td> - </tr> - <tr> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Machine Config <br>Beschreibung: </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcdesc' value='{MCDESC}' size='60' class='medium_form_field'> - - </td> - </tr> - <tr valign='top'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><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;'> - <select name='targets[]' size='8' multiple class='medium_form_selectbox'> - <option selected value='none'>----------------------------</option> - <option value='{NODEDN}'>DEFAULT</option> - - <option value='none'>----- RECHNER spezif. MC -----</option> - <!-- BEGIN DYNAMIC BLOCK: Hosts --> - <option value='{HDN}'>{HN}</option> - <!-- END DYNAMIC BLOCK: Hosts --> - - <option value='none'>----- GRUPPEN MC -----</option> - <!-- BEGIN DYNAMIC BLOCK: Groups --> - <option value='{GDN}'>{GN}</option> - <!-- END DYNAMIC BLOCK: Groups --> - </select> - </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;'> - <input type='Text' name='mcday' value='{MCDAY}' size='5' maxlength='5' class='medium_form_field'> - <br> - Eines der folgenden:<br> - - - <b>Datum</b> (Format: dd.mm, z.B. 21.03/01.11) <br> - - <b>Monatstag</b> (Format: dd, z.B. 01 oder 25) <br> - - <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;'> - <input type='Text' name='mcbeg' value='{MCBEG}' size='2' maxlength='2' class='medium_form_field'> - <b><font size='+1'>:00</b> - </font> - <input type='Text' name='mcend' value='{MCEND}' size='2' maxlength='2' class='medium_form_field'> - <b><font size='+1'>:59</b> Uhr</font><br> - - <b>Uhrzeit</b> (Format: hh, z.B. 07-19)<br> - - <b>X</b> für rund um die Uhr - </td> - </tr> - - </table></td> - </tr> - - <tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>Dienste:</h4></td> - </tr> - - <tr><td> - <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> - </tr> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start X: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcattribs[start-x]' value='' size='10' maxlength='3' class='medium_form_field'> - ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start SNMP: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcattribs[start-snmp]' value='' size='10' maxlength='3' class='medium_form_field'> - ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start SSHD: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcattribs[start-sshd]' value='' size='10' maxlength='3' class='medium_form_field'> - ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start XDMCP: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcattribs[start-xdmcp]' value='' size='10' maxlength='3' class='medium_form_field'> - ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start RWHOD: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcattribs[start-rwhod]' value='' size='10' maxlength='3' class='medium_form_field'> - ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start PRINT DAEMON: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcattribs[start-printdaemon]' value='' size='10' maxlength='3' class='medium_form_field'> - ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>TEX Enable: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcattribs[tex-enable]' value='' size='10' maxlength='3' class='medium_form_field'> - ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start CRON: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcattribs[start-cron]' value='' size='10' maxlength='3' class='medium_form_field'> - ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>CRONTAB Entries: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcattribs[crontab-entries]' value='' size='50' class='medium_form_field'> - </td> - </tr> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Language: </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcattribs[language]' value='' size='10' class='medium_form_field'> - - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>NETBIOS Workgroup: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcattribs[netbios-workgroup]' value='' size='40' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>VMWARE: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcattribs[vmware]' value='' size='40' class='medium_form_field'> - </td> - </tr> - - <input type='hidden' name='nodedn' value='{NODEDN}'> - <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> - <td><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'> - </form></td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/new_mcdef.php b/ldap-site-mngmt/webinterface/computers/new_mcdef.php deleted file mode 100644 index e36c76bb..00000000 --- a/ldap-site-mngmt/webinterface/computers/new_mcdef.php +++ /dev/null @@ -1,69 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "new_mcdef.dwt"; - -include('computers_header.inc.php'); - -$mnr = 4; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$sbmnr = $_GET['sbmnr']; -$mcnr = $_GET['mcnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$mccn = str_replace ( "_", " ", $_GET['mccn']); -$mcdesc = str_replace ( "_", " ", $_GET['mcdesc']); -$mcday = str_replace ( "_", " ", $_GET['mcday']); -$mcbeg = str_replace ( "_", " ", $_GET['mcbeg']); -$mcend = str_replace ( "_", " ", $_GET['mcend']); - - -$template->assign(array("MCCN" => $mccn, - "MCDAY" => $mcday, - "MCBEG" => $mcbeg, - "MCEND" => $mcend, - "MCDESC" => $mcdesc, - "NODEDN" => "cn=computers,".$auDN, - "MNR" => $mnr, - "SBMNR" => $sbmnr, - "MCNR" => $mcnr)); - -################################################# -# Ziel Objekt (nur Rechner und Gruppen, Default) - -$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"); -} - - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/new_menuentry.dwt b/ldap-site-mngmt/webinterface/computers/new_menuentry.dwt deleted file mode 100644 index 40baf438..00000000 --- a/ldap-site-mngmt/webinterface/computers/new_menuentry.dwt +++ /dev/null @@ -1,191 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td height='20'><h4>Zurück zu <a href='pxe_bootmenue.php?dn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}' class='headerlink'>{PXECN}</a></h4></td> - </tr> - <tr> - <td height='20'> </td> - </tr> - <tr> - <td colspan='2'><h3>Neuen Boot Menü Eintrag anlegen:</h3></td> - </tr> - <tr> - <td height='20'> </td> - </tr> - <tr> - <td colspan='2'><h4>Notwendige Attribute:</h4></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='menuentry_add.php' method='post'> - - <tr> - <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 height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Eindeutiger Name (cn):</b><br>(Teil des dn, ohne Leerzeichen eingeben) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mecn' value='{MECN}' size='60' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Label:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[label]' value='{LABEL}' size='60' class='medium_form_field'> - </td> - </tr> - <tr height='50' valign='top'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Generische Boot Images: </b><br>(Wählen Sie eines aus) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <select name='gbm' size='10' class='large_form_selectbox'> - <option selected value='none'>-----------------------</option> - <!-- BEGIN DYNAMIC BLOCK: Rbs --> - <option value='none'>----- Abteilung {RBSAU} [{RBSCN}] -----</option> - <!-- BEGIN DYNAMIC BLOCK: Gbms --> - <option value='{GBMDN}'>{GBMCN} </option> - <!-- END DYNAMIC BLOCK: Gbms --> - <!-- END DYNAMIC BLOCK: Rbs --> - </select> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menü Position: </b><br> - (Bitte ohne führende Null) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='menpos' value='{MAXPOS}' size='2' class='medium_form_field'> - </td> - </tr> - - </table></td> - </tr> - <tr> - <td height='40'> </td> - </tr> - <tr> - <td colspan='2'><h4>Optionale Attribute:</h4></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <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 height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Label:</b> <br>(Wird im Bootmenü statt Label angezeigt) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menulabel]' value='{MELABEL}' size='50' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Passwd:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menupasswd]' value='{MEPASSWD}' size='50' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Hide:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menuhide]' value='{MEHIDE}' size='50' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Localboot:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[localboot]' value='{LOCALBOOT}' size='50' class='medium_form_field'> - </td> - </tr> - - </table></td> - </tr> - <tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>APPEND Parameter:</h4></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td width='20%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='80%' 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>Client Konfiguration via: </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[clientconfvia]' value='{CCV}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>vga: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[vga]' value='{VGA}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>splash: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[splash]' value='{SPLASH}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>vci: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[vci]' value='{VCI}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>no ldsc: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[noldsc]' value='{NOLDSC}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>elevator: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[elevator]' value='{ELEVATOR}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>apic: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[apic]' value='{APIC}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Union FS: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[unionfs]' value='{UNIONFS}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>cowloop: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[cowloop]' value='{COWLOOP}' size='30' class='medium_form_field'> - </td> - </tr> - - <input type='hidden' name='typ' value='newme'> - <input type='hidden' name='maxpos' value='{MAXPOS}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <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> - <td><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'> - </form></td> - </tr> - - - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/new_menuentry.php b/ldap-site-mngmt/webinterface/computers/new_menuentry.php deleted file mode 100644 index c407f5e7..00000000 --- a/ldap-site-mngmt/webinterface/computers/new_menuentry.php +++ /dev/null @@ -1,145 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "new_menuentry.dwt"; - -include('computers_header.inc.php'); - -$mnr = -1; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; -$mcnr = $_GET['mcnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$mecn = str_replace ( "_", " ", $_GET['mecn']); - -$pxeDN = $_GET['dn']; -$dnexp = ldap_explode_dn($pxeDN, 1); -$pxecn = $dnexp[0]; - -# RBS Daten -$pxe = get_node_data($pxeDN,array("rbservicedn")); -$rbsDN = $pxe['rbservicedn']; -$exp = explode(',',$rbsDN); -$exprbsau = explode('=',$exp[2]); $rbsau = $exprbsau[1]; -$rbsdata = get_node_data($rbsDN,array("cn","nfsserverip","exportpath","tftpserverip","tftppath")); - -# Anzahl Menüeinträge -$menens = get_menuentries($pxeDN,array("dn")); -$maxpos = count($menens)+1; - - -# Bootmenu Daten -$template->assign(array("MECN" => $mecn, - "LABEL" => "", - "MELABEL" => "", - "MEDEF" => "", - "MEPASSWD" => "", - "MEHIDE" => "", - "VGA" => "", - "SPLASH" => "", - "NOLDSC" => "", - "ELEVATOR" => "", - "VCI" => "", - "CCV" => "", - "APIC" => "", - "COWLOOP" => "", - "UNIONFS" => "", - "DEBUG" => "", - "LOCALBOOT" => "", - "SUBMENULINK" => "", - "MENPOS" => "", - "MAXPOS" => $maxpos, - "PXEDN" => $pxeDN, - "PXECN" => $pxecn, - "MNR" => $mnr, - "SBMNR" => $sbmnr, - "MCNR" => $mcnr)); - - -# verwendbare GBMs holen -# eigene AU (andere noch über "offer" Attribut in RBS suchen) -$rbsoffers = get_rbsoffers($auDN); -# eigene AU -if (count($rbsoffers) != 0){ - $rbservices = get_rbservices($auDN,array("dn")); - # wenn eigene RBS anbietet dann diese GBMs als erstes (oben in der Liste) - if (count($rbservices) != 0){ - foreach ($rbservices as $rbs){ - for ($i=0; $i < count($rbsoffers); $i++){ - if ($rbs['dn'] == $rbsoffers[$i]){ - array_splice($rbsoffers, $i, 1); - } - } - } - # momentan maximal ein RBS in der AU - $rbsaudn[] = $rbservices[0]['dn']; - $rbsoffsorted = array_merge($rbsaudn,$rbsoffers); - } - # sonst die GBMs des für diese PXE genutzen RBS - else{ - for ($i=0; $i < count($rbsoffers); $i++){ - if ($rbsDN == $rbsoffers[$i]){ - array_splice($rbsoffers, $i, 1); - } - } - $rbsaudn[] = $rbsDN; - $rbsoffsorted = array_merge($rbsaudn,$rbsoffers); - } -} -#print_r($rbsoffsorted);echo "<br><br>"; -# RBS Offers nun in der Reihenfolge erst eigene AU dann Rest ... -$attributes = array("dn","cn","label","kernel","initrd","nfsroot","nbdroot","ipappend"); -$template->assign(array("GBMDN" => "", - "GBMCN" => "Keine generischen Boot Images verfügbar", - "RBSCN" => "", - "RBSAU" => "")); -if (count($rbsoffsorted) != 0){ - $template->define_dynamic("Rbs", "Webseite"); - $template->define_dynamic("Gbms", "Webseite"); - - foreach ($rbsoffsorted as $rbsoff){ - $template->clear_parse("GBMS_LIST"); - #print_r($rbsoff);echo "<br><br>"; - $rbsdnexp = ldap_explode_dn($rbsoff,1); - $rbsoffcn = $rbsdnexp[0]; - $rbsoffau = $rbsdnexp[2]; - - $gbm_array = get_menuentries($rbsoff,$attributes); - if (count($gbm_array) != 0){ - - foreach ($gbm_array as $item){ - $template->assign(array("GBMDN" => $item['dn'], - "GBMCN" => $item['cn'])); - $template->parse("GBMS_LIST", ".Gbms"); - $template->clear_dynamic("Gbms"); - } - - } - $template->assign(array("RBSCN" => $rbsoffcn, - "RBSAU" => $rbsoffau)); - $template->parse("RBS_LIST", ".Rbs"); - $template->clear_dynamic("Rbs"); - - } -} - - - -################################################################################### - -include("computers_footer.inc.php"); - -?> diff --git a/ldap-site-mngmt/webinterface/computers/new_pxe.dwt b/ldap-site-mngmt/webinterface/computers/new_pxe.dwt deleted file mode 100644 index 5bb7eee4..00000000 --- a/ldap-site-mngmt/webinterface/computers/new_pxe.dwt +++ /dev/null @@ -1,165 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Neues PXE Boot Menü anlegen:</h3></td> - </tr> - <tr> - <td height='10'> </td> - </tr> - <tr> - <td colspan='2'><h4>Allgemein:</h4></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='pxe_add.php' method='post'> - <tr> - <td width='30%' 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 colspan='2' style='border-color: black; border-style: solid; border-width: 3 0 1 0;'> - <font size='+2'><b>PXE_</b></font><input type='Text' name='pxecn' value='{PXECN}' size='50' class='medium_form_field'> - </td> - </tr> - <!--<tr valign='top'> - <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> - - <!-- BEGIN DYNAMIC BLOCK: Altrbs --> - <option value='{ALTRBSDN}'>{ALTRBSCN} {ALTRBSAU}</option> - <!-- END DYNAMIC BLOCK: Altrbs --> - - </select> - </td> - </tr>--> - <tr valign='top'> - <td class='tab_d'><b>Ziel Objekt:</b><br> - (Mehrfachauswahl möglich) </td> - <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 --> - <option value='{HDN}'>{HN}</option> - <!-- END DYNAMIC BLOCK: Hosts --> - - <option value='none'>----- GRUPPEN spezif. PXE -----</option> - <!-- BEGIN DYNAMIC BLOCK: Groups --> - <option value='{GDN}'>{GN}</option> - <!-- END DYNAMIC BLOCK: Groups --> - </select> - </td> - </tr> - <tr valign='top'> - <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> - - - <b>Datum</b> (Format: dd.mm, z.B. 21.03/01.11) <br> - - <b>Monatstag</b> (Format: dd, z.B. 01 oder 25) <br> - - <b>Wochentag</b> (Format: MO, DI, ... , SO) <br> - - <b>X</b> für <b>täglich</b> - - <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'> - <b><font size='+1'>:59</b> Uhr</font><br> - - <b>Uhrzeit</b> (Format: hh, z.B. 07-19)<br> - - <b>X</b> für rund um die Uhr - </td> - </tr> - - </table></td> - </tr> - - <tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>Globale PXE Parameter:</h4></td> - </tr> - - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td width='30%' class='tab_h'><b>Attribut</b></td> - <td width='70%' class='tab_h'><b>Wert</b></td> - </tr> - - <tr> - <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 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'> - </td> - </tr> - <tr> - <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 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 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 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 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 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 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 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>--> - - <input type='hidden' name='mnr' value='{MNR}'> - </table></td> - </tr> - <tr> - <td><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'> - </form></td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/new_pxe.php b/ldap-site-mngmt/webinterface/computers/new_pxe.php deleted file mode 100644 index 3c4be824..00000000 --- a/ldap-site-mngmt/webinterface/computers/new_pxe.php +++ /dev/null @@ -1,115 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "new_pxe.dwt"; - -include('computers_header.inc.php'); - -$mnr = 2; -$sbmnr = 0; -$mcnr = -1; - -################################################################################### - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$pxecn = str_replace ( "_", " ", $_GET['pxecn']); -$pxeday = str_replace ( "_", " ", $_GET['pxeday']); -$pxebeg = str_replace ( "_", " ", $_GET['pxebeg']); -$pxeend = str_replace ( "_", " ", $_GET['pxeend']); - -$template->assign(array("PXECN" => $pxecn, - "PXEDAY" => $pxeday, - "PXEBEG" => $pxebeg, - "PXEEND" => $pxeend, - #"FILEURI" => "", - "RBS" => "", - "RBSAU" => "", - "FILE" => "", - "ALLOW" => "", - #"CONSOLE" => "", - #"DISPLAY" => "", - #"FONT" => "", - "IMPLICIT" => "", - #"KBDMAP" => "", - "MENMPW" => "", - "MENTIT" => "", - "NOESC" => "1", - "ONERR" => "", - "ONTIME" => "", - "PROMPT" => "0", - #"SAY" => "", - "SERIAL" => "", - "TIMEOUT" => "600", - "NODEDN" => "cn=rbs,".$auDN, - "HDN" => "none", - "HN" => "", - "GDN" => "none", - "GN" => "", - "MNR" => $mnr)); - -############################################# -# RB Dienste holen -$rbsoffers = get_rbsoffers($auDN); - -$template->assign(array("ALTRBSDN" => "", - "ALTRBSCN" => "", - "ALTRBSAU" => "")); - -if (count($rbsoffers) != 0){ -$template->define_dynamic("Altrbs", "Webseite"); - foreach ($rbsoffers as $item){ - $rbsdnexp = ldap_explode_dn($item,1); - $rbsoffcn = $rbsdnexp[0]; - $rbsoffau = $rbsdnexp[2]; - #$auexp = explode(',',$item['auDN']); - #$altrbsau = explode('=',$auexp[0]); - $template->assign(array("ALTRBSDN" => $item, - "ALTRBSCN" => $rbsoffcn, - "ALTRBSAU" => " [ Abt.: ".$rbsoffau." ]")); - $template->parse("ALTRBS_LIST", ".Altrbs"); - } -} - -################################################# -# Ziel Objekt (nur Rechner und Gruppen, nicht Default) - -$hostorgroup = $exp[0]; -$hgexp = explode('=',$exp[0]); - -$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){ - # Nur Hosts die in DHCP/TFTP angemeldet und deren MAC eingetragen ist (für PXE-Filename) - if ( $item['hlprbservice'] != "" && $item['hwaddress'] != "" ){ - $template->assign(array("HDN" => $item['dn'], - "HN" => $item['hostname'])); - $template->parse("HOSTS_LIST", ".Hosts"); - } - } -} - -$groups_array = get_groups($auDN,array("dn","cn","hlprbservice")); -if ( count($groups_array) != 0 ){ - $template->define_dynamic("Groups", "Webseite"); - foreach ($groups_array as $item){ - if ( $item['hlprbservice'] != "" ){ - $template->assign(array("GDN" => $item['dn'], - "GN" => $item['cn'])); - $template->parse("GROUPS_LIST", ".Groups"); - } - } -} - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/no_ip.dwt b/ldap-site-mngmt/webinterface/computers/no_ip.dwt deleted file mode 100644 index 5bc09796..00000000 --- a/ldap-site-mngmt/webinterface/computers/no_ip.dwt +++ /dev/null @@ -1,11 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Diese Funktion steht Ihnen nicht zur Verfügung. </h3> - Sie verfügen über keine IP Adressen, die Sie an Rechner, DHCP Subnetze vergeben, - bzw. an untergeordnete AUs delegieren können.</td> - </tr> - <tr> - <td height='10'></td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/no_ip.php b/ldap-site-mngmt/webinterface/computers/no_ip.php deleted file mode 100644 index bfda6f02..00000000 --- a/ldap-site-mngmt/webinterface/computers/no_ip.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "no_ip.dwt"; - -include("computers_header.inc.php"); - -############################################################################### - -$mnr = 2; -$sbmnr = -1; -$mcnr = -1; - -$mnr = $_GET['mnr']; - -# Menuleiste erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -############################################################################### - -############################################################################### - -include("computers_footer.inc.php"); - -?> diff --git a/ldap-site-mngmt/webinterface/computers/pxe.dwt b/ldap-site-mngmt/webinterface/computers/pxe.dwt deleted file mode 100644 index 8ce34d26..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxe.dwt +++ /dev/null @@ -1,171 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - - <tr> - <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> - </tr> - - <tr> - <td colspan='4'><h3>PXE Konfiguration <code class='font_object'> {PXECN} </code> </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <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>{OPTLINK} Global Options </a></h4></td> - <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='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%' 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%' 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> - - <b>Monatstag</b> (dd, z.B. 01 oder 25) <br> - - <b>Wochentag</b> (MO, DI, ... , SO) <br> - - <b>X</b> für <b>täglich</b> - - <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 - - </td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: TRanges --> - <tr valign='top'> - <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%' 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%' 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'> - <input type='hidden' name='oldpxeend[]' value='{PXEEND}'> <b><font size='+1'>:59</b> Uhr</font><br> - </td> - </tr> - <!-- END DYNAMIC BLOCK: TRanges --> - - <tr> - <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 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'> - <b><font size='+1'>:59</b> Uhr</font><br> - - </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='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - <input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - <tr> - <td height='60'></td> - </tr> - - <tr> - <td colspan='4'><h4>PXE Boot Menü <code class='font_object'>{PXECN}</code> löschen:</h4></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='delete_confirm.php' method='post'> - - - <tr> - <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}'> - <input type='hidden' name='name' value='{PXECN}'> - <input type='hidden' name='delurl' value='pxe_delete.php'> - <input type='hidden' name='successurl' value='{NODETYP}.php?dn={NODEDN}&mnr={MNR}&sbmnr={SBMNR}'> - <input type='hidden' name='backurl' value='pxe.php?dn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}'> - - </table></td> - </tr><tr><td> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'> - </form></td></tr> - -</table> diff --git a/ldap-site-mngmt/webinterface/computers/pxe.php b/ldap-site-mngmt/webinterface/computers/pxe.php deleted file mode 100644 index f92146a2..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxe.php +++ /dev/null @@ -1,129 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "pxe.dwt"; - -include('computers_header.inc.php'); - -$mnr = -1; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$mnr = $_GET['mnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -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)); -#$nodeDN = $_GET['nodedn']; -$nodednarray = ldap_explode_dn($nodeDN, 1); - -$attributes = array("dn","cn","rbservicedn","filename","timerange","allowoptions","console","default", - "display","font","implicit","kbdmap","menumasterpasswd","menutitle", - "noescape","onerror","ontimeout","prompt","say","serial","timeout","ldapuri","fileuri"); -$pxe = get_node_data($pxeDN,$attributes); - -# RBS Daten -$rbsDN = $pxe['rbservicedn']; -$rbsdata = get_node_data($rbsDN,array("cn","tftpserverip","tftppath","tftpclientconfpath")); - -# Timerange Komponenten -$template->define_dynamic("TRanges", "Webseite"); -if (count($pxe['timerange']) > 1){ - foreach($pxe['timerange'] as $tr){ - $exptime = explode('_',$tr); - $template->assign(array("PXEDAY" => $exptime[0], - "PXEBEG" => $exptime[1], - "PXEEND" => $exptime[2])); - $template->parse("TRANGES_LIST", ".TRanges"); - } -}else{ - $exptime = explode('_',$pxe['timerange']); - $template->assign(array("PXEDAY" => $exptime[0], - "PXEBEG" => $exptime[1], - "PXEEND" => $exptime[2])); - $template->parse("TRANGES_LIST", ".TRanges"); -} - - -$expcn = explode('_',$pxe['cn']); -$name = array_slice($expcn,1); -$pxecn = implode('_',$name); - - -$template->assign(array("PXEDN" => $pxeDN, - "PXECN" => $pxecn, - "TIMERANGE" => $pxe['timerange'], - "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)); - - - - -################################################ -# PXE zuordnen - -$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"); - -?> diff --git a/ldap-site-mngmt/webinterface/computers/pxe_add.php b/ldap-site-mngmt/webinterface/computers/pxe_add.php deleted file mode 100644 index db1dabe2..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxe_add.php +++ /dev/null @@ -1,228 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$pxecn = $_POST['pxecn']; $pxecn = htmlentities($pxecn); -#$rbsDN = $_POST['rbs']; - -$pxeday = $_POST['pxeday']; $pxeday = htmlentities($pxeday); -$pxebeg = $_POST['pxebeg']; $pxebeg = htmlentities($pxebeg); -$pxeend = $_POST['pxeend']; $pxeend = htmlentities($pxeend); - -$conffile = $_POST['conffile']; $conffile = htmlentities($conffile); - -$mnr = $_POST['mnr']; - -$targets = $_POST['targets']; -#print_r($targets); echo "<br>"; -$n = array_keys($targets,'none'); -#print_r($n); echo "<br>"; -for ($i=0; $i<count($n); $i++){ - $match = array_search('none',$targets); - array_splice($targets, $match, 1); -} -#echo "Zielobjekte: ";print_r($targets); echo "<br>"; - -$pxeattribs = $_POST['attribs']; -if (count($pxeattribs) != 0){ - foreach (array_keys($pxeattribs) as $key){ - $pxeatts[$key] = htmlentities($pxeattribs[$key]); - } -} -# print_r($mcatts); echo "<br><br>"; - -$seconds = 20; -$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; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $pxecn != "" && $pxecn != "Hier_PXE_NAME_eintragen" && $rbsDN != "none" ){ - - $pxecn = "PXE_".$pxecn; - # Formulareingaben anpassen - $exppxe = explode(" ",$pxecn); - foreach ($exppxe as $word){$expuc[] = ucfirst($word);} - $pxecn = implode(" ",$expuc); - $pxecn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $pxecn); - - $pxetimerange = ""; - $nomac = 0; - - if (count($targets) != 0){ - foreach ($targets as $targetDN){ - - $exptargetdn = ldap_explode_dn($targetDN, 1); - $targetcn = $exptargetdn[0]; - $targettype = $exptargetdn[1]; - - # falls Target keine MAC hat dann kann keine PXE angelegt werden - # jetzt schon vorher bei der Zielobjektauswahl abgefangen - if ($targettype == "computers"){ - $macdata = get_node_data($targetDN, array("hwaddress")); - if ($macdata['hwaddress'] == ""){ - $nomac = 1; - echo "Für den Ziel-Rechner ist keine MAC Adresse eingetragen <br> - Das PXE Bootmenü wird nicht angelegt. <br> - <br> - Tragen Sie zuerst eine MAC ein!<br><br>"; - } - } - if ($targettype == "groups"){ - $members = get_node_data($targetDN, array("member")); - if (count($members) > 1){ - foreach ($members['member'] as $hostDN){ - $macdata = get_node_data($hostDN, array("hwaddress","hostname")); - if ($macdata['hwaddress'] == ""){ - $nomac = 1; - echo "Für den Gruppen-Rechner <b>".$macdata['hostname']."</b> ist keine MAC Adresse eingetragen <br> - Das PXE Bootmenü für die Gruppe wird nicht angelegt. <br> - <br> - Tragen Sie zuerst bei Rechner <b>".$macdata['hostname']."</b> eine MAC ein!<br><br>"; - } - } - } - if (count($members) == 1){ - $macdata = get_node_data($members['member'], array("hwaddress")); - if ($macdata['hwaddress'] == ""){ - $nomac = 1; - echo "Für den Gruppen-Rechner <b>".$macdata['hostname']."</b> ist keine MAC Adresse eingetragen <br> - Das PXE Bootmenü für die Gruppe wird nicht angelegt. <br> - <br> - Tragen Sie zuerst bei Rechner <b>".$macdata['hostname']."</b> eine MAC ein!<br><br>"; - } - } - } - - # Check auf eindeutigen PXE-Namen (könnte man erweitern auf kompletten RBS) - $brothers = get_pxeconfigs($targetDN,array("cn")); - $brother = 0; - foreach ($brothers as $item){ - if( $item['cn'] == $pxecn ){ - $mesg = "Es existiert bereits ein PXE Boot Menü mit dem eingegebenen Namen!<br> - Bitte geben Sie einen anderen Namen ein.<br><br>"; - $url = "new_pxe.php?pxecn=".$get_pxecn."&pxeday=".$get_pxeday."&pxebeg=".$get_pxebeg."&pxeend=".$get_pxeend."&mnr=".$mnr."&sbmnr=".$sbmnr; - $brother = 1; - break; - } - } - if ($brother == 0 && $nomac == 0){ - - if ( $pxeday != "" && $pxebeg != "" && $pxeend != "" && $pxebeg <= $pxeend ){ - - # TimeRange Syntax checken - $syntax = new Syntaxcheck; - if ($syntax->check_timerange_syntax($pxeday,$pxebeg,$pxeend)){ - - # in Grossbuchstaben - if (preg_match("/([a-z]+)/",$pxeday)){$pxeday = strtoupper($pxeday);} - if (preg_match("/([a-z]+)/",$pxebeg)){$pxebeg = strtoupper($pxebeg);} - if (preg_match("/([a-z]+)/",$pxeend)){$pxeend = strtoupper($pxeend);} - - # führende Nullen weg - $pxebeg = preg_replace ( '/0([0-9])/', '$1', $pxebeg); - $pxeend = preg_replace ( '/0([0-9])/', '$1', $pxeend); - - # TimeRange auf Überschneidung mit vorhandenen checken - if(check_timerange_pxe($pxeday,$pxebeg,$pxeend,$targetDN,"")){ - $pxetimerange = $pxeday."_".$pxebeg."_".$pxeend; - } - else{ - $mesg = "Es existiert bereits ein PXE Boot Menü, das sich mit der eingegebenen Time Range - überschneidet!<br> - Das neue PXE Boot Menü wird ohne Time Range angelegt.<br> - Bitte geben Sie diese anschließend ein.<br><br>"; - } - } - else{ - $mesg = "Falsche Syntax in der Time-Range-Eingabe! Das neue PXE Boot Menü wird ohne Time Range angelegt.<br> - Bitte geben Sie diese anschließend ein.<br><br>"; - } - } - else{ - $mesg = "Keine vollständige Time-Range-Eingabe! Das neue PXE Boot Menü wird ohne Time Range angelegt.<br> - Bitte geben Sie diese anschließend ein.<br><br>"; - } - - $pxeDN = "cn=".$pxecn.",".$targetDN; - - - # PXE Dateinamen bestimmen, MAC(s) - $filenames = array(); - if ($targettype == "computers"){ - $macdata = get_node_data($targetDN, array("hwaddress")); - $pxemac = str_replace (":","-",$macdata['hwaddress']); - $filenames[] = "01-".$pxemac; - } - if ($targettype == "groups"){ - $members = get_node_data($targetDN, array("member")); - if (count($members) > 1){ - foreach ($members['member'] as $hostDN){ - $macdata = get_node_data($hostDN, array("hwaddress")); - $pxemac = str_replace (":","-",$macdata['hwaddress']); - $filenames[] = "01-".$pxemac; - } - } - if (count($members) == 1){ - $macdata = get_node_data($members['member'], array("hwaddress")); - $pxemac = str_replace (":","-",$macdata['hwaddress']); - $filenames[] = "01-".$pxemac; - } - } - echo "filenames: ";print_r($filenames); echo "<br>"; - #$ldapuri = LDAP_HOST."/dn=cn=computers,".$auDN; - - # rbsDN bestimmen - $rbs = get_node_data($targetDN,array("hlprbservice")); - $rbsDN = $rbs['hlprbservice']; - print_r($rbsDN); - - if (add_pxe($pxeDN,$pxecn,$rbsDN,$pxetimerange,$pxeattribs,$filenames,$conffile)){ - $mesg .= "<br>Neues PXE Boot Menü erfolgreich angelegt<br>"; - if ($targettype == "computers"){ - $mnr=1; - } - if ($targettype == "groups"){ - $mnr=2; - } - $url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr; - } - else{ - $mesg .= "<br>Fehler beim anlegen des PXE Boot Menüs!<br>"; - } - } - } - } - else{ - $mesg .= "<br>Sie haben kein Ziel angegeben!<br>"; - } -} - - -elseif ( $pxecn == "" || $pxecn == "Hier_PXE_NAME_eintragen" || $rbsDN == "none" ){ - - $mesg = "Sie haben den Namen des neuen PXE Boot Menüs nicht angegeben oder den - Remote Boot Dienst nicht ausgewählt. Beide sind aber ein notwendige Attribute.<br> - Bitte geben Sie sie an.<br><br>"; - $url = "new_pxe.php?pxecn=Hier_PXE_NAME_eintragen&pxeday=".$get_pxeday."&pxebeg=".$get_pxebeg."&pxeend=".$get_pxeend."&mnr=".$mnr."&sbmnr=".$sbmnr; -} - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.dwt b/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.dwt deleted file mode 100644 index 5c3986b3..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.dwt +++ /dev/null @@ -1,176 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - - <tr> - <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> - </tr> - - <tr> - <td colspan='4'><h3>PXE Konfiguration <code class='font_object'> {PXECN} </code> </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 1;'><h4>{PXELINK} Allgemein</code></a></h4></td> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{OPTLINK} Global Options </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'> Bootmenue </h4></td> - <td> </td> - </tr> - <tr> - <td height='20'></td> - </tr> - - <tr> - <td colspan='4'><h4>PXE Bootmenü:</h4> - Klicken Sie auf einen Menüeintrag um zur Detailansicht zu gelangen und den Eintrag bearbeiten zu können</td> - </tr> - <tr> - <td colspan='4'> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='80%' style='border-color: black; border-style: solid; border-width: 2 2 2 2;'> - - <tr> - <td width='8%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>#</td> - <td width='8%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>Flags</td> - <td width='64%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>Menu Label </td> - <td width='5%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'> </td> - <td width='15%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'> </td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: Bootmenu --> - <form action='delete_confirm.php' method='post'> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;{BGCDEF}'>{POSITION} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;{BGCDEF}'>{MEDEF} {MEPWD} {MEHIDE} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;{BGCDEF}'><font size='+1'>{ANZEIGE} </font></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;{BGCDEF}'> - <a href='menuposition_up.php?dn={MENDN}&pos={POSITION}&pxedn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}'><img style='border-width:0;border-style=none;' src='../pics/up2.gif' height='15'></a> <br> - <a href='menuposition_down.php?dn={MENDN}&pos={POSITION}&pxedn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}'><img style='border-width:0;border-style=none;' src='../pics/down2.gif' height='15'></a></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;{BGCDEF}'> - <input type='hidden' name='dn' value='{MENDN}'> - <input type='hidden' name='name' value='{ANZEIGENAME}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='delurl' value='menuentry_delete.php'> - <input type='hidden' name='successurl' value='pxe_bootmenue.php?dn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}'> - <input type='hidden' name='backurl' value='pxe_bootmenue.php?dn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}'> - - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'> - </tr> - </form> - <!-- END DYNAMIC BLOCK: Bootmenu --> - - </table></td> - </tr> - <tr> - <td colspan='4'><h4>Flags:</h4></font> - <ul> - <li><b>D</b> -> Default Menüeintrag</li> - <li><b>P</b> -> Passwort geschützt</li> - <li><b>H</b> -> Hidden</li> - </ul> - </td> - </tr> - <tr> - <td height='20'></td> - </tr> - <tr> - <td colspan='4'><h4>Neuen Menüeintrag anlegen: </h4> - <a href='new_menuentry.php?dn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}' style='color:#FFFFFF;' class='small_loginform_button'> zur Eingabemaske </a> </td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td colspan='4'><h4>Standard Menüeinträge anlegen:</h4></td> - </tr> - <tr> - <td colspan='4'> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - - <tr> - <td width='20%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>Typ </td> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'> </td> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'> </td> - <td width='10%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>Position</td> - <td width='10%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'> </td> - </tr> - <tr valign='top'> - <form action='menuentry_add.php' method='post'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Localboot</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - Menu Label<br><input type='Text' name='locallabel' value='' size='20' class='medium_form_field'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - Passwort (optional)<br><input type='Text' name='localpasswd' value='' size='20' class='medium_form_field'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Text' name='localpos' value='{MAXPOS}' size='2' class='medium_form_field'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'></td> - <input type='hidden' name='typ' value='local'> - <input type='hidden' name='maxpos' value='{MAXPOS}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='timerange' value='{TIMERANGE}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - </form> - </tr> - <tr valign='top'> - <form action='menuentry_add.php' method='post'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Textzeile</b> </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Text' name='text' value='TEXT' size='50' class='medium_form_field'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Text' name='textpos' value='{MAXPOS}' size='2' class='medium_form_field'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'></td> - <input type='hidden' name='typ' value='text'> - <input type='hidden' name='maxpos' value='{MAXPOS}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='timerange' value='{TIMERANGE}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - </form> - </tr> - <tr valign='top'> - <form action='menuentry_add.php' method='post'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Leerzeile</b> </td> - <td colspan='2' 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;'><input type='Text' name='leerpos' value='{MAXPOS}' size='2' class='medium_form_field'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'></td> - <input type='hidden' name='typ' value='leer'> - <input type='hidden' name='maxpos' value='{MAXPOS}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='timerange' value='{TIMERANGE}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - </form> - </tr> - <tr valign='top'> - <form action='menuentry_add.php' method='post'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Verweis zu Submenü</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>Submenü Name<br> - <input type='Text' name='submenu' value='' size='20' class='medium_form_field'></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>Remote Boot Service - <select name='subrbs' size='3' class='small_form_selectbox'> - <option selected value='none'>----------</option> - <!-- BEGIN DYNAMIC BLOCK: Subrbs --> - <option value='{SUBRBSDN}'>{SUBRBSCN} {SUBRBSAU}</option> - <!-- END DYNAMIC BLOCK: Subrbs --> - </select> - </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Text' name='submenupos' value='{MAXPOS}' size='2' class='medium_form_field'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'></td> - <input type='hidden' name='typ' value='submenu'> - <input type='hidden' name='maxpos' value='{MAXPOS}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='timerange' value='{TIMERANGE}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - </form> - </tr> - - </table></td> - </tr> - - -</table> diff --git a/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.php b/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.php deleted file mode 100644 index 29d6e338..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.php +++ /dev/null @@ -1,151 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "pxe_bootmenue.dwt"; - -include('computers_header.inc.php'); - -$mnr = -1; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$mnr = $_GET['mnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$pxeDN = $_GET['dn']; -# DN, CN des übergeordneten Nodes (Host oder Group) -$pxednarray = ldap_explode_dn($pxeDN, 0); -$nodeDN = implode(',',array_slice($pxednarray,2)); -#$nodeDN = $_GET['nodedn']; -$nodednarray = ldap_explode_dn($nodeDN, 1); - -$attributes = array("dn","cn","rbservicedn","filename","timerange","allowoptions","console","default", - "display","font","implicit","kbdmap","menumasterpasswd","menutitle", - "noescape","onerror","ontimeout","prompt","say","serial","timeout","ldapuri","fileuri"); -$pxe = get_node_data($pxeDN,$attributes); - -# RBS Daten -$rbsDN = $pxe['rbservicedn']; -$rbsdata = get_node_data($rbsDN,array("cn","tftpserverip","tftppath","tftpclientconfpath")); - -# Timerange Komponenten -$template->define_dynamic("TRanges", "Webseite"); -if (count($pxe['timerange']) > 1){ - foreach($pxe['timerange'] as $tr){ - $exptime = explode('_',$tr); - $template->assign(array("PXEDAY" => $exptime[0], - "PXEBEG" => $exptime[1], - "PXEEND" => $exptime[2])); - $template->parse("TRANGES_LIST", ".TRanges"); - } -}else{ - $exptime = explode('_',$pxe['timerange']); - $template->assign(array("PXEDAY" => $exptime[0], - "PXEBEG" => $exptime[1], - "PXEEND" => $exptime[2])); - $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'], - "MAXPOS" => $maxpos, - "NODEDN" => $nodeDN, - "NODE" => $nodednarray[0], - "DEFDN" => "cn=rbs,".$auDN, - "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)); - - -# 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 = ""; $medef = ""; $mepwd = ""; $mehide = ""; - 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 = ""; -} - - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/pxe_change.php b/ldap-site-mngmt/webinterface/computers/pxe_change.php deleted file mode 100644 index 07af7ed5..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxe_change.php +++ /dev/null @@ -1,348 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$pxeDN = $_POST['pxedn']; -$oldpxecn = "PXE_".$_POST['oldpxecn']; -$pxecn = "PXE_".$_POST['pxecn']; - -$pxeday = $_POST['pxeday']; -$pxebeg = $_POST['pxebeg']; -$pxeend = $_POST['pxeend']; -foreach (array_keys($pxeday) as $key){ - $pxeday[$key] = htmlentities($pxeday[$key]); -} -foreach (array_keys($pxebeg) as $key){ - $pxebeg[$key] = htmlentities($pxebeg[$key]); -} -foreach (array_keys($pxeend) as $key){ - $pxeend[$key] = htmlentities($pxeend[$key]); -} - -$deltr = $_POST['deltr']; - -$newpxeday = $_POST['newpxeday']; $newpxeday = htmlentities($newpxeday); -$newpxebeg = $_POST['newpxebeg']; $newpxebeg = htmlentities($newpxebeg); -$newpxeend = $_POST['newpxeend']; $newpxeend = htmlentities($newpxeend); -$oldpxeday = $_POST['oldpxeday']; -$oldpxebeg = $_POST['oldpxebeg']; -$oldpxeend = $_POST['oldpxeend']; - - -$rbs = $_POST['rbs']; -$filename = $_POST['filename']; -if (count($filename) != 0){ - foreach (array_keys($filename) as $key){ - $file[$key] = htmlentities($filename[$key]); - } -} -$oldfilename = $_POST['oldfilename']; -if (count($oldfilename) != 0){ - foreach (array_keys($oldfilename) as $key){ - $oldfile[$key] = htmlentities($oldfilename[$key]); - } -} -$newfilename = $_POST['newfilename']; $newfilename = htmlentities($newfilename); - - -$nodeDN = $_POST['nodedn']; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - - -$seconds = 2; -$url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -############################################## -# PXE CN (DN) - -if ( $oldpxecn == $pxecn ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( $oldpxecn != "" && $pxecn != "" && $oldpxecn != $pxecn ){ - echo "PXE Name aendern<br>"; - # hier noch Syntaxcheck - # Formulareingaben anpassen - $exppxe = explode(" ",$pxecn); - foreach ($exppxe as $word){$expuc[] = ucfirst($word);} - $pxecn = implode(" ",$expuc); - $pxecn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $pxecn); - - - $newpxeDN = "cn=".$pxecn.",".$nodeDN; - print_r($newpxeDN); echo "<br><br>"; - - if(modify_pxe_dn($pxeDN, $newpxeDN)){ - $mesg = "PXE Name erfolgreich geändert<br><br>"; - $pxeDN = $newpxeDN; - }else{ - $mesg = "Fehler beim ändern des PXE Namen!<br><br>"; - } - - - # newsubmenu holen... - $url = "pxe.php?dn=".$newpxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; -} - -if ( $oldpxecn != "" && $pxecn == "" ){ - echo "PXE Name loeschen!<br> - Dieses ist Teil des DN, Sie werden das PXE Boot Menü komplett löschen<br><br>"; - echo "Wollen Sie das PXE Boot Menü <b>".$oldpxecn."</b> wirklich löschen?<br><br> - <form action='pxe_delete.php' method='post'> - Falls ja:<br><br> - <input type='hidden' name='dn' value='".$pxeDN."'> - <input type='hidden' name='name' value='".$oldpxecn."'> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'><br><br> - </form> - <form action='".$url."' method='post'> - Falls, nein:<br><br> - <input type='Submit' name='apply' value='zurück' class='small_loginform_button'> - </form>"; - $seconds = 600; -} - -########################################## -# Remote Boot Dienst - -if ($rbs != "none"){ - $exp = explode(',',$rbs); - $exprbscn = explode('=',$exp[0]); - $rbscn = $exprbscn[1]; - $exprbsau = explode('=',$exp[2]); - $rbsau = $exprbsau[1]; - - $entryrbs ['rbservicedn'] = $rbs; - if ($result = ldap_mod_replace($ds,$pxeDN,$entryrbs)){ - $mesg = "Remote Boot Service erfolgreich zu <b>".$rbscn."[Abt.: ".$rbsau."]</b> geändert<br><br>"; - }else{ - $mesg = "Fehler beim ändern des Remote Boot Services zu <b>".$rbscn."</b>!<br><br>"; - } -} - - -########################################## -# bereits vorhandene TimeRange(s) bearbeiten - -$entrymodtr = array(); -$modtr = 0; -# TimeRanges zusammensetzen -# $t = 0; # Laufvariable für $entrymodtr, da nicht jede Timerange ok sein muss -for ($i=0; $i<count($pxeday); $i++){ - -$oldpxetimerange = $oldpxeday[$i]."_".$oldpxebeg[$i]."_".$oldpxeend[$i]; - -if ( ($pxebeg[$i] <= $pxeend[$i]) && ( ($pxeday[$i] != $oldpxeday[$i] && $pxeday[$i] != "") || ($pxebeg[$i] != $oldpxebeg[$i] && $pxebeg[$i] != "") || ($pxeend[$i] != $oldpxeend[$i] && $pxeend[$i] != "")) ){ - - - # TimeRange Syntax checken - $syntax = new Syntaxcheck; - if ($syntax->check_timerange_syntax($pxeday[$i],$pxebeg[$i],$pxeend[$i])){ - - # in Grossbuchstaben - if (preg_match("/([a-z]+)/",$pxeday[$i])){$pxeday[$i] = strtoupper($pxeday[$i]);} - if (preg_match("/([a-z]+)/",$pxebeg[$i])){$pxebeg[$i] = strtoupper($pxebeg[$i]);} - if (preg_match("/([a-z]+)/",$pxeend[$i])){$pxeend[$i] = strtoupper($pxeend[$i]);} - - # führende Nullen weg - $pxebeg[$i] = preg_replace ( '/0([0-9])/', '$1', $pxebeg[$i]); - $pxeend[$i] = preg_replace ( '/0([0-9])/', '$1', $pxeend[$i]); - - # TimeRange auf Überschneidung mit vorhandenen checken außer mit eigener alter TR da diese - # ja geändert werden soll - if(check_timerange_pxe($pxeday[$i],$pxebeg[$i],$pxeend[$i],$nodeDN,$oldpxetimerange)){ - - $pxetimerange = $pxeday[$i]."_".$pxebeg[$i]."_".$pxeend[$i]; - $entrymodtr ['timerange'][$i] = $pxetimerange; - $modtr = 1; - - } - else{ - $mesg = "Es existiert bereits ein PXE Boot Menü, das sich mit der eingegebenen Time Range - überschneidet!<br> - Bitte geben Sie eine andere Time Range ein.<br><br>"; - $entrymodtr ['timerange'][$i] = $oldpxetimerange; - } - } - else{ - $mesg = "Falsche Syntax in der Timerange-Eingabe!<br> - Bitte geben Sie die erneut Time Range ein.<br><br>"; - $entrymodtr ['timerange'][$i] = $oldpxetimerange; - } - -} - - -elseif ( $pxeday[$i] == "" || $pxebeg[$i] == "" || $pxeend[$i] == "" || $pxebeg[$i] > $pxeend[$i]){ - - $mesg = "Sie haben die Time Range <b>Nr.".$i."</b> nicht vollständig angegeben. Diese ist aber ein notwendiges Attribut.<br> - Diese Time Range wird nicht bearbeitet.<br><br>"; - $entrymodtr ['timerange'][$i] = $oldpxetimerange; -} - -else{$entrymodtr ['timerange'][$i] = $oldpxetimerange;} -} # Ende for-Schleife für jede Timerange -# jetzt noch alle gesammelten Änderungen Durchführen ... -if ($modtr == 1){ - # erst ändern - echo "Ändern: "; print_r($entrymodtr); echo "<br>"; - if($result = ldap_mod_replace($ds,$pxeDN,$entrymodtr)){ - $mesg = "TimeRanges erfolgreich geändert<br><br>"; - }else{ - $mesg = "Fehler beim ändern der TimeRanges!<br><br>"; - } -} - - -if ( count($deltr) != 0 && $modtr == 0 ){ - # Time Range löschen - $j = 0; - foreach ($deltr as $delrange){ - $entrydeltr ['timerange'][$j] = $delrange; - $j++; - } - # dann löschen - echo "Löschen: "; print_r($entrydeltr); echo "<br>"; - if($result = ldap_mod_del($ds,$pxeDN,$entrydeltr)){ - $mesg = "TimeRanges erfolgreich gelöscht<br><br>"; - }else{ - $mesg = "Fehler beim löschen der TimeRanges!<br><br>"; - } -}elseif(count($deltr) != 0 && $modtr == 1){ - echo "Nur Ändern (gleichzeitig Löschen und Ändern geht nicht)"; -} - -##################################### -# TimeRange hinzufügen - -if ( $newpxeday != "" && $newpxebeg != "" && $newpxeend != "" && $newpxebeg <= $newpxeend ){ - - # TimeRange Syntax checken - $syntax = new Syntaxcheck; - if ($syntax->check_timerange_syntax($newpxeday,$newpxebeg,$newpxeend)){ - - # in Grossbuchstaben - if (preg_match("/([a-z]+)/",$newpxeday)){$newpxeday = strtoupper($newpxeday);} - if (preg_match("/([a-z]+)/",$newpxebeg)){$newpxebeg = strtoupper($newpxebeg);} - if (preg_match("/([a-z]+)/",$newpxeend)){$newpxeend = strtoupper($newpxeend);} - - # führende Nullen weg - $newpxebeg = preg_replace ( '/0([0-9])/', '$1', $newpxebeg); - $newpxeend = preg_replace ( '/0([0-9])/', '$1', $newpxeend); - - # TimeRange auf Überschneidung mit vorhandenen checken - if(check_timerange_pxe($newpxeday,$newpxebeg,$newpxeend,$nodeDN,"")){ - - $newpxetimerange = $newpxeday."_".$newpxebeg."_".$newpxeend; - $entrytr ['timerange'] = $newpxetimerange; - if($result = ldap_mod_add($ds,$pxeDN,$entrytr)){ - $mesg = "Zusätzliche TimeRange erfolgreich eingetragen<br><br>"; - }else{ - $mesg = "Fehler beim eintragen der zusätzlichen TimeRange!<br><br>"; - } - }else{ - $mesg = "Es existiert bereits ein PXE Boot Menü, das sich mit der eingegebenen Time Range - überschneidet!<br> - Bitte geben Sie eine andere Time Range ein.<br><br>"; - } - }else{ - $mesg = "Falsche Syntax in der Timerange-Eingabe!<br> - Bitte geben Sie die erneut Time Range ein.<br><br>"; - } -} - - - -##################################### -# PXE Filename(s) - -$filemod = array(); -$modfi = 0; -$filedel = array(); -$delfi = 0; -$j = 0; - -if (count($file) != 0){ - -for ($i=0; $i<count($file); $i++){ - - if ( $oldfile[$i] == $file[$i] ){ - $filemod ['filename'][$i] = $oldfile[$i]; - # $mesg = "keine Aenderung<br>"; - } - - if ( $oldfile[$i] != "" && $file[$i] != "" && $oldfile[$i] != $file[$i] ){ - echo "PXE Dateinamen aendern<br> - Vorsicht dies kann eine nicht verwendbare PXE Datei zur Folge haben!<br><br>"; - # hier noch Syntaxcheck - $filemod ['filename'][$i] = $file[$i]; - $modfi = 1; - } - - if ( $oldfile[$i] != "" && $file[$i] == "" ){ - echo "PXE Dateinamen loeschen!<br> - Achtung: aus ihren PXE Daten wird keine PXE Datei mehr generiert.<br> - Sie sind solange nicht mehr für den PXE Bootvorgang verwendbar bis Sie einen neuen Dateinamen anlegen!<br><br>"; - $filemod ['filename'][$i] = $oldfile[$i]; - $filedel ['filename'][$j] = $oldfile[$i]; - $j++; - $delfi = 1; - $seconds = 4; - } -} -#erst ändern -if ($modfi == 1){ - echo "Ändern: "; print_r($filemod); echo "<br>"; - if(ldap_mod_replace($ds,$pxeDN,$filemod)){ - $mesg = "PXE Dateiname(n) erfolgreich geändert<br><br>"; - }else{ - $mesg = "Fehler beim ändern des(r) PXE Dateinamens!<br><br>"; - } - $modfi = 0; -} -# dann löschen -if ($delfi == 1){ - echo "Löschen: "; print_r($filedel); echo "<br>"; - if(ldap_mod_del($ds,$pxeDN,$filedel)){ - $mesg = "PXE Dateiname(n) erfolgreich gelöscht<br><br>"; - }else{ - $mesg = "Fehler beim löschen des PXE Dateinamens !<br><br>"; - } - $delfi = 0; -} - -} - -# PXE Dateiname neu anlegen -if ($newfilename == ""){ -} -if ($newfilename != ""){ - echo "PXE Dateiname hinzufügen"; - $fileadd ['filename'] = $newfilename; - if(ldap_mod_add($ds,$pxeDN,$fileadd)){ - $mesg = "PXE Dateiname <b>".$newfilename."</b> erfolgreich angelegt<br><br>"; - }else{ - $mesg = "Fehler beim anlegen des PXE Dateinamens ".$newfilename." !<br><br>"; - } -} - - -######################### - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/pxe_copy.php b/ldap-site-mngmt/webinterface/computers/pxe_copy.php deleted file mode 100644 index 61760a8e..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxe_copy.php +++ /dev/null @@ -1,182 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$pxeDN = $_POST['pxedn']; -$pxecn = "PXE_".$_POST['pxecncp']; -$oldpxecn = "PXE_".$_POST['oldpxecncp']; - -$deltr = $_POST['deltr']; - -$oldpxeday = $_POST['oldpxedaycp']; $oldpxeday = htmlentities($oldpxeday); -$oldpxebeg = $_POST['oldpxebegcp']; $oldpxebeg = htmlentities($oldpxebeg); -$oldpxeend = $_POST['oldpxeendcp']; $oldpxeend = htmlentities($oldpxeend); - -$nodeDN = $_POST['nodedn']; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - -$copytargets = $_POST['copytargets']; -#print_r($copytargets); echo "<br>"; -$n = array_keys($copytargets,'none'); -#print_r($n); echo "<br>"; -for ($i=0; $i<count($n); $i++){ - $match = array_search('none',$copytargets); - array_splice($copytargets, $match, 1); -} -#print_r($copytargets); echo "<br>"; - - -$seconds = 2; -$url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $pxecn != ""){ - - # Formulareingaben anpassen - $exppxe = explode(" ",$pxecn); - foreach ($exppxe as $word){$expuc[] = ucfirst($word);} - $pxecn = implode(" ",$expuc); - $pxecn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $pxecn); - - $nomac = 0; - - if (count($copytargets) != 0){ - foreach ($copytargets as $targetDN){ - - $exptargetdn = ldap_explode_dn($targetDN, 1); - $targetcn = $exptargetdn[0]; - $targettype = $exptargetdn[1]; - - # falls Target keine MAC hat dann kann keine PXE angelegt werden - if ($targettype == "computers"){ - $macdata = get_node_data($targetDN, array("hwaddress")); - if ($macdata['hwaddress'] == ""){ - $nomac = 1; - echo "Für den Ziel-Rechner ist keine MAC Adresse eingetragen <br> - Das PXE Bootmenü wird nicht angelegt. <br> - <br> - Tragen Sie zuerst eine MAC ein!<br><br>"; - } - } - if ($targettype == "groups"){ - $members = get_node_data($targetDN, array("member")); - if (count($members) > 1){ - foreach ($members['member'] as $hostDN){ - $macdata = get_node_data($hostDN, array("hwaddress","hostname")); - if ($macdata['hwaddress'] == ""){ - $nomac = 1; - echo "Für den Gruppen-Rechner <b>".$macdata['hostname']."</b> ist keine MAC Adresse eingetragen <br> - Das PXE Bootmenü für die Gruppe wird nicht angelegt. <br> - <br> - Tragen Sie zuerst bei Rechner <b>".$macdata['hostname']."</b> eine MAC ein!<br><br>"; - } - } - } - if (count($members) == 1){ - $macdata = get_node_data($members['member'], array("hwaddress")); - if ($macdata['hwaddress'] == ""){ - $nomac = 1; - echo "Für den Gruppen-Rechner <b>".$macdata['hostname']."</b> ist keine MAC Adresse eingetragen <br> - Das PXE Bootmenü für die Gruppe wird nicht angelegt. <br> - <br> - Tragen Sie zuerst bei Rechner <b>".$macdata['hostname']."</b> eine MAC ein!<br><br>"; - } - } - } - - $brothers = get_pxeconfigs($targetDN,array("cn")); - $brother = 0; - foreach ($brothers as $item){ - if( $item['cn'] == $pxecn ){ - $mesg = "Es existiert bereits ein PXE Boot Menü mit dem eingegebenen Namen!<br> - Bitte geben Sie einen anderen Namen ein.<br><br>"; - $url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - $brother = 1; - break; - } - } - if ($brother == 0 && $nomac == 0){ - - $exptargetdn = ldap_explode_dn($targetDN, 1); - $target = $exptargetdn[0]; - $targettype = $exptargetdn[1]; - - $newpxeDN = "cn=".$pxecn.",".$targetDN; - print_r($newpxeDN); echo "<br>"; - - if (dive_into_tree_cp($pxeDN,$newpxeDN)){ - - # Filename anpassen - if ($targettype == "computers"){ - $macdata = get_node_data($targetDN, array("hwaddress")); - $pxemac = str_replace (":","-",$macdata['hwaddress']); - $entrymod ['filename'] = "01-".$pxemac; - #$entrymod ['fileuri'] = "01-".$macdata['hwaddress'].".tgz"; - } - if ($targettype == "groups"){ - $members = get_node_data($targetDN, array("member")); - if (count($members) != 0){ - foreach ($members['member'] as $hostDN){ - $macdata = get_node_data($hostDN, array("hwaddress")); - $pxemac = str_replace (":","-",$macdata['hwaddress']); - $entrymod ['filename'][] = "01-".$pxemac; - #$entrymod ['fileuri'] = $target.".tgz"; - } - } - } - if(ldap_mod_replace($ds,$newpxeDN,$entrymod)){ - if($deltr == 1){ - # Timeranges und FileURI im neuen Objekt löschen (todo: anpassen statt löschen) - $entrydel ['timerange'] = array(); - $entrydel ['fileuri'] = array(); - if ( ldap_mod_del($ds,$newpxeDN,$entrydel) ){ - $mesg .= "<br>PXE Boot Menü erfolgreich nach ".$target[1]." kopiert<br>"; - } - else{ - ldap_delete($ds,$newpxeDN); - $mesg .= "<br>Fehler beim kopieren des PXE Boot Menüs nach <b>".$target[1]."</b><br>"; - } - } - } - else{ - ldap_delete($ds,$newpxeDN); - $mesg .= "<br>Fehler beim kopieren des PXE Boot Menüs nach <b>".$target[1]."</b><br>"; - } - } - else{ - $mesg .= "<br>Fehler beim kopieren des PXE Boot Menüs nach <b>".$target[1]."</b><br>"; - } - } - } - } - else{ - $mesg .= "<br>Sie haben kein Ziel angegeben!<br>"; - } -} - -elseif ( $pxecn == ""){ - - $mesg = "Sie haben den Namen des neuen PXE Boot Menüs nicht angegeben. Dieser ist aber ein notwendiges Attribut.<br> - Bitte geben Sie ihn an.<br><br>"; - $url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; -} - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/pxe_delete.php b/ldap-site-mngmt/webinterface/computers/pxe_delete.php deleted file mode 100644 index a1b7a060..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxe_delete.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$pxeDN = $_POST['dn']; -$oldpxecn = $_POST['name']; - -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - -$seconds = 1; -$url = $_POST['successurl']; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $pxeDN != ""){ - - if ( dive_into_tree_del($pxeDN,"") ){ - $mesg = "PXE Boot Menü <b>".$pxecn."</b> erfolgreich gelöscht!<br><br>"; - } - else{ - $mesg = "Fehler beim löschen des PXE Boot Menüs <b>".$pxecn."</b> !<br><br>"; - } - -} - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ 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 deleted file mode 100644 index f0497183..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxe_globals.dwt +++ /dev/null @@ -1,128 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - - <tr> - <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> - </tr> - - <tr> - <td colspan='4'><h3>PXE Konfiguration <code class='font_object'> {PXECN} </code> </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 1;'><h4>{PXELINK} Allgemein</code></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'> Global Options </h4></td> - <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>Globale Optionen der PXE Konfiguration:</h4></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_globals_change.php' method='post'> - - <tr> - <td width='20%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='80%' 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>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> - </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;'> - <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> - </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> - </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> - </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> - </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> - </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> - </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> - </tr> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>File URI: </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <font size='+1'>tftp://{TFTP}/{TFTPFILE}</font><input type='Text' name='attribs[fileuri]' value='{FILEURI}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[fileuri]' value='{FILEURI}'> - - </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='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - <input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/pxe_globals.php b/ldap-site-mngmt/webinterface/computers/pxe_globals.php deleted file mode 100644 index 211a47c8..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxe_globals.php +++ /dev/null @@ -1,96 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "pxe_globals.dwt"; - -include('computers_header.inc.php'); - -$mnr = -1; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$mnr = $_GET['mnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$pxeDN = $_GET['dn']; -# DN, CN des übergeordneten Nodes (Host oder Group) -$pxednarray = ldap_explode_dn($pxeDN, 0); -$nodeDN = implode(',',array_slice($pxednarray,2)); -#$nodeDN = $_GET['nodedn']; -$nodednarray = ldap_explode_dn($nodeDN, 1); - -$attributes = array("dn","cn","rbservicedn","filename","timerange","allowoptions","console","default", - "display","font","implicit","kbdmap","menumasterpasswd","menutitle", - "noescape","onerror","ontimeout","prompt","say","serial","timeout","ldapuri","fileuri"); -$pxe = get_node_data($pxeDN,$attributes); - -# RBS Daten -$rbsDN = $pxe['rbservicedn']; -$rbsdata = get_node_data($rbsDN,array("cn","nfsserverip","exportpath","tftpserverip","tftppath","tftpclientconfpath")); - -# Timerange Komponenten -$template->define_dynamic("TRanges", "Webseite"); -if (count($pxe['timerange']) > 1){ - foreach($pxe['timerange'] as $tr){ - $exptime = explode('_',$tr); - $template->assign(array("PXEDAY" => $exptime[0], - "PXEBEG" => $exptime[1], - "PXEEND" => $exptime[2])); - $template->parse("TRANGES_LIST", ".TRanges"); - } -}else{ - $exptime = explode('_',$pxe['timerange']); - $template->assign(array("PXEDAY" => $exptime[0], - "PXEBEG" => $exptime[1], - "PXEEND" => $exptime[2])); - $template->parse("TRANGES_LIST", ".TRanges"); -} - - -# Globale Parameter -$template->assign(array("PXEDN" => $pxeDN, - "PXECN" => $pxecn, - "TIMERANGE" => $pxe['timerange'], - "TFTP" => $rbsdata['tftpserverip'], - "TFTPFILE" => $rbsdata['tftpclientconfpath'], - #"LDAPURI" => $pxe['ldapuri'], - "FILEURI" => $pxe['fileuri'], - "ALLOW" => $pxe['allowoptions'], - "CONSOLE" => $pxe['console'], - "DEFAULT" => $pxe['default'], - "DISPLAY" => $pxe['display'], - "FONT" => $pxe['font'], - "IMPLICIT" => $pxe['implicit'], - "KBDMAP" => $pxe['kbdmap'], - "MENMPW" => $pxe['menumasterpasswd'], - "MENTIT" => $pxe['menutitle'], - "NOESC" => $pxe['noescape'], - "ONERR" => $pxe['onerror'], - "ONTIME" => $pxe['ontimeout'], - "PROMPT" => $pxe['prompt'], - "SAY" => $pxe['say'], - "SERIAL" => $pxe['serial'], - "TIMEOUT" => $pxe['timeout'], - "NODEDN" => $nodeDN, - "NODE" => $nodednarray[0], - "DEFDN" => "cn=rbs,".$auDN, - "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)); - - -################################################################################### - -include("computers_footer.inc.php"); - -?> diff --git a/ldap-site-mngmt/webinterface/computers/pxe_globals_change.php b/ldap-site-mngmt/webinterface/computers/pxe_globals_change.php deleted file mode 100644 index 06f388bb..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxe_globals_change.php +++ /dev/null @@ -1,126 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$pxeDN = $_POST['pxedn']; -$oldpxecn = "PXE_".$_POST['oldpxecn']; -$pxecn = "PXE_".$_POST['pxecn']; - -$nodeDN = $_POST['nodedn']; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - -# sonstige Attribute -$attribs = $_POST['attribs']; -if (count($attribs) != 0){ - foreach (array_keys($attribs) as $key){ - $atts[$key] = htmlentities($attribs[$key]); - } -} -#print_r($atts); echo "<br><br>"; -$oldattribs = $_POST['oldattribs']; -if (count($oldattribs) != 0){ - foreach (array_keys($oldattribs) as $key){ - $oldatts[$key] = htmlentities($oldattribs[$key]); - } -} -#print_r($oldatts); echo "<br><br>"; - - -$seconds = 2; -$url = "pxe_globals.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - - - - - -################################################################## -# Restliche Attribute - -$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]; - } -} - -#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,$pxeDN,$entryadd)){ - $mesg = "Attribute ".$addatts." erfolgreich eingetragen<br><br>"; - }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,$pxeDN,$entrymod)){ - $mesg = "Attribute ".$modatts." erfolgreich geaendert<br><br>"; - }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,$pxeDN,$entrydel)){ - $mesg = "Attribute ".$delatts." erfolgreich geloescht<br><br>"; - }else{ - $mesg = "Fehler beim loeschen der Attribute ".$delatts."<br><br>"; - } -} - - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/pxe_wochenplan.php b/ldap-site-mngmt/webinterface/computers/pxe_wochenplan.php deleted file mode 100644 index 8296762a..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxe_wochenplan.php +++ /dev/null @@ -1,262 +0,0 @@ -<?php - -##################################### -# Wochenübersicht - -$template->assign(array("A0" => "","B0" => "","C0" => "","D0" => "","E0" => "","F0" => "","G0" => "", - "A1" => "","B1" => "","C1" => "","D1" => "","E1" => "","F1" => "","G1" => "", - "A2" => "","B2" => "","C2" => "","D2" => "","E2" => "","F2" => "","G2" => "", - "A3" => "","B3" => "","C3" => "","D3" => "","E3" => "","F3" => "","G3" => "", - "A4" => "","B4" => "","C4" => "","D4" => "","E4" => "","F4" => "","G4" => "", - "A5" => "","B5" => "","C5" => "","D5" => "","E5" => "","F5" => "","G5" => "", - "A6" => "","B6" => "","C6" => "","D6" => "","E6" => "","F6" => "","G6" => "", - "A7" => "","B7" => "","C7" => "","D7" => "","E7" => "","F7" => "","G7" => "", - "A8" => "","B8" => "","C8" => "","D8" => "","E8" => "","F8" => "","G8" => "", - "A9" => "","B9" => "","C9" => "","D9" => "","E9" => "","F9" => "","G9" => "", - "A10" => "","B10" => "","C10" => "","D10" => "","E10" => "","F10" => "","G10" => "", - "A11" => "","B11" => "","C11" => "","D11" => "","E11" => "","F11" => "","G11" => "", - "A12" => "","B12" => "","C12" => "","D12" => "","E12" => "","F12" => "","G12" => "", - "A13" => "","B13" => "","C13" => "","D13" => "","E13" => "","F13" => "","G13" => "", - "A14" => "","B14" => "","C14" => "","D14" => "","E14" => "","F14" => "","G14" => "", - "A15" => "","B15" => "","C15" => "","D15" => "","E15" => "","F15" => "","G15" => "", - "A16" => "","B16" => "","C16" => "","D16" => "","E16" => "","F16" => "","G16" => "", - "A17" => "","B17" => "","C17" => "","D17" => "","E17" => "","F17" => "","G17" => "", - "A18" => "","B18" => "","C18" => "","D18" => "","E18" => "","F18" => "","G18" => "", - "A19" => "","B19" => "","C19" => "","D19" => "","E19" => "","F19" => "","G19" => "", - "A20" => "","B20" => "","C20" => "","D20" => "","E20" => "","F20" => "","G20" => "", - "A21" => "","B21" => "","C21" => "","D21" => "","E21" => "","F21" => "","G21" => "", - "A22" => "","B22" => "","C22" => "","D22" => "","E22" => "","F22" => "","G22" => "", - "A23" => "","B23" => "","C23" => "","D23" => "","E23" => "","F23" => "","G23" => "")); - -#print_r($timeranges); echo "<br>"; - -############################################################################ -# Default-Dienst PXE Timeranges -# vom spezifischsten zum unspezifischsten : -# FR_0_7 -> FR_X_X -> X_0_7 -> X_X_X -$daytime = array(); -$timex = array(); -$dayx = array(); -$allx = array(); -$legend = array(); -if(count($wopldeftranges) != 0){ -foreach ($wopldeftranges as $tr){ - if (count($tr[0]) > 1){ - foreach ($tr as $item){ - if ($item[0] != "X" && $item[1] != "X" && $item[2] != "X" && ($item[0] == "MO" || $item[0] == "DI" || $item[0] == "MI" || $item[0] == "DO" || $item[0] == "FR" || $item[0] == "SA" || $item[0] == "SO")){ - $daytime[] = $item; - } - if ($item[0] != "X" && $item[1] == "X" && $item[2] == "X"){ - $timex[] = $item; - } - if ($item[0] == "X" && $item[1] != "X" && $item[2] != "X"){ - $dayx[] = $item; - } - if ($item[0] == "X" && $item[1] == "X" && $item[2] == "X"){ - $allx[] = $item; - } - } - }else{ - if ($tr[0] != "X" && $tr[1] != "X" && $tr[2] != "X" && ($tr[0] == "MO" || $tr[0] == "DI" || $tr[0] == "MI" || $tr[0] == "DO" || $tr[0] == "FR" || $tr[0] == "SA" || $tr[0] == "SO")){ - $daytime[] = $tr; - } - if ($tr[0] != "X" && $tr[1] == "X" && $tr[2] == "X"){ - $timex[] = $tr; - } - if ($tr[0] == "X" && $tr[1] != "X" && $tr[2] != "X"){ - $dayx[] = $tr; - } - if ($tr[0] == "X" && $tr[1] == "X" && $tr[2] == "X"){ - $allx[] = $tr; - } - } -} - -#print_r($daytime); echo "<br>"; -#print_r($timex); echo "<br>"; -#print_r($dayx); echo "<br>"; -#print_r($allx); echo "<br>"; - -$daycode = array("MO" => "A", "DI" => "B", "MI" => "C", "DO" => "D", "FR" => "E", "SA" => "F", "SO" => "G"); -$daytimexcolors = array("#BEBEBE","A0A0A0","#696969","#EEDFCC","#D8BFD8","#505050"); -$allxcolors = array("#483D8B","#7B68EE","#191970","#8470FF","#708090","#6A5ACD"); -$dayxcolors = array("#CDC673","#A2CD5A","#BDB76B","#8B864E","#6B8E23","#CDBE70"); -$timecolors = array("880000","#CD6839","#CC3300","#CC6600","#993300","#8B4C39"); - - -if (count($allx) != 0){ - $c = 0; - foreach ($allx as $range){ - foreach ($daycode as $dc){ - for ($i = 0; $i <= 23; $i++){ - $template->assign(array($dc.$i => "background-color:".$allxcolors[$c].";")); - } - } - $legend[] = array($range ,$allxcolors[$c]); - $c++; - } -} - -if (count($dayx) != 0){ - $c = 0; - foreach ($dayx as $range){ - foreach ($daycode as $dc){ - for ($i = $range[1]; $i<= $range[2]; $i++){ - $template->assign(array($dc.$i => "background-color:".$dayxcolors[$c].";")); - } - } - $legend[] = array($range ,$dayxcolors[$c]); - $c++; - } -} - -if (count($timex) != 0){ - $c = 0; - foreach ($timex as $range){ - $dc = $daycode[$range[0]]; - for ($i = 0; $i<= 23; $i++){ - $template->assign(array($dc.$i => "background-color:".$timexcolors[$c].";")); - } - $legend[] = array($range ,$timexcolors[$c]); - $c++; - } -} - -if (count($daytime) != 0){ - $c = 0; - foreach ($daytime as $range){ - $dc = $daycode[$range[0]]; - for ($i = $range[1]; $i<= $range[2]; $i++){ - $template->assign(array($dc.$i => "background-color:".$daytimecolors[$c].";")); - } - $legend[] = array($range ,$daytimecolors[$c]); - $c++; - } -} - -} - -############################################################################ -# Rechner-spezifische PXE Timeranges -# vom spezifischsten zum unspezifischsten : -# FR_0_7 -> FR_X_X -> X_0_7 -> X_X_X -$daytime = array(); -$timex = array(); -$dayx = array(); -$allx = array(); - -if(count($wopltranges) != 0){ -foreach ($wopltranges as $tr){ - if (count($tr[0]) > 1){ - foreach ($tr as $item){ - if ($item[0] != "X" && $item[1] != "X" && $item[2] != "X" && ($item[0] == "MO" || $item[0] == "DI" || $item[0] == "MI" || $item[0] == "DO" || $item[0] == "FR" || $item[0] == "SA" || $item[0] == "SO")){ - $daytime[] = $item; - } - if ($item[0] != "X" && $item[1] == "X" && $item[2] == "X"){ - $timex[] = $item; - } - if ($item[0] == "X" && $item[1] != "X" && $item[2] != "X"){ - $dayx[] = $item; - } - if ($item[0] == "X" && $item[1] == "X" && $item[2] == "X"){ - $allx[] = $item; - } - } - }else{ - if ($tr[0] != "X" && $tr[1] != "X" && $tr[2] != "X" && ($tr[0] == "MO" || $tr[0] == "DI" || $tr[0] == "MI" || $tr[0] == "DO" || $tr[0] == "FR" || $tr[0] == "SA" || $tr[0] == "SO")){ - $daytime[] = $tr; - } - if ($tr[0] != "X" && $tr[1] == "X" && $tr[2] == "X"){ - $timex[] = $tr; - } - if ($tr[0] == "X" && $tr[1] != "X" && $tr[2] != "X"){ - $dayx[] = $tr; - } - if ($tr[0] == "X" && $tr[1] == "X" && $tr[2] == "X"){ - $allx[] = $tr; - } - } -} - -#print_r($daytime); echo "<br>"; -#print_r($timex); echo "<br>"; -#print_r($dayx); echo "<br>"; -#print_r($allx); echo "<br>"; - -$daycode = array("MO" => "A", "DI" => "B", "MI" => "C", "DO" => "D", "FR" => "E", "SA" => "F", "SO" => "G"); -$allxcolors = array("#BEBEBE","A0A0A0","#696969","#EEDFCC","#D8BFD8","#505050"); -$dayxcolors = array("#483D8B","#7B68EE","#191970","#8470FF","#708090","#6A5ACD"); -$timexcolors = array("#CDC673","#A2CD5A","#BDB76B","#8B864E","#6B8E23","#CDBE70"); -$daytimecolors = array("880000","#CD6839","#CC3300","#CC6600","#993300","#8B4C39"); - - -if (count($allx) != 0){ - $c = 0; - foreach ($allx as $range){ - foreach ($daycode as $dc){ - for ($i = 0; $i <= 23; $i++){ - $template->assign(array($dc.$i => "background-color:".$allxcolors[$c].";")); - } - } - $legend[] = array($range ,$allxcolors[$c]); - $c++; - } -} - -if (count($dayx) != 0){ - $c = 0; - foreach ($dayx as $range){ - foreach ($daycode as $dc){ - for ($i = $range[1]; $i<= $range[2]; $i++){ - $template->assign(array($dc.$i => "background-color:".$dayxcolors[$c].";")); - } - } - $legend[] = array($range ,$dayxcolors[$c]); - $c++; - } -} - -if (count($timex) != 0){ - $c = 0; - foreach ($timex as $range){ - $dc = $daycode[$range[0]]; - for ($i = 0; $i<= 23; $i++){ - $template->assign(array($dc.$i => "background-color:".$timexcolors[$c].";")); - } - $legend[] = array($range ,$timexcolors[$c]); - $c++; - } -} - -if (count($daytime) != 0){ - $c = 0; - foreach ($daytime as $range){ - $dc = $daycode[$range[0]]; - for ($i = $range[1]; $i<= $range[2]; $i++){ - $template->assign(array($dc.$i => "background-color:".$daytimecolors[$c].";")); - } - $legend[] = array($range ,$daytimecolors[$c]); - $c++; - } -} - -} - -$template->assign(array("PXEPLANDESC" => "")); -#print_r($legend); -if (count($legend) != 0){ - $template->define_dynamic("Legende", "Webseite"); - foreach ($legend as $item){ - # Timerange Komponente - $color = $item[1]; - $template->assign(array("TR1" => $item[0][0], - "TR2" => $item[0][1], - "TR3" => $item[0][2], - "PXEPLANDESC" => $item[0][3], - "COLOR" => $color)); - $template->parse("LEGENDE_LIST", ".Legende"); - } -} - - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/pxeconfigs.dwt b/ldap-site-mngmt/webinterface/computers/pxeconfigs.dwt deleted file mode 100644 index 428eb13b..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxeconfigs.dwt +++ /dev/null @@ -1,318 +0,0 @@ -<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 deleted file mode 100644 index 95d1abfd..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxeconfigs.php +++ /dev/null @@ -1,92 +0,0 @@ -<?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 deleted file mode 100644 index abff2cd8..00000000 --- a/ldap-site-mngmt/webinterface/computers/rbshost.dwt +++ /dev/null @@ -1,385 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <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} Geo/Hardware </a></h4></td> - <td> </td> - </tr> - <tr> - <td height='20'></td> - </tr> - - <tr> - <td colspan='5'><h3>RBS/PXE Setup - Rechner <code class='font_object'> {HOSTNAME} </code> </h3></td> - </tr> - <tr> - <td colspan='4' class='tab_d_ohne'>{NODHCP} </td> - </tr> - - <tr><td colspan='5'> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='rbshost_change.php' method='post'> - - <tr> - <td width='40%' class='tab_h'><b>Remote Boot Dienst Einbindung (DHCP/TFTP)</b></td> - <td width='60%' class='tab_h'><b> </b></td> - </tr> - - - - {RBS} - - - </table></td> - </tr> - - <input type='hidden' name='olddhcp' value='{OLDDHCP}'> - <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='hostdn' value='{HOSTDN}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - - <tr> - <td colspan='4'><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - - <tr> - <td height='20'></td> - </tr> - - <tr><td colspan='5'> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td colspan='3' width='50%' class='tab_h'><b>Rechner-spezifische PXE Konfigurationen (Bootmenüs)</b></td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: Rechnerpxes --> - <tr valign='top'> - <td width='20%' class='tab_d'>{PXECN} </td> - <td width='30%' class='tab_d'>{PXETR} </td> - <td class='tab_d'>{PXEDESC} </td> - </tr> - <!-- END DYNAMIC BLOCK: Rechnerpxes --> - - - </table></td> - </tr> - - <tr> - <td height='20'></td> - </tr> - - <tr><td colspan='5'> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td colspan='3' width='50%' class='tab_h'><b>Default PXE Konfigurationen des Remote Boot Dienstes</b></td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: Defpxes --> - <tr valign='top'> - <td width='20%' class='tab_d'>{DEFPXECN} </td> - <td width='30%' class='tab_d'>{DEFPXETR} </td> - <td class='tab_d'>{DEFPXEDESC} </td> - </tr> - <!-- END DYNAMIC BLOCK: Defpxes --> - - - </table></td> - </tr> - - - <tr> - <td height='50'></td> - </tr> - - <tr> - <td colspan='4'><h4>Wochen Übersicht PXE Configs für Rechner <code class='font_object'>{HOSTNAME}</code> :</h4></td> - </tr> - <tr><td colspan='4'> - <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 colspan='2'> - <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>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/rbshost.php b/ldap-site-mngmt/webinterface/computers/rbshost.php deleted file mode 100644 index b28e0726..00000000 --- a/ldap-site-mngmt/webinterface/computers/rbshost.php +++ /dev/null @@ -1,250 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "rbshost.dwt"; - -include('computers_header.inc.php'); - -$mnr = 0; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$hostDN = $_GET['dn']; - -# Rechner Daten -$attributes = array("hostname","domainname","ipaddress","hwaddress","description","hlprbservice", - "dhcphlpcont","dhcpoptfixed-address","dhcpopthardware","dhcpoptfilename", - "dhcpoptnext-server","hw-mouse","hw-graphic","hw-monitor"); -$host = get_node_data($hostDN,$attributes); -$hostip = explode('_',$host['ipaddress']); -# print_r($hostip); echo "<br><br>"; -$dhcphlpcont = $host['dhcphlpcont']; -$objectDN = $dhcphlpcont; -$rbsDN = $host['hlprbservice']; - -$rbs_dhcpopt = ""; -$host_dhcpopt = ""; -$dhcp_selectbox = ""; - -$rbs = ""; -$nodhcptext = ""; - -# Falls nicht DHCP Dienst dann Erklärung ... -if ($dhcphlpcont == ""){ - - $nodhcptext .= "Der Rechner ist in keinem DHCP Dienst eingetragen. Dies ist jedoch Voraussetzung, - um einen Remote Boot Dienst nutzen zu können.<br> - D.h. die hier verwalteten RBS-relevanten DHCP Optionen werden bzw. sind für den Client zentral gespeichert, - werden jedoch in keine DHCP Dienst Konfiguration ünernommen. - "; -} -# <input type='hidden' name='rbs' value='".$rbsDN."'> -########################################################### -# RBS Setup -$rbs_selectbox = ""; -$rbs_dhcpopt = ""; -$altrbs = alternative_rbservices($rbsDN); - - - $rbs_selectbox .= "<td class='tab_d'> - <select name='rbs' size='4' class='medium_form_selectbox'> - <option selected value='none'>----------</option>"; -if (count($altrbs) != 0){ - foreach ($altrbs as $item){ - $rbs_selectbox .= " - <option value='".$item['dn']."'>".$item['cn']." ".$item['au']."</option>"; - } -} -$rbs_selectbox .= "<option value=''>Kein RBS</option> - </select></td>"; - -# RBS Daten -if ($rbsDN == ""){ - - $rbs .= "<td class='tab_d_ohne'><b>Remote Boot Dienst: </b> </td> - <td class='tab_d_ohne'> - Rechner ist in keinem Remote Boot Dienst angemeldet<br></td></tr> - <tr valign='top'><td class='tab_d'> - RBS auswählen: <br></td>".$rbs_selectbox; -}else{ - - $rbsdata = get_node_data($rbsDN,array("tftpserverip")); - #print_r($rbsdata); echo "<br>"; - $exp2 = explode(',',$host['hlprbservice']); - $exprbs = explode('=',$exp2[0]); $rbserv = $exprbs[1]; - $exprbsau = explode('=',$exp2[2]); $rbsau = $exprbsau[1]; - $rbs .= "<tr valign='top'> - <td class='tab_d_ohne'><b>Remote Boot Dienst: </b> </td> - <td class='tab_d_ohne'> - Remote Boot Service <b>".$rbserv."</b> / AU <b>".$rbsau."</b></td> - </tr> - <tr> - <td class='tab_d_ohne'>DHCP Option <b>next-server</b> (TFTP Boot Server IP):</td> - <td class='tab_d_ohne'><b>".$host['dhcpoptnext-server']."</b> </td> - </tr> - <tr> - <td class='tab_d'>DHCP Option <b>filename</b> (initiale remote Bootdatei):</td> - <td class='tab_d'><b>".$host['dhcpoptfilename']."</b> </td> - </tr> - <tr valign='top'><td class='tab_d'> - RBS Einbindung ändern: <br></td>".$rbs_selectbox." - </tr>"; - - $rbs_dhcpopt = ""; - -} - - -$template->assign(array("HOSTDN" => $hostDN, - "HOSTNAME" => $host['hostname'], - "DOMAINNAME" => $host['domainname'], - "HWADDRESS" => $host['hwaddress'], - "IPADDRESS" => $hostip[0], - "DESCRIPTION" => $host['description'], - "OLDDHCP" => $objectDN, - "OLDFIXADD" => $host['dhcpoptfixed-address'], - "NODHCP" => $nodhcptext, - "OLDRBS" => $rbsDN, - "RBS" => $rbs, - "HOSTLINK" => "<a href='host.php?dn=".$hostDN."&sbmnr=".$sbmnr."' class='headerlink'>", - "DHCPLINK" => "<a href='dhcphost.php?dn=".$hostDN."&sbmnr=".$sbmnr."' class='headerlink'>", - "HWLINK" => "<a href='hwhost.php?dn=".$hostDN."&sbmnr=".$sbmnr."' class='headerlink'>", - "AUDN" => $auDN, - "SBMNR" => $sbmnr)); - - - - -# Rechnerspezifische PXEs -$hostpxeconfigs = get_pxeconfigs2($hostDN, array("dn","cn","description","timerange")); - -$template->assign(array("PXEDN" => "", - "PXECN" => "Keine PXE Config angelegt", - "PXEDESC" => "", - "PXETR" => "",)); -$template->define_dynamic("Rechnerpxes", "Webseite"); - -if (count($hostpxeconfigs) != 0){ - for ($i=0;$i<count($hostpxeconfigs);$i++){ - $pxelink = "<a href='pxe.php?dn=".$hostpxeconfigs[$i]['dn']."&mnr=1&sbmnr=".$sbmnr."&mcnr=".$i."&nodedn=".$hostDN."' class='headerlink'>".$hostpxeconfigs[$i]['cn']."</a>"; - - $trange = ""; - if (count($hostpxeconfigs[$i]['timerange']) > 1 ){ - foreach ($hostpxeconfigs[$i]['timerange'] as $tr){ - $exptime = array_merge(explode('_',$tr), array($hostpxeconfigs[$i]['cn'])); - $timeranges[$i][] = $exptime; # Für grafische Wo-Ansicht - if ($exptime[0] == "X"){$exptime[0]="täglich";} - # if ($exptime[1] == "X" && $exptime[2] == "X"){$exptime[1] = ""; $exptime[2]= "";} - $trange .= $exptime[0].", von ".$exptime[1].":00 bis ".$exptime[2].":59 <br> "; - } - }else{ - $exptime = array_merge(explode('_',$hostpxeconfigs[$i]['timerange']), array($hostpxeconfigs[$i]['cn'])); - $timeranges[$i] = $exptime; # Für grafische Wo-Ansicht - if ($exptime[0] == "X"){$exptime[0]="täglich";} - # if ($exptime[1] == "X" && $exptime[2] == "X"){$exptime[1] = ""; $exptime[2]= "";} - $trange .= $exptime[0].", von ".$exptime[1].":00 bis ".$exptime[2].":59"; - } - $template->assign(array("PXEDN" => $hostpxeconfigs[$i]['dn'], - "PXECN" => $pxelink, - #"PXEDESC" => $hostpxeconfigs['description'], - "PXETR" => $trange, )); - $template->parse("RECHNERPXES_LIST", ".Rechnerpxes"); - - } -} - - -# Default PXEs des RBS -$template->assign(array("DEFPXEDN" => "", - "DEFPXECN" => "Keine PXE Config angelegt", - "DEFPXEDESC" => "", - "DEFPXETR" => "", - "PXEPLANDESC" => "")); -$template->define_dynamic("Defpxes", "Webseite"); - -if ($rbsDN != ""){ - $defaultpxeconfigs = get_pxeconfigs($rbsDN,array("dn","cn","description","timerange","filename")); - - if (count($defaultpxeconfigs) != 0){ - for ($i=0;$i<count($defaultpxeconfigs);$i++){ - if ($defaultpxeconfigs[$i]['filename'] == "default"){ - $defpxelink = "<a href='showpxe.php?dn=".$defaultpxeconfigs[$i]['dn']."&mnr=1&sbmnr=".$sbmnr."&mcnr=-1&hostdn=".$hostDN."' class='headerlink'>".$defaultpxeconfigs[$i]['cn']."</a>"; - - $deftrange = ""; - if (count($defaultpxeconfigs[$i]['timerange']) > 1 ){ - foreach ($defaultpxeconfigs[$i]['timerange'] as $tr){ - $exptime = array_merge(explode('_',$tr), array($defaultpxeconfigs[$i]['cn'])); - $timeranges[$i][] = $exptime; # Für grafische Wo-Ansicht - if ($exptime[0] == "X"){$exptime[0]="täglich";} - # if ($exptime[1] == "X" && $exptime[2] == "X"){$exptime[1] = ""; $exptime[2]= "";} - $deftrange .= $exptime[0].", von ".$exptime[1].":00 bis ".$exptime[2].":59 <br> "; - } - }else{ - $exptime = array_merge(explode('_',$defaultpxeconfigs[$i]['timerange']), array($defaultpxeconfigs[$i]['cn'])); - $timeranges[$i] = $exptime; # Für grafische Wo-Ansicht - if ($exptime[0] == "X"){$exptime[0]="täglich";} - # if ($exptime[1] == "X" && $exptime[2] == "X"){$exptime[1] = ""; $exptime[2]= "";} - $deftrange .= $exptime[0].", von ".$exptime[1].":00 bis ".$exptime[2].":59"; - } - - $template->assign(array("DEFPXEDN" => $defaultpxeconfigs[$i]['dn'], - "DEFPXECN" => $defpxelink, - "DEFPXEDESC" => $defaultpxeconfigs['description'], - "DEFPXETR" => $deftrange, )); - $template->parse("DEFPXES_LIST", ".Defpxes"); - } - } - } -#} - -########################################################## -# PXE Wochenübersicht - -# erst Defaults vom RBS Dienst -for ($i=0; $i<count($defaultpxeconfigs); $i++){ - # Timerange Komponenten - if (count($defaultpxeconfigs[$i]['timerange']) > 1 ){ - foreach ($defaultpxeconfigs[$i]['timerange'] as $tr){ - $exptime = array_merge(explode('_',$tr),array($defaultpxeconfigs[$i]['cn'])); - $wopldeftranges[$i][] = $exptime; # Für grafische Wo-Ansicht - } - }else{ - $exptime = array_merge(explode('_',$defaultpxeconfigs[$i]['timerange']), array($defaultpxeconfigs[$i]['cn'])); - $wopldeftranges[$i] = $exptime; # Für grafische Wo-Ansicht - } -} -# Diese dann mit möglichen Rechnerspezifischen überschreiben -for ($i=0; $i<count($hostpxeconfigs); $i++){ - # Timerange Komponenten - if (count($hostpxeconfigs[$i]['timerange']) > 1 ){ - foreach ($hostpxeconfigs[$i]['timerange'] as $tr){ - $exptime = array_merge(explode('_',$tr),array($hostpxeconfigs[$i]['cn'])); - $wopltranges[$i][] = $exptime; # Für grafische Wo-Ansicht - } - }else{ - $exptime = array_merge(explode('_',$hostpxeconfigs[$i]['timerange']), array($hostpxeconfigs[$i]['cn'])); - $wopltranges[$i] = $exptime; # Für grafische Wo-Ansicht - } -} - -include("pxe_wochenplan.php"); - -} - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/rbshost_change.php b/ldap-site-mngmt/webinterface/computers/rbshost_change.php deleted file mode 100644 index 179451ad..00000000 --- a/ldap-site-mngmt/webinterface/computers/rbshost_change.php +++ /dev/null @@ -1,98 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$syntax = new Syntaxcheck; - -$hostip = $_POST['hostip']; - -$rbs = $_POST['rbs']; -$oldrbs = $_POST['oldrbs']; - -$hostDN = $_POST['hostdn']; -$sbmnr = $_POST['sbmnr']; - -$rbs = htmlentities($rbs); -$oldrbs = htmlentities($oldrbs); - - -/*echo "new dhcp:"; print_r($dhcp); echo "<br>"; -echo "old dhcp:"; print_r($olddhcp); echo "<br>"; -echo "new rbs:"; print_r($rbs); echo "<br>"; -echo "old rbs:"; print_r($oldrbs); echo "<br>"; -echo "Host DN:"; print_r($hostDN); echo "<br>"; -echo "submenuNR:"; print_r($sbmnr); echo "<br><br>";*/ - - -$seconds = 2; -$url = 'rbshost.php?dn='.$hostDN.'&sbmnr='.$sbmnr; - -echo " -<html> -<head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - - -########################################## -# RBS - -if ($rbs != "none" && $rbs != $oldrbs){ - if ($rbs != ""){ - $exp = ldap_explode_dn($rbs, 1); - $rbscn = $exp[0]; - $rbsau = $exp[2]; - - $dhcpdata = get_node_data($rbs,array("tftpserverip","initbootfile")); - $entryrbs ['hlprbservice'] = $rbs; - $entryrbs ['dhcpoptnext-server'] = $dhcpdata['tftpserverip']; - $entryrbs ['dhcpoptfilename'] = $dhcpdata['initbootfile']; - if ($oldrbs != ""){ - echo "RBS replace "; print_r($oldrbs); echo " with "; print_r($entryrbs); echo "<br>"; - if ($result = ldap_mod_replace($ds,$hostDN,$entryrbs)){ - update_dhcpmtime(array()); - rbs_adjust_host($hostDN, $rbs); - $mesg = "Remote Boot Service erfolgreich zu <b>".$rbscn." [Abt.: ".$rbsau."]</b> geändert<br><br>"; - }else{ - $mesg = "Fehler beim ändern des Remote Boot Services zu <b>".$rbscn."</b>!<br><br>"; - } - }else{ - echo "RBS add "; print_r($entryrbs); echo "<br>"; - if ($result = ldap_mod_add($ds,$hostDN,$entryrbs)){ - update_dhcpmtime(array()); - rbs_adjust_host($hostDN, $rbs); - $mesg = "Remote Boot Service erfolgreich zu <b>".$rbscn." [Abt.: ".$rbsau."]</b> geändert<br><br>"; - }else{ - $mesg = "Fehler beim ändern des Remote Boot Services zu <b>".$rbscn."</b>!<br><br>"; - } - } - }else{ - $entryrbs ['hlprbservice'] = array(); - $entryrbs ['dhcpoptnext-server'] = array(); - $entryrbs ['dhcpoptfilename'] = array(); - echo "RBS delete "; echo "<br>"; - if ($result = ldap_mod_del($ds,$hostDN,$entryrbs)){ - update_dhcpmtime(array()); - $mesg = "Rechner erfolgreich aus RBS gelöscht<br><br>"; - }else{ - $mesg = "Fehler beim löschen aus RBS!<br><br>"; - } - } -} -if ($rbs == "none"){ - echo "RBS none <br>"; -} - - -##################### - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/showpxe.dwt b/ldap-site-mngmt/webinterface/computers/showpxe.dwt deleted file mode 100644 index d6f37f66..00000000 --- a/ldap-site-mngmt/webinterface/computers/showpxe.dwt +++ /dev/null @@ -1,57 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - - <tr> - <td height='20'><h4><a href='rbshost.php?dn={HOSTDN}&mnr=1&sbmnr={SBMNR}&mcnr=-1' class='headerlink'><< Zurück zu Rechner {HOST}</a></h4></td> - </tr> - <tr> - <td height='20'> </td> - </tr> - - <tr> - <td colspan='2'><h3>Default PXE Config <code class='font_object'> {PXECN} </code> </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - - <tr> - <td colspan='3'>Diese PXE Config wird vom RBS Betreiber verwaltet (Sie haben keine Schreibrechte).</td> - </tr> - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='80%' style='border-color: black; border-style: solid; border-width: 2 2 2 2;'> - - <tr> - <td width='8%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>#</td> - <td width='12%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>Flags</td> - <td width='80%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>Menu Label </td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: Bootmenu --> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;{BGCDEF}'>{POSITION} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;{BGCDEF}'>{MEDEF} {MEPWD} {MEHIDE} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;{BGCDEF}'><font size='+1'>{ANZEIGE} </font></td> - </tr> - </form> - <!-- END DYNAMIC BLOCK: Bootmenu --> - - </table></td> - </tr> - <tr> - <td><h4>Flags:</h4></font> - <ul> - <li><b>D</b> -> Default Menüeintrag</li> - <li><b>P</b> -> Passwort geschützt</li> - <li><b>H</b> -> Hidden</li> - </ul> - </td> - </tr> - <tr> - <td height='20'></td> - </tr> - - - -</table> diff --git a/ldap-site-mngmt/webinterface/computers/showpxe.php b/ldap-site-mngmt/webinterface/computers/showpxe.php deleted file mode 100644 index 7386aa83..00000000 --- a/ldap-site-mngmt/webinterface/computers/showpxe.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "showpxe.dwt"; - -include('computers_header.inc.php'); - -$mnr = -1; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; -$mcnr = $_GET['mcnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$pxeDN = $_GET['dn']; - -$hostdn = $_GET['hostdn']; -$hostdnarray = ldap_explode_dn($hostdn, 1); - -$attributes = array("dn","cn","rbservicedn","filename","timerange","kbdmap","menumasterpasswd","menutitle"); -$pxe = get_node_data($pxeDN,$attributes); -#print_r($pxe); -$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; - - -################################################ -# Bootmenü Einträge - -$template->define_dynamic("Bootmenu", "Webseite"); -$template->assign(array("PXECN" => $pxecn, - "HOSTDN" => $hostdn, - "HOST" => $hostdnarray[0], - "SBMNR" => $sbmnr, - "MENDN" => "", - "MENULABEL" => "", - "ANZEIGE" => "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" => $anzeige, - "ANZEIGENAME" => $anzeige, - "POSITION" => $me['menuposition'], - "MEDEF" => $medef, - "MEPWD" => $mepwd, - "MEHIDE" => $mehide, - "BGCDEF" => $bgcdef, - "AUDN" => $auDN)); - $template->parse("BOOTMENU_LIST", ".Bootmenu"); - $medef = ""; - $bgcdef = ""; -} - - -################################################################################### - -include("computers_footer.inc.php"); - -?> |
