ÿØÿà JFIF ` ` ÿþ
|
Server : Apache/2 System : Linux srv244.medyabim.com 4.18.0-553.89.1.el8_10.x86_64 #1 SMP Mon Dec 8 03:53:08 EST 2025 x86_64 User : lionbursa ( 1773) PHP Version : 5.6.40 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/lionbursa/domains/lionuluslararasidanismanlik.com/private_html/admin/sistem/ |
Upload File : |
<?php
ob_start;
session_start();
if (!isset($_SESSION["Giris"])) {
header("Location:login.php");
return;
}
?>
<div class="row">
<div class="col-lg-12">
<div class="main-box clearfix">
<div class="main-box-body clearfix">
<div class="table-responsive">
<br />
<?php
$urunadi = htmlspecialchars($_POST['urunadi']);
$urunadi_en = htmlspecialchars($_POST['urunadi_en']);
$urunadi_de = htmlspecialchars($_POST['urunadi_de']);
$urunadi_ur = htmlspecialchars($_POST['urunadi_ur']);
$urunadi_do = htmlspecialchars($_POST['urunadi_do']);
$icerik = htmlspecialchars($_POST['icerik']);
$icerik_en = htmlspecialchars($_POST['icerik_en']);
$icerik_de = htmlspecialchars($_POST['icerik_de']);
$icerik_ur = htmlspecialchars($_POST['icerik_ur']);
$icerik_do = htmlspecialchars($_POST['icerik_do']);
$hit = htmlspecialchars($_POST['hit']);
$fiyat = htmlspecialchars($_POST['fiyat']);
$urunkodu = htmlspecialchars($_POST['urunkodu']);
$video = htmlspecialchars($_POST['video']);
$etiket = htmlspecialchars($_POST['etiket']);
$etiket_en = htmlspecialchars($_POST['etiket_en']);
$etiket_de = htmlspecialchars($_POST['etiket_de']);
$etiket_ur = htmlspecialchars($_POST['etiket_ur']);
$etiket_do = htmlspecialchars($_POST['etiket_do']);
$description = htmlspecialchars($_POST['description']);
$description_en = htmlspecialchars($_POST['description_en']);
$description_de = htmlspecialchars($_POST['description_de']);
$description_ur = htmlspecialchars($_POST['description_ur']);
$description_do = htmlspecialchars($_POST['description_do']);
$keywords = htmlspecialchars($_POST['keywords']);
$keywords_en = htmlspecialchars($_POST['keywords_en']);
$keywords_de = htmlspecialchars($_POST['keywords_de']);
$keywords_ur = htmlspecialchars($_POST['keywords_ur']);
$keywords_do = htmlspecialchars($_POST['keywords_do']);
include_once('class.upload.php');
$upload = new upload($_FILES['image1']);
if ($upload->uploaded){
$upload->file_auto_rename = true;
$upload->process("../upload/resimler");
if ($upload->processed){
$resim=''.$upload->file_dst_name.'';
$upload = new upload($_FILES['image1']);
if ($upload->uploaded){
$upload->image_resize = true;
$upload->image_ratio_y = true;
$upload->image_x = 400;
$upload->image_convert = 'jpg';
$upload->allowed = array ( 'image/*');
$upload->process('../upload/resimler/mini/');
if ($upload->processed){
$mini=''.$upload->file_dst_name.'';
$ins = $db->prepare("INSERT INTO urunler SET
urunadi = ?,
urunadi_en = ?,
urunadi_de = ?,
urunadi_ur = ?,
urunadi_do = ?,
fiyat = ?,
urunkodu = ?,
video = ?,
icerik = ?,
icerik_en = ?,
icerik_de = ?,
icerik_ur = ?,
icerik_do = ?,
mini = ?,
resim = ?,
hit = ?,
etiket = ?,
etiket_en = ?,
etiket_de = ?,
etiket_ur = ?,
etiket_do = ?,
description = ?,
description_en = ?,
description_de = ?,
description_ur = ?,
description_do = ?,
keywords = ?,
keywords_en = ?,
keywords_de = ?,
keywords_ur = ?,
keywords_do = ?");
$ins->execute(array(
$urunadi,
$urunadi_en,
$urunadi_de,
$urunadi_ur,
$urunadi_do,
$fiyat,
$urunkodu,
$video,
$icerik,
$icerik_en,
$icerik_de,
$icerik_ur,
$icerik_do,
$mini,
$resim,
$hit,
$etiket,
$etiket_en,
$etiket_de,
$etiket_ur,
$etiket_do,
$description,
$description_en,
$description_de,
$description_ur,
$description_do,
$keywords,
$keywords_en,
$keywords_de,
$keywords_ur,
$keywords_do
));
$pid = $db->lastInsertId();
echo '
<div class="alert alert-block alert-success fade in">
<h4><i class="fa fa-check-circle fa-fw fa-lg"></i> Ürün Başarıyla Eklenmiştir!</h4>
<p>Yeni Ürün eklemek için veya Ürün listesine geri dönmek için aşağıdaki butonları kullanabilirsiniz. </p>
<p>
<a class="btn btn-success" href="index.php?page=urunekle&menusec=ur"><i class="fa fa-plus-circle fa-lg"></i> Yeni Ürün Ekle</a> <a class="btn btn-default" href="index.php?page=urunlistesi&menusec=ur"><i class="fa fa-list"></i> Ürün Listesi</a>
</p>
</div>
';
foreach($_FILES['resim']['tmp_name'] as $key => $tmp_name ){
$file_name = $key.$_FILES['resim']['name'][$key];
$file_tmp =$_FILES['resim']['tmp_name'][$key];
if(!empty($file_tmp)) {
move_uploaded_file($file_tmp,"../upload/resimler/diger/".$file_name);
$sql= $db->prepare("INSERT INTO syresimler SET
sayfa_id = ?,
resim = ?");
$sql->execute(array(
$pid,
$file_name
));
}
}
$kategori_id = $_POST['kategori_id'];
for($i=0;$i<count($kategori_id);$i++){
$sql= $db->prepare("INSERT INTO kategoriset SET
urunid = ?,
kategori_id = ?");
$sql->execute(array(
$pid,
$kategori_id[$i]
));
}
}
}
}} else {
echo '
<div class="alert alert-block alert-danger fade in">
<h4><i class="fa fa-check-circle fa-fw fa-lg"></i> Ürün Eklerken Hata Meydana Geldi!</h4>
<p>Hatanın Kaynağı şunlar olabilir.<br/> Ftp ana dizinde bulunan upload klasörünün içerisindeki resimler klasörünün ve resimler klasörünün içindeki mini ve diger klasörlerinin yazma izni 777 olmalıdır.<br/>
Yüklemeye çalıştığınız resmin boyutu 4 mb den büyükse hataya neden olabilir. Hosting firmaları upload limitini genelde 4 mb ile sınırlamaktadırlar.<br/>
Yüklemeye Çalıştığınız resmin adında tr karakter varsa düzeltin. tr karakter olması durumunda upload esnasında tehdit oluşturabileceği için sunucu tarafından engellenmiş olabilir.<br/>
</p>
<p>
<a class="btn btn-success" href="index.php?page=urunekle&menusec=ur"><i class="fa fa-plus-circle fa-lg"></i> Tekrar Dene</a>
</p>
</div>
';
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>