Your IP : 216.73.217.64


Current Path : /home3/gp97/capidocs.97gp.net/php/
Upload File :
Current File : //home3/gp97/capidocs.97gp.net/php/users_admin.php

<?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_admin.php 29 2009-11-26 07:02:26Z chantal $ */

$admin = 1;

require_once ("common.php");

if (isset($_GET["adminConfig"]))
	$error = _l("The configuration has been successfully updated");

$title = _l("Users managment");

require_once ("head.php");

?>
<p style="display: inline"><br /></p>
<h1><?php __l("Users Administration") ?></h1>
<?php

if (!empty($error)) 
	echo "<p class=\"error\">" . $error . "</p>";

$listUsers = $doc->listUsers();

if (!empty($listUsers))
{
	$nbUsers = count($listUsers);
?>
<div id="listUsers">
<table cellpadding="4" cellspacing="0" class="center" border="1">
	<tr>
		<th><?php __l("Action") ?></th>
		<th><?php __l("Login") ?></th>
		<th><?php __l("Email") ?></th>
		<th><?php __l("Last Login") ?></th>
		<th><?php __l("Admin") ?></th>
		<th><?php __l("Can change<br />password") ?></th>
	</tr>
<?php

for ($i = 0; $i < $nbUsers; $i++)
{
?>
	<tr>
		<td><a href="users_edit.php?user=<?php echo $listUsers[$i]["id_user"]; ?>"><img class="vmiddle noborder" src="<?php echo $pngPath; ?>edit.png" alt="<?php __l("Edit"); ?>" /></a>&nbsp;<?php	if ($_SESSION["Sid_user"] != $listUsers[$i]["id_user"]) { ?><a href="users_del.php?user=<?php echo $listUsers[$i]["id_user"]; ?>"><img class="vmiddle noborder" src="<?php echo $pngPath; ?>delete.png" alt="<?php __l("Delete"); ?>" /></a>&nbsp;<?php }	else { ?><img class="vmiddle noborder" src="<?php echo $pngPath; ?>nodelete.png" alt="<?php __l("Delete"); ?>" />&nbsp;<?php } ?><a href="users_rights.php?user=<?php echo $listUsers[$i]["id_user"]; ?>"><img class="vmiddle noborder" src="<?php echo $pngPath; ?>password.png" alt="<?php __l("Rights"); ?>" /></a></td>
		<td><?php echo $listUsers[$i]["user_name"]; ?></td>
		<td><?php echo $listUsers[$i]["user_mail"]; ?></td>
		<td class="center"><?php echo dateTimeMy2fr($listUsers[$i]["user_lastlogin"]); ?></td>
		<td class="center"><?php if ($listUsers[$i]["user_admin"] == 1) echo "<img class=\"vmiddle noborder\" src=\"" . $pngPath . "check.png\" alt=\"\" />"; else echo "&nbsp;"; ?></td>
		<td class="center"><?php if ($listUsers[$i]["user_ccp"] == 1) echo "<img class=\"vmiddle noborder\" src=\"" . $pngPath . "check.png\" alt=\"\" />"; else echo "&nbsp;"; ?></td>
	</tr>
<?php } ?>
</table>
</div>
<?php

}
else
	echo "<p class=\"error\">" . _l("There is no user for now !") . "</p>";

?>
<p style="display: inline"><br /></p>
<table style="width: 70%" cellpadding="1" cellspacing="0" class="center">
	<tr>
		<td class="center"><img class="vmiddle noborder" src="<?php echo $pngPath; ?>user.png" alt="<?php __l("Add a user") ?>" />&nbsp;<a href="users_add.php"><?php __l("Add a user") ?></a></td>
		<td class="center"><img class="vmiddle noborder" src="<?php echo $pngPath; ?>admin.png" alt="<?php __l("Main configuration") ?>" />&nbsp;<a href="admin_config.php"><?php __l("Main configuration") ?></a></td>
		<td class="center"><img class="vmiddle noborder" src="<?php echo $pngPath; ?>folder.png" alt="<?php __l("Back to the Document Manager") ?>" />&nbsp;<a href="browser.php"><?php __l("Back to the Document Manager") ?></a></td>
	</tr>
</table>
<?php require_once ("foot.php"); ?>