-
Notifications
You must be signed in to change notification settings - Fork 0
/
display-item.php
67 lines (55 loc) · 2.28 KB
/
display-item.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
require_once dirname(__FILE__) .'/config/config.php';
require_once dirname(__FILE__) . '/Model/SingleItemDisplayService.php';
require_once dirname(__FILE__) . '/views/search_panel.php';
require_once dirname(__FILE__) . '/views/display_item/result.php';
require_once dirname(__FILE__) . '/views/display_item/similar_datasets.php';
require_once dirname(__FILE__) . '/views/display_item/RelatedPublications.php';
require_once dirname(__FILE__) . '/views/display_item/PubmedGrant.php';
require_once dirname(__FILE__) . '/views/feedback.php';
require_once dirname(__FILE__) . '/config/schema_org.php';
$service = new SingleItemDisplayService();
$pageTitle = $service->getDisplayItemData()['title'][1];
//var_dump($service->getDisplayItemData());
/* Track user's activity*/
require_once dirname(__FILE__) .'/Model/DBController.php';
require_once dirname(__FILE__) . '/Model/WriteMysqlLog.php';
date_default_timezone_set('America/Chicago');
$log_date= date("Y-m-d H:i:s");
$message=$service->getRepositoryName().' : '.$service->getItemId();
$user_email=isset($_SESSION['email'])?$_SESSION['email']:null;
$objDBController = new DBController();
$dbconn=$objDBController->getConn();
$referral=@$_SERVER["HTTP_REFERER"];
write_mysql_log($dbconn,$log_date,$message,$user_email,session_id(),$referral);
/*For the go back button*/
$query = $service->getQuery();
$repo_status = 'unchecked';
$data_status = 'checked';
if (@$_SERVER["HTTP_REFERER"]) {
$backLink = $_SERVER["HTTP_REFERER"];
} else {
$backLink = "javascript:history.go(-1);";
}
?>
<?php include dirname(__FILE__) . '/views/header.php'; ?>
<div class="container">
<div class="row">
<div class="col-lg-12">
<?php echo partialSearchPanel($service); ?>
</div>
<div class="col-lg-12">
<?php include dirname(__FILE__) . '/views/breadcrumb.php'; ?>
</div>
<div class="col-lg-9">
<?php echo partialResult($service); ?>
</div>
<div class="col-lg-3">
<?php echo partialSimilarDatasets($service); ?>
<?php echo partialRelatedPublications($service); ?>
<?php echo partialGrant($service); ?>
<?php echo partialFeedback(); ?>
</div>
</div>
</div>
<?php include dirname(__FILE__) . '/views/footer.php'; ?>