<?php
    require_once("../models/recharge.php");

    $recharge= new recharge();

    if(isset($_POST['saverecharge'])){
        $paymentdate=$_POST['paymentdate'];
        $paymentmode=$_POST['paymentmode'];
        $referenceno=$_POST['referenceno'];
        $amount=$_POST['amount'];
        echo $recharge->saverecharge($paymentmode,$referenceno,$paymentdate,$amount);
    }

    if(isset($_GET['filterrecharge'])){
        $startdate=$_GET['startdate'];
        $enddate=$_GET['enddate'];
        echo $recharge->filterrecharge($startdate,$enddate);
    }
?>