<?php
include_once '../session/admin-session.php';
include_once '../classes/class_admin.php';
include_once '../classes/validation.php';
include_once '../classes/common.php';
include_once '../classes/transcriptcal.php';
include_once '../classes/sgpa.php';
include_once 'read-configration.php';

ob_start();
$ObjDB = new class_db();
$objadm = new class_admin();
$val = new validation();

$sq = "select distinct a.abs_sem, b.sem_name from isr_result_date_tbl a, isr_iiser_sem_tbl b where a.abs_sem = b.sem_num order by a.abs_sem";
$ObjDB->sproc_name = $sq;
$res_sq = $ObjDB->SelectQuery();
$view_option = "";
while ($sqr = mysqli_fetch_array($res_sq)) {
    $abs_sem = $sqr['abs_sem'];
    $sem_name = $sqr['sem_name'];

    $view_option .= "<option value=" . $abs_sem . ">" . $sem_name . "</option>";
}
?>
<div class="container-fluid">
    <div class="row">
        <div class="col-xl-12 col-xxl-12 col-sm-12">
            <div class="card">
                <div class="card-header">
                    <h5 class="card-title">Transcript</h5>
                </div>
                <div class="card-body">
                    <div class="row">
                        <div class="col-xl-12 col-xxl-12 col-sm-12">
                            <div class="card">
                                <div class="card-header">
                                    <h5 class="card-title">
                                        Chronological Transcript 2018, 2019, 2020, 2021, 2022 batches</h5>

                                </div>
                                <div class="card-body">


                                    <div class="container">

                                        <!-- Section 1 -->

                                        <div class="row g-4 ">
                                            <!-- Card 1 -->
                                            <div class="col-md-6">
                                                <div class="card h-100 shadow-sm">
                                                    <div class="card-body">
                                                        <h5 class="card-title">Chronological Transcript</h5>
                                                        <form method="POST" action="reports-transcript-period.php">
                                                            <div class="mb-2">
                                                                <label class="form-label">Issue Date</label>
                                                                <input type="text" name="issuedate" class="form-control datebox" value="<?php echo DATE('d-m-Y') ?>">
                                                            </div>
                                                            <div class="mb-2">
                                                                <select class="form-select" name="sem_now">
                                                                    <?php echo $view_option; ?>
                                                                </select>
                                                            </div>
                                                            <div class="mb-2">
                                                                <input type="text" class="form-control" maxLength="9" name="rollno" placeholder="Roll Number">
                                                            </div>
                                                            <input type="submit" value="SUBMIT" name="chrono_transcript_btn" id="" class="btn btn-success"/>
                                                        </form>
                                                    </div><br/><br/>
                                                       <div class="card-body">
                                                        <h5 class="card-title">Chronological Transcript Consolidated</h5>
                                                        <form method="POST" action="reports-tpr-consolidated.php" target="myWindowName" onSubmit="myOpenWindow()">
                                                            <div class="mb-2">
                                                                <label class="form-label">Issue Date</label>
                                                                <input type="text" name="issuedate" class="form-control datebox" value="<?php echo DATE('d-m-Y') ?>">
                                                            </div>
                                                            <div class="mb-2">
                                                                <input type="text" class="form-control" maxLength="9" name="rollno" placeholder="Roll Number">
                                                            </div>
                                                            <input type="submit" value="SUBMIT" name="chrono_transcript_tpr_btn" id="" class="btn btn-success"/>
                                                        </form>
                                                    </div>
                                                </div>
                                            </div>

                                            <!-- Card 2 -->
                                            <div class="col-md-6">
                                                <div class="card h-100 shadow-sm">
                                                    <div class="card-body">
                                                        <h5 class="card-title">Chronological PDF</h5>
                                                        <form method="POST" action="reports-transcript-period-pdf.php">
                                                            <div class="mb-2">
                                                                <label class="form-label">Issue Date</label>
                                                                <input type="text" name="issuedate" class="datebox form-control" value="<?php echo DATE('d-m-Y') ?>">
                                                            </div>
                                                            <div class="mb-2">
                                                                <select class="form-select" name="sem_now">
                                                                    <?php echo $view_option; ?>
                                                                </select>
                                                            </div>
                                                            <div class="mb-2">
                                                                <input type="text" class="form-control" maxLength="9" name="rollno" placeholder="Roll Number">
                                                            </div>
                                                            <input type="submit" value="SUBMIT" name="chrono_transcript_pdf_btn" id="" class="btn btn-success"/>
                                                        </form>
                                                    </div><br/><br/>
                                                    <div class="card-body">
                                                        <h5 class="card-title">Chronological Consolidated PDF</h5>
                                                        <form method="POST" action="reports-tpr-consolidated-pdf.php">
                                                            <div class="mb-2">
                                                                <label class="form-label">Issue Date</label>
                                                                <input type="text" name="issuedate" class="form-control datebox" value="<?php echo DATE('d-m-Y') ?>">
                                                            </div>
                                                            <div class="mb-2">
                                                                <input type="text" class="form-control" maxLength="9" name="rollno" placeholder="Roll Number">
                                                            </div>
                                                            <input type="submit" value="SUBMIT" name="chrono_transcript_tpr_pdf_btn" id="" class="btn btn-success"/>
                                                        </form>
                                                    </div>
                                                </div>
                                            </div>



                                            <!-- Section 2 -->

                                            <h5 class="card-title">
                                                Previous Transcript 2016, 2017 batches</h5>
                                            <hr>
                                            <div class="row g-4 mt-3">
                                                <!-- Semester Transcript -->
                                                <div class="col-md-6">
                                                    <div class="card h-100 shadow-sm">
                                                        <div class="card-body">
                                                            <h5 class="card-title">Semester Transcript</h5>
                                                            <form action="reports-transcript-summary.php" method="POST" target="myWindowName" onSubmit="myOpenWindow()">
                                                                <div class="mb-2">
                                                                    <label class="form-label">Issue Date</label>
                                                                    <input type="text" name="issuedate" class="datebox form-control" value="<?php echo DATE('d-m-Y') ?>">
                                                                </div>
                                                                <div class="mb-2">
                                                                    <select class="form-select" NAME="sem_now">
                                                                        	<?php 
	for($usem = 1; $usem <= 8; $usem++) {
		echo "<option value=".$usem.">".$usem."</option>";
	}
	?>
                                                                    </select>
                                                                </div>
                                                                <div class="mb-2">
                                                                    <input type="text" class="form-control" placeholder="Roll Number" name="rollno" />
                                                                </div>
                                                               <input type="submit" value="SUBMIT" name="transcript_summary_btn" id="" class="btn btn-success"/>
                                                            </form>
                                                        </div>
                                                    </div>
                                                </div>

                                                <!-- Sem PDF -->
                                                <div class="col-md-6">
                                                    <div class="card h-100 shadow-sm">
                                                        <div class="card-body">
                                                            <h5 class="card-title">Sem PDF 2016, 2017</h5>
                                                            <form>
                                                                <div class="mb-2">
                                                                    <label class="form-label">Issue Date</label>
                                                                    <input type="date" class="form-control" value="2025-09-02">
                                                                </div>
                                                                <div class="mb-2">
                                                                    <select class="form-select">
                                                                        <option>1</option>
                                                                    </select>
                                                                </div>
                                                                <div class="mb-2">
                                                                    <input type="text" class="form-control" placeholder="Roll Number">
                                                                </div>
                                                                <button class="btn btn-submit">Submit</button>
                                                            </form>
                                                        </div>
                                                    </div>
                                                </div>


                                                <!-- Section 3 -->
                                                <h5 class="card-title">
                                                    Other Transcripts</h5>
                                                <hr>

                                                <div class="row g-4 mt-3">
                                                    <!-- Old Transcripts -->
                                                    <div class="col-md-6">
                                                        <div class="card h-100 shadow-sm">
                                                            <div class="card-body">
                                                                <h5 class="card-title">Old Transcripts</h5>
                                                                <form>
                                                                    <div class="mb-2">
                                                                        <label class="form-label">Issue Date</label>
                                                                        <input type="date" class="form-control" value="2025-09-02">
                                                                    </div>
                                                                    <div class="mb-2">
                                                                        <input type="text" class="form-control" placeholder="Roll Number">
                                                                    </div>
                                                                    <button class="btn btn-submit">Submit</button>
                                                                </form>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <!-- MS Exit Transcript -->
                                                    <div class="col-md-6">
                                                        <div class="card h-100 shadow-sm">
                                                            <div class="card-body">
                                                                <h5 class="card-title">MS Exit Transcript</h5>
                                                                <form>
                                                                    <div class="mb-2">
                                                                        <label class="form-label">Issue Date</label>
                                                                        <input type="date" class="form-control" value="2025-09-02">
                                                                    </div>
                                                                    <div class="mb-2">
                                                                        <input type="text" class="form-control" placeholder="Roll Number">
                                                                    </div>
                                                                    <button class="btn btn-submit">Submit</button>
                                                                </form>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>

                                            </div>                   
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php
$pagemaincontent = ob_get_contents();
ob_clean();
$PAGENAME = 'reports-transcript';
$HTMLTITLE = '';
$HTMLDESCRIPTION = '';
$HTMLKEYWORDS = '';
include("admin-master.php");
?>
<script language="JavaScript">
    function myOpenWindow() {
        myWindowHandle = window.open('', 'myWindowName', 'scrollbars = yes, resizable = yes, menubar=yes');
    }
</script>