<?php

ob_start();
session_start();

require_once 'includes.php';

require_once("conn.php");

require_once("config.php");

require_once '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);

	

	if($user_resalt['image']==""){

		$image_path="images/empty.jpg";

	}

	else{

		$image_path="../dashboard/images/admin/".$user_resalt['image'];

	}

}

?>
<!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>TRANSACTION DETAILS | Recharge and Billing System | ORMS | Dashbaord</title>
    <?php
	require_once 'headercss.php';
	?>

</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="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="<?php echo $image_path; ?>" width="20" alt=""/>
                                </a>
                                <div class="dropdown-menu dropdown-menu-right">
                                    <a href="admin.php" 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>TRANSACTION DETAILS</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);">ADD CREDIT</a></li>
                            <li class="breadcrumb-item active"><a href="javascript:void(0);">TRANSACTION DETAILS</a></li>
                        </ol>
                    </div>
                </div>
				
			<div class="container" style="max-width: 33rem;">
				<div class="card-body text-center">
											<h2 class="text-center">TRANSACTION DETAILS</h2>
						<hr>
						<p>ඕනෑම මුදලක් ඔබට මෙසේ ඔබේ ගිනුමට බැරකරගත ( Topup) හැක.</p><br>
<p>
*ගිනුමට මුදල් බැර (Topup) වීම පැය 2ක් තුල සිදුවේ.<br>
*රිසිට් පතෙහි පරිශිලන නාමය (Username) සදහන් වීම අනිවාර්යයෙන් සිදුකල යුතුවේ.<br>
*දින දෙකකට පසු එවන රිසිට් පත් සදහා ආයතනය කිසිදු වගකීමක් නොදරයි.<br>
*පුද්ගලික ගිනුම් වලට මුදල් තැන්පතු නොකර ආයතනය විසින් ලබාදී ඇති ගිනුම් වලට පමනක් මුදල් තැන්පත් කරන්න.
</p>
<p><b>Deposit or Transfer your payment to our Bank Account &amp; Upload a Photo or Screenshot.</b></p>
<p><b>Sampath Bank</b><br>
<b>Name:</b> L.K.R. Shaminda<br>
<b>Acc No.:</b> 1001 5774 4019<br>
<b>Branch:</b> City Office</p>
<p><b>People's Bank</b><br>
<b>Name:</b> M.A.R.L.Manamendra<br>
<b>Acc No.:</b> 0972 0018 0010 801<br>
<b>Branch:</b> Wijerama</p>
<p><b>BOC Bank</b><br>
<b>Name:</b> M.A.R.L.Manamendra<br>
<b>Acc No.:</b> 70937651<br>
<b>Branch:</b> Homagama</p>
<p><b>LOLC Bank</b><br>
<b>Name:</b> M.A.R.L.Manamendra<br>
<b>Acc No.:</b> 05010004565<br>
<b>Branch:</b> Head Office</p><br>
<p>එසේ නොමැතිනම් online payment මගින්ද ගෙවිම් සිදුකල හැක.</p><br>
<p>ගිණුමට සැමවිටම මුදල් දැමිය යුත්තේ මෙම බැංකු ගිණුම් සඳහා පමණි.</p>
								<table class="table">
									<tbody>
										<tr>
											<td>Reference: 2505</td>
										</tr>
										<tr>
											<td class="text-center">Amount: 100.00</td>
										</tr>
									</tbody>
								</table>
								<br>
								<hr class="border-light"><br>
								<form method="post" enctype="multipart/form-data" id="add_client_frm1" action="#">
									<input type="hidden" name="order_id" class="form-control" value="17503">
									<div>
									</div>
									<div class="wrapper">
										<div class="box">
											<div class="js--image-preview"></div>
											<div class="upload-options">
												<hr>
												<label>
													<h4>UPLOAD BANK SLIP HERE</h4><br>
													<input type="file" id="file1" name="file" class="image-upload" accept="image/jpg, image/jpeg, image/gif, image/png, .pdf" required="">
												</label>
											</div>
										</div>
									</div>
									<br>
									<select class="form-control" id="mngr_bank_acc" name="mngr_bank_acc" required="">
										<option value="">Select Deposit Bank</option>
										<option value="16">SAMPATH BANK</option>
										<option value="17">PEOPLES BANK</option>
										<option value="18">BANK OF CEYLON</option>
										<option value="19">LOLC FINANCE</option>
										</select>
									<br><br>
									<div class="text-center mt-2">
										<input type="submit" class="btn btn-success col" id="btnsave1" name="add_transaction" value="SUBMIT">
									</div>
								</form>
												</div>
			</div>
		
        </div>
        </div>
        <!--**********************************
            Content body end
        ***********************************-->

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

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

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


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

    <?php
	require_once 'footerjs.php';
	?>
    
	
	<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>