$end) { $tmp = $end; $end = $begin; $begin = $tmp; } switch($view) { case 3: $view = "WHERE MATCH (act,description,author,award) AGAINST ('$text')"; break; case 2: $view = "WHERE year(date) >= $begin and year(date) <= $end"; break; default: $view = ""; break; } echo "
Реестр интеллектуальной собственности ГНЦ РФ - ИМБП РАН
"; switch($tbl) { case 4: echo "

Свидетельства"; $sql_query = "SELECT *FROM certificates $view ORDER BY act $sort"; break; case 3: echo "

Зарубежные патенты"; $sql_query = "SELECT *FROM foreign_patents $view ORDER BY act $sort"; break; case 2: echo "

Полезные модели"; $sql_query = "SELECT *FROM models $view ORDER BY act $sort"; break; default: echo "

Изобретения"; $sql_query = "SELECT *FROM inventions $view ORDER BY act $sort"; break; } echo "

"; if(!$result = mysql_query($sql_query, $link)) { echo "Запрос к базе данных $sql_query не обработан."; exit(); } if(($num_rows = mysql_num_rows($result)) == 0) { echo "По текущему запросу база данных не содержит записей."; exit(); } echo ""; if($tbl !=4) { $doc = "Патент"; } else { $doc = "Свидетельство";} while($list = mysql_fetch_row($result)) { $txt = null; if($list[4] != null) { $txt = "
Награды: " . str_replace(';', '; ', $list[4]) . ""; } echo "\n\n "; } echo "\n
$doc: №$list[0]   Дата приоритета: $list[1]

Название: $list[2]


Авторы: $list[3]
$txt
"; mysql_free_result($result); mysql_close($link); ?>