-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.php
119 lines (99 loc) · 5.07 KB
/
search.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?php
require_once dirname(__FILE__) . '/config/config.php';
require_once dirname(__FILE__) . '/Model/SearchBuilder.php';
require_once dirname(__FILE__) . '/Model/AutoCorrection.php';
require_once dirname(__FILE__) . '/Model/DuplicateSearch.php';
require_once dirname(__FILE__) . '/Model/ConstructSearchView.php';
require_once dirname(__FILE__) . '/Model/CDESearch.php';
require_once dirname(__FILE__) . '/views/search_panel.php';
require_once dirname(__FILE__) . '/views/search/breadcrumb.php';
// Left column
require_once dirname(__FILE__) . '/views/feedback.php';
// Middle column
require_once dirname(__FILE__) . '/views/search/results.php';
require_once dirname(__FILE__) . '/views/search/switch_view.php';
require_once dirname(__FILE__) . '/views/search/pagination.php';
require_once dirname(__FILE__) . '/views/search/result_status.php';
require_once dirname(__FILE__) . '/views/search/sorting.php';
require_once dirname(__FILE__) . '/views/search/duplicate_results.php';
require_once dirname(__FILE__) . '/views/share.php';
// Right column
require_once dirname(__FILE__) . '/views/search/wordcloud.php';
require_once dirname(__FILE__) . '/views/search/partialActivities.php';
require_once dirname(__FILE__) . '/views/search/synonym.php';
require_once dirname(__FILE__) . '/views/search/search_details.php';
require_once dirname(__FILE__) . '/views/search/survey.php';
$_SESSION['synonym'] = null;
$searchBuilder = new SearchBuilder();
$searchBuilder->searchSelectedRepo();
$searchView = new ConstructSearchView($searchBuilder);
$pageTitle = $searchBuilder->getQuery();
?>
<?php include dirname(__FILE__) . '/views/header.php'; ?>
<div class="container">
<?php echo partialSearchPanel($searchBuilder); ?>
<?php echo breadcrumb($searchBuilder); ?>
<div class="row">
<!-- Filter Panel -->
<div class="col-sm-4 col-md-3">
<?php if ($searchBuilder->getSearchType() == 'data') {
?>
<iframe scrolling="no" style="width: 268px;height: 2000px; border: none;margin-bottom: 30px"
src="search-filter.php?<?php echo $_SERVER["QUERY_STRING"] ?>"></iframe>
<?php
} else {
partialFeedback();
} ?>
</div>
<!-- Search Result Panel -->
<div id="detailView"></div>
<div id="summaryView">
<div class="col-sm-8 col-md-6">
<!-- Pagination Panel -->
<?php //echo $searchBuilder->getSelectedTotalRows();?>
<?php if ($searchBuilder->getSelectedTotalRows() > 0): ?>
<?php echo partialResultsStatus($searchBuilder, $searchView); ?>
<?php echo partialSwitch($searchView); ?>
<div class="clearfix"></div>
<?php echo partialPagination($searchBuilder, $searchView); ?>
<div class="pull-right" style="margin: 10px 0 0 5px;">
<?php if ($searchBuilder->getSearchType() == 'data') : ?>
<?php partialShare($_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]); ?>
<?php endif; ?>
</div>
<div class="clearfix"></div>
<div style="margin-bottom: 10px">
<?php //echo partialSorting($searchBuilder, $searchView); ?>
</div>
<?php endif; ?>
<div class="clearfix"></div>
<!-- Search Result List -->
<?php echo partialResults($searchView); ?>
<hr>
<!-- Pagination Panel ==== */ -->
<?php if ($searchBuilder->getSelectedTotalRows() > 0): ?>
<?php echo partialResultsStatus($searchBuilder, $searchView); ?>
<div class="clearfix"></div>
<?php echo partialPagination($searchBuilder, $searchView); ?>
<?php endif; ?>
<div class="clearfix"></div>
</div>
<?php /* ###### Info Panel ###### */ ?>
<div class="col-md-3 hidden-sm">
<?php if ($searchBuilder->getSearchType() == 'data') {
?>
<iframe scrolling="no" style="width: 268px;height: 310px; border: none;margin-bottom: 30px"
src="timeline.php?<?php echo $_SERVER["QUERY_STRING"] ?>"></iframe>
<?php
} ?>
<?php echo partialWordCloud($searchBuilder); ?>
<?php echo partialActivities(); ?>
<?php echo partialSynonym($searchBuilder); ?>
<?php echo partialSearchDetails($searchBuilder); ?>
</div>
</div>
</div>
</div>
<?php /* Page Custom Scripts. */
$scripts = ["./js/wordcloud.js"];?>
<?php include dirname(__FILE__) . '/views/footer.php'; ?>