<div id="div_12">
<table style="width:100%;"><tr><td class="sm rgt" style="padding:5px;width:200px;">
<p class="bld">Разделы</p>

<p>
<?php
echo "<a href='javascript:document.getElementById(" . chr(34) . "fchangedirect" . chr(34) . ").setAttribute(" . chr(34) . "action" . chr(34) . ", " . chr(34) . "/news.php";
if (isset($_GET['tag']) and ($_GET['tag']==0)){echo  chr(34) . ");document.getElementById(" . chr(34) . "fchangedirect" . chr(34) . ").submit();'>";}else{echo "?tag=0" . chr(34) . ");document.getElementById(" . chr(34) . "fchangedirect" . chr(34) . ").submit();'>";}
if (isset($_GET['tag']) and ($_GET['tag']==0)){echo "<span class='div_big'>";}
echo "Основные";
if (isset($_GET['tag']) and ($_GET['tag']==0)){echo "</span>";}
echo "</a> ";
?>
 <span class="bld">[</span> <?php echo mysql_num_rows(mysql_query("select jobid from obd_10 where word2 = 0")); ?> <span class="bld">]</span><br />
 
 <?php
echo "<a href='javascript:document.getElementById(" . chr(34) . "fchangedirect" . chr(34) . ").setAttribute(" . chr(34) . "action" . chr(34) . ", " . chr(34) . "/news.php";
if (isset($_GET['tag']) and ($_GET['tag']==11)){echo  chr(34) . ");document.getElementById(" . chr(34) . "fchangedirect" . chr(34) . ").submit();'>";}else{echo "?tag=11" . chr(34) . ");document.getElementById(" . chr(34) . "fchangedirect" . chr(34) . ").submit();'>";}
if (isset($_GET['tag']) and ($_GET['tag']==11)){echo "<span class='div_big'>";}
echo "Крупинки";
if (isset($_GET['tag']) and ($_GET['tag']==11)){echo "</span>";}
echo "</a> ";
?>
 <span class="bld">[</span> <?php echo mysql_num_rows(mysql_query("select jobid from obd_10 where word2 = 11")); ?> <span class="bld">]</span><br />
 
  <?php
echo "<a href='javascript:document.getElementById(" . chr(34) . "fchangedirect" . chr(34) . ").setAttribute(" . chr(34) . "action" . chr(34) . ", " . chr(34) . "/news.php";
if (isset($_GET['tag']) and ($_GET['tag']==17)){echo  chr(34) . ");document.getElementById(" . chr(34) . "fchangedirect" . chr(34) . ").submit();'>";}else{echo "?tag=17" . chr(34) . ");document.getElementById(" . chr(34) . "fchangedirect" . chr(34) . ").submit();'>";}
if (isset($_GET['tag']) and ($_GET['tag']==17)){echo "<span class='div_big'>";}
echo "Юмор";
if (isset($_GET['tag']) and ($_GET['tag']==17)){echo "</span>";}
echo "</a> ";
?>
 <span class="bld">[</span> <?php echo mysql_num_rows(mysql_query("select jobid from obd_10 where word2 = 17")); ?> <span class="bld">]</span><br />
 
 </p>



<?php
for($j= 1;$j<=6;$j++){
	echo "<p>";
	for($i=1;$i<=count($obase);$i++){
		if ($obase[$i][2] == $j){

echo "<a href='javascript:document.getElementById(" . chr(34) . "fchangedirect" . chr(34) . ").setAttribute(" . chr(34) . "action" . chr(34) . ", " . chr(34) . "/news.php";
if (isset($_GET['tag']) and ($_GET['tag']==(2*$i + 99))){echo  chr(34) . ");document.getElementById(" . chr(34) . "fchangedirect" . chr(34) . ").submit();'>";}else{echo "?tag=" . (2*$i + 99) . chr(34) . ");document.getElementById(" . chr(34) . "fchangedirect" . chr(34) . ").submit();'>";}
if (isset($_GET['tag']) and ($_GET['tag']==(2*$i + 99))){echo "<span class='div_big'>";}
echo $obase[$i][0];
if (isset($_GET['tag']) and ($_GET['tag']==(2*$i + 99))){echo "</span>";}
echo "</a> ";


			echo ' <span class="bld">[</span> ' . mysql_num_rows(mysql_query("select jobid from obd_10 where word2 = " . (2*$i + 99))) . ' <span class="bld">]</span><br />';
		}
	}
	echo "</p>";
}
?>

</td><td class="jst">
<p class="tfont"><?php echo $obase[$tmp1][3]; ?></p>
<?php include "../fnd_bd_2.php"; ?>
<index>
<?php
if (empty($_POST['user_name'])){
	$_POST['user_name'] = "Введите слово или жмите Enter";
	$_POST['restrict_find'] = 1;
}
if ($_POST['user_name'] == "Введите слово или жмите Enter"){$_POST['user_name'] = "";}
$_POST['user_name'] = addslashes($_POST['user_name']);
finds5last_set($_GET['p'], $_POST['user_name']);
switch($_POST['restrict_find']){
case "1": $_POST['user_name'] = "%" . $_POST['user_name'] . "%";break;
case "2": $_POST['user_name'] .= "%";break;
case "3": $_POST['user_name'] = "%" . $_POST['user_name'];break;
}

if (isset($_GET['tag'])){
	$query = "select * from obd_10 where obd_10.word2 = " . $_GET['tag'];
	if ($_POST['user_name'] <> "" and $_POST['user_name'] <> "Введите слово или жмите Enter"){
		$query = $query . " and (obd_10.name like '" . $_POST['user_name'] . "')";
	}
}else{
	$query = "select * from obd_10 where 1=1";
	if ($_POST['user_name'] <> ""){
		$query = $query . " and (name like '" . $_POST['user_name'] . "')";
	}
}
$query .= " ORDER BY ";
switch($_POST['in_orderby']){
case "2": $query .= "jobid asc";break;
case "3": $query .= "name desc";break;
case "4": $query .= "name asc";break;
default: $query .= "jobid desc";break;
}

//проверка лимита
$result = mysql_query($query) or print(mysql_error());
$z = mysql_num_rows($result);
if (isset($_GET['l'])){$query .= " limit " .$_GET['l'] . "," . $cur_list_numb;}else{$query = $query . " limit 0," . $cur_list_numb;}
$result = mysql_query($query);
$num_result = mysql_num_rows($result);
?>
<div class="black_block_c">
<?php
	if ($num_result){
	for ($i=0; $i<$num_result; $i++){
		$row = mysql_fetch_array($result);
?>
<div class="sm p_block"><?php
echo "<span style='font-weight : bold;'>[&nbsp;";
if (isset($_GET['l'])){
	echo $i + 1 + $_GET['l'];}
else{
	echo $i + 1;
}
echo  "&nbsp;] " .stripslashes($row['desk']) . "</span> ";

		echo "<a href='javascript:document.getElementById(" . chr(34) . "fchangedirect" . chr(34) . ").setAttribute(" . chr(34) . "action" . chr(34) . ", " . chr(34) . "/news.php";
		if (isset($_GET['tag']) and ($_GET['tag']==$row['word2'])){echo  chr(34) . ");document.getElementById(" . chr(34) . "fchangedirect" . chr(34) . ").submit();'>";}else{echo "?tag=" . $row['word2'] . chr(34) . ");document.getElementById(" . chr(34) . "fchangedirect" . chr(34) . ").submit();'>";}
		if (isset($_GET['tag']) and ($_GET['tag']==$row['word2'])){echo "<span class='div_big'>";}
		if ($row['word2'] >= 100){echo $obase[($row['word2'] - 99)/2][0];}else{echo $site_pages[$row['word2']][0];}
		if (isset($_GET['tag']) and ($_GET['tag']==$row['word2'])){echo "</span>";}
		echo "</a> ";
		if ($row['word2'] <> 0){ echo "<sub><a style='color:black;' title='Перейти к данной онлайн базе данных' href='/";
		switch ($row['word2']){
		case 11: echo "know.php";break;
		case 17: echo "umora.php";break;
		default: echo "online.php?p=" . $row['word2'];
		}
		echo "'>Открыть</a></sub>";}
?>

</div>
<div class="tfont" style="padding:7px 7px;">
<?php echo filter_find($_POST['user_name'], $row['name']); ?>
</div>
<?php
	}
	}else{
		none_project();
	}
?>
</div>
<?php require "../find_project_res.php"; ?>
<?php finds5last_get($_GET['p']); ?>
</index>
</td></tr></table>
</div>