Файл: sources/redirect.php
Строк: 13
<?php
if (!defined('VAPHP'))
{
die("Этот файл недоступен.");
}
class redirect extends base
{
function redirect()
{
global $FORM, $TMPL, $LNG, $DB, $CONF;
if (isset($FORM['id']) and !empty($FORM['id']))
{
$id = intval($FORM['id']);
list($idsite, $URL) = $DB->fetch("SELECT id, URL FROM {$CONF['sql_prefix']}_sites WHERE id='{$id}' and visib = '1'", __FILE__, __LINE__);
if (empty($idsite))
{
$TMPL['header'] = $LNG['g_error'];
$base = new base;
$base->error($LNG['g_page_empty']);
}
$TMPL['URL'] = $URL;
$TMPL['redirect'] = "<META HTTP-EQUIV=Refresh CONTENT="0; URL={$URL}">";
$TMPL['content'] = $this->do_skin('redirect');
}
else
{
$TMPL['header'] = $LNG['g_error'];
$base = new base;
$base->error($LNG['g_page_empty']);
}
}
}
?>