SoFunction
Updated on 2025-03-09

7xi Music Network's collection source code implemented by asp


<% 
''' 
'''╔=======================================╗ 
'''┆                                       ┆ 
''┆ @System: 7xi Music Collection System Version 2.0    ┆
'''┆ @Module: Configuration File
''┆ @Creation: 2006/07/24
''┆ @Author:
''┆ @Contact: fangds@ QQ-3700909     ┆
'''┆ @Copyright: The source code is public, there are no copyright issues, you can ┆
''┆           Use with confidence!!! Respect the author's labor achievements, please ┆
'''┆
'''┆                                       ┆ 
'''╚=======================================╝ 
''' 

dim picc_FolderPath,mp3_FolderPath 
dim v_7xijs_url,v_7xipicc_url,v_7xiplay_url,v_7xialbum_url,v_7ximp3_url,cfg_name,cfg_line 
dim httpobj,str,str0,str1,str2,str3,str4,str5,str6,str7,str8,str9 
dim is_getrm 

'---Whether the music file is saved locally, true-Save; false-Don't save
is_getrm = false 

'---Save path
picc_FolderPath = "H:\mp3data\images\" 
mp3_FolderPath = "H:\mp3data\rm\"  

'---7xi related page
v_7xijs_url = "/player/" 
v_7xipicc_url = "http://ww./picc/" 
v_7xiplay_url = "/playsong/" 
v_7xialbum_url = "http://ww./Vo2/" 
v_7ximp3_url = """ '--Real-time Read

'---Detection ID
cfg_name = ""  
cfg_line = 1  

'---Read the playback js file and get the rm file path
set httpobj = ("") 
str = (v_7xijs_url) 
str0 = split(str,"theurl2="&chr(34)) 
str1 = split(str0(1),chr(34)) 
v_7ximp3_url = str1(0) 
set httpobj = nothing 
str = "" 

'---Database Connection
set Conn = ("")  
 "driver={SQL server};server=localhost;uid=mp3;pwd=mp3;database=mp3db"  

'---The SQL statement needs to be filtered when executing it
Function IndbStr(str) 
        if isNull(str) or str = "" then 
                IndbStr = str 
        else 
                IndbStr = replace(replace(trim(str),"'","''"),"%","") 
        end if 
End Function 

'---Close the database connection
Function CloseConn() 
         
        set conn=nothing 
End Function 

'---Get remote files and save them to local
Function GetRemoteFiles(RemotePath, LocalPath, FileName) 
  Dim strBody 
  Dim FilePath 
  On Error Resume Next 
'---Get stream
  strBody = GetBody(RemotePath) 
'---Get saved file name
  if Right(LocalPath, 1) <> "\" then LocalPath = LocalPath & "\" 
  if not CheckDir(bkfolder) then MakeNewsDir bkfolder 
  FilePath = LocalPath & GetFileName(RemotePath, FileName) 
'---Save the file
  if SaveToFile(strBody, FilePath) = true and  = 0 then 
   GetRemoteFiles = true 
  else 
    GetRemoteFiles = false 
  end if 
End Function 

'---Remote content
Function GetBody(url)  
  Dim Retrieval 
'---Create XMLHTTP object
  Set Retrieval = CreateObject("")  
  With Retrieval  
  .Open "Get", url, False, "", ""  
  .Send  
  GetBody = .ResponseBody 
  End With  
  Set Retrieval = Nothing  
End Function 

'---Reorganize the file name
Function GetFileName(RemotePath, FileName) 
  Dim arrTmp 
  Dim strFileExt 
  arrTmp = Split(RemotePath, ".") 
  strFileExt = arrTmp(UBound(arrTmp)) 
  GetFileName = FileName & "." & strFileExt 
End Function 

'---Save streaming content as a file
Function SaveToFile(Stream, FilePath) 
  Dim objStream 
  On Error Resume Next 
'---ADO version 2.5 or above is required to create an object
  Set objStream = ("") 
= 1 'Open in binary mode
   
   Stream 
   FilePath, 2 
  () 
'---Close the object and release the resource
  Set objstream = Nothing 
  if  <> 0 then 
    SaveToFile = false 
  else 
    SaveToFile = true 
  end if 
End Function 

'---Read text file
Function FSOlinedit(filename,lineNum) 
  if linenum < 1 then exit function 
  dim fso,f,temparray,tempcnt 
  set fso = ("") 
  if not ((filename)) then exit function 
  set f = ((filename),1) 
  if not  then 
    tempcnt =  
     
    set f = nothing 
    temparray = split(tempcnt,chr(13)&chr(10)) 
    if lineNum>ubound(temparray)+1 then 
      exit function 
    else 
      FSOlinedit = temparray(lineNum-1) 
    end if 
  end if 
End function 

'---Check whether the absolute path exists
Function CheckFolder(FolderPath) 
  dim fso1 
  Set fso1 = CreateObject("") 
  If (FolderPath) then 
'exist
     CheckFolder = True 
  Else 
'Not exist
     CheckFolder = False 
  End if 
  Set fso1 = nothing 
End Function 

'---Create a directory based on the specified name
Function MakeNewsDir(foldername) 
  dim fso1,f 
  Set fso1 = CreateObject("") 
  Set f = (foldername) 
  MakeNewsDir = True 
  Set fso1 = nothing 
End Function 

''''''''''''''''''''''''''''''''
Function Jencode(byVal iStr) 
        if isnull(iStr) or isEmpty(iStr) then 
                Jencode="" 
                Exit function 
        end if 
        dim F,i,E 
        E=array("Jn0;","Jn1;","Jn2;","Jn3;","Jn4;","Jn5;","Jn6;","Jn7;","Jn8;","Jn9;","Jn10;","Jn11;","Jn12;","Jn13;","Jn14;","Jn15;","Jn16;","Jn17;","Jn18;","Jn19;","Jn20;","Jn21;","Jn22;","Jn23;","Jn24;","Jn25;") 
        F=array(chr(-23116),chr(-23124),chr(-23122),chr(-23120),_ 
        chr(-23118),chr(-23114),chr(-23112),chr(-23110),_ 
        chr(-23099),chr(-23097),chr(-23095),chr(-23075),_ 
        chr(-23079),chr(-23081),chr(-23085),chr(-23087),_ 
        chr(-23052),chr(-23076),chr(-23078),chr(-23082),_ 
        chr(-23084),chr(-23088),chr(-23102),chr(-23104),_ 
        chr(-23106),chr(-23108)) 
        Jencode=iStr 
        for i=0 to 25 
                Jencode=replace(Jencode,F(i),E(i)) 
        next 
End Function 

''''''''''''''''''Decoding (Japanese characters)''''''''''
Function Juncode(byVal iStr) 
        if isnull(iStr) or isEmpty(iStr) then 
                Juncode="" 
                Exit function 
        end if 
        dim F,i,E 
        E=array("Jn0;","Jn1;","Jn2;","Jn3;","Jn4;","Jn5;","Jn6;","Jn7;","Jn8;","Jn9;","Jn10;","Jn11;","Jn12;","Jn13;","Jn14;","Jn15;","Jn16;","Jn17;","Jn18;","Jn19;","Jn20;","Jn21;","Jn22;","Jn23;","Jn24;","Jn25;") 
        F=array(chr(-23116),chr(-23124),chr(-23122),chr(-23120),_ 
        chr(-23118),chr(-23114),chr(-23112),chr(-23110),_ 
        chr(-23099),chr(-23097),chr(-23095),chr(-23075),_ 
        chr(-23079),chr(-23081),chr(-23085),chr(-23087),_ 
        chr(-23052),chr(-23076),chr(-23078),chr(-23082),_ 
        chr(-23084),chr(-23088),chr(-23102),chr(-23104),_ 
        chr(-23106),chr(-23108)) 
        Juncode=iStr 
        for i=0 to 25 
                Juncode=replace(Juncode,E(i),F(i))'□ 
        next 
End Function 
%> 


1 is to add singers manually:
'--- Add singer manually, the content is as follows:

Program code
<% 
''' 
'''╔=======================================╗ 
'''┆                                       ┆ 
''┆ @System: 7xi Music Collection System Version 2.0    ┆
'''┆ @Module: Add singer manually
''┆ @Creation: 2006/07/24
''┆ @Author:
''┆ @Contact: fangds@ QQ-3700909     ┆
'''┆ @Copyright: The source code is public, there are no copyright issues, you can ┆
''┆           Use with confidence!!! Respect the author's labor achievements, please ┆
'''┆
'''┆                                       ┆ 
'''╚=======================================╝ 
''' 
'%> 
<!--#include file="" --> 
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
<meta http-equiv="Content-Language" content="gb2312" /> 
<title>Add singer category_7xi music collection and update system</title>
</head> 
<body> 
<br>7xi music collection and update system<br><br>
<% 
dim sql 
dim singer_name,singer_first_name,singer_sort 

singer_name = IndbStr(request("singer_name")) 
singer_first_name = Ucase(IndbStr(request("singer_first_name"))) 
singer_sort = request("singer_sort") 

"<br>Singer information<br><br>Name:"&singer_name&"<br>Letter:"&singer_first_name&"<br>Nature:"&singer_sort

sql = "insert into d_singer (singer_name,singer_first_name,singer_sort,is_down) values ('"&singer_name&"','"&singer_first_name&"','"&singer_sort&"',0)" 
 "<br><br>"&sql 
(sql) 
CloseConn() 

'---After the singer is added, transfer to information collection and re-test
"<br><br>The singer information inspection was added, and I am preparing to check and get updates...<br>"
 "<meta http-equiv=refresh content=""1 ; url="">" 
%> 
</body> 
</html> 


Two are collection procedures:
'---Collection of song information on singer's album, the content is as follows

Program code
<% 
''' 
'''╔=======================================╗ 
'''┆                                       ┆ 
''┆ @System: 7xi Music Collection System Version 2.0    ┆
'''┆ @Module: Singer, album, song information collection         ┆
''┆ @Creation: 2006/07/24
''┆ @Author:
''┆ @Contact: fangds@ QQ-3700909     ┆
'''┆ @Copyright: The source code is public, there are no copyright issues, you can ┆
''┆           Use with confidence!!! Respect the author's labor achievements, please ┆
'''┆
'''┆                                       ┆ 
'''╚=======================================╝ 
''' 
'%> 
<!--#include file="" --> 
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
<meta http-equiv="Content-Language" content="gb2312" /> 
<title>Singer Album Song Information Collection_7xi Music Collection Update System</title>
</head> 
<body> 
<br>7xi music collection and update system<br><br>
<% 
dim t7xiid,url,FolderPath,fso,fout 
dim songid(100),songname(100) 
dim strsinger,strlang,stralbum,strtime,strcorp,strcontent,strpicc,singerid,albumid 
dim rssort,rssinger,rsalbum,rssong,i,m,sql,okimg 

t7xiid = FSOlinedit(cfg_name,cfg_line) 

url = v_7xialbum_url&"v_"&t7xiid&".htm" 

set httpobj=("") 

 
'on error resume next 

str = "" 
str = (url) 

if str = "" then 
        CloseConn() 
if t7xiid < 3198 then '-- Whether to increment the ID when it is not detected, continue to detect
    str = t7xiid + 1 
    FolderPath = (".\") 
    Set fso = ("") 
    Set fout = (FolderPath & "\")  
     str 
      
"<br>The current ID number does not exist, the next ID number is being checked.
     "<meta http-equiv=refresh content=""0 ; url="">" 
else '---When there is no need to incremental ID detection, go to song information collection
"<br>The singer's album information has been checked and he is preparing to check and obtain song information...<br>"
     "<meta http-equiv=refresh content=""0 ; url="">" 
     
  end if 
else 
str0 = split(str,"singer: ")
  str1 = split(str0(1),"</td>") 
  strsinger = IndbStr(str1(0)) 
"<br>Singer: "&strsinger

str0 = split(str,"word type: ")
  str1 = split(str0(1),"</td>") 
  strlang = str1(0) 
"<br>Lang Language:"&strlang

str0 = split(str,"Album: ")
  str1 = split(str0(1),"</a>") 
  str2 = split(str1(0),""">") 
  stralbum = IndbStr(str2(1)) 
"<br>Album: "&stralbum

str0 = split(str,"time: ")
  str1 = split(str0(1),"</td>") 
  strtime = str1(0) 
"<br>Time:"&strtime

str0 = split(str,"Company: ")
  str1 = split(str0(1),"</td>") 
  strcorp = str1(0) 
"<br>Company:"&strcorp

  str0 = split(str,"<tr valign=""top""><td colspan=""2"">") 
  str1 = split(str0(1),"</td>") 
  strcontent = replace(replace(IndbStr(str1(0)),"<br>",chr(13))," "," ") 
"<br>Introduction: "&strcontent

  str0 = split(str,"<img src=""../picc/") 
  str1 = split(str0(1),"""") 
  strpicc = str1(0) 
"<br>Picture:"&strpicc
   "<br><img src="&v_7xipicc_url&strpicc&" border=0>" 

  set rssinger = ("select * from d_singer where singer_name='"&strsinger&"'") 
'---Singer information does not exist. Singer needs to be added manually.
  if  then 
     "<br>select * from d_singer where singer_name='"&strsinger&"'" 
"<br><br>The singer does not exist and needs to be added manually.<br><br>Please add the singer as follows:<br><br>"
%> 
<form action=""> 
<input type="text" size="20" name="singer_name" value="<%=strsinger%>"> 
<input type="text" size="6" name="singer_first_name" value="Secret" maxlength="3">
<select name="singer_sort" size="1"><%'%> 
<% 
    set rssort = ("select * from s_sort ") 
    do while not  and i < 10 
%> 
<option value="<%=rssort("id")%>"><%=rssort("sort_name")%></option><%'%> 
<% 
       
    loop 
     
    set rssort = nothing 
%></select> 
<input type="submit" value="add">
</form> 
<%  
    CloseConn() 
     
else '---Singer information already exists. Check whether the album information needs to be stored.
    singerid = rssinger("id") 
("update d_singer set is_down=0 where <br><br>The singer's information is correct, and the album information is being checked and obtained...<br>"
    set rsalbum = ("select * from d_album where album_singer="&singerid&" and album_name='"&stralbum&"'") 
    if  then 
      str1 = split(strpicc,".") 
      str2 = str1(0) 
      sql="insert into d_album (album_singer,file_img,album_name,album_lang,album_corp,album_time,album_intro,add_time,is_down,album_7xi) values ('"&singerid&"','"&strpicc&"','"&stralbum&"','"&strlang&"','"&strcorp&"','"&strtime&"','"&strcontent&"','"&now&"',0,"&t7xiid&")" 
      (sql) 
'---Collection and save album thumbnails
      okimg = GetRemoteFiles(v_7xipicc_url&strpicc,picc_FolderPath,str2)                 
"<br>Album information checking is added, and the song information is being checked and obtained..."&"<br>SQL statement: "&sql
    else 
"<br><br>The album information is correct, and you are preparing to check and get song information..."
    end if     
     
    set rsalbum = nothing 
  end if 
   
  set rssinger = nothing 

  set rsalbum = ("select * from d_album where album_singer="&singerid&" and album_name='"&stralbum&"'") 
  albumid = rsalbum("id") 
   
  set rsalbum = nothing 

"<br><br>Album Song Information<br>"

'---Song ID
  i = 1 
  str0 = split(str,"<input type="&chr(34)&"checkbox"&chr(34)&" name="&chr(34)&"checked"&chr(34)&" value="&chr(34)) 
"<br>Song ID:"
  do while i <= Ubound(str0) 
    str1 = split(str0(i),chr(34)) 
    songid(i-1) = str1(0) 
     songid(i-1)&" - " 
    i = i + 1 
  loop 
"Total"&i&"head."

'---The song title
  m = 1 
str0 = split(str,"<a href=""../?<br><br>Song: "
  do while m <= Ubound(str0) 
str1 = split(str0(m),""" target=""_blank""><img src=""../images/"" alt=""Free song order")
    songname(m-1) = Jencode(replace(str1(0),"'","''")) 
     Juncode(songname(m-1))&" - " 
    m = m + 1 
  loop 
"Total"&i&"head."

'---If the number of song IDs and song names are inconsistent, you need to check whether there is any error.
  if i <> m then 
"<br><br><font color=red><b>Error:</b>The number of song IDs is inconsistent with the number of song names, please check the target page: "& url &"</font>"
     
  end if 

'--- Check whether the song needs to be stored
  do while i > 1 
    set rssong = ("select * from d_mp3 where mp3_album="&albumid&" and mp3_singer="&singerid&" and mp3_name='"&songname(i-2)&"'") 
    if  then 
      sql = "insert into d_mp3 (mp3_7xi,mp3_singer,mp3_album,mp3_name) values ('"&songid(i-2)&"','"&singerid&"','"&albumid&"','"&songname(i-2)&"')" 
      (sql) 
"<br><font color=red>Add: "&songname(i-2)&"</font>"
       sql 
    else 
"<br>Skip: "&songname(i-2)
    end if 
     
    set rssong = nothing 
    i = i-1 
  loop 

  CloseConn() 

'--Record the next detection ID number
  str = t7xiid + 1 
  FolderPath = (".\") 
  Set fso = ("") 
  Set fout = (FolderPath & "\")  
   str 
   

'--Continue to detect the next ID
"<br>Calling the next ID information..."
   "<meta http-equiv=refresh content=""0 ; url="">" 
end if 
%> 
</body> 
</html> 


'---Collection of RM files to update song information, the content is as follows:

Program code
<% 
''' 
'''╔=======================================╗ 
'''┆                                       ┆ 
''┆ @System: 7xi Music Collection System Version 2.0    ┆
'''┆ @Module: Collection of information such as song files, lyrics, etc.         ┆
''┆ @Creation: 2006/07/24
''┆ @Author:
''┆ @Contact: fangds@ QQ-3700909     ┆
'''┆ @Copyright: The source code is public, there are no copyright issues, you can ┆
''┆           Use with confidence!!! Respect the author's labor achievements, please ┆
'''┆
'''┆                                       ┆ 
'''╚=======================================╝ 
''' 
'%> 
<!--#include file="" --> 
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
<meta http-equiv="Content-Language" content="gb2312" /> 
<title>Song file lyrics and other information collection_7xi music collection and update system</title>
</head> 
<body> 
<br>7xi music collection and update system<br><br>
<% 
dim getcount,rssong,id,t7xiid,url,filerm,tmpurl,i,tmpfolder,okrm,singer,song,tmp_url,lyric,rs 

'---The number of songs processed at each time
getcount = 5 
set rssong = ("select top " & getcount & " a.*,b.singer_name from d_mp3 a,d_singer b where a.mp3_singer= and a.file_rm is null order by  desc") 

if then '--The song information processing is completed
   
  set rssong = nothing 
  CloseConn() 
"<br>The song file information inspection and collection have been completed!"
"<br><br>It's finished collecting and you can be a garbage station!"
         
else 
  do while not  
    id = rssong("id") 
    t7xiid = rssong("mp3_7xi") 
    singer = replace(rssong("singer_name")," ","%20") 
    song = replace(rssong("mp3_name")," ","%20") 
"<br><br>Song title-"& singer & "-" &song
'---Target Page
    url = v_7xiplay_url&t7xiid&".htm" 
    set httpobj = ("") 
     
    on error resume next 
     "<br>"&url 
    str = (url) 
if Err = 0 then '--The processing when reading the target page is normal
'----Song file name and folder
      str0 = split(str,"<param name='src' value='"&chr(34)&"+s_list+"&chr(34)) 
      str1 = split(str0(1),"'>") 
      filerm = str1(0) 
"<br>File name-"& filerm
      tmpurl = v_7ximp3_url & filerm 
"<br>Target Source -"& tmpurl
'--- When you need to save the music file locally, collect and save the music file
      if is_getrm then 
        str0 = split(filerm,"/") 
        i = 0 
        do while i < Ubound(str0) 
          tmpfolder = mp3_FolderPath & str0(i) 
          if not CheckFolder(tmpfolder) then MakeNewsDir tmpfolder 
          i = i + 1 
        loop 
"<br>Save as -"& tmpfolder & "\" & str0(Ubound(str0))
        okrm = GetRemoteFiles(tmpurl,tmpfolder,replace(str0(Ubound(str0)),".rm","")) 
      else 
"<br><font color=red>Please note - </font>RM file is configured to not save!!!!!!!!!!!!"
      end if 

'---Lyrics Collection
      tmp_url = "http:///?<br>"&tmp_url 
      set httpobj = ("") 
      str0 = (tmp_url) 
       
      on error resume next 
      str1 = split(str0,"<td width=""92%"">"&chr(13)) 
      str2 = split(str1(1),"                </td>") 
      lyric = str2(0) 
      lyric = replace(lyric,"<br>",chr(13)) 
      lyric = replace(lyric," "," ") 
      lyric = replace(replace(lyric,"<p>",""),"</p>","") 
      lyric = IndbStr(trim(lyric)) 
if Instr(lyric,"") then lyric = "No lyrics yet"

      if len(lyric) < 20 or Err <> 0 then 
lyric = "No lyrics yet"
"<br>7xi's own lyrics are incomplete, and lyrics will be collected"
      end if 

if lyric = "No lyrics yet" then
         
        tmp_url = "/m?f=ms&rn=10&tn=baidump3lyric&ct=150994944&word="&singer&"+"&song 
         "<br>"&tmp_url 
        str0 = (tmp_url) 
        str1 = split(str0,"<B><font style=color:#e10900>"&song&"</font></B>") 
        if Ubound(str1) >= 1 then 
          str2 = split(str0,"<div style=""padding-left:10px;line-height:20px;padding-top:1px"">") 
          str3 = split(str2(1),"</div>") 
          lyric = str3(0) 
          lyric = replace(lyric,"<br>",chr(13)) 
          lyric = replace(lyric," "," ") 
          lyric = replace(lyric,"<font style=color:#e10900>","") 
          lyric = replace(lyric,"</font>","") 
        else 
lyric = "No lyrics yet"
        end if 
      end if 

"<br>Lyrics-"&lyric

'---Update the collected information to the database
      if is_getrm then 
("update d_mp3 set file_rm='"&filerm&"',mp3_lyric='"&lyric&"',is_down='1' where update d_mp3 set file_rm='"&filerm&"',mp3_lyric='"&lyric&"',is_down='0' where update d_mp3_t set file_rm='nourl',is_down='1' where <br><br><font color=red><b>Error: </b> Get the target page error, please check: "& url &"</font>"
       
    end if 
     
  loop 
   
  set rssong = nothing 
  CloseConn() 

'---Continue to detect and collect the next batch of song information
"<br>Calling the next batch of song information...<br><br>"
   "<meta http-equiv=refresh content=""0 ; url="">" 
end if 
%> 
</body> 
</html> 


SQL script for database tables:
Database table

Program code
s_sort --Singer Classification Table

if exists (select * from  where id = object_id(N'[dbo].[s_sort]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) 
drop table [dbo].[s_sort] 
GO 

Create TABLE [dbo].[s_sort] ( 
        [ID] [int] IDENTITY (1, 1) NOT NULL , 
        [sort_name] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL  
) ON [PRIMARY] 
GO 

Alter TABLE [dbo].[s_sort] WITH NOCHECK ADD  
        CONSTRAINT [PK_s_sort] PRIMARY KEY  CLUSTERED  
        ( 
                [ID] 
        )  ON [PRIMARY]  
GO 




d_singer ---Singer Information Table

if exists (select * from  where id = object_id(N'[dbo].[d_singer]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) 
drop table [dbo].[d_singer] 
GO 

Create TABLE [dbo].[d_singer] ( 
        [ID] [int] IDENTITY (1, 1) NOT NULL , 
        [singer_name] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL , 
        [singer_first_name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL , 
        [singer_sort] [int] NULL , 
        [mp3_num] [int] NULL , 
        [is_putup] [bit] NULL , 
        [view_count] [int] NULL , 
        [is_down] [bit] NULL  
) ON [PRIMARY] 
GO 

Alter TABLE [dbo].[d_singer] WITH NOCHECK ADD  
        CONSTRAINT [PK_d_singer] PRIMARY KEY  CLUSTERED  
        ( 
                [ID] 
        )  ON [PRIMARY]  
GO 



d_album ---Album Information Table

if exists (select * from  where id = object_id(N'[dbo].[d_album]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) 
drop table [dbo].[d_album] 
GO 

Create TABLE [dbo].[d_album] ( 
        [ID] [int] IDENTITY (1, 1) NOT NULL , 
        [album_singer] [int] NULL , 
        [file_img] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL , 
        [album_name] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL , 
        [album_lang] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL , 
        [album_corp] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL , 
        [album_time] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL , 
        [album_intro] [ntext] COLLATE Chinese_PRC_CI_AS NULL , 
        [is_singer_album] [bit] NULL , 
        [view_count] [int] NULL , 
        [is_putup] [bit] NULL , 
        [add_time] [datetime] NULL , 
        [album_7xi] [int] NULL , 
        [is_down] [bit] NULL  
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] 
GO 

Alter TABLE [dbo].[d_album] WITH NOCHECK ADD  
        CONSTRAINT [PK_d_album] PRIMARY KEY  CLUSTERED  
        ( 
                [ID] 
        )  ON [PRIMARY]  
GO 




d_mp3 ----Song Information Table

if exists (select * from  where id = object_id(N'[dbo].[d_mp3]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) 
drop table [dbo].[d_mp3] 
GO 

Create TABLE [dbo].[d_mp3] ( 
        [ID] [int] IDENTITY (1, 1) NOT NULL , 
        [mp3_name] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL , 
        [mp3_album] [int] NULL , 
        [mp3_singer] [int] NULL , 
        [file_rm] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL , 
        [file_size] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL , 
        [is_putup] [bit] NULL , 
        [mp3_lyric] [varchar] (5000) COLLATE Chinese_PRC_CI_AS NULL , 
        [view_count] [int] NULL , 
        [down_count] [int] NULL , 
        [is_my] [bit] NULL , 
        [mp3_7xi] [int] NULL , 
        [is_down] [varchar] (2) COLLATE Chinese_PRC_CI_AS NULL  
) ON [PRIMARY] 
GO 

Alter TABLE [dbo].[d_mp3] WITH NOCHECK ADD  
        CONSTRAINT [PK_d_mp3] PRIMARY KEY  CLUSTERED  
        ( 
                [ID] 
        )  ON [PRIMARY]  
GO