diff options
Diffstat (limited to 'ldap-site-mngmt/webinterface/computers/menuposition_down.php')
-rw-r--r-- | ldap-site-mngmt/webinterface/computers/menuposition_down.php | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/ldap-site-mngmt/webinterface/computers/menuposition_down.php b/ldap-site-mngmt/webinterface/computers/menuposition_down.php new file mode 100644 index 00000000..53e82a21 --- /dev/null +++ b/ldap-site-mngmt/webinterface/computers/menuposition_down.php @@ -0,0 +1,42 @@ +<?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 |