"; echo "\r\n"; echo "\r\n"; echo "
Manlix SW Vote v0.1
\r\n"; echo "
\r\n"; echo "\r\n"; echo ""; echo "\r\n"; for ($a = $count - 1; $a >= 0; $a--) { list ($number,$date,$name) = explode("::","$file[$a]"); echo "\r\n"; } echo ""; echo "
Список всех голосований
IDДатаВопрос
$number$date$name
всего голосований: $count
\r\n"; } if ($id != "") { if (!ereg("^[0-9]+$",$id)) { $show_error_1 = " Список всех голосований, Manlix SW Vote v0.1 - Разработка: Manlix SW
Manlix SW Vote v0.1
%error_1%
"; $show_error_1 = str_replace("%error_1%","$error_1","$show_error_1"); echo $show_error_1; exit; } $file_ = "$base_dir/$id/base.dat"; if (file_exists($file_)) { $vote_file = file($file_); $vote_count = count($vote_file); echo " Результаты голосования, Manlix SW Vote v0.1 - Разработка: Manlix SW "; echo "\r\n"; echo "\r\n"; echo "
Manlix SW Vote v0.1
\r\n"; echo "
\r\n"; echo "\r\n"; $file__ = file($base); $count__ = count($file__); for ($b = - 1; $b <= $count__; $b++) { list ($vote_id,$vote_date,$vote_name) = explode("::","$file__[$b]"); if ($id == $vote_id) { echo "\r\n"; echo "\r\n"; } } for ($c = 0; $c <= $vote_count - 1; $c++) { list ($answer,$value) = explode("::","$vote_file[$c]"); $all = $all + $value; echo "\r\n"; } echo "\r\n"; echo "\r\n"; echo "
ID:$vote_idДата: $vote_date
$vote_name
$answer$value
вариантголосов
Всего голосов: $all
\r\n\r\n"; } if (!file_exists($file_)) { $show_error_2 = " Список всех голосований, Manlix SW Vote v0.1 - Разработка: Manlix SW
Manlix SW Vote v0.1
%error_2%
"; $show_error_2 = str_replace("%error_2%","$error_2","$show_error_2"); $show_error_2 = str_replace ("%id%","$id","$show_error_2"); echo $show_error_2; exit(); } if ($v != "" and $id != "") { $file___ = "$base_dir/$id/base.dat"; $send_file = file($file___); $send_count = count($send_file); $open_base = fopen("$file___","w"); for ( $e = 0; $e < $send_count; $e++) { list ($vote_answer,$vote_value,$vote_number) = explode("::","$send_file[$e]"); if ($v == $vote_number) { fputs($open_base, "$vote_answer::".($vote_value+1)."::$vote_number::\r\n"); } if ($v != $vote_number) { fputs($open_base, "$send_file[$e]"); } } fclose($open_base); } } ?>