<?php
session_start();
include '../config/database.php';
include_once "../security/session_config.php";
include_once "../config/properties.php";
include_once "../resources/offering.php";
$offering = new Offering();
$oid = $_GET['oid'];
$aid = $_GET['aid'];
$ps = $_GET['ps'];
$ca = $_GET['ca'];
$tl = $_GET['tl'];
echo "<input type='hidden' id='oid' value='$oid' />";
echo "<input type='hidden' id='aid' value='$aid' />";

echo "<div class='table-responsive'>";
    echo "<table class='table table-bordered'>";
        echo "<tbody>";
            if ($tl != 0) {
            echo "<tr>";
                echo "<td><strong>"._("AS0135")." </strong></td>";
                echo "<td>$tl mins</td>";
            echo "</tr>";
            }
            echo "<tr>";
                echo "<td><strong>"._("CA0104")." : </strong>$ca</td>";
                echo "<td><strong>"._("CRT4105")." : </strong>$ps%</td>";
            echo "</tr>";
            echo "<tr>";
                echo "<td colspan='2'><strong>"._("AS0136")." :</strong>";
                    echo "<ul id='assessment_modal_ul'>";
                        echo "<li>"._("AS0137")."</li>";
                        echo "<li>"._("AS0138")."</li>";
                        echo "<li>"._("AS0139")."</li>";
                    echo "</ul>";
                echo "</td>";
            echo "</tr>";                         
        echo "</tbody>";
    echo "</table>";
    echo "<table class='table table-bordered'>"
            . "<colgroup>"
                . "<col style='width:30%'>"
                . "<col style='width:70%'>"
            . "</colgroup>"
            . "<tbody>"
                . "<tr>"
                    . "<td colspan='2'><strong>"._("AS0140")."</strong></td>"
                . "</tr>"
                . "<tr>"
                    . "<td>"._("AS0141")."</td>"
                    . "<td>"
                        . "<ul id='assessment_modal_ul'>"
                            . "<li>"._("AS0142")."</li>"
                            . "<li>"._("AS0143")."</li>"
                            . "<li>"._("AS0144")."</li>"
                        . "</ul>"
                    . "</td>"
                . "</tr>"
                . "<tr>"
                    . "<td>"._("AS0145")."</td>"
                    . "<td>"
                        . "<ul id='assessment_modal_ul'>"
                            . "<li>"._("AS0146")."</li>"
                            . "<li>"._("AS0147")."</li>"
                            . "<li>"._("AS0148")."</li>"
                        . "</ul>"
                    . "</td>"
                . "</tr>"
                . "<tr>"
                    . "<td>"._("AS0149")."</td>"
                    . "<td>"
                        . "<ul id='assessment_modal_ul'>"
                            . "<li>"._("AS0150")."</li>"
                            . "<li>"._("AS0151")."</li>"
                            . "<li>"._("AS0152")."</li>"
                        . "</ul>"
                    . "</td>"
                . "</tr>"
            . "</tbody>"
        . "</table>";
    
    echo "<table class='table table-bordered mb-0'>"
            . "<tbody>"
                . "<tr>"
                    . "<td><strong>"._("AS0153")."</strong></td>"
                . "</tr>"
                . "<tr>"
                    . "<td>"
                        . "<ul id='assessment_modal_ul'>"
                            . "<li>"._("AS0154")."</li>"
                            . "<li>"._("AS0155")."</li>"
                        . "</ul>"
                    . "</td>"
                . "</tr>"
            . "</tbody>"
        . "</table>";                                                            
                                                               
    $stmt = $offering->getAssmtInstruction($oid);
    while($row3 = $stmt->fetch(PDO::FETCH_ASSOC)) {
    extract($row3);
    if($special_instructions !== Null){
    echo "<table class='table table-bordered mb-0'>"
            . "<tbody>"
                . "<tr>"
                    . "<td><strong>"._("AS0164")."</strong></td>"
                . "</tr>"
                . "<tr>"
                    . "<td>"
                        . "<ul id='assessment_modal_ul'>"
                            . "<li>".htmlentities($special_instructions)."</li>"
                        . "</ul>"
                    . "</td>"
                . "</tr>"
            . "</tbody>"
        . "</table>";
        }
    }
echo "</div>";
?>
