Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
sayhoChun
/
kcSpecialVehicle
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
d9289dda
authored
2017-02-13 11:31:09 +0900
by
sayhoChun
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
board save query
1 parent
d75f5c4b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
4 deletions
common/classes/ApiBoard.php
common/classes/ApiStatic.php
common/classes/ApiBoard.php
View file @
d9289dd
...
...
@@ -58,6 +58,33 @@ if (! class_exists("ApiBoard"))
return
json_encode
(
$this
->
getArray
(
$sql
));
}
//자유게시판 게시물 작성
function
saveBoard
(){
$title
=
$this
->
req
[
"title"
];
$userFk
=
$this
->
req
[
"userFk"
];
$imgPathBoard1
=
$this
->
req
[
"imgPathBoard1"
];
$imgPathBoard2
=
$this
->
req
[
"imgPathBoard2"
];
$imgPathBoard3
=
$this
->
req
[
"imgPathBoard3"
];
$content
=
$this
->
req
[
"content"
];
$sql
=
"
INSERT INTO tblBoard(userFk, title, imgPathBoard1, imgPathBoard2, imgPathBoard3, content, status, regDate)
VALUES
(
'
{
$userFk
}
',,
'
{
$title
}
',
'
{
$imgPathBoard1
}
',
'
{
$imgPathBoard2
}
',
'
{
$imgPathBoard3
}
',
'
{
$content
}
',
1,
NOW()
)
"
;
$this
->
update
(
$sql
);
return
$this
->
makeResultJson
(
"1"
,
"저장되었습니다"
);
}
//자유게시판 리스트
function
getListOfBoard
(){
$sql
=
"
...
...
@@ -114,6 +141,34 @@ if (! class_exists("ApiBoard"))
}
}
//고객센터 게시물 저장
function
saveCS
(){
$title
=
$this
->
req
[
"title"
];
$userFk
=
$this
->
req
[
"userFk"
];
$targetType
=
$this
->
req
[
"targetType"
];
$imgPathCS1
=
$this
->
req
[
"imgPathCS1"
];
$imgPathCS2
=
$this
->
req
[
"imgPathCS2"
];
$imgPathCS3
=
$this
->
req
[
"imgPathCS3"
];
$content
=
$this
->
req
[
"content"
];
$sql
=
"
INSERT INTO tblCustomerService(userFk, title, targetType, imgPathCS1, imgPathCS2, imgPathCS3, content, status, regDate)
VALUES
(
'
{
$userFk
}
',
'
{
$title
}
',
'
{
$targetType
}
',
'
{
$imgPathCS1
}
',
'
{
$imgPathCS2
}
',
'
{
$imgPathCS3
}
',
'
{
$content
}
',
1,
NOW()
)
"
;
}
//고객센터 게시물 리스트
function
getListOfCS
(){
$sql
=
"
...
...
@@ -171,6 +226,7 @@ if (! class_exists("ApiBoard"))
}
}
//AS 엄체 리스트
function
getListOfCompany
(){
$sql
=
"
...
...
@@ -302,9 +358,9 @@ if (! class_exists("ApiBoard"))
(
'
{
$userFk
}
',
'
{
$targetFk
}
',
(SELECT commentGroup FROM tblComment WHERE commentNo='
{
$parentNo
}
' AND status=1),
//부모의 그룹
(SELECT gOrder + 1 FROM tblComment WHERE commentNo='
{
$parentNo
}
' AND status=1),
//부모 순서+1
(SELECT depth + 1 FROM tblComment WHERE commentNo='
{
$parentNo
}
' AND status=1),
//부모 깊이+1
(SELECT commentGroup FROM tblComment WHERE commentNo='
{
$parentNo
}
' AND status=1),
(SELECT gOrder + 1 FROM tblComment WHERE commentNo='
{
$parentNo
}
' AND status=1),
(SELECT depth + 1 FROM tblComment WHERE commentNo='
{
$parentNo
}
' AND status=1),
'
{
$content
}
',
'
{
$commentType
}
',
1,
...
...
common/classes/ApiStatic.php
View file @
d9289dd
...
...
@@ -30,7 +30,6 @@ if (! class_exists("ApiStatic")){
return
json_encode
(
$this
->
getArray
(
$sql
));
}
}
}
...
...
Please
register
or
sign in
to post a comment