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
f3c917b4
Commit
f3c917b4
authored
5 years ago
by
Tobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dc
parent
390065a0
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
91 additions
and
31 deletions
+91
-31
database.php
application/config/database.php
+3
-3
Dashboard.php
application/controllers/Dashboard.php
+9
-4
Event.php
application/controllers/Event.php
+1
-1
generals_helper.php
application/helpers/generals_helper.php
+3
-0
Booking_model.php
application/models/Booking_model.php
+4
-2
Login_model.php
application/models/Login_model.php
+1
-1
Staff_model.php
application/models/Staff_model.php
+4
-4
staffForm.php
application/views/Staff/staffForm.php
+21
-2
viewStaff.php
application/views/Staff/viewStaff.php
+4
-2
footer-script.php
application/views/Templates/footer-script.php
+1
-0
header-script.php
application/views/Templates/header-script.php
+1
-0
left-menu.php
application/views/Templates/left-menu.php
+20
-7
custom-style.css
assets/css/custom-style.css
+6
-2
custom-script.js
assets/js/custom-script.js
+13
-3
No files found.
application/config/database.php
View file @
f3c917b4
...
...
@@ -75,10 +75,10 @@ $query_builder = TRUE;
$db
[
'default'
]
=
array
(
'dsn'
=>
''
,
'hostname'
=>
'
localhost
'
,
'username'
=>
'
nuvento_timeou
t'
,
'hostname'
=>
'
192.168.140.123
'
,
'username'
=>
'
roo
t'
,
'password'
=>
'Golden_123'
,
'database'
=>
'
nuvento_timeo
ut'
,
'database'
=>
'
tobin_eventTimeO
ut'
,
'dbdriver'
=>
'mysqli'
,
'dbprefix'
=>
''
,
'pconnect'
=>
FALSE
,
...
...
This diff is collapsed.
Click to expand it.
application/controllers/Dashboard.php
View file @
f3c917b4
...
...
@@ -6,12 +6,18 @@ class Dashboard extends CI_Controller {
public
function
__construct
()
{
parent
::
__construct
();
date_default_timezone_set
(
"Asia/Riyadh"
);
$this
->
load
->
model
(
'Dashboard_model'
);
if
(
!
$this
->
session
->
userdata
(
'logged_in'
))
{
redirect
(
base_url
(
'Login'
));
}
$userType
=
$this
->
session
->
userdata
[
'user_type'
];
if
(
$userType
==
5
){
redirect
(
base_url
(
'Customer_Booking'
));
}
redirect
(
base_url
(
'Event/listEvents'
));
$this
->
load
->
model
(
'Dashboard_model'
);
}
public
function
index
()
{
...
...
@@ -21,7 +27,5 @@ class Dashboard extends CI_Controller {
$this
->
load
->
view
(
'template'
,
$template
);
}
}
?>
?>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
application/controllers/Event.php
View file @
f3c917b4
...
...
@@ -186,7 +186,7 @@ class Event extends CI_Controller {
$subject
=
"TimeOut, New Event Created"
;
$emailId
=
$settings
[
'admin_mail_id'
];
$message
=
"<html><body>
New Event Created, event name: <strong>"
.
$_POST
[
'event_name_en'
]
.
"</strong>. Event URL : "
.
base_url
()
.
"
eventdetail?event_id=
$event_id
New Event Created, event name: <strong>"
.
$_POST
[
'event_name_en'
]
.
"</strong>. Event URL : "
.
base_url
()
.
"
Event/listEvents
</body></html>"
;
$this
->
Api_model
->
send_mail
(
$subject
,
$emailId
,
$message
);
}
...
...
This diff is collapsed.
Click to expand it.
application/helpers/generals_helper.php
View file @
f3c917b4
...
...
@@ -175,6 +175,9 @@
'Organizer'
=>
array
(
1
,
2
,
3
,
4
),
'Booking'
=>
array
(
1
,
2
,
3
,
4
),
'Notification'
=>
array
(
1
,
2
,
3
,
4
),
'HotelCity'
=>
array
(
1
,
2
,
3
,
4
));
break
;
case
5
:
$menus
=
array
(
'Customer'
=>
array
(),
'Customer_Booking'
=>
array
());
break
;
}
return
$menus
;
}
...
...
This diff is collapsed.
Click to expand it.
application/models/Booking_model.php
View file @
f3c917b4
...
...
@@ -5,10 +5,12 @@ class Booking_model extends CI_Model {
parent
::
_construct
();
}
public
function
getBookingData
(
$booking_id
=
''
,
$provider_id
=
''
,
$view
=
'0,1,2,3,5'
){
public
function
getBookingData
(
$booking_id
=
''
,
$provider_id
=
''
,
$view
=
'0,1,2,3,5'
,
$customer_id
=
''
,
$bookId
=
''
){
$cond
=
(
!
empty
(
$view
))
?
" BOK.status IN (
$view
) "
:
" BOK.status != '4' "
;
$cond
.=
(
!
empty
(
$bookId
))
?
" AND BOK.bookId='
$bookId
' "
:
""
;
$cond
.=
(
!
empty
(
$booking_id
))
?
" AND BOK.id='
$booking_id
' "
:
""
;
$cond
.=
(
!
empty
(
$provider_id
))
?
" AND EVT.provider_id='
$provider_id
' "
:
""
;
$cond
.=
(
!
empty
(
$customer_id
))
?
" AND BOK.customer_id='
$customer_id
' "
:
""
;
$sql
=
"SELECT BOK.id AS booking_id,CUST.customer_id,CUST.name AS customer_name,EVT.provider_id,
CUST.phone AS customer_phone,CUST.email AS customer_email,CUST.gender,EVT.venue_id,
...
...
@@ -31,7 +33,7 @@ class Booking_model extends CI_Model {
WHERE
$cond
"
;
$bookingData
=
$this
->
db
->
query
(
$sql
);
if
(
empty
(
$bookingData
)
){
if
(
$bookingData
->
num_rows
()
<=
0
){
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
application/models/Login_model.php
View file @
f3c917b4
...
...
@@ -9,7 +9,7 @@ class Login_model extends CI_Model {
public
function
login
(
$username
,
$password
)
{
$query
=
$this
->
db
->
query
(
"SELECT * FROM users
WHERE username='
$username
' AND password='
$password
' AND
user_type IN (1,2,4) AND status='1'"
);
user_type IN (1,2,4
,5
) AND status='1'"
);
if
(
$query
->
num_rows
()
>
0
&&
!
empty
(
$query
)){
$result
=
$query
->
row
();
...
...
This diff is collapsed.
Click to expand it.
application/models/Staff_model.php
View file @
f3c917b4
...
...
@@ -8,7 +8,7 @@ class Staff_model extends CI_Model {
$cond
=
(
!
empty
(
$view
))
?
" AND status IN (
$view
) "
:
" status != '2' "
;
$cond
.=
(
!
empty
(
$staff_id
))
?
" AND id='
$staff_id
' "
:
""
;
$staffData
=
$this
->
db
->
query
(
"SELECT * FROM users WHERE user_type
='4'
"
.
$cond
);
$staffData
=
$this
->
db
->
query
(
"SELECT * FROM users WHERE user_type
IN (4,5)
"
.
$cond
);
if
(
!
empty
(
$staffData
)){
return
(
!
empty
(
$staff_id
))
?
$staffData
->
row
()
:
$staffData
->
result
();
...
...
@@ -22,7 +22,7 @@ class Staff_model extends CI_Model {
$userNameChk
=
$this
->
db
->
query
(
"SELECT * FROM users
WHERE status!='2' AND username='"
.
$staff_data
[
'username'
]
.
"' AND
user_type
='4'
"
);
user_type
IN (4,5)
"
);
if
(
!
empty
(
$userNameChk
)
&&
$userNameChk
->
num_rows
()
>
0
)
return
2
;
$status
=
$this
->
db
->
insert
(
'users'
,
...
...
@@ -30,7 +30,7 @@ class Staff_model extends CI_Model {
'password'
=>
$staff_data
[
'password'
],
'display_name'
=>
$staff_data
[
'display_name'
],
'profile_image'
=>
$staff_data
[
'profile_image'
],
'user_type'
=>
'4'
,
'status'
=>
'1'
));
'user_type'
=>
$staff_data
[
'user_type'
]
,
'status'
=>
'1'
));
return
$status
;
}
...
...
@@ -39,7 +39,7 @@ class Staff_model extends CI_Model {
return
0
;
$userNameChk
=
$this
->
db
->
query
(
"SELECT * FROM users
WHERE status!='2' AND username='"
.
$staff_data
[
'username'
]
.
"' AND
user_type
='4'
AND id!='"
.
$staff_id
.
"'"
);
user_type
IN (4,5)
AND id!='"
.
$staff_id
.
"'"
);
if
(
!
empty
(
$userNameChk
)
&&
$userNameChk
->
num_rows
()
>
0
)
{
return
2
;
}
if
(
!
isset
(
$staff_data
[
'profile_image'
])
||
empty
(
$staff_data
[
'profile_image'
])){
...
...
This diff is collapsed.
Click to expand it.
application/views/Staff/staffForm.php
View file @
f3c917b4
...
...
@@ -50,8 +50,27 @@
</div>
<?php
}
?>
</div>
<div
class=
"col-md-6"
>
<div
class=
"form-group"
>
<div
class=
"col-md-6"
>
<?php
if
(
!
isset
(
$staff_id
)
||
empty
(
$staff_id
)){
?>
<div
class=
"form-group"
>
<label>
User Role
</label>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<div
class=
"col-md-3"
>
<input
type=
"radio"
class=
"required padLeft10"
data-parsley-trigger=
"change"
required
value=
"4"
name=
"user_type"
checked
>
<label
class=
"padLeft10"
>
Staff User
</label>
</div>
<div
class=
"col-md-5"
>
<input
type=
"radio"
class=
"required padLeft10"
data-parsley-trigger=
"change"
required
value=
"5"
name=
"user_type"
>
<label
class=
"padLeft10"
>
Customer User
</label>
</div>
</div>
</div>
</div>
<?php
}
?>
<div
class=
"form-group padTop10"
>
<label>
Profile Picture
</label>
<div
class=
"col-md-12"
style=
"padding-bottom:10px;"
>
<div
class=
"col-md-3"
>
...
...
This diff is collapsed.
Click to expand it.
application/views/Staff/viewStaff.php
View file @
f3c917b4
...
...
@@ -40,8 +40,9 @@
<tr>
<th
class=
"hidden"
>
ID
</th>
<th
width=
"50px;"
>
Photo
</th>
<th
width=
"150px;"
>
Name
</th>
<th
width=
"150px;"
>
Username
</th>
<th
width=
"130px;"
>
Name
</th>
<th
width=
"130px;"
>
Username
</th>
<th
width=
"120px;"
>
Role
</th>
<th
width=
"50px;"
>
Status
</th>
<th
width=
"200px;"
>
Action
</th>
</tr>
...
...
@@ -59,6 +60,7 @@
</th>
<th
class=
"center"
>
<?=
$staff
->
display_name
?>
</th>
<th
class=
"center"
>
<?=
$staff
->
username
?>
</th>
<th
class=
"center"
>
<?=
(
$staff
->
user_type
==
4
)
?
'Staff User'
:
'Customer Care'
?>
</th>
<th
class=
"center"
id=
"statusFlag_
<?=
$staff
->
id
?>
"
>
<?=
(
$staff
->
status
==
1
)
?
'Active'
:
'De-active'
?>
</th>
...
...
This diff is collapsed.
Click to expand it.
application/views/Templates/footer-script.php
View file @
f3c917b4
...
...
@@ -18,6 +18,7 @@
<script
src=
"
<?=
base_url
(
'assets/js/bootbox.min.js'
)
?>
"
></script>
<script
src=
"
<?=
base_url
(
'assets/js/app.min.js'
)
?>
"
></script>
<script
src=
"
<?=
base_url
(
'assets/js/locationpicker.js'
)
?>
"
type=
"text/javascript"
></script>
<script
src=
"
<?=
base_url
(
'assets/js/jquery-ui.min.js'
)
?>
"
type=
"text/javascript"
></script>
<script
src=
"
<?=
base_url
(
'assets/js/custom-script.js?ts='
.
time
())
?>
"
></script>
<script
src=
"
<?=
base_url
(
'assets/js/parsley.min.js'
)
?>
"
></script>
<script
src=
"
<?=
base_url
(
'assets/js/bootstrap-datepicker.js'
)
?>
"
></script>
...
...
This diff is collapsed.
Click to expand it.
application/views/Templates/header-script.php
View file @
f3c917b4
...
...
@@ -25,6 +25,7 @@
<link
rel=
"stylesheet"
href=
"
<?=
base_url
(
'assets/css/theme.css'
)
?>
"
>
<link
rel=
"stylesheet"
href=
"
<?=
base_url
(
'assets/css/custom.css'
)
?>
"
>
<link
rel=
"stylesheet"
href=
"
<?=
base_url
(
'assets/css/slick.min.css'
)
?>
"
type=
"text/css"
>
<link
rel=
"stylesheet"
href=
"
<?=
base_url
(
'assets/css/jquery-ui.min.css'
)
?>
"
type=
"text/css"
/>
<script
src=
"
<?=
base_url
(
'assets/js/jQuery-2.1.4.min.js'
)
?>
"
></script>
<script
src=
"https://cdn.ckeditor.com/4.5.7/standard/ckeditor.js"
></script>
...
...
This diff is collapsed.
Click to expand it.
application/views/Templates/left-menu.php
View file @
f3c917b4
...
...
@@ -21,6 +21,13 @@
<span>
Dashboard
</span>
</a>
</li>
<?php
}
if
(
array_key_exists
(
'Customer_Booking'
,
$menus
)){
?>
<li>
<a
href=
"
<?=
base_url
(
'Customer_Booking'
)
?>
"
>
<img
src=
"
<?=
base_url
(
"assets/images/m5.png"
)
?>
"
>
<span>
Care Home
</span>
</a>
</li>
<?php
}
if
(
array_key_exists
(
'Tag'
,
$menus
)){
?>
<li>
<a
href=
"
<?=
base_url
(
'Tag/listTags'
)
?>
"
>
...
...
@@ -168,16 +175,10 @@
</li>
</ul>
</li>
<?php
}
if
(
array_key_exists
(
'Booking'
,
$menus
)){
?>
<li>
<a
href=
"
<?=
base_url
(
'Booking/viewBookings'
)
?>
"
>
<img
src=
"
<?=
base_url
(
"assets/images/m8.png"
)
?>
"
>
<span>
Booking Details
</span></a>
</li>
<?php
}
if
(
array_key_exists
(
'Promocode'
,
$menus
)){
?>
<li
class=
"treeview"
>
<a
href=
"#"
>
<img
src=
"
<?=
base_url
(
"assets/images/m
8
.png"
)
?>
"
>
<img
src=
"
<?=
base_url
(
"assets/images/m
2
.png"
)
?>
"
>
<span>
Promocode Management
</span>
<i
class=
"fa fa-angle-left pull-right"
></i>
</a>
...
...
@@ -196,6 +197,18 @@
</li>
</ul>
</li>
<?php
}
if
(
array_key_exists
(
'Booking'
,
$menus
)){
?>
<li>
<a
href=
"
<?=
base_url
(
'Booking/viewBookings'
)
?>
"
>
<img
src=
"
<?=
base_url
(
"assets/images/m8.png"
)
?>
"
>
<span>
Booking Details
</span></a>
</li>
<?php
}
if
(
array_key_exists
(
'HotelCity'
,
$menus
)){
?>
<li>
<a
href=
"
<?=
base_url
(
'HotelCity/listHotelCity'
)
?>
"
>
<img
src=
"
<?=
base_url
(
"assets/images/m4.png"
)
?>
"
>
<span>
Hotel Cities
</span></a>
</li>
<?php
}
if
(
array_key_exists
(
''
,
$menus
)){
?>
<li><a
href=
"
<?=
base_url
(
'Provider/getProviderPayDetails'
)
?>
"
>
<img
src=
"
<?=
base_url
(
"assets/images/m2.png"
)
?>
"
>
...
...
This diff is collapsed.
Click to expand it.
assets/css/custom-style.css
View file @
f3c917b4
...
...
@@ -357,7 +357,7 @@
padding-bottom
:
20px
!important
;
}
/*
.padBottom10 {
.padBottom10
{
padding-bottom
:
10px
!important
;
}
...
...
@@ -397,6 +397,10 @@
padding-top
:
20px
!important
;
}
.padTop50
{
padding-top
:
50px
!important
;
}
.padTop300
{
padding-top
:
300px
;
}
...
...
@@ -447,7 +451,7 @@
.padAll-20
{
padding
:
20px
;
}
*/
}
.vechile-body
{
background-color
:
#f7f7f7
;
...
...
This diff is collapsed.
Click to expand it.
assets/js/custom-script.js
View file @
f3c917b4
...
...
@@ -1010,5 +1010,15 @@ jQuery('[id^="addMultiLang"]').on('click',function() {
thisObj
.
html
(
'+ Hide Add More Language Option'
);
jQuery
(
'[id="showMultiLangBlock_'
+
block
+
'"]'
).
removeClass
(
'hide'
);
}
});
\ No newline at end of file
});
jQuery
(
'[id="custSearch"]'
).
autocomplete
({
source
:
base_url
+
'Customer_Booking/userSearch'
,
minLength
:
1
,
select
:
(
e
,
data
)
=>
{
if
(
!
data
||
data
==
''
||
data
==
undefined
||
data
==
'undefined'
||
data
==
null
||
data
==
'null'
){
return
false
;
}
jQuery
(
'[name="user_id"]'
).
val
(
data
[
'item'
][
'data'
]);
}
});
\ No newline at end of file
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