View file votes/index.php

File size: 2.46Kb
<?php
#-----------------------------------------------------#
#          ********* WAP-MOTORS *********             #
#             Made by   :  VANTUZ                     #
#               E-mail  :  [email protected]             #
#                 Site  :  http://pizdec.ru           #
#             WAP-Site  :  http://visavi.net          #
#                  ICQ  :  36-44-66                   #
#  Скрипт модифицировал на Siemens-c65 Hellfuck http://hellfuck.h2m.ru ICQ:364-500-311  #
#-----------------------------------------------------#	
require_once"../template/start.php";
require_once"../template/regglobals.php";
require_once"../template/config.php";
require_once"../template/functions.php";
require_once"../template/antidos.php";
require_once"../template/cookies.php";
require_once"../template/gzip.php";
require_once"../template/header.php";
require_once"../template/referer.php";
include_once"../themes/$config_themes/index.php";


echo'<img src="../images/img/partners.gif" alt=""> <b>Голосование</b><br><br>';

if ($_SESSION['log']!="" && md5($_SESSION['par'])!="" && md5($_SESSION['par'])==$provpar && $_SESSION['log']==$provlog ) {
if($udata[10]>0){
echo'<img src="../images/img/mail.gif" alt=""> <b><a href="../pages/privat.php?'.SID.'"><font color="red">Вам письмо: '.$privat.'</font></a></b><br>';}} 


echo'<br><form action="vote.php?action=vote&amp;'.SID.'" method="post">';

$vfiles = file("../local/datavotes/votes.dat");
$vdata=explode("|",$vfiles[0]);
if($vfiles){
echo '<b>'.$vdata[0].'</b><br>';

if($config_themes!="wml"){
for ($i=1; $i<count($vdata);$i++){
if($vdata[$i]!==""){
echo '<br><input name="golos" type="radio" value="'.$i.'" /> '.$vdata[$i];
}}

echo'<br><br><input type="submit" value="Голосовать" /></form><hr>';

}else{

for ($i=1; $i<count($vdata);$i++){
if($vdata[$i]!==""){

echo '<br><a href="vote.php?golos='.$i.'&amp;'.SID.'">'.$vdata[$i].'</a><br>';
}}}

if($dostup=="101" || $dostup=="102"){echo'<br>&#187; <a href="vote.php?action=logs&amp;'.SID.'">Логи</a> ['.counter_string(BASEDIR.'local/datavotes/golos.dat') .']';} 
echo'<br>&#187; <a href="vote.php?'.SID.'">Посмотреть результаты</a><br>'; 

}else{echo'<b>Голосование еще не создано</b><br>';}

echo'<br>&#187; <a href="allvotes.php?'.SID.'">Архив голосований</a><br>';
echo'&#171; <a href="../index.php?'.SID.'">На главную</a>'; 
include_once"../themes/$config_themes/foot.php";
?>