*/ ?>
read()){
if(strstr($dir_entry,"poll")){
$polls[$i] = $dir_entry;
$id = str_replace($delete, "", $dir_entry);
$ids[$i] = $id;
$i++;
}
}
if($i == 0){
echo "
".$nopoll."";
}
else{
if($random_display){
srand((double)microtime()*1000000);
$pollid = rand(0,count($polls)-1);
}
else{
if(isset($_GET['showpoll'])){
$pollid = $_GET['showpoll'];
if(empty($polls[$pollid])) $pollid = 0;
}
else{
if(!isset($_POST['pollid'])) $pollid = 0;
else $pollid = intval($_POST['pollid']);
}
}
$pollfile = $path."/polldata/".$polls[$pollid];
$ipfile = $path."/polldata/ips_".$ids[$pollid].".php";
include($pollfile);
if(isset($_POST['vote'])){
include("poll/submit_vote.php"); // ZAMJENJEN POLL!!!!
submitVote($_POST['vote']);
}
else{ // check that they have voted or not
$ip = fopen($ipfile, "r");
$contents = fread($ip, filesize($ipfile));
$uip = $_SERVER['REMOTE_ADDR'];
// start html code returning results.....................................
if(stristr($contents,$uip) !== false){
// $ask = stripslashes($ask);
$ank_nas = "ank_nas_".$ids[$pollid];
echo "
".$msg[$ank_nas]."";
if(isset($_GET['voted'])) echo $msg['ank_hvala'];
else echo $msg['ank_vec_glasovali'];
echo "
$total ";
if($total == "1") echo $msg['ank_glas'];
else echo $msg['ank_glasova'];
echo "\n\n";
echo "";
for($i=0;$i
";};
echo "";
}
}
echo "
".$msg[$ank_odg]." | $percentage% ($v[$i])";
if ($v[$i] > 0){echo " |
|
";
echo "
";
if(!$random_display) printNextPoll($pollid);
}
else{
// $ask = stripslashes($ask);
$ank_nas = "ank_nas_".$ids[$pollid];
echo "
".$msg[$ank_nas]."\n\n";
echo "
\n\n";
if(!$random_display) printNextPoll($pollid);
}
}
}
//Prepravi u slucaju anketa!!!
// echo "
".$msg['ank_arhiva']."";
function printNextPoll($pollid){
global $path;
$nextpoll = $pollid + 1;
$prevpoll = $pollid - 1;
$dir = dir($path."/polldata"); //Create a directory object to the current directory
$polls = array();
$i = 0;
while($dir_entry = $dir->read()){
if(strstr($dir_entry,"poll")){
$polls[$i] = $dir_entry;
$i++;
}
}
if(!empty($polls[$prevpoll])) echo "
<< Prev ";
if(!empty($polls[$nextpoll])) echo "
Next >>";
}
/*Tu je bio google search i adsence*/
?>
Pošalji link
*/ ?>
0) {
// yes
// print them one after another
while(list($KG_timestamp, $KG_imePrezime, $KG_email, $KG_drzava, $KG_tekst) = mysql_fetch_row($result)) {
list($KG_datum, $KG_vrijeme) = explode(" ", $KG_timestamp);
list($year, $month, $day) = explode("-", $KG_datum);?>
()
1){
$prev = ($page - 1);
?>«« | $i ";
} else {
?> | »» |
" width="230" height="173" class="imgcenter" alt="No " title="No " />
Crikvenica |
22/01/2025 00:03 |
|