<?php
require_once('./admin.php');
$Action = $_GET['action'];
$ID = $_GET['id'];
if($Action == 'publish')
{
$DC->Result("UPDATE ".PR_DATABASE_PREFIX."scratch SET scratch_status = 'okay' WHERE scratch_id = '$ID'");
header("Location: scratch-new.php?highlight=scratch_published");
exit();
}
elseif($Action == 'delete')
{
die(" Are you sure you want to delete this question <a href='./scratch-new-update.php?action=deletenow&id=$ID' style='color:blue'>Yes delete</a> <a href='./scratch-new.php' style='color:blue'>Cancel</a>");
}
elseif($Action == 'deletenow')
{
$DC->Result("DELETE FROM ".PR_DATABASE_PREFIX."scratch WHERE scratch_id = '$ID'");
die(header("Location: ./scratch-new.php?highlight=scratch_deleted"));
}
?>