<?php
	session_start();
	if($_SESSION['rid'])
	{
		$userid=$_SESSION['rid'];
	}
	else
	{
		header('location:../login.php');
	}
?>
<?php
	include'connection.php';
	
		    date_default_timezone_set("asia/Kolkata");
			$datetime= Date("Y-m-d - h:i:s A");
			$time= Date("h:i:s A");
			$date= Date("Y-m-d");
		
		$query8="select * from wallet where Userid=$userid order by Id desc";
		$result8=mysqli_query($con,$query8);
		$data8=mysqli_fetch_array($result8);
		$currentbal= $data8['Balance'];
		
		$quGetName="select * from retailer where Userid='$userid'";
		$reGetName=mysqli_query($con,$quGetName);
		$dataGetName=mysqli_fetch_array($reGetName);
		$usrName=$dataGetName['Name'];
		
?>
<html>
<title>LLP Recharge</title>
<head>
<style>
body{background:url('bg.jpg'); background-size:cover;
width:1380px; margin:0px;}

.head{background:; width:1350px; height:85px; margin:0px;}
#p1{font-size:34px; float:left; Margin:10 0 0 45px; color:#996420; font-weight:bold;}
#p2{font-size:20px; float:left; margin:28 0 0 -8px; color:#eaa040; font-family:Courier;}
#p3{font-size:15px; font-family:Comic Sans MS; float:left; color:#996420; margin-top:48px; margin-left:-153px;}
.h2{background:white; width:400px; height:70px; margin:10 200px;}
#link1{float:right; margin:10 30 0 0px; font-size:20px; text-decoration:none;
 color:white; background:red; padding:5px; border-radius:4px;}
 #link2{float:right; margin:10 30 0 0px; font-size:20px; background:white;color:Green; padding:5px; border-radius:4px;}
#link1:hover{ padding:5px; border-radius:4px; color:black;}
	
.menu{background:#996420; height:40px; width:1300px; margin:0 0 0 20px; padding:0;}
.menu ul{padding:0; margin:0; position:relative; display:inline-block;}
.menu ul li{list-style:none; float:left; width:170px; line-height:40px;
	text-align:center; font-size:15px; margin:0; padding:0; color:white;}
.menu ul li ul {display:none;}
.menu ul li:hover{background:#d1994a; cursor:pointer;}
.menu ul li:hover ul {display:block; z-index:2;}
.menu ul li:hover ul li{background:#d1994a; border-top:solid white 0.1px;}
.menu ul li ul li:hover{background:#996420; color:white;}
.menu ul li ul li:hover a{ color:white;}
.menu ul li a{ text-decoration:none; color:white;}
 #a1{border:none; color:white;}
 .menu{letter-spacing:1px;}
 #bal:hover{background:#996420; cursor:text;}

 .content{ width:1385px; margin:0; padding:0;}
 .content h3{padding-left:20px; }
 .content table{margin:0 0 0 100px; font-size:18px;}
 .content input{margin:0 30 0 0px; width:200px; padding:2px; border:1px solid black;}
 .content select{margin:0 30 0 0px; width:200px; padding:2px; border:1px solid black;}
 .content textarea{margin:0 30 0 0px; width:200px; border:1px solid black;}

 
 .listhead{width:1350px; height:40px; background:#996420; margin:10 20 0 20px;}
 .listhead h3{margin-left:10px; line-height:40px; color:white;}
 .listview{width:1350px; margin:0 20 0 20px;}
 
 #tbfst{background:white; text-align:center;}
 #tbfst td{background:white; text-align:center;}
#t1{width:1350px; text-align:center; border-collapse:collapse; border-color:black;}
#t1 th{ font-family:calibri; background:#94928f; color:white; font-size:22px;}
#t1 td{ font-family:calibri; font-size:20px;}
#t1 tr:nth-child(odd){background:#f6f0e8;}
#t1 tr:nth-child(even){background:white; }

#t2{width:550px; text-align:center; border-collapse:collapse; border-color:black; font-family:sans-serif; margin-left:40px; padding:0;}
#t2 th{ font-family:calibri; background:#f05518; color:white; font-size:20px;}
#t2 td{ font-family:calibri; background:#fde2d7; padding:10 20px;}
#t2 input{width:230px; height:25px; padding-left:10px; font-size:17px;}
#t2 select{width:230px; height:25px; font-size:17px;}
#t2 textarea{width:230px; font-size:17px;}
 #btn1{height:70px;  cursor:pointer; background:#89685b; color:white; }
 #btn1:hover{background:#f05518; }

#t3{width:550px; text-align:center; border-collapse:collapse; border-color:black; font-family:sans-serif; margin-left:40px; padding:0;}
#t3 th{ font-family:calibri; background:#283388; color:white; font-size:20px;}
#t3 td{ font-family:calibri; background:#d7dcfd; padding:10 20px; }
#t3 input{width:230px; height:25px; padding-left:10px; font-size:17px;}
#t3 select{width:230px; height:25px; font-size:17px;}
#t3 textarea{width:230px; font-size:17px;}
 #btn2{height:70px; cursor:pointer; background:#5f6488; color:white;}
 #btn2:hover{background:#283388; }
 
 .icon{margin:20 0 0 100px;}
#payment{float:left;}
#msgdiv{width:300px; height:40px; text-align:center; font-family:sans-serif;}
#imgdiv{width:300px; height:180px; text-align:center;}
img{width:100px; height:100px; margin:10 40px; cursor:pointer; transition:0.3s;}
img:hover{width:130px; height:130px; transition:0.3s;}
span{width:300px;}
.divp{position:absolute; top:180px; left:620px; background:white; padding:0 10px; border-radius:6px;
 color:red; height:40px; line-height:40px; font-size:18px; }
 
 #DivNetBank{display:none;}
 #DivPaytm{display:none;}
.divp{position:absolute; top:180px; left:620px; background:white; padding:0 10px; border-radius:6px;
 color:red; height:40px; line-height:40px; font-size:18px; }
#green{color:#19dc42; font-size:20px;}
#red{color:red; font-size:20px;}
#blue{color:blue; font-size:20px;}

#bankdetail{display:none; background:#d4fbd6; width:550px; height:500px; border:1px solid black; position:absolute; top:50%; left:60%; transform:translate(-50%,-50%); margin:0; padding:0; border-radius:10px;}
#closicon{width:45px; height:45px; float:right;}
.tbbank{width:520px; margin:0px; padding:0; position:absolute; top:50px; left:-75px;}
.tbbank th{padding:20px 10px;  font-size:20px; color:#f05518; float:right;}
.tbbank td{padding:20px 10px; font-size:20px; color:#f05518;}
.tbbank h2{margin-top:10px; }

#paytmdetail{display:none; background:#d4fbd6; width:400px; height:350px; border:1px solid black; position:absolute; top:50%; left:55%; transform:translate(-50%,-50%); margin:0; padding:0; border-radius:10px;}
#closicon1{width:45px; height:45px; float:right; }
.tbbank1{width:450px; margin:0px; padding:0; position:absolute; top:50px; left:-135px; }
.tbbank1 th{padding:20px 10px; font-size:20px; color:#283388;}
.tbbank1 h2{margin-top:10px; text-align:center;}

.foot{margin:50px;}
</style>
<script type="text/javascript">
    function hide()
    {
        var divbank = document.getElementById("bankdetail");
        divbank.style.display="none";
    }
    function showbd()
    {
        var divbank = document.getElementById("bankdetail");
        divbank.style.display="block";
    }
    function hide1()
    {
        var divbank1 = document.getElementById("paytmdetail");
        divbank1.style.display="none";
    }
    function showpd()
    {
        var divbank1 = document.getElementById("paytmdetail");
        divbank1.style.display="block";
    }
    function ShowNetBanking()
    {
       n = document.getElementById("DivNetBank");
       p = document.getElementById("DivPaytm");
       ns = document.getElementById("iconwidthn");
       ps = document.getElementById("iconwidthp");
        n.style.display='block';
        n.style.height='620px';
        p.style.display='none';
        
        ns.style.width='130px';
        ns.style.height='130px';
        
        ps.style.width='100px';
        ps.style.height='100px';
        showbd();
        hide1();
    }
    
    
    function ShowPaytm()
    {
       n = document.getElementById("DivNetBank");
       p = document.getElementById("DivPaytm");
       ns = document.getElementById("iconwidthn");
       ps = document.getElementById("iconwidthp");
        n.style.display='none';
        p.style.display='block';
        p.style.height='620px';
        
        ns.style.width='100px';
        ns.style.height='100px';
        
        ps.style.width='130px';
        ps.style.height='130px';
        
        showpd();
        hide();
    }

</script>
</head>
<body>
	<div class="head">
		<p id="p1">LLP</p>
		<p id="p2">Recharge</p>
		<p id="p3">The Complete Solution</p>
		<a id="link1" href="logout.php">Log Out</a>
	</div>
	<div class="menu">
		<ul>
			<li><a href="recharge_home.php" id="a1">Home</a></li>
			<li>Reports
				<ul>
					<li><a href="recharge_history.php">Recharge History</a></li>
					<li><a href="account_reports.php">Account Reports</a></li>
					<li><a href="check_status.php">Check Status</a></li>
				</ul>
			</li>
			<li>Documents
				<ul>
					<li><a href="my_commission.php">My Commission</a></li>
					<li><a href="commision.php">Get Commission</a></li>
					<li><a href="complain.php">Complain</a></li>
				</ul>
			</li>
			<li>Profile
				<ul>
					<li><a href="change_profile.php">Change Profile</a></li>
					<li><a href="change_pwd.php">Change Password</a></li>
				</ul>
			</li>
			<li>Payment Request
				<ul>
					<li><a href="payment_request.php">Update Payment</a></li>
					<li><a href="TopUpReport.php">TopUp Report</a></li>
					<li><a href="bank_list.php">Bank List</a></li>
				</ul>
			</li>
			<li id="bal">Balance : <?php echo $currentbal; ?></li>
		</ul>
	</div>
	<div class="content">
	    <div id="bankdetail">
	        <div id="closdiv">
	            <img src="../closeicon.png" id="closicon" onclick="hide()"></img>
	       </div>
	        <table class="tbbank" border="0" cellpadding="10">
	            <tr>
	                <th colspan="2"><h2>Bank Details</h2></th>
	           </tr>
	            <tr>
	                <th>Bank Name : </th>
	                <td>Syndicate Bank</td>
	           </tr>
	            <tr>
	                <th>Account Name : </th>
	                <td>Long Life Pro Digital Services</td>
	           </tr>
	            <tr>
	                <th>Account Number : </th>
	                <td>98483070000941</td>
	           </tr>
	            <tr>
	                <th>Branch Code/ IFSC : </th>
	                <td>SYNB0009848</td>
	           </tr>
	       </table>
	   </div>
	    <div id="paytmdetail">
	        <div id="closdiv1">
	            <img src="../closeicon.png" id="closicon1" onclick="hide1()"></img>
	       </div>
	        <table class="tbbank1" border="0" cellpadding="10">
	            <tr>
	                <th><h2>Our Paytm Number</h2></th>
	           </tr>
	            <tr>
	                <th><h1>9897095971</h1></th>
	           </tr>
	       </table>
	   </div>
		<h1 id="heading">Payment Request</h1><hr>
	    <table border="0" cellpadding="10" id="tbfst">
			<tr>
			    <td colspan="2">
			        <?php
			                include'connection.php';
			                date_default_timezone_set("asia/Kolkata");
		    	            $datetime= Date("Y-m-d - h:i:s A");
			                $time= Date("h:i:s A");
	                		$date= Date("Y-m-d");
	                		
                    		if(isset($_POST['submit1']))
                    		{
                    			$amount=$_POST['amount'];
                    			$pdate=$_POST['pdate'];
                    			$mode=$_POST['mode'];
                    			$bankname=$_POST['bankname'];
                    			$dtime=$_POST['dtime'];
                    			$ubank=$_POST['ubank'];
                    			$txnno=$_POST['txnno'];
                    			$urAccNo=$_POST['urAccNo'];
                    			$remark=$_POST['remark'];
                    			
                    			$quGetSameTxn="select * from paymentreq where Txnnumber='$txnno' and Status='APPROVED'";
                    			$reGetSameTxn=mysqli_query($con,$quGetSameTxn);
                    			$countSameTxn=mysqli_num_rows($reGetSameTxn);
                    			
                    			$quGetSameTxn1="select * from paymentreq where Txnnumber='$txnno' and Status='PENDING'";
                    			$reGetSameTxn1=mysqli_query($con,$quGetSameTxn1);
                    			$countSameTxn1=mysqli_num_rows($reGetSameTxn1);
                    			
			                    if($countSameTxn>=1 || $countSameTxn1>=1)
			                    {
			                        echo "<h1 align='center'><font color='#ff0000'> &#x2716; Duplicate Txn Not Allowed !</font></h1><br>";
			                    }
	                        	else
	                        	{
	                        		if($amount>=1000)
                                    {
	                           			$qinsert="insert into paymentreq(Date,Userid,Paymentdate,Amount,Mode,Time,Yourbank,Txnnumber,ClintAccNo,Bankname,Remarks,Status)
	                        			values('$date','$userid','$pdate','$amount','$mode','$dtime','$ubank','$txnno','$urAccNo','$bankname','$remark','PENDING')";
	                        			if(mysqli_query($con,$qinsert))
	                           			{$msg=$usrName." Submitted A Payment Request For Rs. = ".$amount." At ".$time." On ".$date;
		    
		                                             $curl = curl_init();
                                                     curl_setopt_array($curl, array(
                                                      CURLOPT_URL => "http://sms2.kwikapi.com/sendSMS?username=sameermansuri111&message=".urlencode($msg)."&sendername=LLPRCH&smstype=TRANS&numbers=9897095971,8410930786&apikey=dc086ecd-1a22-4928-9e4e-69703230fd4e",
                                                      CURLOPT_RETURNTRANSFER => true,
                                                      CURLOPT_ENCODING => "",
                                                      CURLOPT_MAXREDIRS => 10,
                                                      CURLOPT_TIMEOUT => 0,
                                                      CURLOPT_FOLLOWLOCATION => false,
                                                      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                                                      CURLOPT_CUSTOMREQUEST => "GET",
                                                          ));
                                                      $response = curl_exec($curl);
                                                      $err = curl_error($curl);

                                                      curl_close($curl);

                                                      if ($err)
                                                     {
                                                         "cURL Error #:" . $err;
                                                     }
                                                  	else
                                        			{
                                    			     $response;
	                                        			$data2=json_decode($response);
                                        			}
	                        			    echo "<h1 align='center'><font color='#008000'> &#x2714; Payment Request Has Been Submit Successfully !</font></h1><br>";
	                         			}
		                        		else
		                        		{
		                        			echo "error";
		                        		}
		                        		mysqli_close($con);
			                        	//header('location:payment_request.php');
		                        	}
		                        	else
		                        	{
			                           echo "<h1 align='center'><font color='#ff0000'> &#x2716; Amount Is Less Than 1000 !</font></h1><br>";
		                        	}
		                        	echo "<META HTTP-EQUIV ='Refresh' Content ='10' >";
	                        	}
                    		}
                        	
                        	if(isset($_POST['submit2']))
                    		{
                    			$amount1=$_POST['amount1'];
                    			$pdate1=$_POST['pdate1'];
                    			$paytmno1=$_POST['paytmno'];
                    			$dtime1=$_POST['dtime1'];
                    			$txnno1=$_POST['txnno'];
                    			$urPaytmNo1=$_POST['urPaytmNo'];
                    			$remark1=$_POST['remark1'];
                    			
                    			$quGetSameTxn="select * from paymentreq where Txnnumber='$txnno1' and Status='APPROVED'";
                    			$reGetSameTxn=mysqli_query($con,$quGetSameTxn);
                    			$countSameTxn=mysqli_num_rows($reGetSameTxn);
                    			
                    			$quGetSameTxn1="select * from paymentreq where Txnnumber='$txnno1' and Status='PENDING'";
                    			$reGetSameTxn1=mysqli_query($con,$quGetSameTxn1);
                    			$countSameTxn1=mysqli_num_rows($reGetSameTxn1);
                    			
			                    if($countSameTxn>=1 || $countSameTxn1>=1)
			                    {
			                        echo "<h1 align='center'><font color='#ff0000'> &#x2716; Duplicate Txn Not Allowed !</font></h1><br>";
			                    }
	                        	else
	                        	{
			
	                        		if($amount1<=100)
                                    {
                                        echo "<h1 align='center'><font color='#ff0000'> &#x2716; Amount Is Less Than 100 !</font></h1><br>";
                                    }
                                    elseif($amount1>=1000)
                                    {
                                        echo "<h1 align='center'><font color='#ff0000'> &#x2716; Amount Is Bigger Than 1000 !</font></h1><br>";
                                    }
                                    else
                                    {
	                           		     $qinsertp="insert into paymentreq(Date,Userid,Paymentdate,Amount,Mode,Time,Yourbank,Txnnumber,ClintAccNo,Bankname,Remarks,Status)
	                        			values('$date','$userid','$pdate1','$amount1','PayTM','$dtime1','PayTM','$txnno1','$urPaytmNo1','$paytmno1','$remark1','PENDING')";
	                        			if(mysqli_query($con,$qinsertp))
	                           			{
	                           			    $msg=$usrName." Submitted A Payment Request For Rs. = ".$amount." At ".$time." On ".$date;
		    
		                                             $curl = curl_init();
                                                     curl_setopt_array($curl, array(
                                                      CURLOPT_URL => "http://sms2.kwikapi.com/sendSMS?username=sameermansuri111&message=".urlencode($msg)."&sendername=LLPRCH&smstype=TRANS&numbers=9897095971,8410930786&apikey=dc086ecd-1a22-4928-9e4e-69703230fd4e",
                                                      CURLOPT_RETURNTRANSFER => true,
                                                      CURLOPT_ENCODING => "",
                                                      CURLOPT_MAXREDIRS => 10,
                                                      CURLOPT_TIMEOUT => 0,
                                                      CURLOPT_FOLLOWLOCATION => false,
                                                      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                                                      CURLOPT_CUSTOMREQUEST => "GET",
                                                          ));
                                                      $response = curl_exec($curl);
                                                      $err = curl_error($curl);

                                                      curl_close($curl);

                                                      if ($err)
                                                     {
                                                         "cURL Error #:" . $err;
                                                     }
                                                  	else
                                        			{
                                    			     $response;
	                                        			$data2=json_decode($response);
                                        			}
	                        			    echo "<h1 align='center'><font color='#008000'> &#x2714; Payment Request Has Been Submit Successfully !</font></h1><br>";
	                         			}
		                        		else
		                        		{
		                        			echo "<h1 align='center'><font color='#ff0000'> &#x2716; Payment Request Has Been Failed Now !</font></h1><br>";
		                        		}
		                        		mysqli_close($con);
		                        	}
		                        	echo "<META HTTP-EQUIV ='Refresh' Content ='3' >";
	                        	}
                    		}
		
                        	?>
				</td>
			</tr>
			<tr>
			    <td colspan="2" style="color:green; font-size:20px; font-family:sans-serif;"><p>-: It May Take Up To 30 Minutes To Approved Your Payment :-</p></td>
			</tr>
			<tr>
				<td id="msgdiv">
					<h3><font color="#f05518">MINIMUM REQUEST AMOUNT 1000 RS.</font></h3>
				</td>
				<td id="msgdiv">
					<h3><font color="#0116b1">REQUEST AMOUNT Rs. 100-1000 Only, Applicable Bank Charge 50 Rs./Txn.</font></h3>
				</td>
			</tr>
			<tr>
				<td id="imgdiv">
					<img id="iconwidthn" src="../netbanking.png" onclick="ShowNetBanking()"></img>
				</td>
				<td id="imgdiv">
					<img id="iconwidthp" src="../paytm.png" onclick="ShowPaytm()"></img>
				</td>
			</tr>
			<tr>
				<td  colspan="2">
				    <div id="DivNetBank">
					<h2 align="center"><font color="#f05518">Payment Update By Net Banking</font></h2>
					<form method="post">
						<table border="1" cellpadding="7" id="t2">
							<tr>
								<th>Request For Amount :</th>
								<td><input type="text" name="amount" placeholder="Enter Amount" required></td>
							</tr>
							<tr>
								<th>Payment Date :</th>
								<td><input type="date" name="pdate" required></td>
							</tr>
							<tr>
								<th>Payment Mode :</th>
								<td><select name="mode" required>
								<option>--Select Payment Mode--</option>
								<option>Cheque/DD</option>
								<option>NEFT</option>
								<option>RTGS</option>
								<option>IMPS</option>
								</select></td>
							</tr>
							<tr>
								<th>Deposit Bank Name :</th>
								<td><select name="bankname">
								<option>--Select Bank--</option>
								<?php
								include'connection.php';
									$query="select * from bank";
									$result=mysqli_query($con,$query);
									while($row=mysqli_fetch_array($result))
									{
										echo "<option>".$row['Bankname']."</option>";
									}
								?>
								</select></td>
							</tr>
							<tr>
								<th >Deposit Time :</th>
								<td><select name="dtime">
								<option>--Select Deposit Time--</option>
								<option>10:00 Am</option>
								<option>11:00 Am</option>
								<option>12:00 pm</option>
								<option>1:00 pm</option>
								<option>2:00 pm</option>
								<option>3:00 pm</option>
								<option>4:00 pm</option>
								<option>5:00 pm</option>
								<option>6:00 pm To 9:00 Am</option>
								</select></td>
							</tr>
							<tr>
								<th>Your Bank Name :</th>
								<td><input type="text" name="ubank" placeholder="Enter Your Bank Name"></td>
							</tr>
							<tr>
								<th>Cheque/DD/IMPS No. :</th>
								<td><input type="text" name="txnno" placeholder="Enter Txn No."></td>
							</tr>
							<tr>
								<th>Your Account No:</th>
								<td><input type="text" name="urAccNo"></td>
							</tr>
							<tr>
								<th>Remarks :</th>
								<td><textarea rows="5" cols="30" name="remark" placeholder="Enter Your Message"></textarea></td>
							</tr>
							<tr>
								<th>Action : </th>
								<td>
								<input type="submit" name="submit1" value="Submit" id="btn1">
								
								</td>
							</tr>
						</table>
					</form>
					</div>
				    <div id="DivPaytm">
					    <h2 align="center"><font color="#0116b1">Payment Update By PayTM</font></h2>
					<form method="post">
						<table border="1" cellpadding="7" id="t3">
							<tr>
								<th>Request For Amount :</th>
								<td><input type="text" name="amount1" placeholder="Enter Amount" required></td>
							</tr>
							<tr>
								<th>Payment Date :</th>
								<td><input type="date" name="pdate1" required></td>
							</tr>
							<tr>
								<th>Deposit Paytm No. :</th>
								<td><select name="paytmno">
									<option>--Select Paytm No.--</option>
									<option>9897095971</option>
								</select></td>
							</tr>
							<tr>
								<th >Deposit Time :</th>
								<td><select name="dtime1">
								<option>--Select Deposit Time--</option>
								<option>10:00 Am</option>
								<option>11:00 Am</option>
								<option>12:00 pm</option>
								<option>1:00 pm</option>
								<option>2:00 pm</option>
								<option>3:00 pm</option>
								<option>4:00 pm</option>
								<option>5:00 pm</option>
								<option>6:00 pm To 9:00 Am</option>
								</select></td>
							</tr>
							<tr>
								<th>Paytm Txn No. :</th>
								<td><input type="text" name="txnno" placeholder="Enter Txn No."></td>
							</tr>
							<tr>
								<th>Your Paytm No. :</th>
								<td><input type="text" name="urPaytmNo"></td>
							</tr>
							<tr>
								<th>Remarks :</th>
								<td><textarea rows="5" cols="30" name="remark1" placeholder="Enter Your Message"></textarea></td>
							</tr>
							<tr>
								<th>Action : </th>
								<td>
								<input type="submit" name="submit2" value="Submit" id="btn2">
								
								</td>
							</tr>
						</table>
					</form>
					</div>
				</td>
			</tr>
		</table>
	</div>
	<div class="listhead">
	<h3>View Payment Request</h3>
	</div>
	<div class="listview">
		<table id="t1" border="1" cellpadding="5">
			<tr >
				<th>Req.Date</th>
				<th>Payment Date</th>
				<th>Amount</th>
				<th>Mode</th>
				<th>Transaction No.</th>
				<th>Deposit Time</th>
				<th>Bank Name</th>
				<th>Bank Charge</th>
				<th>Remarks</th>
				<th>Response Messege</th>
				<th>Status</th>
			</tr>
		<?php
		include 'connection.php';
		$viewq="select * from paymentreq where Userid=$userid order by Id desc limit 10";
		$viewr=mysqli_query($con,$viewq);
		while($row=mysqli_fetch_array($viewr))
		{
		    if($row['Status']=="APPROVED")
		    {
		       $color="green";
		    }
		    elseif($row['Status']=="PENDING")
		    {
		        $color="blue";
		    }
		    else
		    {
		        $color="red";
		    }
			echo "<tr>";
				echo "<td>".$row['Date']."</td>";
				echo "<td>".$row['Paymentdate']."</td>";
				echo "<td>".$row['Amount']."</td>";
				echo "<td>".$row['Mode']."</td>";
				echo "<td>".$row['Txnnumber']."</td>";
				echo "<td>".$row['Time']."</td>";
				echo "<td>".$row['Bankname']."</td>";
				echo "<td>".$row['Bankcharge']."</td>";
				echo "<td>".$row['Remarks']."</td>";
				echo "<td>".$row['Responsemsg']."</td>";
				echo "<td id='$color'>".$row['Status']."</td>";
			echo "<tr>";
		}
		?>
		
		</table>
	</div>
	<div class="foot">
		<p>Copyright &copy; 2018 Long Life Product Pvt. Ltd.</p>
	</div>
</body>
</html>