@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 = ""; require_once "config.php"; include_once "functions_cipi.php"; require_once "login_top_script.php"; include "../rcontrol/config.php"; include_once "functions.php"; include "../rcontrol/config.php"; include "$SERVERPATH/rcommon/database.php"; include "$SERVERPATH/rcommon/functions.php"; if(empty($login)) setcookie("IN_IR_IS", $_SERVER['REQUEST_URI'], 0, "/","");//, 0, "/","" else setcookie("IN_IR_IS", NULL, 0, "/","");//, 0, "/","" $logindata = loggedin_($_SESSION['username'],$_SESSION['md5password']); //die($abc); //die($_SESSION["newabcabc"]); //fakhruddin: depending upon IE first check if logged in or not... if($logindata == 'Y') { $abc = $_SESSION["newabcabc"]; //header("location:/Cotton-intelligence-service"); //die; $sql= "SELECT memberlogin, memberexpdate FROM logger WHERE abc='$abc'"; $result = mysql_db_query($DATABASE,$sql) or die(mysql_error()); //if(mysql_error()) error("Unexpected Error"); $count = mysql_num_rows($result); //echo $sql; if ($count != 0) { $login=stripslashes(mysql_result($result,0,0)); $expdate=mysqltime_to_mktime(stripslashes(mysql_result($result,0,1))); $currenttime=time(); //echo "login".$login; $sql="select m.plan, m.id, m.country, ms.serviceid, ms.planid, ms.expdate from member m, memberservice ms where m.login=ms.login AND (ms.serviceid='29' or ms.serviceid='31') AND ms.expdate>='".date("Ymd")."' AND m.login='$login'"; $result=mysql_db_query($DATABASE,$sql); $planm=mysql_result($result,0,0); $mid=mysql_result($result,0,1); $mctry=mysql_result($result,0,2); $serviceid=mysql_result($result,0,3); $planIdNew=mysql_result($result,0,4); if($serviceid =='29' || $serviceid == '31') { header("location:/Cotton-intelligence-service"); exit; } if(($planm =='29~6')||($planm =='29~12')||($planm =='29~Grace Period')||($planm =='31~6')||($planm =='31~12')||($planm =='31~Grace Period')||($login =='demo.cipi@ynfx.com')) { header("location:/Cotton-intelligence-service"); exit; } else if($planm =='free') { header("location:/preferredsupplier/Cotton-intelligence-freeservice.php"); exit; } } } $module = "CottanIntelligence"; $services =29; $fr_report=get_fr_report_landing($module,$services); $ewr_report=get_ewr_report_landing($module,$services); //$findMainNews = "Select nid from content_type_news where field_cont_category_value = 'Main News' order by nid desc LIMIT 4"; $findMainNews = "Select nid from content_type_news order by nid desc LIMIT 4"; $findMainNewsresults = mysql_db_query(DB_NAME_DRUPAL, $findMainNews) or die(mysql_error().__LINE__); $findMainNewsrowcount = mysql_num_rows($findMainNewsresults); while($findMainNews = mysql_fetch_assoc($findMainNewsresults)) { $nid = $findMainNews['nid']; $selectposting = "Select nid , vid, uid, title, body,teaser,timestamp from node_revisions where nid = '$nid' "; $selectpostingexe = mysql_db_query(DB_NAME_DRUPAL, $selectposting) or die(mysql_error().__LINE__); $selectpostingrow = mysql_num_rows($selectpostingexe); $row = mysql_fetch_assoc($selectpostingexe); $nid= $row['nid']; $vid=$row['vid']; $uid=$row['uid']; $title=$row['title']; $body=$row['body']; $teaser=$row['teaser']; $date=date("d M , Y",$row['timestamp']); $finddate = "Select created from node where nid = '$nid'"; $finddateresults = mysql_db_query(DB_NAME_DRUPAL, $finddate) or die(mysql_error().__LINE__); $finddateresultsrow = mysql_num_rows($finddateresults); $finddaterow = mysql_fetch_assoc($finddateresults); $date=date("d M , Y",$finddaterow['created']); $src = "node/$nid"; $findlink = "Select dst from url_alias where src = '$src'"; //echo "findlink".$findlink; $findlinkresults = mysql_db_query(DB_NAME_DRUPAL, $findlink) or die(mysql_error().__LINE__); $findlinkresultsrow = mysql_num_rows($findlinkresults); $findlinkrow = mysql_fetch_assoc($findlinkresults); $dst= $findlinkrow['dst']; $news .="