На главную
компании
Магазины
Продукция
function temizisim($str) { $ozelHarfler = array( 'a' => array('á','à','â','ä','ã'), 'A' => array('Ã','Ä','Â','À','Á'), 'e' => array('é','è','ê','ë'), 'E' => array('Ë','É','È','Ê'), 'i' => array('í','ì','î','ï','ı'), 'I' => array('Î','Í','Ì','İ','Ï'), 'o' => array('ó','ò','ô','ö','õ'), 'O' => array('Õ','Ö','Ô','Ò','Ó'), 'u' => array('ú','ù','û','ü'), 'U' => array('Ú','Û','Ù','Ü'), 'c' => array('ç'), 'C' => array('Ç'), 's' => array('ş'), 'S' => array('Ş'), 'n' => array('ñ'), 'N' => array('Ñ'), 'y' => array('ÿ'), 'Y' => array('Ÿ') ); $ozelKarakterler = array ('#', '$', '%', '^', '&', '*', '!', '~', '"', '\'', '=', '?', '/', '[', ']', '(', ')', '|', '<', '>', ';', ':', '\\', ', '); $str = str_replace($ozelKarakterler, '', $str); $str = str_replace(' ', '-', $str); foreach($ozelHarfler as $harf => $ozeller){ foreach($ozeller as $tektek){ $str = str_replace($tektek, $harf, $str); } } return preg_replace("/[^a-zA-Z0-9\-\.]/", "_", $str); } function dunbugun($tarihal) { $date_post=list($date, $time ) = explode(" ", $tarihal); $date_post_year=list($year, $month , $day) = explode("-", $date); $date_post_time=list($hour, $min) = explode(":", $time); $t_year=date('Y'); $t_month=date('m'); $t_day=date('d'); $t_hour=date('H'); $t_min=date('i'); if($t_month==$month) { if($t_day==$day) $tarihver = "Bugün ".$hour.":".$min; else if(($t_day-1)==$day) $tarihver = "Dün ".$hour.":".$min; else { $l_day=$t_day-$day; $bul=array("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"); $degistir=array("Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"); $month=str_replace($bul, $degistir, $month); $tarihver = " ".$day." ".$month." ".$year." ".$hour.":".$min; } } else { $bul=array("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"); $degistir=array("Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"); $month=str_replace($bul, $degistir, $month); $tarihver = " ".$day." ".$month." ".$year." ".$hour.":".$min; } return $tarihver; } function h_connect($host, $user, $pass, $db) { $connection = @mysql_connect($host, $user, $pass) or die('Veritabanı ile bağlantı sağlanamadı
'.'MySQL error : '.mysql_error()); $select = @mysql_select_db($db, $connection) or die('Veritabanı ile bağlantı sağlanamadı
'.'MySQL error : '.mysql_error()); return(TRUE); } $ms_host = "localhost"; $ms_user = "musteriler_lady"; $ms_pass = "qcIukQohge"; $ms_db = "musteriler_lady"; h_connect($ms_host, $ms_user, $ms_pass, $ms_db); unset($ms_host, $ms_user, $ms_pass); mysql_query("SET NAMES 'utf8'"); mysql_query("SET CHARACTER SET utf8"); mysql_query("SET COLLATION_CONNECTION = 'utf8_general_ci'"); ?>