454行目〜
elseif($day_night == 'night')
{
//何回目の投票なのか取得(再投票)
//投票済みの人のテンポラリテーブルを作成
mysql_query("create temporary table tmp_sd select uname from vote
and (situation = 'VOTE_KILL' or situation = 'MAGE_DO' or situation = 'GUARD_DO') ");
//投票していない人を取得
$res_novote = mysql_query("select user_entry.uname,user_entry.handle_name
and (user_entry.role like 'wolf%' or user_entry.role like 'mage%' or user_entry.role like 'guard%')
}
を
elseif($day_night == 'night')
{
//何回目の投票なのか取得(再投票)
//投票済みの人のテンポラリテーブルを作成
mysql_query("create temporary table tmp_sd select uname from vote where room_no = $room_no and date = $date and (situation = 'MAGE_DO' or situation = 'GUARD_DO') ");
// 狼の投票数獲得
$res_vote = mysql_query("select count(uname) from vote where room_no = $room_no and date = $date
and ( situation = 'WOLF_EAT')");
$vote_count = mysql_result($res_vote,0,0);
//投票していない人を取得
if($vote_count == 1)
{
// 狼を除外して獲得
$res_novote = mysql_query("select user_entry.uname,user_entry.handle_name from user_entry left join tmp_sd on user_entry.uname = tmp_sd.uname where user_entry.room_no = $room_no and user_entry.live = 'live'
and (user_entry.role like 'mage%' or user_entry.role like 'guard%') and user_entry.user_no > 0 and tmp_sd.uname is NULL");
}
else
{
//狼を含めて検索
$res_novote = mysql_query("select user_entry.uname,user_entry.handle_name from user_entry left join tmp_sd on user_entry.uname = tmp_sd.uname where user_entry.room_no = $room_no and user_entry.live = 'live' and (user_entry.role like 'wolf%' or user_entry.role like 'mage%' or user_entry.role like 'guard%') and user_entry.user_no > 0 and tmp_sd.uname is NULL");
}
}
に変更でいいと思う