</tr>
<tr>
<td height="20" class="button"><div align="center" class="<?php
if($_GET['item']==3) echo("now"); else echo("normal");
?>"><a href="index.php?item=3" class="buttonLink" style="color:#000000;">Новый клиент</a></div></td>
</tr>
<tr>
<td height="20" class="button"><div align="center" class="<?php
if($_GET['item']==4) echo("now"); else echo("normal");
?>"><a href="index.php?item=4" class="buttonLink" style="color:#000000;">Редактирование</a></div></td>
</tr>
<tr>
<td height="20" class="button"><div align="center" class="<?php
if($_GET['item']==5) echo("now"); else echo("normal");
?>"><a href="index.php?item=5" class="buttonLink" style="color:#000000;">Удаление</a></div></td>
</tr>
<tr>
<td height="20" class="button"><div align="center" class="<?php
if($_GET['item']==6) echo("now"); else echo("normal");
?>"><a href="index.php?item=6" class="buttonLink" style="color:#000000;">Поиск</a></div></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</body>
</html>
<html>
<link href="main_css.css" rel="stylesheet" type="text/css">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<meta http-equiv="Author" content="Аминат Исаева">
<title>ИС страховой компании РОСГОССТРАХ</title>
</head>
<body>
<table width="100%" bordercolor="#FFFFFF" border="1">
<tr>
<td height="99" colspan="2"><div align="center" class="content">
<h2>ИС страховой компании РОСГОССТРАХ</h2>
</div></td>
</tr>
<tr>
<td width="16%" height="20" class="button" ><div align="center" class="<?php
if($_GET['item']==1) echo("now"); else echo("normal");
?>"><a href="index.php?item=1" class="buttonLink" style="color:#000000;">Клиенты</a></div></td>
<td width="84%" rowspan="5" class="content" valign="top"><?php
if($_GET['item']==0) include("info.php");
if($_GET['item']==1) include("clients.php");
if($_GET['item']==2) include("dogovor_types.php");
if($_GET['item']==3) include("new.php");
if($_GET['item']==4) include("edit.php");
if($_GET['item']==5) include("delete.php");
if($_GET['item']==6) include("search.php");
?></td>
</tr>
<tr>
<td height="20" class="button"><div align="center" class="<?php
if($_GET['item']==2) echo("now"); else echo("normal");
?>"><a href="index.php?item=2" class="buttonLink" style="color:#000000;">Типы договоров</a></div></td>
</tr>
<tr>
<td height="20" class="button"><div align="center" class="<?php
if($_GET['item']==3) echo("now"); else echo("normal");
?>"><a href="index.php?item=3" class="buttonLink" style="color:#000000;">Новый клиент</a></div></td>
</tr>
<tr>
<td height="20" class="button"><div align="center" class="<?php
if($_GET['item']==4) echo("now"); else echo("normal");
?>"><a href="index.php?item=4" class="buttonLink" style="color:#000000;">Редактирование</a></div></td>
</tr>
<tr>
<td height="20" class="button"><div align="center" class="<?php
if($_GET['item']==5) echo("now"); else echo("normal");
?>"><a href="index.php?item=5" class="buttonLink" style="color:#000000;">Удаление</a></div></td>
</tr>
<tr>
<td height="20" class="button"><div align="center" class="<?php
if($_GET['item']==6) echo("now"); else echo("normal");
?>"><a href="index.php?item=6" class="buttonLink" style="color:#000000;">Поиск</a></div></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</body>
</html>
<?php
if($_GET['find']==1){
$name="%".$_GET['name']."%";
include("config.php");
$q=@mysql_query("SELECT * FROM clients WHERE name LIKE '$name';", $db_connect);
$x=0;
if($_GET['dest']!=0){
?>
<form name="form2" method="get" action="index.php">
<?php
if($_GET['dest']==1) $h=4;
if($_GET['dest']==2) $h=5;
?>
<input type="hidden" value="<?php echo($h); ?>" name="item">
<?php
}?>
<table width="100%" align="center" border="1" class="content">
<tr>
<?php
if($_GET['dest']!=0){
?>
<td><b>Выберите поле</b></td>
<?php } ?>
<td><b>Имя клиента</b></td>
<td><b>Марка автомобиля</b></td>
<td><b>Номер автомобиля</b></td>
<td><b>Срок договора</b></td>
</tr>
<?php
while(x<mysql_fetch_row($q))
{
echo("<tr>");
if($_GET['dest']!=0){
echo("<td>");
?><input type="radio" value="<?php echo(mysql_result($q, $x, 'id')); ?>" name="id"> <?php
echo("</td>");
}
echo("<td>");
$res=mysql_result($q, $x, 'name');
echo($res);
echo("</td>");
echo("<td>");
$res=mysql_result($q, $x, 'avto_name');
echo($res);
echo("</td>");
echo("<td>");
$res=mysql_result($q, $x, 'avto_number');
echo($res);
echo("</td>");
echo("<td>");
$res=mysql_result($q, $x, 'srok_dogovora');
echo($res);
echo("</td>");
echo("</tr>");
$x++;
}
?>
</table>
<?php
if($_GET['dest']!=0){ ?>
<input type="submit" value="Выбрать">
</form>
<?php
}
}
else{?>
<form name="form1" method="get" action="">
<input name="item" type="hidden" value="6">
<?php
if($_GET['dest']==1)
{
?><input type="hidden" value="1" name="dest"><?php
}
else if($_GET['dest']==2){
?><input type="hidden" value="2" name="dest"><?php
}
?>
<table width="60%" class="content" align="center">
<tr>
<td width="50%">Имя клиента</td>
<td><input type="text" name="name"></td>
</tr>
</table>
<div align="center"><input name="ok1" type="submit" value="Найти "></div>
<input type="hidden" value="1" name="find">
</form> <?php
}
?>