<?php  session_start();include("../conn/conn.php");
if($_GET[vote_content]==true){
	$query2=mysql_query("select * from tb_vote_odd where tb_vote_content='$_GET[vote_content]'");
	$myrow=mysql_fetch_array($query2);
	if($myrow[tb_vote_photo]==true){
		unlink($myrow[tb_vote_photo]);
	}    
	$query1="delete from tb_vote_odd_ip where tb_vote_content='$_GET[vote_content]'";
	$query="delete from tb_vote_odd where tb_vote_content='$_GET[vote_content]'";
	$result=mysql_query($query);
	echo "<script>alert('删除成功!');window.location.href='index.php?admin_title=管理投票内容';</script>";
}

if($_GET[vote_contents]==true){
	$query4=mysql_query("select * from tb_vote_more where tb_vote_content='$_GET[vote_contents]'");
	$myrow4=mysql_fetch_array($query4);
	if($myrow4[tb_vote_photo]==true){
		unlink($myrow4[tb_vote_photo]);
	}    
	$querys="delete from tb_vote_more where tb_vote_content='$_GET[vote_contents]'";
	$results=mysql_query($querys);
	echo "<script>alert('删除成功!');window.location.href='index.php?admin_title=管理投票内容';</script>";
}
?>
