Code

Updated Kiosk handling.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 23 Jan 2008 09:09:09 +0000 (09:09 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 23 Jan 2008 09:09:09 +0000 (09:09 +0000)
- Download will be triggered directly now, getkiosk.php will be removed now.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8551 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/services/kiosk/class_goKioskService.inc

index 287ed9e36a45a6fc36168300502cce8c48f3ac37..7b15b7946e7bcd56a343493fca418d9bcaac01cd 100644 (file)
@@ -78,6 +78,22 @@ class goKioskService extends goService{
     $smarty= get_smarty();
     $display= "";
 
+    /* Download kiosk profile 
+     */
+    if(isset($_GET['getkiosk'])){
+      $id = $_GET['getkiosk'];
+      foreach($this->gotoKioskProfiles as $profile){
+        if($profile['name'] == $id){
+          $name = $this->baseDir."/".$id;
+          if(file_exists($name)){
+            $content = file_get_contents($name);    
+            send_binary_content($content,$id);
+          }
+        }
+      }
+    }
+    
+
     /* Add new kiosk profile
      * in profile directory ($this->baseDir);
      */
@@ -148,7 +164,7 @@ class goKioskService extends goService{
     $divlist -> SetHeight (300);
     foreach($this->gotoKioskProfiles as $key => $val ){
       $divlist->AddEntry(array(
-            array("string"=>"<a target='_blank' href='getkiosk.php?id=".$val['name']."'>".$val['name']."</a>"),
+            array("string"=>"<a href='?plug=".$_GET['plug']."&getkiosk=".$val['name']."'>".$val['name']."</a>"),
             array("string"=>"<input type='image' src='images/edittrash.png'
               class='center' alt='delete' name='delkiosk_".$key."'>" ,
               "attach"=>" style='border-right: 0px;width:24px; text-align:center;' ")
@@ -165,6 +181,8 @@ class goKioskService extends goService{
     return($smarty->fetch(get_template_path("goKioskService.tpl",TRUE,dirname(__FILE__))));
   }
 
+
+
   function getListEntry()
   {
     $fields = goService::getListEntry();