'$cdate' AND free LIKE 'Y'"; // Changed by Bharati $result=mysql_db_query($DATABASE,$query); $counts = mysql_num_rows($result); if(mysql_error()) error("Unexpected Error"); if(mysql_num_rows($result)) { while($row=mysql_fetch_row($result)) { $source_t=unserialize($row[0]); $s=""; $c=0; for($i=0;$i$pages_per_page) ($nextpg_to = $pages_per_page); else { if($count>$hits_per_page) { $nextpg_to = intval($count/$hits_per_page); if($count%$hits_per_page)$nextpg_to += 1; } else $nextpg_to = 1; } } if($count<=$hits_per_page)$to = $count-1; //*** 'From' and 'To' values displayed ** $display_from=$from+1; $pgno = intval($display_from/$hits_per_page)+1; (($to <= ($count+1)) && ($display_to=$to+1)) || ($display_to=$count); $page_select_format=" >"; //*** previous page links ** if($nextpg_from>0) { $prevpg_from = $nextpg_from-$pages_per_page; $prevpg_to = $nextpg_from; $prev_from = $nextpg_from*$hits_per_page-$hits_per_page; $prev_to = $prev_from +$hits_per_page -1; $prev_url = $scriptpath."". "hits_per_page=".r_($hits_per_page)."&". "sortby=".r_($sortby)."&". "sortorder=".r_($sortorder)."&". "from=$prev_from&to=$prev_to&nextpg_from=$prevpg_from&nextpg_to=$prevpg_to"; $page_select.="back "; } //*** Loop for printing the 1 2 3... Links ** for ($pageno=(1+$nextpg_from);$pageno <=($nextpg_to);$pageno++) { $temp=$page_select_format; $temp=ereg_replace("","$pageno","$temp"); $page_from=$pageno * $hits_per_page - $hits_per_page; $page_to= $page_from + $hits_per_page -1; if ($page_to >= ($count - 1)) { $page_to=$count - 1; } $page_path=$scriptpath."". "hits_per_page=".r_($hits_per_page)."&". "sortby=".r_($sortby)."&". "sortorder=".r_($sortorder)."&". "from=$page_from&to=$page_to&nextpg_from=$nextpg_from&nextpg_to=$nextpg_to"; if($pageno==$pgno)$temp = " $pgno"; else $temp=ereg_replace("","$page_path",$temp); $page_select .=$temp; } $numofpages = intval($count/$hits_per_page); if($count%$hits_per_page)$numofpages += 1; //*** For generating [>>] link ** if($nextpg_to<$numofpages) { $page_from += $hits_per_page; //*** assign $page_to for displaying the next set of records ** if($page_to<($count-$hits_per_page)) $page_to += $hits_per_page; else $page_to += $count%$hits_per_page; $nextpg_from = $nextpg_to; //*** assign $nextpg_to for displaying the next set of pages ** if($nextpg_to< ($numofpages-($numofpages%$pages_per_page))) $nextpg_to += $pages_per_page; else $nextpg_to +=($numofpages%$pages_per_page); //*** generate the next url ** $next_url = $scriptpath."". "hits_per_page=".r_($hits_per_page)."&". "sortby=".r_($sortby)."&". "sortorder=".r_($sortorder)."&". "from=$page_from&to=$page_to&nextpg_from=$nextpg_from&nextpg_to=$nextpg_to "; $page_select.=" more"; } // paging ends here $tname="table".time(); $sql="create table $tname( id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, head text, desc_s text, date_ir bigint(20), price text, source text, id_i bigint(20))"; $result=mysql_db_query($DATABASE,$sql); if(mysql_error()) error("Unexpected Error".mysql_Error().$sql); // $query="Select source, header, small_desc, date_ir, id, body from ynfx_mis_ir WHERE visibility='1' AND status ='a' AND date_display_from < '$cdate' AND date_display_to >'$cdate' order by date_ir desc"; $query="Select source, header, small_desc, date_ir, id, body from ynfx_mis_ir WHERE visibility='1' AND status ='a' AND free LIKE 'Y' AND date_display_from < '$cdate' AND date_display_to >'$cdate' order by date_ir desc"; // Changed by Bharati $result=mysql_db_query($DATABASE,$query); if(mysql_error()) error("Unexpected Error"); if(mysql_num_rows($result)) { while($row=mysql_fetch_row($result)) { $source_t=unserialize($row[0]); //print "=============".$source_t."
"; $header=stripslashes($row[1]); $desc=stripslashes($row[2]); $date_ir=stripslashes($row[3]); $id=$row[4]; $body=stripslashes($row[5]); $array=split("\^",$body); $price=rtrim($array[2]); $price=strip_tags ($price); $s=""; $c=0; for($i=0;$i"; $sqlcheck="select id from ynfx_mis_source where id in ($s)"; $resultcheck=mysql_db_query($DATABASE,$sqlcheck); if(mysql_error()) error("Unexpected Error".mysql_error().$sqlcheck); if(mysql_num_rows($resultcheck)) { $header=addslashes($row[1]); $desc=addslashes($row[2]); $insert="insert into $tname values(null,'$header','$desc','$date_ir','$price','$row[0]','$id')"; $resulti=mysql_db_query($DATABASE,$insert); if(mysql_error()) error("Unexpected Error"); } }//end of while }//end of if $query="Select head, desc_s, date_ir, id, id_i, price, source from $tname order by date_ir desc LIMIT $from, $hits_per_page"; $result=mysql_db_query($DATABASE,$query); if(mysql_error()) error("Unexpected Error"); $header_disp = "YnFx : Textile Industry Report - ".mysql_result($result,0,"head"); $body = mysql_result($result,0,"desc_s"); $query="Select head, desc_s, date_ir, id, id_i, price, source from $tname order by date_ir desc LIMIT $from, $hits_per_page"; $result=mysql_db_query($DATABASE,$query); if(mysql_error()) error("Unexpected Error"); if(mysql_num_rows($result)) { while($row=mysql_fetch_row($result)) { $source_t=unserialize($row[6]); $header=stripslashes($row[0]); $desc=stripslashes($row[1]); $date_ir=date("d M Y",stripslashes($row[2])); $id=$row[3]; $id_i=$row[4]; $price=$row[5]; $s=""; $c=0; for($i=0;$i"; $table.=""; $table.=""; $table.=" "; $table.=""; //$table.=""; //$table.="Full Story | Buy Now"; //$table.=""; $table.=""; $table.="View Full Report"; $table.=""; $table.=""; $table.=" "; $table.=""; $table.=""; $table.="
"; $table.=""; } }//end of while }//end of if $sql="drop table $tname"; $result=mysql_db_query($DATABASE,$sql); if(mysql_error()) error("Unexpected Error"); $colorofpopupbg="#D7F4FF"; ?> <? echo $header_disp ?>
Classification
Information Technology
Innovations and Product Developments
Market Overview
Miscellaneous
Product Synopsis
Regional Reports
Trade Fairs and Events
Trends and Analyses
All
?>
Market Intelligence

YarnsandFibers Reports"; else print ""; if($types == "F") print ""; else print ""; if($types == "T" || $types == "") print ""; else print ""; ?>
YarnsandFibers ReportsFree ReportsFree ReportsTextile Intelligence ReportsTextile Intelligence Reports
Total Reports: $froma - $toa"; ?>
$page_select"; ?> Show reports per page