Your IP : 216.73.217.64
<?php
/* *************************************************
*
* Document Manager (C) 2002-2010
* Version 4 - dmanager MySQL
* Benjamin Sonntag <benjamin@sonntag.fr>
* Chantal Bernard-Putz <chantal@bernard-putz.net>
* Franck Denis
* This software is protected by copyright laws,
* please read the file COPYRIGHT
* This software is provided as is with no warranty.
*
************************************************* */
/* $Id: users_doadd.php 29 2009-11-26 07:02:26Z chantal $ */
$admin = 1;
require_once("common.php");
$fields = array (
"loginForm" => array ("post", "string", ""),
"passForm" => array ("post", "string", ""),
"email" => array ("post", "string", ""),
"r5" => array ("post", "integer", 0),
"r6" => array ("post", "integer", 0),
"drights" => array ("post", "integer", 0),
"druser" => array ("post", "integer", 0),
"createone" => array ("post", "string", ""),
"createmany" => array ("post", "string", ""),
);
getFields($fields);
if (!$createone && !$createmany)
{
header ("Location: users_add.php");
exit();
}
$title = _l("Users managment");
if (!$loginForm || !$passForm)
{
$error = _l("Login and password are mandatory");
include ("users_add.php");
exit();
}
else
{
if (!$doc->addUser($loginForm, $passForm, $r5, $r6, $email, $drights, $druser))
{
$error = $doc->errstr();
include ("users_add.php");
exit();
}
else
{
$error = _l("User has been successfully created");
if ($createmany)
{
unset($_POST);
include("users_add.php");
}
else
include("users_admin.php");
exit();
}
}
?>