From: hickert Date: Wed, 23 Jan 2008 09:10:19 +0000 (+0000) Subject: Removed getkiosk.php. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9ac9c02788d8310287e8f01dc2c52824f35a7944;p=gosa.git Removed getkiosk.php. -Downloads will now be started directly in the service plugin. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8552 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/html/getkiosk.php b/gosa-core/html/getkiosk.php deleted file mode 100644 index 183932d3b..000000000 --- a/gosa-core/html/getkiosk.php +++ /dev/null @@ -1,84 +0,0 @@ -get_module_departments("server/goKioskService"); -$found = FALSE; -foreach($tmp as $dir){ - if(preg_match("/r/",$ui->get_permissions($dir,"server/goKioskService"))){ - $found = TRUE; - break; - } -} -if(!$found){ - header ("Location: index.php"); - exit; -} -$dir= $config->search('environment', 'kioskpath', array('tabs','menu')); -getkiosk($dir."/".$_GET['id']); - -// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: -?> diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index d04c19ce9..80552801c 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -2614,6 +2614,24 @@ function remove_objectClass($classes, &$attrs) } } +/*! \brief Initialize a file download with given content, name and data type. + * @param data String The content to send. + * @param name String The name of the file. + * @param type String The content identifier, default value is "application/octet-stream"; + */ +function send_binary_content($data,$name,$type = "application/octet-stream") +{ + header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); + header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + header("Cache-Control: no-cache"); + header("Pragma: no-cache"); + header("Cache-Control: post-check=0, pre-check=0"); + header("Content-type: ".$type.""); + header("Content-Disposition: attachment; filename=".$name); + echo $data; + exit(); +} + function display_error_page() {