<?php
ob_start();
require("includes/check_auth_user.php");
require("includes/dbconnect.php");
include('includes/function.php');

$maindb = "salemain";
$trandb = "saletran";
$deemmain = "deexmain";

$formname = "B2B";
$file = "gstr1_b2b.php";

$compcd = $_SESSION["comp_" . $dbname];
$zroot = $_SESSION["zdir"];
$admin = $_SESSION["admin_" . $dbname];
$zdb = $_SESSION["zdbyear_" . $dbname];
$myyear = $_SESSION[$myyear];
mysqli_select_db($conn, $zdb);
$fdate = $_POST['fdate'];
$tdate = $_POST['tdate'];
//include 'includes/linkshead.php';
?>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

<script type='text/javascript'>
    $(document).ready(function () {
        var mfdate = "<?php echo $_POST['fdate'] ?>",
                mtdate = "<?php echo $_POST['tdate'] ?>";
        window.open("gstr1_b2b_fr.php?excel=excel&fdt=" + mfdate + "&tdt=" + mtdate);
        window.open("gstr1_b2bl_fr.php?excel=excel&fdt=" + mfdate + "&tdt=" + mtdate);
        window.open("gstr1_b2cs_fr.php?excel=excel&fdt=" + mfdate + "&tdt=" + mtdate);
        window.open("gstr1_cdnr_fr.php?excel=excel&fdt=" + mfdate + "&tdt=" + mtdate);
        window.open("gstr1_cdnur_fr.php?excel=excel&fdt=" + mfdate + "&tdt=" + mtdate);
        window.open("gstr1_exp_fr.php?excel=excel&fdt=" + mfdate + "&tdt=" + mtdate);
        window.open("gstr1_exemp_fr.php?excel=excel&fdt=" + mfdate + "&tdt=" + mtdate);
        window.open("gstr1_hsn_fr.php?excel=excel&fdt=" + mfdate + "&tdt=" + mtdate);
        window.open("gstr1_docs_fr.php?excel=excel&fdt=" + mfdate + "&tdt=" + mtdate);
        window.top.location = "gstr1x9.php";
    });
</script>