summaryrefslogtreecommitdiffstats
path: root/ldap-site-mngmt/webinterface/computers
diff options
context:
space:
mode:
authorTarik Gasmi2007-09-27 16:40:23 +0200
committerTarik Gasmi2007-09-27 16:40:23 +0200
commitecc473303fbee5f5466d2477157b5fd682357003 (patch)
tree2776e2d1d44543e60e15fba30d98d630a551c59c /ldap-site-mngmt/webinterface/computers
parentAdded text to PXE image "please select" and "use arrow keys". Dirks idea. (diff)
downloadcore-ecc473303fbee5f5466d2477157b5fd682357003.tar.gz
core-ecc473303fbee5f5466d2477157b5fd682357003.tar.xz
core-ecc473303fbee5f5466d2477157b5fd682357003.zip
Reorganized LSM Webinterface
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1353 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'ldap-site-mngmt/webinterface/computers')
-rw-r--r--ldap-site-mngmt/webinterface/computers/computers.dwt15
-rw-r--r--ldap-site-mngmt/webinterface/computers/computers.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/computers_footer.inc.php1
-rw-r--r--ldap-site-mngmt/webinterface/computers/computers_header.inc.php16
-rw-r--r--ldap-site-mngmt/webinterface/computers/computers_menu.php76
-rw-r--r--ldap-site-mngmt/webinterface/computers/dhcphost.php96
-rw-r--r--ldap-site-mngmt/webinterface/computers/group.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/groupoverview.php14
-rw-r--r--ldap-site-mngmt/webinterface/computers/host.dwt1
-rw-r--r--ldap-site-mngmt/webinterface/computers/host.php20
-rw-r--r--ldap-site-mngmt/webinterface/computers/host_change.php84
-rw-r--r--ldap-site-mngmt/webinterface/computers/hostoverview.dwt14
-rw-r--r--ldap-site-mngmt/webinterface/computers/hostoverview.php50
-rw-r--r--ldap-site-mngmt/webinterface/computers/hwhost.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/ip_rechner.dwt40
-rw-r--r--ldap-site-mngmt/webinterface/computers/ip_rechner.php69
-rw-r--r--ldap-site-mngmt/webinterface/computers/ip_rechner_change.php122
-rw-r--r--ldap-site-mngmt/webinterface/computers/machineconfig_default.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/mcdef.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/menuentry.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/new_group.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/new_host.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/new_mcdef.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/new_menuentry.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/new_pxe.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/no_ip.dwt11
-rw-r--r--ldap-site-mngmt/webinterface/computers/no_ip.php28
-rw-r--r--ldap-site-mngmt/webinterface/computers/pxe.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/pxe_bootmenue.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/pxe_globals.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/rbshost.php15
-rw-r--r--ldap-site-mngmt/webinterface/computers/showpxe.php16
32 files changed, 528 insertions, 370 deletions
diff --git a/ldap-site-mngmt/webinterface/computers/computers.dwt b/ldap-site-mngmt/webinterface/computers/computers.dwt
index ec6d0cbc..8f52e884 100644
--- a/ldap-site-mngmt/webinterface/computers/computers.dwt
+++ b/ldap-site-mngmt/webinterface/computers/computers.dwt
@@ -53,11 +53,20 @@
<tr valign='top' height='100%'>
<td width='28%'>
<table cellpadding='5' cellspacing='0' border='0' width='100%'>
- <tr><td>
+ <tr>
+ <td>
- {NAVIGATION}
+ {NAVIGATION}
- </td></tr>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+ {IPBLOCKS}
+
+ </td>
+ </tr>
</table>
</td>
diff --git a/ldap-site-mngmt/webinterface/computers/computers.php b/ldap-site-mngmt/webinterface/computers/computers.php
index 46b686df..ea365d76 100644
--- a/ldap-site-mngmt/webinterface/computers/computers.php
+++ b/ldap-site-mngmt/webinterface/computers/computers.php
@@ -1,20 +1,15 @@
<?php
include('../standard_header.inc.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 = 3;
-$mnr = 0;
-$sbmnr = -1;
-$mcnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "computers_start.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = 0;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
# Menuleisten erstellen
diff --git a/ldap-site-mngmt/webinterface/computers/computers_footer.inc.php b/ldap-site-mngmt/webinterface/computers/computers_footer.inc.php
index 311721c5..7849823e 100644
--- a/ldap-site-mngmt/webinterface/computers/computers_footer.inc.php
+++ b/ldap-site-mngmt/webinterface/computers/computers_footer.inc.php
@@ -6,6 +6,7 @@ $template->assign(array("PFAD" => $START_PATH));
$template->parse("LOGIN", "Login");
$template->parse("MAINMENU", "Mmenu");
$template->parse("NAVIGATION", "Menu");
+$template->parse("IPBLOCKS", "IPBlocks");
$template->parse("HAUPTFENSTER", "Webseite");
$template->parse("PAGE", "Vorlage");
diff --git a/ldap-site-mngmt/webinterface/computers/computers_header.inc.php b/ldap-site-mngmt/webinterface/computers/computers_header.inc.php
index d51a42d1..d6bc3746 100644
--- a/ldap-site-mngmt/webinterface/computers/computers_header.inc.php
+++ b/ldap-site-mngmt/webinterface/computers/computers_header.inc.php
@@ -1,13 +1,18 @@
<?php
-include("computers_menu.php");
-$template = new FastTemplate(".");
+# 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) {
@@ -15,7 +20,10 @@ if (isset($additionalTemplates)) {
}
}
$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
index 201192ab..97ff55fa 100644
--- a/ldap-site-mngmt/webinterface/computers/computers_menu.php
+++ b/ldap-site-mngmt/webinterface/computers/computers_menu.php
@@ -3,7 +3,15 @@
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";
+ }
+
# Struktur der Registerkartenleiste
# Hauptmenu
$hauptmenu = array(array("link" => "computers.php",
@@ -12,9 +20,12 @@ function createComputersMenu($rollen , $mnr, $auDN, $sbmnr, $mcnr) {
array("link" => "hostoverview.php",
"text" => "Rechner",
"zugriff" => array("MainAdmin","HostAdmin","DhcpAdmin")),
- array("link" => "groupoverview.php",
- "text" => "Rechnergruppen",
- "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")),
@@ -23,7 +34,7 @@ function createComputersMenu($rollen , $mnr, $auDN, $sbmnr, $mcnr) {
# "zugriff" => array("MainAdmin","HostAdmin")),
array("link" => "new_pxe.php",
"text" => "Neues PXE Bootmen&uuml;",
- "zugriff" => array("MainAdmin","HostAdmin","DhcpAdmin")));
+ "zugriff" => array("MainAdmin")));
# Submenus
/*$computers_array = get_hosts($auDN,array("dn","hostname","ou"));
@@ -36,7 +47,7 @@ function createComputersMenu($rollen , $mnr, $auDN, $sbmnr, $mcnr) {
}*/
$comps[] = array("link" => "new_host.php?sbmnr=0", #.$n,
"text" => "Neuen Rechner anlegen",
- "zugriff" => array("MainAdmin","HostAdmin"));
+ "zugriff" => array("MainAdmin","DhcpAdmin","HostAdmin"));
$groups_array = get_groups($auDN,array("dn","cn"));
for($n=0;$n<count($groups_array);$n++){
@@ -44,25 +55,26 @@ function createComputersMenu($rollen , $mnr, $auDN, $sbmnr, $mcnr) {
$groups = array();
$groups[] = array("link" => "group.php?dn=".$groups_array[$n]['dn']."&sbmnr=".$n,
"text" => $groups_array[$n]['cn'],
- "zugriff" => array("MainAdmin","HostAdmin","DhcpAdmin"));
+ "zugriff" => array("MainAdmin","DhcpAdmin","HostAdmin"));
}
$groups[] = array("link" => "new_group.php?sbmnr=".$n,
"text" => "Neue Gruppe anlegen",
- "zugriff" => array("MainAdmin","HostAdmin"));
+ "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","HostAdmin","DhcpAdmin"));
+ "zugriff" => array("MainAdmin","DhcpAdmin","HostAdmin"));
}
$submenu = array(array(),
$comps,
- $groups,
- $defmc,
+ array(),
+ #$groups,
+ #$defmc,
array());
#echo "submenu: ";print_r($submenu);echo "<br><br>";
@@ -100,47 +112,53 @@ function createComputersMenu($rollen , $mnr, $auDN, $sbmnr, $mcnr) {
else{
if ($j==0) {
if ($sbmnr==0) {
- if($maxsub == 1){$zwisch2="";}
- else {$zwisch2="";}
+ if($maxsub == 1){$zwisch2="branchbottom2";}
+ else {$zwisch2="branch2";}
$lastaktive=true;
$farb="#505050";
}
else{
- 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="";}
+ 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="";}
- else {$zwisch2="";}
+ if($maxsub == $j+1){$zwisch2="branchbottom2";}
+ else {$zwisch2="branch2";}
$lastaktive=true;
$farb="#505050";
}
else {
- 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="";}
+ 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></td><td></td><td></td>
+ <td></td><td align='right'><img src='../pics/line2.gif' height='4'></td><td></td><td></td>
</tr>
<tr>
<td width='8%'>&nbsp;</td>
- <td width='8%' align='right'>".$zwisch2."</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}'>&nbsp;</td>
<td width='69%' align='left' style='border-width:1 1 1 0;border-color:#000000;border-style:solid;padding:4;padding-left:12px;background-color:{FARBE_S}'>
<a href='".$item2['link']."' style='text-decoration:none'><b class='standard_schrift'>".$item2['text']."</b></a></td>
diff --git a/ldap-site-mngmt/webinterface/computers/dhcphost.php b/ldap-site-mngmt/webinterface/computers/dhcphost.php
index 27ce686b..8a5f67fa 100644
--- a/ldap-site-mngmt/webinterface/computers/dhcphost.php
+++ b/ldap-site-mngmt/webinterface/computers/dhcphost.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.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 = 3;
-$mnr = 1;
-$sbmnr = -1;
-$mcnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "dhcphost.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = 1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$sbmnr = $_GET['sbmnr'];
@@ -55,7 +50,7 @@ if ($dhcphlpcont == ""){
# DHCP Selectbox
$altdhcp = alternative_dhcpobjects($objecttype,$objectDN,$hostip[0]);
$dhcp_selectbox .= "<td class='tab_d'>
- <select name='dhcpcont' size='4' class='medium_form_selectbox'>
+ <select name='dhcpcont' size='3' class='medium_form_selectbox'>
<option selected value='none'>----------</option>";
if (count($altdhcp) != 0){
foreach ($altdhcp as $item){
@@ -101,7 +96,7 @@ if ($dhcphlpcont == ""){
# DHCP Selectbox
$altdhcp = alternative_dhcpobjects($objecttype,$objectDN,$hostip[0]);
$dhcp_selectbox .= "<td class='tab_d'>
- <select name='dhcpcont' size='4' class='medium_form_selectbox'>
+ <select name='dhcpcont' size='3' class='medium_form_selectbox'>
<option selected value='none'>----------</option>";
if (count($altdhcp) != 0){
foreach ($altdhcp as $item){
@@ -183,86 +178,9 @@ $template->assign(array("HOSTDN" => $hostDN,
"SBMNR" => $sbmnr));
-##########################################################
-# DHCP Setup
-
-/*$dhcp_selectbox = "";
-$altdhcp = alternative_dhcpobjects($objecttype,$objectDN,$hostip[0]);
-echo "<br><br>";print_r($altdhcp);
-
-$dhcp_selectbox .= "<td class='tab_d'>
- <select name='dhcpcont' size='4' 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>";*/
-
-###########################################################
-# RBS Setup
-
-/*$altrbs = alternative_rbservices($rbsDN);
-#print_r($altrbs); echo "<br><br>";
-$template->assign(array("ALTRBSDN" => "",
- "ALTRBSCN" => "",
- "ALTRBSAU" => ""));
-if (count($altrbs) != 0){
-$template->define_dynamic("Altrbs", "Webseite");
- foreach ($altrbs as $item){
- $template->assign(array("ALTRBSDN" => $item['dn'],
- "ALTRBSCN" => $item['cn'],
- "ALTRBSAU" => $item['au'],));
- $template->parse("ALTRBS_LIST", ".Altrbs");
- }
-}*/
-
###################################################################################
include("computers_footer.inc.php");
-
-
-/*
-<tr height='50'>
- <td class='tab_d'><b>DHCP Option hardware ethernet: </b>&nbsp;</td>
- <td class='tab_d'>{HWADDRESS} &nbsp;
- </td>
- </tr>
- <tr height='50'>
- <td class='tab_d'><b>DHCP Option fixed-address: &nbsp;</td>
- <td class='tab_d'>{IPADDRESS} &nbsp;
- </td>
- </tr>
-
-<td class='tab_d'>
- <select name='rbs' size='4' class='medium_form_selectbox'>
- <option selected value='none'>----------</option>
-
- <!-- BEGIN DYNAMIC BLOCK: Altrbs -->
- <option value='{ALTRBSDN}'>{ALTRBSCN} {ALTRBSAU}</option>
- <!-- END DYNAMIC BLOCK: Altrbs -->
-
- <option value=''>Kein RBS</option>
-
- </select>
- </td>
- <tr height='50'>
- <td class='tab_d'><b>TFTP Server <br>DHCP Option next-server: </b>&nbsp;</td>
- <td class='tab_d'>{NEXTSERVER} &nbsp;
- </td>
- </tr>
- <tr height='50'>
- <td class='tab_d'><b>PXE initiale Bootdatei <br>DHCP Option filename: </b>&nbsp;</td>
- <td class='tab_d'>{FILENAME} &nbsp;
- </td>
- </tr>
-
-
- */
?> \ No newline at end of file
diff --git a/ldap-site-mngmt/webinterface/computers/group.php b/ldap-site-mngmt/webinterface/computers/group.php
index 13819e62..cfacd649 100644
--- a/ldap-site-mngmt/webinterface/computers/group.php
+++ b/ldap-site-mngmt/webinterface/computers/group.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.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 = 3;
-$mnr = 2;
-$sbmnr = -1;
-$mcnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "group.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = 2;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$sbmnr = $_GET['sbmnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/groupoverview.php b/ldap-site-mngmt/webinterface/computers/groupoverview.php
index 15424fbd..d14b9d0f 100644
--- a/ldap-site-mngmt/webinterface/computers/groupoverview.php
+++ b/ldap-site-mngmt/webinterface/computers/groupoverview.php
@@ -2,19 +2,13 @@
include('../standard_header.inc.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 = 3;
+# Dateiname und evtl. Pfad des Templates für die Webseite
+$webseite = "groupoverview.dwt";
+include('computers_header.inc.php');
+
$mnr = 2;
$sbmnr = -1;
$mcnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
-$webseite = "groupoverview.dwt";
-
-include("../class.FastTemplate.php");
-
-include('computers_header.inc.php');
###################################################################################
diff --git a/ldap-site-mngmt/webinterface/computers/host.dwt b/ldap-site-mngmt/webinterface/computers/host.dwt
index bd05e75b..729e6d64 100644
--- a/ldap-site-mngmt/webinterface/computers/host.dwt
+++ b/ldap-site-mngmt/webinterface/computers/host.dwt
@@ -59,6 +59,7 @@
<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}'>
diff --git a/ldap-site-mngmt/webinterface/computers/host.php b/ldap-site-mngmt/webinterface/computers/host.php
index 2c522181..1778ffbb 100644
--- a/ldap-site-mngmt/webinterface/computers/host.php
+++ b/ldap-site-mngmt/webinterface/computers/host.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.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 = 3;
-$mnr = 1;
-$sbmnr = -1;
-$mcnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "host.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = 1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$sbmnr = $_GET['sbmnr'];
@@ -28,7 +23,7 @@ createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr);
$hostDN = $_GET['dn'];
-$attributes = array("hostname","domainname","ipaddress","hwaddress","description","dhcphlpcont",
+$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']);
@@ -56,7 +51,8 @@ $template->assign(array("HOSTDN" => $hostDN,
"IPADDRESS" => $hostip[0],
"DESCRIPTION" => $host['description'],
"DHCPCONT" => $host['dhcphlpcont'],
- "DHCPTYPE" => $dhcptype,
+ "DHCPTYPE" => $dhcptype,
+ "FIXADD" => $host['dhcpoptfixed-address'] ,
"MOUSE" => $host['hw-mouse'],
"GRAPHIC" => $host['hw-graphic'],
"MONITOR" => $host['hw-monitor'],
diff --git a/ldap-site-mngmt/webinterface/computers/host_change.php b/ldap-site-mngmt/webinterface/computers/host_change.php
index 52df970f..f32daef3 100644
--- a/ldap-site-mngmt/webinterface/computers/host_change.php
+++ b/ldap-site-mngmt/webinterface/computers/host_change.php
@@ -12,6 +12,7 @@ $olddesc = $_POST['olddesc'];
$dhcphlpcont = $_POST['dhcphlpcont'];
$dhcptype = $_POST['dhcptype'];
+$fixadd = $_POST['fixadd'];
$hostDN = $_POST['hostdn'];
$sbmnr = $_POST['sbmnr'];
@@ -134,58 +135,66 @@ if ( $oldmac == $mac ){
if ( $oldmac == "" && $mac != "" ){
echo "MAC neu anlegen<br>";
# hier noch Syntaxcheck
- $entry['hwaddress'] = $mac;
- $result = ldap_mod_add($ds,$hostDN,$entry);
- if($result){
- $mesg = "MAC erfolgreich eingetragen<br><br>";
+ 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{
- $mesg = "Fehler beim eintragen der MAC<br><br>";
+ echo "Falsche MAC Syntax<br><br>";
}
}
if ( $oldmac != "" && $mac != "" && $oldmac != $mac ){
echo "MAC aendern<br>";
# hier noch Syntaxcheck
- $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( $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){
- 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];
+ $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);
}
- 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 &auml;ndern";
+ }else{
+ $mesg = "Fehler beim aendern der MAC<br><br>";
}
- $mesg = "MAC erfolgreich geaendert<br><br>
- Falls Rechner-Konfiguration via File, <b>Client-Conf</b> Dateiname in untergeordneten <br>
- PXEs bitte auch &auml;ndern";
}else{
- $mesg = "Fehler beim aendern der MAC<br><br>";
+ echo "Falsche MAC Syntax<br><br>";
}
}
@@ -204,7 +213,6 @@ if ( $oldmac != "" && $mac == "" ){
MAC nicht gel&ouml;scht!";
}
else{
- # hier noch Syntaxcheck
$entry['hwaddress'] = $oldmac;
$result = ldap_mod_del($ds,$hostDN,$entry);
if($result){
@@ -251,7 +259,7 @@ if ( $oldip != "" && $ip != "" && $oldip != $ip ){
# print_r($newip); echo "<br><br>";
$oldip_array = array($oldip,$oldip);
$oldipp = implode('_',$oldip_array);
- if (modify_ip_host($newip,$hostDN,$auDN)){
+ if (modify_ip_host($newip,$hostDN,$auDN,$fixadd)){
$mesg = "IP erfolgreich geaendert<br><br>";
if ($dhcptype == "subnet"){
adjust_hostip_dhcpsubnet($ip,$hostDN,$dhcphlpcont);
diff --git a/ldap-site-mngmt/webinterface/computers/hostoverview.dwt b/ldap-site-mngmt/webinterface/computers/hostoverview.dwt
index 51065a56..50694f46 100644
--- a/ldap-site-mngmt/webinterface/computers/hostoverview.dwt
+++ b/ldap-site-mngmt/webinterface/computers/hostoverview.dwt
@@ -8,11 +8,13 @@
<tr><td>
<table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'>
<tr>
- <td width='24%' class='tab_h'><b>Rechnername</b></td>
- <td width='19%' class='tab_h'><b>IP Adresse</b></td>
- <td width='19%' class='tab_h'><b>MAC Adresse</b></td>
- <td width='19%' class='tab_h'><b>DHCP</b></td>
- <td width='19%' class='tab_h'><b>RBS</b></td>
+ <td width='18%' class='tab_h'><b>Rechnername</b></td>
+ <td width='14%' class='tab_h'><b>IP Adresse</b></td>
+ <td width='20%' class='tab_h'><b>MAC Adresse</b></td>
+ <td width='15%' class='tab_h'><b>DHCP</b></td>
+ <td width='10%' class='tab_h'> &nbsp;</td>
+ <td width='13%' class='tab_h'><b>RBS</b></td>
+ <td width='10%' class='tab_h'> &nbsp;</td>
</tr>
<!-- BEGIN DYNAMIC BLOCK: Rechner -->
@@ -21,7 +23,9 @@
<td class='tab_d'>{IPADDRESS} &nbsp;</td>
<td class='tab_d'>{HWADDRESS} &nbsp;</td>
<td class='tab_d'>{DHCPCONT} &nbsp;</td>
+ <td class='tab_d'>{FIXADD} &nbsp;</td>
<td class='tab_d'>{RBSCONT} &nbsp;</td>
+ <td class='tab_d'>{NXTSRV} &nbsp;</td>
</tr>
<!-- END DYNAMIC BLOCK: Rechner -->
diff --git a/ldap-site-mngmt/webinterface/computers/hostoverview.php b/ldap-site-mngmt/webinterface/computers/hostoverview.php
index c2bec0a2..b59dbea6 100644
--- a/ldap-site-mngmt/webinterface/computers/hostoverview.php
+++ b/ldap-site-mngmt/webinterface/computers/hostoverview.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.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 = 3;
-$mnr = 1;
-$sbmnr = -1;
-$mcnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "hostoverview.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = 1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
# Menuleisten erstellen
@@ -30,9 +25,11 @@ $template->assign(array("DN" => "",
"HWADDRESS" => "",
"IPADDRESS" => "",
"DHCPCONT" => "",
- "RBSCONT" => ""));
+ "FIXADD" => "",
+ "RBSCONT" => "",
+ "NXTSRV" => ""));
-$attributes = array("dn","hostname","domainname","hwaddress","ipaddress","dhcphlpcont","hlprbservice");
+$attributes = array("dn","hostname","domainname","hwaddress","ipaddress","dhcphlpcont","dhcpoptfixed-address","hlprbservice","dhcpoptnext-server");
$host_array = get_hosts($auDN,$attributes);
$template->define_dynamic("Rechner", "Webseite");
@@ -44,22 +41,35 @@ foreach ($host_array as $host){
$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 = "Service ".$dhcpexpdn[0]." <br>[".$dhcpexpdn[2]."]";
- }
+ #$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);
$rbscont = $rbsexpdn[0]." <br>[".$rbsexpdn[2]."]";
+
+ $dhcpnxtsrv = $host['dhcpoptnext-server'];
}
$template->assign(array("DN" => $host['dn'],
@@ -68,7 +78,9 @@ foreach ($host_array as $host){
"HWADDRESS" => $host['hwaddress'],
"IPADDRESS" => $hostip[0],
"DHCPCONT" => $dhcpcont,
+ "FIXADD" => $dhcpfixadd,
"RBSCONT" => $rbscont,
+ "NXTSRV" => $dhcpnxtsrv,
"AUDN" => $auDN ));
$template->parse("RECHNER_LIST", ".Rechner");
diff --git a/ldap-site-mngmt/webinterface/computers/hwhost.php b/ldap-site-mngmt/webinterface/computers/hwhost.php
index 7a766266..0f6cc300 100644
--- a/ldap-site-mngmt/webinterface/computers/hwhost.php
+++ b/ldap-site-mngmt/webinterface/computers/hwhost.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.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 = 3;
-$mnr = 1;
-$sbmnr = -1;
-$mcnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "hwhost.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = 1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$sbmnr = $_GET['sbmnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/ip_rechner.dwt b/ldap-site-mngmt/webinterface/computers/ip_rechner.dwt
new file mode 100644
index 00000000..b300e88e
--- /dev/null
+++ b/ldap-site-mngmt/webinterface/computers/ip_rechner.dwt
@@ -0,0 +1,40 @@
+<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>Rechner Name</b></td>
+ <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>IP Adresse</b></td>
+ <td width='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} &nbsp;</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} &nbsp;</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
new file mode 100644
index 00000000..5870f503
--- /dev/null
+++ b/ldap-site-mngmt/webinterface/computers/ip_rechner.php
@@ -0,0 +1,69 @@
+<?php
+
+include('../standard_header.inc.php');
+
+# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+$webseite = "ip_rechner.dwt";
+
+include('computers_header.inc.php');
+
+#############################################################################
+
+$mnr = 2;
+$sbmnr = -1;
+$mcnr = -1;
+
+# Menuleiste erstellen
+createMainMenu($rollen, $mainnr);
+createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr);
+
+#############################################################################
+
+$template->assign(array("IP" => "",
+ "OLDIP" => "",
+ "DHCPCONT" => "",
+ "FIXADD" => "",
+ "HOSTNAME" => "Noch keine Rechner angelegt",
+ "HOSTDN" => ""));
+
+$host_array = get_hosts($auDN,array("dn","hostname","ipaddress","dhcphlpcont","dhcpoptfixed-address"));
+# print_r ($host_array);
+
+$template->define_dynamic("Hosts", "Webseite");
+
+foreach ($host_array as $host){
+ $hostip = explode('_',$host['ipaddress']);
+
+ $dhcpcont = "";
+ $fixadd = "";
+ if ( count($host['dhcphlpcont']) != 0 ){ #&& $host['ipaddress'] == "" ){
+ $dhcpcont = " dynamisch";
+ #$fixadd = $host['dhcpoptfixed-address'];
+ #}elseif( count($host['dhcphlpcont']) != 0 && $host['ipaddress'] != "" ){
+ if ( $host['dhcpoptfixed-address'] == "ip") {
+ $dhcpcont = " fix";
+ #$fixadd = $host['dhcpoptfixed-address'];
+ }
+ if ( $host['dhcpoptfixed-address'] == "hostname") {
+ $dhcpcont = " fix (&uuml;ber DNS Name)";
+ #$fixadd = $host['dhcpoptfixed-address'];
+ }
+ $fixadd = $host['dhcpoptfixed-address'];
+ }
+
+ $template->assign(array("IP" => $hostip[0],
+ "OLDIP" => $hostip[0],
+ "DHCPCONT" => $dhcpcont,
+ "FIXADD" => $fixadd,
+ "HOSTNAME" => $host['hostname'],
+ "HOSTDN" => $host['dn'],
+ "AUDN" => $auDN ));
+ $template->parse("HOSTS_LIST", ".Hosts");
+}
+
+
+#####################################################################################
+
+include("computers_footer.inc.php");
+
+?>
diff --git a/ldap-site-mngmt/webinterface/computers/ip_rechner_change.php b/ldap-site-mngmt/webinterface/computers/ip_rechner_change.php
new file mode 100644
index 00000000..4db8bed0
--- /dev/null
+++ b/ldap-site-mngmt/webinterface/computers/ip_rechner_change.php
@@ -0,0 +1,122 @@
+<?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&uuml;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&uuml;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&uuml;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&uuml;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.php b/ldap-site-mngmt/webinterface/computers/machineconfig_default.php
index ac386a57..ff52ced8 100644
--- a/ldap-site-mngmt/webinterface/computers/machineconfig_default.php
+++ b/ldap-site-mngmt/webinterface/computers/machineconfig_default.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.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 = 3;
-$mnr = 3;
-$sbmnr = -1;
-$mcnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "machineconfig_default.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = 3;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
# Menuleisten erstellen
diff --git a/ldap-site-mngmt/webinterface/computers/mcdef.php b/ldap-site-mngmt/webinterface/computers/mcdef.php
index 18e7a0aa..51a760ba 100644
--- a/ldap-site-mngmt/webinterface/computers/mcdef.php
+++ b/ldap-site-mngmt/webinterface/computers/mcdef.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.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 = 3;
-$mnr = -1;
-$sbmnr = -1;
-$mcnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "mcdef.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = -1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$mnr = $_GET['mnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/menuentry.php b/ldap-site-mngmt/webinterface/computers/menuentry.php
index 81e1dc63..386178a3 100644
--- a/ldap-site-mngmt/webinterface/computers/menuentry.php
+++ b/ldap-site-mngmt/webinterface/computers/menuentry.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.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 = 3;
-$mnr = -1;
-$sbmnr = -1;
-$mcnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "menuentry.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = -1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$mnr = $_GET['mnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/new_group.php b/ldap-site-mngmt/webinterface/computers/new_group.php
index 0fcd8bcc..6d5f4257 100644
--- a/ldap-site-mngmt/webinterface/computers/new_group.php
+++ b/ldap-site-mngmt/webinterface/computers/new_group.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.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 = 3;
-$mnr = 2;
-$sbmnr = -1;
-$mcnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "new_group.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = 2;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$sbmnr = $_GET['sbmnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/new_host.php b/ldap-site-mngmt/webinterface/computers/new_host.php
index 507fc0ac..ad20b092 100644
--- a/ldap-site-mngmt/webinterface/computers/new_host.php
+++ b/ldap-site-mngmt/webinterface/computers/new_host.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.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 = 3;
-$mnr = 1;
-$sbmnr = -1;
-$mcnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "new_host.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = 1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$sbmnr = $_GET['sbmnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/new_mcdef.php b/ldap-site-mngmt/webinterface/computers/new_mcdef.php
index eec7a3dd..e36c76bb 100644
--- a/ldap-site-mngmt/webinterface/computers/new_mcdef.php
+++ b/ldap-site-mngmt/webinterface/computers/new_mcdef.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.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 = 3;
-$mnr = 4;
-$sbmnr = -1;
-$mcnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "new_mcdef.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = 4;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$sbmnr = $_GET['sbmnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/new_menuentry.php b/ldap-site-mngmt/webinterface/computers/new_menuentry.php
index 155ed245..c407f5e7 100644
--- a/ldap-site-mngmt/webinterface/computers/new_menuentry.php
+++ b/ldap-site-mngmt/webinterface/computers/new_menuentry.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.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 = 3;
-$mnr = -1;
-$sbmnr = -1;
-$mcnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "new_menuentry.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = -1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$mnr = $_GET['mnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/new_pxe.php b/ldap-site-mngmt/webinterface/computers/new_pxe.php
index 8eef2888..a6f479e3 100644
--- a/ldap-site-mngmt/webinterface/computers/new_pxe.php
+++ b/ldap-site-mngmt/webinterface/computers/new_pxe.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.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 = 3;
-$mnr = 3;
-$sbmnr = -1;
-$mcnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "new_pxe.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = 2;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$sbmnr = $_GET['sbmnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/no_ip.dwt b/ldap-site-mngmt/webinterface/computers/no_ip.dwt
new file mode 100644
index 00000000..5bc09796
--- /dev/null
+++ b/ldap-site-mngmt/webinterface/computers/no_ip.dwt
@@ -0,0 +1,11 @@
+<table border='0' cellpadding='5' cellspacing='0' width='100%'>
+ <tr>
+ <td colspan='2'><h3>Diese Funktion steht Ihnen nicht zur Verf&uuml;gung. </h3>
+ Sie verf&uuml;gen &uuml;ber keine IP Adressen, die Sie an Rechner, DHCP Subnetze vergeben,
+ bzw. an untergeordnete AUs delegieren k&ouml;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
new file mode 100644
index 00000000..bfda6f02
--- /dev/null
+++ b/ldap-site-mngmt/webinterface/computers/no_ip.php
@@ -0,0 +1,28 @@
+<?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.php b/ldap-site-mngmt/webinterface/computers/pxe.php
index 26712077..d4f86026 100644
--- a/ldap-site-mngmt/webinterface/computers/pxe.php
+++ b/ldap-site-mngmt/webinterface/computers/pxe.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.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 = 3;
-$mnr = -1;
-$sbmnr = -1;
-$mcnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "pxe.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = -1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$mnr = $_GET['mnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.php b/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.php
index 3bd34305..e916048b 100644
--- a/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.php
+++ b/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.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 = 3;
-$mnr = -1;
-$sbmnr = -1;
-$mcnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "pxe_bootmenue.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = -1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$mnr = $_GET['mnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/pxe_globals.php b/ldap-site-mngmt/webinterface/computers/pxe_globals.php
index 7ab7892f..0bfdaee6 100644
--- a/ldap-site-mngmt/webinterface/computers/pxe_globals.php
+++ b/ldap-site-mngmt/webinterface/computers/pxe_globals.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.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 = 3;
-$mnr = -1;
-$sbmnr = -1;
-$mcnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "pxe_globals.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = -1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$mnr = $_GET['mnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/rbshost.php b/ldap-site-mngmt/webinterface/computers/rbshost.php
index 3d53ba0a..101c5171 100644
--- a/ldap-site-mngmt/webinterface/computers/rbshost.php
+++ b/ldap-site-mngmt/webinterface/computers/rbshost.php
@@ -2,20 +2,15 @@
include('../standard_header.inc.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 = 3;
-$mnr = 1;
-$sbmnr = -1;
-$mcnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "rbshost.dwt";
-include("../class.FastTemplate.php");
-
include('computers_header.inc.php');
+$mnr = 1;
+$sbmnr = -1;
+$mcnr = -1;
+
###################################################################################
$sbmnr = $_GET['sbmnr'];
diff --git a/ldap-site-mngmt/webinterface/computers/showpxe.php b/ldap-site-mngmt/webinterface/computers/showpxe.php
index 8ed9b70d..7386aa83 100644
--- a/ldap-site-mngmt/webinterface/computers/showpxe.php
+++ b/ldap-site-mngmt/webinterface/computers/showpxe.php
@@ -2,27 +2,21 @@
include('../standard_header.inc.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 = 3;
-$mnr = -1;
-$sbmnr = -1;
-$mcnr = -1;
-# 3. Dateiname und evtl. Pfad des Templates für die Webseite
+# Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "showpxe.dwt";
-include("../class.FastTemplate.php");
-
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);