menus.fnc
Программа генерации "верхнего" меню.
`*[foxpro] *menus Select a_formir cs_recno=Recno() s_id_=id_ s_order_ur=order_ur s__stroka=__stroka s__uroven=__uroven s_parent_id=parent_id s_gruppa_id=gruppa_id s_order_grup=order_grup s_oglav=oglav tts="" Select * From a_formir Where (__uroven=0 ) And (Not Deleted()) And notmenu=.F. Into Cursor tt_main Order By __stroka,order_ur,order_grup iii=0 tt_gruppa_id=-1 If Reccount()<>0 Scan pp_recno=Recno() Select name,oglav From a_formir Where parent_id=tt_main.id_ And (Not Deleted()) And notmenu = .F. And parent_id<>0 Into Cursor tt_childe_dop Order By order_ur,order_grup select tt_main if types=2 and reccount("tt_childe_dop")<>0 tts=tts+'<TD><TABLE height=29 cellSpacing=0 cellPadding=0 border=0><TBODY><TR><TD onmouseover=show('+Alltr(Str(iii))+') onmouseout=hidden('+Alltr(Str(iii))+')><A class=topmenu'+Iif(__stroka=s__stroka,'act','')+Chr(13)+Chr(10)+; ' href="'+www_+Alltr(tt_childe_dop.Name)+'"><NOBR> '+Alltr(tt_main.oglav)+' </NOBR></A></TD>'+Chr(13)+Chr(10)+; ' <TD width=0%><IMG height=12 alt=""' +Chr(13)+Chr(10)+; ' src="topmenu_separator.gif" '+Chr(13)+Chr(10)+; ' width=7></TD></TR></TBODY></TABLE>'+Chr(13)+Chr(10)+; ' <DIV style="WIDTH: 100%; POSITION: relative">'+Chr(13)+Chr(10)+; ' <DIV id=menu'+Alltr(Str(iii))+' onmouseover=show('+Alltr(Str(iii))+') '+Chr(13)+Chr(10)+; ' style="Z-INDEX: 1; VISIBILITY: hidden; POSITION: absolute; TOP: 0px" '+Chr(13)+Chr(10)+; ' onmouseout=hidden('+Alltr(Str(iii))+')>'+Chr(13)+Chr(10) else tts=tts+'<TD><TABLE height=29 cellSpacing=0 cellPadding=0 border=0><TBODY><TR><TD onmouseover=show('+Alltr(Str(iii))+') onmouseout=hidden('+Alltr(Str(iii))+')><A class=topmenu'+Iif(__stroka=s__stroka,'act','')+Chr(13)+Chr(10)+; ' href="'+www_+Alltr(tt_main.Name)+'"><NOBR> '+Alltr(tt_main.oglav)+' </NOBR></A></TD>'+Chr(13)+Chr(10)+; ' <TD width=0%><IMG height=12 alt=""' +Chr(13)+Chr(10)+; ' src="topmenu_separator.gif" '+Chr(13)+Chr(10)+; ' width=7></TD></TR></TBODY></TABLE>'+Chr(13)+Chr(10)+; ' <DIV style="WIDTH: 100%; POSITION: relative">'+Chr(13)+Chr(10)+; ' <DIV id=menu'+Alltr(Str(iii))+' onmouseover=show('+Alltr(Str(iii))+') '+Chr(13)+Chr(10)+; ' style="Z-INDEX: 1; VISIBILITY: hidden; POSITION: absolute; TOP: 0px" '+Chr(13)+Chr(10)+; ' onmouseout=hidden('+Alltr(Str(iii))+')>'+Chr(13)+Chr(10) endif tts=tts+Chr(13)+Chr(10) Select * From a_formir Where parent_id=tt_main.id_ And (Not Deleted()) And notmenu = .F. And parent_id<>0 Into Cursor tt_childe Order By order_ur,order_grup select tt_childe ttt_gruppa_id=-1 Select tt_childe If Reccount()<>0 tts=tts+; ' <TABLE cellSpacing=0 cellPadding=0 width=110 border=0>'+Chr(13)+Chr(10)+; ' <TBODY>'+Chr(13)+Chr(10)+; ' <TR>'+Chr(13)+Chr(10)+; " <TD vAlign=top>"+Chr(13)+Chr(10)+; ' <TABLE cellSpacing=0 cellPadding=0 width="100%" '+Chr(13)+Chr(10)+; ' border=0>'+Chr(13)+Chr(10)+; ' <TBODY>'+Chr(13)+Chr(10) tts=tts+Chr(13)+Chr(10) Scan Select name,oglav From a_formir Where parent_id=tt_childe.id_ And (Not Deleted()) And notmenu = .F. And parent_id<>0 Into Cursor tt_childe_dop_dop Order By order_ur,order_grup select tt_childe if types=2 and reccount("tt_childe_dop_dop")<>0 tts=tts+; ' <TR vAlign=top>'+Chr(13)+Chr(10)+; ' <TD class=popupmenu '+Chr(13)+Chr(10)+; ' onmouseover="this.className='+"'popupmenuact' "+'"'+Chr(13)+Chr(10)+; ' style="CURSOR: hand" '+Chr(13)+Chr(10)+; ' onclick="window.location='+ "'"+www_+Alltr(tt_childe_dop_dop.Name)+"'"+'"'+Chr(13)+Chr(10)+; ' onmouseout="this.className='+ "'popupmenu'"+'"'+Chr(13)+Chr(10)+; ' noWrap><NOBR><A style="TEXT-DECORATION: none" '+Chr(13)+Chr(10)+; ' href="'+www_+Alltr(tt_childe_dop_dop.Name)+'"><FONT '+Chr(13)+Chr(10)+; ' class=popupmenutext> '+Chr(13)+Chr(10)+; alltr(tt_childe.oglav)+'</FONT></A></NOBR></TD></TR>'+Chr(13)+Chr(10) else tts=tts+; ' <TR vAlign=top>'+Chr(13)+Chr(10)+; ' <TD class=popupmenu '+Chr(13)+Chr(10)+; ' onmouseover="this.className='+"'popupmenuact' "+'"'+Chr(13)+Chr(10)+; ' style="CURSOR: hand" '+Chr(13)+Chr(10)+; ' onclick="window.location='+ "'"+www_+Alltr(tt_childe.Name)+"'"+'"'+Chr(13)+Chr(10)+; ' onmouseout="this.className='+ "'popupmenu'"+'"'+Chr(13)+Chr(10)+; ' noWrap><NOBR><A style="TEXT-DECORATION: none" '+Chr(13)+Chr(10)+; ' href="'+www_+Alltr(tt_childe.Name)+'"><FONT '+Chr(13)+Chr(10)+; ' class=popupmenutext> '+Chr(13)+Chr(10)+; alltr(tt_childe.oglav)+'</FONT></A></NOBR></TD></TR>'+Chr(13)+Chr(10) endif tts=tts+Chr(13)+Chr(10) Endscan tts=tts+'</TBODY></TABLE></TD></TR></TBODY></TABLE>'+Chr(13)+Chr(10) tts=tts+Chr(13)+Chr(10) Endif tts=tts+'</DIV></DIV></TD>'+Chr(13)+Chr(10) Select tt_main Go pp_recno iii=iii+1 Endscan Endif tts=tts+'</TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></DIV></TD>'+Chr(13) Select a_formir Go cs_recno Return tts `
create by Maple
4
Site Creator 5/2008
Контакты
Поиск
Карта сайта