<?php
if (isset($_REQUEST['bonus'])) {$autorized_user_bonus_uslugi=$_REQUEST['bonus'];} else {$autorized_user_bonus_uslugi=0;}
include('../config.php');
include('../units.php');
$zapicey=0;
$sql = "SELECT * FROM uslugi ORDER BY naim";
echo '	<table class="nice_table" cellspacing=1 cellpadding=2>
	<TR>
        <Th bgcolor="#C4D9F7">id</Th>
        <Th bgcolor="#C4D9F7">Наименование</Th>
        <Th bgcolor="#C4D9F7">Стоимость</Th>
        <Th bgcolor="#C4D9F7">Бонус</Th>
	</TR>';
foreach ($db->query($sql) as $row) {
	$mcolor='FBFCE8';
//	echo '<tr bgcolor=#'.$mcolor.' onclick="location.href=\'index.php?go=raboti&action=add&id_work='.$row['id'].'\'">'.
	echo '<tr bgcolor=#'.$mcolor.' onclick="AddWork(this)">'.
	'<td style="color: gray;">'.$row['id'].'</td>'.
	'<td>'.$row['naim'].'</td>'.
	'<td>'.CeniProbel($row['cena']).'</td>'.
	'<td>'.CeniProbel(round($row['cena']*$autorized_user_bonus_uslugi/100,$okrugl)).'</td>'.
	'</tr>';
	$zapicey++;
	}
echo '</TABLE>';
echo '<div id="container" align="left">&nbsp;Записей: '.$zapicey.' </div>';
?>
