<?php

include ($PATH . 'globals/globals.php');

$adminAct = $_REQUEST['adminAct']; 

$editID = $_REQUEST['editID']; 
$query = 'SELECT * FROM projects AS p LEFT JOIN projectStatus AS ps ON (p.projectStatus = ps.pstatID) LEFT JOIN clients AS c on (p.clientID = c.clientID) LEFT JOIN projectType AS pt ON (p.projectType = pt.ptypeID) WHERE p.projectID=' . $editID; 
$result = $con->query($query);
		
while ($row=$result->fetch_array(MYSQLI_ASSOC)) {
	$op = 'pay';
	$projectID = $row['projectID'];
	$projectName = $row['projectName'];
	$projectDesc = $row['projectDesc'];
	$projectClient = $row['clientName'];
	$projectStatus = $row['pstatDesc'];
	$projectStart = $row['projectStart'];
	$projectTargetComp = $row['projectTargetComp'];
	$projectTimeEstimate = $row['projectTimeEstimate'];
	$projectRate = $row['projectRate'];
	$subBtn = 'Save Changes';
	$modalTitle = 'Update Tasks for: '. $projectName;
}

include('list/project-task.php');

$priority = ''; 
$taskPriority = getProjPriority($priority,$con);

$taskStatus = '';
$taskStatus = getTaskStatus($taskStatus,$con);
	
$outstandingAmount = $projectAmount-$hoursBillable;

include('form/project-task.php');

?>