Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
TimeOutAdmin
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
TimeOut
TimeOutAdmin
Commits
a579a245
Commit
a579a245
authored
6 years ago
by
Tobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
daily commit
parent
f4ee07e0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
3 deletions
+28
-3
generals_helper.php
application/helpers/generals_helper.php
+22
-1
Api_model.php
application/models/Api_model.php
+6
-2
qr-cod-icon.png
assets/images/qr-cod-icon.png
+0
-0
No files found.
application/helpers/generals_helper.php
View file @
a579a245
...
...
@@ -99,7 +99,7 @@
function
genQRcode
(
$data
){
include
'qr_code/autoload.php'
;
$logo
=
'assets/images/
asset_logo
.png'
;
$logo
=
'assets/images/
qr-cod-icon
.png'
;
$QR
=
imagecreatefrompng
(
'https://chart.googleapis.com/chart?cht=qr&chld=H|1&chs=500x500&chl='
.
urlencode
(
$data
));
$logo
=
imagecreatefromstring
(
file_get_contents
(
$logo
));
...
...
@@ -125,4 +125,24 @@
include
'BayanPayPaymentLibrary.php'
;
}
// function resizeImage($file=array()){
// if(empty($file) || ($size = $file['size']/1024) < 100 ||
// empty($info = getimagesize($file['tmp_name'])) || $info['mime'] == 'image/gif'){
// return false;
// }
// $resize = 100 - ((100/$size)*100);
// pre($resize);
// if ($info['mime'] == 'image/jpeg') {
// $fname = 'assets/uploads/services/img_upload_'.time().'.jpg';
// $image = imagecreatefromjpeg($file['tmp_name']);
// imagejpeg($image,$fname,$resize);
// }
// else if ($info['mime'] == 'image/png') {
// $fname = 'assets/uploads/services/img_upload_'.time().'.png';
// $image = imagecreatefromjpeg($file['tmp_name']);
// imagepng($image,$fname,$resize);
// }
// return $fname;
// }
?>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
application/models/Api_model.php
View file @
a579a245
...
...
@@ -34,7 +34,10 @@ class Api_model extends CI_Model {
function
register
(
$data
)
{
try
{
$res_count
=
$this
->
db
->
where
(
'email'
,
$data
[
'email_id'
])
->
or_where
(
'phone'
,
$data
[
'phone'
])
->
get
(
'customer'
)
->
row
();
$email
=
$data
[
'email_id'
];
$phone
=
$data
[
'phone'
];
$res_count
=
$this
->
db
->
query
(
"SELECT * FROM customer INNER JOIN `users` ON users.id = customer.customer_id AND users.user_type = 3 WHERE users.status AND (customer.email = '
$email
' OR customer.phone = '
$phone
')"
)
->
row
();
//$res_count = $this->db->where('email',$data['email_id'])->where()->or_where('phone',$data['phone'])->get('customer')->row();
if
(
count
(
$res_count
)
>
0
)
{
if
(
$res_count
->
email
==
$data
[
'email_id'
]
&&
$res_count
->
phone
==
$data
[
'phone'
]){
$res
=
array
(
'status'
=>
0
,
'message'
=>
'Already have an account with email id and phone no. Please login'
,
'code'
=>
'ER12'
);
...
...
@@ -58,7 +61,8 @@ class Api_model extends CI_Model {
$customer_data
=
array
(
'customer_id'
=>
$id
,
'phone'
=>
$data
[
'phone'
],
'email'
=>
$data
[
'email_id'
]
'email'
=>
$data
[
'email_id'
],
'name'
=>
$data
[
'name'
]
);
$this
->
db
->
insert
(
'customer'
,
$customer_data
);
...
...
This diff is collapsed.
Click to expand it.
assets/images/qr-cod-icon.png
0 → 100644
View file @
a579a245
10.2 KB
This diff is collapsed.
Click to expand it.
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