blob: 53e82a21838afb6a5fa2914f71ae129ad89f8ef8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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);
?>
|