CTR Graph


[insert_php]remove_filter( ‘the_content’, ‘wpautop’ );[/insert_php]
[insert_php]remove_filter( ‘the_excerpt’, ‘wpautop’ );[/insert_php]
[insert_php]remove_filter(‘the_content’, ‘wptexturize’);[/insert_php]
[insert_php] include(ABSPATH. ‘/wp-content/custom-php/templates/header.php’); [/insert_php]
[insert_php]

//IMPORT ALL COMPONENTS TO BE USED
include_once( ABSPATH. “/wp-content/custom-php/scripts/components/formGroupCheck.php”);

//DB CONNECTION
include_once( ABSPATH. “/wp-content/custom-php/scripts/query/general.php”);

echo ““;
$conn = getConn();

//GET INITIAL VALUE OF LOADING SEQUENCE
if (isset($_REQUEST[‘projectId’])) {
$projectId = $_REQUEST[‘projectId’];
} else if (isset($_REQUEST[‘project’])) {
$projectId = $_REQUEST[‘project’];
} else if (isset($_REQUEST[‘jobId’])) {
$projectId = $_REQUEST[‘jobId’];
} else if (isset($_REQUEST[‘job’])) {
$projectId = $_REQUEST[‘job’];
} else {
$projectId = ‘J2202’;
// echo “Status Code 400: No Project ID”;
// http_response_code(400);
// die();
}
echo ““;
//GETTING SOME INFORMATION THAT WILL BE USED TO RENDER THE PAGE
// INFORMATION TAKEN
/*
– Project Name
– Subjobs
– Tasks
*/

$projectName = getProjectName($projectId);
echo ““;
$subjobs = json_decode(getProjectSubjobs($projectId), true);
echo ““;

[/insert_php]











Loading

[insert_php] echo createHeader(“Project Status”, true); [/insert_php]

[insert_php]$projectName = print($projectName); [/insert_php]


[insert_php]

// SETTING DYNAMIC FOR GROUP AND DATA STRUCTURE IDENTIFIERS
$View = [“Current Budget”, “Original Schedule”, “Invoiced Amount (Invoice Out)”, “Paid amount”, “Value”, “Amount Spent”];
$subjobsNames = [];
$taskNamesWithSubjob = [];

$subjobsNumbers = [];
$taskNumbersWithSubjob = [];
$customClass = [];

foreach ($subjobs as $subjob) {
$subjobsNames[] = $subjob[“Name”];
$subjobsNumbers[] = $subjob[“Number”];

foreach ($subjob[“Tasks”] as $task) {
$taskNamesWithSubjob[] = $task[“Name”] . ” (” . $subjob[“Name”] . “) “;
$taskNumbersWithSubjob[] = “{$subjob[“Number”]},{$task[“Number”]}”;
$customClass[] = “subjob-{$subjob[“Number”]}”;
}
}

//OTHERS CATEGORY TO BE ADDED IN THE LIST
// See eventHandler from CTReventHandler.js for the use
// Summary, used to indicate selectors that are fed to a component based PHP – server-side rendered
$subjobsNames[] = “Other Subjobs”;
$subjobsNumbers[] = “-1”;

$taskNamesWithSubjob[] = “Other Tasks”;
$taskNumbersWithSubjob[] = “-1,-1”;

// “subjob–0” instead of “subjob–1” in order for other tasks to show even if Other Subjobs is unchecked
$customClass[] = “subjob–0”;

FormGroupCheck(“Subjobs”, $subjobsNames, $subjobsNumbers, “handleSubjobChange”);
FormGroupCheck(“Tasks”, $taskNamesWithSubjob, $taskNumbersWithSubjob, “handleTaskChange”, $customClass); ;

[/insert_php]

Number Mode

Days Interval As