X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=html%2Fgetfax.php;h=374b7e25562388f96d86f7bfd7f71a9bd0d046f8;hb=dd3a1daecbd2c4e70ef5a0b65618786d9b6fd624;hp=cff889f09e357a31adfc48255227d8f84ef13914;hpb=e299f0ca47a924516f2afbe4e922f2418b75315c;p=gosa.git diff --git a/html/getfax.php b/html/getfax.php index cff889f09..374b7e255 100644 --- a/html/getfax.php +++ b/html/getfax.php @@ -26,16 +26,16 @@ session_start (); /* Logged in? Simple security check */ if (!isset($_SESSION['ui'])){ - gosa_log ("Error: getfax.php called without session"); - header ("Location: ../index.php"); + new log("security","faxreport/faxreport","",array(),"Error: getfax.php called without session") ; + header ("Location: index.php"); exit; } $ui= $_SESSION["ui"]; /* User object present? */ -if (!isset($_SESSION['userfilter'])){ - gosa_log ("Error: getfax.php called without propper session data"); - header ("Location: ../index.php"); +if (!isset($_SESSION['fuserfilter'])){ + new log("security","faxreport/faxreport","",array(),"getfax.php called without propper session data") ; + header ("Location: index.php"); exit; } @@ -59,7 +59,7 @@ mysql_select_db("gofax") or die(_("Could not select database!")); $query = "SELECT id,uid FROM faxlog WHERE id = '".validate(stripcslashes($_GET['id']))."'"; $result = mysql_query($query) or die(_("Database query failed!")); $line = mysql_fetch_array($result, MYSQL_ASSOC); -if (!preg_match ("/'".$line["uid"]."'/", $_SESSION['userfilter'])){ +if (!preg_match ("/'".$line["uid"]."'/", $_SESSION['fuserfilter'])){ die ("No permissions to view fax!"); } @@ -101,22 +101,22 @@ if (!isset($_GET['download'])){ /* Loading image */ if(!$handle = imagick_blob2image($data)) { - gosa_log("Can't Load image"); + new log("view","faxreport/faxreport","",array(),"Can't load fax image") ; } /* Converting image to PNG */ if(!imagick_convert($handle,"PNG")) { - gosa_log("Can't Convert to PNG"); + new log("view","faxreport/faxreport","",array(),"Can't convert fax image to png") ; } /* Resizing image to 420x594 and blur */ if(!imagick_resize($handle,420,594,IMAGICK_FILTER_GAUSSIAN,1)){ - gosa_log("imagick_resize failed"); + new log("view","faxreport/faxreport","",array(),"Can't resize fax image") ; } /* Creating binary Code for the Image */ if(!$data = imagick_image2blob($handle)){ - gosa_log("Can't create blob for image"); + new log("view","faxreport/faxreport","",array(),"Reading fax image image failed") ; } }