Code

Updated
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 4 Mar 2008 10:22:58 +0000 (10:22 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 4 Mar 2008 10:22:58 +0000 (10:22 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9303 594d385d-05f5-0310-b6e9-bd551577e9d8

76 files changed:
gosa-plugins/goto/addons/goto/class_gotomasses.inc [new file with mode: 0644]
gosa-plugins/goto/addons/goto/class_target_list.inc [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/DaemonEvent_faireboot.tpl [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/DaemonEvent_halt.tpl [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/DaemonEvent_install.tpl [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/DaemonEvent_installation_activation.tpl [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/DaemonEvent_localboot.tpl [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/DaemonEvent_memcheck.tpl [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/DaemonEvent_notify.tpl [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/DaemonEvent_reboot.tpl [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/DaemonEvent_reinstall.tpl [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/DaemonEvent_reload_ldap_config.tpl [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/DaemonEvent_rescan.tpl [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/DaemonEvent_sysinfo.tpl [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/DaemonEvent_update.tpl [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/DaemonEvent_wakeup.tpl [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/class_DaemonEvent.inc [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/class_DaemonEvent_faireboot.inc [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/class_DaemonEvent_halt.inc [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/class_DaemonEvent_install.inc [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/class_DaemonEvent_installation_activation.inc [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/class_DaemonEvent_localboot.inc [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/class_DaemonEvent_memcheck.inc [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/class_DaemonEvent_notify.inc [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/class_DaemonEvent_reboot.inc [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/class_DaemonEvent_reinstall.inc [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/class_DaemonEvent_reload_ldap_config.inc [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/class_DaemonEvent_rescan.inc [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/class_DaemonEvent_sysinfo.inc [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/class_DaemonEvent_update.inc [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/class_DaemonEvent_wakeup.inc [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/class_EventTargetAddList.inc [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/target_list.tpl [new file with mode: 0644]
gosa-plugins/goto/addons/goto/events/timestamp_select.tpl [new file with mode: 0644]
gosa-plugins/goto/addons/goto/goto_task.tpl [new file with mode: 0644]
gosa-plugins/goto/addons/goto/gotomasses.tpl [new file with mode: 0644]
gosa-plugins/goto/addons/goto/main.inc [new file with mode: 0644]
gosa-plugins/goto/addons/goto/remove.tpl [new file with mode: 0644]
gosa-plugins/goto/addons/gotomasses/class_gotomasses.inc [deleted file]
gosa-plugins/goto/addons/gotomasses/class_target_list.inc [deleted file]
gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_faireboot.tpl [deleted file]
gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_halt.tpl [deleted file]
gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_install.tpl [deleted file]
gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_installation_activation.tpl [deleted file]
gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_localboot.tpl [deleted file]
gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_memcheck.tpl [deleted file]
gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_notify.tpl [deleted file]
gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_reboot.tpl [deleted file]
gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_reinstall.tpl [deleted file]
gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_reload_ldap_config.tpl [deleted file]
gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_rescan.tpl [deleted file]
gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_sysinfo.tpl [deleted file]
gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_update.tpl [deleted file]
gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_wakeup.tpl [deleted file]
gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent.inc [deleted file]
gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_faireboot.inc [deleted file]
gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_halt.inc [deleted file]
gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_install.inc [deleted file]
gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_installation_activation.inc [deleted file]
gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_localboot.inc [deleted file]
gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_memcheck.inc [deleted file]
gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_notify.inc [deleted file]
gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_reboot.inc [deleted file]
gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_reinstall.inc [deleted file]
gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_reload_ldap_config.inc [deleted file]
gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_rescan.inc [deleted file]
gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_sysinfo.inc [deleted file]
gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_update.inc [deleted file]
gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_wakeup.inc [deleted file]
gosa-plugins/goto/addons/gotomasses/events/class_EventTargetAddList.inc [deleted file]
gosa-plugins/goto/addons/gotomasses/events/target_list.tpl [deleted file]
gosa-plugins/goto/addons/gotomasses/events/timestamp_select.tpl [deleted file]
gosa-plugins/goto/addons/gotomasses/goto_task.tpl [deleted file]
gosa-plugins/goto/addons/gotomasses/gotomasses.tpl [deleted file]
gosa-plugins/goto/addons/gotomasses/main.inc [deleted file]
gosa-plugins/goto/addons/gotomasses/remove.tpl [deleted file]

diff --git a/gosa-plugins/goto/addons/goto/class_gotomasses.inc b/gosa-plugins/goto/addons/goto/class_gotomasses.inc
new file mode 100644 (file)
index 0000000..e1556f5
--- /dev/null
@@ -0,0 +1,766 @@
+<?php
+/*
+ * 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
+ */
+
+class gotomasses extends plugin
+{
+  /* Definitions */
+  var $plHeadline     = "System deployment";
+  var $plDescription  = "This does something";
+
+  /* attribute list for save action */
+  var $attributes= array();
+  var $objectclasses= array();
+
+  /* Queue tasks */
+  var $current        = FALSE;
+  var $dialog         = FALSE;
+  var $ids_to_remove  = array();
+  var $divlist        = NULL;
+
+  var $events         = array();
+  var $event_tags     = array();
+
+  var $sort_by  = "Schedule";
+  var $sort_dir = "down";
+  var $entries  = array();
+  var $range    = 25;
+  var $start    = 0;
+
+  function gotomasses(&$config, $dn= NULL)
+  {
+    /* Include config object */
+    $this->config= &$config;
+    $this->o_queue = new gosaSupportDaemon(TRUE,10);
+    $this->events  = DaemonEvent::get_event_types( SYSTEM_EVENT);
+
+    /* Get tags that will be used in queue searches */
+    $this->event_tags = array("none");
+    foreach($this->events['BY_CLASS'] as $evt){
+      if(isset($evt['s_Queued_Action'])){
+        $this->event_tags[] = $evt['s_Queued_Action'];
+      }
+    }
+  }
+
+
+  function execute()
+  {
+    $smarty = get_smarty();
+    /************
+     * Handle posts 
+     ************/
+    
+    $s_entry = $s_action = "";
+    $arr = array( 
+
+        "/^pause_/"           => "pause",
+        "/^resume_/"          => "resume",
+        "/^execute_process_/" => "execute_process",
+        "/^abort_process_/"   => "abort_process",
+
+        "/^prio_up_/"     => "prio_up",
+        "/^prio_down_/"   => "prio_down",
+
+        "/^edit_task_/"             =>  "edit",
+        "/^remove_task_/"           =>  "remove",
+        "/^new_task_/"              =>  "new_task");;
+
+
+    foreach($arr as $regex => $action){
+      foreach($_POST as $name => $value){
+        if(preg_match($regex,$name)){
+          $s_action = $action;
+          $s_entry  = preg_replace($regex,"",$name);
+          $s_entry  = preg_replace("/_(x|y)$/","",$s_entry);
+        }
+      }
+    }
+
+    /* Menu actions */
+    if(isset($_POST['menu_action']) && !empty($_POST['menu_action'])){
+      $s_action = $_POST['menu_action'];
+    }
+    
+    /* Edit posted from list link */
+    if(isset($_GET['act']) && $_GET['act'] == "edit" && isset($_GET['id']) && isset($this->tasks[$_GET['id']])){
+      $s_action = "edit";
+      $s_entry = $_GET['id'];
+    }
+
+
+    /************
+     * Handle Priority modifications  
+     ************/
+
+    if(preg_match("/^prio_/",$s_action)){
+      switch($s_action){
+        case 'prio_down'  : $this->update_priority($s_entry,"down");break;
+        case 'prio_up'    : $this->update_priority($s_entry,"up");break;
+      }
+    }
+
+    /************
+     * Handle pause/resume/execute modifications  
+     ************/
+
+    if(preg_match("/^resume/",$s_action) || 
+       preg_match("/^pause/",$s_action) || 
+       preg_match("/^abort_process/",$s_action) || 
+       preg_match("/^execute_process/",$s_action)){
+
+      switch($s_action){
+        case 'resume'         : $this->resume_queue_entries   (array($s_entry));break; 
+        case 'pause'          : $this->pause_queue_entries    (array($s_entry));break; 
+        case 'execute_process': $this->execute_queue_entries  (array($s_entry));break; 
+        case 'abort_process'  : $this->abort_queue_entries    (array($s_entry));break; 
+        case 'resume_all'         : $this->resume_queue_entries   ($this->list_get_selected_items());break; 
+        case 'pause_all'          : $this->pause_queue_entries    ($this->list_get_selected_items());break; 
+        case 'execute_process_all': $this->execute_queue_entries  ($this->list_get_selected_items());break; 
+        case 'abort_process_all'  : $this->abort_queue_entries    ($this->list_get_selected_items());break; 
+
+        default : trigger_error("Undefined action setting used (".$s_action.").");
+      }
+      if($this->o_queue->is_error()){
+        msg_dialog::display(_("Error"), $this->o_queue->get_error(), ERROR_DIALOG);
+      }
+    }
+
+    /************
+     * ADD 
+     ************/
+  
+    if(preg_match("/^add_event_/",$s_action)){
+      $type = preg_replace("/^add_event_/","",$s_action);
+      if(isset($this->events['BY_CLASS'][$type])){
+        $e_data = $this->events['BY_CLASS'][$type];
+        $this->dialog = new $e_data['CLASS_NAME']($this->config);
+      }
+    }
+
+    /************
+     * EDIT
+     ************/
+
+    if($s_action == "edit"){  
+      $id =  $s_entry;
+      $type = FALSE;
+      if(isset($this->entries[$id])){
+        $event = $this->entries[$s_entry];
+      
+        
+        if($event['STATUS'] == "waiting" && isset($this->events['BY_QUEUED_ACTION'][$event['HEADERTAG']])){
+          $type = $this->events['BY_QUEUED_ACTION'][$event['HEADERTAG']];
+          $this->dialog = new $type['CLASS_NAME']($this->config,$event);
+        }
+      }
+    }
+
+    /************
+     * REMOVE 
+     ************/
+
+    /* Remove multiple */
+    if($s_action == "remove_multiple" || $s_action == "remove"){
+
+      if(!$this->acl_is_removeable()){
+        msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), ERROR_DIALOG);
+      }else{
+
+        if($s_action == "remove"){
+          $ids = array($s_entry);
+        }else{
+          $ids = $this->list_get_selected_items();
+        }
+
+        if(count($ids)){
+          $ret = $this->o_queue->ids_exist($ids);
+          $ret = $this->o_queue->get_entries_by_id($ret);
+
+          $tmp = "";
+          foreach($ret as $task){
+
+            /* Only remove WAITING or ERROR entries */
+            if(in_array($task['STATUS'],array("waiting","error"))){
+              $this->ids_to_remove[] = $task['ID'];
+              if(isset($this->events['BY_QUEUED_ACTION'][$task['HEADERTAG']])){
+                $evt = $this->events['BY_QUEUED_ACTION'][$task['HEADERTAG']];
+                $tmp.= "\n".$task['ID']." - ".$evt['s_Menu_Name']."&nbsp;".$task['MACADDRESS'];
+              }else{
+                $tmp.= "\n".$task['ID']." - ".$task['HEADERTAG']."&nbsp;".$task['MACADDRESS'];
+              }
+            }
+          }
+          $smarty->assign("multiple", TRUE); 
+          $smarty->assign("info",sprintf(_("You are about to remove the following actions from the GOsa support Daemon: %s"),"<pre>".$tmp."</pre>"));
+          $this->current = $s_entry;
+          return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
+        }
+      }
+    }
+
+    /* Remove specified tasks */
+    if(count($this->ids_to_remove) && isset($_POST['delete_multiple_confirm'])){
+      $this->o_queue->remove_entries($this->ids_to_remove);
+      $this->save();
+    }
+
+    /* Remove aborted */
+    if(isset($_POST['delete_cancel'])){
+      $this->ids_to_remove = array();;
+    }
+
+
+    /************
+     * EDIT 
+     ************/
+
+    /* Close dialog */
+    if(isset($_POST['save_event_dialog'])){
+      if(is_object($this->dialog)){
+        $this->dialog->save_object();
+        if(!$this->o_queue->append($this->dialog)){
+          msg_dialog::display(_("Daemon"),sprintf(_("Something went wrong while talking to the daemon: %s."),
+                $this->o_queue->get_error()),ERROR_DIALOG);
+        }else{
+          $this->dialog = FALSE; 
+          $this->current = -1;
+        } 
+      }
+    }
+
+
+    /* Close dialog */
+    if(isset($_POST['abort_event_dialog'])){
+      $this->dialog = FALSE;
+      $this->current = -1;
+    }
+
+    /* Display dialogs if currently opened */
+    if(is_object($this->dialog)){
+      $this->dialog->save_object();
+      return($this->dialog->execute());
+    }
+
+    /************
+     * Handle Divlist 
+     ************/
+
+    $divlist = new MultiSelectWindow($this->config,"gotoMasses",array("gotomasses"));
+    $divlist->SetInformation(_("This menu allows you to remove and change the properties of GOsa tasks."));
+    $divlist->SetSummary(_("List of queued jobs"));
+    $divlist->EnableCloseButton(FALSE);
+    $divlist->EnableSaveButton(FALSE);
+    $divlist->SetHeadpageMode();
+    $s = ".|"._("Actions")."|\n";
+    $s.= "..|<img src='images/list_new.png' alt='' border='0' class='center'>&nbsp;"._("Create")."\n";
+    foreach($this->events['BY_CLASS'] as $name =>  $event){
+      $s.= "...|".$event['MenuImage']."&nbsp;".$event['s_Menu_Name']."|add_event_".$name."\n";
+    }
+    if($this->acl_is_removeable()){
+      $s.= "..|---|\n";
+      $s.= "..|<img src='images/edittrash.png' alt='' border='0' class='center'>&nbsp;"._("Remove")."|remove_multiple\n";
+    }
+    if(preg_match("/w/",$this->getacl(""))){
+      $s.= "..|---|\n";
+      $s.= "..|<img src='images/status_start.png' alt='' border='0' class='center'>&nbsp;"._("Resume all")."|resume_all\n";
+      $s.= "..|<img src='images/status_pause.png' alt='' border='0' class='center'>&nbsp;"._("Pause all")."|pause_all\n";
+      $s.= "..|<img src='images/small_error.png'  alt='' border='0' class='center'>&nbsp;"._("Abort all")."|abort_process_all\n";
+      $s.= "..|<img src='images/rocket.png'       alt='' border='0' class='center'>&nbsp;"._("Execute all")."|execute_process_all\n";
+    }
+
+    $divlist->SetDropDownHeaderMenu($s);
+
+    if($this->sort_dir == "up"){
+      $sort_img = "<img src='images/sort_up.png' alt='/\' border=0>";
+    }else{
+      $sort_img = "<img src='images/sort_down.png' alt='\/' border=0>";
+    }
+
+    if($this->sort_by == "TargetName"){ $sort_img_1 = $sort_img; } else { $sort_img_1 = "" ;}
+    if($this->sort_by == "TaskID"){ $sort_img_2 = $sort_img; } else { $sort_img_2 = "" ;}
+    if($this->sort_by == "Schedule"){ $sort_img_3 = $sort_img; } else { $sort_img_3 = "" ;}
+    if($this->sort_by == "Action"){ $sort_img_4 = $sort_img; } else { $sort_img_4 = "" ;}
+
+    /* Create divlist */
+    $divlist->SetListHeader("<input type='image' src='images/list_reload.png' title='"._("Reload")."'>");
+
+    $plug  = $_GET['plug'];
+    $chk = "<input type='checkbox' id='select_all' name='select_all'
+               onClick='toggle_all_(\"^item_selected_[0-9]*$\",\"select_all\");' >";
+
+    /* set Page header */
+    $divlist->AddHeader(array("string"=> $chk,          "attach"=>"style='width:20px;'"));
+    $divlist->AddHeader(array("string"=>"<a href='?plug=".$plug."&amp;sort=TargetName'>"._("Target").$sort_img_1."</a>"));
+    $divlist->AddHeader(array("string"=>"<a href='?plug=".$plug."&amp;sort=TaskID'>"._("Task").$sort_img_2."</a>",
+                                      "attach"=>"style='width:120px;'"));
+    $divlist->AddHeader(array("string"=>"<a href='?plug=".$plug."&amp;sort=Schedule'>"._("Schedule").$sort_img_3."</a>",
+                                      "attach"=>"style='width:100px;'"));
+    $divlist->AddHeader(array("string"=>"<a href='?plug=".$plug."&amp;sort=Action'>"._("Status").$sort_img_4."</a>",
+                                      "attach"=>"style='width:80px;'"));
+    $divlist->AddHeader(array("string"=>_("Action"),
+                                      "attach"=>"style='border-right:0px;width:120px;'"));
+
+
+    /* Reload the list of entries */
+    $this->reload();
+
+    foreach($this->entries as $key => $task){
+
+      $prio_actions="";
+      $action = "";
+
+      /* If WAITING add priority action
+       */  
+      if(in_array($task['STATUS'],array("waiting"))){
+        $prio_actions.= "<input class='center' type='image' src='images/prio_increase.png' 
+          title='"._("Move up in execution queue")."' name='prio_up_".$key."'>&nbsp;";
+        $prio_actions.= "<input class='center' type='image' src='images/prio_decrease.png' 
+          title='"._("Move down in execution queue")."' name='prio_down_".$key."'>&nbsp;";
+      }
+    
+      /* If WAITING add pause action
+       */  
+      if(in_array($task['STATUS'],array("waiting"))){
+        $prio_actions.= "<input class='center' type='image' src='images/status_pause.png' 
+          title='"._("Pause job")."' name='pause_".$key."'>&nbsp;";
+      }
+
+      /* If PAUSED add resume action
+       */  
+      if(in_array($task['STATUS'],array("paused"))){
+        $prio_actions.= "<input class='center' type='image' src='images/status_start.png' 
+          title='"._("Resume job")."' name='resume_".$key."'>&nbsp;";
+      }
+
+      /* If PROCESSING add abort action
+       */  
+      if(in_array($task['STATUS'],array("processing"))){
+        $prio_actions.= "<input class='center' type='image' src='images/small_error.png' 
+          title='"._("Abort execution")."' name='abort_process_".$key."'>";
+      }
+
+      /* If PAUSED or WAITING add execution action
+       */  
+      if(in_array($task['STATUS'],array("paused","waiting"))){
+        $prio_actions.= "<input class='center' type='image' src='images/rocket.png' 
+          title='"._("Force execution now!")."' name='execute_process_".$key."'>&nbsp;";
+      }
+
+      /* If PAUSED or WAITING add edit action
+       */  
+      if(in_array($task['STATUS'],array("waiting"))){
+        $action.= "<input type='image' src='images/edit.png' name='edit_task_".$key."' 
+          class='center' alt='"._("Edit")."'>";
+      }
+
+      /* If WAITING or ERROR add remove action
+       */  
+      if( $this->acl_is_removeable() && in_array($task['STATUS'],array("waiting","error"))){
+        $action.= "<input type='image' src='images/edittrash.png' name='remove_task_".$key."' 
+          class='center' alt='"._("Remove")."'>";
+      }
+
+      $color = "";
+      $display = $task['MACADDRESS'];
+      $display2= $task['HEADERTAG'];
+     
+      /* Check if this event exists as Daemon class 
+       * In this case, display a more accurate entry.
+       */ 
+      if(isset($this->events['BY_QUEUED_ACTION'][$task['HEADERTAG']]['s_Menu_Name'])){
+        $event_type = $this->events['BY_QUEUED_ACTION'][$task['HEADERTAG']];
+        $display2= $event_type['s_Menu_Name'];
+
+        if(strlen($display2) > 20){
+          $display2 = substr($display2,0,18)."...";
+        }
+
+        if(isset($event_type['ListImage']) && !empty($event_type['ListImage'])){
+          $display2 = $event_type['ListImage']."&nbsp;".$display2;
+        }
+      } 
+
+      $status = $task['STATUS'];
+  
+      if($status == "waiting"){
+        $status = "<img class='center' src='images/clock.png' alt=''>&nbsp;"._("Waiting");
+      }
+      if($status == "error"){
+        $status = "<img class='center' src='images/false.png' alt=''>&nbsp;"._("Error");
+      }
+
+      /* Special handling for all entries that have 
+          STATUS == "processing" && PROGRESS == NUMERIC
+       */
+      if($status == "processing" && isset($task['PROGRESS'])){
+        $percent = $task['PROGRESS'];
+        $status = "<img src='progress.php?x=80&amp;y=13&amp;p=".$percent."' alt='".$percent."&nbsp;%'>";
+      }
+
+
+      /* Create each field */
+      $field0 = array("string" => "<input type='checkbox' id='item_selected_".$task['ID']."' name='item_selected_".$key."'>" ,
+                      "attach" => "style='width:20px;".$color."'");
+      $field1 = array("string" => $display,
+                      "attach" => "style='".$color."'");
+      $field1a= array("string" => $display2,
+                      "attach" => "style='".$color.";width:120px;'");
+      $field2 = array("string" => date("d.m.Y H:i:s",strtotime($task['TIMESTAMP'])),"attach" => "style='".$color.";width:100px;'");
+      $field3 = array("string" => $status,"attach" => "style='".$color.";width:80px;'");
+      $field4 = array("string" => $prio_actions.$action,"attach" => "style='".$color.";text-align:right;width:120px;border-right:0px;'");
+      $divlist->AddElement(array($field0,$field1,$field1a,$field2,$field3,$field4));
+    }
+
+    $smarty = get_smarty();
+    $smarty->assign("events",$this->events);
+    $smarty->assign("start",$this->start);
+    $smarty->assign("start_real", ($this->start + 1));
+    $smarty->assign("ranges", array("10" => "10",
+                                    "20" => "20",
+                                    "25" => "25",
+                                    "50" => "50",
+                                    "100"=> "100",
+                                    "200"=> "200",
+                                    "9999" => "*"));
+
+    $count = $this->o_queue->number_of_queued_entries();
+    $smarty->assign("range_selector", range_selector($count, $this->start, $this->range,"range"));
+    $smarty->assign("range",$this->range);
+    $smarty->assign("div",$divlist->Draw());
+    return($smarty->fetch (get_template_path('gotomasses.tpl', TRUE, dirname(__FILE__))));
+  }
+
+
+  /*! \brief  Move an entry up or down in the queue, by updating its execution timestamp  
+      @param  $id     Integer  The ID of the entry which should be updated.
+      @param  $type   String   "up" / "down"
+      @return boolean TRUE in case of success else FALSE
+  */
+  public function update_priority($id,$type = "up")
+  {
+    if($type == "up"){
+      $tmp = $this->o_queue->get_queued_entries($this->event_tags,-1,-1,"timestamp DESC");
+    }else{
+      $tmp = $this->o_queue->get_queued_entries($this->event_tags,-1,-1,"timestamp ASC");
+    }
+    $last = array();
+    foreach($tmp as $entry){
+      if($entry['ID'] == $id){
+        if(count($last)){
+          $time = strtotime($last['TIMESTAMP']);
+          if($type == "up"){
+            $time ++;
+          }else{
+            $time --;
+          }
+          $time_str = date("YmdHis",$time); 
+          return($this->o_queue->update_entries(array($id),array("timestamp" => $time_str)));
+        }else{
+          return(FALSE);
+        }
+      }
+      $last = $entry;
+    }
+    return(FALSE);
+  }
+
+
+  /*! \brief  Resumes to status 'waiting'.
+   *  @return Boolean TRUE in case of success, else FALSE. 
+   */
+  private function resume_queue_entries($ids)
+  {
+    if(!count($ids)){
+      return;
+    }
+
+    /* Entries are resumed by setting the status to 
+     *  'waiting'
+     */
+    $data = array("status"    => "waiting");
+  
+    /* Check if given ids are valid and check if the status
+     *  allows resuming.
+     */
+    $update_ids = array();
+    foreach($this->o_queue->get_entries_by_id($ids) as $entry){
+      if(isset($entry['STATUS']) && preg_match("/paused/",$entry['STATUS'])){
+        $update_ids[] = $entry['ID'];
+      }
+    }
+
+    /* Tell the daemon that we have entries to update.
+     */
+    if(count($update_ids)){
+      if(!$this->o_queue->update_entries($update_ids,$data)){
+        msg_dialog::display(_("Error"), sprintf(_("Could not update queue entry: %s"),$id) , ERROR_DIALOG);
+        return(FALSE);
+      }
+    }
+    return(TRUE);
+  }
+
+
+  /*! \brief  Force queue job to be done as far as possible.
+   *  @return Boolean TRUE in case of success, else FALSE.
+   */
+  private function execute_queue_entries($ids)
+  {
+    if(!count($ids)){
+      return;
+    }
+
+    /* Execution is forced by updating the status to 
+     *  waiting and setting the timestamp to current time.
+     */
+    $data = array(  "timestamp" => date("YmdHis",time()), 
+                    "status"    => "waiting");
+
+    /* Only allow execution of paused or waiting entries 
+     */
+    $update_ids = array();
+    foreach($this->o_queue->get_entries_by_id($ids) as $entry){
+      if(in_array($entry['STATUS'],array("paused","waiting"))){
+        $update_ids[] = $entry['ID'];
+      }
+    }
+
+    /* Tell the daemon that we want to update some entries
+     */
+    if(count($update_ids)){
+      if(!$this->o_queue->update_entries($update_ids,$data)){
+        msg_dialog::display(_("Error"), sprintf(_("Could not update queue entries.")) , ERROR_DIALOG);
+        return(FALSE);
+      }
+    }
+    return(TRUE);
+  }
+
+
+  /*! \brief  Force queue job to be done as far as possible.
+   *  @return Boolean TRUE in case of success, else FALSE.
+   */
+  private function abort_queue_entries($ids)
+  {
+    if(!count($ids)){
+      return;
+    }
+
+    /* Entries are paused by setting the status to
+     *  something different from 'waiting'.
+     * We simply use 'paused'.
+     */
+    $data = array("status"    => "paused");
+
+    /* Detect if the ids we got are valid and
+     *  check if the status allows pausing.
+     */
+    $update_ids = array();
+    foreach($this->o_queue->get_entries_by_id($ids) as $entry){
+      if(isset($entry['STATUS']) && preg_match("/processing/",$entry['STATUS'])){
+        if(isset($entry['MACADDRESS'])){
+          $update_ids[] = $entry['MACADDRESS'];
+        }else{
+          trigger_error("No mac address found in event.");
+        }
+      }
+    }
+
+    if(class_available("DaemonEvent_faireboot")){
+      $tmp = new DaemonEvent_faireboot($this->config);
+      $tmp->add_targets($update_ids);
+      if(!$this->o_queue->append($tmp)){
+        msg_dialog::display(_("Error"), sprintf(_("Could not update queue entry: %s"),$id) , ERROR_DIALOG);
+        return(FALSE);
+      }
+    }else{
+      msg_dialog::display(_("Error"),
+          sprintf(_("The Job could not be aborted, the '%s' event class was not found."),
+            "DaemonEvent_faireboot") , ERROR_DIALOG);
+    }
+  }
+
+
+  /*! \brief Pauses the specified queue entry from execution.
+   *  @return Boolean TRUE in case of success, else FALSE. 
+   */
+  private function pause_queue_entries($ids)
+  {
+    if(!count($ids)){
+      return;
+    }
+
+    /* Entries are paused by setting the status to 
+     *  something different from 'waiting'.
+     * We simply use 'paused'.
+     */   
+    $data = array("status"    => "paused");
+
+    /* Detect if the ids we got are valid and
+     *  check if the status allows pausing.
+     */ 
+    $update_ids = array();
+    foreach($this->o_queue->get_entries_by_id($ids) as $entry){
+      if(isset($entry['STATUS']) && preg_match("/waiting/",$entry['STATUS'])){
+        $update_ids[] = $entry['ID'];
+      }
+    }
+
+    /* Tell the daemon that we want to update some entries
+     */
+    if(count($update_ids)){
+      if(!$this->o_queue->update_entries($update_ids,$data)){
+        msg_dialog::display(_("Error"), sprintf(_("Could not update queue entry: %s"),$id) , ERROR_DIALOG);
+        return(FALSE);
+      }
+    }
+    return(TRUE);
+  }
+
+
+  /*! \brief  Request list of queued jobs.
+   *  @return Returns an array of all queued jobs.
+   */
+  function reload()
+  {
+
+    /* Sort map   html-post-name => daemon-col-name
+     */
+    $map = array(
+        "QueuePosition" => "id",
+        "Action"        => "status",
+        "TaskID"        => "headertag",
+        "TargetName"    => "macaddress",
+        "Schedule"      => "timestamp");
+
+    /* Create sort header 
+     */
+    if(!isset($map[$this->sort_by])){
+      $sort = "id DESC";
+    }else{
+      $sort   = $map[$this->sort_by]; 
+      if($this->sort_dir == "up"){
+        $sort.= " ASC";
+      }else{
+        $sort.= " DESC";
+      }
+    }
+     
+    /* Get entries. */ 
+    $start  = $this->start; 
+    $stop   = $this->range;
+    $entries = $this->o_queue->get_queued_entries($this->event_tags,$start,$stop,$sort);
+    if ($this->o_queue->is_error()){
+      msg_dialog::display(_("Error"), sprintf(_("Cannot load queue entries: %s"), "<br><br>".$this->o_queue->get_error()), ERROR_DIALOG);
+    }
+
+    /* Assign entries by id.
+     */
+    $this->entries = array();
+    foreach($entries as $entry){
+      $this->entries[$entry['ID']]= $entry;
+    }
+  }
+
+
+  /*! \brief  Handle post jobs, like sorting.
+   */
+  function save_object()
+  {
+    /* Check for sorting changes 
+     */
+    $sort_vals = array("Action","QueuePosition","TargetName","Schedule","TaskID");
+    if(isset($_GET['sort']) && in_array($_GET['sort'],$sort_vals)){
+      $sort = $_GET['sort'];
+      if($this->sort_by == $sort){
+        if($this->sort_dir == "up"){
+          $this->sort_dir = "down";
+        }else{
+          $this->sort_dir = "up";
+        }
+      }
+      $this->sort_by = $sort;
+    }
+
+    /* Range selection used? */
+    if(isset($_POST['range']) && is_numeric($_POST['range'])){
+      $this->range = $_POST['range'];
+    }
+    
+    /* Page changed. */
+    if(isset($_GET['start'])){
+      $start = $_GET['start'];
+      if(is_numeric($start) || $start == 0){
+        $this->start = $start;
+      }
+    }
+
+    /* Check start stop and reset if necessary */
+    $count = $this->o_queue->number_of_queued_entries();
+    if($this->start >= $count){
+      $this->start = $count -1;
+    }
+    if($this->start < 0){
+      $this->start = 0;
+    }
+  }
+
+
+  function save()
+  {
+    // We do not save anything here.
+  }
+
+
+  /*! \brief  Return a list of all selected items.
+    @return Array   Returns an array containing all selected item ids.
+   */
+  function list_get_selected_items()
+  {
+    $ids = array();
+    foreach($_POST as $name => $value){
+      if(preg_match("/^item_selected_[0-9]*$/",$name)){
+        $id   = preg_replace("/^item_selected_/","",$name);
+        $ids[$id] = $id;
+      }
+    }
+    return($ids);
+  }
+
+
+  static function plInfo()
+  {
+    return (array(
+          "plShortName"   => _("System mass deployment"),
+          "plDescription" => _("Provide a mechanism to automatically activate a set of systems"),
+          "plSelfModify"  => FALSE,
+          "plDepends"     => array(),
+          "plPriority"    => 0,
+          "plSection"     => array("addon"),
+          "plCategory"    => array("gotomasses" => array("objectClass" => "none", "description" => _("System mass deployment"))),
+          "plProvidedAcls" => array("Comment"   => _("Description")) 
+          ));
+  }
+}
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/gosa-plugins/goto/addons/goto/class_target_list.inc b/gosa-plugins/goto/addons/goto/class_target_list.inc
new file mode 100644 (file)
index 0000000..d2c49ae
--- /dev/null
@@ -0,0 +1,335 @@
+<?php
+/*
+ * 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
+ */
+
+class target_list extends MultiSelectWindow
+{
+  var $config;
+  var $list         =array();
+  var $Targets_used =array();
+
+  /* Current base */
+  var $selectedBase       = "";
+  var $departments        = array();
+
+  /* Regex */
+  var $Regex              = "*";
+  var $IP_start           = "0.0.0.0";
+  var $IP_end             = "255.255.255.255";
+
+  /* CheckBoxes, to change default values modify $this->AddCheckBox */
+  var $ogroups        ;
+  var $servers        ;
+  var $workstations   ;
+  var $incoming       ;
+
+
+  /* Subsearch checkbox */
+  var $SubSearch          ;
+  var $IPMatch            ;
+  var $parent             ;
+  var $ui                 ;
+  function target_list(&$config,$Targets_used)
+  {
+    MultiSelectWindow::MultiSelectWindow($config, "Targetselection", array("ogroup","server","incoming","workstation","gotomasses"));
+
+    $this->Targets_used = $Targets_used;
+    
+    $this->SetInformation(  _("Select the target objects for your scheduled action."));
+    $this->SetTitle(        _("Available targets"));
+    $this->SetSummary(      _("Available targets"));
+    $this->SetHeadpageMode(FALSE);
+    
+    /* set Page header */
+    $chk = "<input type='checkbox' id='select_all' name='select_all'
+               onClick='toggle_all_(\"^item_selected_[0-9]*$\",\"select_all\");' >";
+    $this->AddHeader(array("string"=> $chk,          "attach"=>"style='width:20px;'"));
+
+    $this->AddHeader(array("string" => "&nbsp;", "attach" => "style='text-align:center;width:20px;'"));
+    $this->AddHeader(array("string" => _("Object name"), "attach" => "style=''"));
+
+    /* Text ,Value, Name, Is selected */
+    $this->AddCheckBox("ogroups",       _("Select to see object groups"),  _("Show object groups"), true);
+    $this->AddCheckBox("servers",       _("Select to see servers")  ,   _("Show servers"), true);
+    $this->AddCheckBox("workstations",  _("Select to see workstations"),_("Show workstations"), true);
+    $this->AddCheckBox("incoming",      _("Select to see incoming objects")  , _("Show new objects"), true);
+
+    /* Add SubSearch checkbox */
+    $this->AddCheckBox(SEPERATOR);
+    $this->AddCheckBox("SubSearch",  _("Select to search within subtrees"), _("Search in subtrees"), false);
+    $this->AddCheckBox("IPMatch",    _("Select to search for a specific IP range only"), _("Match IP range"), false);
+
+    /* Name,Text,Default  , Connect with alphabet  */
+    $this->AddRegex   ("Regex",     _("Regular expression for matching group names"), "*" , true);
+    $this->AddRegex   ("IP_start",  _("IP range start"),  "0.0.0.0" , true);
+    $this->AddRegex   ("IP_end",    _("IP range end"),    "255.255.255.255" , true);
+    $this->EnableAplhabet(TRUE);
+  }
+
+
+  function GenHeader()
+  {
+    $options= "";
+
+    /* Get all departments within this subtree */
+    $ui= get_userinfo();
+    $first = "";
+    $found = FALSE;
+    $base = $this->config->current['BASE'];
+
+    /* Add base */
+    $tmp = array();
+    $tmp[] = array("dn"=>$this->config->current['BASE']);
+    $tmp=  array_merge($tmp,get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base,
+                    array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH));
+
+    $deps = array();
+    foreach($tmp as $tm){
+      $deps[$tm['dn']] = $tm['dn'];
+    }
+
+    /* Load possible departments */
+    $ui= get_userinfo();
+    $tdeps= $ui->get_module_departments("ogroups");
+    $ids = $this->config->idepartments;
+    $first = "";
+    $found = FALSE;
+    foreach($ids as $dep => $name){
+      if(isset($deps[$dep]) && in_array_ics($dep, $tdeps)){
+
+        /* Keep first base dn in mind, we could need this
+         *  info if no valid base was found
+         */
+        if(empty($first)) {
+          $first = $dep['dn'];
+        }
+
+        $value = $ids[$dep];
+        if ($this->selectedBase == $dep){
+          $found = TRUE;
+          $options.= "<option selected='selected' value='".$dep."'>$value</option>";
+        } else {
+          $options.= "<option value='".$dep."'>$value</option>";
+        }
+      }
+    }
+
+    /* The currently used base is not visible with your acl setup.
+     * Set base to first useable base.
+     */
+    if(!$found){
+      $this->selectedBase = $first;
+    }
+
+    /* Get copy & paste icon */
+    $acls  = $ui->get_permissions($this->selectedBase,"ogroups/ogroup");
+    $acl_all= $ui->has_complete_category_acls($this->selectedBase,"ogroups");
+
+    /* Add default header */
+    $listhead = MultiSelectWindow::get_default_header();
+
+    /* Add department selector */
+    $listhead .= _("Base")."&nbsp;<select name='CurrentMainBase' onChange='mainform.submit()' class='center'>$options</select>".
+      " <input class='center' type='image' src='images/list_submit.png' align='middle'
+      title='"._("Submit department")."' name='submit_department' alt='"._("Submit")."'>&nbsp;";
+    $listhead .="</div>";
+
+    $this->SetListHeader($listhead);
+  }
+
+
+  function execute()
+  {
+    $this->ClearElementsList();
+    $this->GenHeader();
+    $this->reload();
+    $this->SetEntries($this->list);
+    return($this->Draw());
+  }
+
+  
+  function SetEntries($list)
+  {
+      /* Add Copy & Paste buttons if copy&paste is enabled
+     */
+    // Defining Links
+    $linkopen = "<a href='?plug=".$_GET['plug']."&amp;act=dep_open&amp;dep_id=%s'>%s</a>";
+    $editlink = "<a href='?plug=".$_GET['plug']."&amp;id=%s&amp;act=edit_entry'>%s</a>";
+
+    $ui = get_userinfo();
+
+    // Assigning ogroups
+    foreach($list as $key => $val){
+
+      if(in_array($val['cn'][0],$this->Targets_used) || 
+         isset($val['macAddress'][0]) && in_array($val['macAddress'][0],$this->Targets_used)) continue;
+
+      $title = "title='".preg_replace('/ /', '&nbsp;', @LDAP::fix($val['dn']))."'";
+      if(!isset($val['description'][0])){
+        $desc = "";
+      }else{
+        $desc = " - [ ".$val['description'][0]." ]";
+      }
+      if(!isset($val['ipHostNumber'][0])){
+        $desc.= "";
+      }else{
+        $desc.= " - ".$val['ipHostNumber'][0]."";
+      }
+
+
+      $img ="Hmm";
+      if(in_array("goServer",$val['objectClass'])){
+        $img = "<img src='images/select_server.png' alt='"._("Server")."' ".$title.">";
+      }elseif(in_array("gotoWorkstation",$val['objectClass'])){
+        $img = "<img src='images/select_workstation.png' alt='"._("Workstation")."' ".$title.">";
+      }elseif(in_array("gosaGroupOfNames",$val['objectClass'])){
+        $img = "<img src='images/list_ogroup.png' alt='"._("Object group")."' ".$title.">";
+      }
+
+      /* Create each field */
+      $field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
+                      "attach" => "style='width:20px;'");
+      $field1 = array("string" => $img, 
+                      "attach" => "style='text-   align:center;width: 20px;'");
+      $field2 = array("string" => $val['cn'][0].$desc, 
+                      "attach" => "style='border-right:0px;' ".$title);
+
+      $this->AddElement(array($field0,$field1,$field2));
+    }
+  }
+
+  
+  function save()
+  { 
+    $ret = array();
+    $items = $this->list_get_selected_items();
+    foreach($items as $item){
+      $ret[] = $this->list[$item];
+    }
+    return($ret);
+  }
+
+
+  function save_object()
+  {
+    MultiSelectWindow::save_object();
+  }
+
+  
+  function reload()
+  {
+    /* Set base for all searches && initialise some vars */
+    $this->list= array();
+    $base     = $this->selectedBase;
+    $filter   = "";
+    $Regex    = $this->Regex;
+    $IP_start = $this->IP_start;
+    $IP_end   = $this->IP_end;
+
+    if($this->IPMatch){
+      if(!tests::is_ip($IP_start)){
+       msg_dialog::display(_("Error"), _("IP range is invalid!"), ERROR_DIALOG);
+        return;
+      }
+      if(!tests::is_ip($IP_end)){
+       msg_dialog::display(_("Error"), _("IP range is invalid!"), ERROR_DIALOG);
+        return;
+      }
+    }
+  
+
+    $chk = array(
+        "ogroups"       => "(&(objectClass=gosaGroupOfNames)(|(gosaGroupObjects=*S*)(gosaGroupObjects=*W*)))" ,
+        "servers"       => "(objectClass=goServer)" ,
+        "incoming"      => "(objectClass=GOhard)" ,
+        "workstations"  => "(objectClass=gotoWorkstation)");
+
+    /* Create filter */
+    foreach($chk as $chkBox => $FilterPart){
+      if($this->$chkBox){
+        $filter .=  $FilterPart;
+      }
+    }
+    $filter= "(&(cn=".$Regex.")(|".$filter."))";
+
+    if($this->SubSearch){
+      $res= get_list($filter, array("ogroups","workstations","servers"), $base, 
+            array("cn","objectClass","gosaGroupObjects","ipHostNumber","description"), GL_SIZELIMIT | GL_SUBSEARCH);
+    }else{
+      $res= get_list($filter, "ogroups", get_groups_ou().$base, 
+            array("cn","objectClass","ipHostNumber","description"), GL_SIZELIMIT );
+      $res= array_merge($res,get_list($filter, "workstation",  get_ou('workstationou').$base, 
+            array("cn","objectClass","ipHostNumber","description"), GL_SIZELIMIT ));
+      $res= array_merge($res,get_list($filter, "server", get_ou('serverou').$base, 
+            array("cn","objectClass","ipHostNumber","description"), GL_SIZELIMIT ));
+
+      $deps_a = array(
+          get_ou("workstationou"),
+          get_ou("incominou"),
+          get_ou("serverou"),
+          get_ou("ogroupou"));
+
+      $res = get_sub_list($filter,array("server","incoming","workstation","ogroup"), 
+                  $deps_a,get_ou("systemsou").$base,array("cn","objectClass","ipHostNumber","description"),GL_SIZELIMIT);
+    }
+
+    $this->list= $res;
+    ksort ($this->list);
+    reset ($this->list);
+    $tmp=array();
+    foreach($this->list as $tkey => $val ){
+
+      if($this->IPMatch){
+        if(isset($val['ipHostNumber'][0])){
+          if(tests::is_ip_range($IP_start,$val['ipHostNumber'][0]) && tests::is_ip_range($val['ipHostNumber'][0],$IP_end)){
+            $tmp[strtolower($val['cn'][0]).$val['cn'][0]]=$val;
+          }
+        }
+      }else{
+        $tmp[strtolower($val['cn'][0]).$val['cn'][0]]=$val;
+      }
+    }
+    ksort($tmp);
+    $this->list=array();
+    foreach($tmp as $val){
+      $this->list[]=$val;
+    }
+    reset ($this->list);
+  }
+
+  function list_get_selected_items()
+  {
+    $ids = array();
+    foreach($_POST as $name => $value){
+      if(preg_match("/^item_selected_[0-9]*$/",$name)){
+        $id   = preg_replace("/^item_selected_/","",$name);
+        $ids[$id] = $id;
+      }
+    }
+    return($ids);
+  }
+}
+
+
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/gosa-plugins/goto/addons/goto/events/DaemonEvent_faireboot.tpl b/gosa-plugins/goto/addons/goto/events/DaemonEvent_faireboot.tpl
new file mode 100644 (file)
index 0000000..4e3fc12
--- /dev/null
@@ -0,0 +1,63 @@
+
+{if $is_new}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table style='width:100%;'>
+                               <tr>
+                                       <td>
+                                               {t}Target objects{/t}
+                                               <br>
+                                               {$target_list}
+                                       </td>
+                               </tr>
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{else}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td>{t}ID{/t}</td>
+                                       <td>{$data.ID}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Status{/t}</td>
+                                       <td>{$data.STATUS}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Result{/t}</td>
+                                       <td>{$data.RESULT}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Target{/t}</td>
+                                       <td>{$data.MACADDRESS}</td>
+                               </tr>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table >
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{/if}
diff --git a/gosa-plugins/goto/addons/goto/events/DaemonEvent_halt.tpl b/gosa-plugins/goto/addons/goto/events/DaemonEvent_halt.tpl
new file mode 100644 (file)
index 0000000..4e3fc12
--- /dev/null
@@ -0,0 +1,63 @@
+
+{if $is_new}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table style='width:100%;'>
+                               <tr>
+                                       <td>
+                                               {t}Target objects{/t}
+                                               <br>
+                                               {$target_list}
+                                       </td>
+                               </tr>
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{else}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td>{t}ID{/t}</td>
+                                       <td>{$data.ID}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Status{/t}</td>
+                                       <td>{$data.STATUS}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Result{/t}</td>
+                                       <td>{$data.RESULT}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Target{/t}</td>
+                                       <td>{$data.MACADDRESS}</td>
+                               </tr>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table >
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{/if}
diff --git a/gosa-plugins/goto/addons/goto/events/DaemonEvent_install.tpl b/gosa-plugins/goto/addons/goto/events/DaemonEvent_install.tpl
new file mode 100644 (file)
index 0000000..40a62eb
--- /dev/null
@@ -0,0 +1,67 @@
+
+{if $is_new}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table style='width:100%;'>
+                               <tr>
+                                       <td>
+                                               {t}Target objects{/t}
+                                               <br>
+                                               {$target_list}
+                                       </td>
+                               </tr>
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{else}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td>{t}ID{/t}</td>
+                                       <td>{$data.ID}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Progress{/t}</td>
+                                       <td>{$progress}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Status{/t}</td>
+                                       <td>{$status}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Result{/t}</td>
+                                       <td>{$data.RESULT}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Target{/t}</td>
+                                       <td>{$data.MACADDRESS}</td>
+                               </tr>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table >
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{/if}
diff --git a/gosa-plugins/goto/addons/goto/events/DaemonEvent_installation_activation.tpl b/gosa-plugins/goto/addons/goto/events/DaemonEvent_installation_activation.tpl
new file mode 100644 (file)
index 0000000..4e3fc12
--- /dev/null
@@ -0,0 +1,63 @@
+
+{if $is_new}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table style='width:100%;'>
+                               <tr>
+                                       <td>
+                                               {t}Target objects{/t}
+                                               <br>
+                                               {$target_list}
+                                       </td>
+                               </tr>
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{else}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td>{t}ID{/t}</td>
+                                       <td>{$data.ID}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Status{/t}</td>
+                                       <td>{$data.STATUS}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Result{/t}</td>
+                                       <td>{$data.RESULT}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Target{/t}</td>
+                                       <td>{$data.MACADDRESS}</td>
+                               </tr>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table >
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{/if}
diff --git a/gosa-plugins/goto/addons/goto/events/DaemonEvent_localboot.tpl b/gosa-plugins/goto/addons/goto/events/DaemonEvent_localboot.tpl
new file mode 100644 (file)
index 0000000..4e3fc12
--- /dev/null
@@ -0,0 +1,63 @@
+
+{if $is_new}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table style='width:100%;'>
+                               <tr>
+                                       <td>
+                                               {t}Target objects{/t}
+                                               <br>
+                                               {$target_list}
+                                       </td>
+                               </tr>
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{else}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td>{t}ID{/t}</td>
+                                       <td>{$data.ID}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Status{/t}</td>
+                                       <td>{$data.STATUS}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Result{/t}</td>
+                                       <td>{$data.RESULT}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Target{/t}</td>
+                                       <td>{$data.MACADDRESS}</td>
+                               </tr>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table >
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{/if}
diff --git a/gosa-plugins/goto/addons/goto/events/DaemonEvent_memcheck.tpl b/gosa-plugins/goto/addons/goto/events/DaemonEvent_memcheck.tpl
new file mode 100644 (file)
index 0000000..4e3fc12
--- /dev/null
@@ -0,0 +1,63 @@
+
+{if $is_new}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table style='width:100%;'>
+                               <tr>
+                                       <td>
+                                               {t}Target objects{/t}
+                                               <br>
+                                               {$target_list}
+                                       </td>
+                               </tr>
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{else}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td>{t}ID{/t}</td>
+                                       <td>{$data.ID}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Status{/t}</td>
+                                       <td>{$data.STATUS}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Result{/t}</td>
+                                       <td>{$data.RESULT}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Target{/t}</td>
+                                       <td>{$data.MACADDRESS}</td>
+                               </tr>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table >
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{/if}
diff --git a/gosa-plugins/goto/addons/goto/events/DaemonEvent_notify.tpl b/gosa-plugins/goto/addons/goto/events/DaemonEvent_notify.tpl
new file mode 100644 (file)
index 0000000..25a8618
--- /dev/null
@@ -0,0 +1,60 @@
+
+{if $is_new}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='vertical-align:top'>{t}Send on:{/t}</td>
+               <td>{$timestamp}</td>
+       </tr>
+       <tr>
+               <td>
+                       {t}Subject{/t}
+               </td>
+               <td>
+                       <input type="text" value="{$subject}" name="subject">
+               </td>
+       </tr>
+       <tr>
+               <td colspan="2">
+                       {t}Text{/t}
+               </td>
+       </tr>
+       <tr>
+               <td colspan="2">
+                       <textarea style="height:200px;width:100%;" name="message">{$message}</textarea>
+               </td>
+       </tr>
+</table>
+
+{else}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td>{t}ID{/t}</td>
+                                       <td>{$data.ID}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Status{/t}</td>
+                                       <td>{$data.STATUS}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Result{/t}</td>
+                                       <td>{$data.RESULT}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Target{/t}</td>
+                                       <td>{$data.MACADDRESS}</td>
+                               </tr>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{/if}
diff --git a/gosa-plugins/goto/addons/goto/events/DaemonEvent_reboot.tpl b/gosa-plugins/goto/addons/goto/events/DaemonEvent_reboot.tpl
new file mode 100644 (file)
index 0000000..4e3fc12
--- /dev/null
@@ -0,0 +1,63 @@
+
+{if $is_new}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table style='width:100%;'>
+                               <tr>
+                                       <td>
+                                               {t}Target objects{/t}
+                                               <br>
+                                               {$target_list}
+                                       </td>
+                               </tr>
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{else}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td>{t}ID{/t}</td>
+                                       <td>{$data.ID}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Status{/t}</td>
+                                       <td>{$data.STATUS}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Result{/t}</td>
+                                       <td>{$data.RESULT}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Target{/t}</td>
+                                       <td>{$data.MACADDRESS}</td>
+                               </tr>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table >
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{/if}
diff --git a/gosa-plugins/goto/addons/goto/events/DaemonEvent_reinstall.tpl b/gosa-plugins/goto/addons/goto/events/DaemonEvent_reinstall.tpl
new file mode 100644 (file)
index 0000000..40a62eb
--- /dev/null
@@ -0,0 +1,67 @@
+
+{if $is_new}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table style='width:100%;'>
+                               <tr>
+                                       <td>
+                                               {t}Target objects{/t}
+                                               <br>
+                                               {$target_list}
+                                       </td>
+                               </tr>
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{else}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td>{t}ID{/t}</td>
+                                       <td>{$data.ID}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Progress{/t}</td>
+                                       <td>{$progress}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Status{/t}</td>
+                                       <td>{$status}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Result{/t}</td>
+                                       <td>{$data.RESULT}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Target{/t}</td>
+                                       <td>{$data.MACADDRESS}</td>
+                               </tr>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table >
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{/if}
diff --git a/gosa-plugins/goto/addons/goto/events/DaemonEvent_reload_ldap_config.tpl b/gosa-plugins/goto/addons/goto/events/DaemonEvent_reload_ldap_config.tpl
new file mode 100644 (file)
index 0000000..4e3fc12
--- /dev/null
@@ -0,0 +1,63 @@
+
+{if $is_new}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table style='width:100%;'>
+                               <tr>
+                                       <td>
+                                               {t}Target objects{/t}
+                                               <br>
+                                               {$target_list}
+                                       </td>
+                               </tr>
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{else}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td>{t}ID{/t}</td>
+                                       <td>{$data.ID}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Status{/t}</td>
+                                       <td>{$data.STATUS}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Result{/t}</td>
+                                       <td>{$data.RESULT}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Target{/t}</td>
+                                       <td>{$data.MACADDRESS}</td>
+                               </tr>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table >
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{/if}
diff --git a/gosa-plugins/goto/addons/goto/events/DaemonEvent_rescan.tpl b/gosa-plugins/goto/addons/goto/events/DaemonEvent_rescan.tpl
new file mode 100644 (file)
index 0000000..4e3fc12
--- /dev/null
@@ -0,0 +1,63 @@
+
+{if $is_new}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table style='width:100%;'>
+                               <tr>
+                                       <td>
+                                               {t}Target objects{/t}
+                                               <br>
+                                               {$target_list}
+                                       </td>
+                               </tr>
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{else}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td>{t}ID{/t}</td>
+                                       <td>{$data.ID}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Status{/t}</td>
+                                       <td>{$data.STATUS}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Result{/t}</td>
+                                       <td>{$data.RESULT}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Target{/t}</td>
+                                       <td>{$data.MACADDRESS}</td>
+                               </tr>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table >
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{/if}
diff --git a/gosa-plugins/goto/addons/goto/events/DaemonEvent_sysinfo.tpl b/gosa-plugins/goto/addons/goto/events/DaemonEvent_sysinfo.tpl
new file mode 100644 (file)
index 0000000..4e3fc12
--- /dev/null
@@ -0,0 +1,63 @@
+
+{if $is_new}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table style='width:100%;'>
+                               <tr>
+                                       <td>
+                                               {t}Target objects{/t}
+                                               <br>
+                                               {$target_list}
+                                       </td>
+                               </tr>
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{else}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td>{t}ID{/t}</td>
+                                       <td>{$data.ID}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Status{/t}</td>
+                                       <td>{$data.STATUS}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Result{/t}</td>
+                                       <td>{$data.RESULT}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Target{/t}</td>
+                                       <td>{$data.MACADDRESS}</td>
+                               </tr>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table >
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{/if}
diff --git a/gosa-plugins/goto/addons/goto/events/DaemonEvent_update.tpl b/gosa-plugins/goto/addons/goto/events/DaemonEvent_update.tpl
new file mode 100644 (file)
index 0000000..4e3fc12
--- /dev/null
@@ -0,0 +1,63 @@
+
+{if $is_new}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table style='width:100%;'>
+                               <tr>
+                                       <td>
+                                               {t}Target objects{/t}
+                                               <br>
+                                               {$target_list}
+                                       </td>
+                               </tr>
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{else}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td>{t}ID{/t}</td>
+                                       <td>{$data.ID}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Status{/t}</td>
+                                       <td>{$data.STATUS}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Result{/t}</td>
+                                       <td>{$data.RESULT}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Target{/t}</td>
+                                       <td>{$data.MACADDRESS}</td>
+                               </tr>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table >
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{/if}
diff --git a/gosa-plugins/goto/addons/goto/events/DaemonEvent_wakeup.tpl b/gosa-plugins/goto/addons/goto/events/DaemonEvent_wakeup.tpl
new file mode 100644 (file)
index 0000000..4e3fc12
--- /dev/null
@@ -0,0 +1,63 @@
+
+{if $is_new}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table style='width:100%;'>
+                               <tr>
+                                       <td>
+                                               {t}Target objects{/t}
+                                               <br>
+                                               {$target_list}
+                                       </td>
+                               </tr>
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{else}
+
+<table style='width:100%;'>
+       <tr>
+               <td style='width:50%; vertical-align:top;'>
+                       <table>
+                               <tr>
+                                       <td>{t}ID{/t}</td>
+                                       <td>{$data.ID}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Status{/t}</td>
+                                       <td>{$data.STATUS}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Result{/t}</td>
+                                       <td>{$data.RESULT}</td>
+                               </tr>
+                               <tr>
+                                       <td>{t}Target{/t}</td>
+                                       <td>{$data.MACADDRESS}</td>
+                               </tr>
+                               <tr>
+                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
+                                       <td>{$timestamp}</td>
+                               </tr>
+                       </table>
+               </td>
+               <td style='width:50%; vertical-align:top;'>
+                       <table >
+                       </table>
+               </td>
+       </tr>
+</table>
+
+{/if}
diff --git a/gosa-plugins/goto/addons/goto/events/class_DaemonEvent.inc b/gosa-plugins/goto/addons/goto/events/class_DaemonEvent.inc
new file mode 100644 (file)
index 0000000..ae4f7e3
--- /dev/null
@@ -0,0 +1,504 @@
+<?php
+/*
+ * 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
+ */
+
+define("SCHEDULED_EVENT",1);
+define("TRIGGERED_EVENT",2);
+
+define("HIDDEN_EVENT",0);
+define("SYSTEM_EVENT",1);
+define("USER_EVENT"  ,2);
+
+
+/*! \brief    This is the event base class 
+  \author   Fabian Hickert <hickert@gonicus.de>
+  \version  1.00
+  \date     26.02.2008
+
+  This is the base class for all new daemon events.
+  It implements most of the required functionality.
+ */
+class DaemonEvent 
+{
+  /* Menu Strings */
+  protected $s_Menu_Name  = "s_Menu_Name not set";  // Diplayed in the ActionsMenu->CreateNew
+  protected $s_Event_Name = "s_Event_Name not set"; // Will be displayed in the Management list.
+  protected $s_Menu_Image = "images/empty.png";     // Image displayed in Actions->New
+  protected $s_List_Image = "";                     // Image displayed in event listing
+
+  public $config;          // GOsa configuration object 
+  protected $data;            // The event data, when edited
+
+  protected $a_targets    = array();  // The list of assigned Targets (When newly created)
+  protected $s_Schedule_Action = "";       // The deamon command name when newly created. (e.g. job_trigger_action_halt)
+  protected $s_Trigger_Action= "";       // The deamon command name when edited. (e.g. trigger_action_halt)
+  protected $s_Queued_Action= "";       // The deamon command name when edited. (e.g. trigger_action_halt)
+  protected $timestamp    = 0;        // Event execution time; 
+  protected $id           = -1;       // The Table ID
+  protected $status       = "unknown";// The current event status
+  protected $is_new       = TRUE;     // Is TRUE if this is a new event
+
+  protected $mode         = SCHEDULED_EVENT; // Default action is sheduled.
+
+  /* Sub dialog hanlding */
+  protected $target_divlist       = NULL;     // The divlist used by the target add dialog
+  protected $target_add_list_used = FALSE;    // Indicates that the target add list was used.
+  protected $time_select_used     = FALSE;    // Indicates that we have used the timestamp select boxes.
+  protected $target_list_used     = FALSE;    // Target list was diaplayed?
+  protected $_target_list         = array();  // Object Cache of those objects displayed in the target add dialog
+  protected $workstation_list     = array();  // Used as cache in the target list.
+  protected $server_list          = array();  // Used as cache in the target list.
+
+  protected $visible_for          = HIDDEN_EVENT;
+  function set_type($type)
+  {
+    $this->mode = $type;
+  }
+
+
+  function get_type()
+  {
+    return($this->mode);
+  }
+
+  /*! \brief  Class contructor.
+    @param  Array   GOsa configuration object.
+    @param  Array   Event data, only given when edited.
+   */
+  public function __construct($config,$data = array())
+  {
+    $this->data   = $data;
+    $this->config = $config;
+    timezone::get_default_timezone();
+    $this->timestamp = time();
+
+    /* Load values from given data */
+    if(count($data)){
+      $this->is_new = FALSE;
+
+      $attrs = array("id" => "ID");
+      foreach($attrs as $to => $from){
+        $this->$to = $data[$from];
+      }
+      if(isset($data['TIMESTAMP'])){
+        $this->timestamp = $this->_event_to_timestamp($data['TIMESTAMP']);
+      }
+    }
+  }
+
+
+  /*! \brief  Create the HTML output for the plugin. 
+    @return String  The generated HTML output.
+   */
+  public function execute()
+  {
+    $this->time_select_used = FALSE;
+    $this->target_list_used = FALSE;
+
+    $str = "<h2>"._("This event has no template.")."</h2>";
+    $str.= "<p class='seperator'></p>";
+    $str.= "<div style='text-align:right;width:100%;padding:3px;'>
+      <input type='submit' name='abort_event_dialog' value='"._("Cancel")."'>
+      </div>";
+    return($str);
+  }
+
+  /*! \brief  Returns the plugin header, displayed in the template.
+    @return String  HTML header part.
+   */
+  public function get_header()
+  {
+    if($this->target_add_list_used){
+      return("");
+    }
+    $str = "<h2>"._("Daemon event")."&nbsp;-&nbsp;".$this->s_Event_Name."</h2>";
+    return($str);
+  }
+
+
+  /*! \brief  Returns the plugin footer (save cancel), displayed in the template.
+    @return String  HTML footer part.
+   */
+  public function get_footer()
+  {
+    if($this->target_add_list_used){
+      return("");
+    }
+    $str = "<p class='seperator'></p>";
+    $str.= "<div style='text-align:right;width:100%;padding:5px;'>
+      <input type='submit' name='save_event_dialog' value='"._("Save")."'>&nbsp;
+    <input type='submit' name='abort_event_dialog' value='"._("Cancel")."'>
+      </div>";
+    return($str);
+  }
+
+
+  /*! \brief  Returns HTML representation of a timestamp using <select> boxes. 
+    @return Returns HTML content.
+   */
+  public function get_time_select()
+  {
+    $this->time_select_used = TRUE;
+
+    $smarty = get_smarty();
+
+    $year   = date("Y",$this->timestamp);
+    $month  = date("m",$this->timestamp);
+    $day    = date("d",$this->timestamp);
+
+    $hour   = date("H",$this->timestamp);
+    $minute = date("i",$this->timestamp);
+    $second = date("s",$this->timestamp);
+
+    $years = array();
+    for($i = date("Y",time()); $i <= 2037 ;$i ++){
+      $years[$i] = $i;
+    }
+    $months = array();
+    for($i = 1; $i <= 12; $i ++){
+      $e = str_pad($i,2,"0",STR_PAD_LEFT);
+      $months[$e] = $e;
+    }
+    $days = array();
+    for($i = 1; $i <= cal_days_in_month(CAL_GREGORIAN,$month,$year); $i ++){
+      $e = str_pad($i,2,"0",STR_PAD_LEFT);
+      $days[$e] = $e;
+    }
+    $hours = array();
+    for($i = 0; $i < 24; $i ++){
+      $e = str_pad($i,2,"0",STR_PAD_LEFT);
+      $hours[$e] = $e;
+    }
+    $minutes = array();
+    for($i = 0; $i < 60; $i ++){
+      $e = str_pad($i,2,"0",STR_PAD_LEFT);
+      $minutes[$e] = $e;
+    }
+    $seconds = array();
+    for($i = 0; $i < 60; $i ++){
+      $e = str_pad($i,2,"0",STR_PAD_LEFT);
+      $seconds[$e] = $e;
+    }
+
+    $smarty->assign("years", $years);
+    $smarty->assign("months", $months);
+    $smarty->assign("days", $days);
+    $smarty->assign("hours", $hours);
+    $smarty->assign("minutes", $minutes);
+    $smarty->assign("seconds", $seconds);
+    $smarty->assign("time_year",$year);
+    $smarty->assign("time_month",$month);
+    $smarty->assign("time_day",$day);
+    $smarty->assign("time_hour",$hour);
+    $smarty->assign("time_minute",$minute);
+    $smarty->assign("time_second",$second);
+    return($smarty->fetch(get_template_path('timestamp_select.tpl', TRUE, dirname(__FILE__))));
+  } 
+
+
+  /*! \brief  HTML representation of all currently assigned targets using (divSelectBox).
+    @return String Returns a listbox with all used targets.
+   */
+  public function get_target_list()
+  {
+    $this->target_list_used = TRUE;
+    $divlist = new divSelectBox("EventTargets");
+    foreach($this->a_targets as $key => $target){
+      $divlist->AddEntry(array(
+            array("string"  => $target),
+            array("string"  => "<input type='image' src='images/edittrash.png' title='"._("Remove")."' name='del_target_".$key."'>",
+              "attach"  => "style='width:20px; border-right:0px;'")
+            ));
+    }
+    $list_footer = "<input type='submit' name='open_target_list' value='"._("Add target")."'>";
+    return($divlist->DrawList().$list_footer);
+  }
+
+
+  /*! \brief  Returns HTML content, displaying a dialog which allows to add new targets.
+    @return String HTML content. (EventTargetAddList)
+   */
+  public function get_target_add_list()
+  {
+    $this->target_add_list_used = TRUE;
+
+    if($this->target_divlist == NULL){ 
+      $this->target_divlist = new EventTargetAddList($this->config,$this);
+    }
+    $this->target_divlist->execute();
+
+    $smarty = get_smarty();
+    $smarty->assign("divlist",$this->target_divlist->Draw());
+    return($smarty->fetch(get_template_path('target_list.tpl', TRUE, dirname(__FILE__))));
+  }
+
+
+  /*! \brief  Handles all posted HTML data, including target add,remove...
+   */
+  public function save_object()
+  {
+    if(isset($_POST['open_target_list'])){
+      $this->target_add_list_used =TRUE;
+    }
+    if($this->target_divlist != NULL){
+      $this->target_divlist->save_object();
+    }
+    if($this->target_add_list_used){
+      if(isset($_POST['abort_target_dialog'])){
+        $this->target_add_list_used =FALSE;
+        $this->target_divlist = NULL;
+      }
+      if(isset($_POST['save_target_dialog'])){
+        $this->target_add_list_used =FALSE;
+        foreach($this->list_get_selected_items() as $id){
+          if(in_array("gosaGroupOfNames",$this->target_divlist->_target_list[$id]['objectClass'])){
+            foreach($this->target_divlist->_target_list[$id]['member'] as $mem_dn){
+              if(isset($this->target_divlist->workstation_list[$mem_dn])){
+                $this->a_targets[] = $this->target_divlist->workstation_list[$mem_dn]['macAddress'][0];  
+              }
+              if(isset($this->target_divlist->server_list[$mem_dn])){
+                $this->a_targets[] = $this->target_divlist->server_list[$mem_dn]['macAddress'][0];  
+              }
+            } 
+          }else{
+            if(isset($this->target_divlist->_target_list[$id]['macAddress'][0])){
+              $this->a_targets[] = $this->target_divlist->_target_list[$id]['macAddress'][0];
+            }
+          }
+        }
+        $this->target_divlist = NULL;
+      }
+    }
+
+    if($this->time_select_used){
+      $time_stamp_values_found = TRUE;
+      foreach(array("time_year","time_month","time_day","time_hour","time_minute","time_second") as $attr){
+        $time_stamp_values_found &= isset($_POST[$attr]);
+      }
+      if($time_stamp_values_found){
+        $this->timestamp = mktime(
+            $_POST['time_hour'],
+            $_POST['time_minute'],        
+            $_POST['time_second'],        
+            $_POST['time_month'],        
+            $_POST['time_day'],        
+            $_POST['time_year']);
+      }
+    }
+
+    if($this->target_list_used){
+      foreach($_POST as $name => $value){
+        if(preg_match("/^del_target_/",$name)){
+          $id = preg_replace("/^del_target_([0-9]*)_.*/","\\1",$name);
+          if(isset($this->a_targets[$id])){
+            unset($this->a_targets[$id]);
+          }
+          break; 
+        }
+      }
+    } 
+  }
+
+
+  /*! \brief  Converts a daemon timestamp into an unix timestamp. \
+    e.g.  20080101125959 -> 1199188799 
+    @param  A daemon timestamp  YYYYddmmHHiiss
+    @return Integer  A unix timestamp.
+   */
+  public function _event_to_timestamp($str)
+  {
+    return(strtotime($str));
+  }
+
+
+  /*! \brief  Converts a unix timestamp in to a gosa-si timestamp. \
+    e.g.  1199188799 -> 20080101125959
+    @param  A unix timestamp (e.g. 1199188799)
+    @return Integer  A daemon timestamp (e.g. 20080101125959).
+   */
+  public function _timestamp_to_event($stamp)
+  {
+    return(date("YmdHis",$stamp));
+  }
+
+
+  /*! \brief  Returns event information, like menu strings, images ... 
+    @return   Array Event informations.
+   */
+  public function get_event_info()
+  {
+    $data =array();
+    $data['CLASS_NAME']         = get_class($this);
+    foreach(array("s_Menu_Name","s_Event_Name","s_Queued_Action","s_Schedule_Action","s_Trigger_Action") as $attr){
+      $data[$attr]  = $this->$attr;
+    }
+    $data['MenuImage']    = "<img src='".$this->s_Menu_Image."' alt='".$this->s_Menu_Name."' border='0' class='center'>";
+    $data['ListImage']    = "<img src='".$this->s_List_Image."' title='".$this->s_Event_Name."' 
+      alt='".$this->s_Event_Name."' border='0' class='center'>";
+    return($data);
+  }
+
+
+  /*! \brief  Check if we have opened the target add dialog. 
+    @return   Boolean TRUE if we have opened the target add dialog else FALSE.
+   */
+  protected function is_target_list_open()
+  {
+    return($this->target_add_list_used);
+  }
+
+
+  /*! \brief  Returns a complete list of all available events.
+    @return   Array   Containing $this->get_event_info() for all available events.
+   */
+  static function get_event_types($type)
+  {
+    global $class_mapping,$config;
+    $list = array();
+    $list['BY_CLASS'] = array();
+    $list['BY_TRIGGERED_ACTION'] = array();
+    $list['BY_SCHEDULED_ACTION'] = array();
+    $list['BY_QUEUED_ACTION'] = array();
+
+    foreach($class_mapping as $name => $path){
+      if(preg_match("/^DaemonEvent_/",$name)){
+        $tmp  = new $name($config);
+
+        if($tmp->visible_for & $type){
+          $evt  = $tmp->get_event_info();
+
+          $list['BY_CLASS'][$name]                      = $evt;
+          $list['BY_TRIGGERED_ACTION'][$evt['s_Trigger_Action']]  = $evt;
+          $list['BY_SCHEDULED_ACTION'][$evt['s_Schedule_Action']] = $evt;
+          $list['BY_QUEUED_ACTION']   [$evt['s_Queued_Action']]   = $evt;
+        }
+      }
+    }
+    return($list);
+  }
+
+
+  /*! \brief  Returns TRUE if this event is new. (Not edited)
+    @return Boolean TRUE if new, else FALSE.
+   */
+  public function is_new()
+  {
+    return($this->is_new);
+  }
+
+
+  /*! \brief  Returns the event tag to schedule a new action 
+    @param    Returns the event e.g. 'job_trigger_action_wake'
+   */
+  public function get_schedule_action()
+  {
+    return($this->s_Schedule_Action);
+  }
+
+  //
+  /*! \brief  Returns the event tag to schedule a new action 
+    @param    Returns the event e.g. 'trigger_action_wake'
+   */
+  public function get_trigger_action()
+  {
+    return($this->s_Trigger_Action);
+  }
+
+  /*! brief  Returns an array containig all attributes \
+    That should be written.
+    @return Array e.g. 'status' => 'bla blub'  
+   */ 
+  public function save()
+  {
+    return(array("timestamp" => $this->_timestamp_to_event($this->timestamp)));
+  }
+
+
+  /*! \brief  Returns the event targets
+    @return Array  All selected targets.
+   */ 
+  public function get_targets()
+  {
+    return($this->a_targets);
+  }
+
+
+  /*! \brief  Returns the event timestamp in GOsa daemon format. 
+    @return Returns the event timestamp (20081231120000)
+   */
+  public function get_timestamp()
+  {
+    return($this->_timestamp_to_event($this->timestamp));
+  }
+
+
+  /*! \brief  Returns the event ID
+    @return Returns the event ID
+   */
+  public function get_id()
+  {
+    if($this->is_new){
+      return(-1);
+    }else{
+      return($this->data['ID']);
+    }
+  }
+
+
+  /*! \brief  Returns a set of elements selected in a MultiSelectWindow
+    @return Array[integer]=integer
+   */
+  protected  function list_get_selected_items()
+  {
+    $ids = array();
+    foreach($_POST as $name => $value){
+      if(preg_match("/^item_selected_[0-9]*$/",$name)){
+        $id   = preg_replace("/^item_selected_/","",$name);
+        $ids[$id] = $id;
+      }
+    }
+    return($ids);
+  }
+
+
+  /*! \brief Add a target MAC address 
+      @param Array A List of all target that should be added.
+   */
+  public function set_timestamp($stamp) 
+  {
+    $this->timestamp = $stamp;
+  }
+
+
+  /*! \brief Add a target MAC address 
+      @param Array A List of all target that should be added.
+   */
+  public function add_targets($targets) 
+  {
+    foreach($targets as $target){
+      $this->a_targets[] = $target;
+    }
+  }
+}
+
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_faireboot.inc b/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_faireboot.inc
new file mode 100644 (file)
index 0000000..e529c91
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+/*
+ * 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
+ */
+
+class DaemonEvent_faireboot extends DaemonEvent
+{
+  public function __construct($config,$data = array())
+  {
+    DaemonEvent::__construct($config,$data);
+    $this->s_Menu_Name  = _("Abort installation");
+    $this->s_Event_Name = _("Abort installation");
+    $this->s_Schedule_Action = "job_trigger_action_faireboot";
+    $this->s_Trigger_Action= "gosa_trigger_action_faireboot";
+    $this->s_Queued_Action= "trigger_action_faireboot";
+    $this->s_Menu_Image = "images/small_error.png";
+    $this->s_List_Image = "images/small_error.png";
+  }
+
+  public function execute()
+  {
+    DaemonEvent::execute();
+
+    $display = $this->get_header();
+
+    $tmp = $this->data;
+
+    /* Check if target add dialog is open */
+    if($this->is_target_list_open() && $this->is_new){
+      return($this->get_target_add_list());
+    }
+
+    $smarty = get_smarty();
+    $smarty->assign("data"        , $this->data);
+    $smarty->assign("target_list" , $this->get_target_list());
+    $smarty->assign("is_new"      , $this->is_new);
+    $smarty->assign("timestamp"   , $this->get_time_select());
+    $display.= $smarty->fetch(get_template_path('DaemonEvent_faireboot.tpl', TRUE, dirname(__FILE__)));
+    $display.= $this->get_footer();
+    return($display);
+  }
+
+  public function save_object()
+  {
+    DaemonEvent::save_object();
+  }
+} 
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_halt.inc b/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_halt.inc
new file mode 100644 (file)
index 0000000..f743f00
--- /dev/null
@@ -0,0 +1,69 @@
+<?php
+/*
+ * 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
+ */
+
+class DaemonEvent_halt extends DaemonEvent
+{
+
+  var $visible_for = SYSTEM_EVENT;
+
+  public function __construct($config,$data = array())
+  {
+    DaemonEvent::__construct($config,$data);
+    $this->s_Menu_Name  = _("Switch off");
+    $this->s_Event_Name = _("Switch off");
+    $this->s_Schedule_Action = "job_trigger_action_halt";
+    $this->s_Trigger_Action= "gosa_trigger_action_halt";
+    $this->s_Queued_Action= "trigger_action_halt";
+    $this->s_Menu_Image = "images/status_stopped.png";
+    $this->s_List_Image = "images/status_stopped.png";
+  }
+
+  public function execute()
+  {
+    DaemonEvent::execute();
+
+    $display = $this->get_header();
+
+    $tmp = $this->data;
+
+    /* Check if target add dialog is open */
+    if($this->is_target_list_open() && $this->is_new){
+      return($this->get_target_add_list());
+    }
+
+    $smarty = get_smarty();
+    $smarty->assign("data"        , $this->data);
+    $smarty->assign("target_list" , $this->get_target_list());
+    $smarty->assign("is_new"      , $this->is_new);
+    $smarty->assign("timestamp"   , $this->get_time_select());
+    $display.= $smarty->fetch(get_template_path('DaemonEvent_halt.tpl', TRUE, dirname(__FILE__)));
+    $display.= $this->get_footer();
+    return($display);
+  }
+
+  public function save_object()
+  {
+    DaemonEvent::save_object();
+  }
+} 
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_install.inc b/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_install.inc
new file mode 100644 (file)
index 0000000..32d5aed
--- /dev/null
@@ -0,0 +1,82 @@
+<?php
+/*
+ * 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
+ */
+
+class DaemonEvent_install extends DaemonEvent
+{
+  var $progress = 0;  
+  var $status   = "";  
+
+  var $visible_for = SYSTEM_EVENT;
+  public function __construct($config,$data = array())
+  {
+    DaemonEvent::__construct($config,$data);
+    $this->s_Menu_Name  = _("Install");
+    $this->s_Event_Name = _("Install");
+    $this->s_Schedule_Action = "job_trigger_action_install";
+    $this->s_Trigger_Action= "gosa_trigger_action_install";
+    $this->s_Queued_Action= "trigger_action_install";
+    $this->s_Menu_Image = "images/fai_small.png";
+    $this->s_List_Image = "images/fai_small.png";
+  
+    if(!$this->is_new()){
+      if(isset($data['PROGRESS'])){
+        $this->progress = $data['PROGRESS'];
+      }
+      if(isset($data['STATUS'])){
+        $this->status = $data['STATUS'];
+      }
+    }
+  }
+
+  public function execute()
+  {
+    DaemonEvent::execute();
+
+    $display = $this->get_header();
+
+    $tmp = $this->data;
+
+    /* Check if target add dialog is open */
+    if($this->is_target_list_open() && $this->is_new){
+      return($this->get_target_add_list());
+    }
+
+    $smarty = get_smarty();
+    $smarty->assign("status"      , $this->status);
+    $smarty->assign("progress"    , $this->progress);
+    $smarty->assign("data"        , $this->data);
+    $smarty->assign("target_list" , $this->get_target_list());
+    $smarty->assign("is_new"      , $this->is_new);
+    $smarty->assign("timestamp"   , $this->get_time_select());
+    $display.= $smarty->fetch(get_template_path('DaemonEvent_install.tpl', TRUE, dirname(__FILE__)));
+    $display.= $this->get_footer();
+    return($display);
+  }
+
+  public function save()
+  {
+    $ret = DaemonEvent::save();
+    return($ret);
+  } 
+} 
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_installation_activation.inc b/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_installation_activation.inc
new file mode 100644 (file)
index 0000000..20b14e4
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+/*
+ * 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
+ */
+
+class DaemonEvent_installation_activation extends DaemonEvent
+{
+  public function __construct($config,$data = array())
+  {
+    DaemonEvent::__construct($config,$data);
+    $this->s_Menu_Name  = _("Installation activation");
+    $this->s_Event_Name = _("Installation activation");
+    $this->s_Schedule_Action  = "job_set_activated_for_installation";
+    $this->s_Trigger_Action   = "gosa_set_activated_for_installation";
+    $this->s_Queued_Action    = "set_activated_for_installation";
+    $this->s_Menu_Image = "images/true.png";
+    $this->s_List_Image = "images/true.png";
+  }
+
+  public function execute()
+  {
+    DaemonEvent::execute();
+
+    $display = $this->get_header();
+
+    $tmp = $this->data;
+
+    /* Check if target add dialog is open */
+    if($this->is_target_list_open() && $this->is_new){
+      return($this->get_target_add_list());
+    }
+
+    $smarty = get_smarty();
+    $smarty->assign("data"        , $this->data);
+    $smarty->assign("target_list" , $this->get_target_list());
+    $smarty->assign("is_new"      , $this->is_new);
+    $smarty->assign("timestamp"   , $this->get_time_select());
+    $display.= $smarty->fetch(get_template_path('DaemonEvent_installation_activation.tpl', TRUE, dirname(__FILE__)));
+    $display.= $this->get_footer();
+    return($display);
+  }
+
+  public function save_object()
+  {
+    DaemonEvent::save_object();
+  }
+} 
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_localboot.inc b/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_localboot.inc
new file mode 100644 (file)
index 0000000..f3ff263
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+/*
+ * 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
+ */
+
+class DaemonEvent_localboot extends DaemonEvent
+{
+  public function __construct($config,$data = array())
+  {
+    DaemonEvent::__construct($config,$data);
+    $this->s_Menu_Name  = _("Force localboot"); 
+    $this->s_Event_Name = _("Force localboot"); 
+    $this->s_Schedule_Action = "job_trigger_action_localboot";
+    $this->s_Trigger_Action= "gosa_trigger_action_localboot";
+    $this->s_Queued_Action= "trigger_action_localboot";
+    $this->s_Menu_Image = "images/select_workstation.png";
+    $this->s_List_Image = "images/select_workstation.png";
+  }
+
+  public function execute()
+  {
+    DaemonEvent::execute();
+
+    $display = $this->get_header();
+
+    $tmp = $this->data;
+
+    /* Check if target add dialog is open */
+    if($this->is_target_list_open() && $this->is_new){
+      return($this->get_target_add_list());
+    }
+
+    $smarty = get_smarty();
+    $smarty->assign("data"        , $this->data);
+    $smarty->assign("target_list" , $this->get_target_list());
+    $smarty->assign("is_new"      , $this->is_new);
+    $smarty->assign("timestamp"   , $this->get_time_select());
+    $display.= $smarty->fetch(get_template_path('DaemonEvent_localboot.tpl', TRUE, dirname(__FILE__)));
+    $display.= $this->get_footer();
+    return($display);
+  }
+
+  public function save_object()
+  {
+    DaemonEvent::save_object();
+  }
+} 
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_memcheck.inc b/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_memcheck.inc
new file mode 100644 (file)
index 0000000..e2d238c
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+/*
+ * 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
+ */
+
+class DaemonEvent_memcheck extends DaemonEvent
+{
+  public function __construct($config,$data = array())
+  {
+    DaemonEvent::__construct($config,$data);
+    $this->s_Menu_Name  = _("Memory test"); 
+    $this->s_Event_Name = _("Memory test"); 
+    $this->s_Schedule_Action= "job_trigger_action_memcheck";
+    $this->s_Trigger_Action = "gosa_trigger_action_memcheck";
+    $this->s_Queued_Action  = "trigger_action_memcheck";
+    $this->s_Menu_Image = "images/memory.png";
+    $this->s_List_Image = "images/memory.png";
+  }
+
+  public function execute()
+  {
+    DaemonEvent::execute();
+
+    $display = $this->get_header();
+
+    $tmp = $this->data;
+
+    /* Check if target add dialog is open */
+    if($this->is_target_list_open() && $this->is_new){
+      return($this->get_target_add_list());
+    }
+
+    $smarty = get_smarty();
+    $smarty->assign("data"        , $this->data);
+    $smarty->assign("target_list" , $this->get_target_list());
+    $smarty->assign("is_new"      , $this->is_new);
+    $smarty->assign("timestamp"   , $this->get_time_select());
+    $display.= $smarty->fetch(get_template_path('DaemonEvent_memcheck.tpl', TRUE, dirname(__FILE__)));
+    $display.= $this->get_footer();
+    return($display);
+  }
+
+  public function save_object()
+  {
+    DaemonEvent::save_object();
+  }
+} 
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_notify.inc b/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_notify.inc
new file mode 100644 (file)
index 0000000..7486e7e
--- /dev/null
@@ -0,0 +1,71 @@
+<?php
+/*
+ * 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
+ */
+
+class DaemonEvent_notify extends DaemonEvent
+{
+  var $visible_for = USER_EVENT;
+  public function __construct($config,$data = array())
+  {
+    DaemonEvent::__construct($config,$data);
+    $this->s_Menu_Name  = _("Send message");
+    $this->s_Event_Name = _("Send message");
+    $this->s_Schedule_Action = "job_trigger_action_notify";
+    $this->s_Trigger_Action= "gosa_trigger_action_notify";
+    $this->s_Queued_Action= "trigger_action_notify";
+    $this->s_Menu_Image = "images/mailto.png";
+    $this->s_List_Image = "images/mailto.png";
+
+    $this->a_targets = array("GOsa");
+  }
+
+  public function execute()
+  {
+    DaemonEvent::execute();
+    $display = $this->get_header();
+    $tmp = $this->data;
+    $smarty = get_smarty();
+    $smarty->assign("subject" ,"subject");
+    $smarty->assign("message" ,"message");
+    $smarty->assign("data"        , $this->data);
+    $smarty->assign("data"        , $this->data);
+    $smarty->assign("is_new"      , $this->is_new);
+    $smarty->assign("timestamp"   , $this->get_time_select());
+    $display.= $smarty->fetch(get_template_path('DaemonEvent_notify.tpl', TRUE, dirname(__FILE__)));
+    $display.= $this->get_footer();
+    return($display);
+  }
+
+  public function save_object()
+  {
+    DaemonEvent::save_object();
+  }
+
+  public function save()
+  {
+    $ret = DaemonEvent::save();
+    $ret['user'] = array("test","asdf");
+    print_a($ret);
+    return($ret);
+  }
+} 
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_reboot.inc b/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_reboot.inc
new file mode 100644 (file)
index 0000000..e0b5599
--- /dev/null
@@ -0,0 +1,67 @@
+<?php
+/*
+ * 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
+ */
+
+class DaemonEvent_reboot extends DaemonEvent
+{
+  var $visible_for = SYSTEM_EVENT;
+  public function __construct($config,$data = array())
+  {
+    DaemonEvent::__construct($config,$data);
+    $this->s_Menu_Name  = _("Reboot"); 
+    $this->s_Event_Name = _("Reboot"); 
+    $this->s_Schedule_Action = "job_trigger_action_reboot";
+    $this->s_Trigger_Action= "gosa_trigger_action_reboot";
+    $this->s_Queued_Action= "trigger_action_reboot";
+    $this->s_Menu_Image = "images/list_reload.png";
+    $this->s_List_Image = "images/list_reload.png";
+  }
+
+  public function execute()
+  {
+    DaemonEvent::execute();
+
+    $display = $this->get_header();
+
+    $tmp = $this->data;
+
+    /* Check if target add dialog is open */
+    if($this->is_target_list_open() && $this->is_new){
+      return($this->get_target_add_list());
+    }
+
+    $smarty = get_smarty();
+    $smarty->assign("data"        , $this->data);
+    $smarty->assign("target_list" , $this->get_target_list());
+    $smarty->assign("is_new"      , $this->is_new);
+    $smarty->assign("timestamp"   , $this->get_time_select());
+    $display.= $smarty->fetch(get_template_path('DaemonEvent_reboot.tpl', TRUE, dirname(__FILE__)));
+    $display.= $this->get_footer();
+    return($display);
+  }
+
+  public function save_object()
+  {
+    DaemonEvent::save_object();
+  }
+} 
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_reinstall.inc b/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_reinstall.inc
new file mode 100644 (file)
index 0000000..77c71c9
--- /dev/null
@@ -0,0 +1,82 @@
+<?php
+/*
+ * 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
+ */
+
+class DaemonEvent_reinstall extends DaemonEvent
+{
+  var $progress = 0;  
+  var $status   = "";  
+  var $visible_for = SYSTEM_EVENT;
+
+  public function __construct($config,$data = array())
+  {
+    DaemonEvent::__construct($config,$data);
+    $this->s_Menu_Name  = _("Reinstall");
+    $this->s_Event_Name = _("Reinstall");
+    $this->s_Schedule_Action = "job_trigger_action_reinstall";
+    $this->s_Trigger_Action= "gosa_trigger_action_reinstall";
+    $this->s_Queued_Action= "trigger_action_reinstall";
+    $this->s_Menu_Image = "images/fai_small.png";
+    $this->s_List_Image = "images/fai_small.png";
+  
+    if(!$this->is_new()){
+      if(isset($data['PROGRESS'])){
+        $this->progress = $data['PROGRESS'];
+      }
+      if(isset($data['STATUS'])){
+        $this->status = $data['STATUS'];
+      }
+    }
+  }
+
+  public function execute()
+  {
+    DaemonEvent::execute();
+
+    $display = $this->get_header();
+
+    $tmp = $this->data;
+
+    /* Check if target add dialog is open */
+    if($this->is_target_list_open() && $this->is_new){
+      return($this->get_target_add_list());
+    }
+
+    $smarty = get_smarty();
+    $smarty->assign("status"      , $this->status);
+    $smarty->assign("progress"    , $this->progress);
+    $smarty->assign("data"        , $this->data);
+    $smarty->assign("target_list" , $this->get_target_list());
+    $smarty->assign("is_new"      , $this->is_new);
+    $smarty->assign("timestamp"   , $this->get_time_select());
+    $display.= $smarty->fetch(get_template_path('DaemonEvent_reinstall.tpl', TRUE, dirname(__FILE__)));
+    $display.= $this->get_footer();
+    return($display);
+  }
+
+  public function save()
+  {
+    $ret = DaemonEvent::save();
+    return($ret);
+  } 
+} 
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_reload_ldap_config.inc b/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_reload_ldap_config.inc
new file mode 100644 (file)
index 0000000..2dcb00f
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+/*
+ * 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
+ */
+
+class DaemonEvent_reload_ldap_config extends DaemonEvent
+{
+  public function __construct($config,$data = array())
+  {
+    DaemonEvent::__construct($config,$data);
+    $this->s_Menu_Name  = _("Reload ldap config"); 
+    $this->s_Event_Name = _("Reload ldap config"); 
+    $this->s_Schedule_Action= "job_reload_ldap_config";
+    $this->s_Trigger_Action = "gosa_reload_ldap_config";
+    $this->s_Queued_Action  = "reload_ldap_config";
+    $this->s_Menu_Image = "images/edit.png";
+    $this->s_List_Image = "images/edit.png";
+  }
+
+  public function execute()
+  {
+    DaemonEvent::execute();
+
+    $display = $this->get_header();
+
+    $tmp = $this->data;
+
+    /* Check if target add dialog is open */
+    if($this->is_target_list_open() && $this->is_new){
+      return($this->get_target_add_list());
+    }
+
+    $smarty = get_smarty();
+    $smarty->assign("data"        , $this->data);
+    $smarty->assign("target_list" , $this->get_target_list());
+    $smarty->assign("is_new"      , $this->is_new);
+    $smarty->assign("timestamp"   , $this->get_time_select());
+    $display.= $smarty->fetch(get_template_path('DaemonEvent_wakeup.tpl', TRUE, dirname(__FILE__)));
+    $display.= $this->get_footer();
+    return($display);
+  }
+
+  public function save_object()
+  {
+    DaemonEvent::save_object();
+  }
+} 
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_rescan.inc b/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_rescan.inc
new file mode 100644 (file)
index 0000000..f446476
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+/*
+ * 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
+ */
+
+class DaemonEvent_rescan extends DaemonEvent
+{
+  public function __construct($config,$data = array())
+  {
+    DaemonEvent::__construct($config,$data);
+    $this->s_Menu_Name  = _("Rescan hardware"); 
+    $this->s_Event_Name = _("Rescan hardware"); 
+    $this->s_Schedule_Action= "job_trigger_action_rescan";
+    $this->s_Trigger_Action = "gosa_trigger_action_rescan";
+    $this->s_Queued_Action  = "trigger_action_rescan";
+    $this->s_Menu_Image = "images/snd_hardware.png";
+    $this->s_List_Image = "images/snd_hardware.png";
+  }
+
+  public function execute()
+  {
+    DaemonEvent::execute();
+
+    $display = $this->get_header();
+
+    $tmp = $this->data;
+
+    /* Check if target add dialog is open */
+    if($this->is_target_list_open() && $this->is_new){
+      return($this->get_target_add_list());
+    }
+
+    $smarty = get_smarty();
+    $smarty->assign("data"        , $this->data);
+    $smarty->assign("target_list" , $this->get_target_list());
+    $smarty->assign("is_new"      , $this->is_new);
+    $smarty->assign("timestamp"   , $this->get_time_select());
+    $display.= $smarty->fetch(get_template_path('DaemonEvent_rescan.tpl', TRUE, dirname(__FILE__)));
+    $display.= $this->get_footer();
+    return($display);
+  }
+
+  public function save_object()
+  {
+    DaemonEvent::save_object();
+  }
+} 
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_sysinfo.inc b/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_sysinfo.inc
new file mode 100644 (file)
index 0000000..0e9cf11
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+/*
+ * 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
+ */
+
+class DaemonEvent_sysinfo extends DaemonEvent
+{
+  public function __construct($config,$data = array())
+  {
+    DaemonEvent::__construct($config,$data);
+    $this->s_Menu_Name  = _("System analysis"); 
+    $this->s_Event_Name = _("System analysis"); 
+    $this->s_Schedule_Action= "job_trigger_action_sysinfo";
+    $this->s_Trigger_Action = "gosa_trigger_action_sysinfo";
+    $this->s_Queued_Action  = "trigger_action_sysinfo";
+    $this->s_Menu_Image = "images/hardware.png";
+    $this->s_List_Image = "images/hardware.png";
+  }
+
+  public function execute()
+  {
+    DaemonEvent::execute();
+
+    $display = $this->get_header();
+
+    $tmp = $this->data;
+
+    /* Check if target add dialog is open */
+    if($this->is_target_list_open() && $this->is_new){
+      return($this->get_target_add_list());
+    }
+
+    $smarty = get_smarty();
+    $smarty->assign("data"        , $this->data);
+    $smarty->assign("target_list" , $this->get_target_list());
+    $smarty->assign("is_new"      , $this->is_new);
+    $smarty->assign("timestamp"   , $this->get_time_select());
+    $display.= $smarty->fetch(get_template_path('DaemonEvent_sysinfo.tpl', TRUE, dirname(__FILE__)));
+    $display.= $this->get_footer();
+    return($display);
+  }
+
+  public function save_object()
+  {
+    DaemonEvent::save_object();
+  }
+} 
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_update.inc b/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_update.inc
new file mode 100644 (file)
index 0000000..bace753
--- /dev/null
@@ -0,0 +1,67 @@
+<?php
+/*
+ * 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
+ */
+
+class DaemonEvent_update extends DaemonEvent
+{
+  var $visible_for = SYSTEM_EVENT;
+  public function __construct($config,$data = array())
+  {
+    DaemonEvent::__construct($config,$data);
+    $this->s_Menu_Name  = _("Software update");
+    $this->s_Event_Name = _("software update");
+    $this->s_Schedule_Action = "job_trigger_action_update";
+    $this->s_Trigger_Action= "gosa_trigger_action_update";
+    $this->s_Queued_Action= "trigger_action_update";
+    $this->s_Menu_Image = "images/time.png";
+    $this->s_List_Image = "images/time.png";
+  }
+
+  public function execute()
+  {
+    DaemonEvent::execute();
+
+    $display = $this->get_header();
+
+    $tmp = $this->data;
+
+    /* Check if target add dialog is open */
+    if($this->is_target_list_open() && $this->is_new){
+      return($this->get_target_add_list());
+    }
+
+    $smarty = get_smarty();
+    $smarty->assign("data"        , $this->data);
+    $smarty->assign("target_list" , $this->get_target_list());
+    $smarty->assign("is_new"      , $this->is_new);
+    $smarty->assign("timestamp"   , $this->get_time_select());
+    $display.= $smarty->fetch(get_template_path('DaemonEvent_update.tpl', TRUE, dirname(__FILE__)));
+    $display.= $this->get_footer();
+    return($display);
+  }
+
+  public function save_object()
+  {
+    DaemonEvent::save_object();
+  }
+} 
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_wakeup.inc b/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_wakeup.inc
new file mode 100644 (file)
index 0000000..729d945
--- /dev/null
@@ -0,0 +1,67 @@
+<?php
+/*
+ * 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
+ */
+
+class DaemonEvent_wakeup extends DaemonEvent
+{
+  var $visible_for = SYSTEM_EVENT;
+  public function __construct($config,$data = array())
+  {
+    DaemonEvent::__construct($config,$data);
+    $this->s_Menu_Name  = _("Wake up"); 
+    $this->s_Event_Name = _("Start a system"); 
+    $this->s_Schedule_Action= "job_trigger_action_wake";
+    $this->s_Trigger_Action = "gosa_trigger_action_wake";
+    $this->s_Queued_Action  = "trigger_action_wake";
+    $this->s_Menu_Image = "images/status_running.png";
+    $this->s_List_Image = "images/status_running.png";
+  }
+
+  public function execute()
+  {
+    DaemonEvent::execute();
+
+    $display = $this->get_header();
+
+    $tmp = $this->data;
+
+    /* Check if target add dialog is open */
+    if($this->is_target_list_open() && $this->is_new){
+      return($this->get_target_add_list());
+    }
+
+    $smarty = get_smarty();
+    $smarty->assign("data"        , $this->data);
+    $smarty->assign("target_list" , $this->get_target_list());
+    $smarty->assign("is_new"      , $this->is_new);
+    $smarty->assign("timestamp"   , $this->get_time_select());
+    $display.= $smarty->fetch(get_template_path('DaemonEvent_wakeup.tpl', TRUE, dirname(__FILE__)));
+    $display.= $this->get_footer();
+    return($display);
+  }
+
+  public function save_object()
+  {
+    DaemonEvent::save_object();
+  }
+} 
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/gosa-plugins/goto/addons/goto/events/class_EventTargetAddList.inc b/gosa-plugins/goto/addons/goto/events/class_EventTargetAddList.inc
new file mode 100644 (file)
index 0000000..e3b5243
--- /dev/null
@@ -0,0 +1,249 @@
+<?php
+/*
+ * 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
+ */
+
+class EventTargetAddList extends MultiSelectWindow
+{
+  public $display_server = TRUE;
+  public $display_workstation = TRUE;
+  public $display_ogroup = TRUE;
+  public $filter_iprange = FALSE;
+
+  public $regex  = "*";
+  public $ipfrom = "0.0.0.0";
+  public $ipto   = "*";
+  public $_target_list = array();
+
+  public $workstation_list = array();
+  public $server_list = array();
+
+
+  function __construct(&$config,$parent)
+  {
+    MultiSelectWindow::MultiSelectWindow($config, "EventTargetAddList", 
+        array("server",
+          "workstation",
+          "ogroup"));
+
+    $this->parent       = $parent;
+    $this->ui           = get_userinfo();
+
+
+    $this->target_divlist = new MultiSelectWindow($this->config,"EventAddTargedtList","gotomasses");
+    $this->SetSummary(_("Targets"));
+    $this->EnableCloseButton(FALSE);
+    $this->EnableSaveButton(FALSE);
+
+    $this->SetInformation(_("This dialog shows all available targets for your event, check the targets you want to add   and use the 'Use' button to accept."));
+
+    /* Toggle all selected / deselected */
+    $chk = "<input type='checkbox' id='select_all' name='select_all'
+      onClick='toggle_all_(\"^item_selected_[0-9]*$\",\"select_all\");' >";
+
+    $this->EnableAplhabet(TRUE);
+
+    /* set Page header */
+    $this->AddHeader(array("string"=> $chk,          "attach"=>"style='width:20px;'"));
+    $this->AddHeader(array("string"=>"&nbsp;","attach"=>"style='width:20px;'"));
+    $this->AddHeader(array("string"=>_("System / Department")));
+
+    //$name,$string,$value,$conn,$image="images/search.png")
+    $this->AddRegex("regex" ,"regex"  ,"*"                , TRUE);
+    $this->AddRegex("ipfrom","ipfrom" ,"0.0.0.0"          , FALSE);
+    $this->AddRegex("ipto"  ,"ipto"   ,"255.255.255.255"  , FALSE);
+
+    $this->AddCheckBox("display_server","1"     ,_("Display server"),TRUE);
+    $this->AddCheckBox("display_workstation","1",_("Display workstation"),TRUE);
+    $this->AddCheckBox("display_ogroup","1"     ,_("Display object groups"),TRUE);
+    $this->AddCheckBox("filter_iprange","1"     ,_("Filter by IP range"),FALSE);
+
+
+
+    /* Create a list of servers
+     */
+    $tmp = get_sub_list("(&(macAddress=*)(objectClass=goServer))",
+          "server",get_ou("serverou"),$config->current['BASE'],
+          array("cn","objectClass","description","ipHostNumber","macAddress"),GL_SUBSEARCH);
+    foreach($tmp as $server){
+      $this->server_list[$server['dn']] = $server;
+    }
+
+    /* Create a list of workstations
+     */
+    $tmp = get_sub_list("(&(macAddress=*)(objectClass=gotoWorkstation))",
+          "server",get_ou("workstationou"),$config->current['BASE'],
+          array("cn","objectClass","description","ipHostNumber","macAddress"),GL_SUBSEARCH);
+    foreach($tmp as $server){
+      $this->workstation_list[$server['dn']] = $server;
+    }
+
+  }
+
+
+  function execute()
+  {
+    $this->ClearElementsList();
+    $this->AddDepartments($this->selectedBase,2,1);
+    $this->setEntries();
+    $this->GenHeader();
+  }
+
+
+  function GenHeader()
+  {
+    $modules = array("server","workstation");
+
+    /* Add base */
+    $tmp = array();
+    $base = $this->config->current['BASE'];
+    $tmp[] = array("dn"=>$this->config->current['BASE']);
+    $tmp=  array_merge($tmp,get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $modules, $base,
+          array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH));
+
+    $deps = array();
+    foreach($tmp as $tm){
+      $deps[$tm['dn']] = $tm['dn'];
+    }
+
+    $department = $departments = array();
+    $ui= get_userinfo();
+    $d = $ui->get_module_departments($modules);
+    foreach($d as $department){
+      $departments[$department] = $department;
+    }
+
+    /* Load possible departments */
+    $ids = $this->config->idepartments;
+    $first = "";
+    $found = FALSE;
+    $options = array();
+    foreach($ids as $dep => $name){
+      if(isset($deps[$dep]) && in_array_ics($dep, $departments)){
+
+        /* Keep first base dn in mind, we could need this
+         *  info if no valid base was found
+         */
+        if(empty($first)) {
+          $first = $dep['dn'];
+        }
+
+        $value = $ids[$dep];
+        if ($this->selectedBase == $dep){
+          $found = TRUE;
+          $options.= "<option selected='selected' value='".$dep."'>$value</option>";
+        } else {
+          $options.= "<option value='".$dep."'>$value</option>";
+        }
+      }
+    }
+
+    $listhead = $this->get_default_header();
+
+    /* Add base selection */
+    $listhead .= _("Base")."&nbsp; <select name='CurrentMainBase' onChange='mainform.submit()' class='center'>$options</select>".
+      " <input class='center' type='image' src='images/list_submit.png' align='middle'
+      title='"._("Submit department")."' name='submit_department' alt='". _("Submit")."'>&nbsp;";
+
+    $this->SetListHeader($listhead);
+
+  }
+
+
+  function setEntries()
+  {
+    $_target_list = array();
+    if($this->display_server){
+      $_target_list = array_merge($_target_list,
+            get_list("(&(cn=".$this->regex.")(objectClass=goServer))",
+            "server",get_ou("serverou").$this->selectedBase,
+            array("cn","objectClass","description","ipHostNumber","macAddress"),GL_NONE));
+    }
+    if($this->display_workstation){
+      $_target_list = array_merge($_target_list,
+            get_list("(&(cn=".$this->regex.")(objectClass=gotoWorkstation))",
+            "workstation",get_ou("workstationou").$this->selectedBase,
+            array("cn","objectClass","description","ipHostNumber","macAddress"),GL_NONE));
+    }
+    if($this->display_ogroup){
+      $_target_list = array_merge($_target_list,
+            get_list("(&(cn=".$this->regex.")(member=*)(objectClass=gosaGroupOfNames))",
+            "ogroups",get_ou("ogroupou").$this->selectedBase,
+            array("cn","objectClass","description","member"),GL_NONE));
+    }
+    $this->_target_list = $_target_list;
+
+    $tmp = array();
+    foreach($this->_target_list as $key => $object){
+      $tmp[$key] = $object['cn'][0];
+    }
+    natcasesort($tmp);
+
+    foreach($tmp as $key => $obj){
+
+      $obj = $this->_target_list[$key];
+      $name = $obj['cn'][0];
+      if(isset($obj['description'])){
+        $name .= "&nbsp;[".$obj['description'][0]."]";
+      }
+      if(isset($obj['macAddress'])){
+        $name .= "&nbsp;- ".$obj['macAddress'][0]."";
+      }
+      if(isset($obj['ipHostNumber'])){
+        $name .= "&nbsp;- ".$obj['ipHostNumber'][0]."";
+      }
+
+      $img ="";
+      if(in_array("goServer",$obj['objectClass'])){
+        $img = '<img class="center" src="images/select_server.png" alt="S" title="'._("Server").'">';
+
+        if($this->filter_iprange){
+          if(!isset($obj['ipHostNumber']) || !tests::is_in_ip_range($this->ipfrom,$this->ipto,             $obj['ipHostNumber'][0])) {
+            continue;
+          }
+        }
+        if(!isset($this->server_list[$obj['dn']])){
+          continue;
+        }
+      }elseif(in_array("gotoWorkstation",$obj['objectClass'])){
+        $img = '<img class="center" src="images/select_workstation.png" alt="W" title="'._("Workstation").'">';
+        if($this->filter_iprange){
+          if(!isset($obj['ipHostNumber']) || !tests::is_in_ip_range($this->ipfrom,$this->ipto,$obj['ipHostNumber'][0])) {
+            continue;
+          }
+        }
+        if(!isset($this->workstation_list[$obj['dn']])){
+          continue;
+        }
+      }elseif(in_array("gosaGroupOfNames",$obj['objectClass'])){
+        $img = '<img class="center" src="images/select_ogroup.png" alt="O" title="'._("Object group").'">';
+      }
+
+      $field1 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>",
+                      "attach" => "style='width:20px;'");
+      $field2 = array("string" => $img,
+                      "attach" => "style='width:20px;'");
+      $field3 = array("string" => $name , "attach" => "title='".$obj['dn']."'");
+      $this->AddElement(array($field1,$field2,$field3));
+    }
+  }
+}
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/gosa-plugins/goto/addons/goto/events/target_list.tpl b/gosa-plugins/goto/addons/goto/events/target_list.tpl
new file mode 100644 (file)
index 0000000..589ff24
--- /dev/null
@@ -0,0 +1,7 @@
+{$divlist}
+
+<p class='seperator'></p>
+<div style='text-align:right;width:100%;padding-top:5px;padding-right:5px;padding-bottom:5px;'>
+       <input type='submit' name='save_target_dialog' value='{t}Use{/t}'>&nbsp;
+       <input type='submit' name='abort_target_dialog' value='{t}Close{/t}'>
+</div>
diff --git a/gosa-plugins/goto/addons/goto/events/timestamp_select.tpl b/gosa-plugins/goto/addons/goto/events/timestamp_select.tpl
new file mode 100644 (file)
index 0000000..c9a206b
--- /dev/null
@@ -0,0 +1,43 @@
+<table cellspacing="0" cellpadding="0">
+       <tr>
+               <td>{t}Jahr{/t}</td>
+               <td>{t}Monat{/t}</td>
+               <td>{t}Tag{/t}</td>
+               <td>{t}Stunde{/t}</td>
+               <td>{t}Minute{/t}</td>
+               <td>{t}Sekunde{/t}</td>
+       </tr>
+       <tr>
+               <td>
+                       <select name="time_year" onChange="document.mainform.submit();">
+                               {html_options values=$years options=$years selected=$time_year}
+                       </select>&nbsp;
+               </td>
+               <td>
+                       <select name="time_month" onChange="document.mainform.submit();">
+                               {html_options values=$months options=$months selected=$time_month}
+                       </select>&nbsp;
+               </td>
+               <td>
+                       <select name="time_day">
+                               {html_options values=$days options=$days selected=$time_day}
+                       </select>&nbsp;
+               </td>
+               <td>
+                       <select name="time_hour">
+                               {html_options values=$hours options=$hours selected=$time_hour}
+                       </select>&nbsp;
+               </td>
+               <td>
+                       <select name="time_minute">
+                               {html_options values=$minutes options=$minutes selected=$time_minute}
+                       </select>&nbsp;
+               </td>
+               <td>
+                       <select name="time_second">
+                               {html_options values=$seconds options=$seconds selected=$time_second}
+                       </select>
+               </td>
+       </tr>
+</table>
+
diff --git a/gosa-plugins/goto/addons/goto/goto_task.tpl b/gosa-plugins/goto/addons/goto/goto_task.tpl
new file mode 100644 (file)
index 0000000..61220bd
--- /dev/null
@@ -0,0 +1,99 @@
+<table style='width:100%'>
+       <tr>
+               <td colspan="2">
+                       <h2><img alt="" src="images/head.png" class="center" align="middle"> {t}Job details{/t}</h2>
+               </td>
+       </tr>
+       <tr>
+               <td style="width:50%;">
+                       <table>
+                <tr><td>{t}Job ID{/t}</td><td>{$ID}</td></tr>
+                               <tr>
+                                       <td>
+                                               {t}Header Tag{/t}
+                                       </td>
+                                       <td>
+                                               <select name="HeaderTag" onChange="document.mainform.submit();">
+                                                       {html_options options=$Actions selected=$HEADERTAG} 
+                                               </select>       
+                                               <input type='image' src="images/list_reload.png"
+                                                alt="{t}Reload{/t}" title="{t}Reload{/t}" class="center">
+                                       </td>
+                               </tr>
+                               <tr>
+                                       <td>&nbsp;
+                                       </td>
+                               </tr>
+                               <tr>
+                                       <td style="vertical-align: top;">       
+                                               {t}Schedule Execution{/t}
+                                       </td>
+                                       <td>
+                                               <table cellspacing="0" cellpadding="0">
+                                                       <tr>
+                                                               <td>{t}Jahr{/t}</td>
+                                                               <td>{t}Monat{/t}</td>
+                                                               <td>{t}Tag{/t}</td>
+                                                               <td>{t}Stunde{/t}</td>
+                                                               <td>{t}Minute{/t}</td>
+                                                               <td>{t}Sekunde{/t}</td>
+                                                       </tr>
+                                                       <tr>
+                                                               <td>    
+                                                                       <select name="time_year" onChange="document.mainform.submit();">
+                                                                               {html_options values=$years options=$years selected=$time_year}
+                                                                       </select>&nbsp;
+                                                               </td>
+                                                               <td>    
+                                                                       <select name="time_month" onChange="document.mainform.submit();">
+                                                                               {html_options values=$months options=$months selected=$time_month}
+                                                                       </select>&nbsp;
+                                                               </td>
+                                                               <td>    
+                                                                       <select name="time_day">
+                                                                               {html_options values=$days options=$days selected=$time_day}
+                                                                       </select>&nbsp;
+                                                               </td>
+                                                               <td>    
+                                                                       <select name="time_hour">
+                                                                               {html_options values=$hours options=$hours selected=$time_hour}
+                                                                       </select>&nbsp;
+                                                               </td>
+                                                               <td>    
+                                                                       <select name="time_minute">
+                                                                               {html_options values=$minutes options=$minutes selected=$time_minute}
+                                                                       </select>&nbsp;
+                                                               </td>
+                                                               <td>    
+                                                                       <select name="time_second">
+                                                                               {html_options values=$seconds options=$seconds selected=$time_second}
+                                                                       </select>
+                                                               </td>
+                                                       </tr>
+                                               </table>
+                                       </td>
+                               </tr>
+                       </table>
+               </td>
+               <td>
+                       <table>
+{if $HEADERTAG == "ping"}
+                               <tr><td>{t}Status{/t}</td><td><input type="text" name="status" value="{$STATUS}"></td></tr>
+                   <tr><td>{t}Mac{/t}</td><td><input type="text" name="macaddress" value="{$MACADDRESS}"></td></tr>
+{elseif $HEADERTAG == "sayHello"}
+                               <tr><td>{t}Status{/t}</td><td><input type="text" name="status" value="{$STATUS}"></td></tr>
+                   <tr><td>{t}Mac{/t}</td><td><input type="text" name="macaddress" value="{$MACADDRESS}"></td></tr>
+{else}
+                               <tr><td>{t}Job type not implented{/t}</td></tr>
+{/if}
+                       </table>
+               </td>
+       </tr>
+</table>
+       
+<p class='seperator'>&nbsp;</p>
+<input type='hidden' name='goto_task_posted' value='1'>
+<p style="text-align:right">
+       <input type='submit' name='save_goto_task' value='{t}Ok{/t}'>
+       <input type='submit' name='close_goto_task' value='{t}Cancel{/t}'>
+</p>
diff --git a/gosa-plugins/goto/addons/goto/gotomasses.tpl b/gosa-plugins/goto/addons/goto/gotomasses.tpl
new file mode 100644 (file)
index 0000000..844cdeb
--- /dev/null
@@ -0,0 +1,4 @@
+{$div}
+<div style="width:65%; text-align: center; float:left;" >
+{$range_selector}
+</div>
diff --git a/gosa-plugins/goto/addons/goto/main.inc b/gosa-plugins/goto/addons/goto/main.inc
new file mode 100644 (file)
index 0000000..8c6bd80
--- /dev/null
@@ -0,0 +1,56 @@
+<?php
+/*
+ * 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
+ */
+
+if (!$remove_lock){
+
+       /* Create gotomasses object on demand */
+       if (!session::is_set('gotomasses') || (isset($_GET['reset']) && $_GET['reset'] == 1) || isset($_POST['reload_gotomass_data'])){
+               $gotomasses= new gotomasses ($config);
+               $gotomasses->set_acl_category("gotomasses");
+
+        /* Check root dn and user dn for acl informations */
+        $gotomasses->set_acl_base($config->current['BASE']);
+        if($gotomasses->getacl("") == ""){
+            $gotomasses->set_acl_base($ui->dn);
+        }
+               
+               /* Check if we have acl on our own base */
+        if($gotomasses->getacl("") == ""){
+            $gotomasses->set_acl_base(dn2base($ui->dn));
+        }
+               session::set("gotomasses",$gotomasses);
+       }
+       $gotomasses = session::get('gotomasses');
+
+       /* Execute formular */
+       $display= $gotomasses->save_object();
+       if(isset($_POST['save_gotomass_changes'])){
+               $gotomasses->save();
+       }
+       $display= $gotomasses->execute ();
+
+       /* Page header*/
+       $display= print_header(get_template_path('images/system.png'), _("System deployment")).$display;
+
+       /* Store changes  in session */
+       session::set('gotomasses',$gotomasses);
+}
diff --git a/gosa-plugins/goto/addons/goto/remove.tpl b/gosa-plugins/goto/addons/goto/remove.tpl
new file mode 100644 (file)
index 0000000..6113ae3
--- /dev/null
@@ -0,0 +1,20 @@
+<div style="font-size:18px;">
+ <img alt="" src="images/button_cancel.png" align=top>&nbsp;{t}Warning{/t}
+</div>
+<p>
+  {$info}
+</p>
+
+<p>
+ {t}So - if you're sure - press 'Delete' to continue or 'Cancel' to abort.{/t}
+</p>
+
+<p class="plugbottom">
+{if $multiple}
+  <input type=submit name="delete_multiple_confirm" value="{t}Delete{/t}">
+{else}
+  <input type=submit name="delete_confirm" value="{t}Delete{/t}">
+{/if}
+  <input type=submit name="delete_cancel" value="{t}Cancel{/t}">
+</p>
+
diff --git a/gosa-plugins/goto/addons/gotomasses/class_gotomasses.inc b/gosa-plugins/goto/addons/gotomasses/class_gotomasses.inc
deleted file mode 100644 (file)
index e1556f5..0000000
+++ /dev/null
@@ -1,766 +0,0 @@
-<?php
-/*
- * 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
- */
-
-class gotomasses extends plugin
-{
-  /* Definitions */
-  var $plHeadline     = "System deployment";
-  var $plDescription  = "This does something";
-
-  /* attribute list for save action */
-  var $attributes= array();
-  var $objectclasses= array();
-
-  /* Queue tasks */
-  var $current        = FALSE;
-  var $dialog         = FALSE;
-  var $ids_to_remove  = array();
-  var $divlist        = NULL;
-
-  var $events         = array();
-  var $event_tags     = array();
-
-  var $sort_by  = "Schedule";
-  var $sort_dir = "down";
-  var $entries  = array();
-  var $range    = 25;
-  var $start    = 0;
-
-  function gotomasses(&$config, $dn= NULL)
-  {
-    /* Include config object */
-    $this->config= &$config;
-    $this->o_queue = new gosaSupportDaemon(TRUE,10);
-    $this->events  = DaemonEvent::get_event_types( SYSTEM_EVENT);
-
-    /* Get tags that will be used in queue searches */
-    $this->event_tags = array("none");
-    foreach($this->events['BY_CLASS'] as $evt){
-      if(isset($evt['s_Queued_Action'])){
-        $this->event_tags[] = $evt['s_Queued_Action'];
-      }
-    }
-  }
-
-
-  function execute()
-  {
-    $smarty = get_smarty();
-    /************
-     * Handle posts 
-     ************/
-    
-    $s_entry = $s_action = "";
-    $arr = array( 
-
-        "/^pause_/"           => "pause",
-        "/^resume_/"          => "resume",
-        "/^execute_process_/" => "execute_process",
-        "/^abort_process_/"   => "abort_process",
-
-        "/^prio_up_/"     => "prio_up",
-        "/^prio_down_/"   => "prio_down",
-
-        "/^edit_task_/"             =>  "edit",
-        "/^remove_task_/"           =>  "remove",
-        "/^new_task_/"              =>  "new_task");;
-
-
-    foreach($arr as $regex => $action){
-      foreach($_POST as $name => $value){
-        if(preg_match($regex,$name)){
-          $s_action = $action;
-          $s_entry  = preg_replace($regex,"",$name);
-          $s_entry  = preg_replace("/_(x|y)$/","",$s_entry);
-        }
-      }
-    }
-
-    /* Menu actions */
-    if(isset($_POST['menu_action']) && !empty($_POST['menu_action'])){
-      $s_action = $_POST['menu_action'];
-    }
-    
-    /* Edit posted from list link */
-    if(isset($_GET['act']) && $_GET['act'] == "edit" && isset($_GET['id']) && isset($this->tasks[$_GET['id']])){
-      $s_action = "edit";
-      $s_entry = $_GET['id'];
-    }
-
-
-    /************
-     * Handle Priority modifications  
-     ************/
-
-    if(preg_match("/^prio_/",$s_action)){
-      switch($s_action){
-        case 'prio_down'  : $this->update_priority($s_entry,"down");break;
-        case 'prio_up'    : $this->update_priority($s_entry,"up");break;
-      }
-    }
-
-    /************
-     * Handle pause/resume/execute modifications  
-     ************/
-
-    if(preg_match("/^resume/",$s_action) || 
-       preg_match("/^pause/",$s_action) || 
-       preg_match("/^abort_process/",$s_action) || 
-       preg_match("/^execute_process/",$s_action)){
-
-      switch($s_action){
-        case 'resume'         : $this->resume_queue_entries   (array($s_entry));break; 
-        case 'pause'          : $this->pause_queue_entries    (array($s_entry));break; 
-        case 'execute_process': $this->execute_queue_entries  (array($s_entry));break; 
-        case 'abort_process'  : $this->abort_queue_entries    (array($s_entry));break; 
-        case 'resume_all'         : $this->resume_queue_entries   ($this->list_get_selected_items());break; 
-        case 'pause_all'          : $this->pause_queue_entries    ($this->list_get_selected_items());break; 
-        case 'execute_process_all': $this->execute_queue_entries  ($this->list_get_selected_items());break; 
-        case 'abort_process_all'  : $this->abort_queue_entries    ($this->list_get_selected_items());break; 
-
-        default : trigger_error("Undefined action setting used (".$s_action.").");
-      }
-      if($this->o_queue->is_error()){
-        msg_dialog::display(_("Error"), $this->o_queue->get_error(), ERROR_DIALOG);
-      }
-    }
-
-    /************
-     * ADD 
-     ************/
-  
-    if(preg_match("/^add_event_/",$s_action)){
-      $type = preg_replace("/^add_event_/","",$s_action);
-      if(isset($this->events['BY_CLASS'][$type])){
-        $e_data = $this->events['BY_CLASS'][$type];
-        $this->dialog = new $e_data['CLASS_NAME']($this->config);
-      }
-    }
-
-    /************
-     * EDIT
-     ************/
-
-    if($s_action == "edit"){  
-      $id =  $s_entry;
-      $type = FALSE;
-      if(isset($this->entries[$id])){
-        $event = $this->entries[$s_entry];
-      
-        
-        if($event['STATUS'] == "waiting" && isset($this->events['BY_QUEUED_ACTION'][$event['HEADERTAG']])){
-          $type = $this->events['BY_QUEUED_ACTION'][$event['HEADERTAG']];
-          $this->dialog = new $type['CLASS_NAME']($this->config,$event);
-        }
-      }
-    }
-
-    /************
-     * REMOVE 
-     ************/
-
-    /* Remove multiple */
-    if($s_action == "remove_multiple" || $s_action == "remove"){
-
-      if(!$this->acl_is_removeable()){
-        msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), ERROR_DIALOG);
-      }else{
-
-        if($s_action == "remove"){
-          $ids = array($s_entry);
-        }else{
-          $ids = $this->list_get_selected_items();
-        }
-
-        if(count($ids)){
-          $ret = $this->o_queue->ids_exist($ids);
-          $ret = $this->o_queue->get_entries_by_id($ret);
-
-          $tmp = "";
-          foreach($ret as $task){
-
-            /* Only remove WAITING or ERROR entries */
-            if(in_array($task['STATUS'],array("waiting","error"))){
-              $this->ids_to_remove[] = $task['ID'];
-              if(isset($this->events['BY_QUEUED_ACTION'][$task['HEADERTAG']])){
-                $evt = $this->events['BY_QUEUED_ACTION'][$task['HEADERTAG']];
-                $tmp.= "\n".$task['ID']." - ".$evt['s_Menu_Name']."&nbsp;".$task['MACADDRESS'];
-              }else{
-                $tmp.= "\n".$task['ID']." - ".$task['HEADERTAG']."&nbsp;".$task['MACADDRESS'];
-              }
-            }
-          }
-          $smarty->assign("multiple", TRUE); 
-          $smarty->assign("info",sprintf(_("You are about to remove the following actions from the GOsa support Daemon: %s"),"<pre>".$tmp."</pre>"));
-          $this->current = $s_entry;
-          return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
-        }
-      }
-    }
-
-    /* Remove specified tasks */
-    if(count($this->ids_to_remove) && isset($_POST['delete_multiple_confirm'])){
-      $this->o_queue->remove_entries($this->ids_to_remove);
-      $this->save();
-    }
-
-    /* Remove aborted */
-    if(isset($_POST['delete_cancel'])){
-      $this->ids_to_remove = array();;
-    }
-
-
-    /************
-     * EDIT 
-     ************/
-
-    /* Close dialog */
-    if(isset($_POST['save_event_dialog'])){
-      if(is_object($this->dialog)){
-        $this->dialog->save_object();
-        if(!$this->o_queue->append($this->dialog)){
-          msg_dialog::display(_("Daemon"),sprintf(_("Something went wrong while talking to the daemon: %s."),
-                $this->o_queue->get_error()),ERROR_DIALOG);
-        }else{
-          $this->dialog = FALSE; 
-          $this->current = -1;
-        } 
-      }
-    }
-
-
-    /* Close dialog */
-    if(isset($_POST['abort_event_dialog'])){
-      $this->dialog = FALSE;
-      $this->current = -1;
-    }
-
-    /* Display dialogs if currently opened */
-    if(is_object($this->dialog)){
-      $this->dialog->save_object();
-      return($this->dialog->execute());
-    }
-
-    /************
-     * Handle Divlist 
-     ************/
-
-    $divlist = new MultiSelectWindow($this->config,"gotoMasses",array("gotomasses"));
-    $divlist->SetInformation(_("This menu allows you to remove and change the properties of GOsa tasks."));
-    $divlist->SetSummary(_("List of queued jobs"));
-    $divlist->EnableCloseButton(FALSE);
-    $divlist->EnableSaveButton(FALSE);
-    $divlist->SetHeadpageMode();
-    $s = ".|"._("Actions")."|\n";
-    $s.= "..|<img src='images/list_new.png' alt='' border='0' class='center'>&nbsp;"._("Create")."\n";
-    foreach($this->events['BY_CLASS'] as $name =>  $event){
-      $s.= "...|".$event['MenuImage']."&nbsp;".$event['s_Menu_Name']."|add_event_".$name."\n";
-    }
-    if($this->acl_is_removeable()){
-      $s.= "..|---|\n";
-      $s.= "..|<img src='images/edittrash.png' alt='' border='0' class='center'>&nbsp;"._("Remove")."|remove_multiple\n";
-    }
-    if(preg_match("/w/",$this->getacl(""))){
-      $s.= "..|---|\n";
-      $s.= "..|<img src='images/status_start.png' alt='' border='0' class='center'>&nbsp;"._("Resume all")."|resume_all\n";
-      $s.= "..|<img src='images/status_pause.png' alt='' border='0' class='center'>&nbsp;"._("Pause all")."|pause_all\n";
-      $s.= "..|<img src='images/small_error.png'  alt='' border='0' class='center'>&nbsp;"._("Abort all")."|abort_process_all\n";
-      $s.= "..|<img src='images/rocket.png'       alt='' border='0' class='center'>&nbsp;"._("Execute all")."|execute_process_all\n";
-    }
-
-    $divlist->SetDropDownHeaderMenu($s);
-
-    if($this->sort_dir == "up"){
-      $sort_img = "<img src='images/sort_up.png' alt='/\' border=0>";
-    }else{
-      $sort_img = "<img src='images/sort_down.png' alt='\/' border=0>";
-    }
-
-    if($this->sort_by == "TargetName"){ $sort_img_1 = $sort_img; } else { $sort_img_1 = "" ;}
-    if($this->sort_by == "TaskID"){ $sort_img_2 = $sort_img; } else { $sort_img_2 = "" ;}
-    if($this->sort_by == "Schedule"){ $sort_img_3 = $sort_img; } else { $sort_img_3 = "" ;}
-    if($this->sort_by == "Action"){ $sort_img_4 = $sort_img; } else { $sort_img_4 = "" ;}
-
-    /* Create divlist */
-    $divlist->SetListHeader("<input type='image' src='images/list_reload.png' title='"._("Reload")."'>");
-
-    $plug  = $_GET['plug'];
-    $chk = "<input type='checkbox' id='select_all' name='select_all'
-               onClick='toggle_all_(\"^item_selected_[0-9]*$\",\"select_all\");' >";
-
-    /* set Page header */
-    $divlist->AddHeader(array("string"=> $chk,          "attach"=>"style='width:20px;'"));
-    $divlist->AddHeader(array("string"=>"<a href='?plug=".$plug."&amp;sort=TargetName'>"._("Target").$sort_img_1."</a>"));
-    $divlist->AddHeader(array("string"=>"<a href='?plug=".$plug."&amp;sort=TaskID'>"._("Task").$sort_img_2."</a>",
-                                      "attach"=>"style='width:120px;'"));
-    $divlist->AddHeader(array("string"=>"<a href='?plug=".$plug."&amp;sort=Schedule'>"._("Schedule").$sort_img_3."</a>",
-                                      "attach"=>"style='width:100px;'"));
-    $divlist->AddHeader(array("string"=>"<a href='?plug=".$plug."&amp;sort=Action'>"._("Status").$sort_img_4."</a>",
-                                      "attach"=>"style='width:80px;'"));
-    $divlist->AddHeader(array("string"=>_("Action"),
-                                      "attach"=>"style='border-right:0px;width:120px;'"));
-
-
-    /* Reload the list of entries */
-    $this->reload();
-
-    foreach($this->entries as $key => $task){
-
-      $prio_actions="";
-      $action = "";
-
-      /* If WAITING add priority action
-       */  
-      if(in_array($task['STATUS'],array("waiting"))){
-        $prio_actions.= "<input class='center' type='image' src='images/prio_increase.png' 
-          title='"._("Move up in execution queue")."' name='prio_up_".$key."'>&nbsp;";
-        $prio_actions.= "<input class='center' type='image' src='images/prio_decrease.png' 
-          title='"._("Move down in execution queue")."' name='prio_down_".$key."'>&nbsp;";
-      }
-    
-      /* If WAITING add pause action
-       */  
-      if(in_array($task['STATUS'],array("waiting"))){
-        $prio_actions.= "<input class='center' type='image' src='images/status_pause.png' 
-          title='"._("Pause job")."' name='pause_".$key."'>&nbsp;";
-      }
-
-      /* If PAUSED add resume action
-       */  
-      if(in_array($task['STATUS'],array("paused"))){
-        $prio_actions.= "<input class='center' type='image' src='images/status_start.png' 
-          title='"._("Resume job")."' name='resume_".$key."'>&nbsp;";
-      }
-
-      /* If PROCESSING add abort action
-       */  
-      if(in_array($task['STATUS'],array("processing"))){
-        $prio_actions.= "<input class='center' type='image' src='images/small_error.png' 
-          title='"._("Abort execution")."' name='abort_process_".$key."'>";
-      }
-
-      /* If PAUSED or WAITING add execution action
-       */  
-      if(in_array($task['STATUS'],array("paused","waiting"))){
-        $prio_actions.= "<input class='center' type='image' src='images/rocket.png' 
-          title='"._("Force execution now!")."' name='execute_process_".$key."'>&nbsp;";
-      }
-
-      /* If PAUSED or WAITING add edit action
-       */  
-      if(in_array($task['STATUS'],array("waiting"))){
-        $action.= "<input type='image' src='images/edit.png' name='edit_task_".$key."' 
-          class='center' alt='"._("Edit")."'>";
-      }
-
-      /* If WAITING or ERROR add remove action
-       */  
-      if( $this->acl_is_removeable() && in_array($task['STATUS'],array("waiting","error"))){
-        $action.= "<input type='image' src='images/edittrash.png' name='remove_task_".$key."' 
-          class='center' alt='"._("Remove")."'>";
-      }
-
-      $color = "";
-      $display = $task['MACADDRESS'];
-      $display2= $task['HEADERTAG'];
-     
-      /* Check if this event exists as Daemon class 
-       * In this case, display a more accurate entry.
-       */ 
-      if(isset($this->events['BY_QUEUED_ACTION'][$task['HEADERTAG']]['s_Menu_Name'])){
-        $event_type = $this->events['BY_QUEUED_ACTION'][$task['HEADERTAG']];
-        $display2= $event_type['s_Menu_Name'];
-
-        if(strlen($display2) > 20){
-          $display2 = substr($display2,0,18)."...";
-        }
-
-        if(isset($event_type['ListImage']) && !empty($event_type['ListImage'])){
-          $display2 = $event_type['ListImage']."&nbsp;".$display2;
-        }
-      } 
-
-      $status = $task['STATUS'];
-  
-      if($status == "waiting"){
-        $status = "<img class='center' src='images/clock.png' alt=''>&nbsp;"._("Waiting");
-      }
-      if($status == "error"){
-        $status = "<img class='center' src='images/false.png' alt=''>&nbsp;"._("Error");
-      }
-
-      /* Special handling for all entries that have 
-          STATUS == "processing" && PROGRESS == NUMERIC
-       */
-      if($status == "processing" && isset($task['PROGRESS'])){
-        $percent = $task['PROGRESS'];
-        $status = "<img src='progress.php?x=80&amp;y=13&amp;p=".$percent."' alt='".$percent."&nbsp;%'>";
-      }
-
-
-      /* Create each field */
-      $field0 = array("string" => "<input type='checkbox' id='item_selected_".$task['ID']."' name='item_selected_".$key."'>" ,
-                      "attach" => "style='width:20px;".$color."'");
-      $field1 = array("string" => $display,
-                      "attach" => "style='".$color."'");
-      $field1a= array("string" => $display2,
-                      "attach" => "style='".$color.";width:120px;'");
-      $field2 = array("string" => date("d.m.Y H:i:s",strtotime($task['TIMESTAMP'])),"attach" => "style='".$color.";width:100px;'");
-      $field3 = array("string" => $status,"attach" => "style='".$color.";width:80px;'");
-      $field4 = array("string" => $prio_actions.$action,"attach" => "style='".$color.";text-align:right;width:120px;border-right:0px;'");
-      $divlist->AddElement(array($field0,$field1,$field1a,$field2,$field3,$field4));
-    }
-
-    $smarty = get_smarty();
-    $smarty->assign("events",$this->events);
-    $smarty->assign("start",$this->start);
-    $smarty->assign("start_real", ($this->start + 1));
-    $smarty->assign("ranges", array("10" => "10",
-                                    "20" => "20",
-                                    "25" => "25",
-                                    "50" => "50",
-                                    "100"=> "100",
-                                    "200"=> "200",
-                                    "9999" => "*"));
-
-    $count = $this->o_queue->number_of_queued_entries();
-    $smarty->assign("range_selector", range_selector($count, $this->start, $this->range,"range"));
-    $smarty->assign("range",$this->range);
-    $smarty->assign("div",$divlist->Draw());
-    return($smarty->fetch (get_template_path('gotomasses.tpl', TRUE, dirname(__FILE__))));
-  }
-
-
-  /*! \brief  Move an entry up or down in the queue, by updating its execution timestamp  
-      @param  $id     Integer  The ID of the entry which should be updated.
-      @param  $type   String   "up" / "down"
-      @return boolean TRUE in case of success else FALSE
-  */
-  public function update_priority($id,$type = "up")
-  {
-    if($type == "up"){
-      $tmp = $this->o_queue->get_queued_entries($this->event_tags,-1,-1,"timestamp DESC");
-    }else{
-      $tmp = $this->o_queue->get_queued_entries($this->event_tags,-1,-1,"timestamp ASC");
-    }
-    $last = array();
-    foreach($tmp as $entry){
-      if($entry['ID'] == $id){
-        if(count($last)){
-          $time = strtotime($last['TIMESTAMP']);
-          if($type == "up"){
-            $time ++;
-          }else{
-            $time --;
-          }
-          $time_str = date("YmdHis",$time); 
-          return($this->o_queue->update_entries(array($id),array("timestamp" => $time_str)));
-        }else{
-          return(FALSE);
-        }
-      }
-      $last = $entry;
-    }
-    return(FALSE);
-  }
-
-
-  /*! \brief  Resumes to status 'waiting'.
-   *  @return Boolean TRUE in case of success, else FALSE. 
-   */
-  private function resume_queue_entries($ids)
-  {
-    if(!count($ids)){
-      return;
-    }
-
-    /* Entries are resumed by setting the status to 
-     *  'waiting'
-     */
-    $data = array("status"    => "waiting");
-  
-    /* Check if given ids are valid and check if the status
-     *  allows resuming.
-     */
-    $update_ids = array();
-    foreach($this->o_queue->get_entries_by_id($ids) as $entry){
-      if(isset($entry['STATUS']) && preg_match("/paused/",$entry['STATUS'])){
-        $update_ids[] = $entry['ID'];
-      }
-    }
-
-    /* Tell the daemon that we have entries to update.
-     */
-    if(count($update_ids)){
-      if(!$this->o_queue->update_entries($update_ids,$data)){
-        msg_dialog::display(_("Error"), sprintf(_("Could not update queue entry: %s"),$id) , ERROR_DIALOG);
-        return(FALSE);
-      }
-    }
-    return(TRUE);
-  }
-
-
-  /*! \brief  Force queue job to be done as far as possible.
-   *  @return Boolean TRUE in case of success, else FALSE.
-   */
-  private function execute_queue_entries($ids)
-  {
-    if(!count($ids)){
-      return;
-    }
-
-    /* Execution is forced by updating the status to 
-     *  waiting and setting the timestamp to current time.
-     */
-    $data = array(  "timestamp" => date("YmdHis",time()), 
-                    "status"    => "waiting");
-
-    /* Only allow execution of paused or waiting entries 
-     */
-    $update_ids = array();
-    foreach($this->o_queue->get_entries_by_id($ids) as $entry){
-      if(in_array($entry['STATUS'],array("paused","waiting"))){
-        $update_ids[] = $entry['ID'];
-      }
-    }
-
-    /* Tell the daemon that we want to update some entries
-     */
-    if(count($update_ids)){
-      if(!$this->o_queue->update_entries($update_ids,$data)){
-        msg_dialog::display(_("Error"), sprintf(_("Could not update queue entries.")) , ERROR_DIALOG);
-        return(FALSE);
-      }
-    }
-    return(TRUE);
-  }
-
-
-  /*! \brief  Force queue job to be done as far as possible.
-   *  @return Boolean TRUE in case of success, else FALSE.
-   */
-  private function abort_queue_entries($ids)
-  {
-    if(!count($ids)){
-      return;
-    }
-
-    /* Entries are paused by setting the status to
-     *  something different from 'waiting'.
-     * We simply use 'paused'.
-     */
-    $data = array("status"    => "paused");
-
-    /* Detect if the ids we got are valid and
-     *  check if the status allows pausing.
-     */
-    $update_ids = array();
-    foreach($this->o_queue->get_entries_by_id($ids) as $entry){
-      if(isset($entry['STATUS']) && preg_match("/processing/",$entry['STATUS'])){
-        if(isset($entry['MACADDRESS'])){
-          $update_ids[] = $entry['MACADDRESS'];
-        }else{
-          trigger_error("No mac address found in event.");
-        }
-      }
-    }
-
-    if(class_available("DaemonEvent_faireboot")){
-      $tmp = new DaemonEvent_faireboot($this->config);
-      $tmp->add_targets($update_ids);
-      if(!$this->o_queue->append($tmp)){
-        msg_dialog::display(_("Error"), sprintf(_("Could not update queue entry: %s"),$id) , ERROR_DIALOG);
-        return(FALSE);
-      }
-    }else{
-      msg_dialog::display(_("Error"),
-          sprintf(_("The Job could not be aborted, the '%s' event class was not found."),
-            "DaemonEvent_faireboot") , ERROR_DIALOG);
-    }
-  }
-
-
-  /*! \brief Pauses the specified queue entry from execution.
-   *  @return Boolean TRUE in case of success, else FALSE. 
-   */
-  private function pause_queue_entries($ids)
-  {
-    if(!count($ids)){
-      return;
-    }
-
-    /* Entries are paused by setting the status to 
-     *  something different from 'waiting'.
-     * We simply use 'paused'.
-     */   
-    $data = array("status"    => "paused");
-
-    /* Detect if the ids we got are valid and
-     *  check if the status allows pausing.
-     */ 
-    $update_ids = array();
-    foreach($this->o_queue->get_entries_by_id($ids) as $entry){
-      if(isset($entry['STATUS']) && preg_match("/waiting/",$entry['STATUS'])){
-        $update_ids[] = $entry['ID'];
-      }
-    }
-
-    /* Tell the daemon that we want to update some entries
-     */
-    if(count($update_ids)){
-      if(!$this->o_queue->update_entries($update_ids,$data)){
-        msg_dialog::display(_("Error"), sprintf(_("Could not update queue entry: %s"),$id) , ERROR_DIALOG);
-        return(FALSE);
-      }
-    }
-    return(TRUE);
-  }
-
-
-  /*! \brief  Request list of queued jobs.
-   *  @return Returns an array of all queued jobs.
-   */
-  function reload()
-  {
-
-    /* Sort map   html-post-name => daemon-col-name
-     */
-    $map = array(
-        "QueuePosition" => "id",
-        "Action"        => "status",
-        "TaskID"        => "headertag",
-        "TargetName"    => "macaddress",
-        "Schedule"      => "timestamp");
-
-    /* Create sort header 
-     */
-    if(!isset($map[$this->sort_by])){
-      $sort = "id DESC";
-    }else{
-      $sort   = $map[$this->sort_by]; 
-      if($this->sort_dir == "up"){
-        $sort.= " ASC";
-      }else{
-        $sort.= " DESC";
-      }
-    }
-     
-    /* Get entries. */ 
-    $start  = $this->start; 
-    $stop   = $this->range;
-    $entries = $this->o_queue->get_queued_entries($this->event_tags,$start,$stop,$sort);
-    if ($this->o_queue->is_error()){
-      msg_dialog::display(_("Error"), sprintf(_("Cannot load queue entries: %s"), "<br><br>".$this->o_queue->get_error()), ERROR_DIALOG);
-    }
-
-    /* Assign entries by id.
-     */
-    $this->entries = array();
-    foreach($entries as $entry){
-      $this->entries[$entry['ID']]= $entry;
-    }
-  }
-
-
-  /*! \brief  Handle post jobs, like sorting.
-   */
-  function save_object()
-  {
-    /* Check for sorting changes 
-     */
-    $sort_vals = array("Action","QueuePosition","TargetName","Schedule","TaskID");
-    if(isset($_GET['sort']) && in_array($_GET['sort'],$sort_vals)){
-      $sort = $_GET['sort'];
-      if($this->sort_by == $sort){
-        if($this->sort_dir == "up"){
-          $this->sort_dir = "down";
-        }else{
-          $this->sort_dir = "up";
-        }
-      }
-      $this->sort_by = $sort;
-    }
-
-    /* Range selection used? */
-    if(isset($_POST['range']) && is_numeric($_POST['range'])){
-      $this->range = $_POST['range'];
-    }
-    
-    /* Page changed. */
-    if(isset($_GET['start'])){
-      $start = $_GET['start'];
-      if(is_numeric($start) || $start == 0){
-        $this->start = $start;
-      }
-    }
-
-    /* Check start stop and reset if necessary */
-    $count = $this->o_queue->number_of_queued_entries();
-    if($this->start >= $count){
-      $this->start = $count -1;
-    }
-    if($this->start < 0){
-      $this->start = 0;
-    }
-  }
-
-
-  function save()
-  {
-    // We do not save anything here.
-  }
-
-
-  /*! \brief  Return a list of all selected items.
-    @return Array   Returns an array containing all selected item ids.
-   */
-  function list_get_selected_items()
-  {
-    $ids = array();
-    foreach($_POST as $name => $value){
-      if(preg_match("/^item_selected_[0-9]*$/",$name)){
-        $id   = preg_replace("/^item_selected_/","",$name);
-        $ids[$id] = $id;
-      }
-    }
-    return($ids);
-  }
-
-
-  static function plInfo()
-  {
-    return (array(
-          "plShortName"   => _("System mass deployment"),
-          "plDescription" => _("Provide a mechanism to automatically activate a set of systems"),
-          "plSelfModify"  => FALSE,
-          "plDepends"     => array(),
-          "plPriority"    => 0,
-          "plSection"     => array("addon"),
-          "plCategory"    => array("gotomasses" => array("objectClass" => "none", "description" => _("System mass deployment"))),
-          "plProvidedAcls" => array("Comment"   => _("Description")) 
-          ));
-  }
-}
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/goto/addons/gotomasses/class_target_list.inc b/gosa-plugins/goto/addons/gotomasses/class_target_list.inc
deleted file mode 100644 (file)
index d2c49ae..0000000
+++ /dev/null
@@ -1,335 +0,0 @@
-<?php
-/*
- * 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
- */
-
-class target_list extends MultiSelectWindow
-{
-  var $config;
-  var $list         =array();
-  var $Targets_used =array();
-
-  /* Current base */
-  var $selectedBase       = "";
-  var $departments        = array();
-
-  /* Regex */
-  var $Regex              = "*";
-  var $IP_start           = "0.0.0.0";
-  var $IP_end             = "255.255.255.255";
-
-  /* CheckBoxes, to change default values modify $this->AddCheckBox */
-  var $ogroups        ;
-  var $servers        ;
-  var $workstations   ;
-  var $incoming       ;
-
-
-  /* Subsearch checkbox */
-  var $SubSearch          ;
-  var $IPMatch            ;
-  var $parent             ;
-  var $ui                 ;
-  function target_list(&$config,$Targets_used)
-  {
-    MultiSelectWindow::MultiSelectWindow($config, "Targetselection", array("ogroup","server","incoming","workstation","gotomasses"));
-
-    $this->Targets_used = $Targets_used;
-    
-    $this->SetInformation(  _("Select the target objects for your scheduled action."));
-    $this->SetTitle(        _("Available targets"));
-    $this->SetSummary(      _("Available targets"));
-    $this->SetHeadpageMode(FALSE);
-    
-    /* set Page header */
-    $chk = "<input type='checkbox' id='select_all' name='select_all'
-               onClick='toggle_all_(\"^item_selected_[0-9]*$\",\"select_all\");' >";
-    $this->AddHeader(array("string"=> $chk,          "attach"=>"style='width:20px;'"));
-
-    $this->AddHeader(array("string" => "&nbsp;", "attach" => "style='text-align:center;width:20px;'"));
-    $this->AddHeader(array("string" => _("Object name"), "attach" => "style=''"));
-
-    /* Text ,Value, Name, Is selected */
-    $this->AddCheckBox("ogroups",       _("Select to see object groups"),  _("Show object groups"), true);
-    $this->AddCheckBox("servers",       _("Select to see servers")  ,   _("Show servers"), true);
-    $this->AddCheckBox("workstations",  _("Select to see workstations"),_("Show workstations"), true);
-    $this->AddCheckBox("incoming",      _("Select to see incoming objects")  , _("Show new objects"), true);
-
-    /* Add SubSearch checkbox */
-    $this->AddCheckBox(SEPERATOR);
-    $this->AddCheckBox("SubSearch",  _("Select to search within subtrees"), _("Search in subtrees"), false);
-    $this->AddCheckBox("IPMatch",    _("Select to search for a specific IP range only"), _("Match IP range"), false);
-
-    /* Name,Text,Default  , Connect with alphabet  */
-    $this->AddRegex   ("Regex",     _("Regular expression for matching group names"), "*" , true);
-    $this->AddRegex   ("IP_start",  _("IP range start"),  "0.0.0.0" , true);
-    $this->AddRegex   ("IP_end",    _("IP range end"),    "255.255.255.255" , true);
-    $this->EnableAplhabet(TRUE);
-  }
-
-
-  function GenHeader()
-  {
-    $options= "";
-
-    /* Get all departments within this subtree */
-    $ui= get_userinfo();
-    $first = "";
-    $found = FALSE;
-    $base = $this->config->current['BASE'];
-
-    /* Add base */
-    $tmp = array();
-    $tmp[] = array("dn"=>$this->config->current['BASE']);
-    $tmp=  array_merge($tmp,get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base,
-                    array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH));
-
-    $deps = array();
-    foreach($tmp as $tm){
-      $deps[$tm['dn']] = $tm['dn'];
-    }
-
-    /* Load possible departments */
-    $ui= get_userinfo();
-    $tdeps= $ui->get_module_departments("ogroups");
-    $ids = $this->config->idepartments;
-    $first = "";
-    $found = FALSE;
-    foreach($ids as $dep => $name){
-      if(isset($deps[$dep]) && in_array_ics($dep, $tdeps)){
-
-        /* Keep first base dn in mind, we could need this
-         *  info if no valid base was found
-         */
-        if(empty($first)) {
-          $first = $dep['dn'];
-        }
-
-        $value = $ids[$dep];
-        if ($this->selectedBase == $dep){
-          $found = TRUE;
-          $options.= "<option selected='selected' value='".$dep."'>$value</option>";
-        } else {
-          $options.= "<option value='".$dep."'>$value</option>";
-        }
-      }
-    }
-
-    /* The currently used base is not visible with your acl setup.
-     * Set base to first useable base.
-     */
-    if(!$found){
-      $this->selectedBase = $first;
-    }
-
-    /* Get copy & paste icon */
-    $acls  = $ui->get_permissions($this->selectedBase,"ogroups/ogroup");
-    $acl_all= $ui->has_complete_category_acls($this->selectedBase,"ogroups");
-
-    /* Add default header */
-    $listhead = MultiSelectWindow::get_default_header();
-
-    /* Add department selector */
-    $listhead .= _("Base")."&nbsp;<select name='CurrentMainBase' onChange='mainform.submit()' class='center'>$options</select>".
-      " <input class='center' type='image' src='images/list_submit.png' align='middle'
-      title='"._("Submit department")."' name='submit_department' alt='"._("Submit")."'>&nbsp;";
-    $listhead .="</div>";
-
-    $this->SetListHeader($listhead);
-  }
-
-
-  function execute()
-  {
-    $this->ClearElementsList();
-    $this->GenHeader();
-    $this->reload();
-    $this->SetEntries($this->list);
-    return($this->Draw());
-  }
-
-  
-  function SetEntries($list)
-  {
-      /* Add Copy & Paste buttons if copy&paste is enabled
-     */
-    // Defining Links
-    $linkopen = "<a href='?plug=".$_GET['plug']."&amp;act=dep_open&amp;dep_id=%s'>%s</a>";
-    $editlink = "<a href='?plug=".$_GET['plug']."&amp;id=%s&amp;act=edit_entry'>%s</a>";
-
-    $ui = get_userinfo();
-
-    // Assigning ogroups
-    foreach($list as $key => $val){
-
-      if(in_array($val['cn'][0],$this->Targets_used) || 
-         isset($val['macAddress'][0]) && in_array($val['macAddress'][0],$this->Targets_used)) continue;
-
-      $title = "title='".preg_replace('/ /', '&nbsp;', @LDAP::fix($val['dn']))."'";
-      if(!isset($val['description'][0])){
-        $desc = "";
-      }else{
-        $desc = " - [ ".$val['description'][0]." ]";
-      }
-      if(!isset($val['ipHostNumber'][0])){
-        $desc.= "";
-      }else{
-        $desc.= " - ".$val['ipHostNumber'][0]."";
-      }
-
-
-      $img ="Hmm";
-      if(in_array("goServer",$val['objectClass'])){
-        $img = "<img src='images/select_server.png' alt='"._("Server")."' ".$title.">";
-      }elseif(in_array("gotoWorkstation",$val['objectClass'])){
-        $img = "<img src='images/select_workstation.png' alt='"._("Workstation")."' ".$title.">";
-      }elseif(in_array("gosaGroupOfNames",$val['objectClass'])){
-        $img = "<img src='images/list_ogroup.png' alt='"._("Object group")."' ".$title.">";
-      }
-
-      /* Create each field */
-      $field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
-                      "attach" => "style='width:20px;'");
-      $field1 = array("string" => $img, 
-                      "attach" => "style='text-   align:center;width: 20px;'");
-      $field2 = array("string" => $val['cn'][0].$desc, 
-                      "attach" => "style='border-right:0px;' ".$title);
-
-      $this->AddElement(array($field0,$field1,$field2));
-    }
-  }
-
-  
-  function save()
-  { 
-    $ret = array();
-    $items = $this->list_get_selected_items();
-    foreach($items as $item){
-      $ret[] = $this->list[$item];
-    }
-    return($ret);
-  }
-
-
-  function save_object()
-  {
-    MultiSelectWindow::save_object();
-  }
-
-  
-  function reload()
-  {
-    /* Set base for all searches && initialise some vars */
-    $this->list= array();
-    $base     = $this->selectedBase;
-    $filter   = "";
-    $Regex    = $this->Regex;
-    $IP_start = $this->IP_start;
-    $IP_end   = $this->IP_end;
-
-    if($this->IPMatch){
-      if(!tests::is_ip($IP_start)){
-       msg_dialog::display(_("Error"), _("IP range is invalid!"), ERROR_DIALOG);
-        return;
-      }
-      if(!tests::is_ip($IP_end)){
-       msg_dialog::display(_("Error"), _("IP range is invalid!"), ERROR_DIALOG);
-        return;
-      }
-    }
-  
-
-    $chk = array(
-        "ogroups"       => "(&(objectClass=gosaGroupOfNames)(|(gosaGroupObjects=*S*)(gosaGroupObjects=*W*)))" ,
-        "servers"       => "(objectClass=goServer)" ,
-        "incoming"      => "(objectClass=GOhard)" ,
-        "workstations"  => "(objectClass=gotoWorkstation)");
-
-    /* Create filter */
-    foreach($chk as $chkBox => $FilterPart){
-      if($this->$chkBox){
-        $filter .=  $FilterPart;
-      }
-    }
-    $filter= "(&(cn=".$Regex.")(|".$filter."))";
-
-    if($this->SubSearch){
-      $res= get_list($filter, array("ogroups","workstations","servers"), $base, 
-            array("cn","objectClass","gosaGroupObjects","ipHostNumber","description"), GL_SIZELIMIT | GL_SUBSEARCH);
-    }else{
-      $res= get_list($filter, "ogroups", get_groups_ou().$base, 
-            array("cn","objectClass","ipHostNumber","description"), GL_SIZELIMIT );
-      $res= array_merge($res,get_list($filter, "workstation",  get_ou('workstationou').$base, 
-            array("cn","objectClass","ipHostNumber","description"), GL_SIZELIMIT ));
-      $res= array_merge($res,get_list($filter, "server", get_ou('serverou').$base, 
-            array("cn","objectClass","ipHostNumber","description"), GL_SIZELIMIT ));
-
-      $deps_a = array(
-          get_ou("workstationou"),
-          get_ou("incominou"),
-          get_ou("serverou"),
-          get_ou("ogroupou"));
-
-      $res = get_sub_list($filter,array("server","incoming","workstation","ogroup"), 
-                  $deps_a,get_ou("systemsou").$base,array("cn","objectClass","ipHostNumber","description"),GL_SIZELIMIT);
-    }
-
-    $this->list= $res;
-    ksort ($this->list);
-    reset ($this->list);
-    $tmp=array();
-    foreach($this->list as $tkey => $val ){
-
-      if($this->IPMatch){
-        if(isset($val['ipHostNumber'][0])){
-          if(tests::is_ip_range($IP_start,$val['ipHostNumber'][0]) && tests::is_ip_range($val['ipHostNumber'][0],$IP_end)){
-            $tmp[strtolower($val['cn'][0]).$val['cn'][0]]=$val;
-          }
-        }
-      }else{
-        $tmp[strtolower($val['cn'][0]).$val['cn'][0]]=$val;
-      }
-    }
-    ksort($tmp);
-    $this->list=array();
-    foreach($tmp as $val){
-      $this->list[]=$val;
-    }
-    reset ($this->list);
-  }
-
-  function list_get_selected_items()
-  {
-    $ids = array();
-    foreach($_POST as $name => $value){
-      if(preg_match("/^item_selected_[0-9]*$/",$name)){
-        $id   = preg_replace("/^item_selected_/","",$name);
-        $ids[$id] = $id;
-      }
-    }
-    return($ids);
-  }
-}
-
-
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_faireboot.tpl b/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_faireboot.tpl
deleted file mode 100644 (file)
index 4e3fc12..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-
-{if $is_new}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table style='width:100%;'>
-                               <tr>
-                                       <td>
-                                               {t}Target objects{/t}
-                                               <br>
-                                               {$target_list}
-                                       </td>
-                               </tr>
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{else}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td>{t}ID{/t}</td>
-                                       <td>{$data.ID}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Status{/t}</td>
-                                       <td>{$data.STATUS}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Result{/t}</td>
-                                       <td>{$data.RESULT}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Target{/t}</td>
-                                       <td>{$data.MACADDRESS}</td>
-                               </tr>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table >
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{/if}
diff --git a/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_halt.tpl b/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_halt.tpl
deleted file mode 100644 (file)
index 4e3fc12..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-
-{if $is_new}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table style='width:100%;'>
-                               <tr>
-                                       <td>
-                                               {t}Target objects{/t}
-                                               <br>
-                                               {$target_list}
-                                       </td>
-                               </tr>
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{else}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td>{t}ID{/t}</td>
-                                       <td>{$data.ID}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Status{/t}</td>
-                                       <td>{$data.STATUS}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Result{/t}</td>
-                                       <td>{$data.RESULT}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Target{/t}</td>
-                                       <td>{$data.MACADDRESS}</td>
-                               </tr>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table >
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{/if}
diff --git a/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_install.tpl b/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_install.tpl
deleted file mode 100644 (file)
index 40a62eb..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-
-{if $is_new}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table style='width:100%;'>
-                               <tr>
-                                       <td>
-                                               {t}Target objects{/t}
-                                               <br>
-                                               {$target_list}
-                                       </td>
-                               </tr>
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{else}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td>{t}ID{/t}</td>
-                                       <td>{$data.ID}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Progress{/t}</td>
-                                       <td>{$progress}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Status{/t}</td>
-                                       <td>{$status}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Result{/t}</td>
-                                       <td>{$data.RESULT}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Target{/t}</td>
-                                       <td>{$data.MACADDRESS}</td>
-                               </tr>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table >
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{/if}
diff --git a/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_installation_activation.tpl b/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_installation_activation.tpl
deleted file mode 100644 (file)
index 4e3fc12..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-
-{if $is_new}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table style='width:100%;'>
-                               <tr>
-                                       <td>
-                                               {t}Target objects{/t}
-                                               <br>
-                                               {$target_list}
-                                       </td>
-                               </tr>
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{else}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td>{t}ID{/t}</td>
-                                       <td>{$data.ID}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Status{/t}</td>
-                                       <td>{$data.STATUS}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Result{/t}</td>
-                                       <td>{$data.RESULT}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Target{/t}</td>
-                                       <td>{$data.MACADDRESS}</td>
-                               </tr>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table >
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{/if}
diff --git a/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_localboot.tpl b/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_localboot.tpl
deleted file mode 100644 (file)
index 4e3fc12..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-
-{if $is_new}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table style='width:100%;'>
-                               <tr>
-                                       <td>
-                                               {t}Target objects{/t}
-                                               <br>
-                                               {$target_list}
-                                       </td>
-                               </tr>
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{else}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td>{t}ID{/t}</td>
-                                       <td>{$data.ID}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Status{/t}</td>
-                                       <td>{$data.STATUS}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Result{/t}</td>
-                                       <td>{$data.RESULT}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Target{/t}</td>
-                                       <td>{$data.MACADDRESS}</td>
-                               </tr>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table >
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{/if}
diff --git a/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_memcheck.tpl b/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_memcheck.tpl
deleted file mode 100644 (file)
index 4e3fc12..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-
-{if $is_new}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table style='width:100%;'>
-                               <tr>
-                                       <td>
-                                               {t}Target objects{/t}
-                                               <br>
-                                               {$target_list}
-                                       </td>
-                               </tr>
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{else}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td>{t}ID{/t}</td>
-                                       <td>{$data.ID}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Status{/t}</td>
-                                       <td>{$data.STATUS}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Result{/t}</td>
-                                       <td>{$data.RESULT}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Target{/t}</td>
-                                       <td>{$data.MACADDRESS}</td>
-                               </tr>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table >
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{/if}
diff --git a/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_notify.tpl b/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_notify.tpl
deleted file mode 100644 (file)
index 25a8618..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-
-{if $is_new}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='vertical-align:top'>{t}Send on:{/t}</td>
-               <td>{$timestamp}</td>
-       </tr>
-       <tr>
-               <td>
-                       {t}Subject{/t}
-               </td>
-               <td>
-                       <input type="text" value="{$subject}" name="subject">
-               </td>
-       </tr>
-       <tr>
-               <td colspan="2">
-                       {t}Text{/t}
-               </td>
-       </tr>
-       <tr>
-               <td colspan="2">
-                       <textarea style="height:200px;width:100%;" name="message">{$message}</textarea>
-               </td>
-       </tr>
-</table>
-
-{else}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td>{t}ID{/t}</td>
-                                       <td>{$data.ID}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Status{/t}</td>
-                                       <td>{$data.STATUS}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Result{/t}</td>
-                                       <td>{$data.RESULT}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Target{/t}</td>
-                                       <td>{$data.MACADDRESS}</td>
-                               </tr>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{/if}
diff --git a/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_reboot.tpl b/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_reboot.tpl
deleted file mode 100644 (file)
index 4e3fc12..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-
-{if $is_new}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table style='width:100%;'>
-                               <tr>
-                                       <td>
-                                               {t}Target objects{/t}
-                                               <br>
-                                               {$target_list}
-                                       </td>
-                               </tr>
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{else}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td>{t}ID{/t}</td>
-                                       <td>{$data.ID}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Status{/t}</td>
-                                       <td>{$data.STATUS}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Result{/t}</td>
-                                       <td>{$data.RESULT}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Target{/t}</td>
-                                       <td>{$data.MACADDRESS}</td>
-                               </tr>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table >
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{/if}
diff --git a/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_reinstall.tpl b/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_reinstall.tpl
deleted file mode 100644 (file)
index 40a62eb..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-
-{if $is_new}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table style='width:100%;'>
-                               <tr>
-                                       <td>
-                                               {t}Target objects{/t}
-                                               <br>
-                                               {$target_list}
-                                       </td>
-                               </tr>
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{else}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td>{t}ID{/t}</td>
-                                       <td>{$data.ID}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Progress{/t}</td>
-                                       <td>{$progress}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Status{/t}</td>
-                                       <td>{$status}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Result{/t}</td>
-                                       <td>{$data.RESULT}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Target{/t}</td>
-                                       <td>{$data.MACADDRESS}</td>
-                               </tr>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table >
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{/if}
diff --git a/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_reload_ldap_config.tpl b/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_reload_ldap_config.tpl
deleted file mode 100644 (file)
index 4e3fc12..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-
-{if $is_new}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table style='width:100%;'>
-                               <tr>
-                                       <td>
-                                               {t}Target objects{/t}
-                                               <br>
-                                               {$target_list}
-                                       </td>
-                               </tr>
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{else}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td>{t}ID{/t}</td>
-                                       <td>{$data.ID}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Status{/t}</td>
-                                       <td>{$data.STATUS}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Result{/t}</td>
-                                       <td>{$data.RESULT}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Target{/t}</td>
-                                       <td>{$data.MACADDRESS}</td>
-                               </tr>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table >
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{/if}
diff --git a/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_rescan.tpl b/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_rescan.tpl
deleted file mode 100644 (file)
index 4e3fc12..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-
-{if $is_new}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table style='width:100%;'>
-                               <tr>
-                                       <td>
-                                               {t}Target objects{/t}
-                                               <br>
-                                               {$target_list}
-                                       </td>
-                               </tr>
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{else}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td>{t}ID{/t}</td>
-                                       <td>{$data.ID}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Status{/t}</td>
-                                       <td>{$data.STATUS}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Result{/t}</td>
-                                       <td>{$data.RESULT}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Target{/t}</td>
-                                       <td>{$data.MACADDRESS}</td>
-                               </tr>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table >
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{/if}
diff --git a/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_sysinfo.tpl b/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_sysinfo.tpl
deleted file mode 100644 (file)
index 4e3fc12..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-
-{if $is_new}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table style='width:100%;'>
-                               <tr>
-                                       <td>
-                                               {t}Target objects{/t}
-                                               <br>
-                                               {$target_list}
-                                       </td>
-                               </tr>
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{else}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td>{t}ID{/t}</td>
-                                       <td>{$data.ID}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Status{/t}</td>
-                                       <td>{$data.STATUS}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Result{/t}</td>
-                                       <td>{$data.RESULT}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Target{/t}</td>
-                                       <td>{$data.MACADDRESS}</td>
-                               </tr>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table >
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{/if}
diff --git a/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_update.tpl b/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_update.tpl
deleted file mode 100644 (file)
index 4e3fc12..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-
-{if $is_new}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table style='width:100%;'>
-                               <tr>
-                                       <td>
-                                               {t}Target objects{/t}
-                                               <br>
-                                               {$target_list}
-                                       </td>
-                               </tr>
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{else}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td>{t}ID{/t}</td>
-                                       <td>{$data.ID}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Status{/t}</td>
-                                       <td>{$data.STATUS}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Result{/t}</td>
-                                       <td>{$data.RESULT}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Target{/t}</td>
-                                       <td>{$data.MACADDRESS}</td>
-                               </tr>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table >
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{/if}
diff --git a/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_wakeup.tpl b/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_wakeup.tpl
deleted file mode 100644 (file)
index 4e3fc12..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-
-{if $is_new}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table style='width:100%;'>
-                               <tr>
-                                       <td>
-                                               {t}Target objects{/t}
-                                               <br>
-                                               {$target_list}
-                                       </td>
-                               </tr>
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{else}
-
-<table style='width:100%;'>
-       <tr>
-               <td style='width:50%; vertical-align:top;'>
-                       <table>
-                               <tr>
-                                       <td>{t}ID{/t}</td>
-                                       <td>{$data.ID}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Status{/t}</td>
-                                       <td>{$data.STATUS}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Result{/t}</td>
-                                       <td>{$data.RESULT}</td>
-                               </tr>
-                               <tr>
-                                       <td>{t}Target{/t}</td>
-                                       <td>{$data.MACADDRESS}</td>
-                               </tr>
-                               <tr>
-                                       <td style='vertical-align:top'>{t}Timestamp{/t}</td>
-                                       <td>{$timestamp}</td>
-                               </tr>
-                       </table>
-               </td>
-               <td style='width:50%; vertical-align:top;'>
-                       <table >
-                       </table>
-               </td>
-       </tr>
-</table>
-
-{/if}
diff --git a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent.inc b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent.inc
deleted file mode 100644 (file)
index ae4f7e3..0000000
+++ /dev/null
@@ -1,504 +0,0 @@
-<?php
-/*
- * 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
- */
-
-define("SCHEDULED_EVENT",1);
-define("TRIGGERED_EVENT",2);
-
-define("HIDDEN_EVENT",0);
-define("SYSTEM_EVENT",1);
-define("USER_EVENT"  ,2);
-
-
-/*! \brief    This is the event base class 
-  \author   Fabian Hickert <hickert@gonicus.de>
-  \version  1.00
-  \date     26.02.2008
-
-  This is the base class for all new daemon events.
-  It implements most of the required functionality.
- */
-class DaemonEvent 
-{
-  /* Menu Strings */
-  protected $s_Menu_Name  = "s_Menu_Name not set";  // Diplayed in the ActionsMenu->CreateNew
-  protected $s_Event_Name = "s_Event_Name not set"; // Will be displayed in the Management list.
-  protected $s_Menu_Image = "images/empty.png";     // Image displayed in Actions->New
-  protected $s_List_Image = "";                     // Image displayed in event listing
-
-  public $config;          // GOsa configuration object 
-  protected $data;            // The event data, when edited
-
-  protected $a_targets    = array();  // The list of assigned Targets (When newly created)
-  protected $s_Schedule_Action = "";       // The deamon command name when newly created. (e.g. job_trigger_action_halt)
-  protected $s_Trigger_Action= "";       // The deamon command name when edited. (e.g. trigger_action_halt)
-  protected $s_Queued_Action= "";       // The deamon command name when edited. (e.g. trigger_action_halt)
-  protected $timestamp    = 0;        // Event execution time; 
-  protected $id           = -1;       // The Table ID
-  protected $status       = "unknown";// The current event status
-  protected $is_new       = TRUE;     // Is TRUE if this is a new event
-
-  protected $mode         = SCHEDULED_EVENT; // Default action is sheduled.
-
-  /* Sub dialog hanlding */
-  protected $target_divlist       = NULL;     // The divlist used by the target add dialog
-  protected $target_add_list_used = FALSE;    // Indicates that the target add list was used.
-  protected $time_select_used     = FALSE;    // Indicates that we have used the timestamp select boxes.
-  protected $target_list_used     = FALSE;    // Target list was diaplayed?
-  protected $_target_list         = array();  // Object Cache of those objects displayed in the target add dialog
-  protected $workstation_list     = array();  // Used as cache in the target list.
-  protected $server_list          = array();  // Used as cache in the target list.
-
-  protected $visible_for          = HIDDEN_EVENT;
-  function set_type($type)
-  {
-    $this->mode = $type;
-  }
-
-
-  function get_type()
-  {
-    return($this->mode);
-  }
-
-  /*! \brief  Class contructor.
-    @param  Array   GOsa configuration object.
-    @param  Array   Event data, only given when edited.
-   */
-  public function __construct($config,$data = array())
-  {
-    $this->data   = $data;
-    $this->config = $config;
-    timezone::get_default_timezone();
-    $this->timestamp = time();
-
-    /* Load values from given data */
-    if(count($data)){
-      $this->is_new = FALSE;
-
-      $attrs = array("id" => "ID");
-      foreach($attrs as $to => $from){
-        $this->$to = $data[$from];
-      }
-      if(isset($data['TIMESTAMP'])){
-        $this->timestamp = $this->_event_to_timestamp($data['TIMESTAMP']);
-      }
-    }
-  }
-
-
-  /*! \brief  Create the HTML output for the plugin. 
-    @return String  The generated HTML output.
-   */
-  public function execute()
-  {
-    $this->time_select_used = FALSE;
-    $this->target_list_used = FALSE;
-
-    $str = "<h2>"._("This event has no template.")."</h2>";
-    $str.= "<p class='seperator'></p>";
-    $str.= "<div style='text-align:right;width:100%;padding:3px;'>
-      <input type='submit' name='abort_event_dialog' value='"._("Cancel")."'>
-      </div>";
-    return($str);
-  }
-
-  /*! \brief  Returns the plugin header, displayed in the template.
-    @return String  HTML header part.
-   */
-  public function get_header()
-  {
-    if($this->target_add_list_used){
-      return("");
-    }
-    $str = "<h2>"._("Daemon event")."&nbsp;-&nbsp;".$this->s_Event_Name."</h2>";
-    return($str);
-  }
-
-
-  /*! \brief  Returns the plugin footer (save cancel), displayed in the template.
-    @return String  HTML footer part.
-   */
-  public function get_footer()
-  {
-    if($this->target_add_list_used){
-      return("");
-    }
-    $str = "<p class='seperator'></p>";
-    $str.= "<div style='text-align:right;width:100%;padding:5px;'>
-      <input type='submit' name='save_event_dialog' value='"._("Save")."'>&nbsp;
-    <input type='submit' name='abort_event_dialog' value='"._("Cancel")."'>
-      </div>";
-    return($str);
-  }
-
-
-  /*! \brief  Returns HTML representation of a timestamp using <select> boxes. 
-    @return Returns HTML content.
-   */
-  public function get_time_select()
-  {
-    $this->time_select_used = TRUE;
-
-    $smarty = get_smarty();
-
-    $year   = date("Y",$this->timestamp);
-    $month  = date("m",$this->timestamp);
-    $day    = date("d",$this->timestamp);
-
-    $hour   = date("H",$this->timestamp);
-    $minute = date("i",$this->timestamp);
-    $second = date("s",$this->timestamp);
-
-    $years = array();
-    for($i = date("Y",time()); $i <= 2037 ;$i ++){
-      $years[$i] = $i;
-    }
-    $months = array();
-    for($i = 1; $i <= 12; $i ++){
-      $e = str_pad($i,2,"0",STR_PAD_LEFT);
-      $months[$e] = $e;
-    }
-    $days = array();
-    for($i = 1; $i <= cal_days_in_month(CAL_GREGORIAN,$month,$year); $i ++){
-      $e = str_pad($i,2,"0",STR_PAD_LEFT);
-      $days[$e] = $e;
-    }
-    $hours = array();
-    for($i = 0; $i < 24; $i ++){
-      $e = str_pad($i,2,"0",STR_PAD_LEFT);
-      $hours[$e] = $e;
-    }
-    $minutes = array();
-    for($i = 0; $i < 60; $i ++){
-      $e = str_pad($i,2,"0",STR_PAD_LEFT);
-      $minutes[$e] = $e;
-    }
-    $seconds = array();
-    for($i = 0; $i < 60; $i ++){
-      $e = str_pad($i,2,"0",STR_PAD_LEFT);
-      $seconds[$e] = $e;
-    }
-
-    $smarty->assign("years", $years);
-    $smarty->assign("months", $months);
-    $smarty->assign("days", $days);
-    $smarty->assign("hours", $hours);
-    $smarty->assign("minutes", $minutes);
-    $smarty->assign("seconds", $seconds);
-    $smarty->assign("time_year",$year);
-    $smarty->assign("time_month",$month);
-    $smarty->assign("time_day",$day);
-    $smarty->assign("time_hour",$hour);
-    $smarty->assign("time_minute",$minute);
-    $smarty->assign("time_second",$second);
-    return($smarty->fetch(get_template_path('timestamp_select.tpl', TRUE, dirname(__FILE__))));
-  } 
-
-
-  /*! \brief  HTML representation of all currently assigned targets using (divSelectBox).
-    @return String Returns a listbox with all used targets.
-   */
-  public function get_target_list()
-  {
-    $this->target_list_used = TRUE;
-    $divlist = new divSelectBox("EventTargets");
-    foreach($this->a_targets as $key => $target){
-      $divlist->AddEntry(array(
-            array("string"  => $target),
-            array("string"  => "<input type='image' src='images/edittrash.png' title='"._("Remove")."' name='del_target_".$key."'>",
-              "attach"  => "style='width:20px; border-right:0px;'")
-            ));
-    }
-    $list_footer = "<input type='submit' name='open_target_list' value='"._("Add target")."'>";
-    return($divlist->DrawList().$list_footer);
-  }
-
-
-  /*! \brief  Returns HTML content, displaying a dialog which allows to add new targets.
-    @return String HTML content. (EventTargetAddList)
-   */
-  public function get_target_add_list()
-  {
-    $this->target_add_list_used = TRUE;
-
-    if($this->target_divlist == NULL){ 
-      $this->target_divlist = new EventTargetAddList($this->config,$this);
-    }
-    $this->target_divlist->execute();
-
-    $smarty = get_smarty();
-    $smarty->assign("divlist",$this->target_divlist->Draw());
-    return($smarty->fetch(get_template_path('target_list.tpl', TRUE, dirname(__FILE__))));
-  }
-
-
-  /*! \brief  Handles all posted HTML data, including target add,remove...
-   */
-  public function save_object()
-  {
-    if(isset($_POST['open_target_list'])){
-      $this->target_add_list_used =TRUE;
-    }
-    if($this->target_divlist != NULL){
-      $this->target_divlist->save_object();
-    }
-    if($this->target_add_list_used){
-      if(isset($_POST['abort_target_dialog'])){
-        $this->target_add_list_used =FALSE;
-        $this->target_divlist = NULL;
-      }
-      if(isset($_POST['save_target_dialog'])){
-        $this->target_add_list_used =FALSE;
-        foreach($this->list_get_selected_items() as $id){
-          if(in_array("gosaGroupOfNames",$this->target_divlist->_target_list[$id]['objectClass'])){
-            foreach($this->target_divlist->_target_list[$id]['member'] as $mem_dn){
-              if(isset($this->target_divlist->workstation_list[$mem_dn])){
-                $this->a_targets[] = $this->target_divlist->workstation_list[$mem_dn]['macAddress'][0];  
-              }
-              if(isset($this->target_divlist->server_list[$mem_dn])){
-                $this->a_targets[] = $this->target_divlist->server_list[$mem_dn]['macAddress'][0];  
-              }
-            } 
-          }else{
-            if(isset($this->target_divlist->_target_list[$id]['macAddress'][0])){
-              $this->a_targets[] = $this->target_divlist->_target_list[$id]['macAddress'][0];
-            }
-          }
-        }
-        $this->target_divlist = NULL;
-      }
-    }
-
-    if($this->time_select_used){
-      $time_stamp_values_found = TRUE;
-      foreach(array("time_year","time_month","time_day","time_hour","time_minute","time_second") as $attr){
-        $time_stamp_values_found &= isset($_POST[$attr]);
-      }
-      if($time_stamp_values_found){
-        $this->timestamp = mktime(
-            $_POST['time_hour'],
-            $_POST['time_minute'],        
-            $_POST['time_second'],        
-            $_POST['time_month'],        
-            $_POST['time_day'],        
-            $_POST['time_year']);
-      }
-    }
-
-    if($this->target_list_used){
-      foreach($_POST as $name => $value){
-        if(preg_match("/^del_target_/",$name)){
-          $id = preg_replace("/^del_target_([0-9]*)_.*/","\\1",$name);
-          if(isset($this->a_targets[$id])){
-            unset($this->a_targets[$id]);
-          }
-          break; 
-        }
-      }
-    } 
-  }
-
-
-  /*! \brief  Converts a daemon timestamp into an unix timestamp. \
-    e.g.  20080101125959 -> 1199188799 
-    @param  A daemon timestamp  YYYYddmmHHiiss
-    @return Integer  A unix timestamp.
-   */
-  public function _event_to_timestamp($str)
-  {
-    return(strtotime($str));
-  }
-
-
-  /*! \brief  Converts a unix timestamp in to a gosa-si timestamp. \
-    e.g.  1199188799 -> 20080101125959
-    @param  A unix timestamp (e.g. 1199188799)
-    @return Integer  A daemon timestamp (e.g. 20080101125959).
-   */
-  public function _timestamp_to_event($stamp)
-  {
-    return(date("YmdHis",$stamp));
-  }
-
-
-  /*! \brief  Returns event information, like menu strings, images ... 
-    @return   Array Event informations.
-   */
-  public function get_event_info()
-  {
-    $data =array();
-    $data['CLASS_NAME']         = get_class($this);
-    foreach(array("s_Menu_Name","s_Event_Name","s_Queued_Action","s_Schedule_Action","s_Trigger_Action") as $attr){
-      $data[$attr]  = $this->$attr;
-    }
-    $data['MenuImage']    = "<img src='".$this->s_Menu_Image."' alt='".$this->s_Menu_Name."' border='0' class='center'>";
-    $data['ListImage']    = "<img src='".$this->s_List_Image."' title='".$this->s_Event_Name."' 
-      alt='".$this->s_Event_Name."' border='0' class='center'>";
-    return($data);
-  }
-
-
-  /*! \brief  Check if we have opened the target add dialog. 
-    @return   Boolean TRUE if we have opened the target add dialog else FALSE.
-   */
-  protected function is_target_list_open()
-  {
-    return($this->target_add_list_used);
-  }
-
-
-  /*! \brief  Returns a complete list of all available events.
-    @return   Array   Containing $this->get_event_info() for all available events.
-   */
-  static function get_event_types($type)
-  {
-    global $class_mapping,$config;
-    $list = array();
-    $list['BY_CLASS'] = array();
-    $list['BY_TRIGGERED_ACTION'] = array();
-    $list['BY_SCHEDULED_ACTION'] = array();
-    $list['BY_QUEUED_ACTION'] = array();
-
-    foreach($class_mapping as $name => $path){
-      if(preg_match("/^DaemonEvent_/",$name)){
-        $tmp  = new $name($config);
-
-        if($tmp->visible_for & $type){
-          $evt  = $tmp->get_event_info();
-
-          $list['BY_CLASS'][$name]                      = $evt;
-          $list['BY_TRIGGERED_ACTION'][$evt['s_Trigger_Action']]  = $evt;
-          $list['BY_SCHEDULED_ACTION'][$evt['s_Schedule_Action']] = $evt;
-          $list['BY_QUEUED_ACTION']   [$evt['s_Queued_Action']]   = $evt;
-        }
-      }
-    }
-    return($list);
-  }
-
-
-  /*! \brief  Returns TRUE if this event is new. (Not edited)
-    @return Boolean TRUE if new, else FALSE.
-   */
-  public function is_new()
-  {
-    return($this->is_new);
-  }
-
-
-  /*! \brief  Returns the event tag to schedule a new action 
-    @param    Returns the event e.g. 'job_trigger_action_wake'
-   */
-  public function get_schedule_action()
-  {
-    return($this->s_Schedule_Action);
-  }
-
-  //
-  /*! \brief  Returns the event tag to schedule a new action 
-    @param    Returns the event e.g. 'trigger_action_wake'
-   */
-  public function get_trigger_action()
-  {
-    return($this->s_Trigger_Action);
-  }
-
-  /*! brief  Returns an array containig all attributes \
-    That should be written.
-    @return Array e.g. 'status' => 'bla blub'  
-   */ 
-  public function save()
-  {
-    return(array("timestamp" => $this->_timestamp_to_event($this->timestamp)));
-  }
-
-
-  /*! \brief  Returns the event targets
-    @return Array  All selected targets.
-   */ 
-  public function get_targets()
-  {
-    return($this->a_targets);
-  }
-
-
-  /*! \brief  Returns the event timestamp in GOsa daemon format. 
-    @return Returns the event timestamp (20081231120000)
-   */
-  public function get_timestamp()
-  {
-    return($this->_timestamp_to_event($this->timestamp));
-  }
-
-
-  /*! \brief  Returns the event ID
-    @return Returns the event ID
-   */
-  public function get_id()
-  {
-    if($this->is_new){
-      return(-1);
-    }else{
-      return($this->data['ID']);
-    }
-  }
-
-
-  /*! \brief  Returns a set of elements selected in a MultiSelectWindow
-    @return Array[integer]=integer
-   */
-  protected  function list_get_selected_items()
-  {
-    $ids = array();
-    foreach($_POST as $name => $value){
-      if(preg_match("/^item_selected_[0-9]*$/",$name)){
-        $id   = preg_replace("/^item_selected_/","",$name);
-        $ids[$id] = $id;
-      }
-    }
-    return($ids);
-  }
-
-
-  /*! \brief Add a target MAC address 
-      @param Array A List of all target that should be added.
-   */
-  public function set_timestamp($stamp) 
-  {
-    $this->timestamp = $stamp;
-  }
-
-
-  /*! \brief Add a target MAC address 
-      @param Array A List of all target that should be added.
-   */
-  public function add_targets($targets) 
-  {
-    foreach($targets as $target){
-      $this->a_targets[] = $target;
-    }
-  }
-}
-
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_faireboot.inc b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_faireboot.inc
deleted file mode 100644 (file)
index e529c91..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-/*
- * 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
- */
-
-class DaemonEvent_faireboot extends DaemonEvent
-{
-  public function __construct($config,$data = array())
-  {
-    DaemonEvent::__construct($config,$data);
-    $this->s_Menu_Name  = _("Abort installation");
-    $this->s_Event_Name = _("Abort installation");
-    $this->s_Schedule_Action = "job_trigger_action_faireboot";
-    $this->s_Trigger_Action= "gosa_trigger_action_faireboot";
-    $this->s_Queued_Action= "trigger_action_faireboot";
-    $this->s_Menu_Image = "images/small_error.png";
-    $this->s_List_Image = "images/small_error.png";
-  }
-
-  public function execute()
-  {
-    DaemonEvent::execute();
-
-    $display = $this->get_header();
-
-    $tmp = $this->data;
-
-    /* Check if target add dialog is open */
-    if($this->is_target_list_open() && $this->is_new){
-      return($this->get_target_add_list());
-    }
-
-    $smarty = get_smarty();
-    $smarty->assign("data"        , $this->data);
-    $smarty->assign("target_list" , $this->get_target_list());
-    $smarty->assign("is_new"      , $this->is_new);
-    $smarty->assign("timestamp"   , $this->get_time_select());
-    $display.= $smarty->fetch(get_template_path('DaemonEvent_faireboot.tpl', TRUE, dirname(__FILE__)));
-    $display.= $this->get_footer();
-    return($display);
-  }
-
-  public function save_object()
-  {
-    DaemonEvent::save_object();
-  }
-} 
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_halt.inc b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_halt.inc
deleted file mode 100644 (file)
index f743f00..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-/*
- * 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
- */
-
-class DaemonEvent_halt extends DaemonEvent
-{
-
-  var $visible_for = SYSTEM_EVENT;
-
-  public function __construct($config,$data = array())
-  {
-    DaemonEvent::__construct($config,$data);
-    $this->s_Menu_Name  = _("Switch off");
-    $this->s_Event_Name = _("Switch off");
-    $this->s_Schedule_Action = "job_trigger_action_halt";
-    $this->s_Trigger_Action= "gosa_trigger_action_halt";
-    $this->s_Queued_Action= "trigger_action_halt";
-    $this->s_Menu_Image = "images/status_stopped.png";
-    $this->s_List_Image = "images/status_stopped.png";
-  }
-
-  public function execute()
-  {
-    DaemonEvent::execute();
-
-    $display = $this->get_header();
-
-    $tmp = $this->data;
-
-    /* Check if target add dialog is open */
-    if($this->is_target_list_open() && $this->is_new){
-      return($this->get_target_add_list());
-    }
-
-    $smarty = get_smarty();
-    $smarty->assign("data"        , $this->data);
-    $smarty->assign("target_list" , $this->get_target_list());
-    $smarty->assign("is_new"      , $this->is_new);
-    $smarty->assign("timestamp"   , $this->get_time_select());
-    $display.= $smarty->fetch(get_template_path('DaemonEvent_halt.tpl', TRUE, dirname(__FILE__)));
-    $display.= $this->get_footer();
-    return($display);
-  }
-
-  public function save_object()
-  {
-    DaemonEvent::save_object();
-  }
-} 
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_install.inc b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_install.inc
deleted file mode 100644 (file)
index 32d5aed..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-<?php
-/*
- * 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
- */
-
-class DaemonEvent_install extends DaemonEvent
-{
-  var $progress = 0;  
-  var $status   = "";  
-
-  var $visible_for = SYSTEM_EVENT;
-  public function __construct($config,$data = array())
-  {
-    DaemonEvent::__construct($config,$data);
-    $this->s_Menu_Name  = _("Install");
-    $this->s_Event_Name = _("Install");
-    $this->s_Schedule_Action = "job_trigger_action_install";
-    $this->s_Trigger_Action= "gosa_trigger_action_install";
-    $this->s_Queued_Action= "trigger_action_install";
-    $this->s_Menu_Image = "images/fai_small.png";
-    $this->s_List_Image = "images/fai_small.png";
-  
-    if(!$this->is_new()){
-      if(isset($data['PROGRESS'])){
-        $this->progress = $data['PROGRESS'];
-      }
-      if(isset($data['STATUS'])){
-        $this->status = $data['STATUS'];
-      }
-    }
-  }
-
-  public function execute()
-  {
-    DaemonEvent::execute();
-
-    $display = $this->get_header();
-
-    $tmp = $this->data;
-
-    /* Check if target add dialog is open */
-    if($this->is_target_list_open() && $this->is_new){
-      return($this->get_target_add_list());
-    }
-
-    $smarty = get_smarty();
-    $smarty->assign("status"      , $this->status);
-    $smarty->assign("progress"    , $this->progress);
-    $smarty->assign("data"        , $this->data);
-    $smarty->assign("target_list" , $this->get_target_list());
-    $smarty->assign("is_new"      , $this->is_new);
-    $smarty->assign("timestamp"   , $this->get_time_select());
-    $display.= $smarty->fetch(get_template_path('DaemonEvent_install.tpl', TRUE, dirname(__FILE__)));
-    $display.= $this->get_footer();
-    return($display);
-  }
-
-  public function save()
-  {
-    $ret = DaemonEvent::save();
-    return($ret);
-  } 
-} 
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_installation_activation.inc b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_installation_activation.inc
deleted file mode 100644 (file)
index 20b14e4..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-/*
- * 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
- */
-
-class DaemonEvent_installation_activation extends DaemonEvent
-{
-  public function __construct($config,$data = array())
-  {
-    DaemonEvent::__construct($config,$data);
-    $this->s_Menu_Name  = _("Installation activation");
-    $this->s_Event_Name = _("Installation activation");
-    $this->s_Schedule_Action  = "job_set_activated_for_installation";
-    $this->s_Trigger_Action   = "gosa_set_activated_for_installation";
-    $this->s_Queued_Action    = "set_activated_for_installation";
-    $this->s_Menu_Image = "images/true.png";
-    $this->s_List_Image = "images/true.png";
-  }
-
-  public function execute()
-  {
-    DaemonEvent::execute();
-
-    $display = $this->get_header();
-
-    $tmp = $this->data;
-
-    /* Check if target add dialog is open */
-    if($this->is_target_list_open() && $this->is_new){
-      return($this->get_target_add_list());
-    }
-
-    $smarty = get_smarty();
-    $smarty->assign("data"        , $this->data);
-    $smarty->assign("target_list" , $this->get_target_list());
-    $smarty->assign("is_new"      , $this->is_new);
-    $smarty->assign("timestamp"   , $this->get_time_select());
-    $display.= $smarty->fetch(get_template_path('DaemonEvent_installation_activation.tpl', TRUE, dirname(__FILE__)));
-    $display.= $this->get_footer();
-    return($display);
-  }
-
-  public function save_object()
-  {
-    DaemonEvent::save_object();
-  }
-} 
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_localboot.inc b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_localboot.inc
deleted file mode 100644 (file)
index f3ff263..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-/*
- * 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
- */
-
-class DaemonEvent_localboot extends DaemonEvent
-{
-  public function __construct($config,$data = array())
-  {
-    DaemonEvent::__construct($config,$data);
-    $this->s_Menu_Name  = _("Force localboot"); 
-    $this->s_Event_Name = _("Force localboot"); 
-    $this->s_Schedule_Action = "job_trigger_action_localboot";
-    $this->s_Trigger_Action= "gosa_trigger_action_localboot";
-    $this->s_Queued_Action= "trigger_action_localboot";
-    $this->s_Menu_Image = "images/select_workstation.png";
-    $this->s_List_Image = "images/select_workstation.png";
-  }
-
-  public function execute()
-  {
-    DaemonEvent::execute();
-
-    $display = $this->get_header();
-
-    $tmp = $this->data;
-
-    /* Check if target add dialog is open */
-    if($this->is_target_list_open() && $this->is_new){
-      return($this->get_target_add_list());
-    }
-
-    $smarty = get_smarty();
-    $smarty->assign("data"        , $this->data);
-    $smarty->assign("target_list" , $this->get_target_list());
-    $smarty->assign("is_new"      , $this->is_new);
-    $smarty->assign("timestamp"   , $this->get_time_select());
-    $display.= $smarty->fetch(get_template_path('DaemonEvent_localboot.tpl', TRUE, dirname(__FILE__)));
-    $display.= $this->get_footer();
-    return($display);
-  }
-
-  public function save_object()
-  {
-    DaemonEvent::save_object();
-  }
-} 
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_memcheck.inc b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_memcheck.inc
deleted file mode 100644 (file)
index e2d238c..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-/*
- * 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
- */
-
-class DaemonEvent_memcheck extends DaemonEvent
-{
-  public function __construct($config,$data = array())
-  {
-    DaemonEvent::__construct($config,$data);
-    $this->s_Menu_Name  = _("Memory test"); 
-    $this->s_Event_Name = _("Memory test"); 
-    $this->s_Schedule_Action= "job_trigger_action_memcheck";
-    $this->s_Trigger_Action = "gosa_trigger_action_memcheck";
-    $this->s_Queued_Action  = "trigger_action_memcheck";
-    $this->s_Menu_Image = "images/memory.png";
-    $this->s_List_Image = "images/memory.png";
-  }
-
-  public function execute()
-  {
-    DaemonEvent::execute();
-
-    $display = $this->get_header();
-
-    $tmp = $this->data;
-
-    /* Check if target add dialog is open */
-    if($this->is_target_list_open() && $this->is_new){
-      return($this->get_target_add_list());
-    }
-
-    $smarty = get_smarty();
-    $smarty->assign("data"        , $this->data);
-    $smarty->assign("target_list" , $this->get_target_list());
-    $smarty->assign("is_new"      , $this->is_new);
-    $smarty->assign("timestamp"   , $this->get_time_select());
-    $display.= $smarty->fetch(get_template_path('DaemonEvent_memcheck.tpl', TRUE, dirname(__FILE__)));
-    $display.= $this->get_footer();
-    return($display);
-  }
-
-  public function save_object()
-  {
-    DaemonEvent::save_object();
-  }
-} 
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_notify.inc b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_notify.inc
deleted file mode 100644 (file)
index 7486e7e..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-/*
- * 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
- */
-
-class DaemonEvent_notify extends DaemonEvent
-{
-  var $visible_for = USER_EVENT;
-  public function __construct($config,$data = array())
-  {
-    DaemonEvent::__construct($config,$data);
-    $this->s_Menu_Name  = _("Send message");
-    $this->s_Event_Name = _("Send message");
-    $this->s_Schedule_Action = "job_trigger_action_notify";
-    $this->s_Trigger_Action= "gosa_trigger_action_notify";
-    $this->s_Queued_Action= "trigger_action_notify";
-    $this->s_Menu_Image = "images/mailto.png";
-    $this->s_List_Image = "images/mailto.png";
-
-    $this->a_targets = array("GOsa");
-  }
-
-  public function execute()
-  {
-    DaemonEvent::execute();
-    $display = $this->get_header();
-    $tmp = $this->data;
-    $smarty = get_smarty();
-    $smarty->assign("subject" ,"subject");
-    $smarty->assign("message" ,"message");
-    $smarty->assign("data"        , $this->data);
-    $smarty->assign("data"        , $this->data);
-    $smarty->assign("is_new"      , $this->is_new);
-    $smarty->assign("timestamp"   , $this->get_time_select());
-    $display.= $smarty->fetch(get_template_path('DaemonEvent_notify.tpl', TRUE, dirname(__FILE__)));
-    $display.= $this->get_footer();
-    return($display);
-  }
-
-  public function save_object()
-  {
-    DaemonEvent::save_object();
-  }
-
-  public function save()
-  {
-    $ret = DaemonEvent::save();
-    $ret['user'] = array("test","asdf");
-    print_a($ret);
-    return($ret);
-  }
-} 
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_reboot.inc b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_reboot.inc
deleted file mode 100644 (file)
index e0b5599..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-/*
- * 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
- */
-
-class DaemonEvent_reboot extends DaemonEvent
-{
-  var $visible_for = SYSTEM_EVENT;
-  public function __construct($config,$data = array())
-  {
-    DaemonEvent::__construct($config,$data);
-    $this->s_Menu_Name  = _("Reboot"); 
-    $this->s_Event_Name = _("Reboot"); 
-    $this->s_Schedule_Action = "job_trigger_action_reboot";
-    $this->s_Trigger_Action= "gosa_trigger_action_reboot";
-    $this->s_Queued_Action= "trigger_action_reboot";
-    $this->s_Menu_Image = "images/list_reload.png";
-    $this->s_List_Image = "images/list_reload.png";
-  }
-
-  public function execute()
-  {
-    DaemonEvent::execute();
-
-    $display = $this->get_header();
-
-    $tmp = $this->data;
-
-    /* Check if target add dialog is open */
-    if($this->is_target_list_open() && $this->is_new){
-      return($this->get_target_add_list());
-    }
-
-    $smarty = get_smarty();
-    $smarty->assign("data"        , $this->data);
-    $smarty->assign("target_list" , $this->get_target_list());
-    $smarty->assign("is_new"      , $this->is_new);
-    $smarty->assign("timestamp"   , $this->get_time_select());
-    $display.= $smarty->fetch(get_template_path('DaemonEvent_reboot.tpl', TRUE, dirname(__FILE__)));
-    $display.= $this->get_footer();
-    return($display);
-  }
-
-  public function save_object()
-  {
-    DaemonEvent::save_object();
-  }
-} 
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_reinstall.inc b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_reinstall.inc
deleted file mode 100644 (file)
index 77c71c9..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-<?php
-/*
- * 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
- */
-
-class DaemonEvent_reinstall extends DaemonEvent
-{
-  var $progress = 0;  
-  var $status   = "";  
-  var $visible_for = SYSTEM_EVENT;
-
-  public function __construct($config,$data = array())
-  {
-    DaemonEvent::__construct($config,$data);
-    $this->s_Menu_Name  = _("Reinstall");
-    $this->s_Event_Name = _("Reinstall");
-    $this->s_Schedule_Action = "job_trigger_action_reinstall";
-    $this->s_Trigger_Action= "gosa_trigger_action_reinstall";
-    $this->s_Queued_Action= "trigger_action_reinstall";
-    $this->s_Menu_Image = "images/fai_small.png";
-    $this->s_List_Image = "images/fai_small.png";
-  
-    if(!$this->is_new()){
-      if(isset($data['PROGRESS'])){
-        $this->progress = $data['PROGRESS'];
-      }
-      if(isset($data['STATUS'])){
-        $this->status = $data['STATUS'];
-      }
-    }
-  }
-
-  public function execute()
-  {
-    DaemonEvent::execute();
-
-    $display = $this->get_header();
-
-    $tmp = $this->data;
-
-    /* Check if target add dialog is open */
-    if($this->is_target_list_open() && $this->is_new){
-      return($this->get_target_add_list());
-    }
-
-    $smarty = get_smarty();
-    $smarty->assign("status"      , $this->status);
-    $smarty->assign("progress"    , $this->progress);
-    $smarty->assign("data"        , $this->data);
-    $smarty->assign("target_list" , $this->get_target_list());
-    $smarty->assign("is_new"      , $this->is_new);
-    $smarty->assign("timestamp"   , $this->get_time_select());
-    $display.= $smarty->fetch(get_template_path('DaemonEvent_reinstall.tpl', TRUE, dirname(__FILE__)));
-    $display.= $this->get_footer();
-    return($display);
-  }
-
-  public function save()
-  {
-    $ret = DaemonEvent::save();
-    return($ret);
-  } 
-} 
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_reload_ldap_config.inc b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_reload_ldap_config.inc
deleted file mode 100644 (file)
index 2dcb00f..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-/*
- * 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
- */
-
-class DaemonEvent_reload_ldap_config extends DaemonEvent
-{
-  public function __construct($config,$data = array())
-  {
-    DaemonEvent::__construct($config,$data);
-    $this->s_Menu_Name  = _("Reload ldap config"); 
-    $this->s_Event_Name = _("Reload ldap config"); 
-    $this->s_Schedule_Action= "job_reload_ldap_config";
-    $this->s_Trigger_Action = "gosa_reload_ldap_config";
-    $this->s_Queued_Action  = "reload_ldap_config";
-    $this->s_Menu_Image = "images/edit.png";
-    $this->s_List_Image = "images/edit.png";
-  }
-
-  public function execute()
-  {
-    DaemonEvent::execute();
-
-    $display = $this->get_header();
-
-    $tmp = $this->data;
-
-    /* Check if target add dialog is open */
-    if($this->is_target_list_open() && $this->is_new){
-      return($this->get_target_add_list());
-    }
-
-    $smarty = get_smarty();
-    $smarty->assign("data"        , $this->data);
-    $smarty->assign("target_list" , $this->get_target_list());
-    $smarty->assign("is_new"      , $this->is_new);
-    $smarty->assign("timestamp"   , $this->get_time_select());
-    $display.= $smarty->fetch(get_template_path('DaemonEvent_wakeup.tpl', TRUE, dirname(__FILE__)));
-    $display.= $this->get_footer();
-    return($display);
-  }
-
-  public function save_object()
-  {
-    DaemonEvent::save_object();
-  }
-} 
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_rescan.inc b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_rescan.inc
deleted file mode 100644 (file)
index f446476..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-/*
- * 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
- */
-
-class DaemonEvent_rescan extends DaemonEvent
-{
-  public function __construct($config,$data = array())
-  {
-    DaemonEvent::__construct($config,$data);
-    $this->s_Menu_Name  = _("Rescan hardware"); 
-    $this->s_Event_Name = _("Rescan hardware"); 
-    $this->s_Schedule_Action= "job_trigger_action_rescan";
-    $this->s_Trigger_Action = "gosa_trigger_action_rescan";
-    $this->s_Queued_Action  = "trigger_action_rescan";
-    $this->s_Menu_Image = "images/snd_hardware.png";
-    $this->s_List_Image = "images/snd_hardware.png";
-  }
-
-  public function execute()
-  {
-    DaemonEvent::execute();
-
-    $display = $this->get_header();
-
-    $tmp = $this->data;
-
-    /* Check if target add dialog is open */
-    if($this->is_target_list_open() && $this->is_new){
-      return($this->get_target_add_list());
-    }
-
-    $smarty = get_smarty();
-    $smarty->assign("data"        , $this->data);
-    $smarty->assign("target_list" , $this->get_target_list());
-    $smarty->assign("is_new"      , $this->is_new);
-    $smarty->assign("timestamp"   , $this->get_time_select());
-    $display.= $smarty->fetch(get_template_path('DaemonEvent_rescan.tpl', TRUE, dirname(__FILE__)));
-    $display.= $this->get_footer();
-    return($display);
-  }
-
-  public function save_object()
-  {
-    DaemonEvent::save_object();
-  }
-} 
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_sysinfo.inc b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_sysinfo.inc
deleted file mode 100644 (file)
index 0e9cf11..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-/*
- * 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
- */
-
-class DaemonEvent_sysinfo extends DaemonEvent
-{
-  public function __construct($config,$data = array())
-  {
-    DaemonEvent::__construct($config,$data);
-    $this->s_Menu_Name  = _("System analysis"); 
-    $this->s_Event_Name = _("System analysis"); 
-    $this->s_Schedule_Action= "job_trigger_action_sysinfo";
-    $this->s_Trigger_Action = "gosa_trigger_action_sysinfo";
-    $this->s_Queued_Action  = "trigger_action_sysinfo";
-    $this->s_Menu_Image = "images/hardware.png";
-    $this->s_List_Image = "images/hardware.png";
-  }
-
-  public function execute()
-  {
-    DaemonEvent::execute();
-
-    $display = $this->get_header();
-
-    $tmp = $this->data;
-
-    /* Check if target add dialog is open */
-    if($this->is_target_list_open() && $this->is_new){
-      return($this->get_target_add_list());
-    }
-
-    $smarty = get_smarty();
-    $smarty->assign("data"        , $this->data);
-    $smarty->assign("target_list" , $this->get_target_list());
-    $smarty->assign("is_new"      , $this->is_new);
-    $smarty->assign("timestamp"   , $this->get_time_select());
-    $display.= $smarty->fetch(get_template_path('DaemonEvent_sysinfo.tpl', TRUE, dirname(__FILE__)));
-    $display.= $this->get_footer();
-    return($display);
-  }
-
-  public function save_object()
-  {
-    DaemonEvent::save_object();
-  }
-} 
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_update.inc b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_update.inc
deleted file mode 100644 (file)
index bace753..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-/*
- * 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
- */
-
-class DaemonEvent_update extends DaemonEvent
-{
-  var $visible_for = SYSTEM_EVENT;
-  public function __construct($config,$data = array())
-  {
-    DaemonEvent::__construct($config,$data);
-    $this->s_Menu_Name  = _("Software update");
-    $this->s_Event_Name = _("software update");
-    $this->s_Schedule_Action = "job_trigger_action_update";
-    $this->s_Trigger_Action= "gosa_trigger_action_update";
-    $this->s_Queued_Action= "trigger_action_update";
-    $this->s_Menu_Image = "images/time.png";
-    $this->s_List_Image = "images/time.png";
-  }
-
-  public function execute()
-  {
-    DaemonEvent::execute();
-
-    $display = $this->get_header();
-
-    $tmp = $this->data;
-
-    /* Check if target add dialog is open */
-    if($this->is_target_list_open() && $this->is_new){
-      return($this->get_target_add_list());
-    }
-
-    $smarty = get_smarty();
-    $smarty->assign("data"        , $this->data);
-    $smarty->assign("target_list" , $this->get_target_list());
-    $smarty->assign("is_new"      , $this->is_new);
-    $smarty->assign("timestamp"   , $this->get_time_select());
-    $display.= $smarty->fetch(get_template_path('DaemonEvent_update.tpl', TRUE, dirname(__FILE__)));
-    $display.= $this->get_footer();
-    return($display);
-  }
-
-  public function save_object()
-  {
-    DaemonEvent::save_object();
-  }
-} 
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_wakeup.inc b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_wakeup.inc
deleted file mode 100644 (file)
index 729d945..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-/*
- * 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
- */
-
-class DaemonEvent_wakeup extends DaemonEvent
-{
-  var $visible_for = SYSTEM_EVENT;
-  public function __construct($config,$data = array())
-  {
-    DaemonEvent::__construct($config,$data);
-    $this->s_Menu_Name  = _("Wake up"); 
-    $this->s_Event_Name = _("Start a system"); 
-    $this->s_Schedule_Action= "job_trigger_action_wake";
-    $this->s_Trigger_Action = "gosa_trigger_action_wake";
-    $this->s_Queued_Action  = "trigger_action_wake";
-    $this->s_Menu_Image = "images/status_running.png";
-    $this->s_List_Image = "images/status_running.png";
-  }
-
-  public function execute()
-  {
-    DaemonEvent::execute();
-
-    $display = $this->get_header();
-
-    $tmp = $this->data;
-
-    /* Check if target add dialog is open */
-    if($this->is_target_list_open() && $this->is_new){
-      return($this->get_target_add_list());
-    }
-
-    $smarty = get_smarty();
-    $smarty->assign("data"        , $this->data);
-    $smarty->assign("target_list" , $this->get_target_list());
-    $smarty->assign("is_new"      , $this->is_new);
-    $smarty->assign("timestamp"   , $this->get_time_select());
-    $display.= $smarty->fetch(get_template_path('DaemonEvent_wakeup.tpl', TRUE, dirname(__FILE__)));
-    $display.= $this->get_footer();
-    return($display);
-  }
-
-  public function save_object()
-  {
-    DaemonEvent::save_object();
-  }
-} 
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/goto/addons/gotomasses/events/class_EventTargetAddList.inc b/gosa-plugins/goto/addons/gotomasses/events/class_EventTargetAddList.inc
deleted file mode 100644 (file)
index e3b5243..0000000
+++ /dev/null
@@ -1,249 +0,0 @@
-<?php
-/*
- * 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
- */
-
-class EventTargetAddList extends MultiSelectWindow
-{
-  public $display_server = TRUE;
-  public $display_workstation = TRUE;
-  public $display_ogroup = TRUE;
-  public $filter_iprange = FALSE;
-
-  public $regex  = "*";
-  public $ipfrom = "0.0.0.0";
-  public $ipto   = "*";
-  public $_target_list = array();
-
-  public $workstation_list = array();
-  public $server_list = array();
-
-
-  function __construct(&$config,$parent)
-  {
-    MultiSelectWindow::MultiSelectWindow($config, "EventTargetAddList", 
-        array("server",
-          "workstation",
-          "ogroup"));
-
-    $this->parent       = $parent;
-    $this->ui           = get_userinfo();
-
-
-    $this->target_divlist = new MultiSelectWindow($this->config,"EventAddTargedtList","gotomasses");
-    $this->SetSummary(_("Targets"));
-    $this->EnableCloseButton(FALSE);
-    $this->EnableSaveButton(FALSE);
-
-    $this->SetInformation(_("This dialog shows all available targets for your event, check the targets you want to add   and use the 'Use' button to accept."));
-
-    /* Toggle all selected / deselected */
-    $chk = "<input type='checkbox' id='select_all' name='select_all'
-      onClick='toggle_all_(\"^item_selected_[0-9]*$\",\"select_all\");' >";
-
-    $this->EnableAplhabet(TRUE);
-
-    /* set Page header */
-    $this->AddHeader(array("string"=> $chk,          "attach"=>"style='width:20px;'"));
-    $this->AddHeader(array("string"=>"&nbsp;","attach"=>"style='width:20px;'"));
-    $this->AddHeader(array("string"=>_("System / Department")));
-
-    //$name,$string,$value,$conn,$image="images/search.png")
-    $this->AddRegex("regex" ,"regex"  ,"*"                , TRUE);
-    $this->AddRegex("ipfrom","ipfrom" ,"0.0.0.0"          , FALSE);
-    $this->AddRegex("ipto"  ,"ipto"   ,"255.255.255.255"  , FALSE);
-
-    $this->AddCheckBox("display_server","1"     ,_("Display server"),TRUE);
-    $this->AddCheckBox("display_workstation","1",_("Display workstation"),TRUE);
-    $this->AddCheckBox("display_ogroup","1"     ,_("Display object groups"),TRUE);
-    $this->AddCheckBox("filter_iprange","1"     ,_("Filter by IP range"),FALSE);
-
-
-
-    /* Create a list of servers
-     */
-    $tmp = get_sub_list("(&(macAddress=*)(objectClass=goServer))",
-          "server",get_ou("serverou"),$config->current['BASE'],
-          array("cn","objectClass","description","ipHostNumber","macAddress"),GL_SUBSEARCH);
-    foreach($tmp as $server){
-      $this->server_list[$server['dn']] = $server;
-    }
-
-    /* Create a list of workstations
-     */
-    $tmp = get_sub_list("(&(macAddress=*)(objectClass=gotoWorkstation))",
-          "server",get_ou("workstationou"),$config->current['BASE'],
-          array("cn","objectClass","description","ipHostNumber","macAddress"),GL_SUBSEARCH);
-    foreach($tmp as $server){
-      $this->workstation_list[$server['dn']] = $server;
-    }
-
-  }
-
-
-  function execute()
-  {
-    $this->ClearElementsList();
-    $this->AddDepartments($this->selectedBase,2,1);
-    $this->setEntries();
-    $this->GenHeader();
-  }
-
-
-  function GenHeader()
-  {
-    $modules = array("server","workstation");
-
-    /* Add base */
-    $tmp = array();
-    $base = $this->config->current['BASE'];
-    $tmp[] = array("dn"=>$this->config->current['BASE']);
-    $tmp=  array_merge($tmp,get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $modules, $base,
-          array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH));
-
-    $deps = array();
-    foreach($tmp as $tm){
-      $deps[$tm['dn']] = $tm['dn'];
-    }
-
-    $department = $departments = array();
-    $ui= get_userinfo();
-    $d = $ui->get_module_departments($modules);
-    foreach($d as $department){
-      $departments[$department] = $department;
-    }
-
-    /* Load possible departments */
-    $ids = $this->config->idepartments;
-    $first = "";
-    $found = FALSE;
-    $options = array();
-    foreach($ids as $dep => $name){
-      if(isset($deps[$dep]) && in_array_ics($dep, $departments)){
-
-        /* Keep first base dn in mind, we could need this
-         *  info if no valid base was found
-         */
-        if(empty($first)) {
-          $first = $dep['dn'];
-        }
-
-        $value = $ids[$dep];
-        if ($this->selectedBase == $dep){
-          $found = TRUE;
-          $options.= "<option selected='selected' value='".$dep."'>$value</option>";
-        } else {
-          $options.= "<option value='".$dep."'>$value</option>";
-        }
-      }
-    }
-
-    $listhead = $this->get_default_header();
-
-    /* Add base selection */
-    $listhead .= _("Base")."&nbsp; <select name='CurrentMainBase' onChange='mainform.submit()' class='center'>$options</select>".
-      " <input class='center' type='image' src='images/list_submit.png' align='middle'
-      title='"._("Submit department")."' name='submit_department' alt='". _("Submit")."'>&nbsp;";
-
-    $this->SetListHeader($listhead);
-
-  }
-
-
-  function setEntries()
-  {
-    $_target_list = array();
-    if($this->display_server){
-      $_target_list = array_merge($_target_list,
-            get_list("(&(cn=".$this->regex.")(objectClass=goServer))",
-            "server",get_ou("serverou").$this->selectedBase,
-            array("cn","objectClass","description","ipHostNumber","macAddress"),GL_NONE));
-    }
-    if($this->display_workstation){
-      $_target_list = array_merge($_target_list,
-            get_list("(&(cn=".$this->regex.")(objectClass=gotoWorkstation))",
-            "workstation",get_ou("workstationou").$this->selectedBase,
-            array("cn","objectClass","description","ipHostNumber","macAddress"),GL_NONE));
-    }
-    if($this->display_ogroup){
-      $_target_list = array_merge($_target_list,
-            get_list("(&(cn=".$this->regex.")(member=*)(objectClass=gosaGroupOfNames))",
-            "ogroups",get_ou("ogroupou").$this->selectedBase,
-            array("cn","objectClass","description","member"),GL_NONE));
-    }
-    $this->_target_list = $_target_list;
-
-    $tmp = array();
-    foreach($this->_target_list as $key => $object){
-      $tmp[$key] = $object['cn'][0];
-    }
-    natcasesort($tmp);
-
-    foreach($tmp as $key => $obj){
-
-      $obj = $this->_target_list[$key];
-      $name = $obj['cn'][0];
-      if(isset($obj['description'])){
-        $name .= "&nbsp;[".$obj['description'][0]."]";
-      }
-      if(isset($obj['macAddress'])){
-        $name .= "&nbsp;- ".$obj['macAddress'][0]."";
-      }
-      if(isset($obj['ipHostNumber'])){
-        $name .= "&nbsp;- ".$obj['ipHostNumber'][0]."";
-      }
-
-      $img ="";
-      if(in_array("goServer",$obj['objectClass'])){
-        $img = '<img class="center" src="images/select_server.png" alt="S" title="'._("Server").'">';
-
-        if($this->filter_iprange){
-          if(!isset($obj['ipHostNumber']) || !tests::is_in_ip_range($this->ipfrom,$this->ipto,             $obj['ipHostNumber'][0])) {
-            continue;
-          }
-        }
-        if(!isset($this->server_list[$obj['dn']])){
-          continue;
-        }
-      }elseif(in_array("gotoWorkstation",$obj['objectClass'])){
-        $img = '<img class="center" src="images/select_workstation.png" alt="W" title="'._("Workstation").'">';
-        if($this->filter_iprange){
-          if(!isset($obj['ipHostNumber']) || !tests::is_in_ip_range($this->ipfrom,$this->ipto,$obj['ipHostNumber'][0])) {
-            continue;
-          }
-        }
-        if(!isset($this->workstation_list[$obj['dn']])){
-          continue;
-        }
-      }elseif(in_array("gosaGroupOfNames",$obj['objectClass'])){
-        $img = '<img class="center" src="images/select_ogroup.png" alt="O" title="'._("Object group").'">';
-      }
-
-      $field1 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>",
-                      "attach" => "style='width:20px;'");
-      $field2 = array("string" => $img,
-                      "attach" => "style='width:20px;'");
-      $field3 = array("string" => $name , "attach" => "title='".$obj['dn']."'");
-      $this->AddElement(array($field1,$field2,$field3));
-    }
-  }
-}
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/goto/addons/gotomasses/events/target_list.tpl b/gosa-plugins/goto/addons/gotomasses/events/target_list.tpl
deleted file mode 100644 (file)
index 589ff24..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-{$divlist}
-
-<p class='seperator'></p>
-<div style='text-align:right;width:100%;padding-top:5px;padding-right:5px;padding-bottom:5px;'>
-       <input type='submit' name='save_target_dialog' value='{t}Use{/t}'>&nbsp;
-       <input type='submit' name='abort_target_dialog' value='{t}Close{/t}'>
-</div>
diff --git a/gosa-plugins/goto/addons/gotomasses/events/timestamp_select.tpl b/gosa-plugins/goto/addons/gotomasses/events/timestamp_select.tpl
deleted file mode 100644 (file)
index c9a206b..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<table cellspacing="0" cellpadding="0">
-       <tr>
-               <td>{t}Jahr{/t}</td>
-               <td>{t}Monat{/t}</td>
-               <td>{t}Tag{/t}</td>
-               <td>{t}Stunde{/t}</td>
-               <td>{t}Minute{/t}</td>
-               <td>{t}Sekunde{/t}</td>
-       </tr>
-       <tr>
-               <td>
-                       <select name="time_year" onChange="document.mainform.submit();">
-                               {html_options values=$years options=$years selected=$time_year}
-                       </select>&nbsp;
-               </td>
-               <td>
-                       <select name="time_month" onChange="document.mainform.submit();">
-                               {html_options values=$months options=$months selected=$time_month}
-                       </select>&nbsp;
-               </td>
-               <td>
-                       <select name="time_day">
-                               {html_options values=$days options=$days selected=$time_day}
-                       </select>&nbsp;
-               </td>
-               <td>
-                       <select name="time_hour">
-                               {html_options values=$hours options=$hours selected=$time_hour}
-                       </select>&nbsp;
-               </td>
-               <td>
-                       <select name="time_minute">
-                               {html_options values=$minutes options=$minutes selected=$time_minute}
-                       </select>&nbsp;
-               </td>
-               <td>
-                       <select name="time_second">
-                               {html_options values=$seconds options=$seconds selected=$time_second}
-                       </select>
-               </td>
-       </tr>
-</table>
-
diff --git a/gosa-plugins/goto/addons/gotomasses/goto_task.tpl b/gosa-plugins/goto/addons/gotomasses/goto_task.tpl
deleted file mode 100644 (file)
index 61220bd..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-<table style='width:100%'>
-       <tr>
-               <td colspan="2">
-                       <h2><img alt="" src="images/head.png" class="center" align="middle"> {t}Job details{/t}</h2>
-               </td>
-       </tr>
-       <tr>
-               <td style="width:50%;">
-                       <table>
-                <tr><td>{t}Job ID{/t}</td><td>{$ID}</td></tr>
-                               <tr>
-                                       <td>
-                                               {t}Header Tag{/t}
-                                       </td>
-                                       <td>
-                                               <select name="HeaderTag" onChange="document.mainform.submit();">
-                                                       {html_options options=$Actions selected=$HEADERTAG} 
-                                               </select>       
-                                               <input type='image' src="images/list_reload.png"
-                                                alt="{t}Reload{/t}" title="{t}Reload{/t}" class="center">
-                                       </td>
-                               </tr>
-                               <tr>
-                                       <td>&nbsp;
-                                       </td>
-                               </tr>
-                               <tr>
-                                       <td style="vertical-align: top;">       
-                                               {t}Schedule Execution{/t}
-                                       </td>
-                                       <td>
-                                               <table cellspacing="0" cellpadding="0">
-                                                       <tr>
-                                                               <td>{t}Jahr{/t}</td>
-                                                               <td>{t}Monat{/t}</td>
-                                                               <td>{t}Tag{/t}</td>
-                                                               <td>{t}Stunde{/t}</td>
-                                                               <td>{t}Minute{/t}</td>
-                                                               <td>{t}Sekunde{/t}</td>
-                                                       </tr>
-                                                       <tr>
-                                                               <td>    
-                                                                       <select name="time_year" onChange="document.mainform.submit();">
-                                                                               {html_options values=$years options=$years selected=$time_year}
-                                                                       </select>&nbsp;
-                                                               </td>
-                                                               <td>    
-                                                                       <select name="time_month" onChange="document.mainform.submit();">
-                                                                               {html_options values=$months options=$months selected=$time_month}
-                                                                       </select>&nbsp;
-                                                               </td>
-                                                               <td>    
-                                                                       <select name="time_day">
-                                                                               {html_options values=$days options=$days selected=$time_day}
-                                                                       </select>&nbsp;
-                                                               </td>
-                                                               <td>    
-                                                                       <select name="time_hour">
-                                                                               {html_options values=$hours options=$hours selected=$time_hour}
-                                                                       </select>&nbsp;
-                                                               </td>
-                                                               <td>    
-                                                                       <select name="time_minute">
-                                                                               {html_options values=$minutes options=$minutes selected=$time_minute}
-                                                                       </select>&nbsp;
-                                                               </td>
-                                                               <td>    
-                                                                       <select name="time_second">
-                                                                               {html_options values=$seconds options=$seconds selected=$time_second}
-                                                                       </select>
-                                                               </td>
-                                                       </tr>
-                                               </table>
-                                       </td>
-                               </tr>
-                       </table>
-               </td>
-               <td>
-                       <table>
-{if $HEADERTAG == "ping"}
-                               <tr><td>{t}Status{/t}</td><td><input type="text" name="status" value="{$STATUS}"></td></tr>
-                   <tr><td>{t}Mac{/t}</td><td><input type="text" name="macaddress" value="{$MACADDRESS}"></td></tr>
-{elseif $HEADERTAG == "sayHello"}
-                               <tr><td>{t}Status{/t}</td><td><input type="text" name="status" value="{$STATUS}"></td></tr>
-                   <tr><td>{t}Mac{/t}</td><td><input type="text" name="macaddress" value="{$MACADDRESS}"></td></tr>
-{else}
-                               <tr><td>{t}Job type not implented{/t}</td></tr>
-{/if}
-                       </table>
-               </td>
-       </tr>
-</table>
-       
-<p class='seperator'>&nbsp;</p>
-<input type='hidden' name='goto_task_posted' value='1'>
-<p style="text-align:right">
-       <input type='submit' name='save_goto_task' value='{t}Ok{/t}'>
-       <input type='submit' name='close_goto_task' value='{t}Cancel{/t}'>
-</p>
diff --git a/gosa-plugins/goto/addons/gotomasses/gotomasses.tpl b/gosa-plugins/goto/addons/gotomasses/gotomasses.tpl
deleted file mode 100644 (file)
index 844cdeb..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-{$div}
-<div style="width:65%; text-align: center; float:left;" >
-{$range_selector}
-</div>
diff --git a/gosa-plugins/goto/addons/gotomasses/main.inc b/gosa-plugins/goto/addons/gotomasses/main.inc
deleted file mode 100644 (file)
index 8c6bd80..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-/*
- * 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
- */
-
-if (!$remove_lock){
-
-       /* Create gotomasses object on demand */
-       if (!session::is_set('gotomasses') || (isset($_GET['reset']) && $_GET['reset'] == 1) || isset($_POST['reload_gotomass_data'])){
-               $gotomasses= new gotomasses ($config);
-               $gotomasses->set_acl_category("gotomasses");
-
-        /* Check root dn and user dn for acl informations */
-        $gotomasses->set_acl_base($config->current['BASE']);
-        if($gotomasses->getacl("") == ""){
-            $gotomasses->set_acl_base($ui->dn);
-        }
-               
-               /* Check if we have acl on our own base */
-        if($gotomasses->getacl("") == ""){
-            $gotomasses->set_acl_base(dn2base($ui->dn));
-        }
-               session::set("gotomasses",$gotomasses);
-       }
-       $gotomasses = session::get('gotomasses');
-
-       /* Execute formular */
-       $display= $gotomasses->save_object();
-       if(isset($_POST['save_gotomass_changes'])){
-               $gotomasses->save();
-       }
-       $display= $gotomasses->execute ();
-
-       /* Page header*/
-       $display= print_header(get_template_path('images/system.png'), _("System deployment")).$display;
-
-       /* Store changes  in session */
-       session::set('gotomasses',$gotomasses);
-}
diff --git a/gosa-plugins/goto/addons/gotomasses/remove.tpl b/gosa-plugins/goto/addons/gotomasses/remove.tpl
deleted file mode 100644 (file)
index 6113ae3..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<div style="font-size:18px;">
- <img alt="" src="images/button_cancel.png" align=top>&nbsp;{t}Warning{/t}
-</div>
-<p>
-  {$info}
-</p>
-
-<p>
- {t}So - if you're sure - press 'Delete' to continue or 'Cancel' to abort.{/t}
-</p>
-
-<p class="plugbottom">
-{if $multiple}
-  <input type=submit name="delete_multiple_confirm" value="{t}Delete{/t}">
-{else}
-  <input type=submit name="delete_confirm" value="{t}Delete{/t}">
-{/if}
-  <input type=submit name="delete_cancel" value="{t}Cancel{/t}">
-</p>
-