Mercurial > hg > ywww
comparison php/read/map/getMapRecommendations.php @ 6:077b0a0a3e6d
remaining originals according to dependency walk
| author | Robert Boland <robert@markup.co.uk> |
|---|---|
| date | Thu, 16 Feb 2017 22:29:02 +0000 |
| parents | |
| children | 385ddd7c4b55 a67bf725e87b |
comparison
equal
deleted
inserted
replaced
| 5:55445b456ad0 | 6:077b0a0a3e6d |
|---|---|
| 1 <?PHP | |
| 2 if(!isset($ret)) | |
| 3 { | |
| 4 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); | |
| 5 header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); | |
| 6 header("Cache-Control: no-store, no-cache, must-revalidate"); | |
| 7 header("Cache-Control: post-check=0, pre-check=0", false); | |
| 8 header("Pragma: no-cache"); | |
| 9 } | |
| 10 | |
| 11 //$isbn = $_GET['isbn']; | |
| 12 | |
| 13 if(isset($_GET['user'])){ | |
| 14 $user = $_GET['user']; | |
| 15 } | |
| 16 | |
| 17 if(isset($_GET['listname'])){ | |
| 18 $listName = $_GET['listname']; | |
| 19 } | |
| 20 else{ | |
| 21 $listName = "MyMap"; //default location is 1 | |
| 22 } | |
| 23 | |
| 24 if(isset($_GET['loc'])){ | |
| 25 $loc = $_GET['loc']; | |
| 26 } | |
| 27 else{ | |
| 28 $loc = 1; //default location is 1 | |
| 29 } | |
| 30 | |
| 31 include "../../../../private/db.php"; | |
| 32 | |
| 33 $query = "CALL b_getMap_relatedBooks($user,$loc,\"$listName\")"; | |
| 34 //echo $query; | |
| 35 $results = mysqli_query($link, $query) or exit( mysqli_error( $link )); | |
| 36 | |
| 37 $output = "<?xml version=\"1.0\"?>"; | |
| 38 $output .= "<results>"; | |
| 39 | |
| 40 while($line = mysqli_fetch_assoc($results)) { | |
| 41 | |
| 42 $ISBN=trim($line["ISBN"]); | |
| 43 $Title = htmlspecialchars($line["Title"]); | |
| 44 $Author = htmlspecialchars($line["Author"]); | |
| 45 $ImageURL = trim($line["ImageURL"]); | |
| 46 | |
| 47 $output .= "<BOOK>" ; | |
| 48 $output .= "<ISBN>" . $ISBN . "</ISBN>"; | |
| 49 $output .= "<Title>" . $Title . "</Title>"; | |
| 50 $output .= "<Author>" . $Author . "</Author>"; | |
| 51 $output .= "<ImageURL>" . $ImageURL . "</ImageURL>"; | |
| 52 $output .= "</BOOK>"; | |
| 53 | |
| 54 $linkedBooks++; | |
| 55 } | |
| 56 | |
| 57 $output .= "</results>"; | |
| 58 | |
| 59 if($ret==1) | |
| 60 return $output; | |
| 61 else | |
| 62 echo $output; | |
| 63 | |
| 64 mysqli_close($link); | |
| 65 | |
| 66 ?> |
