@CONTENT[] #создание menu_top $tmenu_top[^oSql.table{ SELECT `id`, `caption_menu`, `attr`, `main_content`, `url` FROM `page` WHERE `parent_id` = '158' ORDER BY `ord` ASC }] ^tmenu_top.menu{ $tmenu_top.caption_menu $tmenu_top.url ^taint[as-is][$tmenu_top.main_content] } $tprint_menu[^oSql.table{ SELECT `id`, `name`, `description`, `logo1`, `price_lamination`, `type`, `price_num`, `price_head`, `price_default`, `size_default` FROM `print_menu` WHERE `enabled` = '1' ORDER BY `ord` ASC }] ^tprint_menu.menu{ $tprint_menu.name ^taint[as-is][$tprint_menu.description] /_files/print_menu/logo1_${tprint_menu.id}.${tprint_menu.logo1} $gallery_menu[^oSql.table{ SELECT `id`, `name`, `ext` FROM `files` WHERE (`parent_id` =$tprint_menu.id and `parent_unit` = 'print_menu') }] ^gallery_menu.menu{

} $tprint_menu.type #Печать таблица для 0 $tPrice[^oSql.table{ SELECT `id`, `printing_id`, `typepaper`, `column1`, `column2`, `column3`, `column4`, `column5`, `column6`, `column7`, `column8`, `column9`, `column10`, `value_default` FROM `price` WHERE (`enabled` = '1' and `printing_id` ='${tprint_menu.id}') ORDER BY `printing_id` ASC }] $price[] ^if(def ${tprint_menu.price_num} && ${tprint_menu.price_num} != 0){ $price[] $parts[^tprint_menu.price_head.split[,;lh]] $price[${price}] $price[${price}] ^for[i]($tprint_menu.price_num-1;0){$price[${price}]} $i[^eval(${tprint_menu.price_num}-1)] ^while($i >= 0){ $price[${price}] $i[^eval($i-1)] } $price[${price}] ^tPrice.menu{ $price[${price}] $price[${price}] $i[^eval(${tprint_menu.price_num})] ^while($i >= 1){ $price[${price}] $i[^eval($i-1)] } $price[${price}] } $price[${price}
$tprint_menu.name$parts.$i см$parts.$i см
$tPrice.typepaper$tPrice.column$i руб.
] } $price ^tPrice.menu{ $col[] ^for[i](1;$tprint_menu.price_num){$col[$col col${i} = '$tPrice.column$i']} ${tPrice.typepaper} } ^for[j](0;$tprint_menu.price_num-1){ $parts.$j } $tprint_menu.price_lamination $tprint_menu.price_default } #Диалоговое сообщение для пользователя $oUnit[^unit:create[dialogs]] ^oUnit.xml[ $.cm[cmList] $.fields[text] $.where[id = '1' or id = '2'] ] ^if(def $form:id){ $picture[^oSql.table{ SELECT `id`, `name`, DATE_FORMAT(dt_add, '%d.%m.%Y') AS dt_add FROM `print_fotogalereya` WHERE (`id` = $form:id and `enabled` = '1') }] ^if(def $form:offer){$t[offer]} ${picture.name} ${picture.dt_add} # ---------- ^picture.menu{ #убираем из галереи лишние фотографии (предложение) ^if(def $form:offer){ $gallery_offer[^oSql.table{ SELECT `id`, `galery`, `photo` FROM `print_offer` WHERE (`id` = $form:offer) }] $parts1[^gallery_offer.photo.split[,;h]] $parts_num[^gallery_offer.photo.split[,;v]] ^for[i](0;^parts_num.count[]-1){

} } $gallery[^oSql.table{ SELECT `id`, `name` FROM `files` WHERE (`parent_id` = $form:id and `parent_unit` = 'print_fotogalereya') }] ^gallery.menu{

} } }