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

    <div class="container_marksheet_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" align="center">
                <div class="student_info_template1">
                    <table class="student_info_table_template1">
                        <tr>
                            <td>Name</td>
                            <td><?php echo $students_array[0]['name']; ?></td>
                        </tr>
                        <tr>
                            <td>Class</td>
                            <td><?php echo $class_id; ?></td>
                        </tr>
                        <tr>
                            <td>Father's Name</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><?php echo $students_array[0]['admission_number']; ?></td>
                        </tr>
                        <tr>
                            <td>Section</td>
                            <td><?php echo $section_id; ?></td>
                        </tr>
                        <tr>
                            <td>Mother's Name</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" border="1">
                    <thead>
                        <tr align="center">
                            <th>Subject</th>
                            <th><?php echo ucwords(strtolower($examination)); ?><br>Maximum Marks</th>
                            <th>Marks Obtained</th>	
                        </tr>
                    </thead>
                    <tbody>
                        <tr align="center">
                            <td>English</td>
                            <td>20</td>
                            <td><?php echo $array[1]; ?></td>
                        </tr>
                        <tr align="center">
                            <td>Mathematics</td>
                            <td>20</td>
                            <td><?php echo $array[2]; ?></td>
                        </tr>
                        <tr align="center">
                            <td>E.V.S.</td>
                            <td>20</td>
                            <td><?php echo $array[3]; ?></td>
                        </tr>
                        <tr align="center">
                            <td>Punjabi</td>
                            <td>20</td>
                            <td><?php echo $array[4]; ?></td>
                        </tr>
                        <tr align="center">
                            <td style="text-transform: uppercase; font-weight: bold;">Total</td>
                            <td>80</td>
                            <td><?php echo $array[5]; ?></td>
                        </tr>
                    </tbody>
                </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[6])); ?></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>
            
            <!-- Date and footer -->
            <div class="date_footer fullstretch margintop50" align="left">
                <?php echo date('Y-m-d'); ?>
            </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>

<?php
}
?>