This repository has been archived by the owner on Jul 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsearch.php
106 lines (100 loc) · 3.5 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
<?php
$hideContextMenu = true;
global $s;
if (!empty($_GET['search_class_name'])) {
$class_names = $_GET['search_class_name'];
} else if (!empty($_GET['class_name'])) {
$class_names = $_GET['class_name'];
} else {
$class_names[] = 'path';
include_once("includes/functions/loader.inc");
$path = new path();
$all_search_paths = $path->findAll_searchPaths();
$search_result_statement = "";
$search_result_statement .= "<table class=\"table normal\"><thead><tr>";
$search_result_statement .= '<th> Module </th>';
$search_result_statement .= '<th> Search Details </th>';
$search_result_statement .='</tr></thead>';
If (!empty($all_search_paths)) {
$search_result_statement .= '<tbody>';
foreach ($all_search_paths as $key => $module_group) {
$search_result_statement .= ' <tr class="major_row"><td>' . $key . '</td><td><table class="second">';
foreach ($module_group as $paths) {
$search_result_statement .='<tr class="minor_row">';
$search_result_statement .='<td>' . $paths->name . '</td>';
$search_result_statement .='<td>' . $paths->description . '</td>';
$search_result_statement .='<td><a href="' . HOME_URL . $paths->path_link . '">' . HOME_URL . $paths->path_link . '</a></td>';
$search_result_statement .='</tr>';
}
$search_result_statement .='</table></td></tr>';
}
$search_result_statement .='</tbody>';
}
$search_result_statement .='</table>';
require_once(INC_BASICS . DS . "search_page.inc");
return;
}
if (!empty($class_names)) {
include_once("includes/functions/loader.inc");
if (empty($access_level) || ($access_level < 2 )) {
echo '<div><div id="structure">'. access_denied(). '</div></div>';
return;
}
//pre populate
if (method_exists($$class, 'search_pre_populate')) {
$ppl = call_user_func(array($$class, 'search_pre_populate'));
if (!empty($ppl)) {
foreach ($ppl as $search_key => $search_val) {
$_GET[$search_key] = $search_val;
}
}
}
// $search_form = search::x_search_form($class, 'search', 'main_search', $option_list);
// $search = new search();
if (property_exists($$class, 'option_lists')) {
$s->option_lists = $$class->option_lists;
}
if (!empty($_GET['search_order_by'][0])) {
$s->setProperty('_search_order_by', $_GET['search_order_by'][0]);
}
if (!empty($_GET['search_asc_desc'][0])) {
$s->setProperty('_search_asc_desc', $_GET['search_asc_desc'][0]);
}
if (!empty($_GET['per_page'][0])) {
$s->setProperty('_per_page', $_GET['per_page'][0]);
}
$s->setProperty('_searching_class', $class);
if (!empty($existing_search)) {
foreach ($existing_search as $sk => $sv) {
if (!in_array($sv, $$class->initial_search)) {
array_push($$class->initial_search, $sv);
}
}
}
$s->setProperty('_initial_search_array', $$class->initial_search);
if (property_exists($$class, 'search_groupBy')) {
$s->setProperty('_group_by', $$class->search_groupBy);
}
if (property_exists($$class, 'search_functions')) {
$s->setProperty('_search_functions', $$class->search_functions);
}
$search_form = $s->search_form($$class);
// if ($continue) {
// include_once(THEME_DIR . '/header.inc');
// } else {
// $continue = false;
// echo "<h2>Could n't call the header</h2>";
// return;
// }
// require_once(INC_BASICS . DS . "search_page.inc");
include_once(THEME_DIR . '/search_page.inc');
}
?>
<script type="text/javascript">
$(document).ready(function () {
// $.getScript("includes/js/erp.js");
if (!$("link[href='includes/ecss/search.css']").length) {
$('<link href="includes/ecss/search.css" rel="stylesheet">').appendTo("head");
}
});
</script>