<?php
// $Id: votedata.php,v 1.4 2005/10/28 11:56:02 ohwada Exp $

// 2005-09-04 K.OHWADA
// BUG 2932: dont work correctly when register_long_arrays = off

//=========================================================
// admin vote
// use class weblinksCategory, weblinksLink
// divid this file from index.php
// 2004/01/14 K.OHWADA
//=========================================================

function delVote()
{
	global $eh;
	global $tbl_link, $tbl_votedata;

// BUG 2932: dont work correctly when register_long_arrays = off
	$rid = get_get_int('rid');
	$lid = get_get_int('lid');

	$tbl_votedata->delete($rid) or $eh->show("0013");
	list($finalrating, $votesDB) = $tbl_votedata->getRating($lid);
	$tbl_link->updateRating($lid, $finalrating, $votesDB);

	redirect_header("index.php",1,_WLS_VOTEDELETED);
	exit();
}

?>
