|
| |
Don't Miss
More at Powell's
include ("/usr/local/apache/share/htdocs/newsections/connect.php"); ## PERFORMS DB CONNECTION ##
#GET CURRENT DOMAIN NAME
include ("/usr/local/apache/share/htdocs/newsections/includes/check_domain.php");
$samsaysyes = 0;
if ($comsec){
$samsaysyes = 1;
$ss = addslashes($comsec);
$curdatabase = mysql_select_db("current", $GLOBALS['dbcharlie']);
$pdq = mysql_query("select section from stock where sectionkey='$ss' limit 1",$GLOBALS['dbcharlie']);
list($mysec) = mysql_fetch_array($pdq);
$mysec = preg_replace("/-.+$/","",$mysec);
if ($mysec){
include "/usr/local/apache/share/htdocs/margin/scallop_top.html";
} else {
include "/usr/local/apache/share/htdocs/margin/margin_features.html";
include "/usr/local/apache/share/htdocs/margin/margin_certified.html";
include "http://www.".$GLOBALS['domain']."/cgi-bin/margin/margin_othervoices";
include "/usr/local/apache/share/htdocs/margin/margin_gifts.html";
include "/usr/local/apache/share/htdocs/margin/margin_offline.html";
include "/usr/local/apache/share/htdocs/margin/margin_info.html";
return;
}#if mysec
} elseif ($poosec){
$samsaysyes = 1;
$ss = addslashes($poosec).".html";
$curdatabase = mysql_select_db("Sections", $GLOBALS['dbdelta']);
$pkr = mysql_query("select majorsec from category where html='$ss'",$GLOBALS['dbdelta']);
list($mysec) = mysql_fetch_array($pkr);
if ($mysec){
include "/usr/local/apache/share/htdocs/margin/scallop_top.html";
} else {
include "/usr/local/apache/share/htdocs/margin/margin_features.html";
include "/usr/local/apache/share/htdocs/margin/margin_certified.html";
include "http://www.".$GLOBALS['domain']."/cgi-bin/margin/margin_othervoices";
include "/usr/local/apache/share/htdocs/margin/margin_gifts.html";
include "/usr/local/apache/share/htdocs/margin/margin_offline.html";
include "/usr/local/apache/share/htdocs/margin/margin_info.html";
return;
}#if mysec
}//if comsec
if (!$mysec){
$mysec = $section;
}//if
if (!$mysec){
$mysec = $_GET['section'];
}//if
if (eregi("front window", $mysec)){
include("/usr/local/apache/share/htdocs/margin/margin_frontwindow.html");
return;
}#if
$mysec = preg_replace("/Childrens/","Children's",$mysec);
if ($mysec == "Children's"){
$mysec = 'Kids Books';
}#if
$history = 0;
if ($mysec == 'History'){
$mysec = 'US History';
$history = 1;
}#if
if (ereg("^Literature",$mysec) && ($stan_lee != 'bad ass')){
?>
}#if ?>
if (($mysec == "Kids Books") && 0){ ?>
} else { ?>
if ($mysec == "Gemstar eBook Editions"){ ?>
} elseif ($mysec == "Adobe Reader"){ ?>
} elseif ($mysec == "Microsoft Reader"){ ?>
} else { ?>
.html">=$mysec?>
}# peanut butter AND chocolate ?>
}#if ?>
if ($mysec == "Kids Books"){
$ss = addslashes("Children's");
$curdatabase = mysql_select_db("Sections",$GLOBALS['dbdelta']);
$sec_query = mysql_query("select minorsec from category where majorsec='$ss'",$GLOBALS['dbdelta']);
while (list($array[]) = mysql_fetch_array($sec_query)){
}//while
$array[] = "Activities";
$array[] = "Animals";
$array[] = "Art";
$array[] = "Collectible";
$array[] = "Fairy Tales";
$array[] = "Folk Tales";
$array[] = "Foreign Language";
$array[] = "Golden Books";
$array[] = "Holiday";
$array[] = "Hot Titles";
$array[] = "Middle Readers";
$array[] = "Music";
$array[] = "Nonfiction";
$array[] = "Pacific Northwest";
$array[] = "Picture Books";
$array[] = "Religion";
$array[] = "Young Adult";
# $array[] = "Young Readers Choice Awards";
# $array[] = "Newbery Award Winners";
# $array[] = "Caldecott Award Winners";
$num_audio = 0;
sort($array);
reset($array);
while (list($b,$sublist) = each($array)){
if ($sublist == 'Sale Books'){
$cs = preg_replace("/[^A-Za-z0-9+#]/","",$sublist);
} elseif ($sublist == 'Used Books'){
$cs = preg_replace("/[^A-Za-z0-9+#]/","",$sublist);
} elseif ($sublist == 'Hot Titles'){
$cs = preg_replace("/[^A-Za-z0-9+#]/","",$sublist);
} elseif ($sublist == 'Golden Books'){
$cs = preg_replace("/[^A-Za-z0-9+#]/","",$sublist);
} elseif ($sublist == 'Dr Seuss'){
continue;
} else {
$cs = "Childrens".preg_replace("/[^A-Za-z0-9+#]/","",$sublist);
}#if
if ($sublist == 'Audio Books'){
if (!$num_audio){
$num_audio = 1;
} else {
continue;
}#if
}#if
if (!$sublist){
continue;
}
?>
|
|
if ($cs == 'SaleBooks'){ ?>
Sale Books
} elseif ($cs == 'GoldenBooks'){ ?>
Golden Books
} elseif ($cs == 'HotTitles'){ ?>
Hot Titles
} elseif ($cs == 'UsedBooks'){ ?>
Used Books
} elseif ($sublist == 'Caldecott Award Winners'){ ?>
=$sublist?>
} elseif ($sublist == 'Coretta Scott King Award Winners'){ ?>
=$sublist?>
} elseif ($sublist == 'Newbery Award Winners'){ ?>
=$sublist?>
} elseif ($sublist == 'Young Readers Choice Awards'){ ?>
=$sublist?>
} else { ?>
/.html">
}#if ?>
|
}#while
?>
} elseif (
eregi("^African American Studies",$mysec) ||
eregi("^At the Movies",$mysec) ||
eregi("^Black History Month",$mysec) ||
eregi("^Gemstar",$mysec) ||
eregi("^Judaica",$mysec) ||
($history == 1) ||
eregi("^Hosted Bookshelves",$mysec) ||
eregi("^Literature",$mysec) ||
eregi("^Mystery",$mysec) ||
eregi("^Science Fiction and Fantasy",$mysec) ||
eregi("^Staff Picks",$mysec) ||
eregi("^Travel",$mysec)
){
if ($history == 1){
$mysec = 'US History';
}#if
$array = "";
$comsec = preg_replace("/[^A-Za-z0-9+#]/","",$mysec);
$ss = addslashes($mysec);
$curdatabase = mysql_select_db("Sections",$GLOBALS['dbdelta']);
$qpoop = mysql_query("select distinct(minorsec) from category where majorsec='$ss' order by minorsec",$GLOBALS['dbdelta']);
while (list($sublist) = mysql_fetch_array($qpoop)){
if ($sublist == ' Prize Winners'){
continue;
}
if ($sublist == 'Used Books'){
$array[$sublist]['url'] = "http://www.".$GLOBALS['domain']."/usedbooks/".$comsec.".1.html";
$array[$sublist]['display'] = $sublist;
} elseif ($sublist == ' Used Books'){
$array[$sublist]['url'] = "http://www.".$GLOBALS['domain']."/usedbooks/".$comsec.".1.html";
$array[$sublist]['display'] = $sublist;
} elseif ($sublist == 'Sale Books'){
$array[$sublist]['url'] = "http://www.".$GLOBALS['domain']."/salebooks/".$comsec.".1.html";
$array[$sublist]['display'] = $sublist;
} elseif ($sublist == ' Sale Books'){
$array[$sublist]['url'] = "http://www.".$GLOBALS['domain']."/salebooks/".$comsec.".1.html";
$array[$sublist]['display'] = $sublist;
} else {
$key = preg_replace("/^( ?)The /", "\\1", $sublist);
$array[$key]['url'] = "http://www.".$GLOBALS['domain']."/subsection/".$comsec.preg_replace("/[^A-Za-z0-9+#]/","",$sublist).".html";
$array[$key]['display'] = $sublist;
}#if
}#while
if (ereg("^Literature",$mysec)){
$array[' Booker Prize']['url'] = "http://www.".$GLOBALS['domain']."/prizes/booker.html";
$array[' Booker Prize']['display'] = ' Booker Prize';
$array[' National Book Award']['url'] = "http://www.".$GLOBALS['domain']."/prizes/national.html";
$array[' National Book Award']['display'] = ' National Book Award';
$array[' National Book Critics Circle Award']['url'] = "http://www.".$GLOBALS['domain']."/prizes/nbcca_fiction.html";
$array[' National Book Critics Circle Award']['display'] = ' National Book Critics Circle Award';
$array[' Nobel Prize']['url'] = "http://www.".$GLOBALS['domain']."/prizes/nobel.html";
$array[' Nobel Prize']['display'] = ' Nobel Prize';
$array[' PEN/Faulkner']['url'] = "http://www.".$GLOBALS['domain']."/prizes/penfaulkner_fiction.html";
$array[' PEN/Faulkner']['display'] = ' PEN/Faulkner';
$array[' Pulitzer Prize']['url'] = "http://www.".$GLOBALS['domain']."/prizes/pulitzer_fiction.html";
$array[' Pulitzer Prize']['display'] = ' Pulitzer Prize';
# $array[' Sale Books'] = "http://www.".$GLOBALS['domain']."/salebooks/Literature.1.html";
} elseif (ereg("^Staff Picks",$mysec)){
$array['2 2002 Favorites']['url'] = "http://www.".$GLOBALS['domain']."/staffpicks/all_employees2002.html";
$array['2 2002 Favorites']['display'] = '2002 Favorites';
$array['1 2003 Favorites']['url'] = "http://www.".$GLOBALS['domain']."/staffpicks/stafftop5_2003.html";
$array['1 2003 Favorites']['display'] = '2003 Favorites';
$array['0 2004 Favorites']['url'] = "http://www.".$GLOBALS['domain']."/staffpicks/stafftop5_2004.html";
$array['0 2004 Favorites']['display'] = '2004 Favorites';
} elseif (ereg("^Judaica",$mysec)){
$array["Children's Books"]['url'] = "http://www.".$GLOBALS['domain']."/subsection/ChildrensReligionJudaica.html";
$array["Children's Books"]['display'] = "Children's Books";
} elseif (ereg("^Travel",$mysec)){
$array['Culture Shock']['url'] = "http://www.".$GLOBALS['domain']."/psection/CultureShock.html";
$array['Culture Shock']['display'] = 'Culture Shock';
$array['Fodors']['url'] = "http://www.".$GLOBALS['domain']."/psection/Fodors.html";
$array['Fodors']['display'] = 'Fodors';
$array['Lonely Planet']['url'] = "http://www.".$GLOBALS['domain']."/psection/LonelyPlanet.html";
$array['Lonely Planet']['display'] = 'Lonely Planet';
$array['Rough Guides']['url'] = "http://www.".$GLOBALS['domain']."/psection/RoughGuides.html";
$array['Rough Guides']['display'] = 'Rough Guides';
$array['Time Out']['url'] = "http://www.".$GLOBALS['domain']."/psection/TimeOut.html";
$array['Time Out']['display'] = 'Time Out';
} elseif (ereg("^DVDs",$mysec)) {
$array['Docurama']['url'] = "http://".$GLOBALS['domain']."/psection/Docurama.html";
$array['Docurama']['display'] = "Docurama";
} elseif (ereg("^Mystery",$mysec)){
$array[' Edgar Award Winners and Nominees']['url'] = "http://www.".$GLOBALS['domain']."/prizes/edgar.html";
$array[' Edgar Award Winners and Nominees']['display'] = ' Edgar Award Winners and Nominees';
} elseif (eregi("^At the Movies",$mysec)){
$array['Harry Potter']['url'] = "http://www.".$GLOBALS['domain']."/harry.html";
$array['Harry Potter']['display'] = 'Harry Potter';
$array['Lord of the Rings']['url'] = "http://www.".$GLOBALS['domain']."/features/tolkien.html";
$array['Lord of the Rings']['display'] = 'Lord of the Rings';
} elseif (eregi("^Black History Month",$mysec)){
$array['African American Studies']['url'] = "http://www.".$GLOBALS['domain']."/psection/AfricanAmericanStudies.html";
$array['African American Studies']['display'] = 'African American Studies';
} elseif (eregi("^African American Studies",$mysec)){
# $array['Black History Month']['url'] = "http://www.".$GLOBALS['domain']."/psection/BlackHistoryMonth.html";
} elseif (eregi("^Science Fiction and Fantasy",$mysec)){
$array[' Hugo Award']['url'] = "http://www.".$GLOBALS['domain']."/prizes/hugo.html";
$array[' Hugo Award']['display'] = ' Hugo Award';
$array[' Nebula Award']['url'] = "http://www.".$GLOBALS['domain']."/prizes/nebula.html";
$array[' Nebula Award']['display'] = ' Nebula Award';
# $array[' Sale Books']['url'] = "http://www.".$GLOBALS['domain']."/salebooks/ScienceFictionandFantasy.1.html";
}#if
ksort($array);
reset($array);
while (list($sub,$url) = each($array)){
?>
|
|
|
|
}//while
?>
if ($history){ ?>
World History
$array = '';
$curdatabase = mysql_select_db("Sections",$GLOBALS['dbdelta']);
$qpoop = mysql_query("select distinct(minorsec) from category where majorsec='World History' order by minorsec",$GLOBALS['dbdelta']);
while (list($sublist) = mysql_fetch_array($qpoop)){
if ($sublist == ' Prize Winners'){
continue;
}
if ($sublist == 'Used Books'){
$array[$sublist]['url'] = "http://www.".$GLOBALS['domain']."/usedbooks/WorldHistory.1.html";
$array[$sublist]['display'] = $sublist;
} elseif ($sublist == ' Used Books'){
$array[$sublist]['url'] = "http://www.".$GLOBALS['domain']."/usedbooks/WorldHistory.1.html";
$array[$sublist]['display'] = $sublist;
} elseif ($sublist == 'Sale Books'){
$array[$sublist]['url'] = "http://www.".$GLOBALS['domain']."/salebooks/WorldHistory.1.html";
$array[$sublist]['display'] = $sublist;
} elseif ($sublist == ' Sale Books'){
$array[$sublist]['url'] = "http://www.".$GLOBALS['domain']."/salebooks/WorldHistory.1.html";
$array[$sublist]['display'] = $sublist;
} else {
$key = preg_replace("/^( ?)The /", "\\1", $sublist);
$array[$key]['url'] = "http://www.".$GLOBALS['domain']."/subsection/WorldHistory".preg_replace("/[^A-Za-z0-9+#]/","",$sublist).".html";
$array[$key]['display'] = $sublist;
}#if
}#while
ksort($array);
reset($array);
while (list($sub,$url) = each($array)){
?>
|
|
|
}//while
?>
}#if history
} elseif (ereg("^Book Sense",$mysec) || ereg("^14 Favorites",$mysec)){
$array = "";
$comsec = preg_replace("/[^A-Za-z0-9+#]/","",$mysec);
$ss = addslashes($mysec);
$curdatabase = mysql_select_db("Sections",$GLOBALS['dbdelta']);
$qpoop = mysql_query("select distinct(minorsec) from category where majorsec='$ss' order by minorsec",$GLOBALS['dbdelta']); while (list($sublist) = mysql_fetch_array($qpoop)){
list($year,$month) = preg_split("/\s/",$sublist,"2");
if ($month == 'November/December'){
$order = 11;
} elseif ($month == 'December'){
$order = 12;
} elseif ($month == 'November'){
$order = 11;
} elseif ($month == 'October'){
$order = 10;
} elseif ($month == 'September/October'){
$order = '09';
} elseif ($month == 'September'){
$order = '09';
} elseif ($month == 'August'){
$order = '08';
} elseif ($month == 'July/August'){
$order = '07';
} elseif ($month == 'July'){
$order = '07';
} elseif ($month == 'June'){
$order = '06';
} elseif ($month == 'May/June'){
$order = '05';
} elseif ($month == 'May'){
$order = '05';
} elseif ($month == 'April'){
$order = '04';
} elseif ($month == 'March/April'){
$order = '03';
} elseif ($month == 'March'){
$order = '03';
} elseif ($month == 'February'){
$order = '02';
} elseif ($month == 'January/February'){
$order = '01';
} elseif ($month == 'January'){
$order = '01';
} elseif ($year == 'Spring'){
$order = '02';
$year = $month;
} elseif ($year == 'Summer'){
$order = '03';
$year = $month;
} elseif ($year == 'Fall'){
$order = '04';
$year = $month;
} elseif ($year == 'Fall/Winter'){
$order = '05';
$year = $month;
} elseif ($year == 'Winter'){
$order = '01';
$year = $month;
}#if
$array[$year.$order]['url'] = "http://www.".$GLOBALS['domain']."/subsection/".$comsec.preg_replace("/[^A-Za-z0-9+#]/","",$sublist).".html";
$array[$year.$order]['sub'] = $sublist;
}#while
krsort($array);
reset($array);
while (list($sub,$url) = each($array)){
?>
|
|
|
}//while
?>
} else {
$comsec = preg_replace("/[^A-Za-z0-9+#]/","",$mysec);
$ss = addslashes($mysec);
$curdatabase = mysql_select_db("portals",$GLOBALS['dbdelta']);
$portal_poo = mysql_query("select uber from portal where section='$ss'",$GLOBALS['dbdelta']);
list($uber) = mysql_fetch_row($portal_poo);
$curdatabase = mysql_select_db("Sections",$GLOBALS['dbdelta']);
if ($uber){
$qpoop = mysql_query("select ubersec from uber where majorsec='$ss' order by ubersec",$GLOBALS['dbdelta']);
} else {
$qpoop = mysql_query("select distinct(minorsec) from category where majorsec='$ss' order by minorsec",$GLOBALS['dbdelta']);
}#if
while (list($sublist) = mysql_fetch_array($qpoop)){
if (
(($mysec == 'PNBA Holiday Catalog') ||
($mysec == 'New Favorites')
) &&
($sublist == 'New Arrivals')
){
continue;
}#if
$sublist = preg_replace("/:/","-",$sublist);
$cs = preg_replace("/[^A-Za-z0-9+#]/","",$sublist);
$cs = rawurlencode($cs);
if ($sublist == 'Dr Seuss'){
continue;
}#if
?>
|
|
if ($sublist == 'Sale Books'){ ?>
=$sublist?>
} elseif ($sublist == ' Sale Books'){ ?>
=$sublist?>
} elseif ($sublist == 'Used Books'){ ?>
=$sublist?>
} elseif ($sublist == ' Used Books'){ ?>
=$sublist?>
} else { ?>
/.html">
}#if ?>
|
}//while
?>
}// if kids books
if ($samsaysyes){
$tech_array = array(
"Artificial Intelligence" => 1,
"Civil Engineering" => 1,
"Communications" => 1,
"Computer Architecture" => 1,
"Computer Certification" => 1,
"Computers Early" => 1,
"Computer Languages" => 1,
"Computers Reference" => 1,
"Construction" => 1,
"DOS" => 1,
"Database" => 1,
"Desktop Publishing" => 1,
"Electricity" => 1,
"Energy" => 1,
"Engineering" => 1,
"Environmental Engineering" => 1,
"Exams" => 1,
"Graphics" => 1,
"Handheld Computers" => 1,
"History of Science" => 1,
"Industrial and Control Engineering" => 1,
"Internet" => 1,
"Macintosh" => 1,
"Mathematics" => 1,
"Mechanical Engineering" => 1,
"Metal" => 1,
"Materials Science" => 1,
"Multimedia" => 1,
"Networking" => 1,
"Nutshell" => 1,
"Operating Systems" => 1,
"Personal Computers" => 1,
"Physics" => 1,
"Popular Science" => 1,
"Software Engineering" => 1,
"Transportation" => 1,
"Unix" => 1,
"Windows" => 1
);
include "/usr/local/apache/share/htdocs/margin/scallop_bottom.html";
if ($tech_array[$mysec]){
include "/usr/local/apache/share/htdocs/margin/margin_tech.html";
} elseif (ereg("^Children",$mysec)){
include "/usr/local/apache/share/htdocs/margin/margin_kids.html";
} elseif (ereg("^Sale",$mysec)) {
include "/usr/local/apache/share/htdocs/margin/margin_sale.html";
}//if
$section = $mysec;
include "/usr/local/apache/share/htdocs/newsections/template.section_list.side.php";
}#if samsays
?>
[an error occurred while processing this directive]
 |
To help bring attention to books from around the world,
the Independent Booksellers Consortium (with artist Peter Sis) introduces
Reading the World. Through the month of May, each participating store will
display ten works in translation, from nonfiction to novels to collections
of poetry. Powells.com is taking it a step further and presenting an entire
section of foreign-language titles translated into English. Check out our
featured titles and browse
more literature in translation.

|
|
|
|
|