Exemplo n.º 1
0
function popup_delete()
{
    $users = new AutoUsers();
    unset($users->AutoCreateAccountIPArray[$_GET["AutoCreateAccountDelete"]]);
    $users->Save(1);
}
Exemplo n.º 2
0
function SaveSettings()
{
    $AutoUsers = new AutoUsers();
    if ($_GET["ipfrom"] != null) {
        $ip = new IP();
        if (preg_match("#([0-9\\.]+)\\.([0-9]+)\$#", $_GET["ipfrom"], $re)) {
            $secondip = $re[1] . ".255";
        }
        $cdir = $ip->ip2cidr($_GET["ipfrom"], $secondip);
        if ($cdir != null) {
            echo "CDIR:{$cdir}\n{$_GET["ipfrom"]}-{$secondip}\n";
            $AutoUsers->AutoCreateAccountIPArray[] = $cdir;
        } else {
            echo "CDIR:{$_GET["ipfrom"]}-{$secondip}=false\n";
        }
    }
    $AutoUsers->AutoCreateAccountEnabled = $_GET["AutoCreateAccountEnabled"];
    $AutoUsers->Save();
}