-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdhcp3_edit_attributes.php
More file actions
72 lines (61 loc) · 1.74 KB
/
Copy pathdhcp3_edit_attributes.php
File metadata and controls
72 lines (61 loc) · 1.74 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
// edit attributes of all users of the domain
// $Id: dhcp3_edit_attributes.php,v 1.1 2007-09-13 17:50:21 turbo Exp $
//
// {{{ Setup session etc
require("./include/pql_session.inc");
require($_SESSION["path"]."/include/pql_config.inc");
require($_SESSION["path"]."/include/config_plugins.inc");
$_pql = new pql($_SESSION["USER_HOST"], $_SESSION["USER_DN"], $_SESSION["USER_PASS"]);
$url["domain"] = pql_format_urls($_REQUEST["domain"]);
$url["rootdn"] = pql_format_urls($_REQUEST["rootdn"]);
include($_SESSION["path"]."/header.html");
// }}}
// {{{ Forward back to users detail page
function attribute_forward($msg) {
global $url;
$link = "domain_detail.php?rootdn=" . $url["rootdn"]
. "&domain=" . $url["domain"]
. "&view=" . $_REQUEST["view"] . "&msg=$msg";
pql_header($link);
}
// }}}
include($_SESSION["path"]."/include/attrib.dhcp3.inc");
// {{{ Get the organization name, or the DN if it's unset
$orgname = $_pql->get_attribute($_REQUEST["domain"], pql_get_define("PQL_ATTR_O"));
if(!$orgname) {
$orgname = urldecode($_REQUEST["domain"]);
}
if(is_array($orgname)) {
$orgname = $orgname[0];
}
$_REQUEST["orgname"] = $orgname;
// }}}
?>
<span class="title1"><?php echo pql_complete_constant($LANG->_('Change %what% for domain %domain%'), array('what' => $LANG->_('DHCP value'), 'domain' => $_REQUEST["orgname"])); ?>
</span>
<br><br>
<?php
if(@$_REQUEST["submit"]) {
if(attribute_check())
attribute_save($_REQUEST["action"]);
else
attribute_print_form($_REQUEST["data"]);
} elseif($_REQUEST["action"] == "delete") {
attribute_save($_REQUEST["action"]);
} else {
attribute_print_form($_REQUEST["data"]);
}
?>
</body>
</html>
<?php
pql_flush();
/*
* Local variables:
* mode: php
* mode: font-lock
* tab-width: 4
* End:
*/
?>