Дипломная работа: Разработка автоматизированной системы учёта товаров на складе в ООО "РесурсМетПром"

Внимание! Если размещение файла нарушает Ваши авторские права, то обязательно сообщите нам
87
or die(mysql_error());
$res_id23=mysql_query("SELECT idgild, nameG FROM `gild`")
or die(mysql_error());
$res_id2=mysql_query("SELECT idprod, nameprod, art,edizmpr FROM
`prod`")
or die(mysql_error());
?>
<p class="pp">
Анализ потребности<br>
</p>
<!-- начало основной таблицы -->
<?php
require "dbconnect.php";
$res_id13=mysql_query("SELECT distinct idgild, nameG FROM `gild`, chet
where sklad=idgild and status=0");
while($nomer_mas11=mysql_fetch_row($res_id13) )
{
$sklad=$nomer_mas11[0];
$skladname=$nomer_mas11[1];
echo " <br> <p class='tarivold'> Потребность в продукции на $skladname
</p>";
$nomer=mysql_query("SELECT nomer FROM chet where status=0 and
sklad=$sklad");
while($nomerdok=mysql_fetch_row($nomer) )
{
echo "<table border='0' align='center' width='890'>\n";
echo "<tr class='tr'><th width='200'>&nbsp;&nbsp;&nbsp;Наименование
&nbsp;&nbsp;&nbsp;</th>
<th width='100'>&nbsp;&nbsp;&nbsp;Артикул &nbsp;&nbsp;&nbsp;</th>
88
<th width='100'>&nbsp;&nbsp;&nbsp;Единица
измерения&nbsp;&nbsp;&nbsp;</th>
<th width='100'>&nbsp;&nbsp;&nbsp;В наличии&nbsp;&nbsp;&nbsp;</th>
<th width='100'>&nbsp;&nbsp;&nbsp;Требуется&nbsp;&nbsp;&nbsp;</th>
<th width='100'>&nbsp;&nbsp;&nbsp;Разница&nbsp;&nbsp;&nbsp;</th>
<th width='100'>&nbsp;&nbsp;&nbsp;№ накл.&nbsp;&nbsp;&nbsp; <form
method='post' name='spis' action='an.php'>
<INPUT TYPE='hidden' NAME='spis' VALUE='$nomerdok[0]'>
<input type='image' src='image/close.png' TITLE='Закрыть накладную'
WIDTH='20' HEIGHT='20' >
</form> </th>
</tr>";
$nomerdok1=$nomerdok[0];
$res=mysql_query("SELECT `nameprod`,`art`,`edizmpr`,kolvonal, kolvochet,
kolvonal-kolvochet FROM `prod`, nal, chet where udalPr=0 and
idprodnal=idprod and idskladnal=$sklad and nomer=$nomerdok1 and
idprod=idprodchet");
while($res_id=mysql_fetch_row($res) )
{
if ($res_id[5]>0)
{
$class=tz;
}
else
{
$class=table3;
}
if ($res_id[5]==0)
{
$class=log;
89
}
echo " <center> <tr>
<td width='200' class='$class'> $res_id[0] </td>
<td width='100' class='$class'> $res_id[1] </td>
<td width='100' class='$class'> $res_id[2] </td>
<td width='100' class='$class'> $res_id[3] </td>
<td width='100' class='$class'> $res_id[4] </td>
<td width='100' class='$class'> $res_id[5] </td>
<td width='100' class='$class'> $nomerdok1 </td>
</tr>
";
}
echo "</table>";
}
}
?>
<br>
<table width="900" border="0" cellspacing="0" cellpadding="0">
<tr >
<td width="30">&nbsp;</td>
<td width="320" class="date1" >Выберите склад -поставщик</td>
<td width="30">&nbsp;</td>
<td width="320" class="date1" >Выберите склад- приемщик </td>
<td width="30">&nbsp;</td>
</tr>
<tr>
<td width="30">&nbsp;</td>
90
<td width="320" class="log">
<form method="post" id="signup" action='an.php'>
<select name="sklad1"><center>
<?php
while ($gild=mysql_fetch_row($res_id3))
{
echo "<center><option value='$gild[0]'>$gild[1]</option>\n";
}
?>
</select>
</td>
<td width="30">&nbsp;</td>
<td width="320" class="log">
<select name="sklad2"><center>
<?php
while ($gild1=mysql_fetch_row($res_id23))
{
echo "<center><option value='$gild1[0]'>$gild1[1]</option>\n";
}
?>
</select>
</td>
<td width="30">&nbsp;</td>
</tr>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
91
<tr >
<td width="30">&nbsp;</td>
<td width="320" class="date1" >Выберите продукцию</td>
<td width="30">&nbsp;</td>
<td width="320" class="date1" >Введите количество продукции</td>
<td width="30">&nbsp;</td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="320" class="log">
<select name="prod"><center>
<option> </option>
<?php
while ($prod=mysql_fetch_row($res_id2))
{
echo "<option value='$prod[0]'>$prod[1] $prod[2] $prod[3]</option>\n";
}
?>
</select></td>
<td width="30">&nbsp;</td>
<td width="320" class="log">
<input type="text" size="20" value="0" onFocus="doClear(this)"
onBlur="doDefault(this)" name="kolvoprod" class="required"
title="<br>
Поле обязательно к заполнению">
</td>
<td width="30">&nbsp;</td>
</tr>
<tr>
Источник: https://baza.diplomsite.ru/previewfile/389