c977c004fdb6e10358b27ca7fb36102b2fc23581
1 <?php
3 class DaemonEvent_reinstall extends DaemonEvent
4 {
5 var $progress = -1;
6 var $status = "none";
8 public function __construct($config,$data = array())
9 {
10 DaemonEvent::__construct($config,$data);
11 $this->s_Menu_Name = _("Reinstall");
12 $this->s_Event_Name = _("Reinstall");
13 $this->s_Schedule_Action = "job_trigger_action_reinstall";
14 $this->s_Trigger_Action= "gosa_trigger_action_reinstall";
15 $this->s_Menu_Image = "images/fai_small.png";
16 $this->s_List_Image = "images/fai_small.png";
18 if(!$this->is_new()){
19 if(isset($data['PROGRESS'])){
20 $this->progress = $data['PROGRESS'];
21 }
22 if(isset($data['STATUS'])){
23 $this->progress = $data['STATUS'];
24 }
25 }
26 }
28 public function execute()
29 {
30 DaemonEvent::execute();
32 $display = $this->get_header();
34 $tmp = $this->data;
36 /* Check if target add dialog is open */
37 if($this->is_target_list_open() && $this->is_new){
38 return($this->get_target_add_list());
39 }
41 $smarty = get_smarty();
42 $smarty->assign("status" , $this->status);
43 $smarty->assign("progress" , $this->progress);
44 $smarty->assign("data" , $this->data);
45 $smarty->assign("target_list" , $this->get_target_list());
46 $smarty->assign("is_new" , $this->is_new);
47 $smarty->assign("timestamp" , $this->get_time_select());
48 $display.= $smarty->fetch(get_template_path('DaemonEvent_reinstall.tpl', TRUE, dirname(__FILE__)));
49 $display.= $this->get_footer();
50 return($display);
51 }
53 public function save_object()
54 {
55 $ret = DaemonEvent::save_object();
56 foreach(array("progress","status") as $attr){
57 if(isset($_POST[$attr])){
58 $this->$attr = get_post($attr);
59 }
60 }
61 }
63 public function save()
64 {
65 $ret = DaemonEvent::save();
66 foreach(array("progress","status") as $attr){
67 # $ret[$attr] = $this->$attr;
68 }
69 return($ret);
70 }
71 }
72 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
73 ?>