function NextbacklogID() { global $DBConn; $today = date_create(Date("Y-m-d")); $today = date_format($today, 'Y-m-d'); $isql = "INSERT INTO iteration SET Points_Object_ID=" . NextPointsObject() . ", Project_ID=0, Start_Date='" . $today . "', End_Date='2299-12-31'," . " Comment_Object_ID=" . NextIterationCommentObject() . ", iteration.Name = 'Backlog'"; mysqli_query($DBConn, $isql); $rand = mysqli_insert_id($DBConn); return $rand; }
</script> <script> $(document).ready(function(){ }); </script> <?php $showForm = true; if (isset($_POST['saveUpdate'])) { if (empty($_REQUEST['IID'])) { $sql_method = 'INSERT INTO'; $button_name = 'Add'; $whereClause = ''; $Insertsql = ', Points_Object_ID = ' . NextPointsObject() . ',Comment_Object_ID= ' . NextIterationCommentObject() . ' '; } else { $sql_method = 'UPDATE'; $button_name = 'Save'; $whereClause = 'WHERE ID = ' . ($_REQUEST['IID'] + 0); } if (mysqli_query($DBConn, "{$sql_method} iteration SET\n\t\t\tProject_ID = '" . $_REQUEST['PID'] . "',\n\t\t\tLocked = '" . $_REQUEST['Locked'] . "',\n\t\t\tName = '" . htmlentities($_REQUEST['Name'], ENT_QUOTES) . "',\n\t\t\tObjective = '" . mysqli_real_escape_string($DBConn, $_REQUEST['Objective']) . "',\n\t\t\tStart_Date = '" . $_REQUEST['Start_Date'] . "',\n\t\t\tEnd_Date = '" . $_REQUEST['End_Date'] . "' {$Insertsql} {$whereClause}")) { $showForm = false; header('Location:iteration_List.php?PID=' . $_REQUEST['PID']); } else { $error = 'The form failed to process correctly.' . mysqli_error(); } } if (!empty($error)) { echo '<div class="error">' . $error . '</div>'; }
}); </script> <script> $(document).ready(function(){ }); </script> <?php $showForm = true; if (isset($_POST['saveUpdate'])) { if (empty($_REQUEST['id'])) { $sql_method = 'INSERT INTO'; $button_name = 'Add'; $whereClause = ''; $Insertsql = ', Points_Object_ID = ' . NextPointsObject() . ' '; } else { $sql_method = 'UPDATE'; $button_name = 'Save'; $whereClause = 'WHERE ID = ' . ($_REQUEST['id'] + 0); } if (mysqli_query($DBConn, "{$sql_method} release_details SET\n \t\t\tStart = '" . $_REQUEST['Start'] . "',\n\t\t\tEnd = '" . $_REQUEST['End'] . "',\n\t\t\tName = '" . $_REQUEST['Name'] . "',\n\t\t\tLocked = '" . $_REQUEST['Locked'] . "',\n\t\t\tComment_Object_ID = '" . $_REQUEST['Comment_Object_ID'] . "' {$Insertsql} {$whereClause}")) { $showForm = false; header('Location:releaseDetails_List.php'); } else { $error = 'The form failed to process correctly.' . mysqli_error($DBConn); } } if (!empty($error)) { echo '<div class="error">' . $error . '</div>'; }