羅门婚纱,开发代码剪辑
Posted bywayboy
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了羅门婚纱,开发代码剪辑相关的知识,希望对你有一定的参考价值。
select
*
from
[
v_activity
]
where
format(addTime,
'
yyyymm
'
)
=
format(
DateAdd
(
'
m
'
,
-
1
,Now),
'
yyyymm
'
)
ORDER
BY
Rnd(
-
.
6182978
*
id)
select
*
from
[
v_activity
]
where
format(addTime,
'
yyyymm
'
)
=
format(
DateAdd
(
'
m
'
,
-
1
,Now),
'
yyyymm
'
)
ORDER
BY
Rnd(
-
.
6182978
*
id)
1、后台管理,
var
v_leftmenu
=
[
... {
name:"活动管理",
items:[...{
name:"本届活动",
href:"thisactivity.asp"
},...{
name:"最美新娘",
href:"test2.asp"
},...{
name:"留言管理",
href:"test2.asp"
},...{
name:"投票管理",
href:"test2.asp"
}]
} , ... {
name:"情景管理",
items:[...{
name:"dd",
href:"test1.asp"
},...{
name:"aa",
href:"test2.asp"
}]
} , ... {
name:"会员管理",
items:[...{
name:"会员注册管理",
href:"associator.asp?action=list"
},...{
name:"订单管理",
href:"order.asp?action=list"
}]
} , ... {
name:"系统设置",
items:[...{
name:"公告管理",
href:"Announce.asp?action=list"
},...{
name:"摄影师管理",
href:"grapher.asp?action=list"
},...{
name:"化妆师管理",
href:"artist.asp?action=list"
},...{
name:"价格套餐管理",
href:"PriceOrder.asp?action=list"
},...{
name:"站点空间管理",
href:"db_size.asp?action=list"
}]
}
];
function initLeftMenu()
... {
var r=$('frame_left').getElementsByTagName('UL')[0];
for(ls=0;ls<v_leftmenu.length;ls++)...{
var li=document.createElement('LI');
var a=document.createElement('A');
a.innerText=v_leftmenu[ls].name;
a.href='javascript:void(0)';
bindEvent('onclick',a,function(e)...{
var submenu=$('submenu').getElementsByTagName('UL')[0];
submenu.innerText='';
for(key in this)...{
var li1=document.createElement('LI');
var a1=document.createElement('A');
a1.innerText=this[key].name;
a1.href='javascript:void(0)';
bindEvent('onclick',a1,function(e)...{
$('main_frame').contentWindow.document.location = this;
},this[key].href);
li1.appendChild(a1);
submenu.appendChild(li1);
}
},v_leftmenu[ls].items);
li.appendChild(a);
r.appendChild(li);
}
return r.getElementsByTagName('LI')[0].getElementsByTagName('A')[0];
}
... {
name:"活动管理",
items:[...{
name:"本届活动",
href:"thisactivity.asp"
},...{
name:"最美新娘",
href:"test2.asp"
},...{
name:"留言管理",
href:"test2.asp"
},...{
name:"投票管理",
href:"test2.asp"
}]
} , ... {
name:"情景管理",
items:[...{
name:"dd",
href:"test1.asp"
},...{
name:"aa",
href:"test2.asp"
}]
} , ... {
name:"会员管理",
items:[...{
name:"会员注册管理",
href:"associator.asp?action=list"
},...{
name:"订单管理",
href:"order.asp?action=list"
}]
} , ... {
name:"系统设置",
items:[...{
name:"公告管理",
href:"Announce.asp?action=list"
},...{
name:"摄影师管理",
href:"grapher.asp?action=list"
},...{
name:"化妆师管理",
href:"artist.asp?action=list"
},...{
name:"价格套餐管理",
href:"PriceOrder.asp?action=list"
},...{
name:"站点空间管理",
href:"db_size.asp?action=list"
}]
}
];
function initLeftMenu()
... {
var r=$('frame_left').getElementsByTagName('UL')[0];
for(ls=0;ls<v_leftmenu.length;ls++)...{
var li=document.createElement('LI');
var a=document.createElement('A');
a.innerText=v_leftmenu[ls].name;
a.href='javascript:void(0)';
bindEvent('onclick',a,function(e)...{
var submenu=$('submenu').getElementsByTagName('UL')[0];
submenu.innerText='';
for(key in this)...{
var li1=document.createElement('LI');
var a1=document.createElement('A');
a1.innerText=this[key].name;
a1.href='javascript:void(0)';
bindEvent('onclick',a1,function(e)...{
$('main_frame').contentWindow.document.location = this;
},this[key].href);
li1.appendChild(a1);
submenu.appendChild(li1);
}
},v_leftmenu[ls].items);
li.appendChild(a);
r.appendChild(li);
}
return r.getElementsByTagName('LI')[0].getElementsByTagName('A')[0];
}
2、事实判断用户是否注册:
function
$(e)
...
{return document.getElementById(e);}
function checkuser(value,img)
... {
var span=document.createElement('SPAN');
var str='user='+encodeURI(value);
img.style.display='none';
span.innerText="请稍候...";
img.parentNode.appendChild(span);
var x = new ActiveXObject("MSXML2.XMLHTTP.3.0");
x.open("POST", "checkuser.asp", true);
x.onreadystatechange=function()...{
if(x.readyState==4)...{
span.parentNode.removeChild(span);
img.style.display='';
if(x.responseText=="1")
img.src='/images/check_right.gif';
else
img.src='/images/check_error.gif';
}
}
x.setRequestHeader("Content-Length",str.length);
x.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
x.send(str);
}
function checkuser(value,img)
... {
var span=document.createElement('SPAN');
var str='user='+encodeURI(value);
img.style.display='none';
span.innerText="请稍候...";
img.parentNode.appendChild(span);
var x = new ActiveXObject("MSXML2.XMLHTTP.3.0");
x.open("POST", "checkuser.asp", true);
x.onreadystatechange=function()...{
if(x.readyState==4)...{
span.parentNode.removeChild(span);
img.style.display='';
if(x.responseText=="1")
img.src='/images/check_right.gif';
else
img.src='/images/check_error.gif';
}
}
x.setRequestHeader("Content-Length",str.length);
x.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
x.send(str);
}
3、压缩数据库
Function
CompactDB(dbPath, boolIs97)
Dim fso, Engine, strDBPath,JET_3X,size
strDBPath = dbPath
size = GetFileSize(strDBPath)
Set fso = CreateObject ( " Scripting.FileSystemObject " )
If fso.FileExists(dbPath) Then
Set Engine = CreateObject ( " JRO.JetEngine " )
' 其实,和在Access中压缩数据库一样,我们仍然调用 JRO 来压缩修复数据库
' 所不同的是在这里我们没有向Access那样采用“先引用”的方式(工具菜单选择引用)
' 而是采用脚本所能使用的“后引用”方式建立 JRO 的实例 CreateObject("JRO.JetEngine")
If boolIs97 = True Then
Engine.CompactDatabase " Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & dbpath, _
" Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & strDBPath & " temp.mdb; " _
& " Jet OLEDB:Engine Type= " & JET_3X
Else
Engine.CompactDatabase " Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & dbpath, _
" Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & strDBPath & " temp.mdb "
End If
' 操作完成后将已经缩小体积的数据库 COPY 回原位,覆盖原始文件
fso.CopyFile strDBPath & " temp.mdb " ,dbpath
' 删除无用的临时文件
fso.DeleteFile(strDBPath & " temp.mdb " )
Set fso = nothing
Set Engine = nothing
CompactDB = " 你的数据库已经被成功地压缩了 " & FormatUnits(size - GetFileSize(dbPath)) & vbCrLf
Else
CompactDB = " 数据库名称或路径不正确. 请重试! " & vbCrLf
End If
End Function
Dim fso, Engine, strDBPath,JET_3X,size
strDBPath = dbPath
size = GetFileSize(strDBPath)
Set fso = CreateObject ( " Scripting.FileSystemObject " )
If fso.FileExists(dbPath) Then
Set Engine = CreateObject ( " JRO.JetEngine " )
' 其实,和在Access中压缩数据库一样,我们仍然调用 JRO 来压缩修复数据库
' 所不同的是在这里我们没有向Access那样采用“先引用”的方式(工具菜单选择引用)
' 而是采用脚本所能使用的“后引用”方式建立 JRO 的实例 CreateObject("JRO.JetEngine")
If boolIs97 = True Then
Engine.CompactDatabase " Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & dbpath, _
" Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & strDBPath & " temp.mdb; " _
& " Jet OLEDB:Engine Type= " & JET_3X
Else
Engine.CompactDatabase " Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & dbpath, _
" Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & strDBPath & " temp.mdb "
End If
' 操作完成后将已经缩小体积的数据库 COPY 回原位,覆盖原始文件
fso.CopyFile strDBPath & " temp.mdb " ,dbpath
' 删除无用的临时文件
fso.DeleteFile(strDBPath & " temp.mdb " )
Set fso = nothing
Set Engine = nothing
CompactDB = " 你的数据库已经被成功地压缩了 " & FormatUnits(size - GetFileSize(dbPath)) & vbCrLf
Else
CompactDB = " 数据库名称或路径不正确. 请重试! " & vbCrLf
End If
End Function
4、Acess 数据库记录 随机显示。
Randomize
()
Set rs = conn.execute( " select * from [v_activity] where format(addTime,'yyyymm')=format(DateAdd('m',-1,Now),'yyyymm') ORDER BY Rnd( " & ( - 1 * Rnd ) & " * id) " )
Set rs = conn.execute( " select * from [v_activity] where format(addTime,'yyyymm')=format(DateAdd('m',-1,Now),'yyyymm') ORDER BY Rnd( " & ( - 1 * Rnd ) & " * id) " )
得到类似如下的SQL:
select * from [v_activity] where format(addTime,'yyyymm')=format(DateAdd('m',-1,Now),'yyyymm') ORDER BY Rnd(-.6182978* id)
这里我只要提取上课月的数据,因此用了 format去年和月进行比较。
以上是关于羅门婚纱,开发代码剪辑的主要内容,如果未能解决你的问题,请参考以下文章