<% Function gen_key(digits) 'Create and define array dim char_array(50) char_array(0) = "0" char_array(1) = "1" char_array(2) = "2" char_array(3) = "3" char_array(4) = "4" char_array(5) = "5" char_array(6) = "6" char_array(7) = "7" char_array(8) = "8" char_array(9) = "9" char_array(10) = "0" char_array(11) = "1" char_array(12) = "2" char_array(13) = "3" char_array(14) = "4" char_array(15) = "5" char_array(16) = "6" char_array(17) = "7" char_array(18) = "8" char_array(19) = "9" char_array(20) = "0" char_array(21) = "1" char_array(22) = "2" char_array(23) = "3" char_array(24) = "4" char_array(25) = "5" char_array(26) = "6" char_array(27) = "7" char_array(28) = "8" char_array(29) = "9" char_array(30) = "0" char_array(31) = "1" char_array(32) = "2" char_array(33) = "3" char_array(34) = "4" char_array(35) = "5" 'Initiate randomize method for default seeding randomize 'Loop through and create the output based on the the variable passed to 'the function for the length of the key. do while len(output) < digits num = char_array(Int((35 - 0 + 1) * Rnd + 0)) output = output + num loop 'Set return gen_key = output End Function %> <% dim rsYydx,HotSql,SortSql,rsCount,rsSort,StrSQL,Total,Today,Sending On Error Resume Next HotSql= "Select song_id,song_name,click From T_musicbox_warehouse Order By Convert(int,click,4) Desc" Set rsYydx=Conn.Execute(HotSQL) '热门 SortSql="Select song_id,song_name,singer_name From T_yydx_tuijian Order By sort" Set rsSort=Conn.Execute(SortSQL) '推荐 StrSql= "Select Sum(Convert(int,click,4)) From T_musicbox_warehouse Where click<>'0'" Set rsCount=Conn.Execute(StrSQL) '总的 Total=rsCount(0).Value n=Year(date()) y=Month(date()) r=Day(date()) m=minute(time()) Session("rsMusic_AbsolutePage")=int(m) if len(y)=1 then y="0" & y if len(r)=1 then r="0" & r if len(h)=1 then h="0" & h '如果月份或日期是一位数,那么前面用0补齐。 smstoday=n & y & r sendendtime=n &"-" & y &"-"& r StrSql= "Select Count(smsid) From T_Sms_TempNet Where smstime like '"&smstoday &"%'" Set rsCount=Conn.Execute(StrSQL) '今天 Today=rsCount(0).Value 'StrSql= "Select Count(CALLER) From PREDIALTASK Where SERVICESTOPTIME like '"& sendendtime &"%' And CALLER='96955008'" 'Set rsCount=PreConn.Execute(StrSQL) '正在发送的 'Sending=rsCount(0).Value Sending=CALLPREDIALTASK(smstoday,"96955008") Tmp=application("online") dim username,password,selecttype username= Trim(request.Form("username")) password= Trim(request.Form("password")) if username<>"" And Password<>"" Then StrSql= "Select userid,ncname,phone,Convert(char,smsgoldcount,6) From T_yydx_user Where username='" & username &"' And password='" & password & "'" Set rsCount=Conn.Execute(StrSQL) If Not rsCount.Eof Then Session("rsYydx_UserName")=username Session("rsYydx_UserID")=rsCount("userid") Session("rsYydx_NcName")=rsCount("ncname") Session("rsYydx_Phone")=rsCount("phone") Session("rsYydx_smsgoldcount")=rsCount(3).Value Session("rsYydx_User_Flag")=1 Else Session("rsYydx_UserName")="" Session("rsYydx_NcName")="" Session("rsYydx_UserID")="" Session("rsYydx_Phone")="" Session("rsYydx_smsgoldcount")="0" Session("rsYydx_User_Flag")=0 End if End if selecttype= Trim(request("selecttype")) goldcoin= Trim(request.Form("goldcoin")) if selecttype="电话用户"Then Session("GoldCoin_Flag")=0 Else Session("GoldCoin_Flag")=1 selecttype="金币用户" End if if Session("GoldCoin_Flag")=1 And len(goldcoin)>1 Then StrSQL="Select smsgoldcount,caller From T_yydx_goldcoin Where goldcoinid='" & goldcoin &"'" Set rsCount=Conn.Execute(StrSQL) If Not rsCount.Eof Then Session("rsYydx_smsgoldcount")=rsCount("smsgoldcount") Session("rsYydx_Phone")=rsCount("caller") Session("GoldCoin_User")=goldcoin Session("rsYydx_User_Flag")=1 Session("rsYydx_UserName")="金币用户" Session("rsYydx_UserID")=goldcoin Else Session("rsYydx_smsgoldcount")="0" Session("rsYydx_Phone")="" Session("GoldCoin_User")="" Session("rsYydx_User_Flag")=0 Session("rsYydx_UserName")="" Session("rsYydx_UserID")="" End if End if %> 语音短信