<?php

ob_start();
session_start();

require_once 'includes.php';

require_once("../dashboard/conn.php");

require_once("../dashboard/config.php");

require_once '../dashboard/dbconfig4.php';

if(isset($_SESSION['user_id'])){

	$user_qury=mysqli_query($conn,"SELECT * FROM ormsusers WHERE user_id='$_SESSION[user_id]'");

	$user_resalt=mysqli_fetch_array($user_qury);

}

?>
<!DOCTYPE html>
<html lang="en">

<head>
	
	<meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Recharge | Recharge and Billing System | ORMS | Dashbaord</title>
    <!-- Favicon icon -->
    <link rel="icon" type="image/png" sizes="16x16" href="../dashboard/images/favicon.png">
    <link rel="stylesheet" href="../dashboard/vendor/bootstrap-select/dist/css/bootstrap-select.min.css">
	<!-- Datatable -->
    <link href="../dashboard/vendor/datatables/css/jquery.dataTables.min.css" rel="stylesheet">
    <link rel="stylesheet" href="../dashboard/css/style.css">

</head>

<body>

    <!--**********************************
        Main wrapper start
    ***********************************-->
    <div id="main-wrapper">

        <!--**********************************
            Nav header start
        ***********************************-->
        <div class="nav-header">
            <a href="index.php" class="brand-logo">
                <img class="logo-abbr" src="../dashboard/images/logo-white.png" alt="">
            </a>

            <div class="nav-control">
                <div class="hamburger">
                    <span class="line"></span><span class="line"></span><span class="line"></span>
                </div>
            </div>
        </div>
        <!--**********************************
            Nav header end
        ***********************************-->
		
		<!--**********************************
            Header start
        ***********************************-->
        <div class="header">
            <div class="header-content">
                <nav class="navbar navbar-expand">
                    <div class="collapse navbar-collapse justify-content-between">
                        <div class="header-left">
                            
                        </div>

                        <ul class="navbar-nav header-right">
							<li class="nav-item notification_dropdown show">
                                <a class="btn btn-danger" href="#"><i class='fa fa-money' style='font-size:18px'></i> BALANCE Rs.0.00</a>
                            </li>
							<li class="nav-item notification_dropdown show">
                                <a class="btn btn-success" href="topup.php"><i class="fa fa-plus-circle" style="font-size:18px;color:white"></i> TOP-UP</a>
                            </li>
                            <li class="nav-item dropdown header-profile">
                                <a class="nav-link" href="#" role="button" data-toggle="dropdown">
                                    <img src="user.png" width="20" alt=""/>
                                </a>
                                <div class="dropdown-menu dropdown-menu-right">
                                    <a href="#" class="dropdown-item ai-icon">
                                        <svg id="icon-user1" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-user"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>
                                        <span class="ml-2"><?php echo $user_resalt['fullname'];?></span>
                                    </a>
                                    <a href="logout.php" class="dropdown-item ai-icon">
                                        <svg id="icon-logout" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-log-out"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>
                                        <span class="ml-2">Logout </span>
                                    </a>
                                </div>
                            </li>
                        </ul>
                    </div>
                </nav>
            </div>
        </div>
        <!--**********************************
            Header end ti-comment-alt
        ***********************************-->

        <!--**********************************
            Sidebar start
        ***********************************-->
        <div class="deznav">
            <div class="deznav-scroll">
<?php

require_once 'sidebarmenu.php';

?>
            </div>
        </div>
        <!--**********************************
            Sidebar end
        ***********************************-->
		
        <!--**********************************
            Content body start
        ***********************************-->
        <div class="content-body">
            <!-- row -->
            <div class="container-fluid">
				<div class="row">
				<div class="col-xl-12 col-xxl-12 col-sm-12">
				<div class="alert alert-danger bg-danger text-white" role="alert">
				<strong>Alert!</strong> ඔබගේ ගිනුම තහවුරු කිරීම අසම්පුර්නයි.<a href="identity_verify.php" class="btn btn-success float-right" style="padding: 0px 3px;">සම්පුර්න කරන්න</a>
				</div>
				</div>
				</div>   
                <div class="row page-titles mx-0">
                    <div class="col-sm-6 p-md-0">
                        <div class="welcome-text">
                            <h4>Recharge</h4>
                        </div>
                    </div>
                    <div class="col-sm-6 p-md-0 justify-content-sm-end mt-2 mt-sm-0 d-flex">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item"><a href="home.php">Home</a></li>
							<li class="breadcrumb-item active"><a href="javascript:void(0);">Pay Desk</a></li>
                            <li class="breadcrumb-item active"><a href="javascript:void(0);">Recharge</a></li>
                        </ol>
                    </div>
                </div>
				
<?php 
	
	if ($_GET['service']=="MOBILE"){
	?>
<div class="container" style="max-width: 33rem;">
			<div class="card">
				<div class="card-body">
					<h2 class="text-center">MOBILE RECHARGE</h2>
					<hr>
					<form autocomplete="off" class="p-2 mt-4" action="#" method="post" id="relod_frm">
						<div class="form-group niftra-field-icon">
							<input type="tel" class="form-control" id="mobile" name="mobile" placeholder="Enter Mobile Number" minlength="9" maxlength="10" required="">
						</div>
						<div class="form-group text-center">
							<img height="50" id="dialogimg" class="m-2" src="../images/dialog.png" alt="Dialog">
							<img height="50" id="mobitelimg" class="m-2" src="../images/mobitel.png" alt="Mobitel">
							<img height="50" id="hutchimg" class="m-2" src="../images/hutch2.png" alt="Hutch">
							<img height="50" id="hutchimg" class="m-2" src="../images/hutch8.png" alt="Hutch">
							<img height="50" id="airtelimg" class="m-2" src="../images/airtel.png" alt="Airtel">
						</div>
						<div class="form-group niftra-field-icon">
							<input type="tel" class="form-control" id="amount" name="amount" placeholder="Enter Amount" required="">
						</div>
						<fieldset class="mt-4" style="font-size: 20px;">
							<div class="row text-center">
								<div class="col-md-6" id="prepaid_div">
									<input type="radio" name="bill_type" id="prepaid" value="P">
									<label for="prepaid" class="mr-4">PrePaid</label>
								</div>
								<div class="col-md-6" id="postpaid_div">
									<input type="radio" name="bill_type" id="postpaid" value="B">
									<label for="postpaid">PostPaid</label>
								</div>
							</div>
						</fieldset>
						<div class="row mt-4">
							<a class="btn btn-secondary col-md-3" href="pay_desk.php">BACK</a>
							<input class="btn btn-success col-md-9" type="button" name="pay_btn" value="RECHARGE">
						</div>
					</form>
				</div>
			</div>
		</div>
	<?php
	}else if ($_GET['service']=="UTILITIES"){
	?>
				
		
		<div class="container" style="max-width: 33rem;">
			<div class="card">
				<div class="card-body">
					<h2 class="text-center">UTILITY PAYMENTS</h2>
					<hr>
					<div class="text-center">
						<img height="50" class="m-2" src="../images/ceb.png" alt="CEB">
						<img height="50" class="m-2" src="../images/leco.png" alt="LECO">
						<img height="50" class="m-2" src="../images/water.png" alt="Water">
					</div>
					<form autocomplete="off" class="p-2 mt-4" action="#" method="post" id="bill_frm">
						<div class="form-group niftra-field-icon">
							<select class="form-control" id="bill_type" name="bill_type" required="" onchange="cal_credit_amount()">
								<option value="">Select a Bill Type</option>
								<option value="CEBB">Ceylon Electricity Board</option>
								<option value="LECO">Lanka Electricity Company</option>
								<option value="NWSD">National Water Supply and Drainage Board</option>
							</select>
						</div>
						<div class="form-group niftra-field-icon">
							<input type="tel" class="form-control" id="account_number" name="account_number" placeholder="Enter Account Number" required="">
						</div>
						<div class="form-group niftra-field-icon">
							<input type="number" class="form-control" id="amount" name="amount" placeholder="Enter Amount" onchange="cal_credit_amount()" required="">
						</div>
						<div class="form-group niftra-field-icon">
							<input type="tel" class="form-control" id="receipt_mobile" name="receipt_mobile" placeholder="Mobile Number to Send Receipt" minlength="9" maxlength="10" required="">
						</div>
						<div class="form-group text-center mt-3">
							<p><span id="amount_tot"></span></p>
						</div>
						<div class="row mt-4">
							<a class="btn btn-secondary col-md-3" href="pay_desk.php">BACK</a>
							<button type="button" class="btn btn-success col-md-9" onclick="pay()">PAY</button>
						</div>
					</form>
				</div>
			</div>
		</div>
	<?php
	}else if ($_GET['service']=="INTERNET"){
	?>	
		<div class="container" style="max-width: 33rem;">
      <div class="card">
        <div class="card-body">
          <h2 class="text-center">INTERNET BILL</h2>
          <hr>
          <div class="form-group text-center">
            <img height="50" class="m-2" src="../images/df.png" alt="Dialog4g">
            <img height="50" class="m-2" src="../images/slt.png" alt="slt">
            <img height="50" class="m-2" src="../images/lankabell.png" alt="Lanka Bell 4G">
          </div>
          <form class="p-2 mt-4" method="post" id="bill_frm">
            <div class="form-group niftra-field-icon">
              <select class="form-control" name="bill_type" id="bill_type" required="">
                <option value="">Select Bill Type</option>
                <option value="SLTB">SLT Broadband</option>
                <option value="HBBP">Dialog 4G Broadband - Prepaid</option>
                <option value="HBBB">Dialog 4G Broadband - Postpaid</option>
                <option value="LKBA">Lanka Bell 4G LTE</option>
              </select>
            </div>
            <div class="form-group niftra-field-icon">
              <input type="tel" class="form-control" id="mobile" name="mobile" placeholder="Enter Phone Number" minlength="9" maxlength="10" required="">
            </div>
            <div class="form-group niftra-field-icon">
              <input type="tel" class="form-control" id="amount" name="amount" placeholder="Enter Amount" required="">
            </div>
            <div class="row mt-5">
              <a class="btn btn-secondary col-md-3" href="pay_desk.php">BACK</a>
              <input class="btn btn-success col-md-9" type="button" name="pay_btn" value="PAY">
            </div>
          </form>
        
      </div>
    </div>
  </div>
  <?php
	}else if ($_GET['service']=="LAND LINE"){
	?>
  <div class="container" style="max-width: 33rem;">
      <div class="card">
        <div class="card-body">
          <h2 class="text-center">LAND LINE BILL</h2>
          <hr>
          <div class="form-group text-center">
              <img height="50" class="m-2" src="../images/df.png" alt="Dialog4g">
              <img height="50" class="m-2" src="../images/slt.png" alt="slt">
              <img height="50" class="m-2" src="../images/lankabell.png" alt="Lanka Bell">
            </div>
          <form class="p-2 mt-4" action="#" method="post" id="bill_frm">
            <div class="form-group">
              <select class="form-control" name="bill_type" id="bill_type" onchange="show_receipt()" required="">
                <option value="">Select Bill Type</option>
                <option value="SLTB">SLT Fiber</option>
                <option value="SLTB">SLT MegaLine</option>
                <option value="SLTB">SLT CityLink</option>
                <option value="HBBP">Dialog FixedLine LTE - Prepaid</option>
                <option value="HBBB">Dialog FixedLine LTE - Postpaid</option>
                <option value="LKBA">Lanka Bell CDMA</option>
              </select>
            </div>
            <div class="form-group niftra-field-icon">
              <input type="tel" class="form-control" id="mobile" name="mobile" placeholder="Enter Phone Number" minlength="9" maxlength="10" required="">
            </div>
            <div class="form-group niftra-field-icon">
              <input type="tel" class="form-control" id="amount" name="amount" placeholder="Enter Amount" required="">
            </div>
            <div class="form-group niftra-field-icon" id="receipt_mob_div" style="display:none;">
              <input type="tel" class="form-control" id="receipt_mobile" name="receipt_mobile" placeholder="Mobile Number to Send Receipt" minlength="9" maxlength="10">
            </div>
            <div class="row mt-5">
              <a class="btn btn-secondary col-md-3" href="pay_desk.php">BACK</a>
              <input class="btn btn-success col-md-9" type="button" name="pay_btn" value="PAY">
            </div>
          </form>
        
      </div>
    </div>
  </div>
 <?php
	}else if ($_GET['service']=="TELEVISION"){
	?> 
  <div class="container" style="max-width: 33rem;">
			<div class="card">
				<div class="card-body">
					<h2 class="text-center">TELEVISION BILL</h2>
					<hr>
					<div class="text-center">
						<img height="50" class="m-2" src="../images/dtv.png" alt="Dialog Television">
						<img height="50" class="m-2" src="../images/peotv.png" alt="PEO TV">
					</div>
					<form class="p-2 mt-4" action="#" method="post" id="bill_frm">
						<div class="form-group">
							<select class="form-control" name="bill_type" id="bill_type" onchange="show_receipt()" required="">
								<option value="">Select a Bill Type</option>
								<optgroup label="Sri Lankan Providers">
									<option value="DTVP">Dialog TV - Prepaid</option>
									<option value="DTVB">Dialog TV - Postpaid</option>
									<option value="SLTB">PEO TV</option>
								</optgroup>
								<optgroup label="Indian Providers">
									<option value="ATLT">Airtel TV</option>
									<option value="DIHT">Dish TV - India</option>
									<option value="SUDT">Sun Direct</option>
									<option value="TAST">Tata Sky</option>
									<option value="TVLT">TV Lanka</option>
									<option value="VCDT">Videocon D2h</option>
								</optgroup>
							</select>
						</div>
						<div class="form-group niftra-field-icon">
							<input type="tel" class="form-control" id="mobile" name="mobile" placeholder="Enter Account Number" required="">
						</div>
						<div class="form-group niftra-field-icon">
							<input type="tel" class="form-control" id="amount" name="amount" placeholder="Enter Amount" required="">
						</div>
						<div class="form-group niftra-field-icon" id="receipt_mob_div" style="display:none;">
							<input type="tel" class="form-control" id="receipt_mobile" name="receipt_mobile" placeholder="Mobile Number to Send Receipt" minlength="9" maxlength="10" required="">
						</div>
						<div class="form-group text-center mt-3" id="amount_tot_div" style="display:none;">
							<p><span id="amount_tot"></span></p>
						</div>
						<div class="row mt-5">
							<a class="btn btn-secondary col-md-3" href="pay_desk.php">BACK</a>
							<input class="btn btn-success col-md-9" type="button" name="pay_btn" value="PAY">
						</div>
					</form>
				</div>
			</div>
		</div>
	<?php
	}else if ($_GET['service']=="WALLETS"){
	?>	
		<div class="container" style="max-width: 33rem;">
      <div class="card">
        <div class="card-body">
          <h2 class="text-center">WALLET RECHARGE</h2>
          <hr>
          <div class="text-center">
            <img height="50" class="m-2" src="../images/ezcash.png" alt="EzCash">
            <img height="50" class="m-2" src="../images/mcash.png" alt="mCash">
          </div>
          <form class="p-2 mt-4" action="#" method="post" id="wallet_frm">
            <div class="form-group niftra-field-icon">
              <select class="custom-select" id="bill_type" name="bill_type" required="">
                <option value="">Select a Mobile Wallet</option>
                <option value="EZCT">EzCash Topup</option>
                <option value="MCAT">mCash Topup</option>
                <option value="EZCW">EzCash Withdraw</option>
                <!-- <option value="MCAW">mCash Withdraw</option> -->
              </select>
            </div>
            <div class="form-group niftra-field-icon">
              <input type="tel" class="form-control" id="mobile" name="mobile" placeholder="Enter Mobile Number" minlength="9" maxlength="10" required="">
            </div>
            <div class="form-group niftra-field-icon">
              <input type="text" class="form-control" id="otp" name="otp" placeholder="Enter OTP" style="display:none;">
            </div>
            <input type="hidden" name="reference" id="reference" value="">
            <div class="form-group niftra-field-icon">
              <input type="tel" class="form-control" id="amount" name="amount" placeholder="Enter Amount" required="">
            </div>
            <div class="row mt-5">
              <a class="btn btn-secondary col-md-3" href="pay_desk.php">BACK</a>
              <button class="btn btn-primary col-md-9" type="button" id="btnvalidate" onclick="ValidateMcash()" style="display:none;">Validate</button>
              <input class="btn btn-success col-md-9" type="button" name="pay_btn" value="PAY">
            </div>
          </form>
        
      </div>
    </div>
  </div>
 <?php
	}else if ($_GET['service']=="INSURANCE"){
	?> 
  <div class="container" style="max-width: 33rem;">
			<div class="card">
				<div class="card-body">
					<h2 class="text-center text-uppercase">Insurance Payments</h2>
					<hr>
					<form class="p-2 mt-4" action="#" method="post" id="bill_frm">
						<div class="form-group">
							<select class="form-control" name="bill_type" id="bill_type" required="">
								<option value="">Select Your Insurance Company</option>
								<option value="AIAL">AIA Insuarance Lanka</option>
								<option value="AZIG">Allianz General</option>
								<option value="AZIL">Allianz Life</option>
								<option value="AMTL">Amana Takaful</option>
								<option value="ARPL">Arpico Insurance</option>
								<option value="CEYL">Ceylinco Life</option>
								<option value="CEYG">Ceylinco General VIP</option>
								<option value="FFIL">Fairfirst Insurance</option>
								<option value="HNBL">HNB Assurance</option>
								<option value="JSIG">Janashakthi General</option>
								<option value="JSIL">Janashakthi Life</option>
								<option value="LOLL">LOLC Life Assuarance</option>
								<option value="SANG">Sanasa General</option>
								<option value="SANL">Sanasa Life</option>
								<option value="SLOL">Softlogic Life</option>
								<option value="SLIL">Sri Lanka Insurance</option>
								<option value="UAIL">Union Assurance</option>
							</select>
						</div>
						<div class="form-group niftra-field-icon">
							<input type="text" class="form-control" id="mobile" name="mobile" placeholder="Enter Account Number" required="">
						</div>
						<div class="form-group niftra-field-icon">
							<input type="tel" class="form-control" id="amount" name="amount" placeholder="Enter Amount" required="">
						</div>
						<div class="form-group niftra-field-icon" id="receipt_mob_div">
							<input type="tel" class="form-control" id="receipt_mobile" name="receipt_mobile" placeholder="Mobile Number to Send Receipt" minlength="9" maxlength="10" required="">
						</div>
						<div class="row mt-5">
							<a class="btn btn-secondary col-md-3" href="pay_desk.php">BACK</a>
							<input class="btn btn-success col-md-9" type="button" name="pay_btn" value="PAY">
						</div>
					</form>
				
			</div>
		</div>
	</div>
<?php
	}elseif ($_GET['service']=="FINANCE"){
	?>	
	<div class="container" style="max-width: 33rem;">
			<div class="card">
				<div class="card-body">
					<h2 class="text-center text-uppercase">Finance Payments</h2>
					<hr>
					<form class="p-2 mt-4" action="#" method="post" id="bill_frm">
						<div class="form-group">
							<select class="form-control" name="bill_type" id="bill_type" required="">
								<option value="">Select A Finance Company</option>
								<option value="ARPF">Arpico Finance</option>
								<option value="AASF">Asia Asset Finance</option>
								<option value="ASTL">Assetline Leasing</option>
								<option value="ASMF">Associated Motor Finance</option>
								<option value="BIMF">Bimputh Finance</option>
								<option value="CENF">Central Finance</option>
								<option value="CDBF">Citizens Development Business Finance (CDB)</option>
								<option value="DIAF">Dialog Finance</option>
								<option value="DILP">Dialog LesiPay</option>
								<option value="FINF">Fintrex Finance</option>
								<option value="HNBF">HNB Finance</option>
								<option value="ORIF">Orient Finance</option>
								<option value="SENF">Senkadagala Finance</option>
								<option value="SOLF">Softlogic Finance</option>
							</select>
						</div>
						<div class="form-group niftra-field-icon">
							<input type="text" class="form-control" id="mobile" name="mobile" placeholder="Enter Account Number" required="">
						</div>
						<div class="form-group niftra-field-icon">
							<input type="tel" class="form-control" id="amount" name="amount" placeholder="Enter Amount" required="">
						</div>
						<div class="form-group niftra-field-icon" id="receipt_mob_div">
							<input type="tel" class="form-control" id="receipt_mobile" name="receipt_mobile" placeholder="Mobile Number to Send Receipt" minlength="9" maxlength="10" required="">
						</div>
						<div class="row mt-5">
							<a class="btn btn-secondary col-md-3" href="pay_desk.php">BACK</a>
							<input class="btn btn-success col-md-9" type="button" name="pay_btn" value="PAY">
						</div>
					</form>
				</div>
			</div>
		</div>
<?php
}elseif ($_GET['service']=="TAXI"){
?>		
		<div class="container" style="max-width: 33rem;">
      <div class="card">
        <div class="card-body">
          <h2 class="text-center text-uppercase">TAXI Payments</h2>
          <hr>
          <div class="text-center">
            <img height="50" class="m-2" src="../images/pickme-driver.png" alt="PickMe Driver">
            <img height="50" class="m-2" src="../images/uber-eats.png" alt="Uber Eats Driver">
            <img height="50" class="m-2" src="../images/uber-driver.png" alt="Uber Taxi Driver">
          </div>
          <form class="p-2 mt-4" action="#" method="post" id="bill_frm">
            <div class="form-group">
              <select class="form-control" name="bill_type" id="bill_type" required="">
                <option value="">Select A Taxi Service</option>
                <option value="PCME">PickMe Driver</option>
                <option value="UBEA">Uber Eats Driver</option>
                <option value="UBTX">Uber Taxi Driver</option>
              </select>
            </div>
            <div class="form-group niftra-field-icon">
              <input type="tel" class="form-control" id="mobile" name="mobile" placeholder="Enter Account Number" required="">
            </div>
            <div class="form-group niftra-field-icon">
              <input type="tel" class="form-control" id="amount" name="amount" placeholder="Enter Amount" required="">
            </div>
            <div class="form-group niftra-field-icon" id="receipt_mob_div">
              <input type="tel" class="form-control" id="receipt_mobile" name="receipt_mobile" placeholder="Mobile Number to Send Receipt" minlength="9" maxlength="10" required="">
            </div>
            <div class="row mt-5">
              <a class="btn btn-secondary col-md-3" href="pay_desk.php">BACK</a>
              <input class="btn btn-success col-md-9" type="button" name="pay_btn" value="PAY">
            </div>
          </form>
        
      </div>
    </div>
  </div>
<?php
}
?>		
        </div>
        </div>
        <!--**********************************
            Content body end
        ***********************************-->

		<?php
		require_once 'footer.php';
		?>

		<!--**********************************
           Support ticket button start
        ***********************************-->

        <!--**********************************
           Support ticket button end
        ***********************************-->


    </div>
    <!--**********************************
        Main wrapper end
    ***********************************-->

    <!--**********************************
        Scripts
    ***********************************-->
    <!-- Required vendors -->
    <script src="../dashboard/vendor/global/global.min.js"></script>
	<script src="../dashboard/js/deznav-init.js"></script>
	<script src="../dashboard/vendor/bootstrap-select/dist/js/bootstrap-select.min.js"></script>
    <script src="../dashboard/js/custom.min.js"></script>
		
    <!-- Chart Morris plugin files -->
    <script src="../dashboard/vendor/raphael/raphael.min.js"></script>
    <script src="../dashboard/vendor/morris/morris.min.js"></script>
		
	
	<!-- Chart piety plugin files -->
    <script src="../dashboard/vendor/peity/jquery.peity.min.js"></script>
	
		<!-- Demo scripts -->
    <script src="../dashboard/js/dashboard/dashboard-2.js"></script>
	
	<!-- Svganimation scripts -->
    <script src="../dashboard/vendor/svganimation/vivus.min.js"></script>
    <script src="../dashboard/vendor/svganimation/svg.animation.js"></script>
    
	
	<script>

function exportTableToExcel(tableID, filename = ''){
    var downloadLink;
    var dataType = 'application/vnd.ms-excel';
    var tableSelect = document.getElementById(tableID);
    var tableHTML = tableSelect.outerHTML.replace(/ /g, '%20');
    
    // Specify file name
    filename = filename?filename+'.xls':'excel_data.xls';
    
    // Create download link element
    downloadLink = document.createElement("a");
    
    document.body.appendChild(downloadLink);
    
    if(navigator.msSaveOrOpenBlob){
        var blob = new Blob(['\ufeff', tableHTML], {
            type: dataType
        });
        navigator.msSaveOrOpenBlob( blob, filename);
    }else{
        // Create a link to the file
        downloadLink.href = 'data:' + dataType + ', ' + tableHTML;
    
        // Setting the file name
        downloadLink.download = filename;
        
        //triggering the function
        downloadLink.click();
    }
}
</script>

<script>

$(document).ready(function(){

    loadGallery(true, 'a.thumbnail');

    //This function disables buttons when needed
    function disableButtons(counter_max, counter_current){
        $('#investow-previous-image, #investow-next-image').investow();
        if(counter_max == counter_current){
            $('#investow-next-image').hide();
        } else if (counter_current == 1){
            $('#investow-previous-image').hide();
        }
    }

    /**
     *
     * @param setIDs        Sets IDs when DOM is loaded. If using a PHP counter, set to false.
     * @param setClickAttr  Sets the attribute for the click handler.
     */

    function loadGallery(setIDs, setClickAttr){
        var current_image,
            selector,
            counter = 0;

        $('#investow-next-image, #investow-previous-image').click(function(){
            if($(this).attr('id') == 'investow-previous-image'){
                current_image--;
            } else {
                current_image++;
            }

            selector = $('[data-image-id="' + current_image + '"]');
            updateGallery(selector);
        });

        function updateGallery(selector) {
            var $sel = selector;
            current_image = $sel.data('image-id');
            $('#image-gallery-caption').text($sel.data('caption'));
            $('#image-gallery-title').text($sel.data('title'));
            $('#image-gallery-image').attr('src', $sel.data('image'));
            disableButtons(counter, $sel.data('image-id'));
        }

        if(setIDs == true){
            $('[data-image-id]').each(function(){
                counter++;
                $(this).attr('data-image-id',counter);
            });
        }
        $(setClickAttr).on('click',function(){
            updateGallery($(this));
        });
    }
});
</script>

<script>

		function Publiinvested_teainvestrs(id){
			
			$.ajax({
				url:'publiinvested_teainvestrs.php',
				method:'POST',
				data:{id:id},
				success:function(data){
					location.reload();

				}
			});

		}

		function Reject_ads(id){
				alert(id);
		$.ajax({
			url:'reject_teainvestrs.php',
			method:'POST',
			data:{id:id},
			success:function(data){
				location.reload();

			}
		});

	}
</script>
	
</body>
</html>