📄 setprofile.asp
字号:
<!--#include file="../config.ini" -->
<!--#include file="../commfunction.inc" -->
<%
Dim objcheck
Set objcheck=Server.CreateObject("SmartSales.CheckFunction")
objcheck.CheckUserFunction "profile","edit"
set objcheck=nothing
dim conn
dim rs
set conn=server.CreateObject("adodb.connection")
conn.Open connstring
if request("mod")="save" then
'set rs=conn.Execute("delete from ProFilelist where ProFilelistid="&request("ProFilelistid"))
if Request.Form("right")<>"" then
menus=Split(Request.Form("right"),",")
for k=0 to ubound(menus)
set rs=conn.Execute("update ProFilelist set seq="&k&" where ProFilelistid="&menus(k))
next
end if
'rs.Close
set rs=nothing
conn.Close
set conn=nothing
%>
<script language=javascript>
window.opener.location.reload();
window.close();
</script>
<%
end if
%>
<script language="javascript">
function adddata(){
if (form1.Left.value!=""){
form1.Right.options.add(new Option(form1.Left.options(parseInt(form1.Left.selectedIndex)).text,form1.Left.value) );
form1.Left.options.remove(form1.Left.selectedIndex);
form1.arr.value=i;
}
}
function deldata(){
if (form1.Right.value!=""){
form1.Left.options.add(new Option(form1.Right.options(parseInt(form1.Right.selectedIndex)).text,form1.Right.value));
form1.Right.options.remove(form1.Right.selectedIndex);
}
}
function moveupdata()
{
if (form1.Right.value!="")
{
var i=parseInt(form1.Right.selectedIndex);
if (i!=0){
rdvalue=form1.Right.options(parseInt(i-1)).value;
rdtext=form1.Right.options(parseInt(i-1)).text;
form1.Right.options(parseInt(i-1)).value=form1.Right.options(parseInt(i)).value;
form1.Right.options(parseInt(i-1)).text=form1.Right.options(parseInt(i)).text;
form1.Right.options(parseInt(i)).value=rdvalue;
form1.Right.options(parseInt(i)).text=rdtext;
form1.Right.options(parseInt(i-1)).selected=true;
}
}
}
function movedowndata()
{
if (form1.Right.value!="")
{
var i=parseInt(form1.Right.selectedIndex);
if (i!=(parseInt(form1.Right.length)-1)){
rdvalue=form1.Right.options(parseInt(i+1)).value;
rdtext=form1.Right.options(parseInt(i+1)).text;
form1.Right.options(parseInt(i+1)).value=form1.Right.options(parseInt(i)).value;
form1.Right.options(parseInt(i+1)).text=form1.Right.options(parseInt(i)).text;
form1.Right.options(parseInt(i)).value=rdvalue;
form1.Right.options(parseInt(i)).text=rdtext;
form1.Right.options(parseInt(i)).selected=false;
form1.Right.options(parseInt(i+1)).selected=true;
}
}
}
function save(){
for(var i=0;i<=form1.Right.length-1;i++){
form1.Right.options(i).selected=true;
}
form1.mod.value="save";
form1.submit();
}
</script>
<html>
<head>
<title>排序</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../global.css" rel=STYLESHEET type=text/css>
</head>
<body bgcolor="efefef" link="#48576C" vlink="#48576C" alink="#000000">
<form action="" name="form1" method="Post">
<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="25"><strong>排序</strong>
<a onclick="javascript:save();"><img src="../images/button_save.gif"></a>
<a onClick="window.close();"><img src="../images/button_cancel.gif"></a>
</td>
</tr>
<tr >
<td height="16" colspan="3" background="../images/title.gif"> </td>
</tr>
<tr>
<td height=4></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#ffffff" width="100%" id="AutoNumber1" height="281">
<tr>
<td width="80%" valign="top" bgcolor="efefef"> <table bgcolor="efefef" width="100%">
<tr>
<td><div align="center"></div></td>
<td><div align="center">选择并按上移/下移按钮</div></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td bgcolor="efefef"> <div align="center">
<select name=Right size=20 multiple style="width:120pt" ondblclick="deldata()">
<%
set rs=conn.Execute("select * from ProFilelist where andid="&request("ProFilelistid")&" order by seq")
do while not rs.EOF
%>
<option value="<%=rs("ProFilelistid")%>"><%=rs("subname")%></option>
<%
rs.MoveNext
i=i+1
loop
rs.Close
set rs=nothing
conn.Close
set conn=nothing
%>
%>
</select>
</div></td>
<td> <input type="button" name="moveup" value="上移" onClick="moveupdata()">
<br> <br> <input type="button" name="movedown" value="下移" onClick="movedowndata()"></td>
</tr>
</table>
<input type=hidden name="attendant">
<input type=hidden name="arr" value=0>
<input type=hidden name="mod">
<input type=hidden name="ProFilelistid" value=<%=request("ProFilelistid")%>>
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -