index daa16de6eb6cfb62aea7b6bd3a2f7475f725d965..d2c2b75ecdb22297666d6e0892594e80e5c1a775 100644 (file)
@require_once ("../include/php_setup.inc");
@require_once ("functions.inc");
error_reporting (0);
-session_start ();
+session::start();
/* Logged in? Simple security check */
-if (!isset($_SESSION['ui'])){
+if (!session::is_set('ui')){
new log("security","unknown","",array(),"Error: getbin.php called without session") ;
header ("Location: index.php");
exit;
header("Cache-Control: no-cache");
header("Pragma: no-cache");
header("Cache-Control: post-check=0, pre-check=0");
-$bintype = isset($_SESSION['binarytype'])
- ? $_SESSION['binarytype'] : "octet-stream";
+$bintype = session::is_set('binarytype')
+ ? session::get('binarytype') : "octet-stream";
header("Content-type: " . $bintype);
-if (isset($_SESSION['binaryfile'])) {
+if (session::is_set('binaryfile')) {
header( "Content-disposition: attachment; filename="
- . $_SESSION['binaryfile'] );
+ . session::get('binaryfile'));
}
-echo $_SESSION['binary'];
+echo session::get('binary');
error_reporting (E_ALL | E_STRICT);
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: