<?php
function template16($institutions, $branch, $students_array, $examination, $array, $result, $class_id, $section_id = null) {
?>

    <div class="report-container">
        <div class="header">
            <div class="logo">
                <img src="<?php echo $institutions['logo']; ?>" alt="School Logo" class="School Logo">
            </div>
            <div class="school-info">
                <div class="school-name"><?php echo $institutions['institution_name']; ?></div>
                <div class="affiliation-code"><?php echo $branch['branch_code']; ?></div>
                <div class="address"><?php echo $branch['address'];
                    if($branch['pincode'] != "") {
                        echo " - ".$branch['pincode'];
                    }
                ?></div>
                <div class="contact"><?php echo $branch['contact_number'];
                    if($branch['email'] != "") {
                        echo ", ".strtolower($branch['email']);
                    }
                ?></div>
            </div>
        </div>

        <div class="main-content">
            <div class="report-title">Progress Report</div>
            <div class="academic-year">Academic Session <?php echo $result; ?></div>

            <div class="student-details">
                <div class="student-column">
                    <div class="student-row">
                        <div class="student-label">Name</div>
                        <div class="student-value"><?php echo $students_array[0]['name']; ?></div>
                    </div>
                    <div class="student-row">
                        <div class="student-label">Class</div>
                        <div class="student-value"><?php echo $class_id; ?></div>
                    </div>
                    <div class="student-row">
                        <div class="student-label">Father's Name</div>
                        <div class="student-value"><?php echo $students_array[0]['fathername']; ?></div>
                    </div>
                </div>
                <div class="student-column">
                    <div class="student-row">
                        <div class="student-label">Admission Number</div>
                        <div class="student-value"><?php echo $students_array[0]['admission_number']; ?></div>
                    </div>
                    <div class="student-row">
                        <div class="student-label">Section</div>
                        <div class="student-value"><?php echo $section_id; ?></div>
                    </div>
                    <div class="student-row">
                        <div class="student-label">Mother's Name</div>
                        <div class="student-value"><?php echo $students_array[0]['mothername']; ?></div>
                    </div>
                </div>
            </div>

            <table class="marks-table">
                <thead>
                    <tr>
                        <th>Subject</th>
                        <th><?php echo ucwords(strtolower($examination)); ?><br>Maximum Marks</th>
                        <th>Marks Obtained</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>English</td>
                        <td>20</td>
                        <td><?php echo $array[1]; ?></td>
                    </tr>
                    <tr>
                        <td>Mathematics</td>
                        <td>20</td>
                        <td><?php echo $array[2]; ?></td>
                    </tr>
                    <tr>
                        <td>Punjabi</td>
                        <td>20</td>
                        <td><?php echo $array[3]; ?></td>
                    </tr>
                    <tr class="total-row">
                        <td>Total</td>
                        <td>60</td>
                        <td><?php echo $array[4]; ?></td>
                    </tr>
                </tbody>
            </table>

            <div class="remarks-section">
                <div class="remarks-heading">Remarks</div>
                <div class="remarks-content"><?php echo ucwords(strtolower($array[5])); ?></div>
            </div>

            <div class="signatures">
                <div class="signature-box">
                    <div class="signature-line">Class Incharge</div>
                </div>
                <div class="signature-box">
                    <div class="signature-line">Principal / Headmistress</div>
                </div>
            </div>

            <div class="disclaimer">* In case of any discrepancies in marksheet, please contact school administration.</div>
        </div>
    </div>

<?php
}
?>