")){ $stepsdone = str_replace("<$stpdn>","",$stepsdone); $delstepqry = "UPDATE repports SET stepsdone = ? WHERE id = $rep"; if($stmt = mysqli_prepare($link, $delstepqry)){ mysqli_stmt_bind_param($stmt, "s", $stepsdone); if(mysqli_stmt_execute($stmt)){ header("location: ?a=launch&acc=rapp&req=$req&rep=$rep"); exit(); } } }else{ $stepsdone = $stepsdone."<$stpdn>"; $addstepqry = "UPDATE repports SET stepsdone=? WHERE id=$rep"; if($stmt = mysqli_prepare($link, $addstepqry)){ mysqli_stmt_bind_param($stmt, "s", $stepsdone); if(mysqli_stmt_execute($stmt)){ header("location: ?a=launch&acc=rapp&req=$req&rep=$rep"); exit(); } } } } if(isset($repdn)){ $delrepqry = "UPDATE repports SET repstat = 1 WHERE id = ?"; if($stmt = mysqli_prepare($link, $delrepqry)){ mysqli_stmt_bind_param($stmt, "i", $rep); if(mysqli_stmt_execute($stmt)){ header("location: ?a=launch&acc=rapp&req=$req"); exit(); } } } if($rep == "done"){ $finreqqry = "UPDATE request SET approved = 3 WHERE id = ?"; if($stmt = mysqli_prepare($link, $finreqqry)){ mysqli_stmt_bind_param($stmt, "i", $req); if(mysqli_stmt_execute($stmt)){ header("location: ?a=launch"); exit(); } } } require "place/theme.php"; ?>