<%
'@@0manage/1s_udel/2list.HTML
'@@0manage/1s_udel/2edit|add|del/3*id.HTML

if e_xa<1 and (aibj(g_u0,s_udel) or aibj(g_u1,s_udel)) then
e_xa=e_xa+1
Call esq()
Call doq(1,e_uer,6,g_u0,s_udel,s_udels&s_umlbs)

if e_gdj>3 and aibj(g_u0,s_umgl) and aibj(g_u1,s_udel) and aibj(g_u2,s_umtj) then
Call eladd()
elseif e_gdj>3 and aibj(g_u0,s_umgl) and aibj(g_u1,s_udel) and aibj(g_u2,s_umxg) and aiint(g_u3)>0 then
Call eledit()
elseif e_gdj>3 and aibj(g_u0,s_umgl) and aibj(g_u1,s_udel) and ((aibj(g_u2,s_umsc) and aiint(g_u3)>0) or aibj(g_u2,s_umsc&"-x")) then
Call eldel()
elseif e_gdj>3 and aibj(g_u0,s_umgl) and aibj(g_u1,s_udel) and dkdir(2,g_u2) then
Call ellist()
end if
'------get skin 0
if ainull(e_skc) then
e_skc=dosk("a","admin","")
end if
'------get skin 1
Response.Write esr(0,e_skc):Response.End()
end if
'-----------------------------------
'Assignment
'=erq()
'-----------------------------------
Function elq()
Call esq()
ew_bt=s_udels&","&ew_bt
ew_zt=s_udels&","&ew_zt
ew_nr=s_udels&","&ew_nr
if aibj(g_u0,s_umgl) then
e_wl=e_wl&" &gt;&gt; <a href="""&e_ur0&""">"&s_udels&s_umlbs&"</a>"
else
e_wl=e_wl&" &gt;&gt; <a href="""&eshref(s_udel&g_urg&s_umlb&g_urz,1)&""">"&s_udels&s_umlbs&s_umxxs&"</a>"
end if
e_wr="<a href="""&e_ur1&""">"&s_umtjs&s_udels&"</a>|<a href="""&e_ur0&""">"&s_udels&s_umlbs&"</a>"&e_wr
ew_cp=ew_cp
e_mt=e_mt
e_ma=e_ma
End Function
'-----------------------------------
'Data Table
'=ellie()
'-----------------------------------
Function ellie(elfty)
if elfty="form" then
ellie="sn,mc,xy,px,ot,xt"
elseif elfty="select" then
ellie="el_sn,el_mc"
elseif elfty=s_umlb then
ellie="el_id,el_sn,el_mc,el_xy,el_px,el_ot"
elseif elfty=s_umlb&"s" then
ellie="id,sn,mc,xy,px,ot"
elseif elfty="all" then
ellie="el_id,el_sn,el_mc,el_xy,el_px,el_ot,el_xt"
end if
End Function
'-----------------------------------
'el select
'=elselect(0=id/1=mc)
'-----------------------------------
Function elselect(elfid)
dim elselectid,elselectmc
g_app=esapm(0,s_udel&"_Select")
elwhere=elwheremo
elorder=elordermo
if gystop(i_nmtp,elbid,ellie("select"),elbiao,elwhere,elorder,g_app) then
gysax=split(gysar,g_gx)
for gysi=0 to ubound(gysax)
gysay=split(gysax(gysi),g_gy)
if gysi=0 then
elselectid=gysay(0)
elselectmc=gysay(1)
else
elselectid=elselectid&"|"&gysay(0)
elselectmc=elselectmc&"|"&gysay(1)
end if
next
end if
elselectid=elselectid&"|116|103|114|123|101"
elselectmc=elselectmc&"|"&s_udbbs&"系统"&"|"&s_uduss&"系统"&"|"&s_uduks&"系统"&"|"&s_uduns&"系统|"&s_udeds&"系统"
elselect=aiselect("el","","","f-s1",elfid,elselectid,elselectmc)
End Function
'-----------------------------------
'add/edit form
'=elform()
'-----------------------------------
Function elform(elfty)
if elfty=0 then
el_px=0
el_xy=1
else
if el_xt<>"" then
el_xt=el_xt&espxx("修改"&i_gg&e_gmc)
else
el_xt=espxx("修改"&i_gg&e_gmc)
end if
end if
elform="<div class=""l-f""><form id=""EESaiForm"" name=""EESaiForm"" action="""" method=""post""><ul>"
elform=elform&"<li class=""l-1"">名称："&aiinput("","mc","",0,50,"*","f-a1|f-b1|f-c1",el_mc)&"编码："&aiinput("","sn","",6,50,"*只能填数字，且不能和其他重复","f-a1|f-b1|f-c1",el_sn)&"排序："&aiinput("","px","",6,50,"排序越大越靠前","f-a1|f-b1|f-c1",el_px)&"状态："&aiselect("xy","","","f-s1",el_xy,0,i_bxy)&"</li>"
elform=elform&"<li>其他："&aiinput("","ot","",0,200,"","f-a4|f-b4|f-c4",el_ot)&"</li>"_
&"<li class=""l-1"">系统："&eseditxt(el_xt,"xt",1)&"</li>"
elform=elform&eskyx(1,2,2)
if elfty=1 then
elform=elform&"<li class=""l-sb"">"&aibutton(2,"","","f-sb",s_umxgs)&aiinput("hidden","id","",0,0,"","",el_id)&aibutton(1,"","","f-sb",s_ztcz)&"</li>"
elseif elfty=0 then
elform=elform&"<li class=""l-sb"">"&aibutton(2,"","","f-sb",s_umtjs)&aibutton(1,"","","f-sb",s_ztcz)&"</li>"
end if
elform=elform&"</ul></form></div>"
End Function
'-----------------------------------
'add action
'=eladd()
'-----------------------------------
Function eladd()
ew_bt=s_umtjs&s_udels&","&ew_bt:ew_zt=s_umtjs&s_udels&","&ew_zt:ew_nr=s_umtjs&s_udels&","&ew_nr
e_wl=e_wl&" &gt;&gt; <a href="""&e_ur1&""">"&s_umtjs&s_udels&"</a>"
e_mt=esbts(s_udxel,s_udlel,s_umtjs&s_udels&g_gy&e_ur1,s_udels&s_umlbs&g_gy&e_ur0)
if esky(1,e_gdj) then
if aireqx("mc,sn") then
if gysfm(ellie("form"),elbiao,"el_sn="&aiint(aireq("sn")),"el_",1) then
e_ma=e_ma&aitiao(s_umtjs&s_udels&s_ztcg,e_ur0,i_nmtz)
e_ma=e_ma&eskod(17,77,esapm(0,s_udel&g_apj))
else
e_ma=e_ma&aigo(s_umtjs&s_udels&s_ztsb,1)
end if
else
e_ma=e_ma&aigo(s_umtjs&s_udels&s_ztsb,1)
end if
else
e_ma=elform(0)&e_ma
end if
End Function
'-----------------------------------
'edit action
'=eledit()
'-----------------------------------
Function eledit()
ew_bt=s_umxgs&s_udels&","&ew_bt:ew_zt=s_umxgs&s_udels&","&ew_zt:ew_nr=s_umxgs&s_udels&","&ew_nr
e_wl=e_wl&" &gt;&gt; <a href="""&eshref(s_umgl&g_urg&s_udel&g_urg&s_umxg&g_urg&g_u3&g_urz,77)&""">"&s_umxgs&s_udels&"</a>"
e_mt=esbts(s_udxel,s_udlel,s_umxgs&s_udels&g_gy&eshref(s_umgl&g_urg&s_udel&g_urg&s_umxg&g_urg&g_u3&g_urz,77),s_umtjs&s_udels&g_gy&e_ur1&g_gx&s_udels&s_umlbs&g_gy&e_ur0)
if esky(1,e_gdj) then
if aireqx("mc,sn") then
if gysfm(ellie("form"),elbiao,"el_id="&aiint(aireq("id"))&" or (el_id<>"&aiint(aireq("id"))&" and el_sn="&aiint(aireq("sn"))&")","el_",2) then
e_ma=e_ma&aitiao(s_umxgs&s_udels&s_ztcg,e_ur0,i_nmtz)
e_ma=e_ma&eskod(17,77,esapm(0,s_udel&g_apj))
else
e_ma=e_ma&aigo(s_umxgs&s_udels&s_ztsb,1)
end if
else
e_ma=e_ma&aigo(s_umxgs&s_udels&s_ztsb,1)
end if
else
if gysread(ellie("all"),elbiao,"el_id="&aiint(g_u3)&"","") then
ew_bt=el_mc&","&el_sn&","&ew_bt:ew_zt=el_mc&","&el_sn&","&ew_zt:ew_nr=el_mc&","&el_sn&","&ew_nr
e_ma=elform(1)&e_ma
else
e_ma=e_ma&aigo(s_udels&s_ztno,1)
end if
end if
End Function
'-----------------------------------
'del
'=eldel()
'-----------------------------------
Function eldel()
ew_bt=s_udels&s_umscs&","&ew_bt:ew_zt=s_udels&s_umscs&","&ew_zt:ew_nr=s_udels&s_umscs&","&ew_nr
e_wl=e_wl&" &gt;&gt; "&s_udels&s_umscs&""
e_mt=esbts(s_udxel,s_udlel,s_umscs&s_udels,s_umtjs&s_udels&g_gy&e_ur1&g_gx&s_udels&s_umlbs&g_gy&e_ur0)
if e_gdj>2 then
if aiint(g_u3)>0 then
if gysdel(elbid,elbiao,"el_id="&aiint(g_u3)) then
e_ma=e_ma&aitiao(s_udels&s_umscs&s_ztcg,e_ur0,i_nmtz)
else
e_ma=e_ma&aigo(s_udels&s_umscs&s_ztsb,1)
end if
elseif aibj(g_u2,s_umsc&"-x") then
if gysdel(elbid,elbiao,0) then
e_ma=e_ma&aitiao(s_udels&s_umscs&s_ztcg,e_ur0,i_nmtz)
else
e_ma=e_ma&aigo(s_udels&s_umscs&s_ztsb,1)
end if
end if
end if
End Function
'-----------------------------------
'list
'=ellist()
'-----------------------------------
Function ellist()
e_mt=esbts(s_udxel,s_udlel,s_udels&s_umlbs&g_gy&e_ur0,s_umtjs&s_udels&g_gy&e_ur1)
if esky(1,e_gdj) then
if gysfm(ellie(s_umlb&"s"),elbiao,1,"el_",22) then
e_ma=e_ma&aitiao(s_umxgs&s_udels&s_ztcg,e_ur0,i_nmtz)
e_ma=e_ma&eskod(17,77,esapm(0,s_udel&g_apj))
else
e_ma=e_ma&aigo(s_umxgs&s_udels&s_ztsb,1)
end if
else
if gystop(i_nmtp,elbid,ellie(s_umlb),elbiao,"",elordermo,"") then
e_ma=e_ma&"<div class=""l-f""><form id=""EESaiForm"" name=""EESaiForm"" action="""" method=""post""><ul>"
gysax=split(gysar,g_gx)
for gysi=0 to ubound(gysax)
gysay=split(gysax(gysi),g_gy)
if gysi mod 2=0 then
e_lcss="l1"
else
e_lcss="l2"
end if
if aiint(gysay(3))>1 then
e_lcss=e_lcss&" ftt"
elseif aiint(gysay(3))<1 then
e_lcss=e_lcss&" ftq"
end if
e_ma=e_ma&"<li class="""&e_lcss&""">名称："&aiinput("","mc","",0,50,"*","f-a1|f-b1|f-c1",gysay(2))&"编码："&aiinput("","sn","88px",6,50,"*","f-a1|f-b1|f-c1",gysay(1))&"排序："&aiinput("","px","",6,20,"","f-a1|f-b1|f-c1",gysay(4))&"状态："&aiselect("xy","","","f-s1",gysay(3),0,i_bxy)&"</li>"
e_ma=e_ma&"<li class="""&e_lcss&""">其他："&aiinput("","ot","",0,200,"*","f-a2|f-b2|f-c2",gysay(5))&aiinput("hidden","id","",0,0,"","",gysay(0))&aibutton(2,"","","f-se","快速"&s_umxgs)&aibuttonk(eshref(s_umgl&g_urg&s_udel&g_urg&s_umxg&g_urg&gysay(0)&g_urz,77),"","","","f-se","详细"&s_umxgs)&aibuttonk(eshref(s_umgl&g_urg&s_udel&g_urg&s_umsc&g_urg&gysay(0)&g_urz,77),s_umscs&s_udels&s_ztqr,"","","f-se",s_umscs)&"</li>"
next
e_ma=e_ma&eskyx(0,2,2)
e_ma=e_ma&"<li class=""l-sb"">"&aibutton(2,"","","f-sb",s_umxgs)&aibutton(1,"","","f-sb",s_ztcz)&aibuttonk(eshref(s_umgl&g_urg&s_udel&g_urg&s_umsc&"-x"&g_urz,77),s_umscs&s_udels&s_ztqr,"","","f-sb","清空")&"</li>"
e_ma=e_ma&"</ul></form></div>"
else
e_ma=e_ma&aigo(s_udels&s_ztno,e_ur1)
end if
end if
End Function
%>