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
dac51e58
Commit
dac51e58
authored
May 09, 2019
by
Tobin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'jansa' of
https://gitlab.techware.co.in/timeout/timeOut
into tobin
parents
189c0e8d
64016f7a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
Category.php
application/controllers/Category.php
+7
-7
categoryAddForm.php
application/views/Category/categoryAddForm.php
+4
-4
No files found.
application/controllers/Category.php
View file @
dac51e58
...
@@ -62,7 +62,7 @@ class Category extends CI_Controller {
...
@@ -62,7 +62,7 @@ class Category extends CI_Controller {
$err
=
1
;
$err
=
1
;
$errMsg
=
'Provide a Category Icon'
;
$errMsg
=
'Provide a Category Icon'
;
}
else
if
(
$err
==
0
&&
(
!
isset
(
$_FILES
)
||
empty
(
$_FILES
)
||
}
else
if
(
$err
==
0
&&
(
!
isset
(
$_FILES
)
||
empty
(
$_FILES
)
||
!
isset
(
$_FILES
[
'category_image_
mob'
])
||
empty
(
$_FILES
[
'category_image_mob
'
]))){
!
isset
(
$_FILES
[
'category_image_
ar'
])
||
empty
(
$_FILES
[
'category_image_ar
'
]))){
$err
=
1
;
$err
=
1
;
$errMsg
=
'Provide a Mobile Category Icon'
;
$errMsg
=
'Provide a Mobile Category Icon'
;
}
}
...
@@ -81,14 +81,14 @@ class Category extends CI_Controller {
...
@@ -81,14 +81,14 @@ class Category extends CI_Controller {
$_POST
[
'category_image'
]
=
$config
[
'upload_path'
]
.
"/"
.
$upload_data
[
'file_name'
];
$_POST
[
'category_image'
]
=
$config
[
'upload_path'
]
.
"/"
.
$upload_data
[
'file_name'
];
}
}
$config
[
'file_name'
]
=
time
()
.
"_"
.
$_FILES
[
'category_image_
mob
'
][
'name'
];
$config
[
'file_name'
]
=
time
()
.
"_"
.
$_FILES
[
'category_image_
ar
'
][
'name'
];
$this
->
upload
->
initialize
(
$config
);
$this
->
upload
->
initialize
(
$config
);
if
(
!
$this
->
upload
->
do_upload
(
'category_image_
mob
'
)){
if
(
!
$this
->
upload
->
do_upload
(
'category_image_
ar
'
)){
$err
=
1
;
$err
=
1
;
$errMsg
=
$this
->
upload
->
display_errors
();
$errMsg
=
$this
->
upload
->
display_errors
();
}
else
{
}
else
{
$upload_data
=
$this
->
upload
->
data
();
$upload_data
=
$this
->
upload
->
data
();
$_POST
[
'category_image_
mob
'
]
=
$config
[
'upload_path'
]
.
"/"
.
$upload_data
[
'file_name'
];
$_POST
[
'category_image_
ar
'
]
=
$config
[
'upload_path'
]
.
"/"
.
$upload_data
[
'file_name'
];
}
}
}
}
...
@@ -163,11 +163,11 @@ class Category extends CI_Controller {
...
@@ -163,11 +163,11 @@ class Category extends CI_Controller {
$_POST
[
'category_image'
]
=
$config
[
'upload_path'
]
.
"/"
.
$upload_data
[
'file_name'
];
$_POST
[
'category_image'
]
=
$config
[
'upload_path'
]
.
"/"
.
$upload_data
[
'file_name'
];
}
}
$config
[
'file_name'
]
=
time
()
.
"_"
.
$_FILES
[
'category_image_
mob
'
][
'name'
];
$config
[
'file_name'
]
=
time
()
.
"_"
.
$_FILES
[
'category_image_
ar
'
][
'name'
];
$this
->
upload
->
initialize
(
$config
);
$this
->
upload
->
initialize
(
$config
);
if
(
$this
->
upload
->
do_upload
(
'category_image_
mob
'
)){
if
(
$this
->
upload
->
do_upload
(
'category_image_
ar
'
)){
$upload_data
=
$this
->
upload
->
data
();
$upload_data
=
$this
->
upload
->
data
();
$_POST
[
'category_image_
mob
'
]
=
$config
[
'upload_path'
]
.
"/"
.
$upload_data
[
'file_name'
];
$_POST
[
'category_image_
ar
'
]
=
$config
[
'upload_path'
]
.
"/"
.
$upload_data
[
'file_name'
];
}
}
}
}
...
...
application/views/Category/categoryAddForm.php
View file @
dac51e58
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
Category Icon
Web
</label>
<label>
Category Icon
(English)
</label>
<div
class=
"col-md-12"
style=
"padding-bottom:10px;"
>
<div
class=
"col-md-12"
style=
"padding-bottom:10px;"
>
<div
class=
"col-md-3"
>
<div
class=
"col-md-3"
>
<img
id=
"image_id"
src=
"
<?=
(
isset
(
$categoryData
->
category_image
))
?
base_url
(
$categoryData
->
category_image
)
:
''
?>
"
onerror=
"this.src='
<?=
base_url
(
"assets/images/user_avatar.jpg"
)
?>
';"
height=
"75"
width=
"75"
/>
<img
id=
"image_id"
src=
"
<?=
(
isset
(
$categoryData
->
category_image
))
?
base_url
(
$categoryData
->
category_image
)
:
''
?>
"
onerror=
"this.src='
<?=
base_url
(
"assets/images/user_avatar.jpg"
)
?>
';"
height=
"75"
width=
"75"
/>
...
@@ -77,13 +77,13 @@
...
@@ -77,13 +77,13 @@
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
Category Icon
Mobile
</label>
<label>
Category Icon
(Arabic)
</label>
<div
class=
"col-md-12"
style=
"padding-bottom:10px;"
>
<div
class=
"col-md-12"
style=
"padding-bottom:10px;"
>
<div
class=
"col-md-3"
>
<div
class=
"col-md-3"
>
<img
id=
"category_image_mob"
src=
"
<?=
(
isset
(
$categoryData
->
category_image_
mob
))
?
base_url
(
$categoryData
->
category_image_mob
)
:
''
?>
"
onerror=
"this.src='
<?=
base_url
(
"assets/images/user_avatar.jpg"
)
?>
';"
height=
"75"
width=
"75"
/>
<img
id=
"category_image_mob"
src=
"
<?=
(
isset
(
$categoryData
->
category_image_
ar
))
?
base_url
(
$categoryData
->
category_image_ar
)
:
''
?>
"
onerror=
"this.src='
<?=
base_url
(
"assets/images/user_avatar.jpg"
)
?>
';"
height=
"75"
width=
"75"
/>
</div>
</div>
<div
class=
"col-md-9"
style=
"padding-top: 25px;"
>
<div
class=
"col-md-9"
style=
"padding-top: 25px;"
>
<input
name=
"category_image_
mob
"
type=
"file"
accept=
"image/*"
onchange=
"setImg(this,'category_image_mob');"
/>
<input
name=
"category_image_
ar
"
type=
"file"
accept=
"image/*"
onchange=
"setImg(this,'category_image_mob');"
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
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