From f6ca9aa8a178248bea61634f4f59852023ac4944 Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Mon, 10 May 2004 19:46:56 +0000 Subject: [PATCH] adapt to real environment git-svn-id: file:///home/www/usr01/svn/gnuviechadmin/gnuviech.info/gnuviechadmin/trunk@33 a67ec6bc-e5d5-0310-a910-815c51eb3124 --- php/domainlist.php | 8 ++++---- php/setup.php | 6 +++--- php/start.php | 6 +++--- php/tools.php | 12 ++++++++---- php/userhead.php | 10 +++++----- 5 files changed, 23 insertions(+), 19 deletions(-) diff --git a/php/domainlist.php b/php/domainlist.php index 36f4c8a..0ab76dc 100644 --- a/php/domainlist.php +++ b/php/domainlist.php @@ -10,9 +10,9 @@ include("domainstatustypes.php"); " . _("You don't have any domains registered.") . "

"); } @@ -20,7 +20,7 @@ else { print("

" . _("Here is a list of your currently registered domains.") . "

"); printf("", _("Domain name"), _("Status")); - while ($row=pg_fetch_array($result)) { + while ($row=db_fetch_array($result)) { printf("", $row["domainname"], get_domainstatustype_name($row["status"])); } @@ -31,4 +31,4 @@ else { \ No newline at end of file +?> diff --git a/php/setup.php b/php/setup.php index 00af044..9b5b8d5 100644 --- a/php/setup.php +++ b/php/setup.php @@ -30,7 +30,7 @@ function country_selbox($varname, $default=0) { global $dbh; $result=db_query($dbh, "SELECT * FROM country ORDER BY name"); printf("", $varname); - while ($row=pg_fetch_array($result)) { + while ($row=db_fetch_array($result)) { printf("", $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 - \ No newline at end of file + diff --git a/php/start.php b/php/start.php index 2b2e3b1..19f1ef2 100644 --- a/php/start.php +++ b/php/start.php @@ -10,7 +10,7 @@ $query = "SELECT * FROM sysuser WHERE name='$username' AND md5pass='$password'"; //echo $query; $result = db_query($dbh, $query) or die("query failed"); -if (pg_num_rows($result) == 0) { +if (db_num_rows($result) == 0) { $logged_in = false; authenticate(); echo $_SERVER['PHP_AUTH_USER']; @@ -18,7 +18,7 @@ if (pg_num_rows($result) == 0) { } else { $logged_in = true; session_start(); - $row=pg_fetch_array($result); + $row=db_fetch_array($result); $_SESSION["userid"]=$row["id"]; } @@ -42,4 +42,4 @@ if (! $logged_in) { \ No newline at end of file +?> diff --git a/php/tools.php b/php/tools.php index 45d369d..131e45c 100644 --- a/php/tools.php +++ b/php/tools.php @@ -1,6 +1,6 @@ "); $_SESSION["client"]=$row["client"]; $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); +$result=db_query($dbh, $query); +$row=db_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"]); ?>

%s%s
%s%s
- \ No newline at end of file +