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

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

$srow=mysql_fetch_array($sresult);

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

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

$did=$srow["IDD"];

}

else{

$did=-1;

}

$num=$row["Number"];

if($row["Text"]!="image"){

if($row["ID"]==2){

$lh="<a href=\"http://";

$rh="\">".Replace($row["Caption"])."</a>";

}

else{

$lh="";

$rh="";

}

?>

<tr >

<td>

<b><?php echo(Replace($row["Number"].". ".$row["Text"]))?>:</b>

</td>

<td>

<div align="right"><?php echo($lh.Replace($row["Caption"]).$rh);?></div>

</td>

<td>

<a href="javascript:ChangeProperty(<?php echo($row["Wares"])?>,<?php echo($row["Parent"])?>,<?php echo($row["IDD"])?>)"><img src="/img/hand.gif" border="0" alt="Редактировать" width="40%"></a>

<a href="/changewareproperty.php?id=<?php echo($_REQUEST["id"])?>&type=<?php echo($row["ID"])?>&delete=1&prtype=<?php echo($_REQUEST['prtype'])?>"><img src="/img/delete.png" border="0" alt="Удалить"></a>

<a href="javascript:PropertyUp(<?php echo($row["Wares"])?>,<?php echo($uid)?>,<?php echo($row["IDD"])?>)"><img src="/img/up.gif" border="0" alt="Поднять вверх" style="margin-bottom:4px"></a>

<a href="javascript:PropertyDown(<?php echo($row["Wares"])?>,<?php echo($did)?>,<?php echo($row["IDD"])?>)"><img src="/img/down.gif" border="0" alt="Опустить вниз" style="margin-bottom:4px"></a>

</td>

</tr>

<?php

$uid=$row["IDD"];

}

}

?>

<tr>

<td>

<span class=text>Добавить свойство:

</td>

<td>

<div align="right">Место в списке</div>

</td>

<td>

&nbsp;

</td>

</tr>

<tr>

<td>

<?php

$result=mysql_query("SELECT * FROM allowproperty WHERE (ID<>1)AND(Parent=0 OR Parent=".$_REQUEST["prtype"].") ORDER BY Text",$data);

echo('

<select name="Type" class=lightinput>

');

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

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

}

echo('

</select>

');

?>

</td>

<td>

<div style="padding-top:0px">

<input name="Textt" type="text" value="" size="60"><input name="TextNumber" type="text" value="" size="5">

</div>

</td>

<td>

<div style="padding-top:0px">

<input type="submit" class=lightinput value="Добавить">

</div>

</td>

</tr>

</span>

</table>

</font>

</p>

</form>

<?php

}

}