최초등록

This commit is contained in:
sp1000je
2026-02-23 10:01:00 +09:00
commit 7bc9767bf4
3120 changed files with 198447 additions and 0 deletions
+87
View File
@@ -0,0 +1,87 @@
<!-- #include virtual = "/common/lib/dbcon.asp" -->
<!-- #include virtual = "/common/lib/func.asp" -->
<%
Dim R_Fields, rs
Dim ct_idx, ct_code, ct_name, ct_ref, ct_depth, ct_chk, ct_wdate, ct_codeno, ct_url, ct_codeno_ref
R_Fields = "ct_idx, ct_code, ct_name, ct_ref, ct_depth, ct_chk, ct_wdate, ct_codeno, ct_url, ct_codeno_ref"
Call RequestAll (R_Fields, "request.form")
If ct_idx = "" then '//저장
'//순서
'//*****************************************
sql = "select max(ct_code) as ct_code from manager_menu WHERE ct_ref = " & ct_ref
'response.write sql
'response.end
Set rs = dbcon.execute( sql )
ct_code = rs("ct_code")
if IsNull( ct_code ) or ct_code = "" then
ct_code = 1
else
ct_code = ct_code + 1
End if
'//*****************************************
R_Fields_i = "ct_code, ct_name, ct_ref, ct_depth, ct_chk, ct_wdate, ct_url"
ct_wdate = getDateFm(Now(), 3)
Call InsertQuery (R_Fields_i, "manager_menu")
'//메뉴값 적용-----------------------------------------------------------------------------
sql = "select max(ct_idx) as ct_idx from manager_menu"
Set rs1 = dbcon.execute( sql )
max_ct_idx = rs1("ct_idx")
ct_codeno = ct_codeno_ref & "C" & max_ct_idx & ";"
sql = "update manager_menu set ct_codeno='" & ct_codeno & "' WHERE ct_idx = " & max_ct_idx
dbcon.execute sql
//-----------------------------------------------------------------------------------------
If ct_ref = "0" then ct_ref = ""
ok_url = "write.asp?ct_idx=" & ct_ref
Else '//수정
R_Fields = "ct_name, ct_wdate, ct_url"
ct_wdate = getDateFm(Now(), 3)
Call UpdateQuery (R_Fields, "manager_menu", "where ct_idx=" & ct_idx)
'//자주쓰는 메뉴 부분 (
sql = "update manager_favorites set ct_name='" & ct_name & "' WHERE mm_ct_idx = " & ct_idx
dbcon.execute sql
'//자주쓰는 메뉴도 변경 되어야 된다.
If ct_ref = "0" then ct_ref = ""
ok_url = "write.asp?ct_idx=" & ct_ref
End if
dbcon.close
Set dbcon = nothing
Call loding("0",ok_url)
%>