Location: PHPKode > projects > Phpqadmin > phpqadmin-0.4/show_company.php
<?php

require_once('include/functions.php');
@include('include/top.php');

$company = $_GET['company'];

if (!is_company($company))
	echo "<b>New company</b>\n";

if (is_company($company))
{
  $users = get_users($company);
  echo '<table>';
  foreach ($users as $k => $v)
  {
  	$user = $v['ID'];
  	echo "<tr>";
  	echo "<td valign=top><pre>[<a href=show_user.php?company={$company}&user={$user}>{$user}</a>]</pre></td>";
  	echo "<td><pre>";
	if (is_user_mailinglist($company,$user))
	{
		echo '<b>Mailinglist</b>';
	}
	else
	{
    	$aliases = get_user_aliases($company,$user);
    	foreach($aliases as $ak => $av)
    	{
    		$av = trim($av);
    		switch(substr($av,0,1))
    		{
    			case '+':
    				echo substr($av,1)."*\n";
    				break;
    			default:
    				echo substr($av,1)."\n";
    		}
    	}
	}
	echo "</pre></td>";
  	echo "</tr>";
  }
  echo '</table>';
  echo "\n\n<a href=show_user.php?company={$company}&user=>create new user</a>\n";
}
	
?>

<form action="update_company.php" method="POST"><?php
if (!is_company($company)) echo("Name:\n");
?>
<input type="<?php echo((is_company($company))?'hidden':'text');?>" name="company" value="<?php echo($company);?>">
Domains:
<textarea name="domains" rows=5 cols=30><?php echo(join(get_company_domains($company),"\n"));?></textarea>
Password:
<input type="password" name="password">
<input type="submit" value="Save">
</form>
<?php
@include('include/bottom.php');
?>
Return current item: Phpqadmin