@sections[][title]
#$title[$sections.section]
^if($MAIN:show_sections eq "1"){
# ^generate_year_sections[]
}{
$works_sections[^table::load[/admin/cfg/works_sections.cfg]]
$sections[^works_sections.select($works_sections.type eq "$MAIN:show_sections")]
}
^while($i < ^if(^eval($how * 7) < $total){^eval($how * 7)}{$total}){
^if($x eq "^eval($offset / $maxlimit + 1)"){
^l2img_white[$x]^i.inc($maxlimit)^x.inc[] |
}{
^l2img_ul[$x]^i.inc($maxlimit)^x.inc[] |
}
^if(^eval($i / 7) eq ^eval($i / 7)[%.0f]){
}
}
#^if(^works_by_type.locate[id;${works.type}]){$works_by_type.title}/
}
^if(^s_values:uri.count[] eq "1"){
###
### Чего-то выбрали
###
^if(^works_by_type.locate[title;$s_values:uri_last]){
$MAIN:title[$works_by_type.title]
$works_sections[^table::load[/admin/cfg/works_sections.cfg]]
$sections[^works_sections.select($works_sections.type eq "$works_by_type.id")]
^if(^sections.count[] > 0){
$MAIN:show_sections($works_by_type.id)
}{
^if($works_by_type.id eq "1"){
# ^generate_year_sections[]
# $MAIN:show_sections($works_by_type.id)
}{
$MAIN:show_sections(0)
}
}
$MAIN:work_title[$works_by_type.title]
$works[^table::load[/admin/cfg/works.cfg]}]
$works[^works.select($works.type eq "$works_by_type.id")]
^if(^MAIN:section_.int(0) ne "0"){
^if($works_by_type.id eq "1"){
$works[^works.select(^works.published.left(4) eq "^if(^sections.locate[id;^MAIN:section_.int(0)]){$sections.section}")]
}{
$works[^works.select($works.section_id eq "^MAIN:section_.int(0)")]
}
}
^if(^works.count[] > 0){
^works.sort($works.id)[desc]
$z(0)
$offset(^if(def $MAIN:page){^MAIN:page.int(0)}{0})
^works.offset(+${offset})
^while($i < ^if(^eval($how * 7) < $total){^eval($how * 7)}{$total}){
^if($x eq "^eval($offset / $maxlimit + 1)"){
^l2img_white[$x]^i.inc($maxlimit)^x.inc[] |
}{
^l2img_ul[$x]^i.inc($maxlimit)^x.inc[] |
}
^if(^eval($i / 7) eq ^eval($i / 7)[%.0f]){
}
}
}
^if(^s_values:uri.count[] eq "2"){
###
### Чего-то выбрали второй раз. наверное работа с подкатегорией :-)
###
^if(^works_by_type.locate[title;$s_values:uri.piece]){
$MAIN:title[$works_by_type.title]
$works_sections[^table::load[/admin/cfg/works_sections.cfg]]
$sections[^works_sections.select($works_sections.type eq "$works_by_type.id")]
^if(^sections.count[] > 0){
$MAIN:show_sections($works_by_type.id)
}{
#$MAIN:show_sections(0)
^if($works_by_type.id eq "1"){
^generate_year_sections[]
$MAIN:show_sections($works_by_type.id)
}{
$MAIN:show_sections(0)
}
}
$MAIN:work_title[$works_by_type.title]
$works[^table::load[/admin/cfg/works.cfg]}]
$works[^works.select($works.type eq "$works_by_type.id")]
# ^if(^MAIN:section_.int(0) ne "0"){$works[^works.select($works.section_id eq "^MAIN:section_.int(0)")]}
^if(^MAIN:section_.int(0) ne "0"){
^if($works_by_type.id eq "1"){
$works[^works.select(^works.published.left(4) eq "^if(^sections.locate[id;^MAIN:section_.int(0)]){$sections.section}")]
}{
$works[^works.select($works.section_id eq "^MAIN:section_.int(0)")]
}
}
^if(^works.locate[id;$s_values:uri_last]){
$selected_position[^works.line[]]
^if(^works.count[] > 0){
^works.sort($works.id)[desc]
# ^eval(^eval(^eval($selected_position - 1) / 12)[%.1d] * 12)
$z(0)
$offset(^eval(^eval(^eval($selected_position - 1) / 12)[%.1d] * 12))
^works.offset(+${offset})
^while($i < ^if(^eval($how * 7) < $total){^eval($how * 7)}{$total}){
^if($x eq "^eval($offset / $maxlimit + 1)"){
^l2img_white[$x]^i.inc($maxlimit)^x.inc[] |
}{
^l2img_ul[$x]^i.inc($maxlimit)^x.inc[] |
}
^if(^eval($i / 7) eq ^eval($i / 7)[%.0f]){
}
}
}
@description[][title]
#^if(def $MAIN:current_title){
# $title[$MAIN:current_title]
# $i(0)^while($i < ^title.length[]){$letter[^title.mid($i;1)]^l2img_green[$letter]^i.inc[]}
^if(def ${works.client} && $works.client ne "-"){
$title[Client: $works.client]
$i(0)^while($i < ^title.length[]){$letter[^title.mid($i;1)]^l2img_green[$letter]^i.inc[]}
}
^if(def $works.description){
$title[$works.description]
$i(0)^while($i < ^title.length[]){$letter[^title.mid($i;1)]^l2img_green[$letter]^i.inc[]}
}
^if(def $works.published){
$title[^s_values:reverse[$works.published]]
$i(0)^while($i < ^title.length[]){$letter[^title.mid($i;1)]^l2img_green[$letter]^i.inc[]}
}
^if(def ${works.link}){
$title[$works.link]

 ^;
$i(0)^while($i < ^title.length[]){$letter[^title.mid($i;1)]^l2img_blue[$letter]^i.inc[]}
}
^works.offset(+1)^ii.inc[]
}
@copyright[][title]
$title[Copyright 2005 - foxie's graphic design - foxie@foxie.ru]
$i(0)^while($i < ^title.length[]){$letter[^title.mid($i;1)]^l2img[$letter]^i.inc[]}