Ejemplo n.º 1
0
function checkstate($name)
{
    require "config.php";
    analyzelog();
    analyzesublog();
    $db = mysql_connect($dbserver, $dbuser, $dbpassword);
    mysql_select_db($dbname, $db);
    $sql = "SELECT * FROM vpn WHERE name = '" . $name . "';";
    $result = mysql_query($sql);
    $row = mysql_fetch_assoc($result);
    if ($row['state'] == 1) {
        $message = "Hi there, Your Account is Active.<br/>Your User Name is:" . $row['name'] . "<br/>Your Password is:" . $row['passwd'] . "<br/>Address of your server is:" . $vpnaddress . "<br/>Your IP on VPN is : " . $row['ip'] . "<br />You have been on the server for " . $row['time'] . " minutes, transmited " . $row['data'] . " bytes of data. ";
    } else {
        $message = "Hi there, Your Account is Disabled.<br/>Your User Name is:" . $row['name'] . "<br/>Your Password is:" . $row['passwd'] . "<br/>Address of your server is:" . $vpnaddress . "<br/>Your IP on VPN is : " . $row['ip'] . "<br />You have been on the server for " . $row['time'] . " minutes, transmited " . $row['data'] . " bytes of data. ";
    }
    echo $message;
}
Ejemplo n.º 2
0
Archivo: auth.php Proyecto: istrwei/vpn
require "config.php";
require "functions.php";
$sitepassword = md5(md5($sitepassword, false), false);
if ($_GET['sitepassword'] == $sitepassword && $_GET['action']) {
    if (is_numeric($_GET['operateid']) == TRUE && $_GET['action'] == "enauth") {
        enauth($_GET['operateid']);
        echo "1";
    }
    if (is_numeric($_GET['operateid']) == TRUE && $_GET['action'] == "deauth") {
        deauth($_GET['operateid']);
        echo "0";
    }
    if ($_GET['action'] == "rebuildsecret") {
        rebuildsecret();
        header("location:./admin.php?sitepassword="******"analyzelog") {
            analyzelog();
            analyzesublog();
            header("location:./admin.php?sitepassword="******"location:./admin.php?sitepassword=" . $_GET['sitepassword']);
} else {
    fallback();
}