📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
e-ticaretv3.demodesign.com.tr
📝
bayisiparisleral.php
← Geri Dön
<?php ob_start(); session_start(); header('Content-Type: text/html; charset=utf-8'); ini_set('memory_limit', '512M'); set_time_limit(30000); ini_set('display_errors', 1); require_once('yonetim/db.php'); $genelxml = $DB->query("select * from xml where id=1")->fetch(PDO::FETCH_ASSOC); $url = $genelxml['siparisxmlurl']; $urunler = new SimpleXMLElement(curl_post($url)); foreach ($urunler->siparis as $urun) { $sino = $urun->sino; $ip = $urun->ip; $bakx = $DB->query("SELECT id FROM siparisler WHERE sino = '$sino' and ip = '$ip' LIMIT 1")->fetchAll(PDO::FETCH_ASSOC); if (count($bakx) > 0) { $durum = $urun->durum; $krg = $urun->krg; $takip = $urun->takip; $veriekle = $DB->prepare("UPDATE siparisler SET durum=?, krg=?, takip=? WHERE sino = ? and ip = ?"); $veriekle->execute(array($durum,$krg,$takip,$sino,$ip)); } else { $sino = $urun->sino; $isim = $urun->isim; $email = $urun->email; $telefon = $urun->telefon; $urunler = $urun->urunler; $kadres = $urun->kadres; $mesaj = $urun->mesaj; $ip = $urun->ip; $adres = $urun->adres; $tutar = $urun->tutar; $kdv = $urun->kdv; $toplam = $urun->toplam; $tarih = $urun->tarih; $durum = $urun->durum; $sozlesme = $urun->sozlesme; $poss = $urun->poss; $kapi = $urun->kapi; $url = $urun->url; $uye = "0"; $kargo = $urun->kargo; $ukd = $urun->ukd; $tc = $urun->tc; $il = $urun->il; $ilce = $urun->ilce; $odeme = $urun->odeme; $krg = $urun->krg; $takip = $urun->takip; $uadet = $urun->uadet; $badet = $urun->badet; $nedir = $urun->nedir; $vd = $urun->vd; $vno = $urun->vno; $kupondeger = $urun->kupondeger; $eurunler = $urun->eurunler; $kuponbak = $urun->kuponbak; $vergidurumu = $urun->vergidurumu; $xml = "1"; $verieklez = $DB->prepare("INSERT INTO siparisler SET sino=?, isim=?, email=?, telefon=?, urunler=?, kadres=?, mesaj=?, ip=?, adres=?, tutar=?, kdv=?, toplam=?, tarih=?, durum=?, sozlesme=?, pos=?, kapi=?, url=?, uye=?, kargo=?, ukd=?, tc=?, il=?, ilce=?, odeme=?, krg=?, takip=?, uadet=?, badet=?, nedir=?, vd=?, vno=?, kupondeger=?, eurunler=?, kuponbak=?, vergidurumu=?, xml=?"); $verieklez->execute(array($sino, $isim, $email, $telefon, $urunler, $kadres, $mesaj, $ip, $adres, $tutar, $kdv, $toplam, $tarih, $durum, $sozlesme, $poss, $kapi, $url, $uye, $kargo, $ukd, $tc, $il, $ilce, $odeme, $krg, $takip, $uadet, $badet, $nedir, $vd, $vno, $kupondeger, $eurunler, $kuponbak, $vergidurumu, $xml)); } } echo "bitti"; function curl_post($url, $post_array=array(), $timeout=30, $error_report=FALSE) { // PREPARE THE POST STRING $post_string = NULL; foreach ($post_array as $key => $val) { $post_string .= $key . '=' . urlencode($val) . '&'; } $post_string = rtrim($post_string, '&'); $agent= 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)'; // PREPARE THE CURL CALL $curl = curl_init(); curl_setopt( $curl, CURLOPT_URL, $url ); curl_setopt( $curl, CURLOPT_HEADER, FALSE ); curl_setopt( $curl, CURLOPT_POST, TRUE ); curl_setopt( $curl, CURLOPT_POSTFIELDS, $post_string ); curl_setopt( $curl, CURLOPT_ENCODING, 'gzip,deflate' ); curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt( $curl, CURLOPT_TIMEOUT, $timeout ); curl_setopt( $curl, CURLOPT_RETURNTRANSFER, TRUE ); curl_setopt( $curl, CURLOPT_FOLLOWLOCATION, TRUE ); curl_setopt( $curl, CURLOPT_USERAGENT, $agent); curl_setopt( $curl, CURLOPT_VERBOSE, true); // EXECUTE THE CURL CALL $htm = curl_exec($curl); $err = curl_errno($curl); $inf = curl_getinfo($curl); // ON FAILURE if (!$htm) { // PROCESS ERRORS HERE if ($error_report) { echo "CURL FAIL: $url TIMEOUT=$timeout, CURL_ERRNO=$err"; echo "<pre>\n"; var_dump($inf); echo "</pre>\n"; } curl_close($curl); return FALSE; } // ON SUCCESS curl_close($curl); return $htm; } class SimpleImage { var $image; var $image_type; function load($filename) { $image_info = getimagesize($filename); $this->image_type = $image_info[2]; if ($this->image_type == IMAGETYPE_JPEG) { $this->image = imagecreatefromjpeg($filename); } elseif ($this->image_type == IMAGETYPE_GIF) { $this->image = imagecreatefromgif($filename); } elseif ($this->image_type == IMAGETYPE_PNG) { $this->image = imagecreatefrompng($filename); } } function save($filename, $image_type = IMAGETYPE_JPEG, $compression = 75, $permissions = null) { if ($image_type == IMAGETYPE_JPEG) { imagejpeg($this->image, $filename, $compression); } elseif ($image_type == IMAGETYPE_GIF) { imagegif($this->image, $filename); } elseif ($image_type == IMAGETYPE_PNG) { imagepng($this->image, $filename); } if ($permissions != null) { chmod($filename, $permissions); } } function output($image_type = IMAGETYPE_JPEG) { if ($image_type == IMAGETYPE_JPEG) { imagejpeg($this->image); } elseif ($image_type == IMAGETYPE_GIF) { imagegif($this->image); } elseif ($image_type == IMAGETYPE_PNG) { imagepng($this->image); } } function getWidth() { return imagesx($this->image); } function getHeight() { return imagesy($this->image); } function resizeToHeight($height) { $ratio = $height / $this->getHeight(); $width = $this->getWidth() * $ratio; $this->resize($width, $height); } function resizeToWidth($width) { $ratio = $width / $this->getWidth(); $height = $this->getheight() * $ratio; $this->resize($width, $height); } function scale($scale) { $width = $this->getWidth() * $scale / 100; $height = $this->getheight() * $scale / 100; $this->resize($width, $height); } function resize($width, $height) { $new_image = imagecreatetruecolor($width, $height); imagecopyresampled($new_image, $this->image, 0, 0, 0, 0, $width, $height, $this->getWidth(), $this->getHeight()); $this->image = $new_image; } } function getimg1453($url) { $headers[] = 'Accept: image/gif, image/x-bitmap, image/jpg, image/jpeg, image/pjpeg'; $headers[] = 'Connection: Keep-Alive'; $headers[] = 'Content-type: application/x-www-form-urlencoded;charset=UTF-8'; $user_agent = 'php'; $process = curl_init($url); curl_setopt($process, CURLOPT_HTTPHEADER, $headers); curl_setopt($process, CURLOPT_HEADER, 0); curl_setopt($process, CURLOPT_USERAGENT, $useragent); curl_setopt($process, CURLOPT_TIMEOUT, 30); curl_setopt($process, CURLOPT_RETURNTRANSFER, 1); curl_setopt($process, CURLOPT_FOLLOWLOCATION, 1); $return = curl_exec($process); curl_close($process); return $return; } function seo($s) { $find = array('Ç', 'Ş', 'Ğ', 'Ü', 'İ', 'Ö', 'ç', 'ş', 'ğ', 'ü', 'ö', 'ı', '+', '#'); $replace = array('c', 's', 'g', 'u', 'i', 'o', 'c', 's', 'g', 'u', 'o', 'i', 'plus', 'sharp'); $s = strtolower(str_replace($find, $replace, $s)); $s = preg_replace("@[^A-Za-z0-9\-_\.\+]@i", ' ', $s); $s = trim(preg_replace('/\s+/', ' ', $s)); $s = str_replace(' ', '-', $s); return $s; } $ayar = $DB->query("select * from ayarlar where ayar_id=1")->fetch(PDO::FETCH_ASSOC); function sifre_uret($uzunluk) { $karakterler = "abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ"; $karakter_sayi = strlen($karakterler); for ($ras = 0; $ras <$uzunluk; $ras++) { $rakam_ver = rand(0,$karakter_sayi-1); $sifre_ver .= $karakterler[$rakam_ver]; } return $sifre_ver; } $modul = $DB->query("select * from yontemler where id=1")->fetch(PDO::FETCH_ASSOC); $gfirsat = $DB->query("select * from moduller where id=1")->fetch(PDO::FETCH_ASSOC); ?>
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula