<?php
error_reporting(E_ALL);
require_once("../lycos.php");
$mysql_user = "jabbo";
$mysql_pass = "";
$mysql_host = "localhost";
$mysql_dbn = "";
if(!function_exists('file_put_contents'))
{
    function file_put_contents($filename, $data, $file_append = false)
    {
        $fp = fopen($filename, (!$file_append ? 'w+' : 'a+'));
        if(!$fp)
        {
            trigger_error('file_put_contents cannot write in file.', E_USER_ERROR);
            return;
        }
        fputs($fp, $data);
        fclose($fp);
    }
}
if (!function_exists('file_get_contents')) {
    function file_get_contents($filename, $incpath = false, $resource_context = null)
    {
        if (false === $fh = fopen($filename, 'rb', $incpath)) {
            user_error('file_get_contents() failed to open stream: No such file or directory',
                E_USER_WARNING);
            return false;
        }

        clearstatcache();
        if ($fsize = @filesize($filename)) {
            $data = fread($fh, $fsize);
        } else {
            $data = '';
            while (!feof($fh)) {
                $data .= fread($fh, 8192);
            }
        }

        fclose($fh);
        return $data;
    }
}
if (!@mysql_select_db($mysql_dbn, @mysql_connect($mysql_host, $mysql_user, $mysql_pass)))   
{   
     echo "Er is een probleem, even geduld...<script>window.location.reload();</script>";
     exit();   
}
if (!function_exists('halen'))
{
	function halen($sql)
	{
		$result = mysql_query($sql);
		$record = mysql_fetch_row($result);
		return $record[0];
	}
}
if (!function_exists('halen_array'))
{
	function halen_array($sql)
	{
		$result = mysql_query($sql);
		$record = mysql_fetch_array($result);
		return $record;
	}
}
if (!function_exists('status'))
{
	function status($naam)
	{
		$ban = halen("SELECT ban FROM members WHERE naam='".$naam."';");
		if ($ban == "yes")
		{
			return "Geblokkeerd";
		}
		elseif ($ban == "no")
		{
			$functie = halen("SELECT functie FROM members WHERE naam='".$naam."';");
			return $functie;
		}
	}
}
if (!function_exists('status_simple'))
{
	function status_simple($hoeveel)
	{
		return "Jabbo";
	}
}
function alert($alert)
{
	echo "<script>alert('".$alert."');</script>";
}
$hotel_naam = "Jabbo";
$hotel_status = halen("SELECT optie FROM opties WHERE id='1';");
$home_status = halen("SELECT optie FROM opties WHERE id='2';");
if ($home_status == "offline")
{
	$hotel_status = "offline";
}
?>