index 374b7e25562388f96d86f7bfd7f71a9bd0d046f8..a9fa7a212b0ae28397329d661c24fbaca221032a 100644 (file)
<?php
/*
- This code is part of GOsa (https://gosa.gonicus.de)
- Copyright (C) 2003 Cajus Pollmeier
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id$$
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* Basic setup, remove eventually registered sessions */
@require_once ("../include/php_setup.inc");
@require_once ("functions.inc");
error_reporting (0);
-session_start ();
+session::start();
+session::set('errorsAlreadyPosted',array());
/* Logged in? Simple security check */
-if (!isset($_SESSION['ui'])){
+if (!session::is_set('ui')){
new log("security","faxreport/faxreport","",array(),"Error: getfax.php called without session") ;
header ("Location: index.php");
exit;
}
-$ui= $_SESSION["ui"];
+$ui= session::is_set("ui");
/* User object present? */
-if (!isset($_SESSION['fuserfilter'])){
+if (!session::is_set('fuserfilter')){
new log("security","faxreport/faxreport","",array(),"getfax.php called without propper session data") ;
header ("Location: index.php");
exit;
/* Get loaded servers */
foreach (array("FAX_SERVER", "FAX_LOGIN", "FAX_PASSWORD") as $val){
- if (isset ($_SESSION[$val])){
- $$val= $_SESSION[$val];
+ if (session::is_set($val)){
+ $$val= session::get($val);
}
}
/* Load fax entry */
-$config= $_SESSION['config'];
+$config= session::get('config');
$cfg= $config->data['SERVERS']['FAX'];
$link = mysql_pconnect($cfg['SERVER'], $cfg['LOGIN'], $cfg['PASSWORD'])
or die(_("Could not connect to database server!"));
$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['fuserfilter'])){
+if (!preg_match ("/'".$line["uid"]."'/", session::get('fuserfilter'))){
die ("No permissions to view fax!");
}