Exemplo n.º 1
0
<?php

require_once 'data/_data.php';
require_once 'data/_comics.php';
require_once 'data/_authors.php';
require_once 'data/_publishers.php';
session_start();
if (array_key_exists(ITEM_ID, $_GET)) {
    $item = get_item_details($_GET[ITEM_ID]);
} else {
    if (!$item) {
        $err_msg = 'Aucunne BD ne correspond à cette requête.';
    } else {
        $err_msg = 'Aucun resultat.';
    }
}
$authors = get_authors($item[AUTHOR_ID]);
$publishers = get_publishers($item[PUBLISHER_ID]);
//var_dump($item);
//var_dump($authors);
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title><?php 
echo $item[ITEM_TITLE];
?>
</title>
    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
Exemplo n.º 2
0
function get_associated_files()
{
    global $data, $errors, $assoc_meta_options;
    if (isset($data->associated) && $data->associated != NULL && get_option('drstk_assoc') == 'on') {
        $associated_html = '';
        $title = get_option('drstk_assoc_title') != '' ? get_option('drstk_assoc_title') : 'Associated Files';
        $associated_html .= "<div class='panel panel-default assoc_files'><div class='panel-heading'>" . $title . "</div><div class='panel-body'>";
        // foreach($data->associated as $assoc_pid => $assoc_title){ //disabling multivalued associated files until a new less resource intensive api call for associated files exists
        $assoc_pid = key(get_object_vars($data->associated));
        //using this just to get the first title
        $assoc_title = $data->associated->{$assoc_pid};
        //using this just to get the first title
        $url = "https://repository.library.northeastern.edu/api/v1/files/" . $assoc_pid . "?solr_only=true";
        $assoc_data = get_response($url);
        $assoc_data = json_decode($assoc_data);
        if (check_for_bad_data($assoc_data)) {
            return false;
        } else {
            if (isset($assoc_data->_source->fields_thumbnail_list_tesim)) {
                $associated_html .= "<a href='" . drstk_home_url() . "item/" . $assoc_data->_source->id . "'><img src='https://repository.library.northeastern.edu" . $assoc_data->_source->fields_thumbnail_list_tesim[1] . "'/></a>";
            }
            $associated_html .= get_item_details($assoc_data, $assoc_meta_options);
        }
        // }
        $associated_html .= "</div></div>";
        echo $associated_html;
    }
}
?>
        </noscript>

				<div id="primary" class="content-area single col-md-12">
					<main id="main" class="site-main" role="main">
            <div id="drs-content" class="row">
              <div id="drs-loading"></div>
              <div id="drs-item-left" class="col-sm-6 one_half">
            		<img id="drs-item-img" src="<?php 
get_item_image();
?>
"/>
            	</div>
              <div id="drs-item-right" class="col-sm-6 last">
            		<div id="drs-item-details"><?php 
get_item_details();
?>
</div>
            	</div>
            </div><!-- #drs-content -->

					</main>
					<!-- #main -->
				</div>
				<!-- #primary -->
			</div>
			<!-- .row -->
		</div>
		<!-- .container -->
	</div>
	<!-- .quest-row -->
Exemplo n.º 4
0
				<div id="primary" class="content-area single col-md-12">
					<main id="main" class="site-main" role="main">
            <div id="drs-content" class="row">
              <div id="drs-loading"></div>
              <div id="drs-item-left" class="col-sm-6 one_half">
								<?php 
get_item_image();
?>
								<?php 
get_associated_files();
?>
            	</div>
              <div id="drs-item-right" class="col-sm-6 last">
            		<div id="drs-item-details"><?php 
echo get_item_details($data, $meta_options);
?>
</div>
								<?php 
get_download_links();
?>
            	</div>
            </div><!-- #drs-content -->

					</main>
					<!-- #main -->
				</div>
				<!-- #primary -->
			</div>
			<!-- .row -->
		</div>
Exemplo n.º 5
0
     <table id="cart_table" class="table">
         <tr>
             <th>Votre panier</th>
             <th></th>
             <th>Prix/Unité</th>
             <th class="qty">Quantité</th>
             <th></th>
         </tr>
         <?php 
 $items = $_SESSION[SESS_CART];
 //var_dump($cart);
 $total = 0;
 $nb_articles = $_SESSION[SESS_CART_TOTAL];
 foreach ($items as $item_id => $qty) {
     echo '<tr>';
     $item = get_item_details($item_id);
     $authors = get_authors($item[AUTHOR_ID]);
     $publishers = get_publishers($item[PUBLISHER_ID]);
     echo '<td><img src="', $item[ITEM_COVER], '" alt="', $item[ITEM_TITLE], '" onerror="this.src=\'images/couv/place_holder.png\'" /></td>';
     echo '<td><a href="comic_detail.php?', ITEM_ID, '=', $item[ITEM_ID], '"><span class="titre">', $item[ITEM_TITLE], '</span></a>', ' de ', $authors[0][WRITER], '<div>', $publishers[0][PUBLISHER_NAME], '</div></td>';
     echo '<td>', $item[ITEM_PRICE], '</td>';
     echo '<td class="qty">', $qty, '</td>';
     $total += $item[ITEM_PRICE] * $qty;
     echo '<td><a href="?', P_REMOVE_FROM_CART, '=', $item_id, '" >Supprimer</a></td>';
     echo '</tr>';
 }
 ?>
     </table>
     <p>Sous-total (<?php 
 echo $nb_articles;
 echo $nb_articles > 1 ? ' articles)' : ' article)';