`*[foxpro]
*rows
local rts
local ng_sst,sst_image,sst_page,ksst,sst_page1,pp_short_

rts=select()

local rules,news
rules=cur_a_rules_main_news()
news=cur_a_ppn_table_news()


*local nnrec
*select &rules
*nnrec=recno()



local rules__vp,news_pict_rules,news_id_pict_,rules__s,rules__fmax,rules__fmaxs,news_short_,rules__sl,news_id_,rules__d,news_datetime_,rules__f,news_full_,rules_pict_rul
rules__vp=rules+".__vp"
*news_pict_rules=news+".pict_rul"
news_id_pict_=news+".id_pict_"
rules__s=rules+".__s"
rules__fmax=rules+ ".__fmax"
rules__fmaxs=rules+ ".__fmaxs"
news_short_=news+ ".short_"
rules__sl=rules+ ".__sl"
news_id_=news+".id_"
rules__d=rules+ ".__d"
news_datetime_=news+ ".datetime_"
rules__f=rules+ ".__f"
news_full_=news+ ".full_"
rules_pict_rul=rules+".pict_rul"



ng_sst='<table border=0 width=100% ><TBODY class=text>'
sst_page=''

select &news
scan 
ng_sst=ng_sst+"<TR><TD width=10%>"
sst_page=''

if &rules__vp
sst_image=a_funcfox(aa_el_style_func_news_pic_gen,&rules_pict_rul,&news_id_pict_,&news_id_,.f.)
*a_picture_gen(&rules_pict_rul,&news_id_pict_,&news_id_)
select &news
else
sst_image=""
endif 
sst_page=sst_image


*select &rules
*if nnrec<>0
*go nnrec
*endif 
*Select &news




ksst='</TD><TD class=text vAlign=top align=left>'
sst_page1=""

if &rules__d
sst_page1=sst_page1+alltr(ttoc(&news_datetime_))+" "
endif 

if &rules__s
	if &rules__fmax and &rules__fmaxs>0
		pp_short_=alltr(left(&news_short_,&rules__fmaxs))+"..."
	else 
		pp_short_=alltr(&news_short_)	
	endif 

	if &rules__sl
	sst_page1=sst_page1+'<A HREF="'+www_+"i_news_page_"+padl(&news_id_,15,"0")+".html"+'" target=_blank>'+pp_short_+'</A>'+'<BR>'
	else
	sst_page1=sst_page1+pp_short_+"<BR>"
	endif 
endif 




if &rules__f
	sst_page1=sst_page1+alltr(&news_full_)+""
endif 




ng_sst=ng_sst+sst_page+ksst+sst_page1
ng_sst=ng_sst+"</TD></TR>"
endscan 




select (rts)
ng_sst=ng_sst+"</TBODY></TABLE>"

a__v_nselect=a__v_nselect-1

return ng_sst



`