LiteSpeed Linux server2.poyrazhosting.com 3.10.0-962.3.2.lve1.5.77.el7.x86_64 #1 SMP Mon Dec 12 07:06:14 EST 2022 x86_64 safemode : OFF MySQL: OFF | Perl: OFF | cURL: ON | WGet: OFF > / home / cuneytsener53 / restaurant1.snrsoft.com.tr / xpanel / | Server Ip : 104.21.78.54 |
Filename | /home/cuneytsener53/restaurant1.snrsoft.com.tr/xpanel/galeri.php |
Size | 7.44 kb |
Permission | rw-r--r-- |
Owner | |
Create time | 02-Mar-2025 05:46 |
Last modified | 05-Nov-2020 11:21 |
Last accessed | 05-Apr-2025 10:22 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
<?php $blok="galeri"; ?>
<?php include 'inc/header.php';?>
<?php include 'inc/sidebar.php';?>
<?php include 'inc/navbar.php';?>
<link type="text/css" rel="stylesheet" href="assets/plugins/dropzone/dropzone.css">
<?php
if ($_POST) {
$gallery_name = $_POST['gallery_name'];
$foto = $_POST['foto'];
if ($gallery_name <> "" && isset($_FILES['foto']))
if ($_FILES['foto']['tmp_name'] != "") {
$boyut = $_FILES['foto']['size'];
if ($boyut > (1024 * 1024 * 30)) {
echo 'Dosya 30MB den büyük olamaz.';
} else {
$tip = $_FILES['foto']['type'];
$isim = $_FILES['foto']['name'];
$uzanti = explode('.', $isim);
$uzanti = $uzanti[count($uzanti) - 1];
$random = rand();
$dosya = $_FILES['foto']['tmp_name'];
$foto_url = $random . "." . $uzanti;
copy($dosya, '../img/' . $foto_url);
echo '';
$satir = [
'foto' => $foto_url,
'gallery_name' => $gallery_name,
];
$sql = "INSERT INTO gallery SET foto=:foto, gallery_name=:gallery_name;";
$durum = $dbh->prepare($sql)->execute($satir);
if ($durum) {
$sonId = $dbh->lastInsertId();
echo '
<div class="card-body collapse show" id="collapse8">
<div class="error-notice">
<div class="oaerror success">
<strong>Başarılı :</strong> - Belirtilen veriler eklenmiştir.</a>
</div>
</div>
</div>';
}
}
}
}
?>
<!-- Page Inner Start -->
<!--================================-->
<div class="page-inner">
<!-- Main Wrapper -->
<div id="main-wrapper">
<!--================================-->
<!-- Breadcrumb Start -->
<!--================================-->
<div class="pageheader pd-t-25 pd-b-35">
<div class="pd-t-5 pd-b-5">
<h1 class="pd-0 mg-0 tx-20"><?php echo $dil["galeri"];?> </h1>
</div>
<div class="breadcrumb pd-0 mg-0">
<a class="breadcrumb-item" href="index.php"><?php echo $dil["anasayfa"];?></a>
<span class="breadcrumb-item active"> <?php echo $dil["galeri"];?></span>
</div>
</div>
<!--/ Breadcrumb End -->
<!--================================-->
<div class="row row-xs clearfix">
<!--================================-->
<!-- DropzoneJS Basic Start -->
<!--================================-->
<div class="col-md-12 col-lg-12">
<div class="card mg-b-20">
<div class="card-header">
<h4 class="card-header-title">
<?php echo $dil["galeri"];?>
</h4>
<div class="card-header-btn">
<a href="#" data-toggle="refresh" class="btn card-refresh"><i class="ion-android-refresh"></i></a>
</div>
</div>
<div class="card-body collapse show" id="collapse14">
<form action="" method="post" enctype="multipart/form-data" class="dropzone needsclick" id="dropzone-demo1">
<div class="col-lg-12">
<div class="form-group">
<label class="form-control-label active"><?php echo $dil["foto_adi"];?>: <span class="tx-danger">*</span></label>
<input class="form-control" type="text" name="gallery_name" >
</div>
</div>
<div class="dz-message needsclick">
<?php echo $dil["foto_uyari"];?>
<span class="note needsclick"><?php echo $dil["foto_uyarix"];?></span>
</div>
<div class="fallback">
<center> <input name="foto" type="file" multiple></center>
</div>
<?php
$coksorgu = $dbh->prepare("SELECT * FROM gallery ");
$coksorgu->execute();
while ($coksonuc = $coksorgu->fetch()) {
$id = $coksonuc['id'];
$gallery_name = $coksonuc['gallery_name'];
$foto = $coksonuc['foto'];
?>
<!--================================-->
<div class="col-md-12 col-lg-12">
<div class="card-body collapse show" id="collapse5">
<input type="file" class="dropify" data-height="200" data-default-file="../img/<?=$coksonuc['foto'];?>"/>
</div>
</div>
<a href="galeri-sil.php?id=<?=$coksonuc['id'];?>" class="btn btn-outline-danger btn-icon mg-r-5" data-toggle="tooltip" data-trigger="hover" data-placement="right" title="" data-original-title="Foto Siler"><div><i class="fa fa-minus-circle"></i></div></a>
<!--================================-->
<?php } ?>
<div class="row mg-t-50">
<div class="col-sm-12 col-md-12">
<button type="submit" class="btn btn-primary btn-with-icon btn-block mg-t-10">
<div class="ht-40">
<span class="icon wd-40"><i class="fa fa-spin fa-circle-o-notch"></i></span>
<span class="pd-x-15"><?php echo $dil["kaydet"];?></span>
</div>
</button>
</div>
</div>
</form>
<br>
</div>
</div>
</div>
</div>
</div>
<!--/ Main Wrapper End -->
</div>
<!--/ Page Inner End -->
<!--================================-->
<script src="assets/plugins/dropzone/dropzone.js"></script>
<?php include 'inc/footer.php';?>
<?php include 'inc/header.php';?>
<?php include 'inc/sidebar.php';?>
<?php include 'inc/navbar.php';?>
<link type="text/css" rel="stylesheet" href="assets/plugins/dropzone/dropzone.css">
<?php
if ($_POST) {
$gallery_name = $_POST['gallery_name'];
$foto = $_POST['foto'];
if ($gallery_name <> "" && isset($_FILES['foto']))
if ($_FILES['foto']['tmp_name'] != "") {
$boyut = $_FILES['foto']['size'];
if ($boyut > (1024 * 1024 * 30)) {
echo 'Dosya 30MB den büyük olamaz.';
} else {
$tip = $_FILES['foto']['type'];
$isim = $_FILES['foto']['name'];
$uzanti = explode('.', $isim);
$uzanti = $uzanti[count($uzanti) - 1];
$random = rand();
$dosya = $_FILES['foto']['tmp_name'];
$foto_url = $random . "." . $uzanti;
copy($dosya, '../img/' . $foto_url);
echo '';
$satir = [
'foto' => $foto_url,
'gallery_name' => $gallery_name,
];
$sql = "INSERT INTO gallery SET foto=:foto, gallery_name=:gallery_name;";
$durum = $dbh->prepare($sql)->execute($satir);
if ($durum) {
$sonId = $dbh->lastInsertId();
echo '
<div class="card-body collapse show" id="collapse8">
<div class="error-notice">
<div class="oaerror success">
<strong>Başarılı :</strong> - Belirtilen veriler eklenmiştir.</a>
</div>
</div>
</div>';
}
}
}
}
?>
<!-- Page Inner Start -->
<!--================================-->
<div class="page-inner">
<!-- Main Wrapper -->
<div id="main-wrapper">
<!--================================-->
<!-- Breadcrumb Start -->
<!--================================-->
<div class="pageheader pd-t-25 pd-b-35">
<div class="pd-t-5 pd-b-5">
<h1 class="pd-0 mg-0 tx-20"><?php echo $dil["galeri"];?> </h1>
</div>
<div class="breadcrumb pd-0 mg-0">
<a class="breadcrumb-item" href="index.php"><?php echo $dil["anasayfa"];?></a>
<span class="breadcrumb-item active"> <?php echo $dil["galeri"];?></span>
</div>
</div>
<!--/ Breadcrumb End -->
<!--================================-->
<div class="row row-xs clearfix">
<!--================================-->
<!-- DropzoneJS Basic Start -->
<!--================================-->
<div class="col-md-12 col-lg-12">
<div class="card mg-b-20">
<div class="card-header">
<h4 class="card-header-title">
<?php echo $dil["galeri"];?>
</h4>
<div class="card-header-btn">
<a href="#" data-toggle="refresh" class="btn card-refresh"><i class="ion-android-refresh"></i></a>
</div>
</div>
<div class="card-body collapse show" id="collapse14">
<form action="" method="post" enctype="multipart/form-data" class="dropzone needsclick" id="dropzone-demo1">
<div class="col-lg-12">
<div class="form-group">
<label class="form-control-label active"><?php echo $dil["foto_adi"];?>: <span class="tx-danger">*</span></label>
<input class="form-control" type="text" name="gallery_name" >
</div>
</div>
<div class="dz-message needsclick">
<?php echo $dil["foto_uyari"];?>
<span class="note needsclick"><?php echo $dil["foto_uyarix"];?></span>
</div>
<div class="fallback">
<center> <input name="foto" type="file" multiple></center>
</div>
<?php
$coksorgu = $dbh->prepare("SELECT * FROM gallery ");
$coksorgu->execute();
while ($coksonuc = $coksorgu->fetch()) {
$id = $coksonuc['id'];
$gallery_name = $coksonuc['gallery_name'];
$foto = $coksonuc['foto'];
?>
<!--================================-->
<div class="col-md-12 col-lg-12">
<div class="card-body collapse show" id="collapse5">
<input type="file" class="dropify" data-height="200" data-default-file="../img/<?=$coksonuc['foto'];?>"/>
</div>
</div>
<a href="galeri-sil.php?id=<?=$coksonuc['id'];?>" class="btn btn-outline-danger btn-icon mg-r-5" data-toggle="tooltip" data-trigger="hover" data-placement="right" title="" data-original-title="Foto Siler"><div><i class="fa fa-minus-circle"></i></div></a>
<!--================================-->
<?php } ?>
<div class="row mg-t-50">
<div class="col-sm-12 col-md-12">
<button type="submit" class="btn btn-primary btn-with-icon btn-block mg-t-10">
<div class="ht-40">
<span class="icon wd-40"><i class="fa fa-spin fa-circle-o-notch"></i></span>
<span class="pd-x-15"><?php echo $dil["kaydet"];?></span>
</div>
</button>
</div>
</div>
</form>
<br>
</div>
</div>
</div>
</div>
</div>
<!--/ Main Wrapper End -->
</div>
<!--/ Page Inner End -->
<!--================================-->
<script src="assets/plugins/dropzone/dropzone.js"></script>
<?php include 'inc/footer.php';?>