Hi.. I'm experiencing this problem using jaypee's vote for points when deleting vote points entry..
I have currently this code..
<?phpinclude ('function.php');/*FluxCP Vote For PointsDeveloped By: JayPee MateoEmail:
[email protected]*/
//This will list the sites
$this->loginRequired();
$vp = Flux::config('FluxTables.Sites');
$vp_logs = Flux::config('FluxTables.Logs');
$site_id = $params->get('sid');if(preg_match("/^[0-9]{1,}$/",$site_id)){
$delete = $params->get('Delete');
if(!empty($delete)) {
//Delete site
$sql = "DELETE FROM {$server->loginDatabase}.{$vp} WHERE site_id=?";
$sth = $server->connection->getStatement($sql);
$sth->execute(array($site_id)); //We need to delete database that connected to the site
$sql = "DELETE FROM {$server->loginDatabase}.{$vp_logs} WHERE f_site_id=?";
$sth = $server->connection->getStatement($sql);
$sth->execute(array($site_id));
$this->redirect("index.php?module=voteforpoints&action=list");
}
$sql = "SELECT site_name,address,points,blocking_time,banner,banner_url FROM {$server->loginDatabase}.$vp WHERE site_id=?";
$sth = $server->connection->getStatement($sql); $sth->execute(array($params->get('sid')));
$vp = $sth->fetch(); if(empty($vp)) $error[count($error)] = Flux::message("Invalid Site Id.");
else {
$b_time = strBlockTime($vp->blocking_time);
$blocking_time = explode(":",$b_time);
if($blocking_time[0] == "00")
$hours = 24;
else
$hours = $blocking_time[0];
$minutes = $blocking_time[1];
}
}
else
$error[count($error)] = Flux::message("INVALID_VOTING_SITE");
?>
how can i fix it?