parser

Написать ответ на текущее сообщение

 

 
   команды управления поиском

ок

dmbr 14.06.2005 23:18

$user_id[^math:md5[$env:REMOTE_ADDR]]
^connect[$connect_p3test]{$tovar[^table::sql{select * from tovar}]}

<form method="post">
<table width=80% align=left>
<tr>
<td>
^tovar.menu{$tovar.tovar <input type="radio" name="tovar" value="$tovar.tovar">}[<br><br>]<br><br>

<input type="submit" name="post" value="В корзину">
</td>
</tr>
</table>
</form>
^if(def $form:post){
^if(def $form:tovar){
^connect[$connect_p3test]{^void:sql{insert into shop (zakaz, user_id) values ('^if(def $form:tovar){$form:tovar}', '$user_id')}}
}
$response:location[http://${env:SERVER_NAME}$request:uri]
}
^connect[$connect_p3test]{
$shop[^table::sql{select zakaz from shop where user_id='$user_id'}]}


<table width=80% align=left>
<tr>
<td>
^shop.menu{$shop.zakaz <br><form method="post"><br>
<input type="checkbox" name="zakaz" value="$shop.zakaz">}[<br>]<br><br>
<input type="submit" name="del" value="удалить">
</td>
</tr>
</table>
</form>
<br><br>


^connect[$connect_p3test]{^void:sql{delete from shop where zakaz='$form:zakaz'}}
#$response:location[http://${env:SERVER_NAME}$request:uri]