3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php ob_start(); session_start(); include 'baglan.php'; if (isset($_POST['loggin'])) { $kullanici_adi=$_POST['kullanici_adi']; $kullanici_sifre=md5($_POST['kullanici_sifre']); if ($kullanici_adi && $kullanici_sifre) { $kullanicisor=$db->prepare("SELECT * FROM kullanici where kullanici_adi=:ad and kullanici_sifre=:sifre"); $kullanicisor->execute(array( 'ad' => $kullanici_adi, 'sifre' => $kullanici_sifre )); $cek = $db ->query("SELECT * FROM kullanici WHERE kullanici_adi = '".$kullanici_adi."' and kullanici_sifre = '".$kullanici_sifre."'"); $kullanicisay=$kullanicisor->rowCount(); if ($kullanicisay>0) { $_SESSION['kullanici_adi'] = $kullanici_adi; /* while ($result = $cek->fetch(PDO::FETCH_ASSOC)) { if ($result['kullanici_yetki'] == 1) { $_SESSION['kgiris']= "user"; } else { $_SESSION['kgiris']= "user"; } }*/ header("Location:../production/index.php"); } else { $_SESSION['hata'] = "a"; header("Location:../production/login.php"); } } } if (isset($_POST['genelayarkaydet'])) { $ayarkaydet=$db->prepare("UPDATE ayarlar SET ayar_baslik=:baslik, ayar_siteurl=:url, ayar_description=:aciklama, ayar_keywords=:keywords WHERE ayar_id=0"); $update=$ayarkaydet->execute(array( 'baslik' => $_POST['ayar_baslik'], 'url' => $_POST['ayar_siteurl'], 'aciklama' => $_POST['ayar_description'], 'keywords' => $_POST['ayar_keywords'] )); if ($update) { Header("Location:../production/genelayar.php?durum=ok"); } else{ Header("Location:../production/genelayar.php?durum=no"); } } if (isset($_POST['logoguncelle'])) { $uploads_dir = "../../images/logo"; @$tmp_name = $_FILES['ayar_logo']['tmp_name']; @$name = $_FILES['ayar_logo']['name']; $benzersizsayi1=rand(20000,32000); $benzersizsayi2=rand(20000,32000); $benzersizad=$benzersizsayi1.$benzersizsayi2; echo $logoimgyol=substr($uploads_dir, 6)."/".$benzersizad.$name; exit; @move_uploaded_file($tmp_name, "$uploads_dir/$benzersizad$name"); $ayarkaydet=$db->prepare("UPDATE ayarlar SET ayar_logo=:logo WHERE ayar_id=0"); $update=$ayarkaydet->execute(array( 'logo' => $logoimgyol, )); if ($update) { Header("Location:../production/genelayar.php?durum=ok"); } else{ Header("Location:../production/genelayar.php?durum=no"); } } if (isset($_POST['iletisimayarkaydet'])) { $ayarkaydet=$db->prepare("UPDATE ayarlar SET ayar_telefon=:tel, ayar_gsm=:gsm, ayar_mail=:mail, ayar_adres=:adres, ayar_il=:il, ayar_ilce=:ilce WHERE ayar_id=0"); $update=$ayarkaydet->execute(array( 'tel' => $_POST['ayar_telefon'], 'gsm' => $_POST['ayar_gsm'], 'mail' => $_POST['ayar_mail'], 'adres' => $_POST['ayar_adres'], 'il' => $_POST['ayar_il'], 'ilce' => $_POST['ayar_ilce'] )); if ($update) { Header("Location:../production/iletisimayar.php?durum=ok"); } else{ Header("Location:../production/iletisimayar.php?durum=no"); } } if (isset($_POST['sosyalmedya-ayarkaydet'])) { $ayarkaydet=$db->prepare("UPDATE ayarlar SET ayar_facebook=:face, ayar_twitter=:twitter, ayar_google=:google, ayar_instagram=:insta WHERE ayar_id=0"); $update=$ayarkaydet->execute(array( 'face' => $_POST['ayar_facebook'], 'twitter' => $_POST['ayar_twitter'], 'google' => $_POST['ayar_google'], 'insta' => $_POST['ayar_instagram'] )); if ($update) { Header("Location:../production/sosyalmedya-ayar.php?durum=ok"); } else{ Header("Location:../production/sosyalmedya-ayar.php?durum=no"); } } if (isset($_POST['hakkimizdakaydet'])) { $hakkimizdakaydet=$db->prepare("UPDATE hakkimizda SET hakkimizda_baslik=:h_baslik, hakkimizda_icerik=:h_icerik, hakkimizda_misyon=:h_misyon, hakkimizda_vizyon=:h_vizyon, hakkimizda_degerler=:h_deger WHERE hakkimizda_id=1"); $update=$hakkimizdakaydet->execute(array( 'h_baslik' => $_POST['hakkimizda_baslik'], 'h_icerik' => $_POST['hakkimizda_icerik'], 'h_misyon' => $_POST['hakkimizda_misyon'], 'h_vizyon' => $_POST['hakkimizda_vizyon'], 'h_deger' => $_POST['hakkimizda_degerler'] )); if ($update) { Header("Location:../production/hakkimizda.php?durum=ok"); } else{ Header("Location:../production/hakkimizda.php?durum=no"); } } if (isset($_POST['slidereklekaydet'])) { $uploads_dir = "../../images/sliders"; @$tmp_name = $_FILES['slider_resimurl']['tmp_name']; @$name = $_FILES['slider_resimurl']['name']; $benzersizsayi1=rand(20000,32000); $benzersizsayi2=rand(20000,32000); $benzersizad=$benzersizsayi1.$benzersizsayi2; $sliderimgyol=substr($uploads_dir, 6)."/".$benzersizad.$name; @move_uploaded_file($tmp_name, "$uploads_dir/$benzersizad$name"); $kaydet=$db->prepare("INSERT INTO slider SET slider_sira=:sira, slider_durum=:durum, slider_emlakbaslik=:emlakbaslik, slider_detayurl=:detayurl, slider_fiyat=:fiyat, slider_emlaktur=:emlaktur, slider_resimurl=:resimurl"); $insert=$kaydet->execute(array( 'sira' => $_POST['slider_sira'], 'durum' => $_POST['slider_durum'], 'emlakbaslik' => $_POST['slider_emlakbaslik'], 'detayurl' => $_POST['slider_detayurl'], 'fiyat' => $_POST['slider_fiyat'], 'emlaktur' => $_POST['slider_emlaktur'], 'resimurl' => $sliderimgyol )); if ($insert) { Header("Location:../production/slider.php?durum=ok"); } else{ Header("Location:../production/sliderekle.php?durum=no"); } } if (isset($_POST['slidersil'])) { $sil=$db->prepare("DELETE from slider where slider_id=:sliderid"); $kontrol=$sil->execute(array('sliderid' => $_POST['slidersilhidden'])); if ($kontrol) { Header("Location:../production/slider.php?durum=ok"); } else{ Header("Location:../production/slider.php?durum=no"); } } if (isset($_POST['sliderduzenle'])) { if ($_FILES['slider_resimurl']['size'] > 0 ) { $uploads_dir = "../../images/sliders"; @$tmp_name = $_FILES['slider_resimurl']['tmp_name']; @$name = $_FILES['slider_resimurl']['name']; $benzersizsayi1=rand(20000,32000); $benzersizsayi2=rand(20000,32000); $benzersizad=$benzersizsayi1.$benzersizsayi2; $sliderimgyol=substr($uploads_dir, 6)."/".$benzersizad.$name; @move_uploaded_file($tmp_name, "$uploads_dir/$benzersizad$name"); $duzenle=$db->prepare("UPDATE slider SET slider_sira=:sira, slider_durum=:durum, slider_emlakbaslik=:emlakbaslik, slider_detayurl=:detayurl, slider_fiyat=:fiyat, slider_emlaktur=:emlaktur, slider_resimurl=:resimurl WHERE slider_id={$_POST['slider_id']}"); $update=$duzenle->execute(array( 'sira' => $_POST['slider_sira'], 'durum' => $_POST['slider_durum'], 'emlakbaslik' => $_POST['slider_emlakbaslik'], 'detayurl' => $_POST['slider_detayurl'], 'fiyat' => $_POST['slider_fiyat'], 'emlaktur' => $_POST['slider_emlaktur'], 'resimurl' => $sliderimgyol, )); $resimsilunlink=$_POST['slider_resimurl']; unlink("../../$resimsilunlink"); $slider_id=$_POST['slider_id']; if ($update) { Header("Location:../production/sliderduzenle.php?durum=ok&slider_id=$slider_id"); } else{ Header("Location:../production/sliderduzenle.php?durum=no"); } } else{ $duzenle=$db->prepare("UPDATE slider SET slider_sira=:sira, slider_durum=:durum, slider_emlakbaslik=:emlakbaslik, slider_detayurl=:detayurl, slider_fiyat=:fiyat, slider_emlaktur=:emlaktur WHERE slider_id={$_POST['slider_id']}"); $update=$duzenle->execute(array( 'sira' => $_POST['slider_sira'], 'durum' => $_POST['slider_durum'], 'emlakbaslik' => $_POST['slider_emlakbaslik'], 'detayurl' => $_POST['slider_detayurl'], 'fiyat' => $_POST['slider_fiyat'], 'emlaktur' => $_POST['slider_emlaktur'] )); $slider_id=$_POST['slider_id']; if ($update) { Header("Location:../production/sliderduzenle.php?durum=ok&slider_id=$slider_id"); } else{ Header("Location:../production/sliderduzenle.php?durum=no"); } } } if (isset($_POST['ilankaydet'])) { $uploads_dir = "../../images/ilanlar"; @$tmp_name = $_FILES['ilan_fotograf']['tmp_name']; @$name = $_FILES['ilan_fotograf']['name']; $benzersizsayi1=rand(20000,32000); $benzersizsayi2=rand(20000,32000); $benzersizad=$benzersizsayi1.$benzersizsayi2; $ilanimgyol=substr($uploads_dir, 6)."/".$benzersizad.$name; @move_uploaded_file($tmp_name, "$uploads_dir/$benzersizad$name"); $kaydet=$db->prepare("INSERT INTO ilanlar SET ilan_fotograf=:foto, ilan_fiyat=:fiyat, ilan_baslik=:baslik, ilan_adres=:adres, ilan_tarih=:tarih, ilan_il=:il, ilan_ilce=:ilce, ilan_konuttip=:konuttip, ilan_odasalon=:odasalon, ilan_bulundugukat=:kat, ilan_yakittipi=:yakit, ilan_binayas=:yas, ilan_aciklama=:aciklama, ilan_googlemapurl=:google, ilan_metrekare=:metrekare"); $insert=$kaydet->execute(array( 'foto' => $ilanimgyol, 'fiyat' => $_POST['ilan_fiyat'], 'baslik' => $_POST['ilan_baslik'], 'adres' => $_POST['ilan_adres'], 'il' => $_POST['ilan_il'], 'ilce' => $_POST['ilan_ilce'], 'tarih' => $_POST['ilan_tarih'], 'konuttip' => $_POST['ilan_konuttip'], 'odasalon' => $_POST['ilan_odasalon'], 'kat' => $_POST['ilan_bulundugukat'], 'yakit' => $_POST['ilan_yakittipi'], 'yas' => $_POST['ilan_binayas'], 'aciklama' => $_POST['ilan_aciklama'], 'metrekare' => $_POST['ilan_metrekare'], 'google' => $_POST['ilan_googlemapurl'] )); if ($insert) { Header("Location:../production/ilanekle.php?durum=ok"); } else{ Header("Location:../production/ilanekle.php?durum=no"); } } if (isset($_POST['ilanduzenle'])) { if ($_FILES['ilan_fotograf']['size'] > 0 ) { $uploads_dir = "../../images/ilanlar"; @$tmp_name = $_FILES['ilan_fotograf']['tmp_name']; @$name = $_FILES['ilan_fotograf']['name']; $benzersizsayi1=rand(20000,32000); $benzersizsayi2=rand(20000,32000); $benzersizad=$benzersizsayi1.$benzersizsayi2; $ilanimgyol=substr($uploads_dir, 6)."/".$benzersizad.$name; @move_uploaded_file($tmp_name, "$uploads_dir/$benzersizad$name"); $duzenle=$db->prepare("UPDATE ilanlar SET ilan_fotograf=:foto, ilan_fiyat=:fiyat, ilan_baslik=:baslik, ilan_adres=:adres, ilan_tarih=:tarih, ilan_il=:il, ilan_ilce=:ilce, ilan_konuttip=:konuttip, ilan_odasalon=:odasalon, ilan_bulundugukat=:kat, ilan_yakittipi=:yakit, ilan_binayas=:yas, ilan_aciklama=:aciklama, ilan_googlemapurl=:google, ilan_metrekare=:metrekare WHERE ilan_id={$_POST['ilan_id']}"); $update=$duzenle->execute(array( 'foto' => $ilanimgyol, 'fiyat' => $_POST['ilan_fiyat'], 'baslik' => $_POST['ilan_baslik'], 'adres' => $_POST['ilan_adres'], 'il' => $_POST['ilan_il'], 'ilce' => $_POST['ilan_ilce'], 'tarih' => $_POST['ilan_tarih'], 'konuttip' => $_POST['ilan_konuttip'], 'odasalon' => $_POST['ilan_odasalon'], 'kat' => $_POST['ilan_bulundugukat'], 'yakit' => $_POST['ilan_yakittipi'], 'yas' => $_POST['ilan_binayas'], 'aciklama' => $_POST['ilan_aciklama'], 'metrekare' => $_POST['ilan_metrekare'], 'google' => $_POST['ilan_googlemapurl'] )); $resimsilunlink=$_POST['ilan_fotograf']; unlink("../../$resimsilunlink"); $ilan_id=$_POST['ilan_id']; if ($update) { Header("Location:../production/ilanduzenle.php?durum=ok&ilan_id=$ilan_id"); } else{ Header("Location:../production/ilanduzenle.php?durum=no"); } } else{ $duzenle=$db->prepare("UPDATE ilanlar SET ilan_fiyat=:fiyat, ilan_baslik=:baslik, ilan_adres=:adres, ilan_tarih=:tarih, ilan_il=:il, ilan_ilce=:ilce, ilan_konuttip=:konuttip, ilan_odasalon=:odasalon, ilan_bulundugukat=:kat, ilan_yakittipi=:yakit, ilan_binayas=:yas, ilan_aciklama=:aciklama, ilan_googlemapurl=:google, ilan_metrekare=:metrekare WHERE ilan_id={$_POST['ilan_id']}"); $update=$duzenle->execute(array( 'fiyat' => $_POST['ilan_fiyat'], 'baslik' => $_POST['ilan_baslik'], 'adres' => $_POST['ilan_adres'], 'il' => $_POST['ilan_il'], 'ilce' => $_POST['ilan_ilce'], 'tarih' => $_POST['ilan_tarih'], 'konuttip' => $_POST['ilan_konuttip'], 'odasalon' => $_POST['ilan_odasalon'], 'kat' => $_POST['ilan_bulundugukat'], 'yakit' => $_POST['ilan_yakittipi'], 'yas' => $_POST['ilan_binayas'], 'aciklama' => $_POST['ilan_aciklama'], 'metrekare' => $_POST['ilan_metrekare'], 'google' => $_POST['ilan_googlemapurl'], )); $ilan_id=$_POST['ilan_id']; if ($update) { Header("Location:../production/ilanduzenle.php?durum=ok&ilan_id=$ilan_id"); } else{ Header("Location:../production/ilanduzenle.php?durum=no"); } } } if (isset($_POST['ilansil'])) { $sil=$db->prepare("DELETE from ilanlar where ilan_id=:ilanid"); $kontrol=$sil->execute(array('ilanid' => $_POST['ilansilhidden'])); if ($kontrol) { Header("Location:../production/ilanlar.php?durum=ok"); } else{ Header("Location:../production/ilanlar.php?durum=no"); } } if (isset($_POST['menukaydet'])) { $ekle=$db->prepare("INSERT INTO menu SET menu_ustmenu=:ustmenu, menu_ad=:ad, menu_icon=:icon, menu_detay=:detay, menu_url=:url, menu_durum=:durum, menu_sira=:sira"); $insert=$ekle->execute(array( 'ustmenu' => $_POST['menu_ustmenu'], 'ad' => $_POST['menu_ad'], 'icon' => $_POST['menu_icon'], 'detay' => $_POST['menu_detay'], 'url' => $_POST['menu_url'], 'durum' => $_POST['menu_durum'], 'sira' => $_POST['menu_sira'] )); if ($insert) { Header("Location:../production/menu.php?durum=ok"); } else{ Header("Location:../production/menu.php?durum=no"); } } if (isset($_POST['menusil'])) { $sil=$db->prepare("DELETE from menu where menu_id=:menu_id"); $kontrol=$sil->execute(array('menu_id' => $_POST['menusilhidden'])); if ($kontrol) { Header("Location:../production/menu.php?durum=ok"); } else{ Header("Location:../production/menu.php?durum=no"); } } if (isset($_POST['menuduzenlekaydet'])) { $duzenle=$db->prepare("UPDATE menu SET menu_ustmenu=:ustmenu, menu_ad=:ad, menu_icon=:icon, menu_detay=:detay, menu_url=:url, menu_durum=:durum, menu_sira=:sira WHERE menu_id={$_POST['menu_id']} "); $update=$duzenle->execute(array( 'ustmenu' => $_POST['menu_ustmenu'], 'ad' => $_POST['menu_ad'], 'icon' => $_POST['menu_icon'], 'detay' => $_POST['menu_detay'], 'url' => $_POST['menu_url'], 'durum' => $_POST['menu_durum'], 'sira' => $_POST['menu_sira'] )); $menu_id=$_POST['menu_id']; if ($update) { Header("Location:../production/menuduzenle.php?durum=ok&menu_id=$menu_id"); } else{ Header("Location:../production/menuduzenle.php?durum=no"); } } if (isset($_POST['logoduzenle'])) { $uploads_dir = "../../images/logo"; @$tmp_name = $_FILES['ayar_logo']['tmp_name']; @$name = $_FILES['ayar_logo']['name']; $benzersizsayi1=rand(20000,32000); $benzersizsayi2=rand(20000,32000); $benzersizad=$benzersizsayi1.$benzersizsayi2; $ayarimgyol=substr($uploads_dir, 6)."/".$benzersizad.$name; @move_uploaded_file($tmp_name, "$uploads_dir/$benzersizad$name"); $duzenle=$db->prepare("UPDATE ayarlar SET ayar_logo=:logo WHERE ayar_id=0"); $update=$duzenle->execute(array( 'logo' => $ayarimgyol )); if ($update) { $resimsilunlink=$_POST['eski_yol']; unlink("../../$resimsilunlink"); Header("Location:../production/genelayar.php?durum=ok"); } else{ Header("Location:../production/genelayar.php?durum=no"); } } if (isset($_POST['kulresimduzenle'])) { $uploads_dir = "../../images/kullaniciresim"; @$tmp_name = $_FILES['kullanici_resim']['tmp_name']; @$name = $_FILES['kullanici_resim']['name']; $benzersizsayi1=rand(20000,32000); $benzersizsayi2=rand(20000,32000); $benzersizad=$benzersizsayi1.$benzersizsayi2; $ayarimgyol=substr($uploads_dir, 6)."/".$benzersizad.$name; @move_uploaded_file($tmp_name, "$uploads_dir/$benzersizad$name"); $duzenle=$db->prepare("UPDATE kullanici SET kullanici_resim=:resim WHERE kullanici_id={$_POST['kullanici_id']}"); $update=$duzenle->execute(array( 'resim' => $ayarimgyol )); if ($update) { $resimsilunlink=$_POST['eski_yol']; unlink("../../$resimsilunlink"); Header("Location:../production/kullaniciprofil.php?durum=ok"); } else{ Header("Location:../production/kullaniciprofil.php?durum=no"); } } if (isset($_POST['kulayarguncelle'])) { $kullanici_sifre=md5($_POST['kullanici_sifre']); $ayarkaydet=$db->prepare("UPDATE kullanici SET kullanici_sifre=:sifre, kullanici_adsoyad=:adsoyad WHERE kullanici_id={$_POST['kullanici_id']}"); $update=$ayarkaydet->execute(array( 'adsoyad' => $_POST['kullanici_adsoyad'], 'sifre' => $kullanici_sifre )); if ($update) { Header("Location:../production/kullaniciprofil.php?durum=ok"); } else{ Header("Location:../production/kullaniciprofil.php?durum=no"); } } #kullanıcı ekle if (isset($_POST['kullaniciekle'])) { $gel = $db ->query("SELECT * FROM kullanici WHERE kullanici_adi = '".$_POST['kad']."' "); if ($gel->rowCount()) { header("Location:../production/kullaniciekle.php"); $_SESSION['khata'] = "hata"; } else { $cek = $db ->query("INSERT INTO kullanici (kullanici_adi,kullanici_sifre,kullanici_adsoyad,kullanici_resim,kullanici_zaman,kullanici_durum,kullanici_yetki) VALUES ('".ucwords($_POST['kad'])."','".md5($_POST['ksifre'])."','".$_POST['kasoyad']."','images/kullaniciresim/resimsiz-profil.jpg','".date('d.m.Y')."','".$_POST['kdurum']."','".$_POST['kyetki']."')"); header("Location:../production/kullanici.php"); } } ?>
Output for 5.5.17, 7.0.26 - 7.0.31, 7.1.12 - 7.2.8
Warning: include(): open_basedir restriction in effect. File(baglan.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/d5nmp on line 4 Warning: include(baglan.php): failed to open stream: Operation not permitted in /in/d5nmp on line 4 Warning: include(): Failed opening 'baglan.php' for inclusion (include_path='.:') in /in/d5nmp on line 4
Output for 5.2.3 - 5.5.16, 5.5.18 - 5.6.30, 7.0.0 - 7.0.25, 7.1.0 - 7.1.11
Warning: include(baglan.php): failed to open stream: No such file or directory in /in/d5nmp on line 4 Warning: include(): Failed opening 'baglan.php' for inclusion (include_path='.:') in /in/d5nmp on line 4
Output for hhvm-3.22.0
Warning: include(baglan.php): File not found in /in/d5nmp on line -1
Output for hhvm-3.13.2 - 3.21.3
Warning: include(baglan.php): File not found in /in/d5nmp on line 4
Output for hhvm-3.10.1 - 3.12.14
Warning: File not found: baglan.php in /in/d5nmp on line 4
Output for 5.1.0 - 5.2.2
Warning: session_start(): Cannot send session cookie - headers already sent in /in/d5nmp on line 3 Warning: session_start(): Cannot send session cache limiter - headers already sent in /in/d5nmp on line 3 Warning: include(baglan.php): failed to open stream: No such file or directory in /in/d5nmp on line 4 Warning: include(): Failed opening 'baglan.php' for inclusion (include_path='.:') in /in/d5nmp on line 4
Output for 4.3.2 - 5.0.5
Warning: session_start(): Cannot send session cookie - headers already sent in /in/d5nmp on line 3 Warning: session_start(): Cannot send session cache limiter - headers already sent in /in/d5nmp on line 3 Warning: main(baglan.php): failed to open stream: No such file or directory in /in/d5nmp on line 4 Warning: main(): Failed opening 'baglan.php' for inclusion (include_path='.:') in /in/d5nmp on line 4
Output for 4.3.0 - 4.3.1
Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cookie - headers already sent in /in/d5nmp on line 3 Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cache limiter - headers already sent in /in/d5nmp on line 3 Warning: main(baglan.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/d5nmp on line 4 Warning: main() [http://www.php.net/function.main]: Failed opening 'baglan.php' for inclusion (include_path='.:') in /in/d5nmp on line 4