Beispiel #1
0
/**
 * (c) 2004-2007 Linbox / Free&ALter Soft, http://linbox.com
 * (c) 2007-2008 Mandriva, http://www.mandriva.com/
 *     
 * $Id$
 *              
 * 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
 */
function displayLocalisationBar()
{
    if (!isset($_SESSION["displayLocalisationBar"])) {
        $_SESSION["displayLocalisationBar"] = xmlCall("pulse2.displayLocalisationBar");
    }
    return $_SESSION["displayLocalisationBar"];
}
Beispiel #2
0
/**
 * (c) 2004-2007 Linbox / Free&ALter Soft, http://linbox.com
 * (c) 2007-2009 Mandriva, http://www.mandriva.com
 *
 * $Id$
 *
 * 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, see <http://www.gnu.org/licenses/>.
 */
function __get_and_store_im($prefix, $option, $function)
{
    if (!isset($_SESSION[$prefix . "." . $option])) {
        $_SESSION[$prefix . "." . $option] = xmlCall($prefix . "." . $function);
    }
    return $_SESSION["imaging." . $option];
}
Beispiel #3
0
function __web_def_in_session_msc($option)
{
    if (!isset($_SESSION[$option])) {
        $_SESSION[$option] = xmlCall("msc.get_web_def_" . $option);
    }
    return $_SESSION[$option];
}
Beispiel #4
0
function getMaxElementsForStaticList()
{
    if (!isset($_SESSION["maxElementsForStaticList"])) {
        $_SESSION["maxElementsForStaticList"] = xmlCall("dyngroup.getMaxElementsForStaticList", null);
    }
    return $_SESSION["maxElementsForStaticList"];
}
Beispiel #5
0
function save_smbconf()
{
    $options = array();
    # sanitize POST values
    foreach ($_POST as $key => $value) {
        if (get_magic_quotes_gpc()) {
            $options[str_replace("_", " ", $key)] = stripslashes($value);
        } else {
            $options[str_replace("_", " ", $key)] = $value;
        }
    }
    if (!isset($_POST['hasprofiles'])) {
        $options['hasprofiles'] = false;
    } else {
        $options['hasprofiles'] = true;
    }
    if (!isset($_POST['hashomes'])) {
        $options['hashomes'] = false;
    } else {
        $options['hashomes'] = true;
    }
    if (!isset($_POST['pdc'])) {
        $options['pdc'] = false;
    } else {
        $options['pdc'] = true;
    }
    # apply samba options
    return xmlCall("samba.smbInfoSave", array($options));
}
function search_machines($filter = null)
{
    if ($filter == "") {
        $filter = null;
    } else {
        $filter = "*" . $filter . "*";
    }
    return xmlCall("samba.getMachinesLdap", $filter);
}
Beispiel #7
0
function _base_delGroup($group)
{
    $ret = xmlCall("base.delGroup", $group);
    if ($ret == 2) {
        $msg = sprintf(_("Group %s can't be deleted.<br/>%s is the primary group of some users."), $group, $group);
    } else {
        $msg = sprintf(_("Group %s successfully deleted."), $group);
    }
    return array("code" => $ret, "info" => $msg);
}
Beispiel #8
0
/* Session creation */
$ip = preg_replace('@\\.@', '', $_SERVER["REMOTE_ADDR"]);
$sessionid = md5(time() . $ip . mt_rand());
session_destroy();
session_id($sessionid);
session_name("PULSESESSION");
session_start();
$_SESSION["ip_addr"] = $_SERVER["REMOTE_ADDR"];
if (isset($conf[$server])) {
    $_SESSION["XMLRPC_agent"] = parse_url($conf[$server]["url"]);
    $_SESSION["agent"] = $server;
    $_SESSION["XMLRPC_server_description"] = $conf[$server]["description"];
} else {
    $error = sprintf(_("The server %s does not exist"), $server);
}
if (empty($error) && xmlCall("base.tokenAuthenticate", array($login, $token))) {
    include "includes/createSession.inc.php";
    /* Redirect to main page */
    header("Location: " . $root . "main.php");
    exit;
} else {
    $_SESSION['lang'] = $lang;
    require "includes/i18n.inc.php";
    if (!isXMLRPCError() && empty($error)) {
        $error = _("Token not valid");
    } else {
        if (isXMLRPCError()) {
            $error = _("Error while validating your token. Please contact your administrator.");
        }
    }
    header("Location: " . $root . "index.php?error=" . $error);
Beispiel #9
0
function isLogViewEnabled()
{
    if (!isset($_SESSION["isLogViewEnabled"])) {
        $_SESSION["isLogViewEnabled"] = xmlCall("base.isLogViewEnabled");
    }
    return $_SESSION["isLogViewEnabled"];
}
Beispiel #10
0
<?php

$_SESSION["login"] = $login;
$_SESSION["pass"] = $pass;
/* Set session expiration time */
$_SESSION["expire"] = time() + 90 * 60;
if (isset($_POST["lang"])) {
    $lang = $_POST["lang"];
}
if (isset($_GET["lang"])) {
    $lang = $_GET["lang"];
}
$_SESSION['lang'] = $lang;
setcookie('lang', $lang, time() + 3600 * 24 * 30);
list($_SESSION["acl"], $_SESSION["acltab"], $_SESSION["aclattr"]) = createAclArray(getAcl($login));
/* Register agent module list */
$_SESSION["supportModList"] = array();
$list = xmlCall("base.getModList", null);
if (is_array($list)) {
    sort($list);
    $_SESSION["supportModList"] = $list;
}
/* Register module version */
$_SESSION["modListVersion"]['rev'] = xmlCall("getRevision", null);
$_SESSION["modListVersion"]['ver'] = xmlCall("getVersion", null);
/* Make the comnpany logo effect */
$_SESSION["doeffect"] = True;
Beispiel #11
0
<?php

/**
 * (c) 2004-2007 Linbox / Free&ALter Soft, http://linbox.com
 * (c) 2007-2012 Mandriva, http://www.mandriva.com
 *
 * $Id$
 *
 * 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, see <http://www.gnu.org/licenses/>.
 */
// Get method name and params
$method_name = $_POST['method_name'];
$params = $_POST['params'];
$result = xmlCall($method_name, $params);
print json_encode($result);
Beispiel #12
0
<?php

/**
 * (c) 2004-2007 Linbox / Free&ALter Soft, http://linbox.com
 * (c) 2007-2008 Mandriva, http://www.mandriva.com/
 *
 * $Id$
 *
 * 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
 */
xmlCall("samba.restartSamba");
new NotifyWidgetSuccess(_T("The SAMBA service has been asked to restart."));
redirectTo(urlStrRedirect("samba/config/index"));
Beispiel #13
0
function result_group($gid, $min, $max, $filter) {
    return xmlCall("pulse2.result_group", array($gid, $min, $max, $filter));
}
Beispiel #14
0
function xmlrpc_getLocationName($uuid) {
    return xmlCall("pulse2.getLocationName", array($uuid));
}
Beispiel #15
0
function getSubPackageMirrors($uuids)
{
    return xmlCall('msc.ma_getSubPackageMirrors', array($uuids));
}
Beispiel #16
0
function xmlrpc_isProfileAssociatedToImagingServer($gid)
{
    return xmlCall("dyngroup.isProfileAssociatedToImagingServer", array($gid));
}
Beispiel #17
0
function msc_script_detailled_info($filename)
{
    return xmlCall("msc.msc_script_detailled_info", array($filename));
}
Beispiel #18
0
function has_audit_working()
{
    if (!isset($_SESSION["hasAuditManagerWorking"])) {
        $_SESSION["hasAuditManagerWorking"] = xmlCall("base.hasAuditWorking");
    }
    return $_SESSION["hasAuditManagerWorking"];
}
Beispiel #19
0
function restartShorewallService()
{
    return xmlCall("shorewall.restart_service", array());
}
Beispiel #20
0
<?

exit(6);

}
?>
<div style="width:99%">
<?

$extra = array();
$date = array();
$op = array();

$errStrings = array("no free leases", "Error", "error", "Not configured to listen on any interfaces!", "Can't");

foreach (xmlCall("network.getDhcpLog",array($_SESSION['ajax']['filter'])) as $line) {
    if (is_array($line)) {
        $found = False;
        foreach($errStrings as $err) {
            if (strpos($line["extra"], $err) !== False) {
                $extra[] = '<div class="error">' . $line["extra"] . "</div>";
                $found = True;
                break;
            }
        }
        if (!$found) $extra[] = $line["extra"];
	$op[] = '<a href="#" onClick="$(\'param\').value=\''.$line["op"].'\'; pushSearch(); return false">'.$line["op"].'</a>';
        $dateparsed = strftime('%b %d %H:%M:%S',$line["time"]);
        $date[] = str_replace(" ", "&nbsp;", $dateparsed);
    } else {
        $date[] = "";
Beispiel #21
0
function get_process()
{
    return xmlCall("base.listProcess", null);
}
Beispiel #22
0
function del_group($group)
{
    xmlCall("base.delGroup", $group);
}
Beispiel #23
0
}

-->
</style>

<?php 
$path = array(array("name" => _T("Restart squidGuard server")));
$topLeft = 1;
/* Inclusion de la bar de navigation */
require "graph/navbar.inc.php";
$goto = $root . "main.php?module=proxy&submod=blacklist&action=index";
?>


<h2><?php 
echo _T('Restart squidGuard server');
?>
</h2>

<?php 
$file = $conf["proxy"]["squidguard"];
echo xmlCall("proxy.restartSquid", null);
?>

<form method="post" action="main.php?module=proxy&submod=blacklist&action=statut">
<input name="bback" type="submit" class="btnPrimary" value="<?php 
echo _('Back');
?>
" />
</form>
Beispiel #24
0
<?php

/*
 * (c) 2004-2007 Linbox / Free&ALter Soft, http://linbox.com
 * (c) 2007 Mandriva, http://www.mandriva.com
 *
 * $Id$
 *
 * 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
 */
if (!isset($_SESSION[$_GET["uuid"]]['getMachineMac'])) {
    $_SESSION[$_GET["uuid"]]['getMachineMac'] = xmlCall('base.getMachineMac', array(array('uuid' => $_GET["uuid"])));
}
$adresses = $_SESSION[$_GET["uuid"]]['getMachineMac'];
print join(', ', $adresses);
//xmlCall('base.getMachineMac', array(array('uuid'=>$_GET["uuid"]))));
Beispiel #25
0
function print_health()
{
    $up = xmlCall("base.getUptime");
    $up = trim($up[0]);
    $mem = xmlCall("base.getMemoryInfos");
    echo format_health($up, $mem);
}
Beispiel #26
0
function getServicesNames()
{
    return xmlCall("network.get_services_names", array());
}
function deleteMachine($machineName)
{
    return xmlCall("samba4.deleteMachine", $machineName);
}
Beispiel #28
0
function xmlrpc_getComputerByUUID($uuid)
{
    return xmlCall("imaging.getComputerByUUID", array($uuid));
}
Beispiel #29
0
function updateSambaUserPassword($paramsArray)
{
    return xmlCall("samba4.updateSambaUserPassword", $paramsArray);
}
Beispiel #30
0
function getMachineListByState($groupName)
{
    return xmlCall("inventory.getMachineListByState", array($groupName));
}