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

    <div class="container_marksheet_template1">
        <div class="border_template1">
            <div class="content_container_template1">
                <!-- Header with logo and school information -->
                <div class="fullstretch header_template1" align="center">
                    <div class="logo_div_img_template1">
                        <img src="<?php echo $institutions['logo']; ?>" alt="School Logo" class="School Logo">
                    </div>
                    <div class="header_institution">
                        <span class="heading_template1"><?php echo $institutions['institution_name']; ?></span><br>
                        <span class="heading_code_info_template1"><?php echo $branch['branch_code']; ?></span><br>
                        <span class="heading_address_template1"><?php echo $branch['address'];
                            if($branch['pincode'] != "") {
                                echo " - ".$branch['pincode'];  
                            }
                        ?></span><br>
                        <span class="contact_template1" style="text-transform: none;">
                            <?php echo $branch['contact_number'];
                            if($branch['email'] != "") {
                                echo ", &nbsp;".strtolower($branch['email']);
                            }
                            ?>
                        </span>
                    </div>
                </div>

                <!-- Report heading and academic year -->
                <div class="fullstretch header_info_container" align="center">
                    <div class="fullstretch heading_report_template1">Progress Report</div>
                    <div class="year_template1">Academic Session <?php echo $result; ?></div>
                </div>

                <!-- Student information section -->
                <div class="fullstretch margintop5" align="center">
                    <div class="student_info_template1">
                        <table class="student_info_table_template1">
                            <tr>
                                <td>Name</td>
                                <td>-</td>
                                <td><?php echo $students_array[0]['name']; ?></td>
                            </tr>
                            <tr>
                                <td>Class</td>
                                <td>-</td>
                                <td><?php echo $class_id; ?></td>
                            </tr>
                            <tr>
                                <td>Father's Name</td>
                                <td>-</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>-</td>
                                <td><?php echo $students_array[0]['admission_number']; ?></td>
                            </tr>
                            <tr>
                                <td>Section</td>
                                <td>-</td>
                                <td><?php echo $section_id; ?></td>
                            </tr>
                            <tr>
                                <td>Mother's Name</td>
                                <td>-</td>
                                <td><?php echo $students_array[0]['mothername']; ?></td>
                            </tr>
                        </table>
                    </div>
                </div>

                <!-- Marks table -->
                <div class="fullstretch margintop20" align="center">
                    <table class="evaluation_table">
                        <tr>
                            <th>Subject</th>
                            <!--<th>*Term Examination *<br>Maximum Marks</th>-->
                            <th><?php echo ucwords(strtolower($examination)); ?><br>Maximum Marks</th>
                            <th>Marks Obtained</th>
                        </tr>
                        <tr>
                            <td>English</td>
                            <td>20</td>
                            <td><?php echo $array[3]; ?></td>
                        </tr>
                        <tr>
                            <td>Mathematics</td>
                            <td>20</td>
                            <td><?php echo $array[4]; ?></td>
                        </tr>
                        <tr>
                            <td>Science</td>
                            <td>20</td>
                            <td><?php echo $array[5]; ?></td>
                        </tr>
                        <tr>
                            <td>Social Science</td>
                            <td>20</td>
                            <td><?php echo $array[6]; ?></td>
                        </tr>
                        <tr>
                            <td><?php echo ucwords($array[1] . ' (Compulsory)'); ?></td>
                            <td>20</td>
                            <td><?php echo $array[7]; ?></td>
                        </tr>
                        <tr>
                            <td><?php echo $array[2]; ?><br>(Add.)</td>
                            <td>20</td>
                            <td><?php echo $array[8]; ?></td>
                        </tr>
                        <tr>
                            <td>Information Technology (Add.)</td>
                            <td>20</td>
                            <td><?php echo $array[9]; ?></td>
                        </tr>
                        <tr class="total-row">
                            <td>TOTAL</td>
                            <td>100</td>
                            <td><?php echo $array[10]; ?></td>
                        </tr>
                    </table>
                </div>

                <!-- Remarks section -->
                <div class="fullstretch margintop50" align="center">
                    <div class="student_info_template1">
                        <table class="student_info_table_template1">
                            <tr>
                                <td><b>Remarks</b></td>
                            </tr>
                            <tr>
                                <td><?php echo ucwords(strtolower($array[11])); ?></td>
                            </tr>
                        </table>
                    </div>
                </div>

                <!-- Signature section -->
                <div class="fullstretch margintop50" align="center">
                    <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>

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

<?php
}
?>