include 'semper.php';
$step=2;
$evento = $_GET['eventi_id'];
if (isset($_SESSION['auth']))
{
$linkcreaprop=' Fai la tua proposta ';
$tpl= ereg_replace("",$linkcreaprop,$tpl);
$foot=file_get_contents("$template/footpaglog.html");
if (isset($_GET['vota']))
{
$vota = vota($_GET['vota']);
if ($vota == 'si')
{
$evento = $_GET['vota'];
header("Location: proposte.php?view=single&alert=66&event_id=".$evento);
}
else if ($vota == 'no')
{
header("Location: proposte.php");
}
}
}
else
{
$foot=file_get_contents("$template/footpagnolog.html");
if (isset($_GET['vota']))
{
header("Location: proposte.php");
}
}
$tpl2=contenuto_proposte($template,$foot,$step,$_GET['tipo']);
$elencoarchivio=archivio_proposte($template,$step);
$tpl= ereg_replace("",'Proposte',$tpl);
$tpl= ereg_replace("",$elencoarchivio,$tpl);
switch ($_GET['view'])
{
case 'archivi': //visualizza il contenuto della categoria scelta
$tpl2=contenuto_proposte($template,$foot,$step,$_GET['tipo']);
break;
case 'single': //visualizza proposta singola
//$tpl2=contenuto_proposta($template,$foot,$step,$_GET['eventi_id']);
$tpl2=contenuto_proposta($template,$foot,$step,$evento);
break;
}
$tpl=ereg_replace("",$tpl2,$tpl);
echo $tpl;
?>