@session_start(); //require_once "common.php"; # test.php #error_reporting(E_ALL); #ini_set('display_errors','On'); //$mc = $_REQUEST['mc']; //$sc = $_REQUEST['sc']; $smc = ""; $ssc = ""; //echo "hiii"; //die(); require_once "config.php"; include_once "../preferredsupplier/functions_cipi.php"; require_once "../preferredsupplier/login_top_script.php"; include "../rcontrol/config.php"; include_once "functions.php"; //$product = "( (product like '%8%') OR (product like '%48%' and subproduct like'%8%') OR (product like '%48%' and subproduct like '%17%') ) and"; //$product = "product like '%8%' or product like '%19%' or product like '%80%' or product like '%83%' and" ; $selectposting = "Select id, header, date_news, body, country,classification,source,product,subproduct,status from ynfx_mis_news WHERE visibility='1' order by id desc LIMIT 2 "; //echo $selectposting; $selectpostingexe = mysql_db_query(DB_NAME_REVAMP, $selectposting) or die(mysql_error().__LINE__); $selectpostingrow = mysql_num_rows($selectpostingexe); $i = 1; while($row = mysql_fetch_assoc($selectpostingexe)) { $memid= $row['id']; $id=$row['id']; $header=$row['header']; $date=date("d M , Y",$row['date_news']); $body = strip_tags(stripslashes(substr($row['body'],0,250))); $country_n=stripslashes($row['country']); $cid = stripslashes($row['classification']); $SOURCE_news = unserialize($row['source']); $product = $row['product']; $subproduct = $row['subproduct']; $stat_ = stripslashes($row['status']); if($stat_ == 'r') $free_paid = 'Paid'; else $free_paid = 'Free'; $PRODUCT_news = unserialize($product); $SUBPRODUCT_news = unserialize($subproduct); if(!is_array($PRODUCT_news)) $PRODUCT_news=Array(); if(!is_array($SUBPRODUCT_news)) $SUBPRODUCT_news=Array(); $query_cl="Select name from ynfx_mis_classification WHERE enable='1' AND section ='IN' AND id='$cid'"; $result_cl=mysql_db_query(DB_NAME_REVAMP,$query_cl) or die(mysql_error().__LINE__); $row=mysql_fetch_array($result_cl); $cname=$row['name']; $sql_n="SELECT name FROM `ynfx_mis_source` WHERE `id` ='$SOURCE_news[0]' and enable='1'"; $result_n=mysql_db_query(DB_NAME_REVAMP,$sql_n) or die(mysql_error().__LINE__); if(mysql_error()) error("Unexpected ERROR"); $field = mysql_fetch_array($result_n); $type=$field['name']; foreach($PRODUCT_news as $p_id) { $sql_n="SELECT name FROM `ynfx_mis_product` WHERE `id` ='$p_id' and enable='1'"; $result_n=mysql_db_query(DB_NAME_REVAMP,$sql_n) or die(mysql_error().__LINE__); if(mysql_error()) error("Unexpected ERROR"); $field = mysql_fetch_array($result_n); $s_p_type = $field['name']; } if(eregi('N',$product)) { foreach($SUBPRODUCT_news as $s_id) { $sql_n="SELECT name FROM `ynfx_mis_subproducts` WHERE `id` ='$s_id' and enable='1'"; $result_n=mysql_db_query(DB_NAME_REVAMP,$sql_n) or die(mysql_error().__LINE__); if(mysql_error()) error("Unexpected ERROR"); $field = mysql_fetch_array($result_n); $s_p_type = $field['name']; } } $show=0; $COUNTRY_news = unserialize($country_n); $sql = sprintf("select * from ynfx_mis_news WHERE country like '%%%s%%'", serialize("114")); $sql="select name from ynfx_mis_country where id = '$COUNTRY_news[0]' and enable='1'"; $result1=mysql_db_query(DB_NAME_REVAMP,$sql) or die(mysql_error().__LINE__); if(mysql_error()) error("Unexpected ERROR"); $country = @mysql_result($result1,0,"name"); if(!$title) { $title = "Yarnsandfibers.com : Textile News - ".$country." : ".$header; } if(!$title_meta) { $title_meta .= "Yarnsandfibers.com : Textile News - ".$country." : ".$header; } else { $title_meta .= " || ".$country." : ".$header; } // SEO Murthy if($countrynews) { if(in_array($countrynews,$COUNTRY_news)) $show=1; } else { $show=1; } if($show) { $news .="