<?php
define ('BASE_DIR', substr(dirname(__FILE__),0,-5));
define ('SMARTY_DIR', BASE_DIR . '/smarty/');

include_once(BASE_DIR . '/config/db.config.php');
include_once(BASE_DIR . '/lib/db.conntest.php');
include_once(BASE_DIR . '/class/Database.Class.php');
include_once(BASE_DIR . '/functions/Func.Session.php');
include_once(BASE_DIR . '/functions/Func.Globals.php');
include_once(BASE_DIR . '/class/Class.User.php');
include_once(BASE_DIR . '/class/Class.Koobi.php');
include_once(BASE_DIR . '/admin/functions/func.globals.php');

ob_start();
session_start();
session_name('SID');
error_reporting(0); 
define ("SESSION", session_id());


$GLOBALS['config'] = $config;
$GLOBALS['db'] = new DB($config['dbhost'], $config['dbuser'], $config['dbpass'], $config['dbname']);

$r = $GLOBALS['db']->Query("SELECT Artikelnummer FROM " .  $config['dbprefix'] . "_shop_produkte");
while($row = $r->fetchrow()) $artnumbers[] = $row->Artikelnummer;


$request = trim(strtolower($_REQUEST['Seitenname']));

$users = array('asdf', 'Peter', 'Peter2', 'George');

$valid = 'true';

foreach($artnumbers as $user) {

    if( strtolower($user) == $request )

        $valid = 'false';

}

echo $valid;

?>


