2003-12-20 15:36:28 +01:00
|
|
|
<?php
|
|
|
|
include("commonhead.php");
|
|
|
|
?>
|
2003-12-20 14:47:49 +01:00
|
|
|
<div>
|
2003-12-20 15:36:28 +01:00
|
|
|
<table class="userhead">
|
2003-12-20 14:47:49 +01:00
|
|
|
<tr><td>
|
|
|
|
<img src="images/gnu.png" width="45" height="43" alt="small GNU head"/>
|
|
|
|
</td><td>
|
|
|
|
<p>
|
|
|
|
<?php
|
2004-03-08 18:42:14 +01:00
|
|
|
require_once("usertypes.php");
|
2003-12-20 14:47:49 +01:00
|
|
|
|
|
|
|
$query=sprintf("SELECT name, type, client FROM sysuser WHERE id=%d",
|
|
|
|
$_SESSION["userid"]);
|
|
|
|
$result=pg_query($dbh, $query);
|
|
|
|
$row=pg_fetch_array($result);
|
|
|
|
printf(_("Logged in as %s (%s)"), $row["name"],
|
|
|
|
get_usertype_name($row["type"]));
|
|
|
|
|
|
|
|
print("<br/>");
|
2003-12-20 15:23:33 +01:00
|
|
|
$_SESSION["client"]=$row["client"];
|
2003-12-20 14:47:49 +01:00
|
|
|
|
|
|
|
$query=sprintf("SELECT client.*, country.name AS cname FROM client, country WHERE client.id=%d AND country.id=client.country", $row["client"]);
|
|
|
|
$result=pg_query($dbh, $query);
|
|
|
|
$row=pg_fetch_array($result);
|
|
|
|
printf("%s %s, %s %s, %s %s, %s %s", $row["firstname"], $row["lastname"],
|
|
|
|
$row["address1"], $row["address2"], $row["zipcode"], $row["town"],
|
|
|
|
$row["state"], $row["cname"]);
|
|
|
|
?>
|
|
|
|
</p></td></tr></table>
|
|
|
|
</div>
|