Example #1
0
    $msg = "<strong>User ID Cannot be empty</strong>";
    goto ErrorProcessing;
} elseif (!isset($_POST['password'])) {
    $msg = "<strong>Password cannot be empty</strong>";
    goto ErrorProcessing;
}
require "whywewant_ApplicationData.php";
//require("../C/whywewant_Class_ProcessMenu.php");
require "../storescripts/connect_to_mysql.php";
if (isset($_SESSION["Authentication"]["InvalidAttempts"])) {
    $InvalidAttempts = $_SESSION["Authentication"]["InvalidAttempts"];
}
$_SESSION = array();
$User_Handle = mysqli_real_escape_string($con, $User_Handle);
$Password_Ins = mysqli_real_escape_string($con, $Password);
$User_IPAddress = ipCheck();
$User_ProxyIP = $User_IPAddress["Proxy"];
$User_PublicIP = $User_IPAddress["Public"];
$User_ChannelType = '';
//$User_IPAddress["Channel"];
// get the current time for timestamp
$CurTime = time();
$Cur_Date = date('Y-m-d');
list($Cur_Year, $Cur_Month, $Cur_Day) = explode("-", $Cur_Date);
$chkUser = mysqli_fetch_array(mysqli_query($con, "SELECT A.* FROM whywewant_user A WHERE A.User_Handle=('{$User_Handle}') AND A.Rec_Status='A'  "));
if (!$chkUser) {
    /* $insertInvalidUser= "******";
    	
    	if (!@ mysqli_query($insertInvalidUser, $con)) 
    	{
    		$msg="Admin Error Logging -: insertInvalidUser ". mysqli_error();
Example #2
0
<?php

////    Debug Script for Classify
// Will echo most debug points.
// Useful if users get a region that is not what we expect.
include_once 'classify.functions.php';
if (!empty($_GET['IP'])) {
    $ip = $_GET['IP'];
} else {
    if (!empty($_SERVER['HTTP_CF_CONNECTING_IP'])) {
        $ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
    } else {
        if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
            $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
        } else {
            if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
                $ip = $_SERVER['HTTP_CLIENT_IP'];
            } else {
                $ip = $_GET['REMOTE_ADDR'];
            }
        }
    }
}
$region = ipCheck($ip, true);
if (is_array($region)) {
    $hash = ipHash($ip, true);
    $region = $region[$hash];
}
echo $region;
Example #3
0
    } elseif (getenv('HTTP_FORWARDED')) {
        $ip = getenv('HTTP_FORWARDED');
    } else {
        $ip = $_SERVER['REMOTE_ADDR'];
    }
    return $ip;
}
date_default_timezone_set('Europe/Stockholm');
if (MD5($_REQUEST['p']) == '42756fc98852b2d3fb4bf16fedc82b12') {
    //try to avoid problems with locking the database while downloading...
    $bfile = $DataDB . ".backup";
    if (file_exists($bfile)) {
        unlink($bfile);
    }
    copy($DataDB, $bfile);
    header('Content-Description: File Transfer');
    header('Content-Type: application/octet-stream');
    header('Content-Disposition: attachment; filename=' . basename($bfile));
    header('Content-Transfer-Encoding: binary');
    header('Expires: 0');
    header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
    header('Pragma: public');
    header('Content-Length: ' . filesize($bfile));
    readfile($bfile);
    $myFile = "log.txt";
    $fh = fopen($myFile, 'a');
    fwrite($fh, date('Y-m-d h:i') . ' backup downloaded to ' . ipCheck() . "\n");
    fclose($fh);
} else {
    print "Invalid Password";
}
Example #4
0
<?php

include_once 'classify.functions.php';
if (!empty($_SERVER['HTTP_CF_CONNECTING_IP'])) {
    $ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
} else {
    if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
        $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
    } else {
        if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
            $ip = $_SERVER['HTTP_CLIENT_IP'];
        } else {
            $ip = $_SERVER['REMOTE_ADDR'];
        }
    }
}
$region = ipCheck($ip);
if (is_array($region)) {
    $hash = ipHash($ip);
    $region = $region[$hash];
}
date_default_timezone_set('UTC');
$download_link = '//' . $region . '.dl.elementary.io/download/' . base64_encode(time()) . '/';
 /**
  * Delete one group
  */
 public function deleteAction(Request $request, $groupName)
 {
     ipCheck();
     $group = $this->findGroupBy('name', $groupName);
     $this->get('fos_user.group_manager')->deleteGroup($group);
     $response = new RedirectResponse($this->generateUrl('fos_user_group_list'));
     /** @var $dispatcher \Symfony\Component\EventDispatcher\EventDispatcherInterface */
     $dispatcher = $this->get('event_dispatcher');
     $dispatcher->dispatch(FOSUserEvents::GROUP_DELETE_COMPLETED, new FilterGroupResponseEvent($group, $request, $response));
     return $response;
 }
Example #6
0
$lang = @strtolower($lang[0]);
$file = file("data/online.php");
$past = time() - $users_timeout_seconds;
$now = time();
if (isset($_SESSION[user])) {
    $write = "{$_SESSION['user']}|{$_SESSION['email']}|{$_SESSION['permission']}|{$_SESSION['joined']}|{$now}|{$ip}|{$_SESSION['location']}|member||\n";
}
if (!isset($_SESSION[user])) {
    $write = "guest|{$ip}|{$now}|{$referer}|{$lang}||\n";
}
for ($i = 0; $i < count($file); $i++) {
    $visitdata = explode("|", $file[$i]);
    if ($visitdata[4] > $past && $visitdata[0] != $_SESSION[user]) {
        $write .= "{$visitdata['0']}|{$visitdata['1']}|{$visitdata['2']}|{$visitdata['3']}|{$visitdata['4']}|{$visitdata['5']}|{$visitdata['6']}||\n";
    }
    if ($visitdata[2] > $past && $visitdata[1] != ipCheck()) {
        $write .= "{$visitdata['0']}|{$visitdata['1']}|{$visitdata['2']}|{$visitdata['3']}|{$visitdata['4']}||\n";
    }
}
if ($ofile = @fopen("data/online.php", "w")) {
    @fputs($ofile, $write);
    @fclose($ofile);
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Show number of total members
$file = file("data/users.php");
$TotalMembersCount = 0;
for ($line = 0; $line < sizeof($file); $line++) {
    $TotalMembersCount++;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////