1
0
Fork 0

adapt to real environment

git-svn-id: file:///home/www/usr01/svn/gnuviechadmin/gnuviech.info/gnuviechadmin/trunk@33 a67ec6bc-e5d5-0310-a910-815c51eb3124
This commit is contained in:
Jan Dittberner 2004-05-10 19:46:56 +00:00
parent 2641ac4f10
commit f6ca9aa8a1
5 changed files with 23 additions and 19 deletions

View file

@ -30,7 +30,7 @@ function country_selbox($varname, $default=0) {
global $dbh;
$result=db_query($dbh, "SELECT * FROM country ORDER BY name");
printf("<SELECT name=\"%s\">", $varname);
while ($row=pg_fetch_array($result)) {
while ($row=db_fetch_array($result)) {
printf("<OPTION value=\"%d\"%s>%s</OPTION>",
$row["id"], ($row["id"]==$default) ? " selected" : "",
$row["name"]);
@ -45,7 +45,7 @@ function client_selbox($varname, $default=0) {
"WHERE cl.country=co.id ORDER BY cl.firstname, ".
"cl.lastname");
printf("<SELECT name=\"%s\">", $varname);
while ($row=pg_fetch_array($result)) {
while ($row=db_fetch_array($result)) {
printf("<OPTION value=\"%d\"%s>%s %s (%s, %s)</OPTION>",
$row["id"], ($row["id"]==$default) ? " selected" : "",
$row["firstname"], $row["lastname"], $row["town"],
@ -182,4 +182,4 @@ default: ?>
You are trying to trick me. I don't like this
<?php endswitch; ?>
</body>
</html>
</html>