if(intval($chapterid)>0)
$condition=" AND chapter='$chapterid' ";
$MEETINGROWS=$commanclass->fetch_all_array("select sno from gns_newsletter where ondate>=curdate() $condition order by ondate,sno limit 0,1",1);
if($MEETINGROWS[sno]=="")
$MEETINGROWS=$commanclass->fetch_all_array("select sno from gns_newsletter where ondate < curdate() $condition order by ondate desc limit 0,1",1);
$path="/home/aiconsul/public_html/newaicadminpanel/files/newsletter/{$MEETINGROWS[sno]}.txt";
if(file_exists($path)){
ob_start();
include($path);
$defaultval=ob_get_contents();
ob_clean();
}
echo stripslashes($defaultval);?>
