<%
sub1=killchars(Request("sub"))
set rsZmani=Server.CreateObject("adodb.recordset")
'if sub1=0 then Response.Write("מסודרים לפי א"ב של שם הספר")
'if sub1=998 then Response.Write("הספרים האחרונים שהוספו לאתר")
'if sub1=999 then Response.Write("מסודרים לפי א"ב של שם המחבר")
%>
.gif" width=600 >
<%
'Response.Write("sub1="&sub1)
set rs=Server.CreateObject("adodb.recordset")
if sub1=0 then rs.Open "select * from book order by name",con,3,3
if sub1=998 then rs.Open "select * from book_auther_name order by [date] desc",con,3,3
if sub1=999 then rs.Open "select * from book_auther_name order by auther,auther1,auther2,name",con,3,3
if sub1>0 and sub1<998 then
rsZmani.Open "select * from book_name_sub where sub_id="&killchars(Request("sub")),con,3,3
zmani="(0"
if not rsZmani.EOF then
rsZmani.MoveFirst
do until rsZmani.EOF
zmani=zmani&","&rsZmani.Fields("book_id")
rsZmani.MoveNext
loop
end if
zmani=zmani+")"
rs.Open "select * from book where id in "&zmani&" order by name",con,3,3
rsZmani.Close
end if
if sub1>0 and sub1<998 then
rsZmani.Open "select name from book_sub where id="&killchars(Request("sub")),con,3,3
rsZmani.MoveFirst
Response.Write(" "&rsZmani.Fields("name")&" ")
rsZmani.Close
end if
rs.MoveFirst
Response.Write("")
if sub1<998 then
do until rs.EOF
Response.Write("")
Response.Write("- "&chr(13))
Response.Write(rs.Fields("name"))
if rs.Fields("auther_id")>1 or rs.Fields("mahadir_id")>1 or rs.Fields("itsuv_id")>1 then Response.Write(" / ")
if rs.Fields("auther_id")>1 then
rsZmani.Open "select name from book_auther where id="&rs.Fields("auther_id"),con,3,3
rsZmani.MoveFirst
Response.Write(rsZmani.Fields("name"))
rsZmani.Close
end if
if rs.Fields("auther_id1")>1 then
rsZmani.Open "select name from book_auther where id="&rs.Fields("auther_id1"),con,3,3
rsZmani.MoveFirst
Response.Write(", "&rsZmani.Fields("name"))
rsZmani.Close
end if
if rs.Fields("auther_id2")>1 then
rsZmani.Open "select name from book_auther where id="&rs.Fields("auther_id2"),con,3,3
rsZmani.MoveFirst
Response.Write(", "&rsZmani.Fields("name"))
rsZmani.Close
end if
if rs.Fields("auther_id")>1 and rs.Fields("mahadir_id")>1 then Response.Write(", ")
if rs.Fields("mahadir_id")>1 then
rsZmani.Open "select name from book_auther where id="&rs.Fields("mahadir_id"),con,3,3
rsZmani.MoveFirst
Response.Write("ההדיר: "&rsZmani.Fields("name"))
rsZmani.Close
end if
if rs.Fields("itsuv_id")>1 then
rsZmani.Open "select name from book_auther where id="&rs.Fields("itsuv_id"),con,3,3
rsZmani.MoveFirst
if rs.Fields("auther_id")>1 or rs.Fields("mahadir_id")>1 then Response.Write(", ")
Response.Write("עיצוב: "&rsZmani.Fields("name"))
rsZmani.Close
end if
Response.Write("
"&chr(13))
if rs.Fields("more_information")>"" then
'Response.Write(" ")
Response.Write("(")
Response.Write(rs.Fields("more_information"))
Response.Write(")")
end if
Response.Write("")
rs.MoveNext
loop
else
i=1
do until rs.EOF
Response.Write("")
Response.Write("- "&chr(13))
if rs.Fields("auther") >"" then
Response.Write(rs.Fields("auther"))
else
Response.Write("(ללא מחבר)")
end if
Response.Write(" / ")
Response.Write(rs.Fields("name"))
if rs.Fields("mahadir_id")>1 then
rsZmani.Open "select name from book_auther where id="&rs.Fields("mahadir_id"),con,3,3
rsZmani.MoveFirst
Response.Write(", ")
Response.Write("ההדיר: "&rsZmani.Fields("name"))
rsZmani.Close
end if
if rs.Fields("itsuv_id")>1 then
Response.Write(", ")
rsZmani.Open "select name from book_auther where id="&rs.Fields("itsuv_id"),con,3,3
rsZmani.MoveFirst
if rs.Fields("mahadir_id")>1 then Response.Write(", ")
Response.Write(", ")
Response.Write("עיצוב: "&rsZmani.Fields("name"))
rsZmani.Close
end if
Response.Write("
"&chr(13))
if rs.Fields("more_information") >" " then
'Response.Write(" ")
Response.Write("(")
Response.Write(rs.Fields("more_information"))
Response.Write(")")
end if
Response.Write("")
rs.MoveNext
i=i+1
if sub1=998 and i=20 then exit do
loop
end if
Response.Write(" ")
set rsZmani=nothing
rs.Close
set rs=nothing
con.close
set con=nothing
%>
|