echo '<form name="edit" action="editor.php" method=POST enctype=multipart/form-data>';
echo '<table align="left" valign="top" width=1000 CELLPADDING=0>';
echo '<tr>';
echo '<td align="right" valign="top" width="650">';
echo '<table align="left" valign="top" width=650 CELLPADDING=0>';
echo '<tr><td align="right" valign="bottom" width=300>1.) Артикул:</td>';
echo '<td align="left" valign="bottom" width=350><input type="hidden" name="position" value="'; if (isset($_SESSION["ID"])) echo $position; echo '" size=30 maxlegth=100>'; echo '<input type="text" name="article" value="'; if (isset($_SESSION["ID"])) echo $article; echo '" size=30 maxlegth=100></td></tr>'; echo '<tr><td align="right" valign="bottom" width=300>2.) Цвет:</td>';
echo '<td align="left" valign="bottom" width=350><input type="text" name="color" value="'; if (isset($_SESSION["ID"])) echo $color; echo '" size=30 maxlegth=100></td></tr>'; echo '<tr><td align="right" valign="bottom" width=300>3.) Наименование:</td>';
echo '<td align="left" valign="bottom" width=350><input type="text" name="name" value="'; if (isset($_SESSION["ID"])) echo $name; echo '" size=30 maxlegth=100></td></tr>'; echo '<tr><td align="right" valign="bottom" width=300>4.) Категория:</td>';
echo '<td align="left" valign="bottom" width=350><select name="category" size=1>';
if (isset($_SESSION["ID"])) {
$rslt=mysql_query('SELECT name1 FROM categories WHERE name2="'.$category.'"') echo '<option value="'.$category.'">'.$pr['name1'];
}
$rsl=mysql_query('SELECT name1, name2 FROM categories') while (!($n==$pe))
{
if (isset($_SESSION["ID"])) if (($prd['name2']===$category))continue(1
); echo '<option value="'.$prd['name2'].'">'.$prd['name1'];
++$pe;
}
$pe = 0;
echo '</select></td></tr>';
echo '<tr><td align="right" valign="bottom" width=300>5.) Подтип:</td>';
echo '<td align="left" valign="bottom" width=350><select name="grade" size=1>';
if (isset($_SESSION["ID"])) {
$rslt=mysql_query('SELECT name1 FROM grade WHERE name2="'.$grade.'"') echo '<option value="'.$grade.'">'.$pr['name1'];
}
while (!($n==$pe))
{
if (isset($_SESSION["ID"])) if (($prd['name2']===$grade))continue(1
); echo '<option value="'.$prd['name2'].'">'.$prd['name1'];
++$pe;
}
echo '</select></td></tr>';
echo '<tr><td align="right" valign="top" width=300>6.) Описание:</td>';
echo '<td align="left" valign="bottom" width=350><textarea name="description" rows=15 cols=30>'; if (isset($_SESSION["ID"])) echo $description; echo '</textarea></td></tr>'; echo '<tr><td align="right" valign="bottom" width=300>7.) Материал:</td>';
echo '<td align="left" valign="bottom" width=350><input type="text" name="structure" value="'; if (isset($_SESSION["ID"])) echo $structure; echo '" size=10 maxlegth=10></td></tr>'; echo '<tr><td align="right" valign="bottom" width=300>8.) Производитель:</td>';
echo '<td align="left" valign="bottom" width=350><input type="text" name="made" value="'; if (isset($_SESSION["ID"])) echo $made; echo '" size=10 maxlegth=10></td></tr>'; echo '<tr><td align="right" valign="top" width=300>9.) Наличие:</td>';
echo '<td align="left" valign="bottom" width=350><input type="text" name="available" value="'; if (isset($_SESSION["ID"])) echo $available; echo '"></td></tr>'; echo '<tr><td align="right" valign="bottom" width=300>10.) Стоимость:</td>';
echo '<td align="left" valign="bottom" width=350><input type="text" name="value" value="'; if (isset($_SESSION["ID"])) echo $value; echo '" size=10 maxlegth=10></td></tr>'; echo '<tr><td align="right" valign="bottom" width=300>11.) Цена:</td>';
echo '<td align="left" valign="bottom" width=350><input type="text" name="price" value="'; if (isset($_SESSION["ID"])) echo $price; echo '" size=10 maxlegth=10></td></tr>'; echo '<tr><td align="right" valign="bottom" width=300>12.) Старая цена:</td>';
echo '<td align="left" valign="bottom" width=350><input type="text" name="oldprice" value="'; if (isset($_SESSION["ID"])) echo $oldprice; echo '" size=30 maxlegth=100></td></tr>'; echo '<tr><td align="right" valign="bottom" width=300>13.) Скидка:</td>';
echo '<td align="left" valign="bottom" width=350><input type="text" name="discont" value="'; if (isset($_SESSION["ID"])) echo $discont; echo '" size=30 maxlegth=100></td></tr>'; echo '<tr><td align="right" valign="bottom" width=300>14.) Акция:</td>';
echo '<td align="left" valign="bottom" width=350><input type="text" name="action" value="'; if (isset($_SESSION["ID"])) echo $action; echo '" size=30 maxlegth=100"></td></tr>'; echo '<tr><td align="right" valign="bottom" width=300>15.) Комплектация:</td>';
echo '<td align="left" valign="bottom" width=350><input type="text" name="equipment" value="'; if (isset($_SESSION["ID"])) echo $equipment; echo '" size=30 maxlegth=100"></td></tr>/td></tr>'; echo '<tr><td align="right" valign="bottom" width=300>16.) Ширина:</td>';
echo '<td align="left" valign="bottom" width=350><input type="text" name="width" value="'; if (isset($_SESSION["ID"])) echo $width; echo '" size=10 maxlegth=10></td></tr>'; echo '<tr><td align="right" valign="bottom" width=300>17.) Высота:</td>';
echo '<td align="left" valign="bottom" width=350><input type="text" name="hight" value="'; if (isset($_SESSION["ID"])) echo $hight; echo '" size=10 maxlegth=10></td></tr>'; echo '<tr><td align="right" valign="bottom" width=300>18.) Вес:</td>';
echo '<td align="left" valign="bottom" width=350><input type="text" name="weight" value="'; if (isset($_SESSION["ID"])) echo $weight; echo '" size=10 maxlegth=10></td></tr>'; echo '<tr><td align="right" valign="bottom" width=300>19.) Ширина карниза:</td>';
echo '<td align="left" valign="bottom" width=350><input type="text" name="cornice" value="'; if (isset($_SESSION["ID"])) echo $cornice; echo '" size=10 maxlegth=10></td></tr>'; echo '<tr><td align="right" valign="top" width=300>20.) Уход:</td>';
echo '<td align="left" valign="bottom" width=350><textarea name="care" rows=3 cols=30>'; if (isset($_SESSION["ID"])) echo $care; echo '</textarea></td></tr>'; echo '<tr><td align="right" valign="bottom" width=300>21.) Внимание:</td>';
echo '<td align="left" valign="bottom" width=350><input type="text" name="attention" value="'; if (isset($_SESSION["ID"])) echo $attention; echo '" size=10 maxlegth=10></td></tr>'; echo '<tr><td align="right" valign="top" width=300>22.) Рекомендуем:</td>';
echo '<td align="left" valign="bottom" width=350><textarea name="recomment" rows=3 cols=30>'; if (isset($_SESSION["ID"])) echo $recomment; echo '</textarea></td></tr>'; echo '<tr><td align="right" valign="top" width=300>22.) Фото:</td>';
echo '<td align="left" valign="bottom" width=350><input type="file" name="uploadfile" size=20 accept="image/png"></td></tr>';
echo '<tr><td align="center" valign="top" width=100></br></br><input type="submit" name="subm" value="Del"></td>';
echo '<td align="center" valign="bottom" width=100></br></br><input type="submit" name="subm" value="Edit"></td>';
echo '<td align="center" valign="bottom" width=100></br></br><input type="submit" name="subm" value="Add"></td></tr>';
echo '</table>';
echo '</td>';
echo '<td align="left" valign="top" width=450>';
if (isset($_SESSION["ID"])) {
echo '<img src="img.php?img='.$position.'&tab=catalog" width=400>';
}
echo '</td>';
echo '</tr>';
echo '</table>';
echo '</form>';