Example #1
0
$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;
    $actionsStop[] = $stopAction;
    $actionsRestart[] = $restartAction;
} else {
    $status[] = _T("Stopped");
    $actionsStart[] = $startAction;
    $actionsStop[] = $emptyAction;
    $actionsRestart[] = $emptyAction;
}
$l = new ListInfos(array("DHCP", "DNS"), _T("Services"));
$l->setName(_T("Network services status"));
$l->addExtraInfo($status, _T("Status"));
$l->setParamInfo(array(array("service" => "DHCP"), array("service" => "DNS")));
$l->setTableHeaderPadding(1);
Example #2
0
 * $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;
Example #3
0
 * $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;
Example #4
0
 * $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;
Example #5
0
 * $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;