0dbe03a3 by sayhoChun

horfix) additional development

1 parent 513526aa
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/KCSpecialVehicle.iml" filepath="$PROJECT_DIR$/.idea/KCSpecialVehicle.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
No preview for this file type
......@@ -170,6 +170,9 @@
case "EV":
echo "이벤트";
break;
case "SM":
echo "직원/영업사원 전용게시판";
break;
}
?>
</h1>
......@@ -184,6 +187,9 @@
case "EV":
echo "이벤트";
break;
case "SM":
echo "직원/영업사원 전용게시판";
break;
}
?>
</span>
......
......@@ -112,8 +112,10 @@
<?
if($_REQUEST["boardType"] == "NO")
echo "공지사항";
else
echo "이벤트"
else if($_REQUEST["boardType"] == "EV")
echo "이벤트";
else
echo "직원/영업사원 전용게시판";
?>
>
<span><?
......
......@@ -226,6 +226,18 @@
<input type="text" name="title" id="mTitle" class="wl" style="width:70%;" value="<?=$info["title"]?>" />
</td>
</tr>
<tr>
<th style="height:25px;">하위메뉴</th>
<td class="l">
<select name="productionType">
<option value="WB" <?=$info["productionType"] == "WB"?"selected" : ""?>>윙바디</option>
<option value="UW" <?=$info["productionType"] == "UW"?"selected" : ""?>>상승윙바디</option>
<option value="FW" <?=$info["productionType"] == "FW"?"selected" : ""?>>냉동윙바디</option>
<option value="FC" <?=$info["productionType"] == "FC"?"selected" : ""?>>냉동컨테이저/탑</option>
<option value="SP" <?=$info["productionType"] == "SP"?"selected" : ""?>>특수차량</option>
</select>
</td>
</tr>
<tr>
<th style="height:25px;">카테고리</th>
<td>
......
<?php
/**
* Created by PhpStorm.
* User: p
* Date: 2017-10-10
* Time: 오후 3:10
*/
?>
<? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminBoard.php" ?>
<? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/header.php" ?>
<? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/leftBoardManage.php" ?>
<?
$obj = new AdminBoard($_REQUEST, "");
$info = $obj->getInfoOfVehicleSpecification();
$rurl = pack("H*", $_REQUEST["rurl"]) ;
?>
<script src="/admin/inc/fileUpload/fileUploadJS.js"></script>
<script type="text/javascript">
var _rurl = "<?=$rurl?>";
var _no = "<?=$_REQUEST[no]?>";
$(document).ready(function(){
initFileUpload(101);
//=====프레입웤 변수들==================================================================================//
var FORM_TARGET_CLS_NM = ".data" ; // 폼을 동적 wrap 할 타겟 ID이름
var FORM_NAME = "alf" ; // 폼이름
var FORM_METHOD = "POST" ; // 폼 메쏘드
var FORM_USE_FILE = false ; // 파일폼 사용 여부
var FORM_ACTION = "/action_front.php" ;
var NEXT_CMD = "" ; // 다은 수행 할 cmd
//=====================================================================================================//
var jForm = $(FORM_TARGET_CLS_NM).mf({ "name" : FORM_NAME , "method" : FORM_METHOD , "action" : FORM_ACTION , "useFile" : FORM_USE_FILE }) ;
$(".jCancel").click2(function(){
location.href = _rurl;
});
$(".jSave").click2(function(){
if(confirm("내용을 저장하시겠습니까?")){
$("#jData").ajaxSubmit({
url:"/action_front.php?cmd=AdminBoard.saveVehicleSpecification",
type : "post",
forceSync : true,
dataType : "json",
success : function(data){
alert(data.returnMessage);
location.href = _rurl;
}
});
}
});
}) ;
</script>
<div id="Contents" class="notice">
<h1>특장 제원표</h1>
<!-- location area -->
<h2>
게시물관리 > <span>특장 제원표</span>
</h2>
<!-- location area -->
<div class="data" style="width:80%;">
<form id="jData" method="post" enctype="multipart/form-data">
<table class="datav" style="width:100%;">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tr>
<th style="height:25px;">내용</th>
<td class="l">
<textarea name="content" rows="7" style="width:90%;resize:vertical;"><?=$info["content"]?></textarea>
</td>
</tr>
<tr>
<th style="height:25px;">이미지</th>
<td class="l">
<?
$fileIndex = "101";
$fileName = "imgPath1";
$filePath = ($info["imgPath1"] == "" ? "" : $info["imgPath1"]);
//$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
<input type="hidden" name="imgPath1" value="<?=$info["imgPath1"]?>" />
</td>
</tr>
</table>
</form>
<div class="btngroupcenter">
<!-- <span class="button bigrounded blue jCancel">취소 </span>-->
<span class="button bigrounded blue jSave" >저장</span>
</div>
</div>
</div>
\ No newline at end of file
......@@ -17,22 +17,30 @@ $(document).ready(function(){
<!--<li matchUrl="/admin/userManage/adminUserList.php">
<a href="/admin/userManage/adminUserList.php">관리자 리스트</a>
</li>-->
<li matchUrl="/admin/boardManage/boardList.php">
<a href="/admin/boardManage/boardList.php?boardType=NO">공지사항</a>
</li>
<li matchUrl="/admin/boardManage/boardList.php">
<a href="/admin/boardManage/boardList.php?boardType=EV">이벤트</a>
</li>
<li matchUrl="/admin/boardManage/certificateList.php">
<a href="/admin/boardManage/certificateList.php">기관인정서</a>
</li>
<li matchUrl="/admin/boardManage/productionPortrait.php">
<a href="/admin/boardManage/productionPortrait.php">제작사진</a>
</li>
<li matchUrl="/admin/boardManage/boardList.php">
<a href="/admin/boardManage/boardList.php?boardType=NO">공지사항</a>
</li>
<li matchUrl="/admin/boardManage/boardList.php">
<a href="/admin/boardManage/boardList.php?boardType=EV">이벤트</a>
</li>
<li matchUrl="/admin/boardManage/certificateList.php">
<a href="/admin/boardManage/certificateList.php">기관인정서</a>
</li>
<li matchUrl="/admin/boardManage/vehicleSpecification.php">
<a href="/admin/boardManage/vehicleSpecification.php">특장 제원표</a>
</li>
<li matchUrl="/admin/boardManage/productionPortrait.php">
<a href="/admin/boardManage/productionPortrait.php">제작사진</a>
</li>
<li matchUrl="/admin/boardManage/boardList.php">
<a href="/admin/boardManage/boardList.php?boardType=SM">직원/영업사원 전용게시판</a>
</li>
</ul>
......
......@@ -25,6 +25,9 @@ $(document).ready(function(){
<a href="/admin/userManage/userManagerList.php">직원</a>
</li>
<li matchUrl="/admin/userManage/userSalesList.php">
<a href="/admin/userManage/userSalesList.php">영업사원</a>
</li>
</ul>
......
......@@ -150,7 +150,7 @@ $(document).ready(function() {
else if ($(this).attr("style") == "background: rgb(255, 113, 113);")
$("[name=isAvail][value=-1]").prop("checked", true);
else
$("[name=isAvail][value=0]").prop("checked", true);
$("[name=isAvail][value=1]").prop("checked", true);
targetDate = $(this).attr("data-date");
......@@ -287,7 +287,7 @@ function myFunction(pageY, pageX) {
<br><br><br>
<input type=radio name="isAvail" value="1" style="float:left;"/>제작 가능<br><br>
<input type=radio name="isAvail" value="-1" style="float:left;"/>제작 불가능<br><br>
<input type=radio name="isAvail" value="0" checked style="float:left;"/>없음<br>
<!-- <input type=radio name="isAvail" value="0" checked style="float:left;"/>없음<br>-->
<span style="text-align:center; width:100%; display:inline-block; margin-top: 20px;">
<button class="jSave" style="width: 35%; background-color: #8C8C8C; border : none; color:#FFFFFF; border-radius: 5px;">저장</button>
<button class="jClose" style="width: 35%; background-color: #8C8C8C; border : none; color:#FFFFFF; border-radius: 5px;">닫기</button>
......
<?php
/**
* Created by PhpStorm.
* User: p
* Date: 2017-10-10
* Time: 오후 1:48
*/
?>
<? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminUser.php" ?>
<? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/header.php" ?>
<? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/leftUserManage.php" ?>
<?
$obj = new AdminUser($_REQUEST) ;
$list = $obj->getListOfSales() ;
$vnum = $obj->virtualNum ;
//echo json_encode($list);
?>
<script>
$(document).ready(function(){
//=====프레입웤 변수들==================================================================================//
var FORM_TARGET_CLS_NM = "DIV#Contents" ; // 폼을 동적 wrap 할 타겟 ID이름
var FORM_NAME = "nf" ; // 폼이름
var FORM_METHOD = "GET" ; // 폼 메쏘드
var FORM_USE_FILE = false ; // 파일폼 사용 여부
var FORM_ACTION = document.URL ;
var NEXT_CMD = "" ; // 다은 수행 할 cmd
//=====================================================================================================//
var jForm = $(FORM_TARGET_CLS_NM).mf({ "name" : FORM_NAME , "method" : FORM_METHOD , "action" : FORM_ACTION , "useFile" : FORM_USE_FILE }) ;
// 페이징
$(".jPage").click2(function(){
jForm.ci() ;
jForm.mi("page",$(this).attr("page")) ;
jForm.submit() ;
}) ;
$(".jAutoSearch").change(function(){
jForm.ci() ;
jForm.submit() ;
});
$(".jSearch").click2(function(){
jForm.ci() ;
jForm.submit() ;
});
$(".jViewUser").click2(function(){
var no = $(this).attr("no");
location.href = "/admin/userManage/userSalesView.php?isMS=0&no=" + no + "&rurl=" + jQuery.rich.bin2hex(document.URL);
});
// 회원 탈퇴
$(".jDelUser").click2(function(){
var no = $(this).attr("no");
var noArr = new Array(no);
if(confirm("정말 삭제하시겠습니까?"))
{
deleteUser(noArr);
}
}) ;
$(".jAdd").click2(function(){
location.href="/admin/userManage/userSalesView.php?"+"rurl="+jQuery.rich.bin2hex(document.URL);
}) ;
// 단체 삭제
$(".jDelUserMulti").click2(function(){
var noArr = new Array();
var noCount = $(".jUserNo:checked").length;
if(noCount == 0)
{
alert("삭제할 관리자를 하나 이상 선택해주세요.");
return false;
}
if(confirm("정말 삭제하시겠습니까?"))
{
for(var i = 0; i < noCount; i++ )
{
noArr[i] = $(".jUserNo:checked:eq(" + i + ")").val();
}
deleteUser(noArr);
}
});
$(".jInitialize").click2(function(){
var no = $(this).attr("no");
if(confirm("초기화를 하시겠습니까? \n변경 후 수정은 불가능합니다")){
$.ajax({
url : "/action_front.php?cmd=AdminUser.initializePwd",
async : false,
cache : false,
dataType : "json",
data : {
"userNo" : no
},
success : function(data){
alert(data.returnMessage);
location.reload();
/*
if(_no != "")
location.reload();
else
location.href = _rurl;
*/
}
});
}
});
$(".jBtnMS").click2(function(){
var no = $(this).attr("no");
var member_type = $(this).attr("member_type");
$.ajax({
url : "/action_front.php?cmd=AdminUser.processRequestMemberShipUser",
async : false,
cache : false,
dataType : "json",
data : {
"no" : no
, "member_type" : member_type
},
success : function(data){
alert(data.returnMessage);
location.reload();
}
});
});
$("#jCheckAll").change(function(){
if($(this).is(":checked"))
$(".jUserNo").prop("checked", true);
else
$(".jUserNo").prop("checked", false);
});
}) ;
function deleteUser(noArr)
{
$.ajax({
url : "/action_front.php?cmd=AdminUser.deleteUser",
async : false,
cache : false,
dataType : "json",
data : {
"no" : noArr
},
success : function(data){
alert("삭제되었습니다");
location.reload();
}
});
}
</script>
<div id="Contents" class="notice">
<h1>영업사원</h1>
<div class="data">
<fieldset class="search">
<div class="jSearchArea" >
<label>
<span>조회 조건</span>
<select name="searchType">
<option value="">전체 </option>
<option value="userName" <?=$_REQUEST["searchType"] == "userName" ? "SELECTED" : ""?>>이름</option>
<option value="userID" <?=$_REQUEST["searchType"] == "userID" ? "SELECTED" : ""?>>아이디</option>
<option value="nickName" <?=$_REQUEST["searchType"] == "nickName" ? "SELECTED" : ""?>>닉네임</option>
</select>
<input type="text" id="searchText" name="searchText" class="wm" value="<?=$_REQUEST['searchText']?>" />
</label>
<input type="button" class="button smallgrounded blue jSearch btnright_y" value="검색" />
</div>
</fieldset>
<div class="btngroupright">
<input type="button" class="button smallrounded blue jAdd" value="등록" />
<input type="button" class="button smallrounded blue jDelUserMulti" value="삭제" />
</div>
<table class="datacList">
<thead>
<tr>
<th class="no" width="5%">No</th>
<th width="2%"><input type="checkbox" id="jCheckAll"></th>
<th width="6%">이름</th>
<th width="10%">아이디</th>
<th width="10%">닉네임</th>
<th width="10%">전화번호</th>
<th width="6%">비밀번호 <br>초기화</th>
</tr>
</thead>
<tbody><!-- 10줄 리스트// 마지막 tr에 class="last" 넣어주세요 -->
<? for($i=0; $i<sizeof($list); $i++){ ?>
<tr class="<?=(sizeof($list)-1 == $i) ? "last" : "datacLists"?>">
<td class="no center">
<?=$vnum--?>
</td>
<td class="center">
<input type="checkbox" class="jUserNo" value="<?=$list[$i]["userNo"] ?>" >
</td>
<td class="center">
<?=$list[$i]["userName"]?>
</td>
<td class="center">
<?=$list[$i]["userID"]?>
</td>
<td class="center">
<?=$list[$i]["nickName"]?>
</td>
<td class="center">
<?=$list[$i]["userTel"]?>
</td>
<td class="center">
<input type="button" class="button searchsmall white jInitialize" value="초기화" no="<?=$list[$i]["userNo"]?>" />
</td>
</tr>
<? } ?>
<?if(sizeof($list) == 0){?>
<tr class="last">
<td class="no center" colspan="11">No Data</td>
</tr>
<?}?>
</tbody>
</table>
<!-- Pagination -->
<? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/pageNavigation.php" ?>
<!--//Pagination -->
</div>
<div id="jDialogArea" style="display:none;">
<table class="datav" style="width:100%;">
<tr>
<th style="height:25px; width:70px;">포인트</th>
<td>
<input type="input" id="jAddHeartPoint" value="" style="width:100%;"/>
</td>
</tr>
</table>
</div>
</div>
<? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/footer.php" ?>
<?php
/**
* Created by PhpStorm.
* User: p
* Date: 2017-10-10
* Time: 오후 1:56
*/
?>
<? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminUser.php" ?>
<? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/header.php" ?>
<? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/leftUserManage.php" ?>
<?
$obj = new AdminUser($_REQUEST, "");
//$userInfo = $obj->getInfoOfUser();
$rurl = pack("H*", $_REQUEST["rurl"]) ;
?>
<script language="javascript">
var _rurl = "<?=$rurl != "" ? $rurl : 0?>";
var _no = "<?=$_REQUEST[no] != "" ? $_REQUEST[no] : 0?>";
$(document).ready(function(){
$(".jCancel").click2(function(){
location.href = _rurl;
});
$(".jDelUser").click2(function(){
var noArr = new Array(_no);
if(confirm("정말 삭제하시겠습니까?"))
{
deleteUser(noArr);
}
});
$( '[name=userID]' ).live("blur keyup", function() {
$(this).val( $(this).val().replace( /[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/g, '' ) );
});
$( '[name=userPwd]' ).live("blur keyup", function() {
$(this).val( $(this).val().replace( /[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/g, '' ) );
});
$(".jAdd").click2(function(){
var data = $("#jData").serialize();
var userID=$("[name=userID]").val();
var userPwd=$("[name=userPwd]").val();
var userName=$("[name=userName]").val();
var nickName=$("[name=nickName]").val();
var userTel1=$("[name=userTel1]").val();
var userTel2=$("[name=userTel2]").val();
var userTel3=$("[name=userTel3]").val();
if(userID=="" || userPwd=="" || userName=="" || nickName=="" || userTel1=="" || userTel1=="" || userTel1==""){
alert(" 항목을 모두 입력해 주십시오");
return;
}
if(userID.length<6){
alert("아이디는 영문+숫자조합 6자리 이상이어야 합니다");
return;
}
if(userPwd.length<4){
alert("비밀번호는 영문+숫자조합 4자리 이상이어야 합니다");
return;
}
if(confirm("영업사원 회원 계정을 등록하시겠습니까?")){
$.ajax({
url : "/action_front.php?cmd=AdminUser.saveSalesman",
async : false,
cache : false,
dataType : "json",
data : data,
success : function(data){
alert(data.returnMessage);
if(data.returnCode == "1")
location.href=_rurl;
/*
if(_no != "")
location.reload();
else
location.href = _rurl;
*/
}
});
}
});
$(".jCheckIDRedundancy").click2(function(){
var data = $("#jData").serialize();
$.ajax({
url : "/action_front.php?cmd=AdminUser.checkIDRedundancy",
async : false,
cache : false,
dataType : "json",
data : data,
success : function(data){
alert(data.returnMessage);
}
});
});
$(".jCheckNickRedundancy").click2(function(){
var data = $("#jData").serialize();
$.ajax({
url : "/action_front.php?cmd=AdminUser.checkNickRedundancy",
async : false,
cache : false,
dataType : "json",
data : data,
success : function(data){
alert(data.returnMessage);
}
});
});
}) ;
function deleteUser(noArr)
{
$.ajax({
url : "/action_front.php?cmd=AdminUser.deleteUser",
async : false,
cache : false,
dataType : "json",
data : {
"no" : noArr
},
success : function(data){
//alert("삭제되었습니다");
location.href = _rurl;
}
});
}
</script>
<div id="Contents" class="notice">
<h1>영업사원 등록</h1>
<!-- location area -->
<h2>
회원 관리 > 영업사원 > <span>등록</span>
</h2>
<!-- location area -->
<form id="jData">
<div class="jData" style="width:50%;">
<table class="datav" style="width:100%;">
<colgroup>
<col width="30%" />
<col width="70%" />
</colgroup>
<tr>
<th style="height:25px;">아이디</th>
<td >
<input name="userID" type="text" style="width:200px"/>
<span class="button bigrounded blue jCheckIDRedundancy" style="color:white; width:70px">&nbsp;중복확인&nbsp;</span>
</td>
</tr>
<tr>
<th style="height:25px;">비밀번호</th>
<td >
<input name="userPwd" type="text" style="width:200px"/>
</td>
</tr>
<tr>
<th style="height:25px;">영업사원명</th>
<td class="l">
<input name="userName" type="text" style="width:200px" />
</td>
</tr>
<tr>
<th style="height:25px;">닉네임</th>
<td class="l">
<input name="nickName" type="text" style="width:200px" />
<span class="button bigrounded blue jCheckNickRedundancy" style="color:white; width:70px">&nbsp;중복확인&nbsp;</span>
</td>
</tr>
<tr>
<th style="height:25px;">전화번호</th>
<td class="l">
<input name="userTel1" type="text" style="width:50px"/>&nbsp; - &nbsp;<input name="userTel2" type="text" style="width:50px"/>&nbsp; - &nbsp;<input name="userTel3" type="text" style="width:50px"/>
</td>
</tr>
</table>
<div class="btngroupcenter">
<span class="button bigrounded blue jAdd">등록</span>
</div>
</div>
</form>
</div>
......@@ -123,7 +123,7 @@ if(!class_exists("AdminPush")){
function sendAdminPush()
{
$push_msg = $this->req["pushMessage"];
$push_msg = $this->req["push_msg"];
$push_code = $this->getBulkPushCode();
$push_succeed=0;
......@@ -144,7 +144,6 @@ if(!class_exists("AdminPush")){
$push_succeed = $result["rn"];
$push_msg = $this->req["pushMessage"];
// 푸시 전송
$params = Array(
......
......@@ -360,11 +360,8 @@ if(!class_exists("AdminUser")){
$login_type = $this->admUser["admin_type"];
$target_fk = $this->admUser["target_fk"];
$where = " WHERE status = 1 AND userType=2";
if($searchType == "userName"){
$where.=" AND userName LIKE '%{$searchText}%'";
}
......@@ -379,8 +376,6 @@ if(!class_exists("AdminUser")){
$where.=" AND userNo=0";
}
if($this->req["page"] != "-1")
{
//최초 페이지 설정
......@@ -414,6 +409,63 @@ if(!class_exists("AdminUser")){
//echo json_encode($result);
return $result;
}
function getListOfSales(){
$searchText = $this->req["searchText"];
$searchType=$this->req["searchType"];
$login_type = $this->admUser["admin_type"];
$target_fk = $this->admUser["target_fk"];
$where = " WHERE status = 1 AND userType=3";
if($searchType == "userName"){
$where.=" AND userName LIKE '%{$searchText}%'";
}
if($searchType == "userID"){
$where.=" AND userID LIKE '%{$searchText}%'";
}
if($searchType == "nickName"){
$where.=" AND nickName LIKE '%{$searchText}%'";
}
if($searchText=="" && $searchType != ""){
$where.=" AND userNo=0";
}
if($this->req["page"] != "-1")
{
//최초 페이지 설정
$this->initPage() ;
$sql = "
SELECT COUNT(*) AS rn
FROM tblUser U
{$where}
";
$this->rownum = $this->getValue($sql, 'rn');
//총 로우수를 획득후 페이지 최종 설정
$this->setPage($this->rownum) ;
$limit = " LIMIT {$this->startNum}, {$this->endNum} ; ";
}
$sql = "
SELECT
U.*
FROM tblUser U
{$where}
ORDER BY U.regDate DESC
{$limit}
";
$result = $this->getArray($sql);
//echo json_encode($result);
return $result;
}
function initializePwd(){
$userNo=$this->req["userNo"];
......@@ -524,7 +576,71 @@ if(!class_exists("AdminUser")){
return $this->makeResultJson(1, "등록되었습니다");
}
function saveSalesman(){
$userID=$this->req["userID"];
$userPwd=md5($this->req["userPwd"]);
$userName=$this->req["userName"];
$nickName=$this->req["nickName"];
$userTel1=$this->req["userTel1"];
$userTel2=$this->req["userTel2"];
$userTel3=$this->req["userTel3"];
$userTel=$userTel1.$userTel2.$userTel3;
$sql="
SELECT *
FROM tblUser
WHERE userID='{$userID}' AND status=1
LIMIT 0, 1
";
$result=$this->getRow($sql);
if($result != null)
return $this->makeResultJson(-100, "사용할 수 없는 아이디 입니다");
$sql="
SELECT *
FROM tblUser
WHERE nickName='{$nickName}' AND status=1
LIMIT 0, 1
";
$result=$this->getRow($sql);
if($result != null)
return $this->makeResultJson(-100, "사용할 수 없는 닉네임 입니다");
$sql="
INSERT INTO `tblUser`
(
`userType`,
`userID`,
`userPwd`,
`userName`,
`nickName`,
`userTel`,
`push`,
`status`,
`regDate`)
VALUES
(
3,
'{$userID}',
'{$userPwd}',
'{$userName}',
'{$nickName}',
'{$userTel}',
1,
1,
NOW());
";
$this->update($sql);
return $this->makeResultJson(1, "등록되었습니다");
}
......
......@@ -443,8 +443,8 @@ if(! class_exists("ApiBase") ) {
$Upload = new UploadUtil();
$uploadResult = $Upload->uploadOneFile($_FILES["file"], $this->fileSavePath, "", true);
$logData = "Api : fileUpload // file : {$_FILES["file"]["name"]} //uploadResult : {$uploadResult["returnMessage"]} // returnCode : {$uploadResult["returnCode"]} // savePath : {$uploadResult["fileInfo"]["savePath"]} // re_name : {$uploadResult["fileInfo"]["re_name"]}";
LogUtil::writeFileLog($this->logPath, $logData);
// $logData = "Api : fileUpload // file : {$_FILES["file"]["name"]} //uploadResult : {$uploadResult["returnMessage"]} // returnCode : {$uploadResult["returnCode"]} // savePath : {$uploadResult["fileInfo"]["savePath"]} // re_name : {$uploadResult["fileInfo"]["re_name"]}";
// LogUtil::writeFileLog($this->logPath, $logData);
if( $uploadResult['returnCode'] == "1" ){
......
......@@ -279,7 +279,7 @@ if (! class_exists("ApiBoard"))
$imgPathBoard5 = $this->req["imgPathBoard5"];
$content=$this->req["content"];
$sql="
UPDATE tblBoard
SET
......@@ -303,6 +303,89 @@ if (! class_exists("ApiBoard"))
$this->update($sql);
return $this->makeResultJson("1", "삭제되었습니다");
}
//직원/영업사원 전용 게시판 리스트
function getListOfStaffBoard(){
$sql="
SELECT COUNT(*) rn FROM tblStaffBoard WHERE status=1 ORDER BY regDate DESC
";
$cnt = $this->getValue($sql, "rn");
$this->rownum=$cnt;
$this->initPageForDevice();
$this->setPageForDevice($this->rownum);
$sql="
SELECT * FROM tblStaffBoard WHERE status=1 ORDER BY regDate DESC
LIMIT {$this->startNum}, {$this->endNum}
";
$result = $this->getArray($sql);
return $this->makeResultJson(1, "", $result, Array("totalCount"=>$cnt));
}
//직원/영업사원 전용 게시물 작성 및 수정
function saveStaffBoard(){
$no = $this->req["no"];
$userNo = $this->appUser["no"];
$title = $this->req["title"];
$content = $this->req["content"];
$imgPath1 = $this->req["imgPath1"];
$imgPath2 = $this->req["imgPath2"];
$imgPath3 = $this->req["imgPath3"];
$imgPath4 = $this->req["imgPath4"];
$imgPath5 = $this->req["imgPath5"];
if($no == ""){
$sql="
INSERT INTO tblStaffBoard(userFk, title, content, imgPathSBoard1, imgPathSBoard2, imgPathSBoard3, imgPathSBoard4, imgPathSBoard5, status, regDate)
VALUES
(
'{$userNo}',
'{$title}',
'{$content}',
'{$imgPath1}',
'{$imgPath2}',
'{$imgPath3}',
'{$imgPath4}',
'{$imgPath5}',
1,
NOW()
)
";
$retMsg = "등록되었습니다";
}
else{
$sql="
UPDATE tblStaffBoard
SET
title = '{$title}',
content = '{$content}',
imgPathSBoard1 = '{$imgPath1}',
imgPathSBoard2 = '{$imgPath1}',
imgPathSBoard3 = '{$imgPath1}',
imgPathSBoard4 = '{$imgPath1}',
imgPathSBoard5 = '{$imgPath1}',
";
$retMsg = "수정되었습니다";
}
$this->update($sql);
return $this->makeResultJson(1,$retMsg);
}
//직원/영업사원 전용 게시물 상세정보
function getInfoOfStaffBoard(){
$no = $this->req["no"];
$sql=" SELECT * FROM tblStaffBoard WHERE sBoardNo = '{$no}'";
$result = $this->getRow($sql);
return $this->makeResultJson(1, "", $result);
}
//고객센터 게시물 저장
function saveCS(){
......@@ -584,8 +667,8 @@ if (! class_exists("ApiBoard"))
$content=$this->req["content"];
$parentNo=$this->req["parentNo"]; //부모 댓글의 기본키
$logData = "Api : saveComment // userFk : {$userFk} ";
LogUtil::writeFileLog($this->logPath, $logData);
// $logData = "Api : saveComment // userFk : {$userFk} ";
// LogUtil::writeFileLog($this->logPath, $logData);
if(empty($parentNo)){ //부모가 없을 때
......@@ -1019,10 +1102,18 @@ if (! class_exists("ApiBoard"))
}
function getListOfProductionPortrait(){
$type = $this->req["type"];
$where = "WHERE status=1";
if($type)
$where.=" AND productionType = '{$type}'";
$sql="
SELECT COUNT(*) AS rn
FROM tblProductionPortrait
WHERE status=1
{$where}
ORDER BY regDate DESC
";
$this->initPageForDevice();
......@@ -1034,7 +1125,7 @@ if (! class_exists("ApiBoard"))
$sql="
SELECT ppNo, title, regDate
FROM tblProductionPortrait
WHERE status=1
{$where}
ORDER BY regDate DESC
LIMIT {$this->startNum}, {$this->endNum}
";
......
......@@ -31,6 +31,17 @@ if (! class_exists("ApiStatic")){
$list=$this->getArray($sql);
return $this->makeResultJson("1", "", $list);
}
function getVehicleSpecification(){
$sql="
SELECT *
FROM tblVehicleSpecification
WHERE specNo='1'
";
$result = $this->getRow($sql);
return $this->makeResultJson(1, "", $result);
}
function getInfoOfOrganizationCert(){
$certNo=$this->req["certNo"];
......
......@@ -54,6 +54,28 @@ if (! class_exists("AdminBoard")){
$result=$this->getArray($sql);
return $result;
}
else if($boardType == "SM"){
$sql="
SELECT COUNT(*) AS rn
FROM tblStaffBoard
WHERE status=1
";
$this->initPage();
$this->rownum=$this->getValue($sql, 'rn');
$this->setPage($this->rownum);
$limit=" LIMIT {$this->startNum}, {$this->endNum} ;";
$sql="
SELECT sBoardNo AS no, title, DATE_FORMAT(regDate, '%Y%m%d') AS regDate
FROM tblStaffBoard
WHERE status=1
ORDER BY regDate DESC
{$limit}
";
$result=$this->getArray($sql);
return $result;
}
}
function getInfoOfBoard(){
......@@ -79,6 +101,16 @@ if (! class_exists("AdminBoard")){
$result=$this->getRow($sql);
return $result;
}
else if($boardType == "SM"){
$sql="
SELECT sBoardNo AS no, title, imgPathSBoard1 AS imgPath1, imgPathSBoard2 AS imgPath2, imgPathSBoard3 AS imgPath3, imgPathSBoard4 AS imgPath4, imgPathSBoard5 AS imgPath5, content, regDate
FROM tblStaffBoard
WHERE sBoardNo='{$boardNo}'
";
$result=$this->getRow($sql);
return $result;
}
}
function getListOfEComment($boardNo){
......@@ -173,6 +205,35 @@ if (! class_exists("AdminBoard")){
$this->update($sql);
return $this->makeResultJson(1, "이벤트가 저장되었습니다");
}
else if($boardType == "SM"){
$sql="
INSERT INTO `tblStaffBoard`
(
`title`,
`imgPathSBoard1`,
`imgPathSBoard2`,
`imgPathSBoard3`,
`imgPathSBoard4`,
`imgPathSBoard5`,
`content`,
`status`,
`regDate`)
VALUES
(
'{$title}',
'{$imgPath1}',
'{$imgPath2}',
'{$imgPath3}',
'{$imgPath4}',
'{$imgPath5}',
'{$content}',
1,
NOW()
);
";
$this->update($sql);
return $this->makeResultJson(1, "직원/영업사원 전용 게시물이 저장되었습니다");
}
}
else{
if($boardType=="NO"){
......@@ -207,6 +268,22 @@ if (! class_exists("AdminBoard")){
$this->update($sql);
return $this->makeResultJson(1, "이벤트가 수정되었습니다");
}
else if($boardType == "SM"){
$sql="
UPDATE `tblStaffBoard`
SET
`title` = '{$title}',
`imgPathSBoard1` = '{$imgPath1}',
`imgPathSBoard2` = '{$imgPath2}',
`imgPathSBoard3` = '{$imgPath3}',
`imgPathSBoard4` = '{$imgPath4}',
`imgPathSBoard5` = '{$imgPath5}',
`content` = '{$content}'
WHERE `sBoardNo` = '{$no}';
";
$this->update($sql);
return $this->makeResultJson(1, "직원/영업사원 전용 게시물이 수정되었습니다");
}
}
}
......@@ -231,6 +308,14 @@ if (! class_exists("AdminBoard")){
";
$this->update($sql);
}
else if($boardType == "SM"){
$sql="
UPDATE tblStaffBoard
SET status = 0
WHERE `sBoardNo` IN({$noStr})
";
$this->update($sql);
}
}
......@@ -302,6 +387,37 @@ if (! class_exists("AdminBoard")){
return $this->makeResultJson(1, "수정되었습니다");
}
}
//특장 제원표 저장
function saveVehicleSpecification(){
$imgResult = $this->inFn_Common_fileSave($_FILES);
$imgPathSpec = $imgResult["imgPath1"]["saveURL"] != "" ? $imgResult["imgPath1"]["saveURL"] : $this->req["imgPath"];
$content = $this->req["content"];
$sql="
INSERT INTO tblVehicleSpecification(specNo, content, imgPath1)
VALUES (
1,
'{$content}',
'{$imgPathSpec}'
)
ON DUPLICATE KEY UPDATE
content='{$content}',
imgPath1 = '{$imgPathSpec}'
";
$this->update($sql);
return $this->makeResultJson(1, "저장되었습니다");
}
//특장 제원표 정보
function getInfoOfVehicleSpecification(){
$sql="SELECT * FROM tblVehicleSpecification WHERE specNo = '1'";
$result = $this->getRow($sql);
return $result;
}
function deleteCert(){
$noArr = $this->req["no"];
......@@ -466,6 +582,7 @@ if (! class_exists("AdminBoard")){
function saveProductionPortrait(){
$ppNo=$this->req["no"];
$productionType = $this->req["productionType"];
$title=$this->req["title"];
$content1=$this->req["content1"];
$content2=$this->req["content2"];
......@@ -495,6 +612,7 @@ if (! class_exists("AdminBoard")){
$sql="
INSERT INTO `tblProductionPortrait`
(
`productionType`,
`title`,
`content1`,
`content2`,
......@@ -521,6 +639,7 @@ if (! class_exists("AdminBoard")){
)
VALUES
(
'{$productionType}',
'{$title}',
'{$content1}',
'{$content2}',
......@@ -553,6 +672,7 @@ if (! class_exists("AdminBoard")){
$sql="
UPDATE `tblProductionPortrait`
SET
`productionType` = '{$productionType}',
`title` = '{$title}',
`content1` = '{$content1}',
`content2` = '{$content2}',
......
......@@ -389,8 +389,8 @@ if (! class_exists("Common"))
if($resPhone == "" && $resPhone == "")
{
$logData = "Api : sendSMS // reqPhone : {$reqPhone} //resPhone : {$resPhone} // 발송실패";
LogUtil::writeFileLog($this->logPath, $logData);
// $logData = "Api : sendSMS // reqPhone : {$reqPhone} //resPhone : {$resPhone} // 발송실패";
// LogUtil::writeFileLog($this->logPath, $logData);
return false;
}
......@@ -413,8 +413,8 @@ if (! class_exists("Common"))
$returnMsg = $sms->errMsg;
}
$logData = "Api : sendSMS // reqPhone : {$reqPhone} //resPhone : {$resPhone} // 메세지 : {$sendStr} // 발송여부 : {$returnMsg} // 잔여정보 : {$smsInfo}";
LogUtil::writeFileLog($this->logPath, $logData);
// $logData = "Api : sendSMS // reqPhone : {$reqPhone} //resPhone : {$resPhone} // 메세지 : {$sendStr} // 발송여부 : {$returnMsg} // 잔여정보 : {$smsInfo}";
// LogUtil::writeFileLog($this->logPath, $logData);
return $retunrVal;
}
......
......@@ -27,7 +27,7 @@ if(! class_exists("Constants") )
var $fileSaveUrl_480 = "/480/" ;
var $dbHost = "182.161.118.74" ;
var $dbHost = "1.201.142.86" ;
var $dbName = "kcSpecialVehicle" ;
var $dbUser = "root" ;
var $dbPass = "$#@!richware7" ;
......
......@@ -9,7 +9,7 @@ if(! class_exists("Push") ) {
public $pushNo = "" ;
public $pushBadge = "0";
private $gcm_key = "AIzaSyB2dCs0PHflZYKnlrhF5bNZl_z7FYRYqfY" ; // 동네
private $gcm_key = "AAAA9dR5CVk:APA91bHRB85BDeqQkl4hR5FU_9aYxQQGxoMFRrbEwdZrKbPidsFJbYhwzLuy6hYtrB4jR1JzagNhf00OIrJd00NdMH9QhSPAzAg9tkzk2AWQ6LISQKXor5aK-N9czVVxfuD3HDm6X4Cg" ; // 동네
private $gcm_key2 = "AIzaSyBmoURv31T4FLmsf_SwoLRRZRijktAMzO0"; // 직장
//private $gcm_key = "AIzaSyB2dCs0PHflZYKnlrhF5bNZl_z7FYRYqfY";
......
......@@ -136,7 +136,7 @@ if(! class_exists("LoginUtil")){
$map['name'] = $aUser[3] ;
$map['userType'] = $aUser[4] ;
$map['userTel'] = $aUser[5] ;
$map['deviceTypeID']= $aUeser[6];
$map['deviceTypeID']= $aUser[6];
}
$aUser = explode(chr(self::$spliter),$cookieStr);
......@@ -146,7 +146,7 @@ if(! class_exists("LoginUtil")){
$map['name'] = $aUser[3] ;
$map['userType'] = $aUser[4] ;
$map['userTel'] = $aUser[5] ;
$map['deviceTypeID']= $aUeser[6];
$map['deviceTypeID']= $aUser[6];
if( LoginUtil::isAppLogin() == false )
{
......