From b9d2bd338f68aace2eb9e999896a787014ac7e46 Mon Sep 17 00:00:00 2001 From: Tarik Gasmi Date: Thu, 7 Jun 2007 17:49:06 +0000 Subject: Aktuelle Version LDAP-Site-Mngmt Webinterface git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1156 95ad53e4-c205-0410-b2fa-d234c58c8868 --- .../webinterface/computers/pxe_change.php | 95 +--------------------- 1 file changed, 3 insertions(+), 92 deletions(-) (limited to 'ldap-site-mngmt/webinterface/computers/pxe_change.php') diff --git a/ldap-site-mngmt/webinterface/computers/pxe_change.php b/ldap-site-mngmt/webinterface/computers/pxe_change.php index b3fcd4fa..07af7ed5 100644 --- a/ldap-site-mngmt/webinterface/computers/pxe_change.php +++ b/ldap-site-mngmt/webinterface/computers/pxe_change.php @@ -1,6 +1,8 @@
"; -$oldattribs = $_POST['oldattribs']; -if (count($oldattribs) != 0){ - foreach (array_keys($oldattribs) as $key){ - $oldatts[$key] = htmlentities($oldattribs[$key]); - } -} -#print_r($oldatts); echo "

"; - $seconds = 2; $url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; @@ -354,79 +337,7 @@ if ($newfilename != ""){ } - -################################################################## -# 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 "
"; -#print_r($entrymod); echo "
"; -#print_r($entrydel); echo "
"; - - -if (count($entryadd) != 0 ){ - #print_r($entryadd); echo "
"; - #echo "neu anlegen
"; - foreach (array_keys($entryadd) as $key){ - $addatts .= "".$key.","; - } - if(ldap_mod_add($ds,$pxeDN,$entryadd)){ - $mesg = "Attribute ".$addatts." erfolgreich eingetragen

"; - }else{ - $mesg = "Fehler beim eintragen der Attribute ".$addatts."

"; - } -} - -if (count($entrymod) != 0 ){ - #print_r($entrymod); echo "
"; - #echo "ändern
"; - foreach (array_keys($entrymod) as $key){ - $modatts .= "".$key.","; - } - if(ldap_mod_replace($ds,$pxeDN,$entrymod)){ - $mesg = "Attribute ".$modatts." erfolgreich geaendert

"; - }else{ - $mesg = "Fehler beim aendern der Attribute ".$modatts."

"; - } -} - -if (count($entrydel) != 0 ){ - #print_r($entrydel); echo "
"; - #echo "löschen
"; - foreach (array_keys($entrydel) as $key){ - $delatts .= "".$key.","; - } - if(ldap_mod_del($ds,$pxeDN,$entrydel)){ - $mesg = "Attribute ".$delatts." erfolgreich geloescht

"; - }else{ - $mesg = "Fehler beim loeschen der Attribute ".$delatts."

"; - } -} - - - +######################### $mesg .= "
Sie werden automatisch auf die vorherige Seite zurückgeleitet.
Falls nicht, klicken Sie hier back"; -- cgit v1.2.3-55-g7522