403Webshell
Server IP : 64.202.187.69  /  Your IP : 216.73.216.17
Web Server : Apache
System : Linux 69.187.202.64.host.secureserver.net 3.10.0-1160.144.1.el7.tuxcare.els6.x86_64 #1 SMP Fri May 29 16:22:24 UTC 2026 x86_64
User : transmarket ( 1001)
PHP Version : 7.2.34
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/transmarket/testtranslator/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/transmarket/testtranslator/claims.php
<?php
include 'header.php';

error_reporting(E_ALL);
ini_set('display_errors', 1);

require_once('controllers/functions.claims.php');
$claims_obj = new Claims();

$min_tmn_require_to_claim = $claims_obj->getMinimumTmnRequireToClaim();
$max_tmn_can_claim = $claims_obj->getMaximumTmnCanClaim();

?>

<!-- Content Header (Page header) -->
<div class="content-header">
    <div class="container-fluid1" style="position: relative;">
        <div class="row mb-2 align-center">
            <div class="col-sm-6">
                <h1 class="my-3 h1">Claim History</h1>
            </div><!-- /.col -->
            <div class="col-sm-6">
                <ol class="breadcrumb float-sm-right">
                    <li class="breadcrumb-item"><a href="#">Home</a></li>
                    <li class="breadcrumb-item active">Claim History</li>
                </ol>
            </div><!-- /.col -->
        </div><!-- /.row -->
		<?php if ($_SESSION['tm_is_email_verified'] == 0) { ?>
			<small class="verify-info">Verify Email to redeem or mobile topup credits.</small>
		<?php } ?>

    </div><!-- /.container-fluid -->
</div>
<hr class="mb-3">
<!-- /.content-header -->

<!-- Main content -->
<section class="content">
    <div class="container-fluid1">
         <?php
            if ($_SESSION['tm_language_id'] == 0) {
                echo '<p>Please select your language first</p>'
                . '<a href="settings.php" class="btn btn-primary">Go to Settings</a>';
            /*} else if ($_SESSION['tm_is_neo_verified'] == 0) {
                echo '<p>Your NEO address is not verified, please verify</p>'
                . '<a href="settings.php" class="btn btn-primary">Go to Settings</a>';*/
            /*} else if ($_SESSION['tm_is_email_verified'] == 0) {
                echo '<p>Please verify your email address first</p>'
                . '<a href="settings.php" class="btn btn-primary">Go to Settings</a>';*/
            } else {
                ?>
       
		<div class="display-flex align-center mobile-flex-column">
			<h6 style="margin: .375rem;">Current TMN: <span class="current-tmn"><?php echo $_SESSION['tm_credits']; ?> </span></h6>
			
		    <?php if( $_SESSION['tm_credits'] >= $min_tmn_require_to_claim ) {
				if ( $_SESSION['tm_is_email_verified'] == 0 ) { ?>
					<button type="button" class="btn btn-primary btn-disabled btn-redeem" style="background: grey !important; cursor: not-allowed;">Redeem</button>								
				<?php } else { ?>
					<?php if( $_SESSION['tm_is_claim_pending'] == 0 ) { ?>
						<input type="number" id="requested_tmn" placeholder="Redeem TMN" class="form-control col-md-2" /> 
						<!--button type="button" class="btn btn-primary" data-toggle="modal" data-target="#modal-redeem">Redeem</button-->
						<button id="btn_claim_request" type="button" class="btn btn-primary">Redeem</button>
					<?php } ?>
				<?php } ?>				
			<?php } else { ?>
				<button type="button" class="btn btn-primary btn-disabled btn-redeem" style="background: grey !important; cursor: not-allowed;">Redeem</button>				
			<?php } ?>			
			
			
			 <?php
			 if( $_SESSION['tm_credits'] >= $min_tmn_require_to_claim ) {
				if ($_SESSION['tm_is_email_verified'] == 0) { ?>
					<?php if(($_SESSION['tm_country_id'] == 0 || $_SESSION['tm_country_id'] == 160) && $_SESSION['tm_is_topup_pending'] == 0) { ?>
						<button type="button" class="btn btn-primary btn-disabled btn-topup" style="background: grey !important; cursor: not-allowed;">Mobile Topup</button>
					<?php } ?>					
				<?php } else { ?>
					<?php if(($_SESSION['tm_country_id'] == 0 || $_SESSION['tm_country_id'] == 160) && $_SESSION['tm_is_topup_pending'] == 0) { ?>
						<button type="button" class="btn btn-primary btn-modal-topup" data-toggle="modal" data-target="#model-topup">Mobile Topup</button>
					<?php } ?>
				<?php } ?>
			<?php } else { ?>
				<button type="button" class="btn btn-primary btn-disabled btn-topup" style="background: grey !important; cursor: not-allowed;">Mobile Topup</button>
			<?php } ?>
					
		</div> 
            
        <div class="mt-4">
			<!-- Grid column -->
			<div class="col-lg-12 col-md-12 col-sm-12 table-outer">

				<!-- Nav tabs -->
				<ul class="nav md-tabs nav-justified">
				  <li class="nav-item waves-effect waves-light">
					<a class="nav-link active" data-toggle="tab" href="#panel1" role="tab">Mobile Topups History</a>
				  </li>
				  <li class="nav-item waves-effect waves-light">
					<a class="nav-link" data-toggle="tab" href="#panel2" role="tab">Redeem TMNs History</a>
				  </li>
				</ul>
				<!-- Tab panels -->
				<div class="tab-content card">
				  <!-- Panel 1 -->						  
				  <div class="tab-pane fade in show active" id="panel1" role="tabpanel">             
					<div class="table-responsive" style="overflow: scroll;">
						<table id="dataTable1" class="dataTable table table-bordered table-hover">
							<thead>
								<tr>
									<th>Operator</th>
									<th>Package</th>
									<th>TMN claimed</th>
									<th>Claimed On</th>
									<th>Status</th>
								</tr>
							</thead>
							<tbody></tbody>
						</table>                   
					</div>
				  </div>
				  <!-- Panel 1 -->
				  <!-- Panel 2 -->
				  <div class="tab-pane fade" id="panel2" role="tabpanel">              
					<div class="table-responsive" style="overflow: scroll;">
						<table id="dataTable" class="dataTable table table-bordered table-hover">
							<thead>
								<tr>
									<th>TMN claimed</th>
									<th>Claimed On</th>
									<th>Status</th>
									<th>Coz Transaction ID</th>
								</tr>
							</thead>
							<tbody></tbody>
						</table>             
					</div>
				  </div>
				  <!-- Panel 2 -->             
				</div>

			</div>
			<!-- Grid column -->
				
		</div><!-- /.container-fluid -->
        <?php } ?>
        <!-- /.row (main row) -->   
	</div><!-- /.container-fluid -->
</section>
<!-- /.content -->
</div>
<div class="modal fade" id="model-topup" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg modal-notify modal-info" role="document">
	<!-- Content -->
	<div class="modal-content">
	  <!-- Header -->
	  <div class="modal-header bkcolor-theme">
		<p class="heading lead">Mobile Topups</p>

		<button type="button" class="close" data-dismiss="modal" aria-label="Close">
		  <span aria-hidden="true" class="white-text">&times;</span>
		</button>
	  </div>

	  <!-- Body -->
	  <div class="modal-body">
		<!-- Main row -->
		<div class="row">
			<div class="step1">
			<?php 
			if($_SESSION['tm_country_id'] == 0 || $_SESSION['tm_phone'] == '') { ?>
				<?php if($_SESSION['tm_phone'] == '') { ?>
					<div class="md-form input-group mb-3">
						<div class="row width-100">
							<div class="col-sm-4">
							  <div class="input-group-prepend">
								<span class="input-group-text md-addon" id="inputGroupMaterial-sizing-default">Cell Phone Number</span>
							  </div>
							</div>									
							<div class="col-sm-8 phone-div">
								<input type="text" class="form-control" id="phone" autocomplete="off" value="<?php echo $_SESSION['tm_phone']; ?>" placeholder="+1234567890" aria-label="Sizing example input" aria-describedby="inputGroupMaterial-sizing-default">
							</div>
						</div>
					</div>	
				<?php } ?>
				<?php if($_SESSION['tm_country_id'] == 0) { ?>
					<div class="md-form input-group mb-3">
						<div class="row width-100">
							<div class="col-sm-4">
							  <div class="input-group-prepend">
								<span class="input-group-text md-addon" id="inputGroupMaterial-sizing-default">Country</span>
							  </div>
							</div>
							<div class="col-sm-8 country-div">
								<select class="mdb-select md-form" id="country">
									<?php 
									$only = 1;
									include 'controllers/get_countries.php'; ?>
								</select>
							</div>
						</div>
					</div>	
				<?php } ?>	
				<div class="text-center mt-5 mb-5" style="margin: auto;"><small style="color: red;">Please confirm your Cell Phone Number and country. Mobile Topup is only applicable to South Africa.</small></div>
				<div class="modal-footer">
					<a type="button" class="btn btn-outline-info waves-effect" data-dismiss="modal">Cancel</a>
					<a type="button" class="btn btn-info" id="btn-save-contact">Next</a>					
				</div>
			<?php } else { ?>
				<div class="text-center">
					<i class="fas fa-check fa-4x mb-3 animated rotateIn color-theme"></i>
					<p>Mobile Topup is only applicable to South Africa.</p>
				
					<p>Cell Phone Number - <b><?php echo $_SESSION['tm_phone'];?></b></p>
					<p>Country - <b><?php echo $_SESSION['tm_country_name'];?></b></p>
					
					<fieldset class="form-check mt-0 pl-0 mb-3">
						<input class="form-check-input warning-checkbox" type="checkbox" id="checkbox2">
						<label class="form-check-label" for="checkbox2"><span style="font-size: 14px; color: #000000;">Please confirm your Cell Phone Number and country.</span></label>
					</fieldset>
				</div>
				<div class="modal-footer">
					<a type="button" class="btn btn-outline-info waves-effect" data-dismiss="modal">Cancel</a>
					<a type="button" class="btn btn-info btn-disabled" disabled id="btn-check">Next</a>					
				</div>
			<?php } ?>
			</div>
			<div class="step2" style="display:none;">
				<div class="row mb-4">
					<input type="hidden" id="topup_tmn" value="0">
					<input type="hidden" id="topup_package_id" value="0">
					<?php include("controllers/get_packages.php");?>						 
				</div>
				<div class="modal-footer">
					<a type="button" class="btn btn-outline-info waves-effect" data-dismiss="modal">No, thanks</a>
					<a type="button" class="btn btn-info btn-disabled" disabled id="btn-redeem-topup">Get it now</a>
				</div>
			</div>
		</div>
	  </div>
	  </div>
	<!-- Content -->
  </div>
</div>

<div class="modal fade" id="modal-redeem">
    <div class="modal-dialog modal-sm modal-notify modal-info" role="document">
        <div class="modal-content">
			<div class="modal-header bkcolor-theme">
                <p class="heading lead">Redeem TMN</p>

                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                  <span aria-hidden="true" class="white-text">&times;</span>
                </button>
              </div>
            <div class="modal-body">
                <span>Are you sure you want to redeem <?php echo $_SESSION['tm_credits'];?> TMN?</span>
            </div>
            <div class="modal-footer justify-content-between">
                <button type="button" class="btn btn-primary" id="btn-yes">Redeem</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- /.modal -->


<!-- /.content-wrapper -->
<?php include 'footer.php'; ?>
<script>
		$('.warning-checkbox').change(function () {
            if (this.checked) {
                $("#btn-check").removeClass('btn-disabled').attr('disabled', false);
            } else {
                $("#btn-check").addClass('btn-disabled').attr('disabled', true);
            }
        });
        initialiseDatatable();
        function initialiseDatatable() {
            $('#dataTable').dataTable().fnDestroy();
            // $('.claim-list').html('');
            // if ($.fn.dataTable.isDataTable('.dataTable')) {
            //     $('.dataTable').DataTable().clear().destroy();
            // }
             $('#dataTable').DataTable({
                language: {
                    searchPlaceholder: "Search"
                },
				"pagingType": "first_last_numbers",
                "processing": true,
                "bDestroy": true,
                "serverSide": true,
                "bAutoWidth": false,
                "searching": true,
                "destroy": true,
                "columnDefs": [
                    {
                        "targets": [0],
                        "searchable": true,
                        "orderable": true,
                        "visible": true,
                    }, {
                        "targets": [1],
                        "searchable": true,
                        "orderable": true,
                        "visible": true,
                    }, {
                        "targets": [2],
                        "searchable": false,
                        "orderable": false,
                        "visible": true,
                    }, {
                        "targets": [3],
                        "searchable": false,
                        "orderable": false,
                        "visible": true,
                    }
                ],
                "order": [
                    [1, "desc"]
                ],
                "lengthMenu": [[25, 50, 100, 200], [25, 50, 100, 200]],
                "ajax": {
                    url: "controllers/get_claim_history.php", // json datasource
                    type: "post",
                    data: {
                    },
                    error: function () {
                        $(".claim-list").append('<tr><td colspan="4">No data found</td></tr>');
                    }
                }
            });
            $('input[type="search"]').addClass('txt-search');
        }
		
		initialiseDatatable1();
        function initialiseDatatable1() {
            $('#dataTable1').dataTable().fnDestroy();
            // $('.claim-list').html('');
            // if ($.fn.dataTable.isDataTable('.dataTable')) {
            //     $('.dataTable').DataTable().clear().destroy();
            // }
             $('#dataTable1').DataTable({
                language: {
                    searchPlaceholder: "Search"
                },
				"pagingType": "first_last_numbers",
                "processing": true,
                "bDestroy": true,
                "serverSide": true,
                "bAutoWidth": false,
                "searching": true,
                "destroy": true,
                "columnDefs": [
                    {
                        "targets": [0],
                        "searchable": true,
                        "orderable": true,
                        "visible": true,
                    }, {
                        "targets": [1],
                        "searchable": true,
                        "orderable": true,
                        "visible": true,
                    }, {
                        "targets": [2],
                        "searchable": false,
                        "orderable": true,
                        "visible": true,
					}, {
                        "targets": [3],
                        "searchable": false,
                        "orderable": true,
                        "visible": true,
					}, {
                        "targets": [4],
                        "searchable": false,
                        "orderable": false,
                        "visible": true,
                    }
                ],
                "order": [
                    [2, "desc"]
                ],
                "lengthMenu": [[25, 50, 100, 200], [25, 50, 100, 200]],
                "ajax": {
                    url: "controllers/get_topup_history.php", // json datasource
                    type: "post",
                    data: {
                    },
                    error: function () {
                        $(".claim-list").append('<tr><td colspan="3">No data found</td></tr>');
                    }
                }
            });
            $('input[type="search"]').addClass('txt-search');
        }
        
        
       /*$("#btn-yes").click(function () {
			$(this).html('<span class="spinner-border spinner-border-sm mr-2" role="status" aria-hidden="true"></span>Loading...').attr('disabled', true);
			$.ajax({url: 'controllers/redeem_tmn.php',
				data: {
				   claim:1,
				},
				type: 'post',
				dataType: 'JSON',
				context:this,
				success: function (output) {
					$('#modal-redeem').modal('hide');
					if (output.status == 200) {
						toastr.success(output.msg);
						setTimeout(function(){ window.location.reload(); }, 1500);                           
					} else {
						toastr.error(output.msg);
					}
				}
			});
			$(this).html('Redeem').attr('disabled', false);            
        });*/
		
		$("#btn_claim_request").click(function () {
			
			var requested_tmn_val = $("#requested_tmn").val();
			var min_tmn_required = '<?php echo $min_tmn_require_to_claim; ?>';
			var max_tmn_claim = '<?php echo $max_tmn_can_claim; ?>';
			var translator_balance = '<?php echo $_SESSION['tm_credits']; ?>';
			var neo3_address = '<?php echo $_SESSION['tm_neo3']; ?>';
			
			if( neo3_address != '' ) {
			
				if( requested_tmn_val > 0 && requested_tmn_val !='' ) {
					
					if( requested_tmn_val >= min_tmn_required && requested_tmn_val <= max_tmn_claim ) {
						
						if( requested_tmn_val <= translator_balance ) {
					
							$(this).html('<span class="spinner-border spinner-border-sm mr-2" role="status" aria-hidden="true"></span>Loading...').attr('disabled', true);
							$.ajax({url: 'controllers/redeem_tmn.php',
								data: {
									claim:1,	
									requested_tmn: requested_tmn_val,
								},
								type: 'post',
								dataType: 'JSON',
								context:this,
								success: function (output) {
									//$('#modal-redeem').modal('hide');
									if (output.status == 200) {
										toastr.success(output.msg);
										setTimeout(function(){ window.location.reload(); }, 1500);                           
									} else {
										toastr.error(output.msg);
									}
								}
							});
							$(this).html('Redeem').attr('disabled', false); 
							
						} else {
							toastr.error("You do not have sufficient TMN to claim.");
						}
					
					} else {
						toastr.error("Requested tmn should be more than " + min_tmn_required + " and less than " + max_tmn_claim );
					}
					
				} else {
					toastr.error("Please fill redeem tmn");
				}
				
			} else {
				toastr.error("Please fill neo3 address on Settings page.");
			}
			
        });
		
		$("#btn-redeem-topup").click(function () {
			var old_credits = '<?php echo $_SESSION["tm_credits"]?>';
			var new_credits = $("#topup_tmn").val();
			if(new_credits <= old_credits) {
				$(this).html('<span class="spinner-border spinner-border-sm mr-2" role="status" aria-hidden="true"></span>Loading...').attr('disabled', true);
				$.ajax({url: 'controllers/redeem_topup_tmn.php',
					data: {
					   tmn: $("#topup_tmn").val(),
					   package_id: $("#topup_package_id").val(),
					},
					type: 'post',
					dataType: 'JSON',
					context:this,
					success: function (output) {
						$('#modal-redeem').modal('hide');
						if (output.status == 200) {
							toastr.success(output.msg);
							setTimeout(function(){ window.location.reload(); }, 1500);                           
						} else {
							toastr.error(output.msg);
						}
					}
				});
				$(this).html('Get it now').attr('disabled', false);
			} else {
				toastr.error("You do not have sufficient TMN\'s to use this mobile topup");
			}				
        });		
        
        $(".btn-redeem").click(function () {
			var min_tmn_require_to_claim = '<?php echo $min_tmn_require_to_claim; ?>';
            <?php if($_SESSION['tm_is_claim_pending'] == 0) {?>
                toastr.error('You should have atleast ' + min_tmn_require_to_claim + ' TMN\'s to redeem.');
            <?php } else { ?>
                toastr.error('Please wait for your previous claim to clear out.');
            <?php } ?>
        });
		
		$(".btn-topup").click(function () { 
			var min_tmn_require_to_claim2 = '<?php echo $min_tmn_require_to_claim; ?>';
            <?php if($_SESSION['tm_is_claim_pending'] == 0) {?>
                toastr.error('You should have atleast ' + min_tmn_require_to_claim2 + ' TMN\'s to use mobile topup.');
            <?php } else { ?>
                toastr.error('Please wait for your previous claim to use mobile topup.');
            <?php } ?>
        });
		
		
		$("#btn-check").click(function () {
			if (!$('#btn-check').hasClass('btn-disabled')) {
				$(".step1").css("display","none");
				$(".step2").css("display","block");
			}
		});
		
		$(".btn-modal-topup").click(function () {
			$(".step1").css("display","block");
			$(".step2").css("display","none");
			$('#checkbox2').prop('checked', false); // Unchecks it
			$("#btn-check").addClass('btn-disabled').attr('disabled', true);
		});	
		
		$(".package-box").click(function () {
			$("#topup_tmn").val($(this).attr("data-tmn"));
			$("#topup_package_id").val($(this).attr("data-packageid"));
			$(".package-box").removeClass("selected");
			$(this).addClass("selected");
			$("#btn-redeem-topup").removeClass('btn-disabled').attr('disabled', false);
		});	
		
		$("#btn-save-contact").click(function () {
			var isValidation = true;
			var message = 'Please fill the details.';      
			var phone = $("#phone").val().trim();       
			var country = $("#country").val().trim();
			if (phone == "") {
				isValidation = false;
				message = "Please enter Cell Phone Number.";
			}
			if (country == 0) {
				isValidation = false;
				message = "Please select Country";
			}
			if (isValidation) {
				$(this).html('<span class="spinner-border spinner-border-sm mr-2" role="status" aria-hidden="true"></span>Loading...').attr('disabled', true);
				$.ajax({url: 'controllers/save_contact.php',
					data: {
						phone: phone,
						country_id: country
					},
					type: 'post',
					dataType: 'JSON',
					context:this,
					success: function (output) {
						$('#modal-redeem').modal('hide');
						if (output.status == 200) {
							$(".step1").css("display","none");
							$(".step2").css("display","block");                           
						} else {
							toastr.error(output.msg);
						}
					}
				});
				$(this).html('Redeem').attr('disabled', false);   
			}  else {
				toastr.error(message);
			}			
        });
</script>

Youez - 2016 - github.com/yon3zu
LinuXploit