F.A.Q.
'; $res = pg_query("SELECT faq_cat.id_faq_cat, name FROM faq_cat WHERE id_parent=0 AND id_lang=$id_lang ORDER BY pos ASC"); $kol_zapros++; while($my = pg_fetch_array($res)) { $root_menu .= ''; } $root_menu .= ''; $connect_str = "host=$c_host user=$c_user2 password=$c_password2 dbname=$c_dbname2 port=$c_port2"; if (isset($_GET['ds_id'])) { $_GET['ds_id'] = Del_hacks($_GET['ds_id'], 'int'); $link2 = pg_connect ($connect_str); pg_set_client_encoding($link2, UTF8); $q = pg_query($link2, "SELECT ds_file, ds_filename FROM description_files WHERE ds_id='".pg_escape_string($_GET['ds_id'])."'"); if($q) { $r = pg_fetch_array($q); header('Content-type: application/octet-stream'); header('Content-Disposition: attachment; filename="'.$r['ds_filename'].'"'); echo pg_unescape_bytea($r['ds_file']); die(); } else{ die("Server error\n
Query failed\n
\n
".pg_last_error()); } } else if (isset($_GET['h_id'])) { $_GET['city_id'] = Del_hacks($_GET['city_id'], 'int'); $_GET['isp_id'] = Del_hacks($_GET['isp_id'], 'int'); $_GET['h_id'] = Del_hacks($_GET['h_id'], 'int'); $main .= $root_menu; $main .= '
Параметры настройки оборудования
ГородПровайдеры 

'; $res3 = pg_query($link2, "SELECT m_id, ds_id, h_comment FROM helps WHERE h_id=$_GET[h_id]"); $ds_id = pg_fetch_result($res3,0,'ds_id'); $main .= 'Модель: '.pg_fetch_result(pg_query($link2, "SELECT m_name FROM models WHERE m_id=".pg_fetch_result($res3,0,'m_id')),0,'m_name').'
'; $res4 = pg_query($link2, "SELECT ds_id, ds_comment FROM description_files WHERE h_id=$_GET[h_id]"); if (pg_num_rows($res4) > 0) { while($my = pg_fetch_array($res4)) { $main .= 'Файл: '.$my['ds_comment'].'
'; } } /* if (!empty($ds_id)) { $res4 = pg_query($link2, "SELECT ds_id, ds_comment FROM description_files WHERE ds_id=$ds_id"); if (pg_num_rows($res4) > 0) $main .= 'Файл: '.@pg_fetch_result($res4,0,'ds_comment').'
'; } */ $main .= nl2br(pg_fetch_result($res3,0,'h_comment')).'
'; $main .='
'; } else if (isset($_GET['isp_id'])) { $_GET['isp_id'] = Del_hacks($_GET['isp_id'], 'int'); $_GET['city_id'] = Del_hacks($_GET['city_id'], 'int'); $main .= $root_menu; $main .= '
Параметры настройки оборудования
Город Провайдеры

'; $res3 = pg_query($link2, "SELECT h_id, h_name FROM helps WHERE isp_id=$_GET[isp_id]"); if (pg_num_rows($res3) > 0) { $main .= 'Инструкции:
'; while($my = pg_fetch_array($res3)) { $main .= ''.$my['h_name'].'
'; } } $main .='
'; } else if (isset($_GET['city_id'])) { $_GET['city_id'] = Del_hacks($_GET['city_id'], 'int'); $main .= $root_menu; $main .= '
Параметры настройки оборудования
Город Провайдеры
'; } else { $main .= $root_menu; $main .='
Параметры настройки оборудования
Город 
'; } $change_lang = ($_GET['prefix']=='ru') ? 'English' : 'Русский'; include("temp.html.php"); ?>