10e833b5 by sayhoChun

web flow/form comleted, productionPortrait API added

1 parent 91cbd259
<? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminUser.php" ?>
<? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/header.php" ?>
<? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/leftBoardManage.php" ?>
<?
$obj = new AdminUser($_REQUEST) ;
//$list = $obj->getListOfUser() ;
$boardType=$_REQUEST["boardType"];
$vnum = $obj->virtualNum ;
?>
<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() ;
});
$(".jView").click2(function(){
var no = $(this).attr("no");
var type='<?=$boardType?>';
location.href = "/admin/boardManage/productionPortraitView.php?no=" + no + "&rurl=" + jQuery.rich.bin2hex(document.URL);
});
$(".jAddUserExcel").click2(function(){
var s=$("#search_text").val();
location.href = "/admin/excel/userListExcel.php?search_text="+s;
});
// 회원 탈퇴
$(".jDelUser").click2(function(){
var no = $(this).attr("no");
var noArr = new Array(no);
if(confirm("정말 삭제하시겠습니까?"))
{
deleteUser(noArr);
}
}) ;
// 단체 삭제
$(".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);
}
});
$(".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>
<h2>
게시물 관리 ><span>제작사진</span>
</h2>
<div class="data" >
<div class="btngroupright">
<input type="button" class="button smallrounded blue jView" no="" value="등록" />
<input type="button" class="button smallrounded blue jDelMulti" 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="50%">제목</th>
<th width="10%">등록일</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">
<input type="checkbox" class="jUserNo" value="<?=$list[$i]["no"] ?>" >
</td>
<td class="center">
</td>
<td class="center">
</td>
<td class="center">
<input type="button" class="button searchsmall white jView" value="상세보기" no="<?=$list[$i]["no"]?>" />
</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" ?>
\ No newline at end of file
<? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminOperate.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();
//$cateCodeList = $obj->getShopCategoryCodeList();
//$shopImgList = $obj->getShopImgList($info["no"]);
$admin_type = $obj->admUser["admin_type"];
$rurl = pack("H*", $_REQUEST["rurl"]) ;
?>
<script src="/admin/inc/fileUpload/fileUploadJS.js"></script>
<script type="text/javascript">
var _rurl = "<?=$rurl?>";
var _no = "<?=$_REQUEST[no]?>";
function MultiArticle(sTitle, sC, sCt, sImg){
this.title = sTitle;
this.categoryNumber = sC;
this.contents = sCt;
this.imgContainer = sImg;
}
$(document).ready(function(){
var multiArray = new Array();
for(var i = 1; i <= 10; i++){
multiArray[i] = new MultiArticle("", i, "", 0);
}
init();
<?if($admin_type == 3) { ?>
setReadOnly();
<?} ?>
//=====프레입웤 변수들==================================================================================//
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;
});
var prev;
function init(){
initFileUpload(101);
initFileUpload(102);
initFileUpload(103);
initFileUpload(104);
initFileUpload(105);
initFileUpload(106);
initFileUpload(107);
initFileUpload(108);
initFileUpload(109);
initFileUpload(110);
toggleHide(1);
}
$("#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);
});
function toggleHide(number){
for(var q = 1; q <= 10; q++){
if(q != number) $(".imgFiles[no="+q+"]").hide();
else $(".imgFiles[no="+q+"]").show();
}
}
$(".jSave").click2(function(){
$("#jData").ajaxSubmit({
url:"/action_front.php?cmd=AdminOperate.saveShop",
type : "post",
forceSync : true,
dataType : "json",
success : function(data){
alert(data.returnMessage);
location.href = _rurl;
}
});
});
$("#jCategorCd").change(function(){
setPromotion();
});
setPromotion();
}) ;
function setPromotion()
{
if($("#jCategorCd").val() == "1")
{
$("#jPromotionSelect").val("1");
$("#jPromotionSelect").prop("disabled", true);
$("#jPromotionHidden").prop("disabled", false);
}
else
{
$("#jPromotionSelect").prop("disabled", false);
$("#jPromotionHidden").prop("disabled", true);
}
}
function setReadOnly(){
$("[name=name]").attr("readonly", true);
$("[name=tel]").attr("readonly", true);
$("[name=addr_old]").attr("readonly", true);
$("[name=addr_new]").attr("readonly", true);
$("[name=discount_rate]").attr("readonly", true);
$("[name=discount_desc]").attr("readonly", true);
}
</script>
<div id="Contents" class="notice">
<h1>게시판 관리 -등록</h1>
<!-- location area -->
<h2>
업체 관리 >
<?
if($_REQUEST["boardType"] == "NO")
echo "공지사항";
else
echo "이벤트"
?>
>
<span><?
if($_REQUEST["no"]=="")
echo "등록";
else
echo "상세보기";
?></span>
</h2>
<!-- location area -->
<div class="data" style="width:80%;">
<form id="jData" method="post" enctype="multipart/form-data">
<input type="hidden" name="no" value="<?=$_REQUEST[no]?>" />
<table class="datav" style="width:100%;">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tr>
<th style="height:25px;">제목</th>
<td class="l">
<input type="text" id="mTitle" class="wl" style="width:70%;" value="" />
</td>
</tr>
<tr>
<th style="height:25px;">카테고리</th>
<td>
<select id="category">
<option value=1>컨텐츠1</option>
<option value=2>컨텐츠2</option>
<option value=3>컨텐츠3</option>
<option value=4>컨텐츠4</option>
<option value=5>컨텐츠5</option>
<option value=6>컨텐츠6</option>
<option value=7>컨텐츠7</option>
<option value=8>컨텐츠8</option>
<option value=9>컨텐츠9</option>
<option value=10>컨텐츠10</option>
</select>
</td>
</tr>
<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>
</td>
</tr>
<tr>
<th style="height:25px;">이미지</th>
<td class="imgFiles" no=1>
<?
$fileIndex = "101";
$fileName = "img01";
$filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
</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"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
</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"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
</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"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
</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"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
</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"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
</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"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
</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"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
</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"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
</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"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
</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
......@@ -29,6 +29,10 @@ $(document).ready(function(){
<a href="/admin/boardManage/certificateList.php">기관인정서</a>
</li>
<li matchUrl="/admin/boardManage/productionPortrait.php">
<a href="/admin/boardManage/productionPortrait.php">제작사진</a>
</li>
</ul>
......
......@@ -907,9 +907,37 @@ if (! class_exists("ApiBoard"))
return $this->makeResultJson("1","", $result);
}
function getListOfProductionPortrait(){
$sql="
SELECT COUNT(*)
FROM tblProductionPortrait
WHERE status=1
ORDER BY regDate DESC
";
$this->rownum=$this->getValue($sql, "rn");
$this->initPage();
$this->setPageForDevice($this->rownum);
$sql="
SELECT ppNo, title, regDate
FROM tblProductionPortrait
WHERE status=1
ORDER BY regDate DESC
";
$result=$this->getArray($sql);
return $this->makeResultJson("1", "", $result);
}
function getInfoOfProductionPortrait(){
$ppNo=$this->req["ppNo"];
$sql="
SELECT *
FROM tblProductionPortrait
WHERE ppNo='{$ppNo}'
LIMIT 0, 1
";
}
......