<?php 

function master_sheet_cb() {
    add_page_stylesheet("contents/plugins/eedu_portal/css/broadsheet.css", "eedu_broadsheetCss");
    do_action("display_search_box", [
        'id' => "annual_broadsheet",
        'query_function' => 'eedu_portal_annual_broadsheet',
        'cache' => false
    ]);
    global $post_meta;
    add_page_javascript('app/assets/js/page-scripts/js-functions.js');
}

function master_sheet1_cb() {
    global $post_meta;
    
    if(!isset($_POST['class']))
        return;
    $post = new post;
    $session = $_POST['session'];
    $class = $_POST['class'];

    
    ?>
    <div class="">
        <div class="card" id="print">
            <div class="card-body">
                <?php do_action('get_paperhead', ['title-h' => 'h2']); ?>
                <?php do_action('get_master_sheet', ['class' => $class, 'session' => $session]); ?>
            </div>
            <div class="card-footer">
                <span><?php printDiv(); ?></span>
            </div>
        </div>
    </div>
    <?php
}

function master_sheet2_cb() {
    global $post_meta;
    
    if(!isset($_POST['class']))
        return;
    $post = new post;
    $session = $_POST['session'];
    $class = $_POST['class'];

    
    ?>
    <div class="">
        <div class="card" id="print">
            <div class="card-body">
                <?php do_action('get_paperhead', ['title-h' => 'h2']); ?>
                <?php do_action('get_master_sheet2', ['class' => $class, 'session' => $session]); ?>
            </div>
            <div class="card-footer">
                <span><?php printDiv(); ?></span>
            </div>
        </div>
    </div>
    <?php
}

function master_sheet3_cb() {
    global $post_meta;
    
    if(!isset($_POST['class']))
        return;
    $post = new post;
    $session = $_POST['session'];
    $class = $_POST['class'];

    
    ?>
    <div class="">
        <div class="card" id="print">
            <div class="card-body">
                <?php do_action('get_paperhead', ['title-h' => 'h2']); ?>
                <?php do_action('get_master_sheet3', ['class' => $class, 'session' => $session]); ?>
            </div>
            <div class="card-footer">
                <span><?php printDiv(); ?></span>
            </div>
        </div>
    </div>
    <?php
}