Exemplo n.º 1
0
<?php

include_once 'app/app.php';
$customparams = loadCustomParams($c, decryptCookie($_COOKIE['oauth_consumer_key']));
include 'rest/EBSCOAPI.php';
if ($customparams['studentdata'] == "y" && !isInstructor()) {
    $email = isset($_COOKIE['lis_person_contact_email_primary']) ? decryptCookie($_COOKIE['lis_person_contact_email_primary']) : '';
    recordStudentAccess($c, decryptCookie($_COOKIE['lis_person_name_full']), $email, decryptCookie($_COOKIE['currentListId']));
}
$readingList = getReadingList($c);
$useCache = false;
if (sizeof($readingList) >= 75) {
    $results = array();
    $useCache = true;
} else {
    $api = new EBSCOAPI($c, $customparams);
    $listOfANs = array();
    foreach ($readingList as $reading) {
        $listOfANs[] = "AN " . $reading['an'];
    }
    if (sizeof($listOfANs) > 0) {
        $query['query'] = implode(" OR ", $listOfANs);
        $searchTerm = $query;
        $fieldCode = '';
        $start = 1;
        $limit = 100;
        $sortBy = 'relevance';
        $amount = 'detailed';
        $mode = 'all';
        $expander = '';
        $limiter = '';
<?php

$clean = strip_tags_deep($_GET);
if (isInstructor()) {
    ?>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
    $("#chkAll").click(function(){
        $(".readingchoice").prop("checked",$("#chkAll").prop("checked"))
    }) 
});
</script>
<div class="readingListLink">
<?php 
    $currlistid = decryptCookie($_COOKIE['currentListId']);
    $currauthid = decryptCookie($_COOKIE['currentAuthorId']);
    $sql = $c->prepare("SELECT id, course, linklabel, private FROM lists WHERE id IN (SELECT listid FROM authorlists WHERE authorid = ?) AND id != ? AND credentialconsumerid = ?;");
    $credconsumerID = getCredentialConsumerID();
    $sql->bind_param('iii', $currauthid, $currlistid, $credconsumerID);
    $sql->execute();
    $sql->store_result();
    $sql->bind_result($mylists_id, $mylists_course, $mylists_linklabel, $mylists_private);
    if ($sql->num_rows > 0) {
        echo '<form id="mylist" action="copy_list.php" method="get">Your Lists: <select id="mylists" name="listid">';
        while ($sql->fetch()) {
            if (strlen($mylists_linklabel) <= 0) {
                $mylists_linklabel = 'Untitled List';
            }
            if (strlen($mylists_linklabel) >= 100) {
                $mylists_linklabel = substr($mylists_linklabel, 0, 99) . "...";
Exemplo n.º 3
0
    ?>
">Login</a> for full access.</p>
<?php 
} else {
    ?>
     
    <h1>
      <?php 
    if (!empty($result['Items'])) {
        echo $result['Items'][0]['Data'];
        $resultTitle = $result['Items'][0]['Data'];
    }
    ?>
    </h1>       
<?php 
    if (isInstructor() && !isset($error)) {
        ?>
<div class="foldersblock" style="padding-top:10px;padding-bottom:20px;">
<!--
  
Foldering
   Display 'add to folder' link to allow logged in users to save items.
   Uses AJAX to automatically insert and remove items from folders without reloading page.
  
-->

<!-- If the user is logged in -->
<!-- If the item is not in the folder -->
	<div id="notinfolder1" class="folderitem" style="font-size: 11px; display: <?php 
        if (itemInFolder($folderitemsarray, $result['An'], $result['DbId'])) {
            echo "none";