forked from rutherlesdev/chegou3.0
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadd_money.php
122 lines (103 loc) · 4.3 KB
/
add_money.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?
include_once("common.php");
$action_form = $_REQUEST["action"];
$iMemberId = $_REQUEST["iMemberId"];
$eMemberType = $_REQUEST["eMemberType"];
$Member_Available_Balance = $_REQUEST["Member_Available_Balance"];
$fAmount = $_REQUEST["fAmount"];
/*For Currency Entry in User Wallet*/
/*$sql = "SELECT * FROM currency WHERE eStatus = 'Active'";
$db_currency = $obj->MySQLSelect($sql);
for($i=0;$i<count($db_currency);$i++)
{
if($db_currency[$i]['vName'] == 'GBP')
{
$fRatio_GBP = $db_currency[$i]['Ratio'];
}
if($db_currency[$i]['vName'] == 'USD')
{
$fRatio_USD = $db_currency[$i]['Ratio'];
}
if($db_currency[$i]['vName'] == 'EUR')
{
$fRatio_EUR = $db_currency[$i]['Ratio'];
}
}*/
/*For Currency Entry in User Wallet End*/
/*$action = $generalobj->decrypt($_REQUEST["action"]);
$iMemberId = $generalobj->decrypt($_REQUEST["iMemberId"]);
$eMemberType = $generalobj->decrypt($_REQUEST["eMemberType"]);
$Member_Available_Balance = $generalobj->decrypt($_REQUEST["Member_Available_Balance"]);*/
//$generalobj->check_member_login();
$abc = 'admin,driver,company';
$url = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
//$generalobj->setRole($abc,$url);
if($action_form == "add_money"){
$dDate = Date('Y-m-d H:i:s');
$eFor = 'Deposit';
$eType = 'Credit';
$iTripId = 0;
$tDescription = ' Amount '.$fAmount.' credited into your account from administrator';
$ePaymentStatus = 'Unsettelled';
/*$sql = "INSERT INTO `user_wallet` (`iUserId`,`eUserType`,`iBalance`,`eType`,`iTripId`, `eFor`, `tDescription`, `ePaymentStatus`, `dDate`, fRatio_GBP, fRatio_EUR, fRation_USD) VALUES ('" .$iMemberId . "','".$eMemberType."', '" . $fAmount . "','" . $eType . "', '" . $iTripId . "', '" . $eFor . "', '" .$tDescription. "', '" .$ePaymentStatus. "', '" .$dDate. "', '".$fRatio_GBP."', '".$fRatio_EUR."', '".$fRatio_USD."')";
$result = $obj->sql_query($sql); */
$sql = "INSERT INTO `user_wallet` (`iUserId`,`eUserType`,`iBalance`,`eType`,`iTripId`, `eFor`, `tDescription`, `ePaymentStatus`, `dDate`) VALUES ('" .$iMemberId . "','".$eMemberType."', '" . $fAmount . "','" . $eType . "', '" . $iTripId . "', '" . $eFor . "', '" .$tDescription. "', '" .$ePaymentStatus. "', '" .$dDate. "')";
$result = $obj->MySQLInsert($sql);
$sql = "SELECT * FROM currency WHERE eStatus = 'Active'";
$db_curr = $obj->MySQLSelect($sql);
$where = " iUserWalletId = '".$result."'";
for($i=0;$i<count($db_curr);$i++)
{
$data_currency_ratio['fRatio_'.$db_curr[$i]['vName']]=$db_curr[$i]['Ratio'];
$obj->MySQLQueryPerform("user_wallet",$data_currency_ratio,'update',$where);
}
if($result){
$script="Add money";
$meta = $generalobj->getStaticPage(31,$_SESSION['sess_lang']);
?>
<!DOCTYPE html>
<html lang="en" dir="<?=(isset($_SESSION['eDirectionCode']) && $_SESSION['eDirectionCode'] != "")?$_SESSION['eDirectionCode']:'ltr';?>">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title><?=$meta['meta_title'];?></title>
<meta name="keywords" value="<?=$meta['meta_keyword'];?>"/>
<meta name="description" value="<?=$meta['meta_desc'];?>"/>
<!-- Default Top Script and css -->
<?php include_once("top/top_script.php");?>
<!-- End: Default Top Script and css-->
</head>
<body> <div id="main-uber-page">
<!-- Left Menu -->
<?php include_once("top/left_menu.php");?>
<!-- End: Left Menu-->
<!-- home page -->
<!-- Top Menu -->
<?php include_once("top/header_topbar.php");?>
<!-- End: Top Menu-->
<!-- contact page-->
<div class="page-contant">
<div class="page-contant-inner">
<h2 class="header-page trip-detail"><?=$meta['page_title'];?></h2>
<!-- trips detail page -->
<div class="static-page">
<?=$meta['page_desc'];?>
</div>
</div>
</div>
<!-- home page end-->
<!-- footer part -->
<?php include_once('footer/footer_home.php');?>
<!-- End:contact page-->
<div style="clear:both;"></div>
</div>
<!-- footer part end -->
<!-- Footer Script -->
<?php include_once('top/footer_script.php');?>
<!-- End: Footer Script -->
</body>
</html>
<?php } else{
header('Location: rider_wallet.php'); exit;
}
} ?>