![]() $unit_info = (isset($user->lang])) ? $user->lang] : $unit_info $unit_info = $si_identifier įor ($i = 0 $i lang])) ? $user->lang] : $unit_info If (!empty($allowed_units) & $si_identifier != 'b' & !in_array($si_identifier, $allowed_units)) * mixed data array if $string_only is falseįunction get_formatted_filesize($value, $string_only = true, $allowed_units = false)įoreach ($available_units as $si_identifier => $unit_info) * array $allowed_units only allow these units (data array indexes) * bool $string_only true if language string should be returned What follows uses the fact that getdate() and getdate() interprets timestamps in local time. ![]() * array Returns an associative array of information related to the timestamp. * Wrapper for getdate() which returns the equivalent array for UTC timestamps. If ($dss_seeded != true & ($config $max) ? mt_rand($max, $min) : mt_rand($min, $max) Remove Z and Y from the base_convert(), replace 0 with Z and O with Y * We remove 0 and O so users cannot confuse those in passwords etc.įunction gen_rand_string_friendly($num_chars = 8) * Generates a user-friendly alphanumeric random string of given length Return substr(strtoupper(base_convert(unique_id(), 16, 36)), 0, $num_chars) * Generates an alphanumeric random string of given length ![]() MySQL, SQlite, mssql, mssql_odbc, oracle $sql_update = 'CAST(CAST(config_value::text as DECIMAL(255, 0)) + '. Need to cast to text first for PostgreSQL 7.x $sql_update = 'CAST(CAST(config_value as DECIMAL(18, 0)) + '. * Set dynamic config value with arithmetic operation.įunction set_config_count($config_name, $increment, $is_dynamic = false) If (!$db->sql_affectedrows() & !isset($config)) Creates missing config entry.įunction set_config($config_name, $config_value, $is_dynamic = false) Set_var($var, $_v, $sub_type, $multibyte) Set_var($_k, $_k, $sub_key_type, $multibyte)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |