From: Joey Schulze Date: Thu, 27 Dec 2001 21:19:29 +0000 (+0000) Subject: Some global routines required for the shop system (if it will be put X-Git-Url: https://git.infodrom.org/?p=infodrom.org%2Finfocon.infodrom.org;a=commitdiff_plain;h=f4734763a19eb6efc9e4bac693efd2cb584942a5;ds=sidebyside Some global routines required for the shop system (if it will be put online at some time...) --- diff --git a/Styles/shop.inc b/Styles/shop.inc new file mode 100644 index 0000000..18b11b6 --- /dev/null +++ b/Styles/shop.inc @@ -0,0 +1,79 @@ +# Datenbank-Konstanten +# Name der Haupt-Datenbank fuer diesen Bereich +# Name des Datenbankrechners +# Name des Ports des Datenbankrechners +# +infocon +kuolema +5432 + +# Generelle Konstanten +# +42 +42 +#abdcfc +#eff0f1 +#ffffff +# Status: 0=ordered, 1=processed, 2=sent, 3=paid, 4=cancelled +0 +1 +2 +3 +4 + +# Innere Tabellen (in PHP) (Feature: 1 Pixel breiter schwarzer Rahmen und etwas Abstand nach links) +echo ("

"); +echo ("
"); + + +# Datenbank-Routinen +# +# dbconnect() Verbindung zur Datenbank aufbauen +# In : / +# Out: $dbh +# dbquery() Datenbankabfrage +# In : $dbh, $query +# Out: $dbh +# +", "", "") + or die("Unable to connect to SQL server"); + + pg_exec ($dbh, "SET DateStyle = 'ISO'"); //no-error-checking or die("Unable to issue query!"); + return $dbh; + } + + function dbquery ($dbh, $query) + { + # $query = "SELECT * FROM news WHERE id = '$id'"; + # printf ("\n\n", $query); + # printf ("
%s
", $query); + $sth = pg_exec ($dbh, $query); + + return $sth; + } +?> + + + + + +# Local variables: +# mode: indented-text +# end: