"SET NAMES utf8",PDO::MYSQL_ATTR_INIT_COMMAND => "SET CHARACTER SET utf8")); } catch ( PDOException $e ){ print $e->getMessage(); } $sql = $db->query("SELECT * FROM mail_ayarlari"); $a = $sql->fetch(PDO::FETCH_ASSOC); $MailHost = $a["host"]; $MailUsername = $a["kullaniciadi"]; $MailPassword = $a["parola"]; $MailTitleName = $a["baslik"]; $sql = $db->query("SELECT * FROM doping_ayarlari"); $a = $sql->fetch(PDO::FETCH_ASSOC); $doping_anasayfa_1 = $a["a1"].".00"; $doping_anasayfa_2 = $a["a2"].".00"; $doping_anasayfa_4 = $a["a3"].".00"; $doping_kategori_1 = $a["a4"].".00"; $doping_kategori_2 = $a["a5"].".00"; $doping_kategori_4 = $a["a6"].".00"; $doping_acil_1 = $a["a7"].".00"; $doping_acil_2 = $a["a8"].".00"; $doping_acil_4 = $a["a9"].".00"; $doping_kalin_1 = $a["a10"].".00"; $doping_kalin_2 = $a["a11"].".00"; $doping_kalin_4 = $a["a12"].".00"; $sql = $db->query("SELECT * FROM magaza_ucretleri"); $a = $sql->fetch(PDO::FETCH_ASSOC); $magaza1 = $a["a1"].".00"; $magaza2 = $a["a2"].".00"; $magaza3 = $a["a3"].".00"; $kota1 = $a["kota1"]; $kota2 = $a["kota2"]; $kota3 = $a["kota3"]; $sql = $db->query("SELECT * FROM get_ayarlari"); $a = $sql->fetch(PDO::FETCH_ASSOC); $komisyon = $a["a2"]; $gdurum = $a["a1"]; $ihalebedeli = $a["a3"]; $sql = $db->query("SELECT * FROM sinir"); $a = $sql->fetch(PDO::FETCH_ASSOC); $MagazaSinir = $a["sinir"]; $sql = $db->query("SELECT * FROM genel"); $a = $sql->fetch(PDO::FETCH_ASSOC); $base_url = $a["base_url"]; $SiteName = $a["SiteName"]; $MaksimumResimUpload = $a["MaksimumResimUpload"]; $admin_mail = $a["admin_mail"]; $appId = $a["appId"]; $appSecret = $a["appSecret"]; function tr_ucwords($deger) { $deger = mb_strtolower(str_replace(array('I','Ğ','Ü','Ş','İ','Ö','Ç'), array('ı','ğ','ü','ş','i','ö','ç'), $deger), 'utf-8'); return $deger; } function banner($e) { global $db; global $base_url; $sql = $db->query("SELECT * FROM banner WHERE Id = '$e'"); $a = $sql->fetch(PDO::FETCH_ASSOC); if ($a["tip"] == 0){ if ($e != 6){ $l = 'Reklam Alanı'; } else { $l = 'Reklam Alanı'; } } else { $l = html_entity_decode($a["kod"]); } return $l; } foreach ($_GET as $key => $value) { $value = str_replace('"', "", $value); $value = str_replace("'", "", $value); $value = str_replace("select", "", $value); $value = str_replace("SELECT", "", $value); $value = str_replace("UPDATE", "", $value); $value = str_replace("update", "", $value); $value = str_replace("delete", "", $value); $value = str_replace("DELETE", "", $value); $value = str_replace("UNION", "", $value); $value = str_replace("union", "", $value); $value = str_replace('"', "", $value); $value = str_replace("%", "", $value); $value = str_replace("`","", $value); $value = str_replace("'","'", $value); $_GET[$key] = $value; } foreach ($_POST as $key => $value) { $value = str_replace('"', "", $value); $value = str_replace("'", "", $value); $value = str_replace("select", "", $value); $value = str_replace("SELECT", "", $value); $value = str_replace("UPDATE", "", $value); $value = str_replace("update", "", $value); $value = str_replace("delete", "", $value); $value = str_replace("DELETE", "", $value); $value = str_replace("UNION", "", $value); $value = str_replace("union", "", $value); $value = str_replace('"', "", $value); $value = str_replace("%", "", $value); $value = str_replace("`","", $value); $value = str_replace("'","'", $value); $_POST[$key] = $value; } function slugify($str, $options = array()) { $str = mb_convert_encoding((string)$str, 'UTF-8', mb_list_encodings()); $defaults = array( 'delimiter' => '-', 'limit' => null, 'lowercase' => true, 'replacements' => array(), 'transliterate' => true, ); $options = array_merge($defaults, $options); $char_map = array('Ş' => 'S', 'İ' => 'I', 'Ç' => 'C', 'Ü' => 'U', 'Ö' => 'O', 'Ğ' => 'G','ş' => 's', 'ı' => 'i', 'ç' => 'c', 'ü' => 'u', 'ö' => 'o', 'ğ' => 'g',); $str = preg_replace(array_keys($options['replacements']), $options['replacements'], $str); if ($options['transliterate']) { $str = str_replace(array_keys($char_map), $char_map, $str); } $str = preg_replace('/[^\p{L}\p{Nd}]+/u', $options['delimiter'], $str); $str = preg_replace('/(' . preg_quote($options['delimiter'], '/') . '){2,}/', '$1', $str); $str = mb_substr($str, 0, ($options['limit'] ? $options['limit'] : mb_strlen($str, 'UTF-8')), 'UTF-8'); $str = trim($str, $options['delimiter']); return $options['lowercase'] ? mb_strtolower($str, 'UTF-8') : $str; } function sendRequest($site_name,$send_xml,$header_type) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$site_name); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS,$send_xml); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_HTTPHEADER,$header_type); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 120); $result = curl_exec($ch); return $result; } function bildirimgonder($posta,$tip){ require 'filesystems/PHPMailer-master/PHPMailerAutoload.php'; global $MailHost; global $MailUsername; global $MailPassword; global $MailTitleName; $mail = new PHPMailer; $mail->isSMTP(); $mail->Host = $MailHost; $mail->SMTPAuth = true; $mail->Username = $MailUsername; $mail->Password = $MailPassword; $mail->Port = 587; $mail->addAddress($posta); $mail->setFrom($MailUsername, $MailTitleName); $mail->isHTML(true); $mail->CharSet ="utf-8"; if ($tip == 1){ $mail->Subject = 'Onay Bekleyen İlan'; $mail->Body = ''.date("d-m,Y H:i:s").' tarihinde ilan eklenmiştir'; } elseif ($tip == 2){ $mail->Subject = 'Ödeme Bildirimi'; $mail->Body = ''.date("d-m,Y H:i:s").' tarihinde ödeme bildirimi yapıldı'; } $mail->SMTPOptions = array( 'ssl' => array( 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true ) ); $mail->send(); } ob_end_flush(); ?> query("SELECT * FROM metalar WHERE Id = '1'"); $a = $sql->fetch(PDO::FETCH_ASSOC); $title = $a["title"]; $description = $a["description"]; } elseif ($_GET["page"] == "acil"){ $sql = $db->query("SELECT * FROM metalar WHERE Id = '2'"); $a = $sql->fetch(PDO::FETCH_ASSOC); $title = $a["title"]; $description = $a["description"]; } elseif ($_GET["page"] == "magazalar"){ $sql = $db->query("SELECT * FROM metalar WHERE Id = '3'"); $a = $sql->fetch(PDO::FETCH_ASSOC); $title = $a["title"]; $description = $a["description"]; } elseif ($_GET["page"] == "sayfa"){ if ($_GET["id"] == "1"){ $sql = $db->query("SELECT * FROM metalar WHERE Id = '4'"); $a = $sql->fetch(PDO::FETCH_ASSOC); } elseif ($_GET["id"] == 2){ $sql = $db->query("SELECT * FROM metalar WHERE Id = '6'"); $a = $sql->fetch(PDO::FETCH_ASSOC); } elseif ($_GET["id"] == 3){ $sql = $db->query("SELECT * FROM metalar WHERE Id = '7'"); $a = $sql->fetch(PDO::FETCH_ASSOC); } elseif ($_GET["id"] == 4){ $sql = $db->query("SELECT * FROM metalar WHERE Id = '8'"); $a = $sql->fetch(PDO::FETCH_ASSOC); } elseif ($_GET["id"] == 5){ $sql = $db->query("SELECT * FROM metalar WHERE Id = '9'"); $a = $sql->fetch(PDO::FETCH_ASSOC); } elseif ($_GET["id"] == 6){ $sql = $db->query("SELECT * FROM metalar WHERE Id = '10'"); $a = $sql->fetch(PDO::FETCH_ASSOC); } elseif ($_GET["id"] == 7){ $sql = $db->query("SELECT * FROM metalar WHERE Id = '11'"); $a = $sql->fetch(PDO::FETCH_ASSOC); } $title = $a["title"]; $description = $a["description"]; } elseif ($_GET["page"] == "category"){ $id = $_GET["id"]; $sql = $db->query("SELECT * FROM category WHERE Id = '$id'"); $a = $sql->fetch(PDO::FETCH_ASSOC); $title = $a["kategori_adi"]." İlanları"; $description = $a["kategori_adi"]." İlanları"; } elseif ($_GET["page"] == "blog"){ $id = $_GET["id"]; $sql = $db->query("SELECT * FROM bkategoriler WHERE Id = '$id'"); $a = $sql->fetch(PDO::FETCH_ASSOC); $title = $a["title"]; $description = $a["title"]; if ($id == ""){ $title = "Blog"; $description = "Blog"; } } elseif ($_GET["page"] == "yazi"){ $id = $_GET["id"]; $sql = $db->query("SELECT * FROM byazilar WHERE Id = '$id'"); $a = $sql->fetch(PDO::FETCH_ASSOC); $title = $a["title"]; $description = $a["title"]; } elseif ($_GET["page"] == "ilan"){ $id = $_GET["id"]; $sql = $db->query("SELECT * FROM ilanlar WHERE Id = '$id'"); $a = $sql->fetch(PDO::FETCH_ASSOC); $title = $a["title"]; $description = $a["title"]; } else { $sql = $db->query("SELECT * FROM metalar WHERE Id = '12'"); $a = $sql->fetch(PDO::FETCH_ASSOC); $title = $a["title"]; $description = $a["description"]; } $sql = $db->query("SELECT * FROM genel"); $a22 = $sql->fetch(PDO::FETCH_ASSOC); $keywords2 = $a22["keywords"]; $description2 = $a22["description"]; ?> <? echo $title; ?> query("SELECT * FROM ilanlar WHERE Id = '$id'"); $a = $sql->fetch(PDO::FETCH_ASSOC); $title = $a["title"]; $description = $a["title"]; $resim = $db->query("SELECT * FROM images WHERE ilanId = '{$id}' ORDER BY s ASC LIMIT 1"); $r = $resim->fetch(PDO::FETCH_ASSOC); $src = $base_url . "fileserver/files/" . $a["Id"] . "/" . $r["name"]; echo ' '; } ?>
query("SELECT * FROM users WHERE aktivasyonkodu = '$c' and aktivasyon = '0'"); if ($sql2->rowCount() == 0){ $_SESSION['er'] = 0; header("location: login/"); } else { $sqls = $db->prepare("UPDATE users SET aktivasyon=? WHERE aktivasyonkodu = '$c'"); $ekle = $sqls->execute(array(1)); $_SESSION['er'] = 1; header("location: login/"); } } elseif ($_GET["page"] == "advert_del") { $id = $_GET["id"]; $uye = $_SESSION['uye']; $sql2 = $db->prepare("DELETE FROM ilanlar WHERE Id = '{$id}' and uyeId = '$uye'"); $sql2->execute(); $sql2 = $db->prepare("DELETE FROM modul_ilan WHERE ilanId = '{$id}'"); $sql2->execute(); $sql2 = $db->prepare("DELETE FROM prop_ilan WHERE ilanId = '{$id}'"); $sql2->execute(); $dizinyolu = $_SERVER['DOCUMENT_ROOT']; $klasor = $dizinyolu . "/fileserver/files/" . $id; function rmdirr($klasor) { if($objs = glob($klasor."/*")){ foreach($objs as $obj) { is_dir($obj)? rmdirr($obj) : unlink($obj); } } rmdir($klasor); } rmdirr($klasor); header("location: " . $_SERVER['HTTP_REFERER']); } elseif ($_GET["page"] == "advert_o") { $id = $_GET["id"]; $uye = $_SESSION['uye']; $sql = $db->query("SELECT * FROM ilanlar WHERE Id = '$id' and uyeId = '$uye'"); $a = $sql->fetch(PDO::FETCH_ASSOC); $bugun = date("Y-m-d"); $date = date("Y-m-d", strtotime($bugun . " +$a[yayin] day")); $sqls = $db->prepare("UPDATE ilanlar SET bitis=? WHERE Id = '$id'"); $ekle = $sqls->execute(array($date)); header("location: " . $_SERVER['HTTP_REFERER']); } elseif ($_GET["page"] == "category") { include 'filesystems/category.php'; } elseif ($_GET["page"] == "hizliarama") { include 'filesystems/hizliarama.php'; } elseif ($_GET["page"] == "anasayfa") { include 'filesystems/anasayfa.php'; } elseif ($_GET["page"] == "acil") { include 'filesystems/acil.php'; } elseif ($_GET["page"] == "ilan") { include 'filesystems/ilan.php'; } elseif ($_GET["page"] == "mesajgonder") { include 'filesystems/mesajgonder.php'; } elseif ($_GET["page"] == "message") { include 'filesystems/message.php'; } elseif ($_GET["page"] == "message2") { include 'filesystems/message2.php'; } elseif ($_GET["page"] == "messageread") { include 'filesystems/messageread.php'; } elseif ($_GET["page"] == "messageread2") { include 'filesystems/messageread2.php'; } elseif ($_GET["page"] == "kullanici") { include 'filesystems/kullanici.php'; } elseif ($_GET["page"] == "sikayet") { include 'filesystems/sikayet.php'; } elseif ($_GET["page"] == "mopen") { include 'filesystems/mopen.php'; } elseif ($_GET["page"] == "magazaodeme") { include 'filesystems/magazaodeme.php'; } elseif ($_GET["page"] == "odemebildirimi") { include 'filesystems/odemebildirimi.php'; } elseif ($_GET["page"] == "favoriilanlarim") { include 'filesystems/favoriilanlarim.php'; } elseif ($_GET["page"] == "medit") { include 'filesystems/medit.php'; } elseif ($_GET["page"] == "banka") { include 'filesystems/banka.php'; } elseif ($_GET["page"] == "yayin") { include 'filesystems/yayin.php'; } elseif ($_GET["page"] == "satinal") { include 'filesystems/satinal.php'; } elseif ($_GET["page"] == "adres") { include 'filesystems/adres.php'; } elseif ($_GET["page"] == "adres2") { include 'filesystems/adres2.php'; } elseif ($_GET["page"] == "ozet") { include 'filesystems/ozet.php'; } elseif ($_GET["page"] == "odeme") { include 'filesystems/odeme.php'; } elseif ($_GET["page"] == "satisislemlerim") { include 'filesystems/satisislemlerim.php'; } elseif ($_GET["page"] == "alisislemlerim") { include 'filesystems/alisislemlerim.php'; } elseif ($_GET["page"] == "siparis") { include 'filesystems/siparis.php'; } elseif ($_GET["page"] == "kargo") { include 'filesystems/kargo.php'; } elseif ($_GET["page"] == "mesajgonder2") { include 'filesystems/mesajgonder2.php'; } elseif ($_GET["page"] == "kargolayacaklarim") { include 'filesystems/kargolayacaklarim.php'; } elseif ($_GET["page"] == "onaybekleyen") { include 'filesystems/onaybekleyen.php'; } elseif ($_GET["page"] == "odemebekleyen") { include 'filesystems/odemebekleyen.php'; } elseif ($_GET["page"] == "tamamlanan") { include 'filesystems/tamamlanan.php'; } elseif ($_GET["page"] == "kargoonay") { include 'filesystems/kargoonay.php'; } elseif ($_GET["page"] == "yorumyap") { include 'filesystems/yorumyap.php'; } elseif ($_GET["page"] == "siparis2") { include 'filesystems/siparis2.php'; } elseif ($_GET["page"] == "kargobekleyen") { include 'filesystems/kargobekleyen.php'; } elseif ($_GET["page"] == "onayimibekleyen") { include 'filesystems/onayimibekleyen.php'; } elseif ($_GET["page"] == "profil") { include 'filesystems/profil.php'; } elseif ($_GET["page"] == "banaozel") { include 'filesystems/banaozel.php'; } elseif ($_GET["page"] == "magazalar") { include 'filesystems/magazalar.php'; } elseif ($_GET["page"] == "getilanlar") { include 'filesystems/getilanlar.php'; } elseif ($_GET["page"] == "search") { include 'filesystems/search.php'; } elseif ($_GET["page"] == "sayfa") { include 'filesystems/sayfa.php'; } elseif ($_GET["page"] == "iletisim") { include 'filesystems/iletisim.php'; } elseif ($_GET["page"] == "ihale") { include 'filesystems/ihale.php'; } elseif ($_GET["page"] == "kihale") { include 'filesystems/kihale.php'; } elseif ($_GET["page"] == "kbihale") { include 'filesystems/kbihale.php'; } elseif ($_GET["page"] == "sss") { include 'filesystems/sss.php'; } elseif ($_GET["page"] == "blog") { include 'filesystems/blog.php'; } elseif ($_GET["page"] == "yazi") { include 'filesystems/yazi.php'; } elseif ($_GET["page"] == "blog") { include 'filesystems/blog.php'; } elseif ($_GET["page"] == "yazi") { include 'filesystems/yazi.php'; } elseif ($_GET["page"] == "rehber") { include 'filesystems/rehber.php'; } elseif ($_GET["page"] == "firma") { include 'filesystems/firma.php'; } elseif ($_GET["page"] == "exit") { unset($_SESSION["uye"]); unset($_SESSION["adsoyad"]); header("location: index.php"); } ?>