<?php
if (isset($_SERVER["PHP_AUTH_USER"])) if ($_SERVER["PHP_AUTH_USER"]=="demo") { header("Location: disabled.php"); exit(); }
require("../includes/common.php");
$admin_checkPassword = TRUE;
require("../includes/admin.php");
$id = $_GET["id"];
$sql = "DELETE FROM `".$config_databaseTablePrefix."jobs` WHERE id='".database_safe($id)."'";
database_queryModify($sql,$insertId);
header("Location: automation_tool.php");
exit();
?>
<?php
function database_querySelect($sql, &$rows)
{
global $config_databaseServer;
global $config_databaseName;
global $config_databaseUsername;
global $config_databasePassword;
global $config_databaseDebugMode;
$link = @mysqli_connect($config_databaseServer, $config_databaseUsername, $config_databasePassword);
@mysqli_select_db($link, $config_databaseName);
$result = mysqli_query($link, $sql);
if (!$result && $config_databaseDebugMode)
{
print "[".$sql."][".mysqli_error()."]";
}
$rows = array();
while($row = mysqli_fetch_array($result, MYSQLI_ASSOC))
{
$rows[] = $row;
}
return mysqli_num_rows($result);
}
function database_queryModify($sql, &$insertId)
{
global $config_databaseServer;
global $config_databaseName;
global $config_databaseUsername;
global $config_databasePassword;
global $config_databaseDebugMode;
$link = @mysqli_connect($config_databaseServer, $config_databaseUsername, $config_databasePassword);
@mysqli_select_db($link, $config_databaseName);
$result = mysqli_query($link, $sql);
if (!$result && $config_databaseDebugMode)
{
print "[".$sql."][".mysqli_error()."]";
}
$insertId = mysqli_insert_id($link);
return mysqli_affected_rows();
}
function database_safe($text)
{
return mysqli_real_escape_string($link, $text);
}
?>