您所在的頁面: 網站首頁-> <%=title%> |
|
|
%CONST lan="C"%> <% function getCId(Id) dim CId:CId=Id dim rs:set rs=conn.execute("select NS_Id,(select count(NS_Id) from NewsSort_"&lan&" where NS_ParentId=A.NS_Id) as NS_Count from NewsSort_"&lan&" A where NS_ParentId="&Id) while not rs.eof if rs("NS_Count")=0 then CId=CId&","&rs("NS_Id") else CId=CId&","&getCId(rs("NS_Id")) end if rs.movenext wend rs.close:set rs=nothing getCId=CId end function %> <%DIM F_Name,N_Pic function getTitle(Id) dim title,rs set rs=conn.execute("select NS_Name,NS_ParentId from NewsSort_"&lan&" where NS_Id="&Id) title=rs("NS_Name")'""&rs("NS_Name")&"" if rs("NS_ParentId")>0 then title=title end if rs.close:set rs=nothing getTitle=title end function function getdid(Id) dim d_id,rs set rs=conn.execute("select NS_Id,NS_Name,NS_ParentId from NewsSort_"&lan&" where NS_Name like '%"&id&"%' ") d_id=rs("NS_Id")'""&rs("NS_Name")&"" rs.close:set rs=nothing getdid=d_id end function function getdTitle(Id) dim title,rs set rs=conn.execute("select NS_Name,NS_ParentId from NewsSort_"&lan&" where NS_Id="&Id) title=rs("NS_Name")'""&rs("NS_Name")&"" if rs("NS_ParentId")>0 then title=getTitle(rs("NS_ParentId")) end if rs.close:set rs=nothing getdTitle=title end function id=str2num(request.QueryString("id"),0) set rs=conn.execute("select * from News where N_Language='"&lan&"' and N_Id="&id) if not rs.eof then Sid=rs("N_SortId") title=get_tablename(Sid,"NewsSort_"&lan,"NS_Name","NS_id","") N_Content=rs("N_Content") N_Name=rs("N_Name") N_Pic=rs("N_Pic") N_Date=rs("N_Date") N_Click=rs("N_Click")+1 conn.execute("update News set N_Click=N_Click+1 where N_Id="&id) else title="參數錯誤" check_alert_clear title,"news.asp" end if rs.close d_title=getdTitle(Sid) d_id=getdid(d_title) %>
您所在的頁面: 網站首頁-> <%=title%> |
|
|