} } $errorlog .= '<p>TestSessionStore - '; $_SESSION['vtest'] = 'Testing'; if (isset($_SESSION['vtest']) && $_SESSION['vtest'] == 'Testing') { $errorlog .= 'Passed</p>'; } else { $errorlog .= 'Failed</p>'; $errors++; } $errorlog .= '<p>TestAPIConnection - '; $url = ''; $_SESSION['sessionToken']['sessionToken'] = ''; try { $api = new EBSCOAPI($c, $customparams); $theinfo = $api->getInfo(); if (isset($theinfo['sort'])) { $errorlog .= 'Passed</p>'; } else { $errorlog .= 'Failed: ' . var_export($theinfo, TRUE) . '</p>'; $errors++; } } catch (Exception $e) { $errorlog .= 'Failed</p>'; $errors++; } if ($errors > 0) { echo $errorlog; } else { echo 'OK'; }
$fieldCode = $clean['fieldcode'] ? $clean['fieldcode'] : ''; $start = isset($clean['pagenumber']) ? $clean['pagenumber'] : 1; if (!is_numeric($start)) { $start = 1; } $limit = isset($clean['resultsperpage']) ? $clean['resultsperpage'] : 20; if (!is_numeric($limit)) { $limit = 20; } $sortBy = isset($clean['sort']) ? $clean['sort'] : 'relevance'; $amount = isset($clean['view']) ? $clean['view'] : 'detailed'; $mode = 'all'; $expander = isset($clean['expander']) ? $clean['expander'] : ''; $limiter = isset($clean['limiter']) ? $clean['limiter'] : ''; $debug = isset($clean['debug']) ? $clean['debug'] : ''; $Info = $api->getInfo(); // If user come back from the detailed record // The same search will not call API again if (isset($clean['back']) && isset($_SESSION['results'])) { $results = $_SESSION['results']; if (isset($results['queryString'])) { $backpath = $results['queryString']; } } else { if (isset($clean['back']) && isset($clean['backpath'])) { $_SESSION['debug'] = "<p>PARAMS AFTER RESULTS.PHP: " . urldecode($clean['backpath']) . "</p>"; $results = $api->apiSearch(urldecode($clean['backpath'])); $_SESSION['results'] = $results; if (isset($results['queryString'])) { $backpath = $results['queryString']; }