Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
IPok_Web
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
IPok
IPok_Web
Commits
f5ae8ce1
Commit
f5ae8ce1
authored
Jul 19, 2018
by
Jansa Jose
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'jansa'
parents
1b2532f2
90f683cb
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
48 additions
and
16 deletions
+48
-16
config.php
admin/application/config/config.php
+1
-1
Webservice.php
admin/application/controllers/Webservice.php
+5
-0
common_helper.php
admin/application/helpers/common_helper.php
+10
-0
Webservice_model.php
admin/application/models/Webservice_model.php
+3
-3
autoload.php
application/config/autoload.php
+1
-1
config.php
application/config/config.php
+1
-1
Home.php
application/controllers/Home.php
+1
-5
Payment.php
application/controllers/Payment.php
+11
-1
common_helper.php
application/helpers/common_helper.php
+10
-0
Home_model.php
application/models/Home_model.php
+1
-1
wallet_redemptionhistory.php
application/views/wallet_redemptionhistory.php
+1
-1
wallet_show_banks.php
application/views/wallet_show_banks.php
+2
-2
custom.js
assets/js/custom.js
+1
-0
No files found.
admin/application/config/config.php
View file @
f5ae8ce1
...
...
@@ -318,7 +318,7 @@ $config['cache_query_string'] = FALSE;
| http://codeigniter.com/user_guide/libraries/encryption.html
|
*/
$config
[
'encryption_key'
]
=
''
;
$config
[
'encryption_key'
]
=
'
Ptf/PWNWrULQT72syxfaaBRTS9JbiKrj9dfuVEvT3rA
'
;
/*
|--------------------------------------------------------------------------
...
...
admin/application/controllers/Webservice.php
View file @
f5ae8ce1
...
...
@@ -2854,6 +2854,11 @@ print_r(date('H:i',$ms));exit();*/
if
(
isset
(
$data
[
'card_number'
])
&&
strlen
(
trim
(
$data
[
'card_number'
],
" "
))
>
0
&&
isset
(
$data
[
'card_holder_name'
])
&&
strlen
(
trim
(
$data
[
'card_holder_name'
],
" "
))
>
0
&&
isset
(
$data
[
'card_expiry_month'
])
&&
strlen
(
trim
(
$data
[
'card_expiry_month'
],
" "
))
>
0
&&
isset
(
$data
[
'card_expiry_year'
])
&&
strlen
(
trim
(
$data
[
'card_expiry_year'
],
" "
))
>
0
&&
isset
(
$data
[
'card_cvv'
])
&&
strlen
(
trim
(
$data
[
'card_cvv'
],
" "
))
>
0
){
$auth_result
=
$this
->
Webservice_model
->
get_userid_frm_authtoken
(
$headers
[
'Auth'
]);
$data
[
'user_id'
]
=
$auth_result
->
userid
;
$data
[
'card_number'
]
=
encrypt_data
(
$data
[
'card_number'
]);
$data
[
'card_holder_name'
]
=
encrypt_data
(
$data
[
'card_holder_name'
]);
$data
[
'card_expiry_month'
]
=
encrypt_data
(
$data
[
'card_expiry_month'
]);
$data
[
'card_expiry_year'
]
=
encrypt_data
(
$data
[
'card_expiry_year'
]);
$data
[
'card_cvv'
]
=
encrypt_data
(
$data
[
'card_cvv'
]);
$result
=
$this
->
Webservice_model
->
save_card
(
$data
);
if
(
$result
[
'status'
]
==
'success'
){
$res
=
array
(
...
...
admin/application/helpers/common_helper.php
View file @
f5ae8ce1
...
...
@@ -42,6 +42,16 @@ function check_cep_viacep($cep)
return
$buffer
;
}
function
encrypt_data
(
$data
){
$CI
=
&
get_instance
();
return
$CI
->
encrypt
->
encode
(
$data
);
}
function
decrypt_data
(
$data
){
$CI
=
&
get_instance
();
return
$CI
->
encrypt
->
decode
(
$data
);
}
function
filteredData
(){
$dd
=
array
();
$dd
[
0
]
=
array
(
...
...
admin/application/models/Webservice_model.php
View file @
f5ae8ce1
...
...
@@ -1996,11 +1996,11 @@ class Webservice_model extends CI_Model {
if
(
count
(
$query
)
>
0
){
$new
=
array
();
foreach
(
$query
as
$key
=>
$value
)
{
$value
[
'validity'
]
=
$value
[
'card_expiry_month'
]
.
'/'
.
$value
[
'card_expiry_year'
]
;
$value
[
'validity'
]
=
decrypt_data
(
$value
[
'card_expiry_month'
])
.
'/'
.
decrypt_data
(
$value
[
'card_expiry_year'
])
;
$new
[
$key
][
'card_id'
]
=
$value
[
'id'
];
$new
[
$key
][
'card_holder_name'
]
=
$value
[
'card_holder_name'
]
;
$new
[
$key
][
'card_holder_name'
]
=
decrypt_data
(
$value
[
'card_holder_name'
])
;
$new
[
$key
][
'card_validity'
]
=
$value
[
'validity'
];
$new
[
$key
][
'card_number'
]
=
$value
[
'card_number'
]
;
$new
[
$key
][
'card_number'
]
=
decrypt_data
(
$value
[
'card_number'
])
;
}
$res
=
array
(
'status'
=>
'success'
,
'data'
=>
array
(
'card_list'
=>
$new
));
...
...
application/config/autoload.php
View file @
f5ae8ce1
...
...
@@ -58,7 +58,7 @@ $autoload['packages'] = array();
|
| $autoload['libraries'] = array('user_agent' => 'ua');
*/
$autoload
[
'libraries'
]
=
array
(
'database'
,
'session'
);
$autoload
[
'libraries'
]
=
array
(
'database'
,
'session'
,
'encrypt'
);
/*
| -------------------------------------------------------------------
...
...
application/config/config.php
View file @
f5ae8ce1
...
...
@@ -324,7 +324,7 @@ $config['cache_query_string'] = FALSE;
| https://codeigniter.com/user_guide/libraries/encryption.html
|
*/
$config
[
'encryption_key'
]
=
''
;
$config
[
'encryption_key'
]
=
'
Ptf/PWNWrULQT72syxfaaBRTS9JbiKrj9dfuVEvT3rA
'
;
/*
|--------------------------------------------------------------------------
...
...
application/controllers/Home.php
View file @
f5ae8ce1
...
...
@@ -1621,9 +1621,7 @@ class Home extends CI_Controller {
$userdata
=
$this
->
session
->
userdata
(
'UserData'
);
$insert_array
=
array
(
'account_no'
=>
$_POST
[
'account'
],
'account_holder'
=>
$_POST
[
'name'
],
'bank_name'
=>
$_POST
[
'bank'
],
'agency'
=>
$_POST
[
'agency'
]);
$insert_array
=
array
(
'account_no'
=>
encrypt_data
(
$_POST
[
'account'
]),
'account_holder'
=>
encrypt_data
(
$_POST
[
'name'
]),
'bank_name'
=>
$_POST
[
'bank'
],
'agency'
=>
$_POST
[
'agency'
]);
if
(
$userdata
[
'type'
]
==
"PATIENT"
)
...
...
@@ -1645,8 +1643,6 @@ class Home extends CI_Controller {
}
//print_r($insert_array);
$insert
=
$this
->
Home_model
->
insert_bank_account
(
$insert_array
);
if
(
$insert
)
...
...
application/controllers/Payment.php
View file @
f5ae8ce1
...
...
@@ -26,7 +26,7 @@ class Payment extends CI_Controller {
global
$default_date
;
$this
->
default_date
=
'01/01/1970'
;
$this
->
load
->
library
(
'encrypt'
);
//print_r(date_default_timezone_get());die();
}
...
...
@@ -34,4 +34,13 @@ class Payment extends CI_Controller {
{
$this
->
load
->
view
(
'payment'
);
}
public
function
encrypt_data
(){
$new_data
=
'{"anamnese":{"Kidney_Problem":"Abdominal Compartment Syndrome","Breathing_Problem":"Lung Cancer","Gastric_Problem":"Hemorrhoids","others":["hepatitis","diabetis"]}}'
;
$data
=
$this
->
encrypt
->
encode
(
$new_data
);
//print_r($data);echo"<br>";
$data2
=
$this
->
encrypt
->
decode
(
$data
);
print_r
(
$data2
);
exit
();
}
}
\ No newline at end of file
application/helpers/common_helper.php
View file @
f5ae8ce1
...
...
@@ -44,6 +44,16 @@ function auto_logout($field)
}
}
function
encrypt_data
(
$data
){
$CI
=
&
get_instance
();
return
$CI
->
encrypt
->
encode
(
$data
);
}
function
decrypt_data
(
$data
){
$CI
=
&
get_instance
();
return
$CI
->
encrypt
->
decode
(
$data
);
}
function
load_language
(
$lang_key
,
$echo
=
FALSE
){
...
...
application/models/Home_model.php
View file @
f5ae8ce1
...
...
@@ -941,7 +941,7 @@
public
function
insert_bank_account
(
$data
)
{
//print_r($data);exit();
if
(
$this
->
db
->
insert
(
'tbl_bank_accounts'
,
$data
))
{
...
...
application/views/wallet_redemptionhistory.php
View file @
f5ae8ce1
...
...
@@ -19,7 +19,7 @@
?>
<li>
<h6
class=
"m0"
>
<?php
echo
date
(
'd-m-Y'
,
$value
[
'date'
]);
?>
</h6>
<div
class=
"child1"
><h5><strong>
<?php
echo
$value
[
'account_holder'
];
?>
-
<?php
echo
$value
[
'bank_name'
];
?>
<?php
echo
$value
[
'account_no'
]
;
?>
</strong></h5>
<div
class=
"child1"
><h5><strong>
<?php
echo
decrypt_data
(
$value
[
'account_holder'
]);
?>
-
<?php
echo
$value
[
'bank_name'
];
?>
<?php
echo
decrypt_data
(
$value
[
'account_no'
])
;
?>
</strong></h5>
<p
class=
"select"
>
<?php
echo
$value
[
'status'
];
?>
</p>
</div>
<div
class=
"child2"
><strong><b>
R$
<?php
echo
$value
[
'amount'
];
?>
</b></strong></div>
...
...
application/views/wallet_show_banks.php
View file @
f5ae8ce1
<div
class=
"ip_bank_detail"
>
<?php
// print_r($banks);
if
(
!
empty
(
$banks
))
{
foreach
(
$banks
as
$key
=>
$value
)
...
...
@@ -7,8 +8,7 @@
?>
<li>
<div
class=
"ip_bank_left"
>
<h6>
<?php
echo
$value
[
'bank_name'
];
?>
<?php
echo
$value
[
'account_no'
];
?>
<?php
echo
$value
[
'agency'
];
?>
</h6>
<p>
<?php
echo
$value
[
'account_holder'
];
?>
</p>
<h6>
<?php
echo
$value
[
'bank_name'
];
?>
<?php
echo
decrypt_data
(
$value
[
'account_no'
]);
?>
<?php
echo
$value
[
'agency'
];
?>
</h6>
</div>
<div
class=
"ip_bank_close delete-bank-btn"
bankid=
"
<?php
echo
$value
[
'id'
];
?>
"
>
</div>
...
...
assets/js/custom.js
View file @
f5ae8ce1
...
...
@@ -413,6 +413,7 @@ $('#contact-us-send-btn').click(function()
{
$
(
'#add-bank-success-error'
).
removeClass
(
'alert-danger'
).
addClass
(
'alert-success'
).
removeClass
(
'hidden'
).
html
(
items
.
message
);
var
result_inner
=
post_ajax
(
base_url
+
'Home/getAllBanks'
);
//console.log(result_inner);
$
(
'#show_all_saved_banks'
).
html
(
result_inner
);
$
(
'.reset-bank-form'
).
val
(
''
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment