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
a5ae8345
Commit
a5ae8345
authored
6 years ago
by
Tobin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 'dev_production'
Master See merge request
!18
parents
6004f14c
5f1cf3e1
master
…
dev_production
jansa
live_production
uat_staging
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
92 additions
and
5 deletions
+92
-5
Api.php
application/controllers/Api.php
+11
-0
Provider.php
application/controllers/Provider.php
+1
-2
generals_helper.php
application/helpers/generals_helper.php
+22
-1
Api_model.php
application/models/Api_model.php
+24
-2
Validation_model.php
application/models/Validation_model.php
+34
-0
qr-cod-icon.png
assets/images/qr-cod-icon.png
+0
-0
No files found.
application/controllers/Api.php
View file @
a5ae8345
...
@@ -308,6 +308,17 @@ class Api extends CI_Controller {
...
@@ -308,6 +308,17 @@ class Api extends CI_Controller {
}
}
}
}
public
function
save_organizer
(){
$data
=
(
array
)
json_decode
(
file_get_contents
(
'php://input'
));
$res
=
$this
->
Api_model
->
save_organizer
(
$data
);
if
(
$res
[
'status'
]
!=
0
){
$this
->
response
(
$res
[
'status'
]);
}
else
{
$this
->
errorResponse
(
$res
[
'code'
],
$res
[
'message'
]);
}
}
public
function
payNow
(
$auth_token
=
''
,
$amount
=
0
,
$booking_id
=
''
,
$event_id
=
''
){
public
function
payNow
(
$auth_token
=
''
,
$amount
=
0
,
$booking_id
=
''
,
$event_id
=
''
){
if
(
empty
(
$auth_token
)
||
empty
(
$amount
)
||
empty
(
$booking_id
)){
if
(
empty
(
$auth_token
)
||
empty
(
$amount
)
||
empty
(
$booking_id
)){
redirect
(
'https://projects.nuvento.com/failure'
);
redirect
(
'https://projects.nuvento.com/failure'
);
...
...
This diff is collapsed.
Click to expand it.
application/controllers/Provider.php
View file @
a5ae8345
...
@@ -42,7 +42,7 @@ class Provider extends CI_Controller {
...
@@ -42,7 +42,7 @@ class Provider extends CI_Controller {
!
is_numeric
(
$provider_id
=
decode_param
(
$_POST
[
'provider_id'
]))){
!
is_numeric
(
$provider_id
=
decode_param
(
$_POST
[
'provider_id'
]))){
echo
json_encode
(
$resArr
);
exit
;
echo
json_encode
(
$resArr
);
exit
;
}
}
$view_all
=
(
isset
(
$_POST
[
'view_all'
])
&&
$_POST
[
'view_all'
]
==
1
)
?
1
:
0
;
$view_all
=
(
isset
(
$_POST
[
'view_all'
])
&&
$_POST
[
'view_all'
]
==
1
)
?
1
:
'0,1'
;
$mechData
=
$this
->
Provider_model
->
getProviderData
(
$provider_id
,
$view_all
);
$mechData
=
$this
->
Provider_model
->
getProviderData
(
$provider_id
,
$view_all
);
if
(
empty
(
$mechData
)){
if
(
empty
(
$mechData
)){
...
@@ -230,7 +230,6 @@ class Provider extends CI_Controller {
...
@@ -230,7 +230,6 @@ class Provider extends CI_Controller {
$provider_id
=
$this
->
session
->
userdata
(
'id'
);
$provider_id
=
$this
->
session
->
userdata
(
'id'
);
}
}
}
}
$template
[
'page'
]
=
'Provider/providerPayDetails'
;
$template
[
'page'
]
=
'Provider/providerPayDetails'
;
$template
[
'page_desc'
]
=
"Payment Details"
;
$template
[
'page_desc'
]
=
"Payment Details"
;
...
...
This diff is collapsed.
Click to expand it.
application/helpers/generals_helper.php
View file @
a5ae8345
...
@@ -99,7 +99,7 @@
...
@@ -99,7 +99,7 @@
function
genQRcode
(
$data
){
function
genQRcode
(
$data
){
include
'qr_code/autoload.php'
;
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
));
$QR
=
imagecreatefrompng
(
'https://chart.googleapis.com/chart?cht=qr&chld=H|1&chs=500x500&chl='
.
urlencode
(
$data
));
$logo
=
imagecreatefromstring
(
file_get_contents
(
$logo
));
$logo
=
imagecreatefromstring
(
file_get_contents
(
$logo
));
...
@@ -125,4 +125,24 @@
...
@@ -125,4 +125,24 @@
include
'BayanPayPaymentLibrary.php'
;
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 @
a5ae8345
...
@@ -34,7 +34,10 @@ class Api_model extends CI_Model {
...
@@ -34,7 +34,10 @@ class Api_model extends CI_Model {
function
register
(
$data
)
{
function
register
(
$data
)
{
try
{
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 = 1 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
(
count
(
$res_count
)
>
0
)
{
if
(
$res_count
->
email
==
$data
[
'email_id'
]
&&
$res_count
->
phone
==
$data
[
'phone'
]){
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'
);
$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 {
...
@@ -58,7 +61,8 @@ class Api_model extends CI_Model {
$customer_data
=
array
(
$customer_data
=
array
(
'customer_id'
=>
$id
,
'customer_id'
=>
$id
,
'phone'
=>
$data
[
'phone'
],
'phone'
=>
$data
[
'phone'
],
'email'
=>
$data
[
'email_id'
]
'email'
=>
$data
[
'email_id'
],
'name'
=>
$data
[
'name'
]
);
);
$this
->
db
->
insert
(
'customer'
,
$customer_data
);
$this
->
db
->
insert
(
'customer'
,
$customer_data
);
...
@@ -922,5 +926,23 @@ class Api_model extends CI_Model {
...
@@ -922,5 +926,23 @@ class Api_model extends CI_Model {
}
}
return
$res
;
return
$res
;
}
}
public
function
save_organizer
(
$data
){
try
{
$count
=
$this
->
db
->
get_where
(
'users'
,
array
(
'username'
=>
$data
[
'email_id'
]))
->
num_rows
();
if
(
$count
>
0
){
$res
=
array
(
'status'
=>
0
,
'message'
=>
'Email Id Already Exist'
,
'code'
=>
'ER06'
);
}
else
{
$this
->
db
->
insert
(
'users'
,
array
(
'username'
=>
$data
[
'email_id'
],
'password'
=>
md5
(
$data
[
'password'
]),
'display_name'
=>
$data
[
'name'
],
'status'
=>
'0'
));
$last_id
=
$this
->
db
->
insert_id
();
if
(
$this
->
db
->
insert
(
'provider'
,
array
(
'provider_id'
=>
$last_id
,
'name'
=>
$data
[
'name'
],
'email'
=>
$data
[
'email_id'
],
'phone'
=>
$data
[
'phone'
]))){
$res
=
array
(
'status'
=>
1
);
}
}
}
catch
(
Exception
$e
){
$res
=
array
(
'status'
=>
0
,
'message'
=>
'Ohh No!! Something went South!!'
,
'code'
=>
'ER06'
);
}
return
$res
;
}
}
}
?>
?>
This diff is collapsed.
Click to expand it.
application/models/Validation_model.php
View file @
a5ae8345
...
@@ -262,6 +262,40 @@ class Validation_model extends CI_Model {
...
@@ -262,6 +262,40 @@ class Validation_model extends CI_Model {
)
)
)
,
)
,
)
,
)
,
'save_organizer'
=>
array
(
'name'
=>
array
(
'required'
=>
array
(
'code'
=>
'ER27'
,
'message'
=>
'Name is null or empty'
)
)
,
'phone'
=>
array
(
'required'
=>
array
(
'code'
=>
'ER08'
,
'message'
=>
'Phone Number is null or empty'
),
'phone'
=>
array
(
'code'
=>
'ER08'
,
'message'
=>
'Invalid Phone no'
)
,
),
'email_id'
=>
array
(
'required'
=>
array
(
'code'
=>
'ER02'
,
'message'
=>
'Email Id is null or empty'
),
'email'
=>
array
(
'code'
=>
'ER03'
,
'message'
=>
'Invalid Email id'
)
),
'password'
=>
array
(
'required'
=>
array
(
'code'
=>
'ER04'
,
'message'
=>
'Password is null or empty'
)
)
)
,
'payNow'
=>
array
(),
'payNow'
=>
array
(),
'searchEvent'
=>
array
()
'searchEvent'
=>
array
()
);
);
...
...
This diff is collapsed.
Click to expand it.
assets/images/qr-cod-icon.png
0 → 100644
View file @
a5ae8345
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