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