fbaee16f by sayhoChun

project finished

1 parent fd91b0e8
......@@ -13,23 +13,17 @@
<? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminEtc.php" ; ?>
<? include $_SERVER["DOCUMENT_ROOT"] . "/common/php/AnyGo.php" ;?>
<? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/ApiStatic.php" ;?>
<? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminProductionSpec.php" ; ?>
<?
$cmd = $_REQUEST[cmd] ;
// Ajax , ToO , ToS , ToPbyRef , ToOandClose , ReOandClose , ReOandToS ,
// Close , ToP , RePa , None
// $url = pack("H*",$_REQUEST[rurl]);
// echo $url ;
// echo $cmd . " ////////////// ";
$nextDisable = false ; // 디버깅용
$arr = explode(".", $cmd) ;
if( sizeof($arr) != 2 )
echo "[ControlException ] Cmd 형식이 맞지 않습니다." ;
else
......@@ -39,11 +33,8 @@
//var_dump();
$obj = new ReflectionClass($clsNm) ;
$obj= $obj->newInstance($_REQUEST) ;
$method = new ReflectionMethod($clsNm,$mtdNm) ;
$flow = $_REQUEST[flow] ;
if( $flow == "Ajax" || $flow == "" ) // JSON 이나 AJAX 일경우
echo $method->invoke($obj) ;
else
......@@ -54,18 +45,13 @@
$rurl = $_REQUEST[rurl] ;
$msg = $_REQUEST[msg] ;
$flow = $_REQUEST[flow] ;
if( $flow == "" )
echo "[ControlException ] flow 형식이 맞지 않습니다." ;
else
{
go("NORMAL",$flow,$msg,$rurl) ;
}
}
}
}
?>
\ No newline at end of file
......
<? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminUser.php" ?>
<? 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 AdminUser($_REQUEST) ;
$obj = new AdminBoard($_REQUEST) ;
//$list = $obj->getListOfUser() ;
$list = $obj->getListOfProductionPortrait() ;
$boardType=$_REQUEST["boardType"];
$vnum = $obj->virtualNum ;
?>
......@@ -73,11 +73,11 @@
// 단체 삭제
$(".jDelUserMulti").click2(function(){
$(".jDelMulti").click2(function(){
var noArr = new Array();
var noCount = $(".jUserNo:checked").length;
var noCount = $(".jNo:checked").length;
if(noCount == 0)
{
......@@ -90,10 +90,10 @@
{
for(var i = 0; i < noCount; i++ )
{
noArr[i] = $(".jUserNo:checked:eq(" + i + ")").val();
noArr[i] = $(".jNo:checked:eq(" + i + ")").val();
}
deleteUser(noArr);
deleteAction(noArr);
}
});
......@@ -130,10 +130,10 @@
function deleteUser(noArr)
function deleteAction(noArr)
{
$.ajax({
url : "/action_front.php?cmd=AdminUser.deleteUser",
url : "/action_front.php?cmd=AdminBoard.deleteProductionPortrait",
async : false,
cache : false,
dataType : "json",
......@@ -184,16 +184,16 @@
<?=$vnum--?>
</td>
<td class="center">
<input type="checkbox" class="jUserNo" value="<?=$list[$i]["no"] ?>" >
<input type="checkbox" class="jNo" value="<?=$list[$i]["ppNo"] ?>" >
</td>
<td class="center">
<?=$list[$i]["title"]?>
</td>
<td class="center">
<?=$list[$i]["regDate"]?>
</td>
<td class="center">
<input type="button" class="button searchsmall white jView" value="상세보기" no="<?=$list[$i]["no"]?>" />
<input type="button" class="button searchsmall white jView" value="상세보기" no="<?=$list[$i]["ppNo"]?>" />
</td>
</tr>
......
<? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminOperate.php" ?>
<? 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 AdminOperate($_REQUEST, "");
//$info = $obj->getInfoOfShop();
$obj = new AdminBoard($_REQUEST, "");
$info = $obj->getInfoOfProductionPortrait();
//$cateCodeList = $obj->getShopCategoryCodeList();
//$shopImgList = $obj->getShopImgList($info["no"]);
......@@ -17,6 +17,7 @@
<script type="text/javascript">
var _rurl = "<?=$rurl?>";
var _no = "<?=$_REQUEST[no]?>";
var total = 10;
function MultiArticle(sTitle, sC, sCt, sImg){
this.title = sTitle;
......@@ -29,10 +30,26 @@
var multiArray = new Array();
for(var i = 1; i <= 10; i++){
for(var i = 1; i <= total; i++){
multiArray[i] = new MultiArticle("", i, "", 0);
}
$.ajax({
url : "/action_front.php?cmd=AdminBoard.getInfoOfProductionPortraitForJson",
dataType : "json",
data : {no : $("#articleNum").val()},
success : function(data){
for(var i = 1; i <= total; i++){
multiArray[i] = new MultiArticle(data['title'], i, data['content' + i], 0);
}
$("#mContent").val(multiArray[1].contents);
},
error : function(param1, param2, param3){
alert(param1 + "<br>" + param2 + "<br>" + param3);
}
});
init();
<?if($admin_type == 3) { ?>
......@@ -74,13 +91,11 @@
$("#category").click(function(){
var currentNum = $(this).val();
multiArray[currentNum].title = $("#mTitle").val();
multiArray[currentNum].contents = $("#mContent").val();
});
$("#category").change(function(){
var currentNum = $(this).val();
$("#mTitle").val(multiArray[currentNum].title);
$("#mContent").val(multiArray[currentNum].contents);
toggleHide(currentNum);
......@@ -93,10 +108,22 @@
}
}
$(".jSave").click2(function(){
function pickupRows(){
var noArr = new Array();
multiArray[$("#category").val()].contents=$("#mContent").val();
for(var i = 1; i <= 10; i++ ){
$("#content" + (i)).val(multiArray[i]["contents"]);
}
}
$(".jSave").click2(function(){
pickupRows();
$("#jData").ajaxSubmit({
url:"/action_front.php?cmd=AdminOperate.saveShop",
url:"/action_front.php?cmd=AdminBoard.saveProductionPortrait",
type : "post",
forceSync : true,
dataType : "json",
......@@ -172,7 +199,20 @@
<div class="data" style="width:80%;">
<form id="jData" method="post" enctype="multipart/form-data">
<input type="hidden" name="no" value="<?=$_REQUEST[no]?>" />
<input type="hidden" name="no" id="articleNum" value="<?=$_REQUEST[no]?>" />
<input type="hidden" id="content1" name="content1" value="" />
<input type="hidden" id="content2" name="content2" value="" />
<input type="hidden" id="content3" name="content3" value="" />
<input type="hidden" id="content4" name="content4" value="" />
<input type="hidden" id="content5" name="content5" value="" />
<input type="hidden" id="content6" name="content6" value="" />
<input type="hidden" id="content7" name="content7" value="" />
<input type="hidden" id="content8" name="content8" value="" />
<input type="hidden" id="content9" name="content9" value="" />
<input type="hidden" id="content10" name="content10" value="" />
<table class="datav" style="width:100%;">
<colgroup>
<col width="10%" />
......@@ -181,7 +221,7 @@
<tr>
<th style="height:25px;">제목</th>
<td class="l">
<input type="text" id="mTitle" class="wl" style="width:70%;" value="" />
<input type="text" name="title" id="mTitle" class="wl" style="width:70%;" value="<?=$info["title"]?>" />
</td>
</tr>
<tr>
......@@ -204,7 +244,7 @@
<tr>
<th style="height:25px;">내용</th>
<td class="l">
<textarea name="special_contract" rows="7" id="mContent" style="width:90%;resize:vertical;"><?=$info["special_contract"]?></textarea>
<textarea rows="7" id="mContent" style="width:90%;resize:vertical;"><?=$info["special_contract"]?></textarea>
</td>
</tr>
......@@ -214,91 +254,101 @@
<?
$fileIndex = "101";
$fileName = "img01";
$filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
$filePath = ($info["imgPathPP1"] == "" ? "" : $info["imgPathPP1"]);
//$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
<input type="hidden" name="imgPathPP1" value="<?=$info["imgPathPP1"]?>" />
</td>
<td class="imgFiles" no=2>
<?
$fileIndex = "102";
$fileName = "img02";
$filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
$filePath = ($info["imgPathPP2"] == "" ? "" : $info["imgPathPP2"]);
//$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
<input type="hidden" name="imgPathPP2" value="<?=$info["imgPathPP2"]?>" />
</td>
<td class="imgFiles" no=3>
<?
$fileIndex = "103";
$fileName = "img03";
$filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
$filePath = ($info["imgPathPP3"] == "" ? "" : $info["imgPathPP3"]);
//$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
<input type="hidden" name="imgPathPP3" value="<?=$info["imgPathPP3"]?>" />
</td>
<td class="imgFiles" no=4>
<?
$fileIndex = "104";
$fileName = "img04";
$filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
$filePath = ($info["imgPathPP4"] == "" ? "" : $info["imgPathPP4"]);
//$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
<input type="hidden" name="imgPathPP4" value="<?=$info["imgPathPP4"]?>" />
</td>
<td class="imgFiles" no=5>
<?
$fileIndex = "105";
$fileName = "img05";
$filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
$filePath = ($info["imgPathPP5"] == "" ? "" : $info["imgPathPP5"]);
//$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
<input type="hidden" name="imgPathPP5" value="<?=$info["imgPathPP5"]?>" />
</td>
<td class="imgFiles" no=6>
<?
$fileIndex = "106";
$fileName = "img06";
$filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
$filePath = ($info["imgPathPP6"] == "" ? "" : $info["imgPathPP6"]);
//$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
<input type="hidden" name="imgPathPP6" value="<?=$info["imgPathPP6"]?>" />
</td>
<td class="imgFiles" no=7>
<?
$fileIndex = "107";
$fileName = "img07";
$filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
$filePath = ($info["imgPathPP7"] == "" ? "" : $info["imgPathPP7"]);
//$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
<input type="hidden" name="imgPathPP7" value="<?=$info["imgPathPP7"]?>" />
</td>
<td class="imgFiles" no=8>
<?
$fileIndex = "108";
$fileName = "img08";
$filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
$filePath = ($info["imgPathPP8"] == "" ? "" : $info["imgPathPP8"]);
//$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
<input type="hidden" name="imgPathPP8" value="<?=$info["imgPathPP8"]?>" />
</td>
<td class="imgFiles" no=9>
<?
$fileIndex = "109";
$fileName = "img09";
$filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
$filePath = ($info["imgPathPP9"] == "" ? "" : $info["imgPathPP9"]);
//$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
<input type="hidden" name="imgPathPP9" value="<?=$info["imgPathPP9"]?>" />
</td>
<td class="imgFiles" no=10>
<?
$fileIndex = "110";
$fileName = "img10";
$filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
$filePath = ($info["imgPathPP10"] == "" ? "" : $info["imgPathPP10"]);
//$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
<input type="hidden" name="imgPathPP10" value="<?=$info["imgPathPP10"]?>" />
</td>
</tr>
......
<? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminUser.php" ?>
<? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminBoard.php" ?>
<? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/header.php" ?>
<? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/leftCustomerService.php" ?>
<?
$obj = new AdminUser($_REQUEST) ;
$obj = new AdminBoard($_REQUEST) ;
//$list = $obj->getListOfUser() ;
$boardType=$_REQUEST["boardType"];
$list = $obj->getListOfCS() ;
$vnum = $obj->virtualNum ;
?>
<script>
......@@ -73,11 +72,11 @@
// 단체 삭제
$(".jDelUserMulti").click2(function(){
$(".jDelMulti").click2(function(){
var noArr = new Array();
var noCount = $(".jUserNo:checked").length;
var noCount = $(".jNo:checked").length;
if(noCount == 0)
{
......@@ -90,7 +89,7 @@
{
for(var i = 0; i < noCount; i++ )
{
noArr[i] = $(".jUserNo:checked:eq(" + i + ")").val();
noArr[i] = $(".jNo:checked:eq(" + i + ")").val();
}
deleteUser(noArr);
......@@ -121,9 +120,9 @@
$("#jCheckAll").change(function(){
if($(this).is(":checked"))
$(".jUserNo").prop("checked", true);
$(".jNo").prop("checked", true);
else
$(".jUserNo").prop("checked", false);
$(".jNo").prop("checked", false);
});
}) ;
......@@ -133,7 +132,7 @@
function deleteUser(noArr)
{
$.ajax({
url : "/action_front.php?cmd=AdminUser.deleteUser",
url : "/action_front.php?cmd=AdminBoard.deleteCS",
async : false,
cache : false,
dataType : "json",
......@@ -184,16 +183,19 @@
<?=$vnum--?>
</td>
<td class="center">
<input type="checkbox" class="jUserNo" value="<?=$list[$i]["no"] ?>" >
<input type="checkbox" class="jNo" value="<?=$list[$i]["csNo"] ?>" >
</td>
<td class="center">
<?=$list[$i]["userName"]?>
</td>
<td class="center">
<?=$list[$i]["title"]?>
</td>
<td>
<?=$list[$i]["regDate"]?>
</td>
<td class="center">
<input type="button" class="button searchsmall white jView" value="상세보기" no="<?=$list[$i]["no"]?>" />
<input type="button" class="button searchsmall white jView" value="상세보기" no="<?=$list[$i]["csNo"]?>" />
</td>
</tr>
......
<? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminOperate.php" ?>
<? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminProductionSpec.php" ?>
<? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/header.php" ?>
<? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/leftProductionSpecManage.php" ?>
<?
$obj = new AdminOperate($_REQUEST, "") ;
//$list = $obj->getListOfRoomForPayment();
$obj = new AdminProductionSpec($_REQUEST) ;
$list=$obj->getListOfProductionSpec();
$vnum = $obj->virtualNum ;
?>
<script>
......@@ -90,7 +89,6 @@
});
// 단체 삭제
$(".jDelMulti").click2(function(){
......@@ -133,7 +131,7 @@
function deleteAction(noArr)
{
$.ajax({
url : "/action_front.php?cmd=AdminRent.delBuilding",
url : "/action_front.php?cmd=AdminProductionSpec.deleteProductionSpec",
async : false,
cache : false,
dataType : "json",
......@@ -141,7 +139,11 @@
"no" : noArr
},
success : function(data){
alert("삭제되었습니다");
location.reload();
},
error : function(a, b, c){
alert(a+b+c);
}
});
}
......@@ -163,13 +165,16 @@
<label>
<span>조회 조건</span>
<select value="asda" style="margin-right:20px;">
<option>asdasd</option>
<select name="searchType" style="margin-right:20px;">
<option value="">전체</option>
<option value="CN" <?=$_REQUEST[searchType] == "CN" ? "SELECTED" : ""?>>상호명</option>
<option value="PN" <?=$_REQUEST[searchType] == "PN" ? "SELECTED" : ""?>>제품명</option>
<option value="MN" <?=$_REQUEST[searchType] == "MN" ? "SELECTED" : ""?>>담당자</option>
</select>
</label>
<label>
<input type="text" id="search_room" name="search_room" class="wm" value="<?=$_REQUEST['search_room']?>" />
<input type="text" id="searchText" name="searchText" class="wm" value="<?=$_REQUEST['searchText']?>" />
</label>
......@@ -181,9 +186,9 @@
<label>
<span>기간 설정</span>
<input type="text" value="<?=$_REQUEST['rent_date_former']?>" id="rent_date_former" name="rent_date_former" class="jRsvDate" />
<input type="text" value="<?=$_REQUEST['dateFormer']?>" id="dateFormer" name="dateFormer" class="jRsvDate" />
&nbsp;~&nbsp;
<input type="text" value="<?=$_REQUEST['rent_date_latter']?>" id="rent_date_latter" name="rent_date_latter" class="jRsvDate" />
<input type="text" value="<?=$_REQUEST['dateLatter']?>" id="dateLatter" name="dateLatter" class="jRsvDate" />
</label>
......@@ -215,56 +220,29 @@
<?=$vnum--?>
</td>
<td class="center">
<input type="checkbox" class="jNo" value="<?=$list[$i]["no"] ?>" >
</td>
<!--//건물이름-->
<td class="center">
<?=$list[$i]["Bname"]?>
<input type="checkbox" class="jNo" value="<?=$list[$i]["productionNo"] ?>" >
</td>
<!--//호실 -->
<td class="center">
<?=$list[$i]["Rname"]?>
<?=$list[$i]["regDate"]?>
</td>
<!--//지난달 월세 -->
<td class="center">
<?
if($list[$i]["rent_paid"]==NULL) echo "";
else if($list[$i]["rent_paid"]==0) echo "연체";
else if($list[$i]["rent_paid"]==1) echo "납입";
else echo "청구중";
?>
<?=$list[$i]["companyName"]?>
</td>
<!--//월 납입일 -->
<td class="center">
<?=$list[$i]["monthly_rent_date"]?>
</td>
<!--//지난달 공과금 -->
<td class="center">
<?
if($list[$i]["bill_paid"]==NULL) echo "";
else if($list[$i]["bill_paid"]==0) echo "연체";
else if($list[$i]["bill_paid"]==1) echo "납입";
else echo "청구중";
?>
<?=$list[$i]["productName"]?>
</td>
<!--//공과금 납입일 -->
<td class="center">
<?=$list[$i]["billing_date"]?>
</td>
<!--//퇴실예정일 -->
<td class="center">
<?=$list[$i]["leaving_due_date"]?>
<?=$list[$i]["userName"]?>
</td>
<td class="center">
<input type="button" class="button searchsmall white jView" value="상세보기" no="<?=$list[$i]["no"]?>" />
<input type="button" class="button searchsmall white jView" value="상세보기" no="<?=$list[$i]["productionNo"]?>" />
</td>
</tr>
......
......@@ -6,11 +6,21 @@
//$list = $obj->getListOfAdminPush() ;
$vnum = $obj->virtualNum ;
$rurl = pack("H*", $_REQUEST["rurl"]) ;
?>
<script>
var _rurl = "<?=$rurl?>";
$(document).ready(function(){
$.ajax({
url : "/setting/agree.txt",
dataType : "html",
success : function(data){
$("#content").val(data);
}});
//=====프레입웤 변수들==================================================================================//
var FORM_TARGET_CLS_NM = "DIV#Contents" ; // 폼을 동적 wrap 할 타겟 ID이름
var FORM_NAME = "nf" ; // 폼이름
......@@ -42,224 +52,48 @@
jForm.submit() ;
});
$(".jSearchGroup").click2(function(){
var title = "그룹 검색";
$('#jDialogArea').dialog({
modal : true,
title : title,
open : function(event, ui) { $(".ui-dialog-titlebar-close").hide(); },
width : 400,
height : 500,
resizable : false,
buttons: [
{
text: "확인",
click: function() {
var group_no = $(".jTargetNo:checked").val();
var group_name = $(".jTargetNo:checked").parents("tr").find(".jTargetName").attr("data");
if(group_no == undefined)
{
alert("대상을 선택해주세요.");
return false;
}
else
{
$("#group_no").val(group_no);
$("#group_name").val(group_name);
$( this ).dialog( "close" );
$("#jTargetSearchText").val("");
$("#jSearchResultArea").empty();
}
}
},
{
text: "닫기",
click: function() {
$("#jTargetSearchText").val("");
$("#jSearchResultArea").empty();
$( this ).dialog( "close" );
}
}
],
closeOnEscape: false
});
});
$(".jSearchPrivate").click2(function(){
var title = "회원 검색";
$('#jDialogAreaP').dialog({
modal : true,
title : title,
open : function(event, ui) { $(".ui-dialog-titlebar-close").hide(); },
width : 400,
height : 500,
resizable : false,
buttons: [
{
text: "확인",
click: function() {
var group_no = $(".jTargetNo:checked").val();
var group_name = $(".jTargetNo:checked").parents("tr").find(".jTargetName").attr("data");
if(group_no == undefined)
{
alert("대상을 선택해주세요.");
return false;
}
else
{
$("#group_no").val(group_no);
$("#group_name").val(group_name);
$( this ).dialog( "close" );
$("#jTargetSearchText").val("");
$("#jSearchResultArea").empty();
}
}
},
{
text: "닫기",
click: function() {
$("#jTargetSearchText").val("");
$("#jSearchResultArea").empty();
$( this ).dialog( "close" );
}
}
],
closeOnEscape: false
});
});
$(".jTargetSearchBtn").click2(function(){
var search_text = $("#jTargetSearchText").val();
var ajax_url = "/admin/entity/entityGroupSearch.php";
if(search_text == "")
{
alert("검색어를 입력해주세요.");
return false;
}
$("#type").change(function(){
if($("#type").val() == "PR"){
$.ajax({
url : ajax_url,
data : {
"search_text" : search_text
},
dataType:"html",
success : function(data)
{
$("#jSearchResultArea").html(data);
setSearchAreaEventHandler();
url : "/setting/privacy.txt",
dataType : "html",
success : function(data){
$("#content").val(data);
}
});
});
$(".jTargetSearchPBtn").click2(function(){
var search_text = $("#jTargetSearchTextP").val();
var ajax_url = "/admin/entity/entityPrivateSearch.php";
if(search_text == "")
{
alert("검색어를 입력해주세요.");
return false;
}
else{
$.ajax({
url : ajax_url,
data : {
"search_text" : search_text
},
dataType:"html",
success : function(data)
{
$("#jSearchResultAreaP").html(data);
setSearchAreaEventHandler();
url : "/setting/agree.txt",
dataType : "html",
success : function(data){
$("#content").val(data);
}
});
});
$("#push_target_type").change(function(){
resetTargetData();
if($(this).val() == "1")
{
$("#jGroupArea").hide();
$("#jPrivateArea").hide();
}
else if($(this).val() == "2")
{
$("#jGroupArea").show();
$("#jPrivateArea").hide();
}else{
$("#jGroupArea").hide();
$("#jPrivateArea").show();
}
});
$(".jSave").click2(function(){
var push_msg = $("#push_msg").val();
var push_target_type = $("#push_target_type").val();
var group_no = $("#group_no").val();
if(push_target_type == "2" && group_no == "")
{
alert("그룹을 선택해주세요.");
return false;
if(confirm("내용을 저장하시겠습니까?")){
$("#jData").ajaxSubmit({
url:"/action_front.php?cmd=AdminPush.saveAgreement",
type : "post",
forceSync : true,
dataType : "json",
success : function(data){
alert(data.returnMessage);
location.href = _rurl;
}
if(push_msg == "")
{
alert("푸시 내용을 입력해주세요.");
return false;
});
}
$.ajax({
url : "/action_front.php?cmd=AdminPush.sendAdminPush",
async : true,
cache : false,
dataType : "json",
data : {
"push_msg" : push_msg,
"push_target_type" : push_target_type,
"group_no" : group_no
}, success : function(data) {
alert(data.returnMessage) ;
if(data.returnCode == 1) {
location.reload();
}
}
});
});
}) ;
function setSearchAreaEventHandler()
{
$(".jTargetNo").unbind("change");
$(".jTargetNo").change(function(){
$(".jTargetNo").prop("checked", false);
$(this).prop("checked", true);
});
}
function resetTargetData()
{
$("#group_no").val("");
$("#group_name").val("");
}
......@@ -271,28 +105,31 @@
<h1>약관 관리</h1>
<h2>푸시관리 > <span>약관관리</span></h2>
<div class="data">
<form id="jData" method="post" enctype="multipart/form-data">
<table class="datav" style="width:100%;">
<colgroup>
<col width="20%" />
<col width="80%" />
</colgroup>
<tr>
<th style="height:25px;">제목</th>
<td class="l">
<input type="text" style="width:95%"/>
<th style="height:25px;">약관 종류</th>
<td>
<select id="type" name="type">
<option value="AG">이용약관</option>
<option value="PR">개인정보처리방침</option>
</select>
</td>
</tr>
<tr>
<th style="height:25px;">내용</th>
<td class="l">
<textarea rows="25" style="width:95%;" id="push_msg"></textarea>
<textarea rows="25" style="width:95%;" id="content" name="content"><?=$info?></textarea>
</td>
</tr>
</table>
</form>
<div class="btngroupcenter" style="width:100%;">
<span class="button bigrounded blue jSave" >전송</span>
<span class="button bigrounded blue jSave" >등록</span>
</div>
......
......@@ -23,189 +23,12 @@
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() ;
});
$(".jSearchGroup").click2(function(){
var title = "그룹 검색";
$('#jDialogArea').dialog({
modal : true,
title : title,
open : function(event, ui) { $(".ui-dialog-titlebar-close").hide(); },
width : 400,
height : 500,
resizable : false,
buttons: [
{
text: "확인",
click: function() {
var group_no = $(".jTargetNo:checked").val();
var group_name = $(".jTargetNo:checked").parents("tr").find(".jTargetName").attr("data");
if(group_no == undefined)
{
alert("대상을 선택해주세요.");
return false;
}
else
{
$("#group_no").val(group_no);
$("#group_name").val(group_name);
$( this ).dialog( "close" );
$("#jTargetSearchText").val("");
$("#jSearchResultArea").empty();
}
}
},
{
text: "닫기",
click: function() {
$("#jTargetSearchText").val("");
$("#jSearchResultArea").empty();
$( this ).dialog( "close" );
}
}
],
closeOnEscape: false
});
});
$(".jSearchPrivate").click2(function(){
var title = "회원 검색";
$('#jDialogAreaP').dialog({
modal : true,
title : title,
open : function(event, ui) { $(".ui-dialog-titlebar-close").hide(); },
width : 400,
height : 500,
resizable : false,
buttons: [
{
text: "확인",
click: function() {
var group_no = $(".jTargetNo:checked").val();
var group_name = $(".jTargetNo:checked").parents("tr").find(".jTargetName").attr("data");
if(group_no == undefined)
{
alert("대상을 선택해주세요.");
return false;
}
else
{
$("#group_no").val(group_no);
$("#group_name").val(group_name);
$( this ).dialog( "close" );
$("#jTargetSearchText").val("");
$("#jSearchResultArea").empty();
}
}
},
{
text: "닫기",
click: function() {
$("#jTargetSearchText").val("");
$("#jSearchResultArea").empty();
$( this ).dialog( "close" );
}
}
],
closeOnEscape: false
});
});
$(".jTargetSearchBtn").click2(function(){
var search_text = $("#jTargetSearchText").val();
var ajax_url = "/admin/entity/entityGroupSearch.php";
if(search_text == "")
{
alert("검색어를 입력해주세요.");
return false;
}
$.ajax({
url : ajax_url,
data : {
"search_text" : search_text
},
dataType:"html",
success : function(data)
{
$("#jSearchResultArea").html(data);
setSearchAreaEventHandler();
}
});
});
$(".jTargetSearchPBtn").click2(function(){
var search_text = $("#jTargetSearchTextP").val();
var ajax_url = "/admin/entity/entityPrivateSearch.php";
if(search_text == "")
{
alert("검색어를 입력해주세요.");
return false;
}
$.ajax({
url : ajax_url,
data : {
"search_text" : search_text
},
dataType:"html",
success : function(data)
{
$("#jSearchResultAreaP").html(data);
setSearchAreaEventHandler();
}
});
});
$("#push_target_type").change(function(){
resetTargetData();
if($(this).val() == "1")
{
$("#jGroupArea").hide();
$("#jPrivateArea").hide();
}
else if($(this).val() == "2")
{
$("#jGroupArea").show();
$("#jPrivateArea").hide();
}else{
$("#jGroupArea").hide();
$("#jPrivateArea").show();
}
});
$(".jSave").click2(function(){
var push_msg = $("#push_msg").val();
var push_target_type = $("#push_target_type").val();
......@@ -230,8 +53,7 @@
dataType : "json",
data : {
"push_msg" : push_msg,
"push_target_type" : push_target_type,
"group_no" : group_no
"push_target_type" : push_target_type
}, success : function(data) {
alert(data.returnMessage) ;
if(data.returnCode == 1) {
......@@ -245,24 +67,6 @@
});
}) ;
function setSearchAreaEventHandler()
{
$(".jTargetNo").unbind("change");
$(".jTargetNo").change(function(){
$(".jTargetNo").prop("checked", false);
$(this).prop("checked", true);
});
}
function resetTargetData()
{
$("#group_no").val("");
$("#group_name").val("");
}
</script>
......@@ -281,32 +85,14 @@
<tr>
<th style="height:25px;">제목</th>
<td class="l">
<input type="text" style="width:95%"/>
</td>
</tr>
<tr id="jGroupArea" style="display:none;">
<th style="height:25px;">그룹</th>
<td class="l">
<input type="hidden" id="group_no" />
<input type="text" disabled="disabled" id="group_name"/>
<input type="button" class="button searchsmall white jSearchGroup" value="그룹검색" />
</td>
</tr>
<tr id="jPrivateArea" style="display:none;">
<th style="height:25px;">개인</th>
<td class="l">
<input type="hidden" id="group_no" />
<input type="text" disabled="disabled" id="group_name"/>
<input type="button" class="button searchsmall white jSearchPrivate" value="회원검색" />
<input type="text" name="title" style="width:95%"/>
</td>
</tr>
<tr>
<th style="height:25px;">내용</th>
<td class="l">
<textarea rows="3" style="width:95%;" id="push_msg"></textarea>
<textarea rows="5" name="pushMessage" style="width:95%;" id="pushMessage"></textarea>
</td>
</tr>
</table>
......@@ -315,53 +101,7 @@
<span class="button bigrounded blue jSave" >전송</span>
</div>
<h3>푸시 이력</h3>
<table class="datacList">
<thead>
<tr>
<th class="no" width="5%">No</th>
<th width="65%">메세지</th>
<th width="10%">전송시간</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">
<?
if($list[$i]["push_target_type"] == "1")
echo "전체";
else if($list[$i]["push_target_type"] == "2")
echo "그룹";
else if($list[$i]["push_target_type"] == "3")
echo "개인";
?>
</td>
<td class="center">
<?=$list[$i]["push_msg"]?>
</td>
<td class="center">
<?=$list[$i]["push_count"]?>
</td>
<td class="center">
<?=$list[$i]["push_dt"]?>
</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>
......
<? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminBase.php" ;?>
<?
if (! class_exists("AdminProductionSpec")){
class AdminProductionSpec extends AdminBase{
function __construct($req)
{
parent::__construct($req);
}
function getListOfProductionSpec(){
$searchType=$this->req["searchType"];
$searchText=$this->req["searchText"];
$dateFormer=$this->req["dateFormer"];
$dateLatter=$this->req["dateLatter"];
$where=" WHERE PS.status=1";
if($searchType=="CN")
$where.=" AND companyName LIKE '%{$searchText}%'";
else if($searchType=="PN")
$where.=" AND productName LIKE '%{$searchText}%'";
else if($searchType=="MN")
$where.=" AND userName LIKE '%{$searchText}%'";
else if($searchType=="")
$where.=" AND (companyName LIKE '%{$searchText}%' OR productName LIKE '%{$searchText}%' OR userName LIKE '%{$searchText}%')";
if($dateFormer != "")
$where.=" AND DATE_FORMAT(PS.regDate, '%Y%m%d') >= DATE_FORMAT('{$dateFormer}', '%Y%m%d')";
if($dateLatter != "")
$where.=" AND DATE_FORMAT(PS.regDate, '%Y%m%d') <= DATE_FORMAT('{$dateLatter}', '%Y%m%d')";
$sql="
SELECT COUNT(*) AS rn
FROM tblProductionSpec PS
JOIN tblUser U ON PS.userFk=U.userNo
{$where}
ORDER BY PS.regDate DESC
";
$this->initPage();
$this->rownum=$this->getValue($sql, 'rn');
$this->setPage($this->rownum);
$limit=" LIMIT {$this->startNum}, {$this->endNum} ;";
$sql="
SELECT productionNo, DATE_FORMAT(PS.requestDate, '%Y-%m-%d') AS requestDate, PS.companyName, PS.productName, U.userName
FROM tblProductionSpec PS
JOIN tblUser U ON PS.userFk=U.userNo
{$where}
ORDER BY PS.productionNo DESC
{$limit}
";
$result=$this->getArray($sql);
//echo json_encode($result);
return $result;
}
function getInfoOfProductionSpec(){
$productionNo=$this->req["no"];
$sql="
SELECT *
FROM tblProductionSpec
WHERE productionNo='{$productionNo}'
";
$result=$this->getRow($sql);
//echo json_encode($result);
return $result;
}
function getListOfManager(){
$sql="
SELECT userNo, userName
FROM tblUser
WHERE userType=2 AND status=1
ORDER BY userNo ASC
";
$result=$this->getArray($sql);
return $result;
}
function saveProductionSpec(){
$productionNo=$this->req["productionNo"];
$managerFk=$this->req["managerFk"];
$requestDate=$this->req["requestDate"];
$customerName=$this->req["customerName"];
$companyName=$this->req["companyName"];
$vehicleTON=$this->req["vehicleTON"];
$vehicleText=$this->req["vehicleText"];
$vehicleType=$this->req["vehicleType"];
$productName=$this->req["productName"];
$telephone=$this->req["telephone1"].$this->req["telephone2"].$this->req["telephone3"];
$type=$this->req["type"];
$typeValue=$this->req["typeValue"];
$internalLength=$this->req["internalLength"];
$internalHeight=$this->req["internalHeight"];
$internalWidth=$this->req["internalWidth"];
$alCoil=$this->req["alCoil"];
$alCoilValue=$this->req["alCoilValue"];
$floor=$this->req["floor"];
$floorValueT=$this->req["floorValueT"];
$floorValueText=$this->req["floorValueText"];
$tent=$this->req["tent"];
$sideBoard=$this->req["sideBoard"];
$sideBoardValue=$this->req["sideBoardValue"];
$windStopper=$this->req["windStopper"];
$windStopperValue=$this->req["windStopperValue"];
$freezer=$this->req["freezer"];
$freezerValue=$this->req["freezerValue"];
$gateType=$this->req["gateType"];
$gateSize=$this->req["gateSize"];
$gateValue=$this->req["gateValue"];
$load=$this->req["load"];
$frontBack=$this->req["frontBack"];
$eTrackGate=$this->req["eTrackGate"];
$eTrackWing=$this->req["eTrackWing"];
$eTrackValue=$this->req["eTrackValue"];
$toolBucket=$this->req["toolBucket"];
$toolBucketValue=$this->req["toolBucketValue"];
$bumperFootHold=$this->req["bumperFootHold"];
$wingProtector=$this->req["wingProtector"];
$axis=$this->req["axis"];
$axisValue=$this->req["axisValue"];
$balance=$this->req["balance"];
$specialAddition1=$this->req["specialAddition1"];
$specialAddition2=$this->req["specialAddition2"];
$specialAddition3=$this->req["specialAddition3"];
$specialAddition4=$this->req["specialAddition4"];
$specialAddition5=$this->req["specialAddition5"];
$sql = "
UPDATE `tblProductionSpec`
SET
`userFk` = '{$managerFk}',
`requestDate` = '{$requestDate}',
`customerName` = '{$customerName}',
`companyName` = '{$companyName}',
`vehicleTON` = '{$vehicleTON}',
`vehicleText` = '{$vehicleText}',
`vehicleType` = '{$vehicleType}',
`productName` = '{$productName}',
`telephone` = '{$telephone}',
`type` = '{$type}',
`typeValue` = '{$typeValue}',
`internalLength` = '{$internalLength}',
`internalHeight` = '{$internalHeight}',
`internalWidth` = '{$internalWidth}',
`alCoil` = '{$alCoil}',
`alCoilValue` = '{$alCoilValue}',
`floor` = '{$floor}',
`floorValueT` = '{$floorValueT}',
`floorValueText` = '{$floorValueText}',
`tent` = '{$tent}',
`sideBoard` = '{$sideBoard}',
`sideBoardValue` = '{$sideBoardValue}',
`windStopper` = '{$windStopper}',
`windStopperValue` = '{$windStopperValue}',
`freezer` = '{$freezer}',
`freezerValue` = '{$freezerValue}',
`gateType` = '{$gateType}',
`gateSize` = '{$gateSize}',
`gateValue` = '{$gateValue}',
`load` = '{$load}',
`frontBack` = '{$frontBack}',
`eTrackGate` = '{$eTrackGate}',
`eTrackWing` = '{$eTrackWing}',
`eTrackValue` = '{$eTrackValue}',
`toolBucket` = '{$toolBucket}',
`toolBucketValue` = '{$toolBucketValue}',
`bumperFootHold` = '{$bumperFootHold}',
`wingProtector` = '{$wingProtector}',
`axis` = '{$axis}',
`axisValue` = '{$axisValue}',
`balance` = '{$balance}',
`specialAddition1` = '{$specialAddition1}',
`specialAddition2` = '{$specialAddition2}',
`specialAddition3` = '{$specialAddition3}',
`specialAddition4` = '{$specialAddition4}',
`specialAddition5` = '{$specialAddition5}'
WHERE `productionNo` = '{$productionNo}';
";
$this->update($sql);
return $this->makeResultJson(1, "저장되었습니다");
}
function deleteProductionSpec(){
$noArr = $this->req["no"];
$noStr = implode(',', $noArr);
$sql = "
UPDATE tblProductionSpec
SET status = 0
WHERE `productionNo` IN({$noStr})
";
$this->update($sql);
}
}
}
?>
\ No newline at end of file
......@@ -123,55 +123,28 @@ if(!class_exists("AdminPush")){
function sendAdminPush()
{
$push_msg = $this->req["push_msg"];
$group_no = $this->req["group_no"];
$push_target_type = $this->req["push_target_type"];
$push_msg = $this->req["pushMessage"];
$push_code = $this->getBulkPushCode();
$push_succeed=0;
if($push_target_type == "1"){
$sql = "
INSERT INTO tbl_push_target_bulk(push_code, registration_key, device_type_id, app_type)
INSERT INTO tbl_push_target_bulk(push_code, registration_key, device_type_id)
(
SELECT '{$push_code}', registration_key, device_type_id, app_type
FROM tbl_user U
WHERE U.status = 'Y' AND U.registration_key != '' AND is_push = 1
SELECT '{$push_code}', registrationKey, deviceTypeID
FROM tblUser U
WHERE U.status = 1 AND U.registrationKey != '' AND push = 1
)
";
$push_count = $this->update($sql);
$sql="SELECT count(*) as rn
FROM tbl_user U
WHERE U.status = 'Y' AND U.registration_key != '' AND is_push = 1";
$result=$this->getRow($sql);
$push_succeed = $result["rn"];
}
else
{
$sql = "
INSERT INTO tbl_push_target_bulk(push_code, registration_key, device_type_id, app_type)
(
SELECT '{$push_code}', registration_key, device_type_id, app_type
FROM tbl_user U
WHERE U.group_fk = '{$group_no}' AND U.status = 'Y' AND U.registration_key != '' AND is_push = 1
)
";
$push_count = $this->update($sql);
$sql="SELECT count(*) as rn
FROM tbl_user U
WHERE U.status = 'Y' AND U.registration_key != '' AND is_push = 1";
FROM tblUser U
WHERE U.status = 1 AND U.registrationKey != '' AND push = 1";
$result=$this->getRow($sql);
$push_succeed = $result["rn"];
}
$sql = "
INSERT INTO tbl_push_log(push_target_type, group_fk, push_msg, push_count, push_dt)
VALUES('{$push_target_type}', '{$group_no}', '{$push_msg}', '{$push_succeed}', NOW())
";
$this->update($sql);
$push_msg = $this->req["push_msg"];
$group_no = $this->req["group_no"];
$push_target_type = $this->req["push_target_type"];
$push_msg = $this->req["pushMessage"];
// 푸시 전송
$params = Array(
......@@ -224,6 +197,29 @@ if(!class_exists("AdminPush")){
return $result;
}
function saveAgreement(){
$type=$this->req["type"];
$content=$this->req["content"];
if($type == "AG"){
$filePath = $this->agreeInfoPath;
$files = fopen($filePath, "w");
fwrite($files, $content);
fclose($files);
return $this->makeResultJson(1, "약관이 저장되었습니다");
}
else if($type == "PR"){
$filePath = $this->privacyInfoPath;
$files = fopen($filePath, "w");
fwrite($files, $content);
fclose($files);
return $this->makeResultJson(1, "개인정보처리방침이 저장되었습니다");
}
}
} // class end
}
?>
\ No newline at end of file
......
......@@ -316,6 +316,283 @@ if (! class_exists("AdminBoard")){
$this->update($sql);
}
function getListOfCS(){
$sql="
SELECT COUNT(*) AS rn
FROM tblCustomerService CS
JOIN tblUser U ON CS.userFk=U.userNo
WHERE CS.status=1 AND U.status=1
";
$this->initPage();
$this->rownum=$this->getValue($sql, 'rn');
$this->setPage($this->rownum);
$limit=" LIMIT {$this->startNum}, {$this->endNum} ;";
$sql="
SELECT CS.*, U.userName
FROM tblCustomerService CS
JOIN tblUser U ON CS.userFk=U.userNo
WHERE CS.status=1 AND U.status=1
ORDER BY CS.regDate DESC
{$limit}
";
$result=$this->getArray($sql);
return $result;
}
function getInfoOfCS(){
$csNo=$this->req["no"];
$sql="
SELECT CS.*, U.userName
FROM tblCustomerService CS
JOIN tblUser U ON CS.userFk=U.userNo
WHERE CS.csNo='{$csNo}'
";
$result=$this->getRow($sql);
return $result;
}
function saveCS(){
$targetFk=$this->req["csNo"];
$content=$this->req["content"];
$sql="
INSERT INTO tblComment(userFk, targetFk, commentGroup, gOrder, depth, content, commentType, status, regDate)
VALUES
(
0,
'{$targetFk}',
0,
1,
1,
'{$content}',
'CS',
1,
NOW()
)
";
$this->update($sql);
$currentNo=$this->mysql_insert_id();
$sql="
UPDATE tblComment
SET commentGroup='{$currentNo}'
WHERE commentNo='{$currentNo}'
";
$this->update($sql);
return $this->makeResultJson("1", "저장되었습니다");
}
function deleteCS(){
$noArr = $this->req["no"];
$noStr = implode(',', $noArr);
$sql = "
UPDATE tblCustomerService
SET status = 0
WHERE `csNo` IN({$noStr})
";
$this->update($sql);
}
function getListOfCSComment(){
$no=$this->req["no"];
if($no != ""){
$sql="
SELECT C.*, IFNULL(U.userName, '관리자') AS userName
FROM tblComment C
LEFT JOIN tblUser U ON C.userFk=U.userNo
WHERE C.commentType='CS' AND C.targetFk='{$no}' AND C.status=1
ORDER BY commentGroup DESC, gOrder ASC
";
$result=$this->getArray($sql);
//echo json_encode($result);
return $result;
}
}
function getListOfProductionPortrait(){
$sql="
SELECT COUNT(*) AS rn
FROM tblProductionPortrait
WHERE status=1
";
$this->initPage();
$this->rownum=$this->getValue($sql, 'rn');
$this->setPage($this->rownum);
$limit=" LIMIT {$this->startNum}, {$this->endNum} ;";
$sql="
SELECT ppNo, title, regDate
FROM tblProductionPortrait
WHERE status=1
ORDER BY ppNo DESC
{$limit}
";
$result=$this->getArray($sql);
return $result;
}
function getInfoOfProductionPortrait(){
$ppNo=$this->req["no"];
$sql="
SELECT *
FROM tblProductionPortrait
WHERE ppNo='{$ppNo}'
";
$result=$this->getRow($sql);
return $result;
}
function getInfoOfProductionPortraitForJson(){
$ppNo=$this->req["no"];
$sql="
SELECT *
FROM tblProductionPortrait
WHERE ppNo='{$ppNo}'
";
$result=$this->getRow($sql);
return json_encode($result);
}
function saveProductionPortrait(){
$ppNo=$this->req["no"];
$title=$this->req["title"];
$content1=$this->req["content1"];
$content2=$this->req["content2"];
$content3=$this->req["content3"];
$content4=$this->req["content4"];
$content5=$this->req["content5"];
$content6=$this->req["content6"];
$content7=$this->req["content7"];
$content8=$this->req["content8"];
$content9=$this->req["content9"];
$content10=$this->req["content10"];
$imgResult = $this->inFn_Common_fileSave($_FILES);
$imgPathPP1 = $imgResult["img01"]["saveURL"] != "" ? $imgResult["img01"]["saveURL"] : $this->req["imgPathPP1"];
$imgPathPP2 = $imgResult["img02"]["saveURL"] != "" ? $imgResult["img02"]["saveURL"] : $this->req["imgPathPP2"];
$imgPathPP3 = $imgResult["img03"]["saveURL"] != "" ? $imgResult["img03"]["saveURL"] : $this->req["imgPathPP3"];
$imgPathPP4 = $imgResult["img04"]["saveURL"] != "" ? $imgResult["img04"]["saveURL"] : $this->req["imgPathPP4"];
$imgPathPP5 = $imgResult["img05"]["saveURL"] != "" ? $imgResult["img05"]["saveURL"] : $this->req["imgPathPP5"];
$imgPathPP6 = $imgResult["img06"]["saveURL"] != "" ? $imgResult["img06"]["saveURL"] : $this->req["imgPathPP6"];
$imgPathPP7 = $imgResult["img07"]["saveURL"] != "" ? $imgResult["img07"]["saveURL"] : $this->req["imgPathPP7"];
$imgPathPP8 = $imgResult["img08"]["saveURL"] != "" ? $imgResult["img08"]["saveURL"] : $this->req["imgPathPP8"];
$imgPathPP9 = $imgResult["img09"]["saveURL"] != "" ? $imgResult["img09"]["saveURL"] : $this->req["imgPathPP9"];
$imgPathPP10 = $imgResult["img10"]["saveURL"] != "" ? $imgResult["img10"]["saveURL"] : $this->req["imgPathPP10"];
if($ppNo==""){
$sql="
INSERT INTO `tblProductionPortrait`
(
`title`,
`content1`,
`content2`,
`content3`,
`content4`,
`content5`,
`content6`,
`content7`,
`content8`,
`content9`,
`content10`,
`imgPathPP1`,
`imgPathPP2`,
`imgPathPP3`,
`imgPathPP4`,
`imgPathPP5`,
`imgPathPP6`,
`imgPathPP7`,
`imgPathPP8`,
`imgPathPP9`,
`imgPathPP10`,
`status`,
`regDate`
)
VALUES
(
'{$title}',
'{$content1}',
'{$content2}',
'{$content3}',
'{$content4}',
'{$content5}',
'{$content6}',
'{$content7}',
'{$content8}',
'{$content9}',
'{$content10}',
'{$imgPathPP1}',
'{$imgPathPP2}',
'{$imgPathPP3}',
'{$imgPathPP4}',
'{$imgPathPP5}',
'{$imgPathPP6}',
'{$imgPathPP7}',
'{$imgPathPP8}',
'{$imgPathPP9}',
'{$imgPathPP10}',
1,
NOW()
);
";
$this->update($sql);
return $this->makeResultJson(1, "등록되었습니다");
}
else{
$sql="
UPDATE `tblProductionPortrait`
SET
`title` = '{$title}',
`content1` = '{$content1}',
`content2` = '{$content2}',
`content3` = '{$content3}',
`content4` = '{$content4}',
`content5` = '{$content5}',
`content6` = '{$content6}',
`content7` = '{$content7}',
`content8` = '{$content8}',
`content9` = '{$content9}',
`content10` = '{$content10}',
`imgPathPP1` = '{$imgPathPP1}',
`imgPathPP2` = '{$imgPathPP2}',
`imgPathPP3` = '{$imgPathPP3}',
`imgPathPP4` = '{$imgPathPP4}',
`imgPathPP5` = '{$imgPathPP5}',
`imgPathPP6` = '{$imgPathPP6}',
`imgPathPP7` = '{$imgPathPP7}',
`imgPathPP8` = '{$imgPathPP8}',
`imgPathPP9` = '{$imgPathPP9}',
`imgPathPP10` = '{$imgPathPP10}'
WHERE `ppNo` = '{$ppNo}';
";
$this->update($sql);
return $this->makeResultJson(1, "수정되었습니다");
}
}
function deleteProductionPortrait(){
$noArr = $this->req["no"];
$noStr = implode(',', $noArr);
$sql = "
UPDATE tblProductionPortrait
SET status = 0
WHERE `ppNo` IN({$noStr})
";
$this->update($sql);
}
}
}
......
......@@ -55,13 +55,8 @@ if(! class_exists("Push") ) {
foreach($pushKeyArr as $key => $pushKey){
if($pushKey["device_type_id"] != "2" && strlen($pushKey["registration_key"]) > 32){
if($pushKey["app_type"] == 1){
array_push($gcmKeyArr, $pushKey["registration_key"]);
}
else{
array_push($gcmKeyArr2, $pushKey["registration_key"]);
}
}
if($pushKey["device_type_id"] == "2" && strlen($pushKey["registration_key"]) > 32){
array_push($apnsKeyArr, $pushKey["registration_key"]);
......
......@@ -21,8 +21,7 @@
{
$targetData = Array(
"registration_key" => $pushTargetList[$i]["registration_key"],
"device_type_id" => $pushTargetList[$i]["device_type_id"],
"app_type" => $pushTargetList[$i]["app_type"]
"device_type_id" => $pushTargetList[$i]["device_type_id"]
);
$paramsStr = urlencode(json_encode($targetData));
$paramsArr[floor($i/$push_send_size)] .= "&targetList[]={$paramsStr}";
......