<% ' Copyright (C) 2002 by Netphoria, Inc. ' Option Explicit ' Siamak, change the below line to the number of books to show on the home page BT 05-06-03 NumItemsPerPage = 10 if session("site") = "" then session("site") = "amp" end if if request("s") = "amp" then session("site") = "amp" elseif request("s") = "rabex" then session("site") = "rabex" end if 'if request.querystring = "" and request.form = "" then if request("id") = "" and request.form = "" then if session("site") = "rabex" then %> <% else %> <% end if %> <% else if session("site") = "rabex" then %> <% else %> <% end if %> <% end if Dim cSQL Dim objConn Dim objRS Dim strCnn Dim search_executed function getDBQ(fname) dim path, mdbfile path = left(server.mappath("\"), len(server.mappath("\")) - len("public")) mdbfile = "databases/" & fname & "-Access2000.mdb" 'getDBQ = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & path & mdbfile & ";" getDBQ = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & path & mdbfile & ";" end function strCnn = getDBQ("AMP") Set objConn = Server.CreateObject("ADODB.Connection") objConn.Open strCnn Dim category_id, category_name, catstring if request.QueryString("id") <> "" And IsNumeric(request.QueryString("id")) then category_id = CLng(request.QueryString("id")) else category_id = "" end if if request.QueryString("cat") <> "" then category_name = request.QueryString("cat") catstring = "&cat=" & Replace(category_name, " ", "+") category_name = Replace(category_name, "+", " ") else category_name = "home" catstring = "" end if if request.querystring("clearcart") <> "" then Set session("cart") = Server.CreateObject("Scripting.Dictionary") end if if session("site") = "rabex" and category_id = "" then category_id =181 category_name="Radiobiology" catstring = "&cat=" & Replace(category_name, " ", "+") end if %> <% if category_name = "home" then %>
" border=0>Click to order Rabex 2005 Click here to go to RABEX.net

<% end if %>
<% if session("site") <> "rabex" then %> <% end if ' session("site") <> "rabex" objRS.close set objRS = Nothing objConn.close set objConn = Nothing %>
<% if session("site") <> "rabex" then %> <% end if %> <% 'if session("site") = "rabex" then ' cSQL = "SELECT * FROM categories where id=181 or parent_id=181 ORDER BY categories.main_order, categories.sub_order" 'else cSQL = "SELECT * FROM categories WHERE [Flash]=False ORDER BY categories.main_order, categories.sub_order" 'end if Set objRS = Server.CreateObject("ADODB.Recordset") objRS.Open cSQL, objConn, 3, 1, 1 ' Open Source, ActiveConnection, adOpenStatic, adLockReadOnly, adCmdText dim rabexCategory rabexCategory = 0 do until objRS.EOF ' BT write code here to only display the top Radiobiology Category on advmedpub.com, but all the categories on rabex.net if session("site") = "amp" and objRS("ID") = 80 then 'Radiation Oncology (Physics) exit do end if if objRS("id") = 181 then ' Radiobiology rabexCategory = 1 end if if objRS("parent_id") = -1 and rabexCategory > 1 then rabexCategory = 0 end if if session("site") = "amp" and rabexCategory > 1 then ' do nothing else if rabexCategory > 0 then rabexCategory = rabexCategory + 1 end if if session("site") = "rabex" and rabexCategory = 0 then 'do nothing else if objRS("name") <> "home" then if objRS("parent_id") = -1 then response.write "" end if if objRS("parent_id") <> -1 then if objRS("clickable") then if (objRS("color") <> "") And (Not IsNull(objRS("color"))) then %>    &cat=<%=server.urlencode(objRS("name"))%>&s=<%= session("site")%>"> color=<%=objRS("color")%>><%=Replace(objRS("name"), " ", " ")%>
<% else %>    &cat=<%=server.urlencode(objRS("name"))%>&s=<%= session("site")%>">><%=Replace(objRS("name"), " ", " ")%>
<% end if else if (objRS("color") <> "") And (Not IsNull(objRS("color"))) then %> color=<%=objRS("color")%>>   <%=Replace(objRS("name"), " ", " ")%>
<% else %> >   <%=Replace(objRS("name"), " ", " ")%>
<% end if end if else if objRS("clickable") then if (objRS("color") <> "") And (Not IsNull(objRS("color"))) then %> &cat=<%=server.urlencode(objRS("name"))%>&s=<%= session("site")%>"> color=<%=objRS("color")%>><%=Replace(objRS("name"), " ", " ")%>
<% else %> &cat=<%=server.urlencode(objRS("name"))%>&s=<%= session("site")%>">><%=Replace(objRS("name"), " ", " ")%>
<% end if else if (objRS("color") <> "") And (Not IsNull(objRS("color"))) then %> color=<%=objRS("color")%>><%=Replace(objRS("name"), " ", " ")%>
<% else %> ><%=Replace(objRS("name"), " ", " ")%>
<% end if end if end if end if end if end if objRS.MoveNext loop %>

">
For new releases and newsletters or to update your profile:



<% search_executed = false if category_id <> "" then ' if we have a category id 'cSQL = "SELECT id, title, title_color, subtitle, editors, authors, ad_graphic, graphic, price FROM books, book_categories WHERE (books.id = book_categories.book_id) And (book_categories.category_id = " & category_id & ") ORDER BY books.title" cSQL = "SELECT * FROM books, book_categories WHERE (books.id = book_categories.book_id) And (book_categories.category_id = " & clng(category_id) & ") ORDER BY books.title" elseif request("search") <> "" then ' if the user used the search box Dim stext stext = request("search") stext = replace(stext, "'", "''") 'cSQL = "SELECT id, title, title_color, subtitle, editors, authors, ad_graphic, graphic, price FROM books WHERE title LIKE '%" & stext & "%' OR subtitle LIKE '%" & stext & "%' OR authors LIKE '%" & stext & "%' OR editors LIKE '%" & stext & "%' OR short_description LIKE '%" & stext & "%' OR long_description LIKE '%" & stext & "%' OR keywords LIKE '%" & stext & "%' OR isbn LIKE '%" & stext & "%' ORDER BY books.title" cSQL = "SELECT * FROM books WHERE title LIKE '%" & stext & "%' OR subtitle LIKE '%" & stext & "%' OR authors LIKE '%" & stext & "%' OR editors LIKE '%" & stext & "%' OR short_description LIKE '%" & stext & "%' OR long_description LIKE '%" & stext & "%' OR keywords LIKE '%" & stext & "%' OR isbn LIKE '%" & stext & "%' ORDER BY books.title" search_executed = true category_name = "" else 'cSQL = "SELECT id, title, title_color, subtitle, editors, authors, ad_graphic, graphic, price FROM books, book_categories WHERE (books.id = book_categories.book_id) And (book_categories.category_id = (SELECT id FROM categories WHERE name = 'home')) ORDER BY books.title" cSQL = "SELECT * FROM books, book_categories WHERE (books.id = book_categories.book_id) And (book_categories.category_id = (SELECT id FROM categories WHERE name = 'home')) ORDER BY books.title" end if Set catRS = Server.CreateObject("ADODB.Recordset") ' Use client cursor to enable AbsolutePosition property. catRS.CursorLocation = 3 ' adUseClient catRS.Open cSQL, objConn, , , 1 catRS.PageSize = NumItemsPerPage Dim intPageCount intPageCount = catRS.PageCount ' Determine if the user requested a particular page Dim cur_page Dim valid_page cur_page = request.QueryString("page") intPageCount = catRS.PageCount ' Go to the page the user requested, if it is valid if IsNumeric(cur_page) And cur_page <> "" then cur_page = CInt(cur_page) if cur_page <= intPageCount then catRS.AbsolutePage = cur_page valid_page = True else catRS.AbsolutePage = 1 valid_page = False end if else valid_page = False end if if session("site") = "rabex" then %> ">Click to order Rabex

<% end if %> <% if search_executed then ' Print out the search text %> <% elseif category_name = "home" then %> <% else ' Print out the category name %> <% end if %> <% ' Print out the books for this page and category if (Not (catRS.BOF and catRS.EOF)) And intPageCount > 0 then For intRecord = 1 To catRS.PageSize ' determine rowspan Dim rspan if catRS("editors") = "" and catRS("authors") = "" then rspan = 5 else rspan = 6 end if %> " method=post> <% if category_name <> "" then %> <% catRS.MoveNext If catRS.EOF Then Exit For End If Next catRS.Close Set catRS = Nothing %> <% else '%> <% if search_executed then %> <% else %> <% end if %> <% end if %>
 Search results for "<%=stext%>"
 Best Sellers
 <%=category_name%>
align=center valign=center> <% if catRS("ad_graphic") <> "" then %> ">
<% end if 'BT 05-06-03 added thumbnails if catRS("graphic") <> "" then CreateThumbnail catRS("graphic"), "/bookpictures", "thumbs", "", 50, 50 Response.Write(vbcrlf & "" & vbcrlf) %> &cat=<%=server.urlencode(category_name)%>&s=<%= session("site")%>">" border=0 hspace=15 vspace=5 ONERROR='javascript:this.src="/gif/transpace.gif";'>
<% end if %>
"><%=catRS("title")%>
"><%=catRS("subtitle")%>
<% if catRS("authors") <> "" then response.write catRS("authors") end if if catRS("editors") <> "" then response.write "
Edited by: " & catRS("editors") end if %>    (<% if (not isnull(catRS("retail_price")) and catRS("retail_price")) > 0 then response.write "" & formatcurrency(catRS("retail_price")) & " now " %><%=FormatCurrency(catRS("price"), 2)%>)
&cat=<%=server.urlencode(category_name)%>&s=<%= session("site")%>">Click here to find out more!<% else %>
&cat=<%=Server.urlencode("Search results for " & Chr(34) & request("search") & Chr(34))%>&s=<%= session("site")%>">Click here to find out more!<% end if %>

<% If catRS("pdf_file_name") <> "" Then %> This book is sold as a download This book is sold as a download.

<% End If %> Qty:       "> <% if catRS("shipping_included") then response.write " (Shipping Included)" %><% if catRS("special_shipping") then response.write " (Special Shipping)" %>"> "> "> "> ">
<% ' if we got a valid page number from the query string if valid_page And cur_page > 1 then ' display up to 5 pages on each side of the current page %>&id=<%=category_id%>&s=<%= session("site")%>">Previous <% if cur_page > 5 then i = 5 do until i = 0 %>&id=<%=category_id%>&s=<%= session("site")%>"><%=cur_page - i%> <% i = i - 1 loop else for i = 1 to cur_page - 1 %>&id=<%=category_id%>&s=<%= session("site")%>"><%=i%> <% next end if ' display the valid page highlighted %>&id=<%=category_id%>&s=<%= session("site")%>"><%=cur_page%> <% ' display up to five pages after the current page if intPageCount > cur_page then i = cur_page + 1 do until (i > (cur_page + 5)) Or i > intPageCount %>&id=<%=category_id%>&s=<%= session("site")%>"><%=i%> <% i = i + 1 loop end if if cur_page < intPageCount then %>&id=<%=category_id%>&s=<%= session("site")%>">Next<% end if else ' just print out the first 10 pages, if there are that many Dim pgcnt pgcnt = intPageCount if pgcnt > 10 then pgcnt = 10 end if if pgcnt > 1 then for i = 1 to pgcnt if i = 1 then %> &id=<%=category_id%>&s=<%= session("site")%>"><%=i%> <% else %> &id=<%=category_id%>&s=<%= session("site")%>"><%=i%> <% end if next %> &id=<%=category_id%>&s=<%= session("site")%>">Next<% end if ' if page count = 1, then simply display current page end if %>
Sorry, no books currently match your search. However, we are frequently updating our selection, so please try this search again in the future.Sorry, there are currently no books in this category.
We are frequently updating our selection, so please search this category again in the future.
<% if session("site") <> "rabex" then %> <% end if %> <% 'if session("site") = "rabex" then ' cSQL = "SELECT * FROM categories where id=181 or parent_id=181 ORDER BY categories.main_order, categories.sub_order" 'else cSQL = "SELECT * FROM categories WHERE [Flash]=False ORDER BY categories.main_order, categories.sub_order" 'end if 'Set objRS = Server.CreateObject("ADODB.Recordset") 'objRS.Open cSQL, objConn, 3, 1, 1 ' Open Source, ActiveConnection, adOpenStatic, adLockReadOnly, adCmdText objRS.movefirst 'dim rabexCategory rabexCategory = 0 dim clinicalflag clinicalflag = false do until objRS.EOF ' BT write code here to only display the top Radiobiology Category on advmedpub.com, but all the categories on rabex.net ' BT 9-24-07 wrote code to dispaly clinical on the righthand side and physical on the left if session("site") = "amp" and not clinicalflag and objRS("id") = 80 then clinicalflag = true end if if objRS("id") = 181 then ' Radiobiology rabexCategory = 1 end if if objRS("parent_id") = -1 and rabexCategory > 1 then rabexCategory = 0 end if if session("site") = "amp" and rabexCategory > 1 then ' do nothing elseif clinicalflag then if rabexCategory > 0 then rabexCategory = rabexCategory + 1 end if if session("site") = "rabex" and rabexCategory = 0 then 'do nothing else if objRS("name") <> "home" then if objRS("parent_id") = -1 then response.write "" end if if objRS("parent_id") <> -1 then if objRS("clickable") then if (objRS("color") <> "") And (Not IsNull(objRS("color"))) then %>    &cat=<%=server.urlencode(objRS("name"))%>&s=<%= session("site")%>"> color=<%=objRS("color")%>><%=Replace(objRS("name"), " ", " ")%>
<% else %>    &cat=<%=server.urlencode(objRS("name"))%>&s=<%= session("site")%>">><%=Replace(objRS("name"), " ", " ")%>
<% end if else if (objRS("color") <> "") And (Not IsNull(objRS("color"))) then %> color=<%=objRS("color")%>>   <%=Replace(objRS("name"), " ", " ")%>
<% else %> >   <%=Replace(objRS("name"), " ", " ")%>
<% end if end if else if objRS("clickable") then if (objRS("color") <> "") And (Not IsNull(objRS("color"))) then %> &cat=<%=server.urlencode(objRS("name"))%>&s=<%= session("site")%>"> color=<%=objRS("color")%>><%=Replace(objRS("name"), " ", " ")%>
<% else %> &cat=<%=server.urlencode(objRS("name"))%>&s=<%= session("site")%>">><%=Replace(objRS("name"), " ", " ")%>
<% end if else if (objRS("color") <> "") And (Not IsNull(objRS("color"))) then %> color=<%=objRS("color")%>><%=Replace(objRS("name"), " ", " ")%>
<% else %> ><%=Replace(objRS("name"), " ", " ")%>
<% end if end if end if end if end if end if objRS.MoveNext loop %>


<% 'if request.querystring = "" and request.form = "" and not session("site") = "rabex" then %> <% if not session("site") = "rabex" then %> Education Tools for Residents
This section contains physics and radiobiology practice examinations which are
useful for residents in radiation oncology and diagnostic radiology.

Frontlist Titles
Our recent and popular titles for professionals in radiation oncology, medical physics,
and diagnostic radiology.
<% end if %>
How to Order
For information, order form, or on-line ordering.