/var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/trx_utils/includes
Edit: /var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/trx_utils/includes/plugin.html.php (6101B)
0) {
$separator = strpos($url, '?')===false ? '?' : '&';
foreach ($prm as $k=>$v) {
$url .= $separator . urlencode($k) . '=' . urlencode($v);
$separator = '&';
}
}
return $url;
}
}
// Set e-mail content type
// Call add_filter( 'wp_mail_content_type', 'trx_utils_set_html_content_type' ) before send mail
// and remove_filter( 'wp_mail_content_type', 'trx_utils_set_html_content_type' ) after send mail
if (!function_exists('trx_utils_set_html_content_type')) {
function trx_utils_set_html_content_type() {
return 'text/html';
}
}
/* GET, POST and SESSION utilities
-------------------------------------------------------------------------------- */
// Return GET or POST value
if (!function_exists('trx_utils_get_value_gp')) {
function trx_utils_get_value_gp($name, $defa='') {
$rez = $defa;
$magic = function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc() == 1;
if (isset($_GET[$name])) {
$rez = $magic ? stripslashes(trim($_GET[$name])) : trim($_GET[$name]);
} else if (isset($_POST[$name])) {
$rez = $magic ? stripslashes(trim($_POST[$name])) : trim($_POST[$name]);
}
return $rez;
}
}
// Return GET or POST or COOKIE value
if (!function_exists('trx_utils_get_value_gpc')) {
function trx_utils_get_value_gpc($name, $defa='') {
$rez = $defa;
$magic = function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc() == 1;
if (isset($_GET[$name])) {
$rez = $magic ? stripslashes(trim($_GET[$name])) : trim($_GET[$name]);
} else if (isset($_POST[$name])) {
$rez = $magic ? stripslashes(trim($_POST[$name])) : trim($_POST[$name]);
} else if (isset($_COOKIE[$name])) {
$rez = $magic ? stripslashes(trim($_COOKIE[$name])) : trim($_COOKIE[$name]);
}
return $rez;
}
}
// Get GET, POST, SESSION value and save it (if need)
if (!function_exists('trx_utils_get_value_gps')) {
function trx_utils_get_value_gps($name, $defa='') {
$rez = $defa;
if (isset($_GET[$name])) {
$rez = stripslashes(trim($_GET[$name]));
} else if (isset($_POST[$name])) {
$rez = stripslashes(trim($_POST[$name]));
} else if (isset($_SESSION[$name])) {
$rez = stripslashes(trim($_SESSION[$name]));
}
return $rez;
}
}
// Save value into session
if (!function_exists('trx_utils_set_session_value')) {
function trx_utils_set_session_value($name, $value) {
if (!session_id()) session_start();
$_SESSION[$name] = $value;
}
}
// Delete value from session
if (!function_exists('trx_utils_del_session_value')) {
function trx_utils_del_session_value($name) {
if (!session_id()) session_start();
unset($_SESSION[$name]);
}
}
// Show content with the html layout (if not empty)
if ( !function_exists('trx_utils_show_layout') ) {
function trx_utils_show_layout($str, $before='', $after='') {
if (!empty($str)) {
printf("%s%s%s", $before, $str, $after);
}
}
}
// Get theme variable
if (!function_exists('trx_utils_storage_get')) {
function trx_utils_storage_get($var_name, $default='') {
global $TRX_UTILS_STORAGE;
return isset($TRX_UTILS_STORAGE[$var_name]) ? $TRX_UTILS_STORAGE[$var_name] : $default;
}
}
/* Browser-specific classes
------------------------------------------------------------------------------------- */
// Add browser-specific classes to the body tag
if ( !function_exists('trx_utils_browser_classes') ) {
add_filter( 'body_class', 'trx_utils_browser_classes' );
function trx_utils_browser_classes( $classes ) {
// WordPress global vars
global $is_lynx, $is_gecko, $is_opera, $is_NS4, $is_safari, $is_chrome,
$is_IE, $is_winIE, $is_macIE, $is_edge,
$is_iphone,
$is_apache, $is_nginx, $is_IIS, $is_iis7;
// Platform
if (!empty($is_iphone))
$classes[] = 'ua_iphone';
if (wp_is_mobile())
$classes[] = 'ua_mobile';
// Browser
if (!empty($is_gecko))
$classes[] = 'ua_gecko';
if (!empty($is_chrome)) {
$classes[] = 'ua_chrome';
if (preg_match("/[\\s]OPR\\/([0-9.]*)/", $_SERVER['HTTP_USER_AGENT'], $matches)) {
if (!empty($matches[1]))
$classes[] = 'ua_opera ua_opera_webkit';
}
}
if (preg_match("/(iPad|iPhone|iPod)/", $_SERVER['HTTP_USER_AGENT'], $matches)) {
if (!empty($matches[1]))
$classes[] = 'ua_ios';
}
if (!empty($is_safari))
$classes[] = 'ua_safari';
if (!empty($is_opera))
$classes[] = 'ua_opera';
if (!empty($is_edge))
$classes[] = 'ua_edge';
if (!empty($is_IE)) {
$classes[] = 'ua_ie';
if (!empty($is_winIE)) $classes[] = 'ua_ie_win';
else if (!empty($is_macIE)) $classes[] = 'ua_ie_mac';
if (preg_match("/Trident[^;]*;[\\s]*rv:([0-9.]*)/", $_SERVER['HTTP_USER_AGENT'], $matches)
||
preg_match("/MSIE[\\s]*([0-9.]*)/", $_SERVER['HTTP_USER_AGENT'], $matches)) {
if (!empty($matches[1])) {
$classes[] = 'ua_ie_' . (int)$matches[1];
if ((int)$matches[1] < 11)
$classes[] = 'ua_ie_lt11';
}
}
}
if (!empty($is_NS4))
$classes[] = 'ua_ns4';
if (!empty($is_lynx))
$classes[] = 'ua_lynx';
return $classes;
}
}
?>