"; echo""; while($row=mysql_fetch_row($result)) { $id=$row[0]; $name=stripslashes($row[1]); echo ""; }//end of while echo""; // $header.= " "; }//end of if return($header); }//end of function function mysqltime_to_mktime_($string){ $yyyy = substr($string, 0, 4); $mm = substr($string, 4, 2); $dd = substr($string, 6, 2); $hh = substr($string, 8, 2); $ii = substr($string, 10, 2); $ss = substr($string, 12, 2); $codedstring = mktime($hh,$ii,$ss,$mm,$dd,$yyyy); return $codedstring; } function mktime_to_mysqltime_($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; } function getExtension($str) { $i = strrpos($str,"."); if (!$i) { return ""; } $l = strlen($str) - $i; $ext = substr($str,$i+1,$l); return $ext; } function one_wordwrap($string,$width){ $s=explode(" ", $string); foreach ($s as $k=>$v) { $cnt=strlen($v); if($cnt>$width) $v=wordwrap($v, $width, "
", true); $new_string.="$v "; } return $new_string; } function wordWrapIgnoreHTML($string, $length = 70, $wrapString = "\n") { $wrapped = ''; $word = ''; $html = false; $string = (string) $string; for($i=0;$i') { $html = false; $wrapped .= $char; } /** If this is inside HTML -> append to the wrapped string */ elseif($html) { $wrapped .= $char; } /** Whitespace characted / new line */ elseif($char === ' ' || $char === "\t" || $char === "\n") { $wrapped .= $word.$char; $word = ''; } /** Check chars */ else { $word .= $char; if(strlen($word) > $length) { $wrapped .= $word.$wrapString; $word = ''; } } } if($word !== ''){ $wrapped .= $word; } return $wrapped; } function totalleads($id) { include_once "config.php"; include "opendb.php"; $paymentinr = "SELECT sum(`leads`) FROM `leads` WHERE `memid`='$id';"; $paymentinrexe = mysql_db_query(DB_NAME, $paymentinr); $totalinr = @mysql_result($paymentinrexe, 0, 0); include "closedb.php"; if ($totalinr == "") { return "0"; } else { return $totalinr; } } function leadsused($id) { include_once "config.php"; include "opendb.php"; $paymentinr = "SELECT count(*) FROM `leadsused` WHERE `memid`='$id';"; $paymentinrexe = mysql_db_query(DB_NAME, $paymentinr); $totalinr = @mysql_result($paymentinrexe, 0, 0); include "closedb.php"; return $totalinr; } function payment2leads($payment) { if ($payment == "25") { return "10"; } elseif ($payment == "50") { return "22"; } elseif ($payment == "125") { return "55"; } } function leads2payment($leads) { if ($leads == "10") { return "25"; } elseif ($leads == "22") { return "50"; } elseif ($leads == "55") { return "125"; } } function usd2inr($usd) { include_once "config.php"; include "opendb.php"; $paymentinr = "SELECT `inr` FROM `currency` ORDER BY `dtstamp` LIMIT 1 "; $paymentinrexe = mysql_db_query(DB_NAME, $paymentinr); $totalinr = @mysql_result($paymentinrexe, 0, 0); return ($usd * $totalinr); include "closedb.php"; } function inr2usd($inr) { include_once "config.php"; include "opendb.php"; $paymentinr = "SELECT `inr` FROM `currency` ORDER BY `dtstamp` LIMIT 1 "; $paymentinrexe = mysql_db_query(DB_NAME, $paymentinr); $totalinr = @mysql_result($paymentinrexe, 0, 0); return ($inr / $totalinr); include "closedb.php"; } function loggedin($username,$password) { //die($username . $password . "
"); include_once "config.php"; include "opendb.php"; $logindata = "SELECT `srno` FROM `member` WHERE `login` = '$username' and `password` = '$password' limit 1;"; $logindataexe = @mysql_db_query(DB_NAME, $logindata); $logindatarow = @mysql_num_rows($logindataexe); include "closedb.php"; if ($logindatarow == "1") { return "Y"; } else { return "N"; } } function checklogin_username_password($username,$password) { include_once "config.php"; include "opendb.php"; $logindata = "SELECT `srno` FROM `member` WHERE `login` = '$username' and `password` = '$password' limit 1;"; $logindataexe = @mysql_db_query(DB_NAME, $logindata); $logindatarow = @mysql_num_rows($logindataexe); include "closedb.php"; if ($logindatarow == "1") { return "Y"; } else { return "N"; } } function iptocountry($ip) { $numbers = preg_split( "/\./", $ip); include("ip_files/".$numbers[0].".php"); $code=($numbers[0] * 16777216) + ($numbers[1] * 65536) + ($numbers[2] * 256) + ($numbers[3]); foreach($ranges as $key => $value){ if($key<=$code){ if($ranges[$key][0]>=$code){$two_letter_country_code=$ranges[$key][1];break;} } } if ($two_letter_country_code==""){$two_letter_country_code="unkown";} return $two_letter_country_code; } function successfullogin($memid) { include_once "config.php"; //date_default_timezone_set("Asia/Kolkata"); include "opendb.php"; $successlogin = "SELECT DATE_FORMAT(`dtstamp`, '%M %D, %Y') as `dtstamp` FROM `logintrack` WHERE `memid` = '$memid' and `status` = 'successful' ORDER BY `srno` DESC LIMIT 1,1;"; $successloginexe = @mysql_db_query(DB_NAME, $successlogin); $successloginrow = @mysql_num_rows($successloginexe); $successlogindate = @mysql_result($successloginexe, 0, 0); include "closedb.php"; if ($successloginrow == 1) { //$successdatetime = date_create($successlogindate); //return date_format($successdatetime, 'd/m/Y h:i:s a'); return $successlogindate; } else { return "NIL"; } } function unsuccessfullogin($memid) { include_once "config.php"; //date_default_timezone_set("Asia/Kolkata"); include "opendb.php"; $successlogin = "SELECT DATE_FORMAT(`dtstamp`, '%M %D, %Y') as `dtstamp` FROM `logintrack` WHERE `memid` = '$memid' and `status` = 'unsuccessful' ORDER BY `srno` DESC LIMIT 1;"; $successloginexe = @mysql_db_query(DB_NAME, $successlogin); $successloginrow = @mysql_num_rows($successloginexe); $successlogindate = @mysql_result($successloginexe, 0, 0); include "closedb.php"; if ($successloginrow == 1) { //$successdatetime = date_create($successlogindate); //return date_format($successdatetime, 'd/m/Y h:i:s a'); return $successlogindate; } else { return "NIL"; } } function checkcompanyprofile($memid) { include_once "config.php"; include "opendb.php"; $companyprofile = "SELECT `companyprofile` FROM `company` WHERE `memid`='$memid' limit 1;"; $companyprofileexe = @mysql_db_query(DB_NAME, $companyprofile); $companyprofilerow = @mysql_num_rows($companyprofileexe); $companyprofiledata = @mysql_result($companyprofileexe, 0, 0); include "closedb.php"; if (strlen($companyprofiledata) <= 199) { return "N"; } else { return "Y"; } } function checkproductlist($memid) { include_once "config.php"; include "opendb.php"; $companyprofile = "SELECT count(*) FROM `newposting` WHERE `memid`='$memid';"; $companyprofileexe = @mysql_db_query(DB_NAME, $companyprofile); $companyprofilerow = @mysql_num_rows($companyprofileexe); $companyprofiledata = @mysql_result($companyprofileexe, 0, 0); include "closedb.php"; if ($companyprofiledata == '0' ) { return "N"; } else { return "Y"; } } function checkproductandprofile($memid) { include_once "config.php"; include "opendb.php"; $companyprofile = "SELECT `companyprofile` FROM `company` WHERE `memid`='$memid' limit 1;"; $companyprofileexe = @mysql_db_query(DB_NAME, $companyprofile); $companyprofilerow = @mysql_num_rows($companyprofileexe); $companyprofiledata = @mysql_result($companyprofileexe, 0, 0); include "closedb.php"; if (strlen($companyprofiledata) <= 199) { return "N"; } else { include "opendb.php"; $companyprofile = "SELECT count(*) FROM `newposting` WHERE `memid`='$memid';"; $companyprofileexe = @mysql_db_query(DB_NAME, $companyprofile); $companyprofilerow = @mysql_num_rows($companyprofileexe); $companyprofiledata1 = @mysql_result($companyprofileexe, 0, 0); include "closedb.php"; if ($companyprofiledata1 == '0' ) { return "N"; } else { return "Y"; } } } function companyprofile($memid) { return ""; } function nameofperson($memid) { include_once "config.php"; include "opendb.php"; $nameofperson = "SELECT `fname`, `lname` FROM `member` WHERE `srno` = '$memid' limit 1;"; $nameofpersonexe = @mysql_db_query(DB_NAME, $nameofperson); $nameofpersonrow = @mysql_num_rows($nameofpersonexe); $nameofpersondata1 = @mysql_result($nameofpersonexe, 0, 0); $nameofpersondata2 = @mysql_result($nameofpersonexe, 0, 1); include "closedb.php"; return $nameofpersondata1 . " " . $nameofpersondata2; } function personemailid($memid) { include_once "config.php"; include "opendb.php"; $nameofperson = "SELECT `login` FROM `member` WHERE `srno` = '$memid' limit 1;"; $nameofpersonexe = @mysql_db_query(DB_NAME, $nameofperson); $nameofpersonrow = @mysql_num_rows($nameofpersonexe); $nameofpersondata1 = @mysql_result($nameofpersonexe, 0, 0); include "closedb.php"; return $nameofpersondata1; } function verifybuyer($buyeremail) { include_once "config.php"; include "opendb.php"; $buyerverify = "SELECT `verify` FROM `buyerverify` WHERE `emailid` = '$buyeremail' limit 1"; $buyerverifyexe = @mysql_db_query(DB_NAME, $buyerverify); $buyerverifyrow = @mysql_num_rows($buyerverifyexe); $buyerverifydata = @mysql_result($buyerverifyexe, 0, 0); include "closedb.php"; return $buyerverifydata; } function personaddress($memid) { include_once "config.php"; include "opendb.php"; $nameofperson = "SELECT `address1`, `address2`, `city`, `state`, `country`, `zipcode`, `telephone` FROM `member` WHERE `srno` = '$memid' limit 1;"; $nameofpersonexe = @mysql_db_query(DB_NAME, $nameofperson); $nameofpersonrow = @mysql_num_rows($nameofpersonexe); $nameofpersondata1 = @mysql_result($nameofpersonexe, 0, 0); $nameofpersondata2 = @mysql_result($nameofpersonexe, 0, 1); $nameofpersondata3 = @mysql_result($nameofpersonexe, 0, 2); $nameofpersondata4 = @mysql_result($nameofpersonexe, 0, 3); $nameofpersondata5 = @mysql_result($nameofpersonexe, 0, 4); $nameofpersondata6 = @mysql_result($nameofpersonexe, 0, 5); $nameofpersondata7 = @mysql_result($nameofpersonexe, 0, 6); include "closedb.php"; return $nameofpersondata1.'
'.$nameofpersondata2.', '.$nameofpersondata3.'
'.$nameofpersondata4.', '.$nameofpersondata5.' - '.$nameofpersondata6.'
Tel : '.$nameofpersondata7; } function leadingzeros($value, $places){ if(is_numeric($value)){ for($x = 1; $x <= $places; $x++){ $ceiling = pow(10, $x); if($value < $ceiling){ $zeros = $places - $x; for($y = 1; $y <= $zeros; $y++){ $leading .= "0"; } $x = $places + 1; } } $output = $leading . $value; } else{ $output = $value; } return $output; } function maincategory($id) { include_once "config.php"; include "opendb.php"; $nameofperson = "SELECT `name` FROM `maincategory` WHERE `srno`='$id' and `adminstatus`='YES' limit 1"; $nameofpersonexe = @mysql_db_query(DB_NAME, $nameofperson); $nameofpersonrow = @mysql_num_rows($nameofpersonexe); $data1 = @mysql_result($nameofpersonexe, 0, 0); include "closedb.php"; return $data1; } function subcategory($id) { include_once "config.php"; include "opendb.php"; $nameofperson = "SELECT `name` FROM `subcategory` WHERE `srno`='$id' and `adminstatus`='YES' limit 1"; $nameofpersonexe = @mysql_db_query(DB_NAME, $nameofperson); $nameofpersonrow = @mysql_num_rows($nameofpersonexe); $data1 = @mysql_result($nameofpersonexe, 0, 0); include "closedb.php"; return $data1; } function product($id) { include_once "config.php"; include "opendb.php"; $nameofperson = "SELECT `name` FROM `products` WHERE `srno`='$id' and `adminstatus`='YES' limit 1"; $nameofpersonexe = @mysql_db_query(DB_NAME, $nameofperson); $nameofpersonrow = @mysql_num_rows($nameofpersonexe); $data1 = @mysql_result($nameofpersonexe, 0, 0); include "closedb.php"; return $data1; } function postingidtitle($id) { include_once "config.php"; include "opendb.php"; $nameofperson = "SELECT `prodtitle` FROM `newposting` WHERE `srno`='$id' limit 1"; $nameofpersonexe = @mysql_db_query(DB_NAME, $nameofperson); $nameofpersonrow = @mysql_num_rows($nameofpersonexe); $data1 = @mysql_result($nameofpersonexe, 0, 0); include "closedb.php"; return $data1; } function getProductId($id) { include_once "config.php"; include "opendb.php"; $nameofperson = "SELECT `srno` FROM `newposting` WHERE `memid`='$id' limit 1"; $nameofpersonexe = @mysql_db_query(DB_NAME, $nameofperson); $nameofpersonrow = @mysql_num_rows($nameofpersonexe); $data1 = @mysql_result($nameofpersonexe, 0, 0); include "closedb.php"; return $data1; } function getCompanyId($id) { include_once "config.php"; include "opendb.php"; $companyname = "SELECT srno FROM `company` WHERE `memid`='$id' limit 1"; $companynameexe = @mysql_db_query(DB_NAME, $companyname); $companynamerow = @mysql_num_rows($companynameexe); $data1 = @mysql_result($companynameexe, 0, 0); include "closedb.php"; return $data1; } function companyname($id) { include_once "config.php"; include "opendb.php"; $companyname = "SELECT `companyname` FROM `company` WHERE `memid`='$id' limit 1"; $companynameexe = @mysql_db_query(DB_NAME, $companyname); $companynamerow = @mysql_num_rows($companynameexe); $data1 = @mysql_result($companynameexe, 0, 0); include "closedb.php"; return $data1; } function enquiryproductcount($id,$memid) { include_once "config.php"; include "opendb.php"; $companyname = "SELECT count(*) FROM `enquiry` WHERE `memid`='$memid' and `prodid`='$id' and `adminstatus` ='Y'"; $companynameexe = @mysql_db_query(DB_NAME, $companyname); $companynamerow = @mysql_num_rows($companynameexe); $data1 = @mysql_result($companynameexe, 0, 0); include "closedb.php"; return $data1; } function enquiryproductcountnocomp($id,$memid) { include_once "config.php"; include "opendb.php"; $companyname = "SELECT count(*) FROM `enquiry` WHERE `memid`!='$memid' and `prodid`='$id' and `adminstatus` ='Y'"; $companynameexe = @mysql_db_query(DB_NAME, $companyname); $companynamerow = @mysql_num_rows($companynameexe); $data1 = @mysql_result($companynameexe, 0, 0); include "closedb.php"; return $data1; } function profilecompany($id) { include_once "config.php"; include "opendb.php"; $companyname = "SELECT `companyprofile` FROM `company` WHERE `memid`='$id' limit 1"; $companynameexe = @mysql_db_query(DB_NAME, $companyname); $companynamerow = @mysql_num_rows($companynameexe); $data1 = @mysql_result($companynameexe, 0, 0); include "closedb.php"; return $data1; } function companylogo($id) { include_once "config.php"; include "opendb.php"; $companyname = "SELECT `companylogo` FROM `company` WHERE `memid`='$id' limit 1"; $companynameexe = @mysql_db_query(DB_NAME, $companyname); $companynamerow = @mysql_num_rows($companynameexe); $data1 = @mysql_result($companynameexe, 0, 0); include "closedb.php"; return $data1; } function companyimage1($id) { include_once "config.php"; include "opendb.php"; $companyname = "SELECT `companyimage1` FROM `company` WHERE `memid`='$id' limit 1"; $companynameexe = @mysql_db_query(DB_NAME, $companyname); $companynamerow = @mysql_num_rows($companynameexe); $data1 = @mysql_result($companynameexe, 0, 0); include "closedb.php"; return $data1; } function companyimage2($id) { include_once "config.php"; include "opendb.php"; $companyname = "SELECT `companyimage2` FROM `company` WHERE `memid`='$id' limit 1"; $companynameexe = @mysql_db_query(DB_NAME, $companyname); $companynamerow = @mysql_num_rows($companynameexe); $data1 = @mysql_result($companynameexe, 0, 0); include "closedb.php"; return $data1; } function companyimage3($id) { include_once "config.php"; include "opendb.php"; $companyname = "SELECT `companyimage3` FROM `company` WHERE `memid`='$id' limit 1"; $companynameexe = @mysql_db_query(DB_NAME, $companyname); $companynamerow = @mysql_num_rows($companynameexe); $data1 = @mysql_result($companynameexe, 0, 0); include "closedb.php"; return $data1; } function maincatcount($id) { include_once "config.php"; include "opendb.php"; $maincatcount = "SELECT count(*) FROM `newposting` WHERE `maincatid`='$id' and `adminstatus`='Y'"; $maincatcountexe = @mysql_db_query(DB_NAME, $maincatcount); $companynamerow = @mysql_num_rows($maincatcountexe); $data1 = @mysql_result($maincatcountexe, 0, 0); return $data1; } function memmaincatcount($id,$memid) { include_once "config.php"; include "opendb.php"; $maincatcount = "SELECT count(*) FROM `newposting` WHERE `maincatid`='$id' and `adminstatus`='Y' and `memid`='$memid'"; $maincatcountexe = @mysql_db_query(DB_NAME, $maincatcount); $companynamerow = @mysql_num_rows($maincatcountexe); $data1 = @mysql_result($maincatcountexe, 0, 0); if ($data1 == "") { return "0"; } else { return $data1; } } function totalpostingcount() { include_once "config.php"; include "opendb.php"; $maincatcount = "SELECT count(*) FROM `newposting` WHERE `adminstatus`='Y'"; $maincatcountexe = @mysql_db_query(DB_NAME, $maincatcount); $companynamerow = @mysql_num_rows($maincatcountexe); $data1 = @mysql_result($maincatcountexe, 0, 0); return $data1; } function memtotalpostingcount($id) { include_once "config.php"; include "opendb.php"; $maincatcount = "SELECT count(*) FROM `newposting` WHERE `adminstatus`='Y' and `memid`='$id'"; $maincatcountexe = @mysql_db_query(DB_NAME, $maincatcount); $companynamerow = @mysql_num_rows($maincatcountexe); $data1 = @mysql_result($maincatcountexe, 0, 0); return $data1; } function postingproductname($id) { include_once "config.php"; include "opendb.php"; $maincatcount = "SELECT `product` FROM `newposting` WHERE `srno`='$id' limit 1"; $maincatcountexe = @mysql_db_query(DB_NAME, $maincatcount); $companynamerow = @mysql_num_rows($maincatcountexe); $data1 = @mysql_result($maincatcountexe, 0, 0); return $data1; } function postingproducttitle($id) { include_once "config.php"; include "opendb.php"; $maincatcount = "SELECT `prodtitle` FROM `newposting` WHERE `srno`='$id' limit 1"; $maincatcountexe = @mysql_db_query(DB_NAME, $maincatcount); $companynamerow = @mysql_num_rows($maincatcountexe); $data1 = @mysql_result($maincatcountexe, 0, 0); return $data1; } function postingsellingtype($id) { include_once "config.php"; include "opendb.php"; $maincatcount = "SELECT `sellingtype` FROM `newposting` WHERE `srno`='$id' limit 1"; $maincatcountexe = @mysql_db_query(DB_NAME, $maincatcount); $companynamerow = @mysql_num_rows($maincatcountexe); $data1 = @mysql_result($maincatcountexe, 0, 0); return $data1; } function postingcountryoforigin($id) { include_once "config.php"; include "opendb.php"; $maincatcount = "SELECT `placeoforigin` FROM `newposting` WHERE `srno`='$id' limit 1"; $maincatcountexe = @mysql_db_query(DB_NAME, $maincatcount); $companynamerow = @mysql_num_rows($maincatcountexe); $data1 = @mysql_result($maincatcountexe, 0, 0); return $data1; } function postingproductid($id) { include_once "config.php"; include "opendb.php"; $maincatcount = "SELECT `prodid` FROM `posting` WHERE `srno`='$id' limit 1"; $maincatcountexe = @mysql_db_query(DB_NAME, $maincatcount); $companynamerow = @mysql_num_rows($maincatcountexe); $data1 = @mysql_result($maincatcountexe, 0, 0); return $data1; } function postingcompanyname($id) { include_once "config.php"; include "opendb.php"; $maincatcount = "SELECT `compnayname` FROM `newposting` WHERE `srno`='$id' limit 1"; $maincatcountexe = @mysql_db_query(DB_NAME, $maincatcount); $companynamerow = @mysql_num_rows($maincatcountexe); $data1 = @mysql_result($maincatcountexe, 0, 0); return $data1; } function postingpersonname($id) { include_once "config.php"; include "opendb.php"; $maincatcount = "SELECT `fname`, `lname` FROM `member` WHERE `srno`='$id' limit 1"; $maincatcountexe = @mysql_db_query(DB_NAME, $maincatcount); $companynamerow = @mysql_num_rows($maincatcountexe); $data1 = @mysql_result($maincatcountexe, 0, 0); $data2 = @mysql_result($maincatcountexe, 0, 1); return $data1 . " " . $data2; } function postingemailid($id) { include_once "config.php"; include "opendb.php"; $maincatcount = "SELECT `login` FROM `member` WHERE `srno`='$id' limit 1"; $maincatcountexe = @mysql_db_query(DB_NAME, $maincatcount); $companynamerow = @mysql_num_rows($maincatcountexe); $login = @mysql_result($maincatcountexe, 0, 0); return $login; } function postingcompanyid($id) { include_once "config.php"; include "opendb.php"; $maincatcount = "SELECT `memid` FROM `newposting` WHERE `srno`='$id' limit 1"; $maincatcountexe = @mysql_db_query(DB_NAME, $maincatcount); $companynamerow = @mysql_num_rows($maincatcountexe); $data1 = @mysql_result($maincatcountexe, 0, 0); return $data1; } function postingprodid($id) { include_once "config.php"; include "opendb.php"; $maincatcount = "SELECT `prodid` FROM `newposting` WHERE `srno`='$id' limit 1"; $maincatcountexe = @mysql_db_query(DB_NAME, $maincatcount); $companynamerow = @mysql_num_rows($maincatcountexe); $data1 = @mysql_result($maincatcountexe, 0, 0); return $data1; } function postingmembersince($id) { include_once "config.php"; include "opendb.php"; $maincatcount = "SELECT `memid` FROM `newposting` WHERE `srno`='$id' limit 1"; $maincatcountexe = @mysql_db_query(DB_NAME, $maincatcount); $companynamerow = @mysql_num_rows($maincatcountexe); $data1 = @mysql_result($maincatcountexe, 0, 0); $maincatcount = "SELECT DATE_FORMAT(`dtstamp`, '%M %D, %Y') as `dtstamp` FROM `company` WHERE `memid`='$data1' limit 1"; $maincatcountexe = @mysql_db_query(DB_NAME, $maincatcount); $companynamerow = @mysql_num_rows($maincatcountexe); $data1 = @mysql_result($maincatcountexe, 0, 0); return $data1; } function postingcompanyprofile($id) { include_once "config.php"; include "opendb.php"; $maincatcount = "SELECT `memid` FROM `newposting` WHERE `srno`='$id' limit 1"; $maincatcountexe = @mysql_db_query(DB_NAME, $maincatcount); $companynamerow = @mysql_num_rows($maincatcountexe); $data1 = @mysql_result($maincatcountexe, 0, 0); $maincatcount = "SELECT `companyprofile` FROM `company` WHERE `memid`='$data1' limit 1"; $maincatcountexe = @mysql_db_query(DB_NAME, $maincatcount); $companynamerow = @mysql_num_rows($maincatcountexe); $data1 = @mysql_result($maincatcountexe, 0, 0); return $data1; } function postingmembercountry($id) { include_once "config.php"; include "opendb.php"; $maincatcount = "SELECT `memid` FROM `newposting` WHERE `srno`='$id' limit 1"; $maincatcountexe = @mysql_db_query(DB_NAME, $maincatcount); $companynamerow = @mysql_num_rows($maincatcountexe); $data1 = @mysql_result($maincatcountexe, 0, 0); $maincatcount = "SELECT `country` FROM `member` WHERE `srno`='$data1' limit 1"; $maincatcountexe = @mysql_db_query(DB_NAME, $maincatcount); $companynamerow = @mysql_num_rows($maincatcountexe); $data1 = @mysql_result($maincatcountexe, 0, 0); return $data1; } function membercountry($id) { include_once "config.php"; include "opendb.php"; $maincatcount = "SELECT `country` FROM `member` WHERE `srno`='$id' limit 1"; $maincatcountexe = @mysql_db_query(DB_NAME, $maincatcount); $companynamerow = @mysql_num_rows($maincatcountexe); $data1 = @mysql_result($maincatcountexe, 0, 0); return $data1; } function subcatcount($id) { include_once "config.php"; include "opendb.php"; $maincatcount = "SELECT count(*) FROM `newposting` WHERE `subcatid`='$id' and `adminstatus`='Y'"; $maincatcountexe = @mysql_db_query(DB_NAME, $maincatcount); $companynamerow = @mysql_num_rows($maincatcountexe); $data1 = @mysql_result($maincatcountexe, 0, 0); return $data1; } function memsubcatcount($id,$memid) { include_once "config.php"; include "opendb.php"; $maincatcount = "SELECT count(*) FROM `newposting` WHERE `subcatid`='$id' and `adminstatus`='Y' and `memid`= '$memid';"; $maincatcountexe = @mysql_db_query(DB_NAME, $maincatcount); $companynamerow = @mysql_num_rows($maincatcountexe); $data1 = @mysql_result($maincatcountexe, 0, 0); return $data1; } function postingproddesc($id) { include_once "config.php"; include "opendb.php"; $maincatcount = "SELECT `proddesc` FROM `newposting` WHERE `srno`='$id' limit 1"; $maincatcountexe = @mysql_db_query(DB_NAME, $maincatcount); $companynamerow = @mysql_num_rows($maincatcountexe); $data1 = @mysql_result($maincatcountexe, 0, 0); return $data1; } function postingimages($id) { include_once "config.php"; include "opendb.php"; $maincatcount = "SELECT `productimage` FROM `newposting` WHERE `srno`='$id' limit 1"; $maincatcountexe = @mysql_db_query(DB_NAME, $maincatcount); $companynamerow = @mysql_num_rows($maincatcountexe); $data1 = @mysql_result($maincatcountexe, 0, 0); $product_image = substr($data1, 0 ,1); if($product_image == ".") { $data1 = substr($data1, 2); } else { $data1 = $data1; } return $data1; } function productdetails($prodid,$maincatid,$subcatid) { include_once "config.php"; include "opendb.php"; $rvalue = ""; if ($maincatid == "1") { $productdet = "SELECT `type`, `purity` FROM `newposting` WHERE `srno`='$prodid' limit 1;"; $productdetexe = @mysql_db_query(DB_NAME, $productdet); $type = @mysql_result($productdetexe, 0, 0); $purity = @mysql_result($productdetexe, 0, 1); $rvalue = "Type : $type     Purity : $purity
"; } elseif($maincatid == "2") { $productdet = "SELECT `pattern`, `style`, `usage`, `yarncount`, `density`, `width`, `weight` FROM `newposting` WHERE `srno` = '$prodid' Limit 1;"; $productdetexe = @mysql_db_query(DB_NAME, $productdet); $pattern = @mysql_result($productdetexe, 0, 0); $style = @mysql_result($productdetexe, 0, 1); $usage = @mysql_result($productdetexe, 0, 2); $yarncount = @mysql_result($productdetexe, 0, 3); $density = @mysql_result($productdetexe, 0, 4); $width = @mysql_result($productdetexe, 0, 5); $weight = @mysql_result($productdetexe, 0, 6); $rvalue = "Pattern : $pattern     Style : $style     End Use : $usage     Yarn Count : $yarncount     Density : $density     Width : $width     Weight : $weight
"; } elseif($maincatid == "3") { $productdet = "SELECT `pattern`, `feature` FROM `newposting` WHERE `srno` = '$prodid' Limit 1;"; $productdetexe = @mysql_db_query(DB_NAME, $productdet); $pattern = @mysql_result($productdetexe, 0, 0); $feature = @mysql_result($productdetexe, 0, 1); $rvalue = "Pattern : $pattern     Feature : $feature
"; } elseif($maincatid == "4") { $rvalue = ""; } elseif($maincatid == "5") { $productdet = "SELECT `brandname`, `modelno` FROM `newposting` WHERE `srno` = '$prodid' Limit 1;"; $productdetexe = @mysql_db_query(DB_NAME, $productdet); $brandname = @mysql_result($productdetexe, 0, 0); $modelno = @mysql_result($productdetexe, 0, 1); $rvalue = "Brand Name : $brandname     Model No : $modelno
"; } elseif(($maincatid == "6") && ($subcatid == "40")) { $productdet = "SELECT `pattern`, `feature`, `usage` FROM `newposting` WHERE `srno`='$prodid' limit 1;"; $productdetexe = @mysql_db_query(DB_NAME, $productdet); $pattern = @mysql_result($productdetexe, 0, 0); $feature = @mysql_result($productdetexe, 0, 1); $use = @mysql_result($productdetexe, 0, 2); $rvalue = "Pattern : $pattern     Feature : $feature     End Use : $use
"; } elseif(($maincatid == "6") && ($subcatid == "41")) { $productdet = "SELECT `pattern`, `feature`, `type`, `usage` FROM `newposting` WHERE `srno`='$prodid' limit 1;"; $productdetexe = @mysql_db_query(DB_NAME, $productdet); $pattern = @mysql_result($productdetexe, 0, 0); $feature = @mysql_result($productdetexe, 0, 1); $type = @mysql_result($productdetexe, 0, 2); $use = @mysql_result($productdetexe, 0, 3); $rvalue = "Pattern : $pattern     Feature : $feature     Type : $type     End Use : $use
"; } include "closedb.php"; return $rvalue; } function postingproductdetails($prodid,$maincatid,$subcatid) { include_once "config.php"; include "opendb.php"; $rvalue = ""; if ($maincatid == "") { $productdet = "SELECT `maincatid`, `subcatid` FROM `newposting` WHERE `srno`='$prodid' limit 1;"; $productdetexe = @mysql_db_query(DB_NAME, $productdet); $maincatid = @mysql_result($productdetexe, 0, 0); $subcatid = @mysql_result($productdetexe, 0, 1); } if ($maincatid == "1") { $productdet = "SELECT `type`, `purity` FROM `newposting` WHERE `srno`='$prodid' limit 1;"; $productdetexe = @mysql_db_query(DB_NAME, $productdet); $type = @mysql_result($productdetexe, 0, 0); $purity = @mysql_result($productdetexe, 0, 1); $rvalue = "
Type : $type
Purity : $purity
"; } elseif($maincatid == "2") { $productdet = "SELECT `pattern`, `style`, `usage`, `yarncount`, `density`, `width`, `weight` FROM `newposting` WHERE `srno` = '$prodid' Limit 1;"; $productdetexe = @mysql_db_query(DB_NAME, $productdet); $pattern = @mysql_result($productdetexe, 0, 0); $style = @mysql_result($productdetexe, 0, 1); $usage = @mysql_result($productdetexe, 0, 2); $yarncount = @mysql_result($productdetexe, 0, 3); $density = @mysql_result($productdetexe, 0, 4); $width = @mysql_result($productdetexe, 0, 5); $weight = @mysql_result($productdetexe, 0, 6); $rvalue = "
Pattern : $pattern
Style : $style
End Use : $usage
Yarn Count : $yarncount
Density : $density
Width : $width
Weight : $weight
"; } elseif($maincatid == "3") { $productdet = "SELECT `pattern`, `feature` FROM `newposting` WHERE `srno` = '$prodid' Limit 1;"; $productdetexe = @mysql_db_query(DB_NAME, $productdet); $pattern = @mysql_result($productdetexe, 0, 0); $feature = @mysql_result($productdetexe, 0, 1); $rvalue = "
Pattern : $pattern
Feature : $feature
"; } elseif($maincatid == "4") { $rvalue = ""; } elseif($maincatid == "5") { $productdet = "SELECT `brandname`, `modelno` FROM `newposting` WHERE `srno` = '$prodid' Limit 1;"; $productdetexe = @mysql_db_query(DB_NAME, $productdet); $brandname = @mysql_result($productdetexe, 0, 0); $modelno = @mysql_result($productdetexe, 0, 1); $rvalue = "
Brand Name : $brandname
Model No : $modelno
"; } elseif(($maincatid == "6") && ($subcatid == "40")) { $productdet = "SELECT `pattern`, `feature`, `usage` FROM `newposting` WHERE `srno`='$prodid' limit 1;"; $productdetexe = @mysql_db_query(DB_NAME, $productdet); $pattern = @mysql_result($productdetexe, 0, 0); $feature = @mysql_result($productdetexe, 0, 1); $use = @mysql_result($productdetexe, 0, 2); $rvalue = "
Pattern : $pattern
Feature : $feature
End Use : $use
"; } elseif(($maincatid == "6") && ($subcatid == "41")) { $productdet = "SELECT `pattern`, `feature`, `type`, `usage` FROM `newposting` WHERE `srno`='$prodid' limit 1;"; $productdetexe = @mysql_db_query(DB_NAME, $productdet); $pattern = @mysql_result($productdetexe, 0, 0); $feature = @mysql_result($productdetexe, 0, 1); $type = @mysql_result($productdetexe, 0, 2); $use = @mysql_result($productdetexe, 0, 3); $rvalue = "
Pattern : $pattern
Feature : $feature
Type : $type
End Use : $use
"; } include "closedb.php"; return $rvalue; } function productdetails_nhp($prodid,$maincatid,$subcatid) { include_once "config.php"; include "opendb.php"; $rvalue = ""; if ($maincatid == "1") { $productdet = "SELECT `type`, `purity` FROM `newposting` WHERE `srno`='$prodid' limit 1;"; $productdetexe = @mysql_db_query(DB_NAME, $productdet); $type = @mysql_result($productdetexe, 0, 0); $purity = @mysql_result($productdetexe, 0, 1); $rvalue = "Type : $type     Purity : $purity
"; } elseif($maincatid == "2") { $productdet = "SELECT `pattern`, `style`, `usage`, `yarncount`, `density`, `width`, `weight` FROM `newposting` WHERE `srno` = '$prodid' Limit 1;"; $productdetexe = @mysql_db_query(DB_NAME, $productdet); $pattern = @mysql_result($productdetexe, 0, 0); $style = @mysql_result($productdetexe, 0, 1); $usage = @mysql_result($productdetexe, 0, 2); $yarncount = @mysql_result($productdetexe, 0, 3); $density = @mysql_result($productdetexe, 0, 4); $width = @mysql_result($productdetexe, 0, 5); $weight = @mysql_result($productdetexe, 0, 6); $rvalue = "Pattern : $pattern     Style : $style     End Use : $usage     Yarn Count : $yarncount     Density : $density     Width : $width     Weight : $weight
"; } elseif($maincatid == "3") { $productdet = "SELECT `pattern`, `feature` FROM `newposting` WHERE `srno` = '$prodid' Limit 1;"; $productdetexe = @mysql_db_query(DB_NAME, $productdet); $pattern = @mysql_result($productdetexe, 0, 0); $feature = @mysql_result($productdetexe, 0, 1); $rvalue = "Pattern : $pattern     Feature : $feature
"; } elseif($maincatid == "4") { $rvalue = ""; } elseif($maincatid == "5") { $productdet = "SELECT `brandname`, `modelno` FROM `newposting` WHERE `srno` = '$prodid' Limit 1;"; $productdetexe = @mysql_db_query(DB_NAME, $productdet); $brandname = @mysql_result($productdetexe, 0, 0); $modelno = @mysql_result($productdetexe, 0, 1); $rvalue = "Brand Name : $brandname     Model No : $modelno
"; } elseif(($maincatid == "6") && ($subcatid == "40")) { $productdet = "SELECT `pattern`, `feature`, `usage` FROM `newposting` WHERE `srno`='$prodid' limit 1;"; $productdetexe = @mysql_db_query(DB_NAME, $productdet); $pattern = @mysql_result($productdetexe, 0, 0); $feature = @mysql_result($productdetexe, 0, 1); $use = @mysql_result($productdetexe, 0, 2); $rvalue = "Pattern : $pattern     Feature : $feature     End Use : $use
"; } elseif(($maincatid == "6") && ($subcatid == "41")) { $productdet = "SELECT `pattern`, `feature`, `type`, `usage` FROM `newposting` WHERE `srno`='$prodid' limit 1;"; $productdetexe = @mysql_db_query(DB_NAME, $productdet); $pattern = @mysql_result($productdetexe, 0, 0); $feature = @mysql_result($productdetexe, 0, 1); $type = @mysql_result($productdetexe, 0, 2); $use = @mysql_result($productdetexe, 0, 3); $rvalue = "Pattern : $pattern     Feature : $feature     Type : $type     End Use : $use
"; } include "closedb.php"; return $rvalue; } ?>