diff --git a/plugins/admin/systems/class_divListSystemService.inc b/plugins/admin/systems/class_divListSystemService.inc
index 426b97b15f7e5f65f6b4736b46c4757009076058..7f86a278bd4881c916530dd20610dd5faabd1663 100644 (file)
function divListSystemService ($config,$parent)
{
- MultiSelectWindow::MultiSelectWindow($config,"SystemService");
+ MultiSelectWindow::MultiSelectWindow($config,"SystemService", "server");
$this->parent = $parent;
$this->ui = get_userinfo();
}
}
$listhead = "<div style='background:#F0F0F9;padding:5px;'>".
- " <input class='center' type='image' align='middle' src='images/select_new_server.png' class='center'
+ " <input type='image' align='middle' src='images/select_new_server.png' class='center'
name='addNewService' alt='"._("Add service")."' title='"._("Add new service")."'> ".
" <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> ".
- " <input class='center' type='image' align='middle' src='images/status_start_all.png' class='center'
+ " <input type='image' align='middle' src='images/status_start_all.png' class='center'
name='startServices' alt='"._("Start all")."' title='"._("Start all services")."'> ".
- " <input class='center' type='image' align='middle' src='images/status_stop_all.png' class='center'
+ " <input type='image' align='middle' src='images/status_stop_all.png' class='center'
name='stopServices' alt='"._("Stop service")."' title='"._("Stop all services")."'> ".
- " <input class='center' type='image' align='middle' src='images/status_restart_all.png' class='center'
+ " <input type='image' align='middle' src='images/status_restart_all.png' class='center'
name='restartServices' alt='"._("Restart service")."' title='"._("Restart all services")."'> ".
"</div>";
$this->SetListHeader($listhead);
function setEntries($list)
{
+ $tmp = array();
foreach($list as $name => $entry){
+ $tmp[$name] = $entry['Message'];
+ }
+
+ natcasesort($tmp);
+ $tmp2 = array();
+ foreach($tmp as $name => $value){
+ $tmp2[$name] = $list[$name];
+ }
+
+ foreach($tmp2 as $name => $entry){
switch($entry['Status']){
- case '' : $str ="";break;
+ case '' : $str =" ";break;
case SERVICE_STOPPED : $str ="<img src='images/status_stopped.png' title='"._("Stopped")."'>"; break;
case SERVICE_STARTED : $str ="<img src='images/status_running.png' title='"._("Started")."'>"; break;
case SERVICE_RESTARTED : $str ="<img src='images/status_restarting.png' title='"._("Restarting")."' alt='R'>"; break;
default: $str= "<img src='images/select_user.png' alt='".$entry['Status']."' title='"._("User status")." : ".$entry['Status']."'>";
}
+ $WasAccount = $this->parent->plugins[$name] -> initially_was_account;
+
$field1 = array("string" => $str ,"attach" => "style='width:20px;'");
$field2 = array("string" => $entry['Message'] );
$actions ="";
- if($entry['AllowStart']){
- $actions .= " <input type='image' name='StartSingleService_".$name."' src='images/status_start.png'>";
+ if($entry['AllowStart'] && $WasAccount){
+ $actions .= " <input type='image' name='StartSingleService_".$name."' src='images/status_start.png'
+ title='"._("Start service")."'>";
}else{
$actions .= " <img src='images/empty' width='16' alt=''>";
}
- if($entry['AllowStart']){
- $actions .= " <input type='image' name='StopSingleService_".$name."' src='images/status_stop.png'>";
+ if($entry['AllowStart'] && $WasAccount){
+ $actions .= " <input type='image' name='StopSingleService_".$name."' src='images/status_stop.png'
+ title='"._("Stop service")."'>";
}else{
$actions .= " <img src='images/empty' width='16' alt=''>";
}
- if($entry['AllowStart']){
- $actions .= " <input type='image' name='RestartSingleService_".$name."' src='images/status_restart.png'>";
+ if($entry['AllowStart'] && $WasAccount){
+ $actions .= " <input type='image' name='RestartSingleService_".$name."' src='images/status_restart.png'
+ title='"._("Restart service")."'>";
}else{
$actions .= " <img src='images/empty' width='16' alt=''>";
}
if($entry['AllowEdit']){
- $actions .= " <input type='image' name='EditSingleService_".$name."' src='images/edit.png'>";
+ $actions .= " <input type='image' name='EditSingleService_".$name."' src='images/edit.png'
+ title='"._("Edit service")."'>";
}else{
$actions .= " <img src='images/empty' width='16' alt=''>";
}
if($entry['AllowRemove']){
- $actions .= " <input type='image' name='RemoveSingleService_".$name."' src='images/edittrash.png'>";
+ $actions .= " <input type='image' name='RemoveSingleService_".$name."' src='images/edittrash.png'
+ title='"._("Remove service")."'>";
}else{
$actions .= " <img src='images/empty' width='16' alt=''>";
}