dolibarr
21.0.0-beta
Main Page
Related Pages
Topics
Classes
Files
File List
File Members
dolibarr_dev
htdocs
core
search.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
3
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
4
*
5
* This file is a modified version of datepicker.php from phpBSM to fix some
6
* bugs, to add new features and to dramatically increase speed.
7
*
8
* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 3 of the License, or
11
* (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License
19
* along with this program. If not, see <https://www.gnu.org/licenses/>.
20
*/
21
27
if
(!defined(
'NOREQUIREUSER'
)) {
28
define(
'NOREQUIREUSER'
,
'1'
);
29
}
30
if
(!defined(
'NOREQUIREDB'
)) {
31
define(
'NOREQUIREDB'
,
'1'
);
32
}
33
if
(!defined(
'NOREQUIRESOC'
)) {
34
define(
'NOREQUIRESOC'
,
'1'
);
35
}
36
if
(!defined(
'NOREQUIRETRAN'
)) {
37
define(
'NOREQUIRETRAN'
,
'1'
);
38
}
39
if
(!defined(
'NOCSRFCHECK'
)) {
40
define(
'NOCSRFCHECK'
, 1);
41
}
42
if
(!defined(
'NOTOKENRENEWAL'
)) {
43
define(
'NOTOKENRENEWAL'
, 1);
44
}
45
if
(!defined(
'NOLOGIN'
)) {
46
define(
'NOLOGIN'
, 1);
47
}
48
if
(!defined(
'NOREQUIREMENU'
)) {
49
define(
'NOREQUIREMENU'
, 1);
50
}
51
52
require_once
'../main.inc.php'
;
62
/*
63
* Actions
64
*/
65
66
if
(
GETPOST
(
'search_proposal'
) !=
''
) {
67
header(
"Location: "
.DOL_URL_ROOT.
'/comm/propal/list.php?sall='
.urlencode(
GETPOST
(
'search_proposal'
)));
68
exit;
69
}
70
if
(
GETPOST
(
'search_customer_order'
) !=
''
) {
71
header(
"Location: "
.DOL_URL_ROOT.
'/commande/list.php?sall='
.urlencode(
GETPOST
(
'search_customer_order'
)));
72
exit;
73
}
74
if
(
GETPOST
(
'search_supplier_order'
) !=
''
) {
75
header(
"Location: "
.DOL_URL_ROOT.
'/fourn/commande/list.php?search_all='
.urlencode(
GETPOST
(
'search_supplier_order'
)));
76
exit;
77
}
78
if
(
GETPOST
(
'search_intervention'
) !=
''
) {
79
header(
"Location: "
.DOL_URL_ROOT.
'/fichinter/list.php?sall='
.urlencode(
GETPOST
(
'search_intervention'
)));
80
exit;
81
}
82
if
(
GETPOST
(
'search_contract'
) !=
''
) {
83
header(
"Location: "
.DOL_URL_ROOT.
'/contrat/list.php?sall='
.urlencode(
GETPOST
(
'search_contract'
)));
84
exit;
85
}
86
if
(
GETPOST
(
'search_invoice'
) !=
''
) {
87
header(
"Location: "
.DOL_URL_ROOT.
'/compta/facture/list.php?sall='
.urlencode(
GETPOST
(
'search_invoice'
)));
88
exit;
89
}
90
if
(
GETPOST
(
'search_supplier_invoice'
) !=
''
) {
91
header(
"Location: "
.DOL_URL_ROOT.
'/fourn/facture/list.php?sall='
.urlencode(
GETPOST
(
'search_supplier_invoice'
)));
92
exit;
93
}
94
if
(
GETPOST
(
'search_supplier_proposal'
) !=
''
) {
95
header(
"Location: "
.DOL_URL_ROOT.
'/supplier_proposal/list.php?sall='
.urlencode(
GETPOST
(
'search_supplier_proposal'
)));
96
exit;
97
}
98
if
(
GETPOST
(
'search_donation'
) !=
''
) {
99
header(
"Location: "
.DOL_URL_ROOT.
'/don/list.php?sall='
.urlencode(
GETPOST
(
'search_donation'
)));
100
exit;
101
}
102
if
(
GETPOST
(
'search_product'
) !=
''
) {
103
header(
"Location: "
.DOL_URL_ROOT.
'/product/list.php?sall='
.urlencode(
GETPOST
(
'search_product'
)));
104
exit;
105
}
106
if
(
GETPOST
(
'search_thirdparty'
) !=
''
) {
107
header(
"Location: "
.DOL_URL_ROOT.
'/societe/list.php?mode=search&sall='
.urlencode(
GETPOST
(
'search_thirdparty'
)));
108
exit;
109
}
110
if
(
GETPOST
(
'search_contact'
) !=
''
) {
111
header(
"Location: "
.DOL_URL_ROOT.
'/contact/list.php?mode=search&sall='
.urlencode(
GETPOST
(
'search_contact'
)));
112
exit;
113
}
114
if
(
GETPOST
(
'search_deplacement'
) !=
''
) {
115
header(
"Location: "
.DOL_URL_ROOT.
'/compta/deplacement/list.php?mode=search&sall='
.urlencode(
GETPOST
(
'search_deplacement'
)));
116
exit;
117
}
118
if
(
GETPOST
(
'search_expensereport'
) !=
''
) {
119
header(
"Location: "
.DOL_URL_ROOT.
'/expensereport/list.php?mode=search&sall='
.urlencode(
GETPOST
(
'search_expensereport'
)));
120
exit;
121
}
122
if
(
GETPOST
(
'search_holiday'
) !=
''
) {
123
header(
"Location: "
.DOL_URL_ROOT.
'/holiday/list.php?mode=search&sall='
.urlencode(
GETPOST
(
'search_holiday'
)));
124
exit;
125
}
126
if
(
GETPOST
(
'search_member'
) !=
''
) {
127
header(
"Location: "
.DOL_URL_ROOT.
'/adherents/list.php?mode=search&sall='
.urlencode(
GETPOST
(
'search_member'
)));
128
exit;
129
}
130
if
(
GETPOST
(
'search_project'
) !=
''
) {
131
header(
"Location: "
.DOL_URL_ROOT.
'/projet/list.php?mode=search&search_all='
.urlencode(
GETPOST
(
'search_project'
)));
132
exit;
133
}
134
if
(
GETPOST
(
'search_task'
) !=
''
) {
135
header(
"Location: "
.DOL_URL_ROOT.
'/projet/tasks/list.php?mode=search&search_all='
.urlencode(
GETPOST
(
'search_task'
)));
136
exit;
137
}
138
139
if
(
GETPOST
(
'search_user'
) !=
''
) {
140
header(
"Location: "
.DOL_URL_ROOT.
'/user/list.php?search_all='
.urlencode(
GETPOST
(
'search_user'
)));
141
exit;
142
}
143
if
(
GETPOST
(
'search_group'
) !=
''
) {
144
header(
"Location: "
.DOL_URL_ROOT.
'/user/group/list.php?search_all='
.urlencode(
GETPOST
(
'search_group'
)));
145
exit;
146
}
147
148
149
150
// If we are here, search was called with no supported criteria
151
if
(!empty($_SERVER[
'HTTP_REFERER'
])) {
152
header(
"Location: "
.$_SERVER[
'HTTP_REFERER'
]);
153
exit;
154
}
else
{
155
print
'The wrapper search.php was called without any search criteria'
;
156
}
GETPOST
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Definition
functions.lib.php:792
Generated on Sun Dec 1 2024 01:00:29 for
dolibarr
by Doxygen 1.11.0