Фрагменты кода сайта ЗАО "Тензор", страница 3

}

if(isset($_REQUEST["delete"])){

$result=mysql_query("DELETE FROM property WHERE Wares=".$_REQUEST["id"]." AND Parent=".$_REQUEST["type"],$data);

}

if(!isset($_REQUEST['prtype'])){

echo('

<div align="center"><big>Выберите тип товара</big></div>

<div align="center">

<form action="/changewareproperty.php" method="POST">

<input name="id" type="hidden" value="'.$_REQUEST['id'].'">

<select size="1" name="prtype">

');

$result=mysql_query("SELECT * FROM propertycategories ORDER BY Caption",$data);

while($row=mysql_fetch_array($result)){

echo('<option value="'.$row["ID"].'">'.$row["Caption"].'</option>');

}

echo('

</select>

<input type="submit" value="Выбрать">

</form>

</div>

');

}

else{

$sresult=mysql_query("SELECT * FROM property WHERE Parent=1 AND Wares=".$_REQUEST["id"],$data);

if($srow=mysql_fetch_array($sresult)){

$img="<div align=\"center\"><a href=\"javascript:ChangeImage(".$_REQUEST["id"].")\"><img src=\"".$srow["Caption"]."\" border=\"0\" alt=\"Зарузить картинку\"></a></div>";

}

else {

$img="<div align=\"center\"><a href=\"javascript:ChangeImage(".$_REQUEST["id"].")\"><img src=\"/img/hand.gif\" border=\"0\" alt=\"Зарузить картинку\"></a></div>";

}

?>

<p class="text"><img src="/img/sp.gif" width="1" height="20">

<?php echo($img);

echo('

<div align="center"><big>Выберите тип товара</big></div>

<div align="center">

<form name="form1" action="/changewareproperty.php" method="POST">

<input name="id" type="hidden" value="'.$_REQUEST['id'].'">

<select size="1" name="prtype">

');

$result=mysql_query("SELECT * FROM propertycategories ORDER BY Caption",$data);

while($row=mysql_fetch_array($result)){

$s="";

if($row["ID"]==$_REQUEST["prtype"])$s=" selected";

echo('<option value="'.$row["ID"].'"'.$s.'>'.$row["Caption"].'</option>');

}

echo('

</select>

<input type="submit" value="Выбрать">

</form>

</div>

<form action="/changewareproperty.php" metod="POST">

<input name="id" type="hidden" value="'.$_REQUEST['id'].'">

<input name="prtype" type="hidden" value="'.$_REQUEST["prtype"].'">

');

?>

<font size="-1">

<table class=text width="100%" border="1" bordercolordark="white">

<?php

$uid=-1;

$result=mysql_query("SELECT * FROM property, allowproperty WHERE (property.Wares=".$_REQUEST['id']." AND property.Parent=allowproperty.ID) ORDER BY property.Number",$data);