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
6d748bbf
Commit
6d748bbf
authored
5 years ago
by
Jansa Jose
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 'dev_production'
chnages in category list city list See merge request
!263
parents
0eda0533
ebb0a869
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Organizer_model.php
application/models/Organizer_model.php
+4
-4
No files found.
application/models/Organizer_model.php
View file @
6d748bbf
...
@@ -1259,14 +1259,14 @@ class Organizer_model extends CI_Model {
...
@@ -1259,14 +1259,14 @@ class Organizer_model extends CI_Model {
public
function
getOrganizerCityList
(
$data
){
public
function
getOrganizerCityList
(
$data
){
$res
=
array
(
'status'
=>
0
,
'message'
=>
'Ohh No!! Something Went South'
,
'code'
=>
'ER06'
);
$res
=
array
(
'status'
=>
0
,
'message'
=>
'Ohh No!! Something Went South'
,
'code'
=>
'ER06'
);
try
{
try
{
$count
=
$this
->
db
->
get_where
(
'region'
)
->
num_rows
();
$count
=
$this
->
db
->
get_where
(
'region'
,
array
(
'status !='
=>
2
)
)
->
num_rows
();
if
(
$count
>
0
){
if
(
$count
>
0
){
$perPage
=
10
;
$perPage
=
10
;
$page
=
(
isset
(
$data
[
'page'
]))
?
$data
[
'page'
]
:
1
;
$page
=
(
isset
(
$data
[
'page'
]))
?
$data
[
'page'
]
:
1
;
$limit
=
(
$page
-
1
)
*
$perPage
;
$limit
=
(
$page
-
1
)
*
$perPage
;
$meta
=
array
(
'total_pages'
=>
ceil
(
$count
/
$perPage
),
'total'
=>
$count
,
$meta
=
array
(
'total_pages'
=>
ceil
(
$count
/
$perPage
),
'total'
=>
$count
,
'current_page'
=>
$page
,
'per_page'
=>
$perPage
);
'current_page'
=>
$page
,
'per_page'
=>
$perPage
);
$sql
=
$this
->
db
->
query
(
"SELECT * FROM region LIMIT
$limit
,
$perPage
"
);
$sql
=
$this
->
db
->
query
(
"SELECT * FROM region
WHERE status !='2'
LIMIT
$limit
,
$perPage
"
);
if
(
empty
(
$sql
)
||
empty
(
$regionData
=
$sql
->
result_array
())){
if
(
empty
(
$sql
)
||
empty
(
$regionData
=
$sql
->
result_array
())){
return
$res
;
exit
;
return
$res
;
exit
;
}
}
...
@@ -1397,14 +1397,14 @@ class Organizer_model extends CI_Model {
...
@@ -1397,14 +1397,14 @@ class Organizer_model extends CI_Model {
public
function
getOrganizerCategoryList
(
$data
){
public
function
getOrganizerCategoryList
(
$data
){
$res
=
array
(
'status'
=>
0
,
'message'
=>
'Ohh No!! Something Went South'
,
'code'
=>
'ER06'
);
$res
=
array
(
'status'
=>
0
,
'message'
=>
'Ohh No!! Something Went South'
,
'code'
=>
'ER06'
);
try
{
try
{
$count
=
$this
->
db
->
query
(
"SELECT * FROM event_category ORDER BY priority"
)
->
num_rows
();
$count
=
$this
->
db
->
query
(
"SELECT * FROM event_category
WHERE status != '2'
ORDER BY priority"
)
->
num_rows
();
if
(
$count
>
0
){
if
(
$count
>
0
){
$perPage
=
10
;
$perPage
=
10
;
$page
=
(
isset
(
$data
[
'page'
]))
?
$data
[
'page'
]
:
1
;
$page
=
(
isset
(
$data
[
'page'
]))
?
$data
[
'page'
]
:
1
;
$limit
=
(
$page
-
1
)
*
$perPage
;
$limit
=
(
$page
-
1
)
*
$perPage
;
$meta
=
array
(
'total_pages'
=>
ceil
(
$count
/
$perPage
),
'total'
=>
$count
,
$meta
=
array
(
'total_pages'
=>
ceil
(
$count
/
$perPage
),
'total'
=>
$count
,
'current_page'
=>
$page
,
'per_page'
=>
$perPage
);
'current_page'
=>
$page
,
'per_page'
=>
$perPage
);
$sql
=
$this
->
db
->
query
(
"SELECT * FROM event_category ORDER BY priority LIMIT
$limit
,
$perPage
"
);
$sql
=
$this
->
db
->
query
(
"SELECT * FROM event_category
WHERE status != '2'
ORDER BY priority LIMIT
$limit
,
$perPage
"
);
if
(
empty
(
$sql
)
||
empty
(
$categoryData
=
$sql
->
result_array
())){
if
(
empty
(
$sql
)
||
empty
(
$categoryData
=
$sql
->
result_array
())){
return
$res
;
exit
;
return
$res
;
exit
;
}
}
...
...
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