<?php
include_once 'inc/sys.php';
if(!isset($_GET['id']) || !is_numeric($_GET['id'])) {
header('Location: /');
exit;
}
$reqnr=$sql->nr("SELECT * FROM `sites` WHERE `id`='$_GET[id]' ");
if($reqnr==0) {
header('Location: /');
exit;
}
$site=$sql->fa("SELECT * FROM `sites` WHERE `id`='$_GET[id]' LIMIT 1");
header('Location: '.$site['url']);
exit;
?>