File size: 3.4Kb
<?php
#-----------------------------------------------------#
# ********* WAP-MOTORS ********* #
# Made by : VANTUZ #
# E-mail : [email protected] #
# Site : http://pizdec.ru #
# WAP-Site : http://visavi.net #
# ICQ : 36-44-66 #
# Вы не имеете право вносить изменения в код скрипта #
#-----------------------------------------------------#
require_once"../template/start.php";
require_once"../template/regglobals.php";
require_once"../template/config.php";
require_once"../template/functions.php";
require_once"../template/maincore.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";
$v1=(int)$v1;
$text = @file("../local/profil/$log.prof");
if ($text!=""){
$udata = explode(":||:",$text[0]);
$provlog=trim($udata[0]);
$provpar=trim($udata[1]);
$privat=trim($udata[10]);}
$file = file("../local/datavotes/result.dat");
$vopros = file("../local/datavotes/votes.dat");
$c = count($file);
for ($i=1;$i<=$c;$i++)
{
$file[$i]=trim($file[$i]);
}
echo'<img src="../images/img/partners.gif" alt=""> '.$LANGUAGE['vv100'].'<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">'.$LANGUAGE['vv101'].' ('.$privat.')</font></a></b><br>';}
if(!empty($v1)){
if(!empty($_SESSION['vottes']) && !empty($v1)){echo $LANGUAGE['vv102'];
echo'<br><br><a href="index.php?'.SID.'">'.$LANGUAGE['vv103'].'</a><br>';
echo'<a href="../index.php?'.SID.'">'.$LANGUAGE['vv104'].'</a>';
include_once"../themes/$config_themes/foot.php";
exit;}
$_SESSION['vottes']="ok";
echo $LANGUAGE['vv105'].'<br>';
$list = fopen("../local/datavotes/result.dat","w");
flock($list,LOCK_EX);
fputs($list,"\n");
fflush($list);
flock($list,LOCK_UN);
fclose($list);
chmod ($list, 0666);
chmod ("../local/datavotes/result.dat", 0666);
$file[$v1]++;
$list = fopen("../local/datavotes/result.dat","a");
flock($list,LOCK_EX);
for($i=1;$i<$c;$i++)
{
fputs($list,"$file[$i]\n");
}
fflush($list);
flock($list,LOCK_UN);
fclose($list);
chmod ($list, 0666);
chmod ("../local/datavotes/result.dat", 0666); }
} else {echo $LANGUAGE['vv106'].'<br>';}
for ($i=1;$i<$c;$i++)
{
$x=$x+$file[$i];
}
$proc=array();
for($i=1;$i<$c;$i++)
{
$proc[$i]=$file[$i]*100/$x;
$proc[$i]=round($proc[$i]);
}
echo ( $LANGUAGE['vv107'].'<br><br>');
for($i=1;$i<$c;$i++)
{
$proc1[$i]=$proc[$i]*3;
$vopros[$i]=trim($vopros[$i]);
if(!empty($vopros[$i])){
echo '<b>'.$vopros[$i].'</b><br>
<table cellpadding="0" height="15" width="'.$proc1[$i].'" bgcolor="#FF0000">
<tr><td> </td></tr></table>
'.$file[$i].' ('.$proc[$i].'%)<br><br>';
}
}
$sum=array_sum($file);
echo '<br><b>'.$LANGUAGE['vv108'].' '.$sum.'</b><br>';
echo'<a href="index.php?'.SID.'">'.$LANGUAGE['vv103'].'</a><br>';
echo'<a href="../index.php?'.SID.'">'.$LANGUAGE['vv104'].'</a>';
include_once"../themes/$config_themes/foot.php";
?>