`*[foxpro]
*small

local rts
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=''
sst_page='<table width=100% border=0><tbody>'

select &news
scan 


sst_page=sst_page+'<TR><TD style="PADDING-TOP: 10px" align=left class=blogpostdate>'+chr(13)

*select &news
*brow
*select &rules
*brow
*select &news


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 


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


sst_page=sst_page+sst_image


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_page=sst_page+'<A HREF="'+"i_news_page_"+padl(&news_id_,15,"0")+".html"+'" target=_blank>'+pp_short_+'</A>'+'<BR>'
	else
	sst_page=sst_page+pp_short_+"<BR>"
	endif 
endif 






sst_page=sst_page+'</TD></TR><TR><TD align=left class=blogpostdate>'
if (&rules__d)
sst_page=sst_page+alltr(ttoc((&news_datetime_)))
endif 
sst_page=sst_page+'</TD><TR><TD style="PADDING-BOTTOM: 10px" vAlign=top>'


sst_page=sst_page+'<BR><SPAN class=blogtextsm>'


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


sst_page=sst_page+'</SPAN><BR></TD></TR>'


endscan 




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

a__v_nselect=a__v_nselect-1

return sst_page



`