|
|
@@ -103,33 +103,33 @@ if (empty($sql)) { |
|
|
|
if (isset(${'start'.$var}) && trim(${'start'.$var}) != '') {
|
|
|
|
${'start'.$var} = trim(${'start'.$var});
|
|
|
|
${'start'.$var} = intval(${'start'.$var});
|
|
|
|
$where .= " AND addon.$var>${'start' .$var} ";
|
|
|
|
$where .= " AND addon.$var>{${'start' .$var}} ";
|
|
|
|
}
|
|
|
|
if (isset(${'end'.$var}) && trim(${'end'.$var}) != '') {
|
|
|
|
${'end'.$var} = trim(${'end'.$var});
|
|
|
|
${'end'.$var} = intval(${'end'.$var});
|
|
|
|
$where .= " AND addon.$var<${'end' .$var} ";
|
|
|
|
$where .= " AND addon.$var<{${'end' .$var}} ";
|
|
|
|
}
|
|
|
|
} elseif (in_array($type, $textarr)) {
|
|
|
|
if (isset(${$var}) && trim(${$var}) != '') {
|
|
|
|
${$var} = stripslashes(${$var});
|
|
|
|
${$var} = preg_replace("#[\|\"\r\n\t%\*\?\(\)\$;,'%<>]#", "", trim(${$var}));
|
|
|
|
${$var} = addslashes(${$var});
|
|
|
|
$where .= " AND addon.$var LIKE '%${$var}%'";
|
|
|
|
$where .= " AND addon.$var LIKE '%{${$var}}%'";
|
|
|
|
}
|
|
|
|
} elseif ($type == 'select') {
|
|
|
|
${$var} = stripslashes(${$var});
|
|
|
|
${$var} = preg_replace("#[\|\"\r\n\t%\*\?\(\)\$;,'%<>]#", "", trim(${$var}));
|
|
|
|
${$var} = addslashes(${$var});
|
|
|
|
if (${$var} != '') {
|
|
|
|
$where .= " AND addon.$var LIKE '${$var}'";
|
|
|
|
$where .= " AND addon.$var LIKE '{${$var}}'";
|
|
|
|
}
|
|
|
|
} elseif ($type == 'radio') {
|
|
|
|
${$var} = stripslashes(${$var});
|
|
|
|
${$var} = preg_replace("#[\|\"\r\n\t%\*\?\(\)\$;,'%<>]#", "", trim(${$var}));
|
|
|
|
${$var} = addslashes(${$var});
|
|
|
|
if (${$var} != '') {
|
|
|
|
$where .= " AND addon.$var LIKE '${$var}'";
|
|
|
|
$where .= " AND addon.$var LIKE '{${$var}}'";
|
|
|
|
}
|
|
|
|
} elseif ($type == 'checkbox') {
|
|
|
|
if (is_array(${$var}) && !empty(${$var})) {
|
|
|
|