This commit is contained in:
Andreas Österreicher
2007-12-18 08:33:01 +00:00
parent 45f7ea4def
commit 37a58175fb
2 changed files with 24 additions and 4 deletions
+23 -3
View File
@@ -25,6 +25,7 @@ require_once('../vilesci/config.inc.php');
require_once('../include/functions.inc.php');
require_once('../include/person.class.php');
require_once('../include/benutzerberechtigung.class.php');
require_once('../include/akte.class.php');
$PHP_SELF = $_SERVER['PHP_SELF'];
echo "<html><body>";
@@ -96,10 +97,29 @@ if(isset($_POST['submitbild']))
//groesse auf maximal 827x1063 begrenzen
resize($filename, 827, 1063);
//im Dateisystem speichern
if(!copy($filename, IMAGE_PATH.$_GET['person_id'].'.jpg'))
$fp = fopen($filename,'r');
//auslesen
$content = fread($fp, filesize($filename));
fclose($fp);
$akte = new akte($conn);
$akte->dokument_kurzbz = 'Lichtbil';
$akte->person_id = $_GET['person_id'];
$akte->inhalt = strhex($content);
$akte->mimetype = "image/jpg";
$akte->erstelltam = date('Y-m-d H:i:s');
$akte->gedruckt = false;
$akte->titel = "Lichtbild_".$_GET['person_id'].".jpg";
$akte->bezeichnung = "Lichtbild gross";
$akte->updateamum = date('Y-m-d H:i:s');
$akte->updatevon = $user;
$akte->insertamum = date('Y-m-d H:i:s');
$akte->insertvon = $user;
$akte->uid = '';
if(!$akte->save(true))
{
die( 'copy failed:'.IMAGE_PATH.$_GET['person_id'].'.jpg');
echo "<b>Fehler: $akte->errormsg</b>";
}
//groesse auf maximal 101x130 begrenzen
+1 -1
View File
@@ -28,7 +28,7 @@ header("Pragma: no-cache");
header("Content-type: application/xhtml+xml");
// xml
if(isset($_GET['xmlformat']) && $_GET['xmlformat']=='xml')
echo '<?xml version="1.0" encoding="ISO-8859-9" standalone="yes"?>';
echo '<?xml version="1.0" encoding="ISO-8859-15" standalone="yes"?>';
else
echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
// DAO