echo gettext("Status"); ?> </td> </tr> </thead> <tbody> <?php $services = get_services(); if (count($services) > 0) { uasort($services, "service_name_compare"); foreach ($services as $service) { if (empty($service['name'])) { continue; } if (empty($service['description'])) { $service['description'] = get_pkg_descr($service['name']); } echo "<tr><td class=\"listlr\" width=\"20%\">" . $service['name'] . "</td>\n"; echo "<td class=\"listr\" width=\"55%\">" . $service['description'] . "</td>\n"; // if service is running then listr else listbg $bgclass = null; if (get_service_status($service)) { $bgclass = "listr"; } else { $bgclass = "listbg"; } echo "<td class=\"" . $bgclass . "\" align=\"center\">" . get_service_status_icon($service, true, true) . "</td>\n"; echo "<td valign=\"middle\" class=\"list nowrap\">" . get_service_control_links($service); $scut = get_shortcut_by_service_name($service['name']); if (!empty($scut)) { echo get_shortcut_main_link($scut, true, $service);
<tr> <td width="22%" valign="top" class="vncell"><?php echo gettext("Service to Add:"); ?> </td> <td width="78%" class="vtable"> <select name="svcid" class="formselect" id="svcid"> <?php $i = 0; foreach ($system_services as $svc) { ?> <?php if (!servicewatchdog_is_service_watched($svc)) { ?> <?php $svc['description'] = empty($svc['description']) ? get_pkg_descr($svc['name']) : $svc['description']; ?> <option value="<?php echo $i; ?> "><?php echo $svc['name']; ?> : <?php echo strlen($svc['description']) > 50 ? substr($svc['description'], 0, 50) . "..." : $svc['description']; ?> </option> <?php } $i++; }