$nick"; else $signature = "$nick"; $contents[3] = "$comment
$signature " . date("d.m.y") . "

" . $contents[3]; $rewrite = TRUE; } if (isset($rewrite)) { $fp = fopen( $to,"w"); fwrite($fp, implode( $contents, $BR ) ); fclose($fp); } include("autopilot.h"); // Строим html-файл с результатами $question = $contents[0]; $answers = explode( $TAB, $contents[1] ); $content = implode( file("$htmlates_dir/header.reply.htm"), "" ) . "
"; if ( !($levels[0]) ) $stat = "Нет данных

"; else for ($i=0; $i < count ( $answers ); $i++ ) { $procent = ceil($levels[$i + 1] / $levels[0] * 100); $stat .= $answers[$i] . ":
$procent% " . ( ceil($levels[$i + 1] / $levels[0] * 1000) / 10 ) . "%
" ; } $content .= $contents[6] . $question . "

" . $stat . "Проголосовавших читателей: $levels[0]

"; if ($contents[3] != "") $content .= "

" . $contents[3] . "

" . "Назад к статье \"$contents[4]\"" . "

"; $content .= implode( file("$htmlates_dir/footer.reply.htm"), "\n" ); $content = ereg_replace("

", $contents[4], $content); $content = ereg_replace("", "1994-". date("Y"), $content); $nnn = rand(); $content = ereg_replace("", "$nnn", $content); echo $content; } else header("Location: http://www.autopilot.ru"); ?>