public function param($param, $skip_ajax = false, $force_url = false)
{
if ($_POST) {
if (isset($_POST['search_by_keyword'])) {
if ($param == 'keyword') {
return $_POST['search_by_keyword'];
}
}
}
$url = $this->current($skip_ajax);
if ($force_url != false) {
$url = $force_url;
}
$rem = $this->site_url();
$url = str_ireplace($rem, '', $url);
$url = str_ireplace('?', '/', $url);
$url = str_ireplace('=', ':', $url);
$url = str_ireplace('&', '/', $url);
$all_params = array();
$segs = explode('/', $url);
foreach ($segs as $segment) {
$seg1 = explode(':', $segment);
if ($param == '__MW_GET_ALL_PARAMS__') {
if (isset($seg1[0]) and isset($seg1[1])) {
$all_params[$seg1[0]] = $seg1[1];
}
} else {
$param_sub_position = false;
if (trim($seg1[0]) == trim($param)) {
if ($param_sub_position == false) {
$the_param = str_ireplace($param . ':', '', $segment);
if ($param == 'custom_fields_criteria') {
$the_param1 = $this->app->format->base64_to_array($the_param);
return $the_param1;
}
return $the_param;
} else {
$the_param = str_ireplace($param . ':', '', $segment);
$params_list = explode(',', $the_param);
if ($param == 'custom_fields_criteria') {
$the_param1 = base64_decode($the_param);
$the_param1 = unserialize($the_param1);
return $the_param1;
}
return $the_param;
}
}
}
}
if (empty($all_params)) {
return false;
}
return $all_params;
}