<? /Çäåñü ñîäåðæóòñÿ ñâåäåíèÿ î ÷òåíèè èòîãîâ ãîëîñîâàíèÿ
LaCrack Studio, 2003 year.
/
function votereader($voteid, $sponsor, $sponurl)
{
$doc="$file_array$voteid";
$doc=file("./data/vote$voteid.dat");
$amount="$number$voteid";
$amount=count($doc);
$n_1=file("./data/vote1.dat");
$n_2=file("./data/vote2.dat");
$n_3=file("./data/vote3.dat");
$n_4=file("./data/vote4.dat");
$numer1=count($n_1);
$numer2=count($n_2);
$numer3=count($n_3);
$numer4=count($n_4);
$avra="$avr$voteid";
@$avra=$amount/($numer1+$numer2+$numer3+$numer4)*100; #öåëîå ñðåäíåå àðèôìèòè÷åñêîå @ îòêëþ÷àåò ñîîáùåíèå îá îøèáêå (êðóòîé øàã!)
$avra=round($avra, 1);
echo("<a href=\"sponsors.php?name=$sponurl\">$sponsor</a> ($avra%) $amount ÷åë.");
echo("<table border=0><tr><td height=5><img src=./pictures/leftbar.gif><img src=./pictures/midbar.gif width=$avra height=7><img src=./pictures/rightbar.gif></td><tr></table>");
}
votereader(1, "Bxoä", "bxod");
votereader(2, "RusIp", "rusip");
votereader(3, "Majesty", "majesty");
votereader(4, "Neosap", "neosap");
echo ("</h1>
<!--ñêðèïò ÷òåíèÿ ðåçóëüòàòîâ ãîëîñîâàíèÿ êîíåö-->
<h1 class=\"txt2d\"><form action=\"vote.php\" method=\"post\">
Êàêîãî ñïîíñîðà âû ñ÷èòàåòå ëó÷øèì?
<input type=\"radio\" name=\"opros\" value=\"an1\">Âõîä<br>
<input type=\"radio\" name=\"opros\" value=\"an2\">RusIp<br>
<input type=\"radio\" name=\"opros\" value=\"an3\">Majesty<br>
<input type=\"radio\" name=\"opros\" value=\"an4\">Neosap<br>");
if($opros=="an1"){
$file_array1=file("./data/vote1.dat");
$file1=fopen("./data/vote1.dat", "a+");
flock($file1, LOCK_EX);
$number1=count($file_array1);
$num1=$number1+1;
fputs($file1, "$num1\n");
fflush($file1);
flock($file1, LOCK_UN);
fclose($file1);
}
elseif($opros=="an2"){
$file_array2=file("./data/vote2.dat");
$file2=fopen("./data/vote2.dat", "a+");
flock($file2, LOCK_EX);
$number2=count($file_array2);
$num2=$number2+1;
fputs($file2, "$num2\n");
fflush($file2);
flock($file2, LOCK_UN);
fclose($file2);
}
elseif($opros=="an3"){
$file_array3=file("./data/vote3.dat");
$file3=fopen("./data/vote3.dat", "a+");
flock($file3, LOCK_EX);
$number3=count($file_array3);
$num3=$number3+1;
fputs($file3, "$num3\n");
fflush($file3);
flock($file3, LOCK_UN);
fclose($file3);
}
elseif($opros=="an4"){
$file_array4=file("./data/vote4.dat");
$file4=fopen("./data/vote4.dat", "a+");
flock($file4, LOCK_EX);
$number4=count($file_array4);
$num4=$number4+1;
fputs($file4, "$num4\n");
fflush($file4);
flock($file4, LOCK_UN);
fclose($file4);
}
else{}
?>
this is my program it give out
Notice: Undefined variable: file_array in D:\server\www\news\common.php on line 7
Notice: Undefined variable: number in D:\server\www\news\common.php on line 9
Notice: Undefined variable: avr in D:\server\www\news\common.php on line 20
Bxoä (47.5%) 19 ÷åë.
Notice: Undefined variable: file_array in D:\server\www\news\common.php on line 7
Notice: Undefined variable: number in D:\server\www\news\common.php on line 9
Notice: Undefined variable: avr in D:\server\www\news\common.php on line 20
RusIp (17.5%) 7 ÷åë.
Notice: Undefined variable: file_array in D:\server\www\news\common.php on line 7
Notice: Undefined variable: number in D:\server\www\news\common.php on line 9
Notice: Undefined variable: avr in D:\server\www\news\common.php on line 20
Majesty (15%) 6 ÷åë.
Notice: Undefined variable: file_array in D:\server\www\news\common.php on line 7
Notice: Undefined variable: number in D:\server\www\news\common.php on line 9
Notice: Undefined variable: avr in D:\server\www\news\common.php on line 20
Neosap (20%) 8 ÷åë.
Êàêîãî ñïîíñîðà âû ñ÷èòàåòå ëó÷øèì? Âõîä
RusIp
Majesty
Neosap
Notice: Undefined variable: opros in D:\server\www\news\common.php on line 43
Notice: Undefined variable: opros in D:\server\www\news\common.php on line 55
Notice: Undefined variable: opros in D:\server\www\news\common.php on line 66
Notice: Undefined variable: opros in D:\server\www\news\common.php on line 77
what is the reason for this errors of unspecified varible what can I do&?????