<?php
function template10($institutions, $branch, $students_array, $examination, $array, $result, $class_id, $section_id = null)
{
?>
<div class="container_marksheet_template1">
    <div class="content_container_template1">
        <!-- Header Section -->
        <div class="header_template1">
            <div class="logo_div_img_template1">
                <img src="<?php echo $institutions['logo']; ?>" alt="School Logo">
            </div>
            <div class="header_institution">
                <h1 class="heading_template1"><?php echo $institutions['institution_name']; ?></h1>
                <p class="heading_code_info_template1"><?php echo $branch['branch_code']; ?></p>
                <p class="heading_address_template1">
                    <?php echo $branch['address']; 
                    if ($branch['pincode'] != "") {
                        echo " - " . $branch['pincode'];
                    }
                    ?>
                </p>
                <p class="contact_template1">
                    <?php echo $branch['contact_number'];
                    if ($branch['email'] != "") {
                        echo ", &nbsp;" . strtolower($branch['email']);
                    }
                    ?>
                </p>
            </div>
        </div>

        <!-- Report Title -->
        <div class="header_info_container">
            <h2 class="heading_report_template1">Progress Report</h2>
            <p class="year_template1">Academic Session <?php echo $result; ?></p>
        </div>

        <!-- Student Information -->
        <div class="student_info_container">
            <div class="student_info_template1">
                <table class="student_info_table_template1">
                    <tr>
                        <td>Name</td>
                        <td>:&nbsp;</td>
                        <td><?php echo $students_array[0]['name']; ?></td>
                    </tr>
                    <tr>
                        <td>Class</td>
                        <td>:&nbsp;</td>
                        <td><?php echo $class_id; ?></td>
                    </tr>
                    <tr>
                        <td>Father's Name</td>
                        <td>:&nbsp;</td>
                        <td><?php echo $students_array[0]['fathername']; ?></td>
                    </tr>
                </table>
            </div>
            <div class="student_info_template1">
                <table class="student_info_table_template1">
                    <tr>
                        <td>Admission Number</td>
                        <td>:&nbsp;</td>
                        <td><?php echo $students_array[0]['admission_number']; ?></td>
                    </tr>
                    <tr>
                        <td>Section</td>
                        <td>:&nbsp;</td>
                        <td><?php echo $section_id ?></td>
                    </tr>
                    <tr>
                        <td>Mother's Name</td>
                        <td>:&nbsp;</td>
                        <td><?php echo $students_array[0]['mothername']; ?></td>
                    </tr>
                </table>
            </div>
        </div>

        <!-- Marks Table -->
        <div class="margintop20">
            <table class="table evaluation_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] == "0" || $array[2] == "00") ? "-" : $array[2]; ?></td>
                    </tr>
                    <tr>
                        <td>E.V.S.</td>
                        <td>20</td>
                        <td><?php echo ($array[3] == "0" || $array[3] == "00") ? "-" : $array[3]; ?></td>
                    </tr>
                    <tr>
                        <td>Punjabi</td>
                        <td>20</td>
                        <td><?php echo ($array[4] == "0" || $array[4] == "00") ? "-" : $array[4]; ?></td>
                    </tr>
                    <tr>
                        <td>Hindi</td>
                        <td>20</td>
                        <td><?php echo ($array[5] == "0" || $array[5] == "00") ? "-" : $array[5]; ?></td>
                    </tr>
                    <tr>
                        <td class="texttransformupper" style="font-weight: bold;">Total</td>
                        <td>100</td>
                        <td><?php echo $array[6]; ?></td>
                    </tr>
                </tbody>
            </table>
        </div>

        <!-- Remarks -->
        <div class="margintop20">
            <table class="student_info_table_template1">
                <tr>
                    <td><b>Remarks</b></td>
                </tr>
                <tr>
                    <td><?php echo ucwords(strtolower($array[7])); ?></td>
                </tr>
            </table>
        </div>

        <!-- Signatures -->
        <div class="signature_container margintop50">
            <div class="student_info_template1">
                <table class="student_info_table_template1">
                    <tr>
                        <td>Class Incharge</td>
                    </tr>
                </table>
            </div>
            <div class="student_info_template1">
                <table class="student_info_table_template1">
                    <tr>
                        <td>Principal / Headmistress</td>
                    </tr>
                </table>
            </div>
        </div>

        <!-- Footer Note -->
        <div class="margintop20" style="color:red;font-size:10pt;text-align:center;">
            * Incase of any discrepancies in marksheet, please contact school administration.
        </div>
    </div>
</div>
<?php
}
?>