$params = array(); $actionsStart = array(); $actionsStop = array(); $actionsReload = array(); $actionsRestart = array(); $actionsLog = array(); $startAction = new ActionItem(_T("Start service"), "servicestart", "start", ""); $stopAction = new ActionItem(_T("Stop service"), "servicestop", "stop", ""); $reloadAction = new ActionItem(_T("Reload service"), "servicereload", "reload", ""); $restartAction = new ActionItem(_T("Restart service"), "servicerestart", "restart", ""); $logAction = new ActionItem(_T("View log"), "servicelog", "display", ""); $emptyAction = new EmptyActionItem(); $status = array(); $actionsReload[] = $emptyAction; $actionsLog[] = $logAction; if (dhcpService("status")) { $status[] = _T("Started"); $actionsStart[] = $emptyAction; $actionsStop[] = $stopAction; $actionsRestart[] = $restartAction; } else { $status[] = _T("Stopped"); $actionsStart[] = $startAction; $actionsStop[] = $emptyAction; $actionsRestart[] = $emptyAction; } $actionsLog[] = $logAction; $actionsReload[] = $reloadAction; if (dnsService("status")) { $status[] = _T("Started"); $actionsStart[] = $emptyAction;
* $Id: services.php 29 2007-04-19 12:49:54Z cedric $ * * This file is part of Management Console. * * MMC 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. * * MMC 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 MMC; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ $service = $_GET["service"]; if ($service == "DNS") { dnsService("start"); } else { if ($service == "DHCP") { dhcpService("start"); } } if (!isXMLRPCError()) { new NotifyWidgetSuccess(_T("The service has been asked to start.")); } header("Location: " . urlStrRedirect("network/network/services")); exit;
* $Id: services.php 29 2007-04-19 12:49:54Z cedric $ * * This file is part of Mandriva Management Console (MMC). * * MMC 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. * * MMC 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 MMC; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ $service = $_GET["service"]; if ($service == "DNS") { dnsService("reload"); } else { if ($service == "DHCP") { dhcpService("reload"); } } if (!isXMLRPCError()) { new NotifyWidgetSuccess(_T("The service has been asked to reload.")); } header("Location: " . urlStrRedirect("network/network/services")); exit;
* $Id: services.php 29 2007-04-19 12:49:54Z cedric $ * * This file is part of Mandriva Management Console (MMC). * * MMC 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. * * MMC 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 MMC; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ $service = $_GET["service"]; if ($service == "DNS") { dnsService("restart"); } else { if ($service == "DHCP") { dhcpService("restart"); } } if (!isXMLRPCError()) { new NotifyWidgetSuccess(_T("The service has been asked to restart.")); } header("Location: " . urlStrRedirect("network/network/services")); exit;
* $Id: services.php 29 2007-04-19 12:49:54Z cedric $ * * This file is part of Mandriva Management Console (MMC). * * MMC 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. * * MMC 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 MMC; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ $service = $_GET["service"]; if ($service == "DNS") { dnsService("stop"); } else { if ($service == "DHCP") { dhcpService("stop"); } } if (!isXMLRPCError()) { new NotifyWidgetSuccess(_T("The service has been asked to stop.")); } header("Location: " . urlStrRedirect("network/network/services")); exit;