Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 441c44b9fc5fe140a3810dcf6ef1a35c > files > 16

kolab-webadmin-3.0.5-4.mga4.noarch.rpm

#!/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 `role_types`");

    $attributes = Array(
            "auto_form_fields" => Array(
                ),
            "fields" => Array(
                    "objectclass" => Array(
                            "top",
                            "ldapsubentry",
                            "nsroledefinition",
                            "nssimpleroledefinition",
                            "nsmanagedroledefinition"
                        ),
                ),
            "form_fields" => Array(
                    "cn" => Array(),
                    "description" => Array(),
                ),
        );

    $result = $db->query("INSERT INTO `role_types` (`key`, `name`, `description`, `attributes`) " .
                "VALUES ('simple_managed','Standard Role', 'A standard role definition'," .
                "'" . json_encode($attributes) . "')");

?>