Example #1
0
		</script>
		</head>

		<body>
			
		</body>
		</html>
		
	<?php 
if (isset($_GET['report_id']) && sizeof($_GET['report_id']) > 0) {
    /*	
    echo 'reloaded to here';
    die();
    */
    if ($_GET['report_id'] == 0) {
        reportAll();
    } elseif ($_GET['report_id'] == 1) {
        reportCompleted();
    } elseif ($_GET['report_id'] == 2) {
        reportNew();
    } elseif ($_GET['report_id'] == 3) {
        reportAccountingApproved();
    } elseif ($_GET['report_id'] == 4) {
        reportBillingInitial();
        //changed to pending accounting approval
    } elseif ($_GET['report_id'] == 5) {
        reportBillingFinal();
    } elseif ($_GET['report_id'] == 6) {
        reportRejected();
    } elseif ($_GET['report_id'] == 7) {
        reportVoided();
Example #2
0
<?php

/**
 * This will:
 * Set headers for download, connect to DB, get data from database,
 * generate CSV file then download it.
 */
//If there is no ID posted, use the word 'report' so that the CSV file is not
//downloaded with a blank file name
$history_id = htmlspecialchars(filter_input(INPUT_GET, 'id', FILTER_SANITIZE_STRING));
if (isset($history_id)) {
    //Setting header to download
    header("Content-Disposition: attachment; filename=" . $history_id . ".csv");
    require_once 'lib.php';
    require_once 'database.ini';
    //Database must be created already, if not use createdatabase.php
    $connection = connectToDb();
    $raw_data = getRawSqlDataWithHistory($connection, $history_id);
    $table = reportAll($raw_data, $history_id, "csv");
    echo $table;
    $connection = null;
}
Example #3
0
        <!--PROJECT DATA-->
        <div class="container-fluid">
            <div class="row">
                <div class="col-sm-12 col-md-12 main">
                    <h4 class="text-center">Stories:</h4>
                    <div class="table-responsive" id="projects-table">
                        <table class="table table-striped data-table" id="project-table">
                            <?php 
//Display the HTML table for Project Stories using data from the database and set history ID
if (isset($_GET["id"])) {
    require_once 'lib.php';
    require_once 'database.ini';
    $history_id = htmlspecialchars(filter_input(INPUT_GET, 'id', FILTER_SANITIZE_STRING));
    $connection = connectToDb();
    $data = getRawSqlDataWithHistory($connection, $history_id);
    $table = reportAll($data, $history_id, "html");
    echo $table;
} else {
    echo 'Please make sure parameters are set!';
}
$connection = null;
?>
                        </table>
                    </div>
                </div>
            </div>
        </div>

        <hr>

        <!--EPICS-->