Проверь чтобы у тебя в файле engine.php было так:
/////// Start Voting /////// if(isset($_POST[id_vote]) && isset($_POST[answer])) { $id_vote = clean_var(stripslashes($_POST[id_vote])); $answer = clean_var(stripslashes($_POST[answer])); if($mmw[votes_check]==acc && isset($login)) {$vote_by = $login; $vote_check = 1;} if($mmw[votes_check]==ip) {$vote_by = $_SERVER['REMOTE_ADDR']; $vote_check = 1;} if($vote_check == 1) { $vote_who_res = mssql_query("SELECT answer FROM MMW_voterow WHERE ID_vote='$id_vote' and who='$vote_by'"); $check_your_vote = mssql_num_rows($vote_who_res); if($check_your_vote < 1) { mssql_query("INSERT INTO MMW_voterow (id_vote,who,answer) VALUES ('$id_vote','$vote_by','$answer')"); } } } $vote_res = mssql_query("SELECT TOP 1 ID,question,answer1,answer2,answer3,answer4,answer5,answer6 FROM MMW_votemain ORDER BY NEWID()"); if(mssql_num_rows($vote_res) != 0) { $vote_row = mssql_fetch_row($vote_res); $vote_check = 0; if($mmw[votes_check]==acc && isset($login)) {$vote_who_now = $login; $vote_check = 1;} if($mmw[votes_check]==ip) {$vote_who_now = $_SERVER['REMOTE_ADDR']; $vote_check = 1;} if($vote_check == 1) { $vote_who_res = mssql_query("SELECT who,answer FROM MMW_voterow WHERE ID_vote='$vote_row[0]' and who='$vote_who_now'"); $check_your_vote = mssql_num_rows($vote_who_res); } $voting = "<form name='voting' method='post' action=''><b>$vote_row[1]</b><br>"; if($check_your_vote < 1 && $vote_check == 1) { for($c=1; $c < 7; ++$c) { $answer_num = $c + 1; if($vote_row[$answer_num]!=' ' && isset($vote_row[$answer_num])) {$voting = $voting . "<div class='answer'><input id='$c' type='radio' name='answer' value='$c'> <label for='$c'>$vote_row[$answer_num]</label></div>";} } $voting = $voting . "<div align='center'><input name='id_vote' type='hidden' value='$vote_row[0]'><input type='submit' value='".mmw_lang_to_vote."'></div>"; } else { $all_vote_res = mssql_query("SELECT ID_vote FROM MMW_voterow WHERE ID_vote='$vote_row[0]'"); $all_vote_num = mssql_num_rows($all_vote_res); for($c=1; $c < 7; ++$c) { $answer_num = $c + 1; if($vote_row[$answer_num]!=' ' && isset($vote_row[$answer_num])) { $votes_row_res = mssql_query("SELECT who,answer FROM MMW_voterow WHERE ID_vote='$vote_row[0]' and answer='$c'"); $votes_row_num = mssql_num_rows($votes_row_res); $img_file = default_img("bar.jpg"); $size = @getimagesize($img_file); $img_width = ($votes_row_num > 0) ? ceil(100 * $votes_row_num / $all_vote_num) : 1; $voting = $voting . "<div class='answer'>$c. $vote_row[$answer_num] ($votes_row_num)</div>"; $voting = $voting . "<div class='answer'><img src='$img_file' height='$size[1]' width='$img_width%'></div>"; } } $voting = $voting . "<div align='center'>".mmw_lang_all_answers.": <b>$all_vote_num</b></div>"; } $voting = $voting . "</form>"; } else { $voting = mmw_lang_no_vote; } function voting() { global $voting; echo $voting; } /////// END Voting ///////