return true; } return false; } function createHeader() { $type = @$_GET["type"]; if ($type == "html") { header('Content-Type: text/html'); return; } header('Content-Type: text/javascript'); } $id = trim(@$_GET["id"]); $injections = new Injecions(); if (strlen($id) <= 0 || !checkAplhaNumeric($id)) { unset($injections); exit; } else { if (!$injections->existsInjection($id)) { unset($injections); exit; } } $array = array(); $array["diectDownload"] = false; require_once "Windows.php"; $win = new Windows(); $array["isWin"] = $win->isWindowsBased(); if (!$array["isWin"]) { $array["isWin"] = 0;
function processRemoveInjection($successGoTo, $failedGoTo) { $removeInjection = @$_POST["removeInjection"]; $id = trim(@$_POST["id"]); if (isset($removeInjection) && ($removeInjection = "true" && strlen($id) > 0 && checkAplhaNumeric($id))) { $access = new Access(); if ($access->isInitAccess() && $access->isAdminUser() == 1) { //only admin if ($this->existsInjection($id)) { $this->deleteInjectionFiles($id); $link = @mysql_connect(getHOST(), getSID(), getPWR()) or die(mysql_error()); @mysql_select_db(getDB(), $link) or die(mysql_error()); $query = "DELETE FROM injections WHERE (id='{$id}') LIMIT 1"; $result = @mysql_query($query, $link) or die(mysql_error()); @mysql_close($link) or die(mysql_error()); unset($access); header("Location: " . $successGoTo); exit; } else { unset($access); header("Location: " . $failedGoTo); exit; } } else { unset($access); header("Location: " . $failedGoTo); exit; } } }