Example #1
0
function Install_Check()
{
    global $config;
    $passed = true;
    if (defined('multi_site_unique')) {
        echo '<p style="color:red">Cannot install this addon. This is not the root installation of gpEasy.</p>';
        $passed = false;
    }
    if (!function_exists('symlink')) {
        echo '<p style="color:red">Cannot install this addon. Your installation of PHP has the symlink() function disabled.</p>';
        $passed = false;
    }
    if (!isset($_SERVER['SCRIPT_FILENAME']) && GETENV('SCRIPT_FILENAME') === FALSE) {
        echo '<p style="color:red">Cannot install this addon. $_SERVER[\'SCRIPT_FILENAME\'] and GETENV(\'SCRIPT_FILENAME\') are unavailable.</p>';
        $passed = false;
    }
    if (isset($config['useftp'])) {
        echo '<p style="color:red">Cannot install this addon. Your installation of PHP has safe_mode enabled.</p>';
        $passed = false;
    }
    return $passed;
}
Example #2
0
$password = md5($_POST['kata_sandi']);
$login = mysql_query("SELECT * FROM akun WHERE username='******' AND password='******'");
$hasil = mysql_num_rows($login);
$r = mysql_fetch_array($login);
$ss = mysql_query("select*from detail_tampilan where id_aku='{$r['id']}'");
$ee = mysql_fetch_array($ss);
if ($hasil > 0) {
    $d = date("d");
    $m = date("m");
    $y = date("Y");
    $h = date("H");
    $i = date("i");
    $s = date("s");
    $ada = mysql_query("select*from terakhirmasuk where id_akun='{$r['id']}'");
    $masuk = mysql_fetch_array($ada);
    $ip = GETENV('REMOTE_ADDR');
    if (empty($masuk['id_akun'])) {
        mysql_query("insert into terakhirmasuk values('{$r['id']}','{$h}','{$i}','{$s}','{$d}','{$m}','{$y}','{$ip}')");
    } else {
        if (!empty($masuk['id_akun'])) {
            mysql_query("update terakhirmasuk set ip='{$ip}', jam='{$h}',menit='{$i}',detik='{$s}',tgl='{$d}',bln='{$m}',tahun='{$y}' where id_akun='{$r['id']}'");
        }
    }
    session_start();
    session_register("id");
    session_register("username");
    session_register("password");
    session_register("user_akses");
    session_register("tranz");
    session_register("navbar");
    session_register("background");