<div class="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;]</span> ', setarch("/project.php?u=" . $row['jobid']);
?><?php echo setmode("project.php?u=" . $row['jobid']); ?><a class="a_show_hide" title="Открыть страницу проекта" target="_blank" href="project.php?u=<?php echo $row['jobid']; ?>"><?php
echo stripslashes($row['name']); ?></a></div>
<table style="width:100%;"><tr><td class="tfont pg10">
<a class="ssm" title="Открыть страницу проекта" target="_blank" href="project.php?u=<?php echo $row['jobid']; ?>">далее&nbsp;</a><span class="sm"><span class="bld">Отзывы:&nbsp;[
<?php
	mysql_select_db('onestyle_w');

	$result2 = mysql_query("select c_word_id from octblTag_3 where c_word_id= " . $row['jobid']);
	echo "<a title='Открыть страницу проекта' target='_blank' href='project.php?u=" . $row['jobid'] . "#add_comment'>" . mysql_num_rows($result2) . "</a>";
	
	echo "&nbsp;]</span>&nbsp;Просмотры:&nbsp;<span class='bld'>[</span>&nbsp;";
	$result2 = mysql_query("select * from ocView_3 where c_word_id= " . $row['jobid']);
	if (mysql_num_rows($result2)){
		$row2 = mysql_fetch_array($result2);
		echo $row2['c_count'];
	}else{
		echo "0";
	}
?>
 <span class='bld'>]</span> Рейтинг:&nbsp;<span class='bld'>[</span>
<?php 
$result2 = mysql_query("select c_word_id, c_rcount, c_rating from ocView_3 where c_word_id= " . $row['jobid']);

if (mysql_num_rows($result2)){
	$row2 = mysql_fetch_array($result2);
	if ($row2['c_rcount'] == 0){echo "0";}else{echo number_format((float)($row2['c_rating']/$row2['c_rcount']), 2);}
}else{
	echo "0";
}
mysql_select_db('onestyle_testmy');
?>
&nbsp;<span class='bld'>]</span></span>

<?php if (isset($_POST['user_name'])) { echo filter_find($_POST['user_name'], stripslashes($row['desk']));}else{echo stripslashes($row['desk']);} ?>
<span class="sm">
<?php
	$result4 = mysql_query("select p_tag, word_id from tblTag_0 where word_id=".$row['jobid']);
	$num_result4 = mysql_num_rows($result4);
	for ($k=0; $k<$num_result4; $k++){
		$row4 = mysql_fetch_array($result4);

		$arg1 = chr(34) . $_SERVER['SCRIPT_NAME'];
		if (isset($_GET['u'])){$arg1 .= '?u=' . $_GET['u'];}
		if (isset($_GET['tag']) and ($_GET['tag']==$row4['p_tag'])){}else{
			if (isset($_GET['u'])){$arg1 .= "&";}else{$arg1 .= "?";}
			$arg1 .= "tag=" . $row4['p_tag'];
		}
		
		$arg1 .= chr(34);
		echo "<a href='javascript:atagcreator($arg1);'>";
		if (isset($_GET['tag']) and ($_GET['tag']==$row4['p_tag'])){echo "<span class='div_big'>";}
		echo $tags[0][$row4['p_tag']];
		if (isset($_GET['tag']) and ($_GET['tag']==$row4['p_tag'])){echo "</span>";}
		echo "</a>&nbsp; ";
	}
?></span></td><td style="width:111px;" class="cntr">
<?php if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/galary/small/_project/' . $row['jobid'] . '.jpg')){ ?>
<a target="_blank" href="galary/big/_project/<?php echo $row['jobid'] . '.jpg'; ?>"><img style="border-right:3px solid transparent;" src="galary/small/_project/<?php echo $row['jobid'] . '.jpg'; ?>" /></a>
<?php }else{ ?>
<img style="border:7px solid white;" src="galary/small/_project/<?php echo 'none.gif'; ?>" />
<?php } ?>
</td></tr></table>