71def015 by sayhoChun

admin web done

1 parent fbaee16f
......@@ -65,6 +65,33 @@
</script>
<script type="text/javascript">
function doImgPop(img){
img1= new Image();
img1.src=(img);
imgControll(img);
}
function imgControll(img){
if((img1.width!=0)&&(img1.height!=0)){
viewImage(img);
}
else{
controller="imgControll('"+img+"')";
intervalID=setTimeout(controller,20);
}
}
function viewImage(img){
W=img1.width;
H=img1.height;
O="width="+W+",height="+H+",scrollbars=yes";
imgWin=window.open("","",O);
imgWin.document.write("<html><head><title>이미지상세보기</title></head>");
imgWin.document.write("<body topmargin=0 leftmargin=0>");
imgWin.document.write("<img src="+img+" onclick='self.close()' style='cursor:pointer;' title ='클릭하시면 창이 닫힙니다.'>");
imgWin.document.close();
}
</script>
<div id="Contents" class="notice">
......@@ -131,19 +158,19 @@
<center>
<div class="data">
<?if($info["imgPathCS1"] != ""){?>
<img alt="" src="/720/<?=$info["imgPathCS1"]?>" style="width:15%; height:600%;">
<img alt="" src="/720/<?=$info["imgPathCS1"]?>" onclick="doImgPop('/720/<?=$info["imgPathCS1"]?>')" style="width:15%; height:600%; cursor: pointer;">
<?}?>
<?if($info["imgPathCS2"] != ""){?>
<img alt="" src="/720/<?=$info["imgPathCS2"]?>" style="width:15%; height:600%;">
<img alt="" src="/720/<?=$info["imgPathCS2"]?>" onclick="doImgPop('/720/<?=$info["imgPathCS1"]?>')" style="width:15%; height:600%; cursor: pointer;">
<?}?>
<?if($info["imgPathCS3"] != ""){?>
<img alt="" src="/720/<?=$info["imgPathCS3"]?>" style="width:15%; height:600%;">
<img alt="" src="/720/<?=$info["imgPathCS3"]?>"onclick="doImgPop('/720/<?=$info["imgPathCS1"]?>')" style="width:15%; height:600%; cursor: pointer;">
<?}?>
<?if($info["imgPathCS4"] != ""){?>
<img alt="" src="/720/<?=$info["imgPathCS4"]?>" style="width:15%; height:600%;">
<img alt="" src="/720/<?=$info["imgPathCS4"]?>" onclick="doImgPop('/720/<?=$info["imgPathCS1"]?>')" style="width:15%; height:600%; cursor: pointer;">
<?}?>
<?if($info["imgPathCS5"] != ""){?>
<img alt="" src="/720/<?=$info["imgPathCS5"]?>" style="width:15%; height:600%;">
<img alt="" src="/720/<?=$info["imgPathCS5"]?>" onclick="doImgPop('/720/<?=$info["imgPathCS1"]?>')" style="width:15%; height:600%; cursor: pointer;">
<?}?>
</div>
</center>
......
......@@ -224,7 +224,7 @@
</td>
<td class="center">
<?=$list[$i]["regDate"]?>
<?=$list[$i]["requestDate"]?>
</td>
<td class="center">
......
......@@ -89,7 +89,8 @@
$.ajax({
url : "/action_front.php?cmd=AdminProductionSpec.saveProductionSpec",
async : false,
async : false,\
cache : false,
dataType : "json",
data : data,
......@@ -196,7 +197,6 @@
<td class="center" colspan='7'>
<input type="text" name="vehicleTON" style="width:5%;" value="<?=$info["vehicleTON"]?>" /> TON
<input type="text" name="vehicleText" style="margin-right:50px;" value="<?=$info["vehicleText"]?>"/>
<input type="radio" name="vehicleType" value="HY" <?=$info["vehicleType"] == "HY" ? "CHECKED" : "" ?>>현대
<input type="radio" name="vehicleType" value="DW" <?=$info["vehicleType"] == "DW" ? "CHECKED" : "" ?>>대우
<input type="radio" name="vehicleType" value="VV" <?=$info["vehicleType"] == "VV" ? "CHECKED" : "" ?>>볼보
......@@ -275,7 +275,7 @@
<input type="radio" name="floor" value="C" <?=$info["floor"] == "C" ? "CHECKED" : "" ?>>체크
<input type="radio" name="floor" value="P" <?=$info["floor"] == "P" ? "CHECKED" : "" ?>>민판
<input type="text" name="floorValueT" style='width:5%;' value="<?=$info["floorValueT"]?>"/> T
<input type="text" name="floorValue" style='margin-left:45px;' value="<?=$info["floorValueText"]?>" />
<input type="text" name="floorValueText" style='margin-left:45px;' value="<?=$info["floorValueText"]?>" />
</td>
</tr>
<tr>
......
......@@ -252,12 +252,14 @@ if(! class_exists("ApiBase") ) {
$loginInfo["isLogin"] = $result[0][0]["po_returnCode"];
$loginInfo["loginMessage"] = $result[0][0]["po_returnMsg"];
$loginInfo["loginInfo"] = $this->inFn_ApiBase_getInfoOfUser($loginParams[0]);
/*
if($loginParams[5]!=$loginInfo["loginInfo"]["userPwd"]){
$loginInfo["loginInfo"]="";
$loginInfo["isLogin"]="-1000";
$loginInfo["loginMessage"]="비밀번호를 확인하세요";
return $loginInfo;
}
*/
LoginUtil::doAppLogin($loginInfo["loginInfo"]);
}
......
......@@ -27,7 +27,7 @@ if (! class_exists("ApiBoard"))
$this->setPageForDevice($this->rownum);
$sql="
SELECT *
SELECT noticeNo, title
FROM tblNotice
WHERE status=1
ORDER BY noticeNo DESC
......@@ -64,7 +64,7 @@ if (! class_exists("ApiBoard"))
$this->setPageForDevice($this->rownum);
$sql="
SELECT *
SELECT eventNo, title
FROM tblEvent
WHERE status=1
ORDER BY eventNo DESC
......@@ -121,8 +121,8 @@ if (! class_exists("ApiBoard"))
$imgResult = $this->inFn_Common_fileSave($_FILES);
$title=$this->req["title"];
//$userFk = $this->appUser["no"];
$userFk=$this->req["userFk"];
$userFk = $this->appUser["no"];
//$userFk=$this->req["userFk"];
$imgPathBoard1 = $imgResult["imgPathBoard1"]["saveURL"] != null ? $imgResult["imgPathBoard1"]["saveURL"] : $this->req["imgPathBoard1"];
$imgPathBoard2 = $imgResult["imgPathBoard2"]["saveURL"] != null ? $imgResult["imgPathBoard2"]["saveURL"] : $this->req["imgPathBoard2"];
......@@ -186,7 +186,7 @@ if (! class_exists("ApiBoard"))
$this->setPageForDevice($this->rownum);
$sql="
SELECT B.*, U.userID, U.userNo
SELECT B.boardNo, B.title, U.userID, U.userNo
FROM tblBoard B
JOIN tblUser U ON B.userFk=U.userNo
{$where}
......
......@@ -46,6 +46,9 @@ if (! class_exists("ApiUser"))
function checkIDRedundancy(){
$userID=$this->req["userID"];
if($userID == "")
return $this->makeResultJson(-1, "아이디 입력 후 시도해 주세요");
$sql="
SELECT *
FROM tblUser
......@@ -63,6 +66,9 @@ if (! class_exists("ApiUser"))
function checkNickRedundancy(){
$nickName=$this->req["nickName"];
if($nickName == "")
return $this->makeResultJson(-1, "닉네임 입력 후 시도해 주세요");
$sql="
SELECT *
FROM tblUser
......@@ -77,6 +83,8 @@ if (! class_exists("ApiUser"))
return $this->makeResultJson(1, "사용할 수 있는 닉네임 입니다");
}
// 회원 가입 (http://106.240.232.36:8004/action_front.php?cmd=ApiUser.memberJoin)
function memberJoin()
{
......@@ -107,12 +115,21 @@ if (! class_exists("ApiUser"))
";
$regInfo = $this->getRow($sql);
if(strlen($userID) < 6)
return $this->makeResultJson(-106, "아이디는 여섯 자리 이상이어야 합니다.");
if(strlen($userID) != strlen($this->removeSpecials($userID))) {
return $this->makeResultJson(-108, "아이디에는 특수문자가 포함될 수 없습니다.");
}
if($regInfo != null)
return $this->makeResultJson(-100, "아이디 중복을 확인해 주세요.");
if($nickName == "")
return $this->makeResultJson(-107, "닉네임을 입력해 주세요");
$sql="SELECT * FROM tblUser WHERE nickName='{$nickName} AND status=1'";
$regInfo=$this->getRow($sql);
......@@ -127,6 +144,9 @@ if (! class_exists("ApiUser"))
if($userPwd != $userPwdConfirm)
return $this->makeResultJson(-105, "비밀번호가 일치하지 않습니다.");
if($userName == "")
return $this->makeResultJson(-102, "이름을 입력해 주세요.");
/*
if($userTel == "")
return $this->makeResultJson(-105, "전화번호는 필수 입력사항입니다.");
......@@ -157,6 +177,8 @@ if (! class_exists("ApiUser"))
$result = $this->techOfInsertForUpdate("tblUser", $insAssoc);
$no = $this->mysql_insert_id();
$userInfo = $this->inFn_ApiBase_getInfoOfUser($no);
/*
$file_vir_name = "";
$file_org_name = "";
......@@ -197,6 +219,18 @@ if (! class_exists("ApiUser"))
return $this->makeResultJson($returnCode, $returnMessage, $userInfo);
}
function checkExpire($userNo, $expireDate){
if(date('Y-m-d', $expireDate) <= date('Y-m-d')){
$sql="
UPDATE tblUser
SET status=0
WHERE userNo='{$userNo}'
";
$this->update($sql);
return 1;
}
}
// 회원 로그인 (http://106.240.232.36:8004/action_front.php?cmd=ApiUser.userLogin)
function userLogin()
......@@ -225,6 +259,9 @@ if (! class_exists("ApiUser"))
$userInfo = $this->inFn_ApiBase_getInfoOfUser($result[0][0]["v_userNumber"]);
//echo $userPwd;
//echo $userInfo["userID"];
$res=$this->checkExpire($userInfo["userNo"], $userInfo["expireDate"]);
if($res=1)
return $this->makeResultJson(-999, "탈퇴된 회원입니다");
if($userInfo["userPwd"] != $userPwd)
return $this->makeResultJson("-1000", "비밀번호를 확인하세요");
......@@ -239,7 +276,7 @@ if (! class_exists("ApiUser"))
}
function userAutoLogin(){
$userNumber=$this->req["userNumber"];
$userNo=$this->req["userNo"];
$userID = $this->req["userID"];
$deviceID = $this->req["deviceID"];
$deviceTypeID = $this->req["deviceTypeID"];
......@@ -247,8 +284,15 @@ if (! class_exists("ApiUser"))
$appVersion = $this->req["appVersion"];
$userPwd=md5($this->req["userPwd"]);
$sql="SELECT expireDate FROM tblUser WHERE userNo='{$userNo}' AND status=1 LIMIT 1";
$expireDate=$this->getValue($sql, "expireDate");
$res=$this->checkExpire($userNo, $expireDate);
if($res=1)
return $this->makeResultJson(-999, "탈퇴된 회원입니다");
$param = Array(
$userNumber,
$userNo,
$deviceID,
$deviceTypeID,
$registrationKey,
......@@ -262,6 +306,7 @@ if (! class_exists("ApiUser"))
}
// 비동기 푸시키 갱신 API
function setUserRegistrationKey()
{
......@@ -316,7 +361,7 @@ if (! class_exists("ApiUser"))
{
$userNo = $this->appUser["no"];
//$is_file_change = $this->req["is_file_change"]; // NEW / DEL / NON
//$userNo=$this->req["userNo"];
$userPwd = $this->req["userPwd"];
$userPwdConfirm = $this->req["userPwdConfirm"];
$nickName = $this->req["nickName"];
......@@ -362,8 +407,25 @@ if (! class_exists("ApiUser"))
if($userPwd != $userPwdConfirm)
return $this->makeResultJson(-101, "비밀번호 가 일치하지 않습니다");
$userPwd=md5($userPwd);
if($userPwd==""){
$sql = "
UPDATE tbl_user
UPDATE tblUser
SET
nickName='{$nickName}',
userTel='{$userTel}',
userVehicleTON='{$userVehicleTON}',
userVehicleName='{$userVehicleName}',
userVehicleType='{$userVehicleType}',
userVehicleWish='{$userVehicleWish}'
WHERE `userNo` = '{$userNo}'
";
$this->update($sql);
}
else{
$sql = "
UPDATE tblUser
SET
userPwd='{$userPwd}',
nickName='{$nickName}',
......@@ -375,7 +437,7 @@ if (! class_exists("ApiUser"))
WHERE `userNo` = '{$userNo}'
";
$this->update($sql);
}
return $this->makeResultJson("1", "저장되었습니다.", $this->inFn_ApiBase_getInfoOfUser($userNo));
}
......@@ -393,22 +455,26 @@ if (! class_exists("ApiUser"))
function delUser(){
$userNo=$this->appUser["no"];
$userNo=$this->req["no"];
$sql="
UPDATE tblUser
SET expireDate=DATE_FORMAT(NOW() + interval 3 DAY, '%Y%m%d')
WHERE userNo='{$userNo}' AND status=1
";
$this->update($sql);
return $this->makeResultJson("1", "탈퇴 신청이 완료되었습니다");
}
function delCancel(){
$userNo=$this->appUser["no"];
$userNo=$this->req["no"];
$sql="
UPDATE tblUser
SET expireDate=NULL
WHERE userNo='{$userNo}' AND status=1
";
$this->update($sql);
return $this->makeResultJson("1", "취소되었습니다");
}
......
......@@ -143,7 +143,7 @@ $(document).ready(function(){
async : false,
cache : false,
data:{
"userID" : "fishcreek1",
"userID" : "test111",
"userPwd": "alclsekf1",
"deviceID" : "device",
"deviceTypeID" : 2,
......@@ -190,11 +190,11 @@ $(document).ready(function(){
async : false,
cache : false,
data:{
"userID" : "fishcreek1",
"userID" : "test111",
"userPwd" : "alclsekf1",
"userPwdConfirm" : "alclsekf1",
"userName" : "세호",
"nickName" : "fishcreek1",
"nickName" : "test1",
"userTel" : "01026264848",
"userVehicleTON" : 21,
"userVehicleName" : "내장탑차",
......@@ -323,6 +323,7 @@ $(document).ready(function(){
</head>
<body>
<div id="Contents" class="notice" style="width:1000px;" >
<?echo date('Y-m-d', $expireDate);?>
<form name=test1 method=POST>
<span class="button bigrounded blue saveComment btnleft_y">댓글 저장 </span>
<span class="button bigrounded blue saveBoard btnleft_y">게시물 저장 </span>
......