<?php

$zroot = $_SESSION["zdir"];
$zcomp = $_SESSION["comp_" . $dbname];
$getcomp = mysqli_query($conn, "SELECT * FROM $zroot.`company`")or die(mysqli_error($conn));
$comp = mysqli_fetch_array($getcomp);
if ($dtype == 1) {
    $rtype = " - Summary";
} elseif ($dtype == 2) {
    $rtype = " - Detail";
} elseif ($dtype == '') {
    $rtype = '';
}
if ($mfdt != '') {
    $mfdt = "From Date - $mfdt";
}if ($mtdt != '') {
    $mtdt = "To Date - $mtdt";
}
$contents.=$comp['pname'] . "\n";
$contents.=$comp['add1'] . $comp['add2'] . $comp['add3'] . "\n";

$contents.=$formname . "," . $rtype . "," . "Report Date - " . Date("d-m-Y") . "\n";
$contents.=$mfdt . "," . $mtdt . "\n";
?>
