<?php
/* +----------------------------------------------------------------------+
| Netautor Professional Application Server |
+----------------------------------------------------------------------+
| Copyright (C) 1998-2005 digiconcept GmbH. <www.digiconcept.net> |
+----------------------------------------------------------------------+
| This file is subject to license, that is bundled with this package |
| in the file LICENSE.TXT, and is available at through the |
| world-wide-web at http://www.netautor.com/license/ |
| |
| If you did not receive a copy of the license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| hide@address.com so we can mail you a copy. |
+----------------------------------------------------------------------+
| Authors: Stefan Rottensteiner <hide@address.com> |
| Marek Kadziela <hide@address.com> |
| Gregor Wollner |
| Christian Unger |
| Helli Kleinhans |
+----------------------------------------------------------------------+
| @version $Revision: 1.15 $ |
+----------------------------------------------------------------------+*/
/**
* Search for user accounts and groups
* @author Marek kadziela
* @author Stefan Rottensteiner
*/
require_once('../../include/init.inc');
if(!$GLOBALS['USER']->check_feature('Admin') && !$GLOBALS['USER']->check_feature('ac_user'))
{
$GLOBALS['USER']->login_call();
}
$GLOBALS['LOCALE']->textdomain('user');
/**
*
*/
function init()
{
return array( 'name'=>'','remark'=>'');
}
/**
*
*/
function showList($data)
{
if(empty($data)) return;
foreach($data as $gid => $werte)
{ ?>
<tr class="bglistgrey">
<td align="left" valign="top" class="text">
<a
href ="usermanager.php?user_id=<?php echo($werte['user_id']);?>"
target ="user_main"
class ="link"
onClick ="javascript:parent.document.getElementById('f_editor').rows='*,24,24';top.scrollFrames('user_search,user_groups');"
><?php echo($werte['user_name'])?></a><br>
</td>
<td align="left" valign="top" class="text">
<?php echo($werte['user_remark'])?><br>
</td>
<td align="right" valign="top" class="text">
<a
href ="usermanager.php?user_id=<?php echo($werte['user_id']);?>"
target ="user_main"
class ="link"
onClick ="javascript:parent.document.getElementById('f_editor').rows='*,24,24';top.scrollFrames('user_search,user_groups');"
>edit »</a><br>
</td>
</tr>
<?php }
}
if(!empty($new))
{
$user = init();
}
if(!empty($search))
{
$where = '';
if(!empty($user['name']))
$where.=" AND user_name like '%{$user['name']}%' ";
if(!empty($user['remark']))
$where.=" AND user_name like '%{$user['remark']}%' ";
$werte[] = 'user_name';
$werte[] = 'user_remark';
$glist = groups::getGroupList( $sql_world,$where,$werte);
$ulist = users::getUserList( $sql_world,$where,$werte);
}
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>digiconcept/netautor/user search</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta name="robots" content="noindex">
<link href="../../include/netautor.css" rel="stylesheet" type="text/css">
</head>
<body class="grey">
<table width="520" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="457" align="left" valign="center" class="text">
<img src="../../grafik/pixel.gif" width="457" height="4"><br>
<img src="../../grafik/pixel.gif" width="4" height="1">
<a href="#"
class="text"
onClick="javascript:parent.document.getElementById('f_editor').rows='10,*,24';top.scrollFrames('user_groups');"><?php echo( $GLOBALS['LOCALE']->gettext('search_title') );?></a><br>
</td>
<td width="63" align="left" valign="top">
<img src="../../grafik/updown_grey.gif" width="63" height="21" border="0" usemap="#updown"><br>
<map name="updown">
<area shape="circle" coords="12,9,9" href="#" onClick="javascript:parent.document.getElementById('f_editor').rows='10,*,24';top.scrollFrames('user_groups');">
<area shape="circle" coords="50,9,9" href="#" onClick="javascript:parent.document.getElementById('f_editor').rows='*,24,24';top.scrollFrames('user_search,user_groups');">
</map>
</td>
</tr>
</table>
<table width="975" border="0" cellspacing="0" cellpadding="4">
<form method="post" action="user_search.php">
<tr>
<td width="370" align="left" valign="top" class="head">
<?php echo( $GLOBALS['LOCALE']->gettext('groups') );?><br>
<img src="../../grafik/pixel.gif" width="362" height="12"><br>
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td align="left" valign="top" class="textgrey">
<?php echo( $GLOBALS['LOCALE']->gettext('name') );?><br>
</td>
<td align="left" valign="top" class="textgrey">
<?php echo( $GLOBALS['LOCALE']->gettext('remark') );?><br>
</td>
<td align="left" valign="top" class="textgrey">
<br>
</td>
</tr>
<?php
showList($glist);
?>
</table>
</td>
<td width="15"></td>
<td width="370" align="left" valign="top" class="head">
<?php echo( $GLOBALS['LOCALE']->gettext('user') );?><br>
<img src="../../grafik/pixel.gif" width="362" height="12"><br>
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td align="left" valign="top" class="textgrey">
<?php echo( $GLOBALS['LOCALE']->gettext('name') );?><br>
</td>
<td align="left" valign="top" class="textgrey">
<?php echo( $GLOBALS['LOCALE']->gettext('remark') );?><br>
</td>
<td align="left" valign="top" class="textgrey">
<br>
</td>
</tr>
<?php
showList($ulist);
?>
</table>
</td>
<td width="10"></td>
<td width="210" align="left" valign="top" class="head">
<?php echo( $GLOBALS['LOCALE']->gettext('searchWhat') );?><br>
<img src="../../grafik/pixel.gif" width="202" height="12"><br>
<span class="text">
<?php echo( $GLOBALS['LOCALE']->gettext('name') );?><br>
<input type="text" name="user[name]" value="<?php echo($user['name']);?>" class="select202"><br>
<img src="../../grafik/pixel.gif" width="1" height="4"><br>
<?php echo( $GLOBALS['LOCALE']->gettext('remark') );?><br>
<input type="text" name="user[remark]" value="<?php echo($user['remark']);?>" class="select202"><br>
<img src="../../grafik/spacer_grey.gif" width="202" height="15"><br>
</span>
<input type="submit" name="search" value="<?php echo( $GLOBALS['LOCALE']->gettext('search') ); ?>" class="create">
<input type="submit" name="new" value="<?php echo( $GLOBALS['LOCALE']->gettext('new') ); ?>" class="new"><br>
</td>
</tr>
<tr>
<td width="370" ><img src="../../grafik/pixel.gif" width="362" height="1"><br></td>
<td width="15" ><img src="../../grafik/pixel.gif" width="7" height="1"><br></td>
<td width="370" ><img src="../../grafik/pixel.gif" width="362" height="1"><br></td>
<td width="10" ><img src="../../grafik/pixel.gif" width="2" height="1"><br></td>
<td width="210" ><img src="../../grafik/pixel.gif" width="202" height="1"><br></td>
</tr>
</table>
<br>
</form>
</body>
</html>