# HG changeset patch # User Charlie Root # Date 1547664135 18000 # Node ID a67bf725e87b6eaf0e05a59ddb1c64ca6cd47103 # Parent da133c130c1d76215086347c1e97478f5c1c4973 put both paths in include_path and depend on that diff -r da133c130c1d -r a67bf725e87b .user.ini --- a/.user.ini Sun Jan 06 12:46:24 2019 -0500 +++ b/.user.ini Wed Jan 16 13:42:15 2019 -0500 @@ -1,1 +1,1 @@ -include_path = ".:/var/test:/usr/share/php" +include_path = ".:/var/test/ywww:/var/test/private:/usr/share/php" diff -r da133c130c1d -r a67bf725e87b ca/index.php --- a/ca/index.php Sun Jan 06 12:46:24 2019 -0500 +++ b/ca/index.php Wed Jan 16 13:42:15 2019 -0500 @@ -124,7 +124,7 @@ $ret = 1; $countryCode = 2; - include "../../private/db.php"; + include "db.php"; $query = "CALL b_getBookInfo('$isbn', $countryCode)"; //echo $query; $res = mysqli_query($link, $query) or exit( mysqli_error( $link )); @@ -168,7 +168,7 @@ $linkedRecommended = ""; for($i=0;$iisbn);$i++){ $linkedISBN = $xml->isbn[$i]; - include "../../private/db.php"; + include "db.php"; $query = "CALL b_getBookInfo('$linkedISBN', $countryCode)"; //echo $query; $res = mysqli_query($link, $query) or exit( mysqli_error( $link )); diff -r da133c130c1d -r a67bf725e87b de/index.php --- a/de/index.php Sun Jan 06 12:46:24 2019 -0500 +++ b/de/index.php Wed Jan 16 13:42:15 2019 -0500 @@ -124,7 +124,7 @@ $ret = 1; $countryCode = 3; - include "../../private/db.php"; + include "db.php"; $query = "CALL b_getBookInfo('$isbn', $countryCode)"; //echo $query; $res = mysqli_query($link, $query) or exit( mysqli_error( $link )); @@ -168,7 +168,7 @@ $linkedRecommended = ""; for($i=0;$iisbn);$i++){ $linkedISBN = $xml->isbn[$i]; - include "../../private/db.php"; + include "db.php"; $query = "CALL b_getBookInfo('$linkedISBN', $countryCode)"; //echo $query; $res = mysqli_query($link, $query) or exit( mysqli_error( $link )); diff -r da133c130c1d -r a67bf725e87b facebook/facebookLogin.php --- a/facebook/facebookLogin.php Sun Jan 06 12:46:24 2019 -0500 +++ b/facebook/facebookLogin.php Wed Jan 16 13:42:15 2019 -0500 @@ -23,7 +23,7 @@ $uid = $facebook->getUser(); $me = $facebook->api('/me'); - include "../../private/db.php"; + include "db.php"; $Email = $me['email']; $FirstName = $me['first_name']; $Surname = $me['last_name']; @@ -43,7 +43,7 @@ //reset connection mysqli_close($link); - include "../../private/db.php"; + include "db.php"; $sql3="SELECT FirstName, Surname, DisplayName, UserID from user WHERE Email ='$Email'"; //echo $sql3; diff -r da133c130c1d -r a67bf725e87b facebook/invite.php --- a/facebook/invite.php Sun Jan 06 12:46:24 2019 -0500 +++ b/facebook/invite.php Wed Jan 16 13:42:15 2019 -0500 @@ -35,7 +35,7 @@ $uid = $facebook->getUser(); $me = $facebook->api('/me'); - include "../../private/db.php"; + include "db.php"; $Email = $me['email']; $FirstName = $me['first_name']; $Surname = $me['last_name']; @@ -55,7 +55,7 @@ //reset connection mysqli_close($link); - include "../../private/db.php"; + include "db.php"; $sql3="SELECT FirstName, Surname, DisplayName, UserID from user WHERE Email ='$User'"; //echo $sql3; diff -r da133c130c1d -r a67bf725e87b fr/index.php --- a/fr/index.php Sun Jan 06 12:46:24 2019 -0500 +++ b/fr/index.php Wed Jan 16 13:42:15 2019 -0500 @@ -124,7 +124,7 @@ $ret = 1; $countryCode = 4; - include "../../private/db.php"; + include "db.php"; $query = "CALL b_getBookInfo('$isbn', $countryCode)"; //echo $query; $res = mysqli_query($link, $query) or exit( mysqli_error( $link )); @@ -168,7 +168,7 @@ $linkedRecommended = ""; for($i=0;$iisbn);$i++){ $linkedISBN = $xml->isbn[$i]; - include "../../private/db.php"; + include "db.php"; $query = "CALL b_getBookInfo('$linkedISBN', $countryCode)"; //echo $query; $res = mysqli_query($link, $query) or exit( mysqli_error( $link )); diff -r da133c130c1d -r a67bf725e87b goodreads/addToGRShelf.php --- a/goodreads/addToGRShelf.php Sun Jan 06 12:46:24 2019 -0500 +++ b/goodreads/addToGRShelf.php Wed Jan 16 13:42:15 2019 -0500 @@ -6,7 +6,7 @@ //echo $userID; //echo $listName; -include "../../private/db.php"; +include "db.php"; $ynrList = "CALL b_getUserSavedList($userID,\"$listName\")"; //echo $ynrList; //echo $add; diff -r da133c130c1d -r a67bf725e87b goodreads/bkp/callback.php --- a/goodreads/bkp/callback.php Sun Jan 06 12:46:24 2019 -0500 +++ b/goodreads/bkp/callback.php Wed Jan 16 13:42:15 2019 -0500 @@ -30,7 +30,7 @@ $userID = $_SESSION['UserID']; //echo $userID; -include "../../private/db.php"; +include "db.php"; $add = "CALL addGoodreadsID($userID,$grID)"; $run = mysqli_query($link, $add); diff -r da133c130c1d -r a67bf725e87b goodreads/bkp/getGoodReadsShelves.php --- a/goodreads/bkp/getGoodReadsShelves.php Sun Jan 06 12:46:24 2019 -0500 +++ b/goodreads/bkp/getGoodReadsShelves.php Wed Jan 16 13:42:15 2019 -0500 @@ -16,7 +16,7 @@ $ret = preg_replace("/[^[:alnum:][:punct:][:space:]]/","",$ret); //echo $ret; - include "../../private/db.php"; + include "db.php"; $xml = new SimpleXMLElement(convert_utf8($ret)); for($i=0;$ishelves->user_shelf);$i++){ diff -r da133c130c1d -r a67bf725e87b goodreads/bkp/syncGoodreadsShelves.php --- a/goodreads/bkp/syncGoodreadsShelves.php Sun Jan 06 12:46:24 2019 -0500 +++ b/goodreads/bkp/syncGoodreadsShelves.php Wed Jan 16 13:42:15 2019 -0500 @@ -16,7 +16,7 @@ $ret = preg_replace("/[^[:alnum:][:punct:][:space:]]/","",$ret); //echo $ret; - include "../../private/db.php"; + include "db.php"; $shelves = array(); diff -r da133c130c1d -r a67bf725e87b goodreads/bkp/working/getGoodreadsShelves.php --- a/goodreads/bkp/working/getGoodreadsShelves.php Sun Jan 06 12:46:24 2019 -0500 +++ b/goodreads/bkp/working/getGoodreadsShelves.php Wed Jan 16 13:42:15 2019 -0500 @@ -36,7 +36,7 @@ $ret = preg_replace("/[^[:alnum:][:punct:][:space:]]/","",$ret); //echo $ret; - include "../../private/db.php"; + include "db.php"; $xml = new SimpleXMLElement(convert_utf8($ret)); for($i=0;$ishelves->user_shelf);$i++){ diff -r da133c130c1d -r a67bf725e87b goodreads/bkp/working/syncGoodreadsShelves.php --- a/goodreads/bkp/working/syncGoodreadsShelves.php Sun Jan 06 12:46:24 2019 -0500 +++ b/goodreads/bkp/working/syncGoodreadsShelves.php Wed Jan 16 13:42:15 2019 -0500 @@ -37,7 +37,7 @@ $ret = preg_replace("/[^[:alnum:][:punct:][:space:]]/","",$ret); //echo $ret; - include "../../private/db.php"; + include "db.php"; $shelves = array(); diff -r da133c130c1d -r a67bf725e87b goodreads/callback.php --- a/goodreads/callback.php Sun Jan 06 12:46:24 2019 -0500 +++ b/goodreads/callback.php Wed Jan 16 13:42:15 2019 -0500 @@ -31,7 +31,7 @@ $userID = $_SESSION['UserID']; $backLoc = "http://www.yournextread.com/" . urldecode($_SESSION['backLocation']); -include "../../private/db.php"; +include "db.php"; $add = "CALL addGoodreadsID($userID,$grID)"; //echo $add; $run = mysqli_query($link, $add); //add the book to the list in usersave diff -r da133c130c1d -r a67bf725e87b goodreads/getGoodreadsShelves.php --- a/goodreads/getGoodreadsShelves.php Sun Jan 06 12:46:24 2019 -0500 +++ b/goodreads/getGoodreadsShelves.php Wed Jan 16 13:42:15 2019 -0500 @@ -36,7 +36,7 @@ $ret = preg_replace("/[^[:alnum:][:punct:][:space:]]/","",$ret); //echo $ret; - include "../../private/db.php"; + include "db.php"; require_once('GoodreadsAPI.php'); session_start(); $access_token = $_SESSION['access_token']; diff -r da133c130c1d -r a67bf725e87b goodreads/getGoodreadsShelves2.php --- a/goodreads/getGoodreadsShelves2.php Sun Jan 06 12:46:24 2019 -0500 +++ b/goodreads/getGoodreadsShelves2.php Wed Jan 16 13:42:15 2019 -0500 @@ -45,7 +45,7 @@ $ret = preg_replace("/[^[:alnum:][:punct:][:space:]]/","",$ret); echo $ret; - include "../../private/db.php"; + include "db.php"; $xml = new SimpleXMLElement(convert_utf8($ret)); for($i=0;$ishelves->user_shelf);$i++){ diff -r da133c130c1d -r a67bf725e87b goodreads/syncGoodreadsShelves.php --- a/goodreads/syncGoodreadsShelves.php Sun Jan 06 12:46:24 2019 -0500 +++ b/goodreads/syncGoodreadsShelves.php Wed Jan 16 13:42:15 2019 -0500 @@ -37,7 +37,7 @@ $ret = preg_replace("/[^[:alnum:][:punct:][:space:]]/","",$ret); //echo $ret; - include "../../private/db.php"; + include "db.php"; $shelves = array(); diff -r da133c130c1d -r a67bf725e87b index.php --- a/index.php Sun Jan 06 12:46:24 2019 -0500 +++ b/index.php Wed Jan 16 13:42:15 2019 -0500 @@ -1,5 +1,5 @@ Name == "Subjects") @@ -61,7 +61,7 @@ $output .= ""; $proceed = true; - include "private/db.php"; + include "db.php"; $query = "CALL b_getBookInfo('$isbn', $loc)"; //select Timestamp,Title,Author,Binding,DeweyDecimal,ImageURL,SalesRank,PublicationDate,Publisher,Genre1,Genre2,Genre3 from books where ISBN = '$isbn'"; @@ -107,7 +107,7 @@ if($proceed == true) { include "aws_signed_request.php"; - include_once "ywww/xml/doAmazonRequest.php"; + include_once "xml/doAmazonRequest.php"; //book does not exist already so look up all the info from browse nodes.... @@ -154,7 +154,7 @@ dl("Caught one bd: $isbn\n"); dl(print_r($out, TRUE)."\n"); } ); - include "private/db.php"; + include "db.php"; $title=""; $author=""; @@ -262,7 +262,7 @@ $salesRank = "null"; mysqli_close($link); //do not remove. reset is needed otherwise mysqli_fetch_array doesn't work after first loop - include "private/db.php"; + include "db.php"; $title = strtr($title, '"', "'"); $queryInsert = "CALL b_addNewBook(\"$isbn\",\"$title\", \"$author\",\"$binding\",\"$imageURL\", $dewey, $salesRank,$pubDate,\"$publisher\",$g1,$g2,$g3,$loc)"; diff -r da133c130c1d -r a67bf725e87b php/read/getBrowseNodes.php --- a/php/read/getBrowseNodes.php Sun Jan 06 12:46:24 2019 -0500 +++ b/php/read/getBrowseNodes.php Wed Jan 16 13:42:15 2019 -0500 @@ -1,6 +1,6 @@ "; mysqli_close($link); -include "../../../../private/db.php"; +include "db.php"; $query = "CALL b_getMap_isbnPaths('$UserID', $loc, \"$listName\")"; // this generates fixed points - //echo $query; diff -r da133c130c1d -r a67bf725e87b php/read/map/getMapRecommPaths.php --- a/php/read/map/getMapRecommPaths.php Sun Jan 06 12:46:24 2019 -0500 +++ b/php/read/map/getMapRecommPaths.php Wed Jan 16 13:42:15 2019 -0500 @@ -25,7 +25,7 @@ $listName = "MyMap"; //default map } -include "../../../../private/db.php"; +include "db.php"; //need to have an if statement to catch the first time it is run and call - CALL b_setMapAuthorXYcoord //Can swicth to this call if the map is having problems @@ -45,12 +45,12 @@ { //populate the data mysqli_close($link); - include "../../../../private/db.php"; + include "db.php"; $query1 = "CALL b_setupUserMap($UserID, $loc,\"$listName\")"; $results1 = mysqli_query($link, $query1) or exit( mysqli_error( $link )); mysqli_close($link); - include "../../../../private/db.php"; + include "db.php"; // $query = "CALL b_getMap_relatedBooksNPath($UserID, $loc,\"$listName\")"; $query = "CALL b_getMap_topRelatedBNP($UserID, $loc,\"$listName\")"; diff -r da133c130c1d -r a67bf725e87b php/read/map/getMapRecommendations.php --- a/php/read/map/getMapRecommendations.php Sun Jan 06 12:46:24 2019 -0500 +++ b/php/read/map/getMapRecommendations.php Wed Jan 16 13:42:15 2019 -0500 @@ -28,7 +28,7 @@ $loc = 1; //default location is 1 } -include "../../../../private/db.php"; +include "db.php"; $query = "CALL b_getMap_relatedBooks($user,$loc,\"$listName\")"; //echo $query; diff -r da133c130c1d -r a67bf725e87b php/read/map/getMapSavedBooks.php --- a/php/read/map/getMapSavedBooks.php Sun Jan 06 12:46:24 2019 -0500 +++ b/php/read/map/getMapSavedBooks.php Wed Jan 16 13:42:15 2019 -0500 @@ -1,6 +1,6 @@  0"; //CALL b_setThumbState($userID, $linkList)"; //echo $query1; diff -r da133c130c1d -r a67bf725e87b php/read/updateLink.php --- a/php/read/updateLink.php Sun Jan 06 12:46:24 2019 -0500 +++ b/php/read/updateLink.php Wed Jan 16 13:42:15 2019 -0500 @@ -12,7 +12,7 @@ } echo $userID; -include "../../../private/db.php"; +include "db.php"; $pos = 0; $neg = 0; @@ -68,7 +68,7 @@ echo $stateQuery; mysqli_close($link); //do not remove. reset is needed otherwise mysqli_fetch_array doesn't work after first loop - include "../../../private/db.php"; + include "db.php"; $stateFinal = mysqli_query($link, $stateQuery) or exit( mysqli_error( $link )); } diff -r da133c130c1d -r a67bf725e87b php/read/updateTierLink.php --- a/php/read/updateTierLink.php Sun Jan 06 12:46:24 2019 -0500 +++ b/php/read/updateTierLink.php Wed Jan 16 13:42:15 2019 -0500 @@ -12,14 +12,14 @@ $loc = strval($_GET['loc']); echo $loc; -include "../../../private/db.php"; +include "db.php"; //$addState = 0; $query1 = "CALL b_getLinkID('$isbn1', '$isbn2', $loc)"; // "select LinkID from scoretable where BookID1 = '$isbn1' and BookID2 = '$isbn2' and LocID = $loc"; //echo $query1; $data1 = mysqli_query($link, $query1) or exit( mysqli_error( $link )); mysqli_close($link); //do not remove. reset is needed otherwise mysqli_fetch_array doesn't work after first loop -include "../../../private/db.php"; +include "db.php"; if ( mysqli_num_rows( $data1 ) < 1 ) //does the link exist { @@ -35,7 +35,7 @@ //reset connection mysqli_close($link); //do not remove. reset is needed otherwise mysqli_fetch_array doesn't work after first loop - include "../../../private/db.php"; + include "db.php"; //if(isset($userID)) @@ -53,7 +53,7 @@ //reset connection mysqli_close($link); //do not remove. reset is needed otherwise mysqli_fetch_array doesn't work after first loop - include "../../../private/db.php"; + include "db.php"; while($line = mysqli_fetch_assoc($data)) { diff -r da133c130c1d -r a67bf725e87b twitter/twitterLogin.php --- a/twitter/twitterLogin.php Sun Jan 06 12:46:24 2019 -0500 +++ b/twitter/twitterLogin.php Wed Jan 16 13:42:15 2019 -0500 @@ -1,5 +1,5 @@ isbn);$i++){ $linkedISBN = $xml->isbn[$i]; - include "../../private/db.php"; + include "db.php"; $query = "CALL b_getBookInfo('$linkedISBN', $countryCode)"; //echo $query; $res = mysqli_query($link, $query) or exit( mysqli_error( $link )); diff -r da133c130c1d -r a67bf725e87b us/index.php --- a/us/index.php Sun Jan 06 12:46:24 2019 -0500 +++ b/us/index.php Wed Jan 16 13:42:15 2019 -0500 @@ -1,5 +1,5 @@ DetectSmartphone(); $iPad = $uagent_obj->DetectIpad(); @@ -30,7 +30,7 @@ if($pos !== false || isset($_GET['facebook'])) { //we are in facebook canvas so react appropriately - include_once 'ywww/facebook.php'; + include_once 'facebook.php'; $facebook = new Facebook(array( 'appId' => '128245333876633', @@ -100,7 +100,7 @@ $ret = 1; - $bookLists = include "ywww/php/read/getAllSavedBooks.php"; + $bookLists = include "php/read/getAllSavedBooks.php"; $xml = new SimpleXMLElement($bookLists); $numOfLists = sizeof($xml->List) - 1; //-1 for zero indexing @@ -126,12 +126,12 @@ $ret = 1; $countryCode = 0; - include "private/db.php"; + include "db.php"; $query = "CALL b_getBookInfo('$isbn', $countryCode)"; //echo $query; $res = mysqli_query($link, $query) or exit( mysqli_error( $link )); - include "ywww/xml/aws_signed_request.php"; - include "ywww/xml/getAmazonInfo.php"; + include "xml/aws_signed_request.php"; + include "xml/getAmazonInfo.php"; if ( mysqli_num_rows( $res ) > 0 ) { $rows=mysqli_fetch_array($res, MYSQLI_ASSOC); @@ -179,7 +179,7 @@ } } - $linkedBooks = include "ywww/php/read/getLinkedBooks.php"; + $linkedBooks = include "php/read/getLinkedBooks.php"; try { $xml = new SimpleXMLElement($linkedBooks); } @@ -191,7 +191,7 @@ $linkedRecommended = ""; for($i=0;$iisbn);$i++){ $linkedISBN = $xml->isbn[$i]; - include "private/db.php"; + include "db.php"; $query = "CALL b_getBookInfo('$linkedISBN', $countryCode)"; //echo $query; $res = mysqli_query($link, $query) or exit( mysqli_error( $link )); diff -r da133c130c1d -r a67bf725e87b user/checkLogin.php --- a/user/checkLogin.php Sun Jan 06 12:46:24 2019 -0500 +++ b/user/checkLogin.php Wed Jan 16 13:42:15 2019 -0500 @@ -1,7 +1,7 @@ getUser(); $me = $facebook->api('/me'); - include "../../private/db.php"; + include "db.php"; $Email = $me['email']; $FirstName = $me['first_name']; $Surname = $me['last_name']; @@ -41,7 +41,7 @@ //reset connection mysqli_close($link); - include "../../private/db.php"; + include "db.php"; $sql3="SELECT FirstName, Surname, DisplayName, u.UserID, ReceiveEmail, GoodreadsState, LocID from user u, userpref p diff -r da133c130c1d -r a67bf725e87b user/newLogin.php --- a/user/newLogin.php Sun Jan 06 12:46:24 2019 -0500 +++ b/user/newLogin.php Wed Jan 16 13:42:15 2019 -0500 @@ -1,7 +1,7 @@ 'en', //what language to render the page in diff -r da133c130c1d -r a67bf725e87b xml/doAmazonRequest.php --- a/xml/doAmazonRequest.php Sun Jan 06 12:46:24 2019 -0500 +++ b/xml/doAmazonRequest.php Wed Jan 16 13:42:15 2019 -0500 @@ -1,7 +1,7 @@ count()==0) { $publisher="null"; } @@ -330,7 +330,7 @@ { global $output; //look up info from db - include "private/db.php"; + include "db.php"; $query = "CALL b_getBookInfo('$searchparameterdata', $loc)"; //echo $query; $res = my_query($query,'gai3');