switch($dbtype) {
case 'MYSQL' :
include_once "unimar.php";
- $STR="unimar.php included";
break;
case 'POSTGRESQL' :
include_once "unipos.php";
- $STR="unipos.php included";
break;
default :
- $daterr="Database type <".$dbtype."> is unexpected!";
+ $daterr="Connect Database, type <".$dbtype."> is unexpected!";
throw new ErrorException($daterr);
break;
}
-return $STR;
}
+function sql_close()
+
+{
+$dbtype=getenv("DB_TYPE");
+switch($dbtype) {
+ case 'MYSQL' :
+ break;
+ case 'POSTGRESQL' :
+ break;
+ default :
+ $daterr="Close Database, type <".$dbtype."> is unexpected!";
+ throw new ErrorException($daterr);
+ break;
+ }
+}
?>
$dbtype=getenv("DB_TYPE");
$dbport=getenv("DB_PORT");
$mode=sql_connect();
+$ferme=sql_close();
$STR = <<<EOT
</FONT></STRONG></CENTER>
</FONT></STRONG></CENTER>
$footer
+$ferme
</BODY>
</HTML>
EOT;