hjkhjkjhkhjkgjghjhgjhgjghjhghjghjhgjjnbvnvbnvk
bnmbnmbnhjkhjkhjkhjktyutyutyuytutyutyutyhgjgjghjgjghjguytutyry
/
home
/
u932676976
/
domains
/
goldeninfradeveloper.com
/
public_html
/
manager
/
Upload FileeE
HOME
<?php include 'function.php'; include 'db.php'; session_start(); $userprofile= $_SESSION['user_name']; $query = "SELECT * from user where username='$userprofile'"; $data= mysqli_query($con, $query); $result= mysqli_fetch_assoc($data); $usercode=$result['usercode']; $image=$result['image']; $name=$result['name']; if (isset($_SESSION['user_name'])) { // print " no session exists"; }else{header("location:register.php");} if(isset($_POST['submit'])){ $usr=$_POST['usercode']; $from=$_POST['from']; $fr=date('d-m-Y',strtotime($from)); $to=$_POST['to']; $trr=date('d-m-Y',strtotime($to)); $aaa="select sum(amount) as dd from business where referal='$usr' and businesstype='new business' and dt >= '$from' && dt <= '$to' "; $aa=mysqli_query($con,$aaa); $a=mysqli_fetch_assoc($aa); $new=$a['dd']; $bbb="select sum(amount) as dd from business where referal='$usr' and businesstype='emi' and dt >= '$from' && dt <= '$to' "; $bb=mysqli_query($con,$bbb); $b=mysqli_fetch_assoc($bb); $emi=$b['dd']; $totalb=$new+$emi; $ccc="select * from user where usercode='$usr'"; $cc=mysqli_query($con,$ccc); $c=mysqli_fetch_assoc($cc); $agentname=$c['name']; $rnk=$c['rank']; $ddd="select * from rank where rankcode='$rnk'"; $dd=mysqli_query($con,$ddd); $d=mysqli_fetch_assoc($dd); $rn=$d['name']; $rcom=$d['commission']; $eee="select sum(amount) as dd from advance where usercode='$usr'"; $ee=mysqli_query($con,$eee); $e=mysqli_fetch_assoc($ee); $adv=$e['dd']; $spot=$totalb*$rcom/100; $pay=$spot-$adv; } $ggg="select * from company"; $gg=mysqli_query($con,$ggg); $g=mysqli_fetch_assoc($gg); $cname=$g['name']; $cimage=$g['image']; $caddress=$g['address']; $ccity=$g['city']; $cstate=$g['state']; $cpincode=$g['pincode']; $ccountry=$g['country']; $ccontact=$g['contact']; $admincharge=$spot*5/100; $payblespot=$spot-$admincharge; $totalpayableamount=$payblespot-$adv; ?> <!DOCTYPE html> <html lang="en"> <?php include 'head.php';?> <style> .golden { width: 100%; background: #ffffff; border: none; border-radius: 12px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); margin-bottom: 20px; padding: 25px; } .tgolden { width: 100%; border-collapse: collapse; margin-bottom: 25px; } .tgolden td { border: none; padding: 10px; } .company-header-box { background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); border-radius: 10px; padding: 20px; margin-bottom: 20px; } .table-bordered-custom th, .table-bordered-custom td { padding: 12px 15px; vertical-align: middle; } .table-bordered-custom tr:nth-child(even) { background-color: #fcfcfc; } .payable-row { background-color: #e8f4fd !important; font-weight: bold; color: #007FFF; font-size: 1.1rem; } body { font-family: Arial, sans-serif; padding: 20px; } #printableArea { border: 2px solid #007BFF; padding: 20px; background-color: #f9f9f9; } </style> <body> <?php include 'header.php';?> <?php include 'sidebar.php';?> <main id="main" class="main"> <section class="section dashboard"> <div class="row"> <!-- Left side columns --> <div class="col-lg-12"> <div class="row"> <!-- Recent Sales --> <div class="col-12"> <div class="card recent-sales overflow-auto"> <div class="card-body"> <h5 class="card-title fw-bold text-primary mb-3"><?php echo $agentname;?> | | Business Report</h5> <div ><button onclick="printSpecificArea('printableArea')" class="btn btn-primary mb-3" ><i class="bi bi-printer me-1"></i> Print</button></div> <div id="printableArea"> <div class="golden"> <div class="company-header-box"> <table class="tgolden"> <tr> <td style="width: 100px;" class="text-center"> <img src="<?php cimages();?>" style="height:100px;width:100px;object-fit:cover;border-radius:12px;box-shadow: 0 2px 8px rgba(0,0,0,0.1);"> </td> <td> <center> <h2 class="fw-bold text-dark mb-1" style="font-size: 1.5rem;"><?php echo $cname;?></h2> <p class="text-muted mb-1" style="font-size: 0.9rem;"><i class="bi bi-telephone-fill me-1"></i> Phone : <?php echo $ccontact;?></p> <p class="text-muted mb-0" style="font-size: 0.85rem;"><?php echo $caddress;?>, <br><?php echo $ccity;?>, <?php echo $cstate;?>, <?php echo $ccountry;?> - [ <?php echo $cpincode;?> ]</p> </center> </td> </tr> </table> </div> <table class="table table-bordered"> <tr><td>Agent Name </td><td><?php echo $agentname;?></td></tr> <tr><td>Rank</td><td><?php echo $rn;?></td></tr> <tr><td>Commission</td><td><?php echo $rcom;?></td></tr> <tr><td>From</td><td><?php echo $fr;?></td></tr> <tr><td>To</td><td><?php echo $trr;?></td></tr> <tr><td>Total Business</td><td><?php echo $totalb;?></td></tr> <tr><td>Total Spot</td><td><?php echo $spot;?></td></tr> <tr><td>Admin Charges 5%</td><td><?php echo $admincharge;?></td></tr> <tr><td>Payable Spot Commission</td><td><?php echo $payblespot;?></td></tr> <tr><td>Total Advance</td><td><?php echo $adv;?></td></tr> <tr><td colspan="2"><b>Payable Spot Amount : <?php //echo $pay;?><?php echo $totalpayableamount;?></b></td></tr> </table> <table class="table table-bordered"> <thead> <tr style="background-color:#007FFF;color:white;font-size:12px;"> <th scope="col">Date</th> <th scope="col">Amount</th> <th scope="col">Type</th> </tr> </thead> <tbody> <?php agtb($usr,$from,$to);?> </tbody> </table> <div> </div> </div> </div> </div> </div><!-- End Recent Sales --> </div> </div><!-- End Left side columns --> </div> </section> </main><!-- End #main --> <?php include 'footer.php';?> <a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i class="bi bi-arrow-up-short"></i></a> <script src="assets/vendor/apexcharts/apexcharts.min.js"></script> <script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script> <script src="assets/vendor/chart.js/chart.min.js"></script> <script src="assets/vendor/echarts/echarts.min.js"></script> <script src="assets/vendor/quill/quill.min.js"></script> <script src="assets/vendor/simple-datatables/simple-datatables.js"></script> <script src="assets/vendor/tinymce/tinymce.min.js"></script> <script src="assets/vendor/php-email-form/validate.js"></script> <script src="assets/js/main.js"></script> <script> function printSpecificArea(id) { var content = document.getElementById(id).innerHTML; var myWindow = window.open('', '', 'width=900,height=700'); myWindow.document.write('<html><head><title>Print Report</title>'); myWindow.document.write('<link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">'); myWindow.document.write('<style>'); // Professional Print Styling myWindow.document.write('body { font-family: Arial, sans-serif; padding: 15px; background: #ffffff; color: #000; }'); myWindow.document.write('.golden { width: 100%; background: #ffffff; border: 1px solid #ddd; border-radius: 8px; padding: 20px; margin: 0 auto; }'); myWindow.document.write('.tgolden { width: 100%; border-collapse: collapse; margin-bottom: 15px; }'); myWindow.document.write('.tgolden td { border: none; padding: 5px; }'); myWindow.document.write('.company-header-box { background: #f8f9fa !important; border: 1px solid #e9ecef; border-radius: 8px; padding: 15px; margin-bottom: 15px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }'); myWindow.document.write('.table { width: 100%; border-collapse: collapse; margin-bottom: 15px; }'); myWindow.document.write('.table th, .table td { border: 1px solid #dee2e6 !important; padding: 8px 12px; font-size: 14px; }'); myWindow.document.write('thead tr { background-color: #007FFF !important; color: white !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }'); myWindow.document.write('</style>'); myWindow.document.write('</head><body>'); myWindow.document.write(content); myWindow.document.write('</body></html>'); myWindow.document.close(); myWindow.focus(); setTimeout(function () { myWindow.print(); myWindow.close(); }, 500); } </script> </body> </html>