| Current Path : /home2/wtmwscom/www/member/ |
| Current File : /home2/wtmwscom/www/member/index.php |
<?php
$title = "Dashboard";
include 'header.php';
$uid = $_SESSION['userid'];
$total_give_help = mysqli_fetch_object(mysqli_query($connection, "SELECT SUM(amount) as amount FROM commit WHERE uid='$uid' AND lock_status=0"))->amount;
if (!$total_give_help) {
$total_give_help = 0;
}
$confirm_give_help = mysqli_fetch_object(mysqli_query($connection, "SELECT SUM(amount) as amount FROM commit WHERE uid='$uid' AND confirm_status=1"))->amount;
if (!$confirm_give_help) {
$confirm_give_help = 0;
}
$total_get_help = mysqli_fetch_object(mysqli_query($connection, "SELECT SUM(amount) as amount FROM help WHERE receive_uid='$uid' AND lock_status=0"))->amount;
if (!$total_get_help) {
$total_get_help = 0;
}
$confirm_get_help = mysqli_fetch_object(mysqli_query($connection, "SELECT SUM(amount) as amount FROM help WHERE receive_uid='$uid' AND confirm_status=1"))->amount;
if (!$confirm_get_help) {
$confirm_get_help = 0;
}
/*
$total_business_give_help = 0;
$confirm_business_give_help = 0;
$child_ids = get_child_ids_1($uid);
$child_levels = get_child_levels($child_ids);
foreach($child_levels as $key => $value){
$sum_total_business = mysqli_fetch_object(mysqli_query($connection,"SELECT SUM(amount) as amount FROM commit WHERE uid='$value' AND lock_status=0"))->amount;
if($sum_total_business){$sum_total_business = $sum_total_business;}else{$sum_total_business = 0;}
$sum_confirm_business = mysqli_fetch_object(mysqli_query($connection,"SELECT SUM(amount) as amount FROM commit WHERE uid='$value' AND confirm_status=1"))->amount;
if($sum_confirm_business){$sum_confirm_business = $sum_confirm_business;}else{$sum_confirm_business = 0;}
$total_business_give_help = $total_business_give_help+$sum_total_business;
$confirm_business_give_help = $confirm_business_give_help+$sum_confirm_business;
} */
$pin_amount_array = array(2 => 250, 3 => 500, 4 => 750, 5 => 1250, 6 => 2500, 7 => 5000, 8 => 7500, 9 => 10000, 10 => 12500, 11 => 25000);
$provide_help_amount_array = array(2 => 1000, 3 => 2000, 4 => 3000, 5 => 5000, 6 => 10000, 7 => 20000, 8 => 30000, 9 => 40000, 10 => 50000, 11 => 100000);
$plan_type = mysqli_fetch_object(mysqli_query($connection, "SELECT plan_type FROM user where uid = '$uid'"))->plan_type;
?>
<link href="../static/backend/css/button.css" rel="stylesheet" type="text/css">
<div class="container-fluid">
<div class="row">
<div class="col-sm-12">
<div class="page-title-box">
<h4>Welcome <?php echo $_SESSION['name'] . " (" . $_SESSION['loginid'] . ")"; ?></h4>
<!--<div class="page-title-box">-->
<h4 class="page-title">Referral Links</h4>
<div>
<strong><a href="http://<?php echo $_SERVER['SERVER_NAME']; ?>/register.php?loginid=<?php echo $_SESSION['loginid']; ?> "target="_blank" title="Friends Invite Link">http://<?php echo $_SERVER['SERVER_NAME']; ?>/register.php?loginid=<?php echo $_SESSION['loginid']; ?></a></strong><br>
</div>
<!--</div>-->
<?php echo getMessage(); ?>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="javascript:void(0);">Home</a></li>
<li class="breadcrumb-item"><a href="javascript:void(0);">Index</a></li>
<!-- <li class="breadcrumb-item active">Outbox</li>-->
</ol>
<u><h5 style="color:red"><?php echo "Pin Package Amount ".$pin_amount_array[$plan_type]." Provide help Amount ".$provide_help_amount_array[$plan_type];?></h5></u>
</div>
</div>
</div>
<div class="row">
<div class="col-xl-3 col-md-6">
<div class="card mini-stat bg-info">
<div class="card-body mini-stat-img">
<div class="mini-stat-icon">
<i class="mdi mdi-account-circle float-right"></i>
</div>
<div class="text-white">
<h6 class="text-uppercase mb-3">Total Provide Help</h6>
<center><b><p><?php echo $total_give_help . "Rs."; ?> </p></b></center>
<!--<span class="badge badge-info"> +11% </span> <span class="ml-2"><a href="view_profile.php" class="btn btn-info active pull-right" role="button" >View Profile</a></span>-->
</div>
</div>
</div>
</div>
<div class="col-xl-3 col-md-6">
<div class="card mini-stat bg-danger">
<div class="card-body mini-stat-img">
<div class="mini-stat-icon">
<i class="mdi mdi-buffer float-right"></i>
</div>
<div class="text-white">
<h6 class="text-uppercase mb-3">Confirm Provide Help</h6>
<center><b><p><?php echo $confirm_give_help . "Rs."; ?> </p></b></center>
</div>
</div>
</div>
</div>
<div class="col-xl-3 col-md-8">
<div class="card mini-stat bg-primary">
<div class="card-body mini-stat-img">
<div class="mini-stat-icon">
<i class="mdi mdi-account-multiple float-right"></i>
</div>
<div class="text-white">
<h6 class="text-uppercase mb-3">Total Get Help</h6>
<center><b><p><?php echo $total_get_help . "Rs."; ?> </p></b></center>
</div>
</div>
</div>
</div>
<div class="col-xl-3 col-md-6">
<div class="card mini-stat bg-success">
<div class="card-body mini-stat-img">
<div class="mini-stat-icon">
<i class="mdi mdi-account-card-details float-right"></i>
</div>
<div class="text-white">
<h6 class="text-uppercase mb-3">Confirm Get Help</h6>
<center><b><p><?php echo $confirm_get_help . "Rs."; ?> </p></b></center>
</div>
</div>
</div>
</div>
</div>
<!-- end row -->
<div class="row">
<!-- <div class="col-xl-6">
<div class="card widget-user m-b-20">
<div class="widget-user-desc p-4 text-center bg-info position-relative">
<i class="fas fa-quote-left h3 text-white-50"></i>
<p class="text-white mb-0">Activate Pin </div>
<div class="p-4">
<div class="float-left mt-2 mr-3">
<img src="assets/images/users/user-2.jpg" alt="" class="rounded-circle thumb-md">
</div>
<h6 class="mb-1">Marie Minnick</h6>
<p class="text-muted mb-0">Marketing Manager</p>
<?php //if (isset($_SESSION['is_paid']) && $_SESSION['is_paid'] == 0) { ?>
<h4>Activate member account</h4>
<button class="btn btn-success" data-toggle="modal" data-target="#myModal">Click here to activate by pin</button>
<?php
//}
//else {
?>
<h4>Upgrade your account</h4>
<button class="btn btn-success" onclick="upgrade_user_plan()">Click here to upgrade your account</button>
<?php //} ?>
</div>
</div>
<div class="card m-b-20">
<div class="card-body">
<h4 class="mt-0 header-title">Yearly Sales</h4>
<div class="row">
<div class="col-md-4">
<div>
<h4>52,345</h4>
<p class="text-muted">The languages only differ grammar</p>
<a href="#" class="text-primary">Learn more <i class="mdi mdi-chevron-double-right"></i></a>
</div>
</div>
<div class="col-md-8 text-right">
<div id="sparkline"></div>
</div>
</div>
</div>
</div>
</div>-->
<div class="col-xl-6">
<div class="card widget-user m-b-20">
<div class="widget-user-desc p-4 text-center bg-danger position-relative">
<i class="fas fa-quote-left h3 text-white-50"></i>
<p class="text-white mb-0">Provide Help</div>
<div class="p-4">
<center> <a href="provide_help.php" class="button large gradient orange"> ⇒ Provide Help</a></center>
</div>
</div>
</div>
<div class="col-xl-6">
<div class="card widget-user m-b-20">
<div class="widget-user-desc p-4 text-center bg-success position-relative">
<i class="fas fa-quote-left h3 text-white-50"></i>
<p class="text-white mb-0">Get Help</div>
<div class="p-4">
<center><a href="receive_help.php" class="button large gradient blue"> ⇒ Get Help</a></center>
</div>
</div>
</div> <!-- end col -->
<!-- <div class="col-6">
<div class="card widget-user m-b-5">
<div class="card widget-user m-b-5">
<div class="widget-user-desc p-4 text-center bg-danger position-relative">
<i class="fas fa-quote-left h6 text-white-50"></i>
<p class="text-white mb-0">Search From Date</div>
<div class="card m-b-10">
<div class="card-body">
<div class="card-body">
<form class="form-inline" id="search-form" >
<div class="form-group " >
<label class="form-control " > From Date: </label>
<input type="text" class="form-control datepicker" placeholder="From date" name="from_date" autocomplete="off">
</div>
<div class="form-group">
<label class="form-control "> To date: </label>
<input type="text" class="form-control datepicker" placeholder="To date" name="to_date" autocomplete="off" >
</div>
<button type="submit" class="btn btn-primary">Search</button>
</form>
</div>
</div>
</div>
</div>
</div> end col
</div>-->
</div>
<!-- <div class="row">
<div class="col-xl-6">
<div class="card widget-user m-b-20">
<div class="widget-user-desc p-4 text-center bg-primary position-relative">
<i class="fas fa-quote-left h3 text-white-50"></i>
<p class="text-white mb-0">Provide Help</div>
<div class="p-4">
<center> <a href="provide_help.php" class="button large gradient orange"> ⇒ Provide Help</a></center>
</div>
</div>
</div>
<div class="col-xl-6">
<div class="card widget-user m-b-20">
<div class="widget-user-desc p-4 text-center bg-primary position-relative">
<i class="fas fa-quote-left h3 text-white-50"></i>
<p class="text-white mb-0">Get Help</div>
<div class="p-4">
<center><a href="receive_help.php" class="button large gradient blue"> ⇒ Get Help</a></center>
</div>
</div>
</div> end col
</div>-->
<div class="row">
<?php
$rs = mysqli_query($connection, "SELECT commit_id, amount, amount_2, confirm_status, datetime FROM commit WHERE uid='$uid'");
while ($give = mysqli_fetch_object($rs)) {
?>
<div class="col-xl-3 col-md-6">
<div class="trequest">
<div class="getrequest">
<h5>Provide help <img style="height:10px;width:10px;" src="images/arrow_up.png" /></h5>
<p>
<small>Total Amount: <b><?php echo $give->amount; ?>/-</b></small>
<br>
<small>Amount provided: <b><?php echo $give->amount - $give->amount_2; ?>/-</b></small>
<br>
<small>Request No. <?php echo $give->commit_id ?></small><br/>
<small>Status: <?php echo $give->confirm_status == 1 ? "Order processed" : "Order Queued" ?></small>
<br/>
<small>Date: <?php echo date("d M,Y H:i A", strtotime($give->datetime)); ?></small><br/>
<?php if ($give->amount == $give->amount_2) { ?>
<small><a href="javascript:void;" onclick="if (confirm('Are you sure you want to cancel provide help?')) {
window.location = './provide_help_cancel.php?commit_id=<?php echo $give->commit_id; ?>';
}">Cancel provide help</a></small>
<?php } ?>
</p>
</div>
</div>
</div>
<?php } ?>
<?php
$rs2 = mysqli_query($connection, "SELECT uid, amount, balance, datetime FROM request_amount WHERE uid='$uid' ORDER BY datetime DESC");
while ($receive = mysqli_fetch_object($rs2)) {
// $count_refer_id = mysqli_fetch_object(mysqli_query($connection, "SELECT count(uid) AS count FROM user WHERE refer_id = '$receive->uid' AND is_paid = 1 "))->count;
$help_amount_sum = mysqli_fetch_object(mysqli_query($connection, "SELECT sum(amount) AS amount FROM help where confirm_status = 1 AND give_uid in (SELECT uid FROM user WHERE refer_id = '$receive->uid' AND is_paid = 1) "))->amount;
if($help_amount_sum >= 6000 ){
// if($count_refer_id >= 2){
?>
<div class="col-xl-3 col-md-6">
<div class="trequest">
<div class="giverequest">
<h5>Get help <img style="height:10px;width:10px;" src="../static/backend/member/images/arrow_down.png" /></h5>
<p>
<small>Amount: <b><?php echo $receive->amount; ?>/-</b></small>
<br>
Date: <small><?php echo date("d M,Y H:i A", strtotime($receive->datetime)); ?></small>
</p>
</div>
</div>
</div>
<?php } } ?>
</div>
</div>
<section style="float: left; width: 82%;">
<?php
$result = mysqli_query($connection, "SELECT help_id, commit_id, give_uid, r_commit_id, receive_uid, amount, datetime, confirm_status, lock_status, extend, status FROM help WHERE give_uid='" . $uid . "' OR receive_uid='" . $uid . "'");
if (mysqli_num_rows($result)) {
$i = 1;
while ($row = mysqli_fetch_object($result)) {
$donar = mysqli_fetch_object(mysqli_query($connection, "SELECT * FROM user WHERE uid='" . $row->give_uid . "'"));
$donar_sponsor = mysqli_fetch_object(mysqli_query($connection, "SELECT uid, login_id, name, email, mobile FROM user WHERE uid='" . $donar->refer_id . "'"));
$receiver = mysqli_fetch_object(mysqli_query($connection, "SELECT * FROM user WHERE uid='" . $row->receive_uid . "'"));
$receiver_sponsor = mysqli_fetch_object(mysqli_query($connection, "SELECT uid, login_id, name, email, mobile FROM user WHERE uid='" . $receiver->refer_id . "'"));
//$hours = 120+$row->extend;
$hours = 36 + $row->extend; //modified by jay
$date = new DateTime($row->datetime);
$date->modify("+" . $hours . " hours");
$timeIn = $date->format('Y-m-d H:i:s');
$hourdiff = round((strtotime($timeIn) - time()) / 3600, 1);
//$hourdiff = $hourdiff<0?0:$hourdiff;
$message_count = mysqli_fetch_object(mysqli_query($connection, "SELECT COUNT(help_id) as count FROM bank_receipt WHERE help_id='$row->help_id'"))->count;
if ($message_count) {
$message_count = $message_count;
} else {
$message_count = 0;
}
?>
<div class="container-fluid">
<div class="row" style="width:800px; height:150px">
<!--<div class="col-15">-->
<div class="torder">
<div class="firstsection">
<span title="Click To Accept" id="opener<?php echo $i ?>" onclick="viewMyModal(<?php echo $i ?>)">
<?php if ($row->confirm_status == 1) { ?>
<img style="height:70px; width:60px;" src="../static/backend/member/images/light_1.png">
<?php } elseif ($row->lock_status == 1) {
?>
<img style="height:70px; width:60px;" src="../static/backend/member/images/light_0.png">
<?php } elseif ($row->lock_status == 0 && $row->status == 0 && $row->confirm_status == 0) {
?>
<img style="height:70px; width:60px;" src="../static/backend/member/images/light_2.png"><?php } elseif ($row->lock_status == 0 && $row->status == 1 && $row->confirm_status == 0) {
?>
<img style="height:70px; width:60px;" src="../static/backend/member/images/light_3.png">
<?php } ?>
</span><br />
<strong><span><?php echo $row->help_id; ?></span></strong>
</div>
<div class="secondsection">
<img src="../static/backend/member/images/clock.png" class="clock">
<?php
if ($row->confirm_status != 1) {
if ($row->lock_status != 1) {
?>
<span class="timer">
<strong>Remaining Hours: </strong>
<?php if ($row->receive_uid == $uid) { ?>
(<a href="#" title="Click To Extend Time" onclick="processExtend(<?php echo $row->help_id; ?>);"><b>Extend Time</b></a>)
<?php } ?>
</span>
<span style="color : red" id="countdown-<?php echo $row->help_id;?>" class="timer-countdown" data-time="<?php echo (strtotime($timeIn) - time()); ?>"></span>
<?php
}
}
?>
<a class="tmessage openDialog" href="messages.php?help_id=<?php echo $row->help_id; ?>">Messages: <?php echo $message_count; ?></a>
</div>
<div class="secondsection">
<div>
<small>Date of creating</small>
<br>
<b><span>
<?php echo date("d M,Y", strtotime($row->datetime)); ?>
<br />
<?php echo date("H:i A", strtotime($row->datetime)); ?>
</span>
</b>
</div>
<div class="from">
<b style="color:red">Sender</b><br>
<b><?php echo $donar->name; ?></b>
<br>
<small><?php echo $donar->login_id; ?></small><br>
<small><?php echo $donar->mobile; ?></small><br>
<small><?php echo $donar->bank_name; ?></small>
<br>
<small><?php echo $donar->account_number; ?></small>
<br>
<small><?php echo $donar->ifsc; ?></small>
<br>
</div>
<div class="from">
<h4>
<span><?php echo $row->amount . "/-"; ?></span>
<!-- <span>/-</span>-->
</h4>
</div>
<div>
<b style="color:red">Reciever</b><br>
<b><?php echo $receiver->name; ?></b>
<br>
<small><?php echo $receiver->login_id; ?></small><br>
<small><?php echo $receiver->mobile; ?></small><br>
<small><?php echo $receiver->bank_name; ?></small>
<br>
<small><?php echo $receiver->account_number; ?></small>
<br>
<small><?php echo $receiver->ifsc; ?></small>
<br>
<!--<small><?php // echo $receiver->mobile; ?></small>-->
</div>
</div>
</div>
<!--</div>-->
</div>
</div>
<!-- Modal -->
<div id="myModal-<?php echo $i; ?>" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg" >
<div class="modal-content">
<!--<form class="form-horizontal" method="post">-->
<div class="modal-header">
<h5 class="modal-title mt-0" id="myModalLabel">Information</h5>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div class="modal-body">
<!--<h5>Information</h5>-->
<div>
<table class="table table-bordered">
<thead>
<tr>
<th>Request Number:</th>
<th><?php echo $row->help_id; ?></th>
<th>Request Amount:</th>
<!--<th><?php echo "INR " . $row->amount . " | $ " . $amount_in_usd . " | BTC " . round($priceOfYourItemBTC, 4); ?></td>-->
<th><?php echo "INR " . $row->amount; ?></td>
</tr>
</thead>
</table>
</div>
<div>
<table class="table table-bordered table-striped table-hover" >
<thead>
<tr>
<th colspan="2"></th>
</tr>
</thead>
<tbody>
<tr >
<td>Donor Info</td>
<td><?php echo $donar->name . " (" . $donar->mobile . ")"; ?></td>
</tr>
<tr >
<td>Donor Contact Info</td>
<td><?php echo $donar->address . ' ' . $donar->city . ' , ' . $donar->country . ", Mo: $donar->mobile"; ?></td>
</tr>
<tr >
<td>Donor Sponsor Info</td>
<td><?php echo $donar_sponsor->name . " (" . $donar_sponsor->mobile . ")"; ?></td>
</tr>
</tbody>
<thead>
<tr>
<th colspan="2"></th>
</tr>
</thead>
<tbody>
<tr class="light">
<td>Accepter Info</td>
<td><?php echo $receiver->name . " (" . $receiver->mobile . ") "; ?></td>
</tr>
<tr class="dark">
<td>Receiver Contact Info</td>
<td><?php echo $receiver->address . ' ' . $receiver->city . ' , ' . $receiver->country . ", Mo: $receiver->mobile"; ?></td>
</tr>
<tr class="light">
<td>Accepter Sponsor Info</td>
<td><?php echo $receiver_sponsor->name . " (" . $receiver_sponsor->mobile . ")"; ?></td>
</tr>
</tbody>
<thead>
<tr>
<th colspan="2"></th>
</tr>
</thead>
<tbody>
<tr class="light">
<td>Requested Date</td>
<td><?php echo date("d M,Y H:i A", strtotime($row->datetime)); ?></td>
</tr>
<tr class="dark">
<td>Expiry date</td>
<td><?php echo date("d M,Y H:i A", strtotime($timeIn)); ?></td>
</tr>
</tbody>
</table>
</div>
<div class="top">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th colspan="2" style="text-align: left;">Bank Details</th>
</tr>
</thead>
<tbody>
<!-- <tr class="dark">
<td>Bitcoin</td>
<td><?php
if ($row->receive_uid == $uid) {
echo $donar->bitcoin;
} elseif ($row->give_uid == $uid) {
echo $receiver->bitcoin;
}
?></td>
</tr>-->
<tr class="light">
<td>Paytm</td>
<td><?php
if ($row->receive_uid == $uid) {
echo $donar->paytm;
} elseif ($row->give_uid == $uid) {
echo $receiver->paytm;
}
?></td>
</tr>
<tr class="dark">
<td>G Pay</td>
<td><?php
if ($row->receive_uid == $uid) {
echo $donar->g_pay;
} elseif ($row->give_uid == $uid) {
echo $receiver->g_pay;
}
?></td>
</tr>
<tr class="light">
<td>Phone Pay</td>
<td><?php
if ($row->receive_uid == $uid) {
echo $donar->phone_pay;
} elseif ($row->give_uid == $uid) {
echo $receiver->phone_pay;
}
?></td>
</tr>
<tr class="dark">
<td>Account Holder Name</td>
<td><?php
if ($row->receive_uid == $uid) {
echo $donar->account_holder_name;
} elseif ($row->give_uid == $uid) {
echo $receiver->account_holder_name;
}
?></td>
</tr>
<tr class="dark">
<td>Bank Name</td>
<td><?php
if ($row->receive_uid == $uid) {
echo $donar->bank_name;
} elseif ($row->give_uid == $uid) {
echo $receiver->bank_name;
}
?></td>
</tr>
<tr class="light">
<td>Branch Name</td>
<td><?php
if ($row->receive_uid == $uid) {
echo $donar->branch_name;
} elseif ($row->give_uid == $uid) {
echo $receiver->branch_name;
}
?></td>
</tr>
<tr class="dark">
<td>Account Number</td>
<td><?php
if ($row->receive_uid == $uid) {
echo $donar->account_number;
} elseif ($row->give_uid == $uid) {
echo $receiver->account_number;
}
?></td>
</tr>
<tr class="light">
<td>Account Type</td>
<td><?php
if ($row->receive_uid == $uid) {
echo $donar->account_type;
} elseif ($row->give_uid == $uid) {
echo $receiver->account_type;
}
?></td>
</tr>
<tr class="dark">
<td>IFSC Code</td>
<td><?php
if ($row->receive_uid == $uid) {
echo $donar->ifsc;
} elseif ($row->give_uid == $uid) {
echo $receiver->ifsc;
}
?></td>
</tr>
<?php /*
<tr class="light">
<td>Account Holder Name</td>
<td><?php echo $receiver->account_holder_name;?></td>
</tr>
<tr class="dark">
<td>Bank Name</td>
<td><?php echo $receiver->bank_name;?></td>
</tr>
<tr class="light">
<td>Branch Name</td>
<td><?php echo $receiver->branch_name;?></td>
</tr>
<tr class="dark">
<td>Account Number</td>
<td><?php echo $receiver->account_number;?></td>
</tr>
<tr class="light">
<td>Account Type</td>
<td><?php echo $receiver->account_type;?></td>
</tr>
<tr class="dark">
<td>IFSC Code</td>
<td><?php echo $receiver->ifsc;?></td>
</tr> */ ?>
</tbody>
</table>
</div>
<div>
</div>
</div>
<div class="modal-footer">
<?php if (($row->give_uid == $uid) || ($row->receive_uid == $uid && $row->lock_status == 0 && $row->confirm_status == 0)) { ?>
<div id="comments">
<form action="<?php
if ($row->receive_uid == $uid) {
echo 'receiver_model.php';
} elseif ($row->give_uid == $uid) {
echo 'donor.php?help_id=' . $row->help_id;
}
?>" onsubmit="return confirm('Are you sure for this request');" name="form" id="form" method="post">
<p>
<input type="hidden" name="help_id" value="<?php echo $row->help_id; ?>" />
<button type="submit" class="btn btn-primary waves-effect waves-light" id="confirm" name="confirm" value="Confirm Fund Request" OnClick="">Confirm Fund Request</button>
<!-- <input type="submit" class="btn btn-success" id="confirm" name="confirm" value="Confirm Fund Request" OnClick="" style="background: #51A351; color: #FFFFFF;" />
-->
<?php if ($row->receive_uid == $uid) { ?>
<button type="submit" class="btn btn-danger waves-effect waves-light" id="reject" name="reject" value="Reject Fund Request" OnClick="">Reject Fund Request</button>
<!-- <input type="submit" class="btn btn-danger" id="reject" name="reject" value="Reject Fund Request" OnClick="" style="background: #BD362F; color: #FFFFFF;" />-->
<?php } ?>
</p>
</form>
</div>
<?php }
?> <button name="submit" id="submit" type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
<!--</form>-->
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<?php
$i++;
}
}
?>
</section>
<div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<form class="form-horizontal" id="activate_pin_form" method="post">
<div class="modal-header">
<h5 class="modal-title mt-0" id="myModalLabel">Activate account by Pin</h5>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div class="modal-body">
<!-- <h5>Activate account by Pin</h5>-->
<div class="form-group">
<label class="control-label col-sm-2" for="login_id">Login Id:</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="login_id" onblur="get_user_detail(this.value);" id="login_id" placeholder="Enter login id">
</div>
<div class="col-sm-10" id="loginInfo">
</div>
<div class="col-sm-10" id="is_paid">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="pwd">Pin No:</label>
<div class="col-sm-10">
<input type="password" name="pin_no" class="form-control" id="pwd" placeholder="Enter password">
</div>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary waves-effect waves-light">Activate NOw</button>
<button name="submit" id="submit" type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
</form>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!--</div> container-fluid -->
<script>
$(document).ready(function () {
$("#activate_pin_form").submit(function (e) {
//alert("Submitted");
$.ajax({
url: "pin_check.php",
type: 'post',
data: $('#activate_pin_form').serialize(),
dataType: 'json',
async: false,
success: function (data) {
if (data.invalid) {
$("#submit").attr("disabled", "true");
alert("Invalid user login id and/or pin");
$("#myModal").modal('hide');
} else {
alert("Account activated successfully");
location.reload();
}
}});
e.preventDefault();
});
});
/* function pin_check() {
var pin = prompt('Enter pin here', 'xxxxxxxxxx');
if (pin) {
$.post("pin_check.php", {'pin_no': pin}, function(data) {
if (data.invalid) {
$("#submit").attr("disabled", "true");
alert("Invalid pin");
} else {
alert("Account activated successfully");
location.reload();
}
}, "json");
}
}*/
function upgrade_user_plan() {
var pin = prompt('Enter pin here to upgrade your account', 'xxxxxxxxxx');
if (pin) {
$.post("upgrade_user_plan.php", {'pin_no': pin}, function (data) {
if (data.invalid) {
$("#submit").attr("disabled", "true");
alert("Invalid pin");
} else {
alert("Account upgraded successfully");
location.reload();
}
}, "json");
}
}
// function get_user_detail(loginId) {
//// alert(loginId);
// $.ajax({
// url: "./report/get_user_detail_json.php?login_id=" + loginId,
// type: 'get',
// dataType: 'json',
// async: false,
// success: function (data) {
//
// var html = '<h6>' + data.data.name + ' </h6>';
// var html1 = '<h6>' + data.data.is_paid + ' </h6>';
//
// $('#loginInfo').html(html);
// var status = '<h6>' + data.is_paid + ' </h6>';
//
// $('#is_paid').html(html1);
//
//
// },
// error: function (ext, exception) {
// alert(exception);
// }
// });
//
// }
function viewMyModal(index) {
$("#myModal-" + index).modal();
}
// $(document).ready(function(){
// $( "#dialog" ).dialog({
// width: 700,
// position: 'top',
// });
//
//});
</script>
<script type="text/javascript">
function processExtend(helpid) {
var r = confirm("Do you want extend time for Request Number: " + helpid);
if (r) {
$.get("process_extend.php", {'helpid': helpid}, function (data) {
alert(data);
location.reload();
});
}
}
// var seconds = 0;
//var domId = "";
$(".timer-countdown").each(function() {
var seconds = $(this).data("time");
var domId = $(this).attr("id");
// console.log(" domId "+domId);
setInterval(function(){
var days = Math.floor(seconds/24/60/60);
var hoursLeft = Math.floor((seconds) - (days*86400));
var hours = Math.floor(hoursLeft/3600);
var minutesLeft = Math.floor((hoursLeft) - (hours*3600));
var minutes = Math.floor(minutesLeft/60);
var remainingSeconds = seconds % 60;
function pad(n) {
return (n < 10 ? "0" + n : n);
}
document.getElementById(domId).innerHTML = pad(days) + " Day " + pad(hours) + " Hour " + pad(minutes) + " Minute " + pad(remainingSeconds) + " Second ";
if (seconds == 0) {
clearInterval(countdownTimer);
document.getElementById(domId).innerHTML = "Completed";
} else {
seconds--;
}
// console.log(domId+" ========= "+seconds);
}, 1000);
});
</script>
<!--</script>-->
<div style="clear: both;"></div>
<?php include 'footer.php'; ?>