260522_03_ENH: 전화번호, pw는 개별 수정 가능하게 수정
This commit is contained in:
@@ -9,6 +9,8 @@ Dim r_position : r_position = Trim(Request("r_position"))
|
||||
Dim r_area : r_area = Request("r_area")
|
||||
Dim r_district : r_district = Request("r_district")
|
||||
Dim r_edu : r_edu = Trim(Request("r_edu"))
|
||||
Dim new_r_phone : new_r_phone = Trim(Request("new_r_phone"))
|
||||
Dim new_r_pass : new_r_pass = Trim(Request("new_r_pass"))
|
||||
|
||||
Dim flag
|
||||
|
||||
@@ -42,12 +44,18 @@ if gubun = "update" Then
|
||||
If r_area <> "NULL" Then
|
||||
SQL = SQL &" r_area = '"&r_area&"', "&VbcRlf
|
||||
End If
|
||||
If r_district <> "" OR r_district <> "NULL" Then
|
||||
If r_district <> "" AND r_district <> "NULL" Then
|
||||
SQL = SQL &" r_district = '"&r_district&"', "&VbcRlf
|
||||
End If
|
||||
If r_edu <> "NULL" Then
|
||||
SQL = SQL &" r_edu = '"&r_edu&"', "&VbcRlf
|
||||
End If
|
||||
If new_r_phone <> "" AND new_r_phone <> "NULL" Then
|
||||
SQL = SQL &" r_phone = dbo.base64_encode('"&new_r_phone&"'), "&VbcRlf
|
||||
End If
|
||||
If new_r_pass <> "" AND new_r_pass <> "NULL" Then
|
||||
SQL = SQL &" r_pass = dbo.base64_encode('"&new_r_pass&"'), "&VbcRlf
|
||||
End If
|
||||
SQL = SQL &" Udate = getDate() "&VbcRlf
|
||||
SQL = SQL &" where dbo.base64_decode(r_phone) = '"&r_phone&"'; "&VbcRlf
|
||||
flag = ExecuteSQL(SQL)
|
||||
|
||||
@@ -66,6 +66,11 @@
|
||||
@keyframes uploadLoadingSpin{
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
.form-group input {
|
||||
background-color:#fff!important;
|
||||
color: #000!important;
|
||||
}
|
||||
</style>
|
||||
<!--#include virtual="/Include/Top.asp"-->
|
||||
<div id="uploadLoading">
|
||||
@@ -111,6 +116,16 @@
|
||||
<option value="">선택</option>
|
||||
</select>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="form-group">
|
||||
<label>수정 전화번호</label>
|
||||
<input type="text" class="form-control" name="new_r_phone" id="new_r_phone" onkeyup="this.value=this.value.replace(/[^0-9]/g,'');" />
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="form-group">
|
||||
<label>수정 PW</label>
|
||||
<input type="text" class="form-control" name="new_r_pass" id="new_r_pass" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-warning" id="r_edit">수정</button>
|
||||
@@ -333,8 +348,35 @@
|
||||
alert("지원 지역을 선택하여 주십시오.");
|
||||
return false;
|
||||
}
|
||||
AjaxUpdate("update", $("#r_phone").val(), $("#r_position").val(), $("#r_area").val(), $("#r_district").val(), $("#r_edu").val());
|
||||
if($("#new_r_phone").val() != "" || $("#new_r_pass").val() != ""){
|
||||
var alertMessage = [];
|
||||
if($("#new_r_phone").val() != ""){
|
||||
alertMessage.push(`전화번호를 ${$("#new_r_phone").val()}로`);
|
||||
}
|
||||
if($("#new_r_pass").val() != ""){
|
||||
alertMessage.push(`PW를 ${$("#new_r_pass").val()}로`);
|
||||
}
|
||||
|
||||
var confirmMessage = alertMessage.join(", ") + " 변경하시겠습니까?";
|
||||
if(!confirm(confirmMessage)){
|
||||
alert("수정 취소");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
AjaxUpdate(
|
||||
"update",
|
||||
$("#r_phone").val(),
|
||||
$("#r_position").val(),
|
||||
$("#r_area").val(),
|
||||
$("#r_district").val(),
|
||||
$("#r_edu").val(),
|
||||
$("#new_r_phone").val() ?? "",
|
||||
$("#new_r_pass").val() ?? ""
|
||||
);
|
||||
|
||||
var dt = $("#r_list").DataTable();
|
||||
dt.ajax.reload(null, false);
|
||||
}else{
|
||||
alert("수정 취소");
|
||||
}
|
||||
@@ -722,7 +764,9 @@
|
||||
"r_position" : upsertRow.r_position,
|
||||
"r_area" : upsertRow.r_area,
|
||||
"r_district" : upsertRow.r_district,
|
||||
"r_edu" : "NULL"
|
||||
"r_edu" : "NULL",
|
||||
"new_r_phone" : "NULL",
|
||||
"new_r_pass" : "NULL",
|
||||
},
|
||||
success:function(res){
|
||||
if(res == "1"){
|
||||
@@ -785,7 +829,18 @@
|
||||
return {"insert": insertCnt, "delete": deleteCnt, "fail": failCnt};
|
||||
}
|
||||
|
||||
function AjaxUpdate(gubun, phone, position, area, district, edu){
|
||||
function AjaxUpdate(gubun, phone, position, area, district, edu, new_r_phone, new_r_pass){
|
||||
console.log( {
|
||||
"gubun" : gubun,
|
||||
"r_name" : "NULL",
|
||||
"r_phone" : phone,
|
||||
"r_position" : position,
|
||||
"r_area" : area,
|
||||
"r_district" : district,
|
||||
"r_edu" : edu,
|
||||
"new_r_phone" : new_r_phone,
|
||||
"new_r_pass" : new_r_pass,
|
||||
})
|
||||
$.ajax({
|
||||
url:"/Ajax/Redit.asp",
|
||||
method:"POST",
|
||||
@@ -797,7 +852,9 @@
|
||||
"r_position" : position,
|
||||
"r_area" : area,
|
||||
"r_district" : district,
|
||||
"r_edu" : edu
|
||||
"r_edu" : edu,
|
||||
"new_r_phone" : new_r_phone,
|
||||
"new_r_pass" : new_r_pass,
|
||||
},
|
||||
success:function(res){
|
||||
if(res == "1"){
|
||||
|
||||
Reference in New Issue
Block a user