mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
- Anpassung FAS und Tempus an Datenbankklasse
- Entfernung des alten FAS-Prototypen-Moduls
This commit is contained in:
+5
-7
@@ -22,7 +22,8 @@
|
||||
// Holt den Hexcode eines Bildes aus der DB wandelt es in Zeichen
|
||||
// um und gibt das ein Bild zurueck.
|
||||
// Aufruf mit <img src='bild.php?src=frage&frage_id=1
|
||||
require_once('../vilesci/config.inc.php');
|
||||
require_once('../config/vilesci.config.inc.php');
|
||||
require_once('../include/basis_db.class.php');
|
||||
|
||||
//Hexcode in String umwandeln
|
||||
function hexstr($hex)
|
||||
@@ -33,10 +34,6 @@ function hexstr($hex)
|
||||
return $string;
|
||||
}
|
||||
|
||||
//Connection Herstellen
|
||||
if(!$conn = pg_pconnect(CONN_STRING))
|
||||
die('Fehler beim oeffnen der Datenbankverbindung');
|
||||
|
||||
//Hex Dump aus der DB holen
|
||||
$qry = '';
|
||||
if(isset($_GET['src']) && $_GET['src']=='person' && isset($_GET['person_id']))
|
||||
@@ -48,11 +45,12 @@ else
|
||||
|
||||
if($qry!='')
|
||||
{
|
||||
$db = new basis_db();
|
||||
//Header fuer Bild schicken
|
||||
header("Content-type: image/gif");
|
||||
$result = pg_query($conn, $qry);
|
||||
$db->db_query($qry);
|
||||
//HEX Werte in Zeichen umwandeln und ausgeben
|
||||
if($row = pg_fetch_object($result))
|
||||
if($row = $db->db_fetch_object())
|
||||
echo hexstr($row->foto);
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user