Mercurial > hg > ywww
comparison php/read/getBookDetails.php @ 44:38d209611508
change includes to assume (contra previos ASSUMES) that we have .user.ini which adds /var/test to include_path
| author | Charlie Root |
|---|---|
| date | Sun, 06 Jan 2019 07:17:03 -0500 |
| parents | dbc006408d2b |
| children | b7376319d25a |
comparison
equal
deleted
inserted
replaced
| 43:dbc006408d2b | 44:38d209611508 |
|---|---|
| 1 <?php | 1 <?php |
| 2 include_once "dlog.php"; | 2 include_once "ywww/dlog.php"; |
| 3 | 3 |
| 4 include_once "web.php"; | 4 include_once "private/web.php"; |
| 5 function findGenre($browseNode, &$ID, &$gen) | 5 function findGenre($browseNode, &$ID, &$gen) |
| 6 { | 6 { |
| 7 if($browseNode->Name == "Subjects") | 7 if($browseNode->Name == "Subjects") |
| 8 { | 8 { |
| 9 return true; | 9 return true; |
| 59 | 59 |
| 60 $output .= "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; | 60 $output .= "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; |
| 61 $output .= "<BookDetails>"; | 61 $output .= "<BookDetails>"; |
| 62 | 62 |
| 63 $proceed = true; | 63 $proceed = true; |
| 64 include "../../../private/db.php"; | 64 include "private/db.php"; |
| 65 | 65 |
| 66 $query = "CALL b_getBookInfo('$isbn', $loc)"; | 66 $query = "CALL b_getBookInfo('$isbn', $loc)"; |
| 67 //select Timestamp,Title,Author,Binding,DeweyDecimal,ImageURL,SalesRank,PublicationDate,Publisher,Genre1,Genre2,Genre3 from books where ISBN = '$isbn'"; | 67 //select Timestamp,Title,Author,Binding,DeweyDecimal,ImageURL,SalesRank,PublicationDate,Publisher,Genre1,Genre2,Genre3 from books where ISBN = '$isbn'"; |
| 68 //echo $query; | 68 //echo $query; |
| 69 $res = mysqli_query($link, $query) or exit( mysqli_error( $link )); | 69 $res = mysqli_query($link, $query) or exit( mysqli_error( $link )); |
| 105 } | 105 } |
| 106 | 106 |
| 107 if($proceed == true) | 107 if($proceed == true) |
| 108 { | 108 { |
| 109 include "aws_signed_request.php"; | 109 include "aws_signed_request.php"; |
| 110 include_once "../../xml/doAmazonRequest.inc"; | 110 include_once "../../xml/doAmazonRequest.php"; |
| 111 dl("nbd proceeding: $isbn\n"); | 111 dl("nbd proceeding: $isbn\n"); |
| 112 | 112 |
| 113 //book does not exist already so look up all the info from browse nodes.... | 113 //book does not exist already so look up all the info from browse nodes.... |
| 114 | 114 |
| 115 $Adefault=array( | 115 $Adefault=array( |
| 153 set_error_handler(function () { | 153 set_error_handler(function () { |
| 154 global $out,$isbn; | 154 global $out,$isbn; |
| 155 dl("Caught one bd: $isbn\n"); | 155 dl("Caught one bd: $isbn\n"); |
| 156 dl(print_r($out, TRUE)."\n"); | 156 dl(print_r($out, TRUE)."\n"); |
| 157 } ); | 157 } ); |
| 158 include "db.php"; | 158 include "private/db.php"; |
| 159 | 159 |
| 160 $title=""; | 160 $title=""; |
| 161 $author=""; | 161 $author=""; |
| 162 $binding=""; | 162 $binding=""; |
| 163 $dewey=""; | 163 $dewey=""; |
