function mso_parse_ini_values($values = '') { if (!$values) { return array(); } $values = _mso_ini_check_php(stripslashes(htmlspecialchars(trim($values)))); $values = explode('#', $values); // все значения разделены # $out = array(); if ($values) { foreach ($values as $val) { // $val может быть с || val - текст $val = trim($val); $val_t = $val; $ar = explode('||', $val); if (isset($ar[0])) { $val = trim($ar[0]); } if (isset($ar[1])) { $val_t = trim($ar[1]); } $out[$val] = $val_t; } } return $out; }
$values = _mso_ini_check_php(stripslashes(htmlspecialchars(trim($row['values'])))); } if (!isset($row['description'])) { $description = ''; } else { $description = _mso_ini_check_php(stripslashes(trim(t($row['description'])))); } if (!isset($row['delimer'])) { $delimer = '<br>'; } else { $delimer = stripslashes($row['delimer']); } if (!isset($row['default'])) { $default = ''; } else { $default = _mso_ini_check_php(stripslashes(htmlspecialchars(trim($row['default'])))); } $options_present = true; // признак, что опция есть в базе // получаем текущее значение if (isset($page_all_meta[$options_key])) { foreach ($page_all_meta[$options_key] as $val) { $value = htmlspecialchars($val); } } else { $options_present = false; $value = $default; // нет значание, поэтому берем дефолт } $f = NR; $name_f = 'f_options[' . $options_key . ']';