Ejemplo n.º 1
0
function getFraudParams($fraudmodule, $userid = "", $ip = "")
{
    global $remote_ip;
    if (!$userid) {
        $userid = $_SESSION['uid'];
    }
    include ROOTDIR . "/includes/countriescallingcodes.php";
    $params = getFraudConfigOptions($fraudmodule);
    $params['ip'] = $ip ? $ip : $remote_ip;
    $params['forwardedip'] = $_SERVER['HTTP_X_FORWARDED_FOR'];
    $params['clientsdetails'] = getClientsDetails($userid);
    $countrycode = $params['clientsdetails']['country'];
    $params['clientsdetails']['countrycode'] = $countrycallingcodes[$countrycode];
    $phonenumber = preg_replace("/[^0-9]/", "", $params['clientsdetails']['phonenumber']);
    $params['clientsdetails']['phonenumber'] = $phonenumber;
    return $params;
}
Ejemplo n.º 2
0
} else {
    $fraud = "";
}
echo "<p>" . $aInt->lang("fraud", "info") . "</p>";
echo "<form method=\"post\" action=\"" . $PHP_SELF . "\"><p>" . $aInt->lang("fraud", "choose") . ": <select name=\"fraud\" onChange=\"submit();\">";
foreach ($fraudmodules as $file) {
    echo "<option value=\"" . $file . "\"";
    if ($fraud == $file) {
        echo " selected";
    }
    echo ">" . TitleCase(str_replace("_", " ", $file)) . "</option>";
}
echo "</select> <input type=\"submit\" value=\" " . $aInt->lang("global", "go") . " \" class=\"button\"></p></form>";
if ($fraud) {
    $configarray = getConfigArray();
    $configvalues = getFraudConfigOptions($fraud);
    echo "\n<form method=\"post\" action=\"";
    echo $PHP_SELF;
    echo "?action=save\">\n<input type=\"hidden\" name=\"fraud\" value=\"";
    echo $fraud;
    echo "\">\n\n<table class=\"form\" width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">\n";
    foreach ($configarray as $regconfoption => $values) {
        if (!$values['FriendlyName']) {
            $values['FriendlyName'] = $regconfoption;
        }
        $values['Name'] = $regconfoption;
        $values['Value'] = $configvalues[$regconfoption];
        echo "<tr><td class=\"fieldlabel\">" . $values['FriendlyName'] . "</td><td class=\"fieldarea\">" . moduleConfigFieldOutput($values) . "</td></tr>";
    }
    echo "</table>\n\n<p align=\"center\"><input type=\"submit\" value=\"";
    echo $aInt->lang("global", "savechanges");