<?php
include ('includes/func_vars_inc.php');
include ('includes/auth_check.php');
if ($_POST['buildname'] == ""){
@ header("Location: ".$uri_scheme.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/add_build.php?msg=You+must+enter+a+build+name.");
}
if ($_POST['comments'] == ""){
@ header("Location: ".$uri_scheme.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/add_build.php?msg=You+must+enter+some+comments.");
}
if ($_POST['certificate'] == ""){
@ header("Location: ".$uri_scheme.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/add_build.php?msg=You+must+enter+a+certificate.");
}
if ($_POST['ca'] == ""){
@ header("Location: ".$uri_scheme.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/add_build.php?msg=You+must+enter+a+ca.");
}
$sql = "UPDATE `builds` SET `buildname` = '".addslashes($_POST['buildname'])."', `comments` = '".addslashes($_POST['comments'])."',
`certificate` = '".$_POST['certificate']."', `ca` = '".$_POST['ca']."' WHERE `buildID` = '".$_POST['buildID']."' ;";
dbase_query($sql);
@ header("Location: ".$uri_scheme.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/list_builds.php?msg=Build+updated+successfully.");
?>