$_str = parsing_tpl($name_file, $mass_element_for_parsing, $mass_result_for_parsing, $_str); } else { $_str = get_content('soobshhenie_dlja_nepartnera'); } break; case 'redaktirovanie_dannyx_o_nomere': // если нет сессии if (!isset($_SESSION['id_pansionat'])) { $_str .= 'Доступ запрещен!'; break; } f_mysql_connect(); // подключаем класс require_once HOST . "/classes/pansionat.class.php"; // класс пансионата $pansionat = new Pansionat(); // ищем $_all_data = $pansionat->Get_All_Data_Nomer($_GET['id']); if (isset($_SESSION['status']) and $_SESSION['status'] == 1 and $_SESSION['id_pansionat'] == $_all_data['id_pansionat']) { $_str .= get_content('redaktirovat_nomer'); // елементы для замены $mass_element_for_parsing = array("%wc%", "%shower%", "%cost_place_nomer%", "%photos%", "%img%", "%id_nomer%", "%cost_may%", "%cost_june%", "%cost_july%", "%cost_august%", "%cost_september%", "%description%", "%type%", "%tv%", "%without_food%", "%refrigerator%", "%conditioner%"); // определяем есть ли первая фото $_img_01 = ''; $name_file = $_GET['id'] . "_1.jpg"; if (file_exists(HOST . '/images/nomera/__' . $name_file)) { $_img_01 = '<img src="/images/nomera/__' . $name_file . '">'; $_img_01 .= "<a href='/forms/name/deletephotonomer/namefile/" . $name_file . "/id/" . $_GET['id'] . "' border=0><img src='/image/del.gif' border=0 alt='Удалить' onClick = 'return ConfirmButton_onClick()'></a>"; } // определяем кол-во фото $_photos = $name_file = '';
function ___selecct2($_sql, $name_select, $empty, $default, $pole_for_return, $pole_for_value, $_style, $_d_value = '') { f_mysql_connect(); //echo $_sql.'<br>'; $result = mysql_db_query($GLOBALS["dbname"], $_sql); $_res = '<select name="' . $name_select . '" ' . $_style . '>'; if ($empty == 1) { $_res .= '<option value="">' . $_d_value . '</option>'; } for ($i = 0; $i < mysql_numrows($result); $i++) { $find = mysql_fetch_array($result); // класс пансионата $pansionat = new Pansionat(); // ищем $_kurort = $pansionat->Get_Kurort($find['id']); $_res .= '<option value="' . $find[$pole_for_value] . '"'; if ($find['id'] == $default) { $_res .= ' selected'; } $_res .= '>' . $find[$pole_for_return] . ' (' . $_kurort . ')</option>'; } $_res .= '</select>'; return $_res; }