'; if($google == 'noads'){ $google_link = "google=noads&"; } else { PRINT ' '; } PRINT "
Saint Petersburg Astronomy Club Web Portal
"; if($library == '1q2w3e4r') { if($action == 'change') { $new_title = quote($new_title); $new_author = quote($new_author); $new_category = quote($new_category); $new_notes = quote($new_notes); $new_review = quote($new_review); $new_url = quote($new_url); $query_string = "UPDATE library SET title = '$new_title', author = '$new_author', category = '$new_category', format = '$new_format', collection = '$new_collection', notes = '$new_notes', review = '$new_review', image = '$new_image', url = '$new_url', isbn = '$new_isbn' WHERE library_id = '$library_id' "; $result = mysql_query($query_string); echo $query_string."

"; } if($action == 'Add') { $new_title = quote($new_title); $new_author = quote($new_author); $new_category = quote($new_category); $new_notes = quote($new_notes); $new_review = quote($new_review); $query_string = "INSERT into library ( title, author, category, format, notes, collection, image, url, review, isbn ) values ( '$new_title', '$new_author', '$new_category', '$new_format', '$new_notes', '$new_collection', '$new_image', '$new_url', '$new_review', '$new_isbn' ) "; $result = mysql_query($query_string); echo $query_string."

"; } } $query_string = "SELECT category FROM library WHERE collection = '$collection' ORDER BY category"; $result = mysql_query($query_string); while($row = mysql_fetch_object($result)) { $category_list[$row->category]++; } PRINT "Categories
"; foreach($category_list as $cate => $count){ $cate_space = str_replace(' ', '+', $cate); if($library == '1q2w3e4r') { if(empty($cate)) { PRINT "Not Categorized (".$count.")
"; } else { PRINT "".$cate." (".$count.")
"; } } else { if(empty($cate)) { PRINT "Not Categorized (".$count.")
"; } else { PRINT "".$cate." (".$count.")
"; } } } /* too many authors $query_string = "SELECT author FROM library ORDER BY author"; $result = mysql_query($query_string); while($row = mysql_fetch_object($result)) { $author_list[$row->author]++; } PRINT "

Authors
"; foreach($author_list as $auth => $count){ if(empty($auth)) { PRINT "Unknown (".$count.")
"; } else { PRINT "".$auth." (".$count.")
"; } } */ PRINT "

Keyword or Author

For those who would rather own a copy instead of borrowing the images and links will take you to booksellers.

Barnes and Noble has a large selection of mostly new books. Check out their sale annex where you can get new or in new condition books for less than $10.

For a wide selection of used and hard to find books try Alibris. They are mostly a network of independent bookshops. Often they don't have the ISBN of books so you have to do a keyword or title search and then pick through a list of unrelated books to find the one you want.

Willman Bell publishes alot of independent astronomy books as well.

"; PRINT"

"; if($library == '1q2w3e4r') { if($new == 'yes'){ PRINT "
Title

Author

Category

Format

ISBN

URL

Image

Collection

Notes

Review

"; } } if(empty($search) AND empty($category)){ PRINT "
SPAC Library (Ralph Craig - Librarian)

Below is a mostly complete list of books and videos in the SPAC library. Books may be checked out during regular club meetings (4th Friday of the month) or board meetings (2nd Wednesday of the month).

NOTE: You must be a SPAC member to check out library books

Added February 2007: Videos of SPAC Lectures. We now have several videos on DVD of past lectures by Matt Terry, Mike Davis, John Dobson and others.

Also this month three historical books were added. Two on big telescopes as well as one on the transits of Venus.

If you wish to donate any books please talk to Ralph during a club meeting or any Saturday afternoon at the mirror lab behind the Science Center.

"; if($library != '1q2w3e4r') $category = "General_Astronomy"; } PRINT ""; $crlf = chr(13).chr(10); if(empty($sort)) $sort = "title"; if(!empty($category)) { $condition1 = "category = '$category' AND "; PRINT ""; } if(!empty($author)) $condition2 = "author = '$author' AND "; if(!empty($search)) { $condition3 = "(title like '%$search%' OR author like '%$search%' OR format like '%$search%') AND "; PRINT ""; } PRINT ""; if(!empty($library)) $liburl = "&library=".$library; $category_space = str_replace(' ', '+', $category); PRINT " "; $query_string = "SELECT * FROM library WHERE $condition1 $condition2 $condition3 collection = '$collection' ORDER BY $sort"; $result = mysql_query($query_string); while($row = mysql_fetch_object($result)) { if(empty($on_library_id)){ PRINT " "; if(!empty($row->review)){ $review = str_replace($crlf, '
', $row->review); PRINT ""; } } // not editing if ($on_library_id == $row->library_id){ PRINT " "; } } PRINT "
Category: ".$category."
Search Term: ".$search."
Sort: ".$sort."
Title (Author) Category Format
"; if(!empty($row->image)) PRINT "
"; if(!empty($row->url)){ echo $row->url; } else { // http://click.linksynergy.com/fs-bin/click?id=LV7k*ehi*/0&offerid=39828.122856000&type=2&subid=0&tmpid=939&RD_PARM1= // http://click.linksynergy.com/fs-bin/click?id=LV7k*ehi*/0&offerid=39828.122856000&type=2&subid=0&tmpid=939&RD_PARM1= if(!empty($row->isbn)){ PRINT "isbn."> ".$row->title.""; } else { $title_space = str_replace(' ', '+', $row->title); PRINT " ".$row->title.""; } } PRINT "
".$row->author."
".$row->notes."
".$row->category." ".$row->format; if($library == '1q2w3e4r') PRINT " library_id."&category=".$category_space.">Edit"; PRINT "
".$review."
Title

Author

Category

Format

Collection

ISBN

URL
Image
Notes
Review
"; PRINT"
 

 

Copyright © ".date("Y")." SPAC Inc.
"; function quote($value){ if(!is_numeric($value)) { $value = mysql_real_escape_string($value); } return $value; } ?>