<?php
require'fun.php';
$chestionar[9]=$conn->query('SELECT`id`FROM`forum_topicuri`WHERE`tid`="'.$pid.'"')->fetch_row()[0];
if($chestionar[9]>0)
require'f_forumm.php';
$titlu='Voteaza chestionar';
$back[1]='<a href="/chestionare">'.img('vot.gif',2).'Chestionare</a>';
require'f_sus.php';
require'f_mut.php';
if($conn->query('SELECT COUNT(*)FROM`chestionar_raspunsuri`WHERE`de`="'.$de.'"&&`pid`="'.$pid.'"')->fetch_row()[0]==0)
{
if($conn->query('INSERT INTO`chestionar_raspunsuri`SET`de`="'.$de.'",`pid`="'.$pid.'",`valoare`="'.$go.'"'))
{
$pollid=$conn->query('SELECT`intrebare`,`de`FROM`chestionar_intrebari`WHERE`id`="'.$pid.'"')->fetch_row();
$pollid[0]=mb_substr($pollid[0],0,15);
$conn->query('INSERT INTO`evenimente`SET`text`="a votat în chestionarul [url=/chestionar/id/'.$pid.'-'.seo($pollid[0]).']'.$pollid[0].'[/url], chestionar adăugat de",`de`="'.$de.'",`la`="'.$pollid[1].'",`data`="'.$_SERVER['REQUEST_TIME'].'",`tip`="1"');
if($de!=$pollid[1])
{
require'f_notificare.php';
notificare('am votat în chestionarul tau [url=/chestionar/id/'.$pid.'-'.seo($pollid[0]).']'.$pollid[0].'[/url]!',$pollid[1],$de);
}
echo$div[4].'<img src="'.$domenii_statice[1].'actiune_check.png" alt="" width="16" height="16" />Succes!'.$div[5].$div[6].'Multumesc pentru vot!';
}
else
echo$div[4].'<img src="'.$domenii_statice[2].'actiune_delete.png" alt="" width="16" height="16" />Eroare!'.$div[5].$div[7];
}
else
echo$div[4].'<img src="'.$domenii_statice[2].'actiune_delete.png" alt="" width="16" height="16" />Eroare!'.$div[5].$div[7].'Ai mai votat odata!<br />Ce vrei sa faci?';
echo$div[0];
require'f_jos.php';