convert($amt,$to,$from); } //convert time function function convertTime($timeval, $timezoneh, $timezonem) { // $timeval="20:00:00"; // $timezoneh = 05; // $timezonem = 00; $timezoneh = $timezoneh * -1; $timezonem = $timezonem * -1; $datechk=0; $hourchk=0; $hour=""; $min=""; $new_time = explode(":",$timeval); $hour = $new_time[0] + $timezoneh; // echo "
"; $min = $new_time[1] + $timezonem; // echo "
"; if($min > 60){ $min = $min - 60; $hourchk = 1; } if($hourchk == 1) $hour = $hour + 1; if($hour < 0){ $hour = $hour + 24; if($hour < 10) $hour = "0".$hour; if($min < 10) $min = "0".$min; $ret_str = $hour.":".$min.":00##-1"; // $datechk = -1; }else if($hour > 24){ $hour = $hour - 24; if($hour < 10) $hour = "0".$hour; if($min < 10) $min = "0".$min; $ret_str = $hour.":".$min.":00##1"; // $datechk = 1; }else{ if($hour < 10) $hour = "0".$hour; if($min < 10) $min = "0".$min; $ret_str = $hour.":".$min.":00##0"; // $datechk = 0; } // echo $ret_str; // echo "
"; return $ret_str; } //show proper GMT +/- Format function mxtimezone($htimezone, $mtimezone){ if($htimezone < 0){ $htimezone *= -1; $mtimezone *= -1; if($htimezone < 10) $htimezone = "0".$htimezone; if($mtimezone < 10) $mtimezone = "0".$mtimezone; echo " (GMT - $htimezone:$mtimezone)"; }else{ if($htimezone < 10) $htimezone = "0".$htimezone; if($mtimezone < 10) $mtimezone = "0".$mtimezone; echo " (GMT - $htimezone:$mtimezone)"; } } //calculates date....it adds or subtracts one day.... function calculateDate($currdate, $datechk){ $ex_date = explode("-", $currdate); if($datechk == 1){ $new_date = date("Y-m-d", mktime(0,0,0,$ex_date[1] + 1,$ex_date[2],$ex_date[0])); }else if($datechk == -1){ $new_date = date("Y-m-d", mktime(0,0,0,$ex_date[1] - 1,$ex_date[2],$ex_date[0])); }else $new_date=$currdate; return $new_date; } //CURRENCY FUNCTION function mxcurrency($name, $val) { ?> \r\n"; @mail($to, $subject, $msg, $headers); } //Date Difference Calculator function dateDiff($dformat, $endDate, $beginDate) { $date_parts1=explode($dformat, $beginDate); $date_parts2=explode($dformat, $endDate); $start_date=gregoriantojd(doubleval($date_parts1[1]), doubleval($date_parts1[2]), doubleval($date_parts1[0])); $end_date=gregoriantojd(doubleval($date_parts2[1]), doubleval($date_parts2[2]), doubleval($date_parts2[0])); return $end_date - $start_date; } // Date And Time function getMonth($month,$type){ if($type == 1 ){ if($month=="1")$m="Jan";if($month=="2")$m="Feb";if($month=="3")$m="Mar"; if($month=="4")$m="Apr";if($month=="5")$m="May";if($month=="6")$m="Jun"; if($month=="7")$m="Jul";if($month=="8")$m="Aug";if($month=="9")$m="Sep"; if($month=="10")$m="Oct";if($month=="11")$m="Nov";if($month=="12")$m="Dec"; } if($type == 2 ){ if($month=="1")$m="January";if($month=="2")$m="February";if($month=="3")$m="March"; if($month=="4")$m="April";if($month=="5")$m="May";if($month=="6")$m="June"; if($month=="7")$m="Jully";if($month=="8")$m="August";if($month=="9")$m="September"; if($month=="10")$m="October";if($month=="11")$m="November";if($month=="12")$m="December"; } return $m; }// get Month // 2nd Parameter is from 1 to 6 i-e // 1 -> 04 14, 2005 // 2 -> Apr 14, 2005 // 3 -> April 14, 2005 // 4 -> 04 14, 2005 8:27 AM // 5 -> Apr 14, 2005 8:27 AM // 6 -> April 14, 2005 8:27 AM function explodeDateTime($val,$format){ //Check for Emtpy if(empty($val) || empty($format) || $val == 0 ){ // return Nothing return "N/A"; } $dt=explode("-",$val); $d=explode(" ",$dt[2]); $day = $d[0]; $year = $dt[0]; // For 04 14, 2005 if($format == 1){ $month=$dt[1]; $date=$month.".".$day.".".$year; return $date; } // For Apr 14, 2005 if($format == 2){ $month=getMonth($dt[1],1); $date=$month." ".$day.", ".$year; return $date; } // For 14/Apr/2005 if($format == 7){ //echo "Hello"; $month=getMonth($dt[1],1); $date=$day."/".$month."/".$year; return $date; } // For April 14, 2005 if($format == 3){ $month=getMonth($dt[1],2); $date=$month." ".$day.", ".$year; return $date; } // For 04 14, 2005 8:27 AM if($format == 4){ $month=$dt[1]; $tt=explode(":",$d[1]); if($tt[0] > 11 && $tt[0] <=23 ){ $tt1="PM"; }else{ $tt1="AM"; } $date=$month." ".$day.", ".$year ." ".$tt[0].":".$tt[1]." ".$tt1; return $date; } // For Apr 14, 2005 8:27 AM if($format == 5){ $month=getMonth($dt[1],1); $tt=explode(":",$d[1]); if($tt[0] > 11 && $tt[0] <=23 ){ $tt1="PM"; }else{ $tt1="AM"; } $date=$month." ".$day.", ".$year ." ".$tt[0].":".$tt[1]." ".$tt1; return $date; } // For Apr 14, 2005 8:27 AM if($format == 6){ $month=getMonth($dt[1],2); $tt=explode(":",$d[1]); if($tt[0] > 11 && $tt[0] <=23 ){ $tt1="PM"; }else{ $tt1="AM"; } $date=$month." ".$day.", ".$year ." ".$tt[0].":".$tt[1]." ".$tt1; return $date; } }// function // Function that Validate only Floating values(Amount: 3265.30) function checkDouble($field){ $len=strlen($field); $findme ="1234567890."; for($i=0; $i<$len; $i++){ $in=$i; $find=substr($field,$in,1); if(strpos($findme,$find)===false) { return false; } }// for loop return true; }// Numeric validation // Function that Validate only Numeric function checkNumeric($field){ $strings = array($field); foreach ($strings as $testcase) { if (!ctype_digit($testcase)) { return false; }else{ return true; } }// foreach Loop }// Numeric validation // Function that Validate only Alpha function checkAlpha($field){ $strings = array($field); foreach ($strings as $testcase) { if (!ctype_alpha($testcase)) { return false; }else{ return true; } }// foreach Loop }// Alpha validation // Function that Validate only Alpha + in between Space function checkAlphaPLUS($field){ $len=strlen($field); $findme ="\'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ & "; for($i=0; $i<$len; $i++){ $in=$i; $find=substr($field,$in,1); //echo $find."
"; //echo strpos($findme,$find); if(strpos($findme,$find)===false) { return false; } }// for loop return true; }// Alpha + Space function checkAlphaPLUS_p($field){ $len=strlen($field); $findme ="\'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ & ."; for($i=0; $i<$len; $i++){ $in=$i; $find=substr($field,$in,1); //echo $find."
"; //echo strpos($findme,$find); if(strpos($findme,$find)===false) { return false; } }// for loop return true; }// Alpha + Space function validatePhone($field){ $len=strlen($field); $findme ="0123456789- ()"; for($i=0; $i<$len; $i++){ $in=$i; $find=substr($field,$in,1); //echo $find."
"; //echo strpos($findme,$find); if(strpos($findme,$find)===false) { return false; } }// for loop return true; }// Phone validation // Function that Validate only AlphaNemric + in between Space function checkAlphaNumericPLUS($field){ $len=strlen($field); $findme ="0123456789-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ."; for($i=0; $i<$len; $i++){ $in=$i; $find=substr($field,$in,1); if(strpos($findme,$find)===false) { return false; } }// for loop return true; }// Alpha + Space // Function that Validate only AlphaNumeric function checkAlphaNumeric($field){ $strings = array($field); foreach ($strings as $testcase) { if (!ctype_alnum($testcase)) { //echo"Not"; return false; }else{ return true; } }// foreach Loop }// AlphaNumeric validation // Function that Validate Email function checkEmail($field){ $pattern = '/.*@.*\..*/'; if (preg_match($pattern, $field) > 0) { return true; }else{ return false; } }//Email ?> :: LEATHERTEX ::

FAIRS & ACHIEVEMENTS

Fairs & Acheivements

NEWS & EVENTS

  • LEATHERTEX is participating in MOSSHOES 2017 Fair, Visit us @ CROCUS EXPO, INTERNATIONAL EXHIBITION CENTRE, from 14-17 March, 2017,Stand# D-52,Pavilion 3,Hall 18,MOSCOW,RUSSIA.