@session_start();
require_once "config.php";
//require_once "formvalidator.php";
?>
session_start();
require_once "config.php";
include_once "functions.php";
if( isset($_POST['submit'])) {
$username = $_REQUEST['username'];
$password = $_REQUEST['password'];
$referer = $_REQUEST['referer'];
$md5password = md5($password);
include "opendb.php";
$logindata = "SELECT `srno`,`fname`,`country` FROM `member` WHERE `login` = '$username' and `password` = '$md5password' limit 1;";
$logindataexe = @mysql_db_query(DB_NAME, $logindata);
$logindatarow = @mysql_num_rows($logindataexe);
$memberregid = @mysql_result($logindataexe, 0, 0);
$memberfname = @mysql_result($logindataexe, 0, 1);
$membercountry = @mysql_result($logindataexe, 0, 2);
$activate = "SELECT `emailverify`, `regpmtid` FROM `memberverify` WHERE `memid`='$memberregid' limit 1;";
$activateexe = @mysql_db_query(DB_NAME, $activate);
$emailverify = @mysql_result($activateexe, 0, 0);
$regpmtid = @mysql_result($activateexe, 0, 1);
$regpayment = "SELECT `amount`, `pymtstatus`, `srno` FROM `payment` WHERE `memid`='$memberregid' limit 1";
$regpaymentexe = @mysql_db_query(DB_NAME, $regpayment);
$amount = @mysql_result($regpaymentexe, 0, 0);
$pymtstatus = @mysql_result($regpaymentexe, 0, 1);
$regpmtid1= @mysql_result($regpaymentexe, 0, 2);
if($regpmtid != $regpmtid1)
{
$regpmtid = $regpmtid1;
}
include "closedb.php";
if (($logindatarow == 1) && ($emailverify == "Y") && ($pymtstatus == "Y"))
{
include "opendb.php";
$logintrack ="INSERT INTO `ynfx_ps`.`logintrack` (`srno`, `memid`, `ipaddress`, `status`, `dtstamp`, `adminstatus`) VALUES (NULL, '$memberregid',
'".$_SERVER['REMOTE_ADDR']."', 'successful', NOW(), 'Y');";
$logintrackexe = @mysql_db_query(DB_NAME, $logintrack);
//include "closedb.php";
$_SESSION["username"] = $username;
$_SESSION["md5password"] = $md5password;
$_SESSION["memberregid"] = $memberregid;
//header('Location: '.$referer);
//-------------------------- create cookie for old Ynfx ----------------------------------------------
/*$host="localhost";
$dbname='ynfx_ps';
$user='root';
$password='';
$connection=mysql_connect($host,$user,$password) or die(mysql_error());
mysql_select_db($dbname,$connection) or die(mysql_error());
*/
$queryCookie="select * from ynfx_ps.member_map where ps_memid=".$memberregid;
$Getcookie=mysql_query($queryCookie);
$aCookie=mysql_fetch_array($Getcookie);
$numrows=mysql_num_rows($Getcookie);
$cookie_country = $aCookie['revamp_country'];
$cookie_contactperson = $aCookie['revamp_contactperson'];
$login=$aCookie['revamp_login'];
if($numrows==0)
{
$cookie_country = $membercountry;
$cookie_contactperson = $memberfname;
$login=$username;
}
$TIMEOUT = 10800;
$KEYSTRING = "Yarn";
function mktime_to_mysqltime1($string){
$yyyy = date("Y",$string);
$mm = date("m",$string);
$dd = date("d",$string);
$hh = date("H",$string);
$ii = date("i",$string);
$ss = date("s",$string);
$codedstring = $yyyy.$mm.$dd.$hh.$ii.$ss;
return $codedstring;
}
srand((double)microtime()*1000000);
$newabc = (string)rand().crypt($KEYSTRING);
$_SESSION["newabcabc"] = $newabc;
$logintime = mktime_to_mysqltime1(time());
$logouttime= mktime_to_mysqltime1(time()+$TIMEOUT);
$tmpdate = mktime_to_mysqltime1(time());
$sql_delete="DELETE FROM logger WHERE logouttime < $tmpdate"; mysql_db_query('ynfx_revamp',$sql_delete) or die(mysql_error());
$sql_delete1="DELETE FROM logger WHERE memberlogin = '$login'";
mysql_db_query('ynfx_revamp',$sql_delete1) or die(mysql_error());
$sql_insert1="INSERT INTO logger(abc,memberlogin,logouttime,memberexpdate) VALUES ('$newabc', '$login', $logouttime, '$expdate')";
mysql_db_query('ynfx_revamp',$sql_insert1) or die(mysql_error());
$sql_insert2="INSERT INTO logindata(id,memberlogin,logindate) VALUES (null, '$login', $logintime)";
mysql_db_query('ynfx_revamp',$sql_insert2) or die(mysql_error());
//mysql('ynfx_revamp', "INSERT INTO logger VALUES ('$newabc', '$login', $logouttime, $expdate)");
//mysql('ynfx_revamp', "INSERT INTO logindata VALUES (null, '$login', $logintime)");
setcookie("ghi", "$cookie_country", 0, "/","");
setcookie("def", "$cookie_contactperson", 0, "/","");
setcookie("abc", "$newabc", 0, "/","");
//echo $cookie_country;
//echo $memberregid;
//exit;
//------------------------ Create Cookie for Old Ynfx Ends ------------------------------------------
// Insert for who's online
$username=$_SESSION["username"];
$pawd=$_SESSION["md5password"];
$ip=$_SERVER['REMOTE_ADDR'];
include "opendb.php";
$sql_whosonline="insert into plus_login(srno,id,userid,ip,tm,status) VALUES('','','$username','$ip',NOW(),'ON')";
$result=mysql_db_query(DB_NAME,$sql_whosonline);
// end of who's online code
$companyprocheck = checkcompanyprofile($memberregid);
if ( $companyprocheck == "N")
{
//fakhruddin: for redirecting to perticular location if cookie is set i.e IR,IS,IN
if(isset($_COOKIE['IN_IR_IS'])){
($ur_l = $_COOKIE['IN_IR_IS']);
printf('', ($ur_l));
die();
}
header('Location: ./editcompanyprofile.php');
}
else
{
$checkprolist = checkproductlist($memberregid);
if ($checkprolist == "N")
{
header('Location: ./productcreation.php');
}
else
{
header('Location: ./pshome.php');
}
}
}
elseif ($emailverify == "Y")
{
include "opendb.php";
$logindata1 = "SELECT `srno` FROM `member` WHERE `login` = '$username' limit 1;";
$logindata1exe = @mysql_db_query(DB_NAME, $logindata1);
$logindata1row = @mysql_num_rows($logindata1exe);
$memberregid = @mysql_result($logindata1exe, 0, 0);
include "closedb.php";
if ($logindata1row == 1)
{
include "opendb.php";
$logintrack ="INSERT INTO `ynfx_ps`.`logintrack` (`srno`, `memid`, `ipaddress`, `status`, `dtstamp`, `adminstatus`) VALUES (NULL, '$memberregid',
'".$_SERVER['REMOTE_ADDR']."', 'unsuccessful', NOW(), 'Y');";
$logintrackexe = @mysql_db_query(DB_NAME, $logintrack);
include "closedb.php";
}
if ($pymtstatus == "N")
{
require_once ("libfuncs.php");
$key_32bit = "ae943a3e258d31fc51cf900d41786284";
$MerchantId = "ynfx"; //Merchant ID
$Amount = usd2inr($amount) * 100; //Amount should be in paisa
$OrderId = $regpmtid; //Invoice Number
$URL = "http://www.yarnsandfibers.com/ynfxps/payment.php?memid=$memberregid";
//$URL = "http://localhost/new/payment.php?memid=$memberregid"; //URL of your response Payment Page
$WorkingKey = $key_32bit;
$checksum = getchecksum($MerchantId, $Amount, $OrderId, $URL, $WorkingKey);
?>
You will now be redirect to payment gateway, as your payment for USD is pending against registration and leads fees.
exit;
}
$error = "true";
$errormsg = " Invalid Username and Password";
}
elseif ($pymtstatus == "N")
{
require_once ("libfuncs.php");
$key_32bit = "ae943a3e258d31fc51cf900d41786284";
$MerchantId = "ynfx"; //Merchant ID
$Amount = usd2inr($amount) * 100; //Amount should be in paisa
$OrderId = $regpmtid; //Invoice Number
$URL = "http://www.yarnsandfibers.com/ynfxps/payment.php?memid=$memberregid";
//$URL = "http://localhost/new/payment.php?memid=$memberregid"; //URL of your response Payment Page
$WorkingKey = $key_32bit;
$checksum = getchecksum($MerchantId, $Amount, $OrderId, $URL, $WorkingKey);
?>
You will now be redirect to payment gateway, as your payment for USD is pending against registration and leads fees.
exit;
}
else
{
$error = "true";
$errormsg = "Your Account is disabled, please activate. To activate account, click on the link in your e-mail";
if (($md5password == "") || ($username == ""))
{
$error = "true";
$errormsg = "Invalid username or password";
}
if (checklogin_username_password($username,$md5password) == "N")
{
$error = "true";
$errormsg = "Invalid username or password";
}
}
}
include_once "functions.php";
require_once "formvalidator.php";
?>
:: YNFX ::
include "../top_banner.php";?>
Member Login
include_once 'config.php';
include "opendb.php";
$cdate=mktime();
//fakhruddin: for paid and free in MI page
$status_ = "status ='a' or status='r'"; // r for paid news a for free
$inewsquery = "SELECT id, header, date_news FROM ynfx_mis_news WHERE visibility='1' AND ($status_) AND company !='1' AND date_display_from < '$cdate' AND date_display_to >'$cdate' order by date desc LIMIT 4";
$inewsresult = mysql_db_query("ynfx_revamp",$inewsquery);
//include "closedb.php";
$dispin = "";
if (mysql_error()) echo mysql_error();
$count = mysql_num_rows($inewsresult);
for ($i=0;$i<$count;$i++)
{
$id=mysql_result($inewsresult,$i,"id") ;
$date_news=mysql_result($inewsresult,$i,"date_news");
$body = mysql_result($inewsresult,$i,"header");
$dispin.= "
include_once 'config.php';
include "opendb.php";
$cdate=mktime();
$inewsquery = "select `id`, `header`, `small_desc`, `date_ir` from ynfx_mis_ir WHERE visibility='1' AND status ='a' and `special_type` = 'Y' order by date_display_from desc limit 4";
$inewsresult = mysql_db_query("ynfx_revamp",$inewsquery);
include "closedb.php";
$dispin = "";
if (mysql_error()) echo mysql_error();
$count = mysql_num_rows($inewsresult);
for ($i=0;$i<$count;$i++)
{
$id=mysql_result($inewsresult,$i,"id") ;
$date_news=mysql_result($inewsresult,$i,"date_ir");
$body = mysql_result($inewsresult,$i,"header");
$dispin.= "
include_once 'config.php';
include "opendb.php";
$cdate=mktime();
//fakhruddin: for including status a or r in MI page
$status_ = "status ='a' or status='r'"; // r for paid news a for free
$inewsquery = "select `id`, `header`, `small_desc`, `date_ir` from ynfx_mis_ir WHERE visibility='1' AND ($status_) and `special_type` = 'N' order by date_display_from desc limit 4";
$inewsresult = mysql_db_query("ynfx_revamp",$inewsquery);
//include "closedb.php";
$dispin = "";
if (mysql_error()) echo mysql_error();
$count = mysql_num_rows($inewsresult);
for ($i=0;$i<$count;$i++)
{
$id=mysql_result($inewsresult,$i,"id") ;
$date_news=mysql_result($inewsresult,$i,"date_ir");
$body = mysql_result($inewsresult,$i,"header");
$dispin.= "
Launched in 1998, YnFx.com is acknowledged as a leading provider of Textile Market Intelligence and Market Development, servicing members from across 150 countries. With an aspiration to be the one-stop-shop for the textile industry, YarnsandFibers.com has evolved to YnFx.com. It encompasses the entire textile chain from Fiber to Fabric. With changing business patterns, YnFx focuses on using online and offline mechanisms to bring people closer and deliver maximum value to members. YnFx has worked relentlessly to pursue its belief that effective Market Intelligence is the right information reaching the right person at the right time.
What's more, Registration is absolutely FREE!
Post your sell offers on the YnFx Preferred Supplier Program
Buyers contact you directly
Get Free Storefront thus enhancing online visibility for your company
Get brief summary of Textile Market Intelligence from all across the world
And much more…
What is Preferred Membership Plan?
YnFx Preferred Supplier Program offers a platform to the Suppliers who showcase their offerings on YnFx to interact with new and potential Buyers.
It acts as a cost effective marketing tool for business house to enhance their market reach to an international level.
More than 5000 visitors visit YnFx.com every day which helps you with more and more visibility to compete with national and international markets.
What are the features?
Make your company Visible free of cost with YnFx’s Preferred Supplier Program
Get a storefront displaying your company profile, products from where Buyers can contact you directly
Upload number of products in no time and simple process
Get authenticate buyer contacting you for your product
What are the benefits?
Fast and economical way to get new buyers through out the globe
Benefit from the highly visited and used sourcing platform