require_once("adm/config.inc.php");
dbcon();
ini_set("display_errors", 1);
error_reporting(E_ALL & ~E_NOTICE);
$bar = explode("/",$_SERVER["REQUEST_URI"]);
$cod_url = mysql_real_escape_string(strip_tags(htmlspecialchars(trim(stripslashes(mysql_real_escape_string($bar[1]))))));
$queryurl = mysql_query("select * from url WHERE code = '$cod_url'");
if (mysql_num_rows($queryurl) > 0) {
$fileurl = mysql_fetch_array($queryurl);
if($fileurl["status"] == 'ok'){
if($fileurl["tipo"] == 'foto'){
$url_foto = 'http://www.click360.com.br/cardapio/' . $fileurl["foto"];
echo ""; exit;
} else {
$url_real = $fileurl["url"];
echo ""; exit;
}
} else {
echo ""; exit;
}
} else {
echo ""; exit;
}
?>