^macro_use[href.cfg] ^macro[header;ЛиТерра-Выставки] ^macro[menu;5]

Выставки

^var[blok;8] ^level[none; ^server[trush:andrew@localhost/literra; ^ifdef[query[]; ^context[quer; ^lsplit[^query[];&] ] ^context[name; ^sql[select Name from Show_main where id=^item[quer;0]]

^item[Name]

] ^context[photos; ^sql[select count(*) as kol from Show_Illustration where id_main=^item[quer;0]] ^var[vsego;^item[kol]] ^rem[Менюха с постраничностью] ^var[allpages;^eval[^eval[^var[vsego]-1]/blok]] ^cmp[^var[vsego];^var[blok]; ; ;^var[allpages;+;1]]
^for[i;1;allpages; ^cmp[^var[i];^var[allpages]; [ ^eval[i*blok-blok+1]-^eval[i*blok] ]; [ ^eval[allpages*blok-blok+1]-^var[vsego] ]; [ ^eval[i*blok-blok+1]-^eval[i*blok] ] ] ]
^var[first;^eval[^item[quer;1]*blok-blok]] ^cmp[^item[kol];^eval[^item[quer;1]*blok]; ^var[last;^eval[^item[kol]-1]]; ^var[last;^eval[^item[kol]-1]]; ^var[last;^eval[^item[quer;1]*blok-1]] ] ] ^context[photos1; ^sql[select * from Show_Illustration where id_main=^item[quer;0]] ^shift[^var[first]] ^var[lefft;0] ^for[i;^var[first];^var[last]; ^switch[^var[lefft]; ^case[0; ^var[lefft;1] ] ^case[1; ^var[lefft;0] ] ] ^shift[+1] ]
] ] ] ] ^macro[footer]