function func_fx_is_allowed_operate_as_user_mode($identifiers) { global $active_modules, $sql_tbl; $is_fstaff = $login = 0; if (!empty($identifiers['A'])) $login = $identifiers['A']['login']; elseif (!empty($identifiers['P']) && !empty($active_modules['Simple_Mode'])) $login = $identifiers['P']['login']; if (!empty($login)) $is_fstaff = func_query_first_cell("SELECT COUNT(login) FROM $sql_tbl[customers] INNER JOIN $sql_tbl[memberships] USING (membershipid) WHERE login='$login' AND $sql_tbl[memberships].flag='FS'"); return !empty($login) && empty($is_fstaff); } function func_fx_get_secure_random_key($count) { //{{{ global $xcart_dir; $count = $count < 1 ? 1 : $count; $output = ''; if (function_exists('openssl_random_pseudo_bytes')) { $output = openssl_random_pseudo_bytes($count, $crypto_strong); if (!$crypto_strong) { $output = ''; } } if ( strlen($output) != $count && is_readable('/dev/urandom') && ($fh = @fopen('/dev/urandom', 'rb')) ) { $output = fread($fh, $count); fclose($fh); } if ( strlen($output) != $count && function_exists('mcrypt_create_iv') ) { $output = mcrypt_create_iv($count, MCRYPT_DEV_URANDOM); } if (strlen($output) != $count) { $output = ''; $random_state = microtime(); if (function_exists('getmypid')) $random_state .= getmypid(); for ($i = 0; $i < $count; $i += 16) { $random_state = md5(microtime() . $random_state); $output .= pack('H*', md5($random_state)); } $output = substr($output, 0, $count); } $ascii_str = substr(base64_encode($output), 0, $count); $base64url_safe = strtr($ascii_str, '+/=', '-_,'); return $base64url_safe; } // }}} The shop is closed
 

Sorry, the shop is inaccessible temporarily. Please try again later.