Преглед изворни кода

Tidied index.php and added iframe for displaying PDF pages

main
Simon Bowie пре 3 година
родитељ
комит
18c75d7a73
3 измењених фајлова са 59 додато и 65 уклоњено
  1. +6
    -1
      site/ops_api.php
  2. +53
    -60
      site/public/index.php
  3. +0
    -4
      site/public/ops_image.php

+ 6
- 1
site/ops_api.php Прегледај датотеку

@@ -42,7 +42,7 @@ function get_publication_details($document_reference) {
$access_token = get_access_token();

// OPS API credentials (details at http://documents.epo.org/projects/babylon/eponet.nsf/0/F3ECDCC915C9BCD8C1258060003AA712/$File/ops_v3.2_documentation_-_version_1.3.16_en.pdf)
$ops_url = $_ENV["OPS_URL"] . 'rest-services/published-data/publication/epodoc/' . $document_reference . '/biblio,full-cycle';
$ops_url = $_ENV["OPS_URL"] . 'rest-services/published-data/publication/epodoc/' . $document_reference . '/biblio';

// Set up API call
$ch = curl_init();
@@ -56,7 +56,12 @@ function get_publication_details($document_reference) {

if (strpos($response,"No results found") === false ) {
$xml = new SimpleXMLElement($response);

print_r($response);
//var_dump($xml->{'exchange-documents'}->{'exchange-document'}->{'bibliographic-data'}->{'invention-title'}['lang']);
//print_r($xml->xpath('//*'));
//print_r($xml);

}

}

+ 53
- 60
site/public/index.php Прегледај датотеку

@@ -14,92 +14,85 @@ $random_record = random_record();

?>

Application ID:
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>

<?php

echo $random_record['application_id'];

?>

<br><br>

EPO publication:
Application ID:

<a href=<?php echo $random_record['epo_publication_url']; ?>>
<?php

echo $random_record['epo_publication_url'];

echo $random_record['application_id'];
?>
</a>

<br><br>

IPC publication:
<br><br>

<a href=<?php echo $random_record['ipc_publication_url']; ?>>
<?php

echo $random_record['ipc_publication_url'];
EPO publication:

?>
</a>
<a href=<?php echo $random_record['epo_publication_url']; ?>>
<?php
echo $random_record['epo_publication_url'];
?>
</a>

<br><br>
<br><br>

Title:
IPC publication:

<?php
<a href=<?php echo $random_record['ipc_publication_url']; ?>>
<?php
echo $random_record['ipc_publication_url'];
?>
</a>

echo $random_record['title'];
<br><br>

?>
Title:

<br><br>
<?php
echo $random_record['title'];
?>

<?php
<br><br>

<?php
if ($random_record['abstract']):
?>

?>

Abstract:

<?php

echo $random_record['abstract'];
Abstract:

?>
<?php
echo $random_record['abstract'];
?>

<br><br>
<br><br>

<?
<?
endif;
?>

<?php

if (get_publication_details($random_record['doc_ref'])):

?>
?>

<br><br>
<?php
if (get_publication_details($random_record['doc_ref'])):
?>

<?php
endif;
?>
<br><br>

<?php
<?php
endif;
?>

if (check_for_images($random_record['doc_ref'])):
<?php
if (check_for_images($random_record['doc_ref'])):
?>

?>
<iframe src="./ops_image.php?doc_ref=<?php echo $random_record['doc_ref'] ?>" width="100%" height="500px">
</iframe>

<a href="./ops_image.php?doc_ref=<?php echo $random_record['doc_ref'] ?>">Click here for image</a>
<br><br>

<br><br>
<?php
endif;
?>

<?php
endif;
?>
</body>

+ 0
- 4
site/public/ops_image.php Прегледај датотеку

@@ -6,10 +6,6 @@
# @license: The MIT License <https://opensource.org/licenses/MIT>
# @author: Simon Bowie <ad7588@coventry.ac.uk>
# @purpose: Display images from OPS API image service
# @acknowledgements:
# OPS documented at https://www.epo.org/searching-for-patents/data/web-services/ops.html
# OPS RESTful API specification at http://documents.epo.org/projects/babylon/eponet.nsf/0/F3ECDCC915C9BCD8C1258060003AA712/$File/ops_v3.2_documentation_-_version_1.3.16_en.pdf
# OPS API functions list at https://developers.epo.org/ops-v3-2/apis

include '../ops_api.php';


Loading…
Откажи
Сачувај