Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117882085
sample-insert-ou_types.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
sample-insert-ou_types.php
View Options
#!/usr/bin/php
<?php
if
(
isset
(
$_SERVER
[
"REQUEST_METHOD"
])
&&
!
empty
(
$SERVER
[
"REQUEST_METHOD"
]))
{
die
(
"Not intended for execution through the webserver, sorry!"
);
}
require_once
(
"lib/functions.php"
);
$db
=
SQL
::
get_instance
();
$result
=
$db
->
query
(
"TRUNCATE TABLE `ou_types`"
);
$attributes
=
Array
(
"auto_form_fields"
=>
Array
(
),
"fields"
=>
Array
(
"objectclass"
=>
Array
(
"top"
,
"organizationalunit"
,
),
),
"form_fields"
=>
Array
(
"ou"
=>
Array
(),
"description"
=>
Array
(
"optional"
=>
true
,
),
),
);
$result
=
$db
->
query
(
"INSERT INTO `ou_types` (`key`, `name`, `description`, `attributes`) "
.
"VALUES ('simple_managed','Standard Organizational Unit', 'A standard organizational unit definition',"
.
"'"
.
json_encode
(
$attributes
)
.
"')"
);
?>
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Apr 6, 12:18 AM (1 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18805266
Default Alt Text
sample-insert-ou_types.php (1 KB)
Attached To
Mode
rWAP webadmin
Attached
Detach File
Event Timeline