📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
e-ticaretv4.demodesign.com.tr
/
wpanel
/
islemler
📝
galeri_ekle.php
← Geri Dön
<?php if(!defined("Hacking")){die("404 Not Found"); } ?> <?php if($_POST){ // Formdan gelen bilgileri $galeriBaslik = post('galeriBaslik'); $galeriResim = $_FILES['galeriResim']; $kategori_id = post('kategori_id'); $kategori = ''; if ($kategori_id != null){ $kategori = implode(' ', $kategori_id); $resimler = $Modul->cokluresimyukle_onhazirlik($galeriResim); $Modul->galeri_ekle("baslik_yok",$resimler, $kategori); } else { echo '<div class="alert alert-danger"> <strong>HATA!</strong> Lütfen kategori seçin!! </div>'; git('index.php?do=galeri&ekle',1); } } $kategoriler = $Sayfa->diger_kategori_listele(6); ?> <style> img{ max-width:100px; height:100px; margin-top:20px; } input{ margin-top:20px; } </style> <link rel="stylesheet" href="css/dragdropimage.css"> <div id="tour-11" class="header-content"> <h2><i class="fa fa-camera"></i>Yeni Fotoğraf Ekle</h2> </div> <div class="body-content animated fadeIn"> <form id="upload" action="" method="post" enctype="multipart/form-data"> <input type="hidden" name="galeri_baslik" value="baslik_yok"/> <div> <div style="background-color: #eeeeef; border: 2px dashed #555; color: #555; border-radius: 7px" class="form-group"> <h4 class="text-center"></h4> <input name="galeriResim[]" multiple type="file" id="fileselect" style="width: 100%; height: 200px; padding-top: 50px; padding-left: 38%" class="fffhover" onchange="readURL(this);"> <div style="text-align: center; font-weight: bold; color: #555; position:absolute; z-index: 2; top: 61%; left: 39%">yada buraya sürükle bırak</div> </div> </div> <div id="preview"></div> <div id="messages"> Dosya Bilgileri </div> <div class="panel-heading"> <div class="pull-left"> <h3 class="panel-title"><i class="fa fa-bars"></i>Galeriye Ait Kategori Seçimi</h3> </div> <div class="clearfix"></div> </div> <div class="panel-body no-padding"> <div class="form-body"> <div class="form-group"> <?php foreach($kategoriler as $kat){ ?> <input type="checkbox" name="kategori_id[]" value="<?php echo $kat['sayfa_id']; ?>"> <?php echo $kat['sayfa_baslik']; ?><br> <?php } ?> </div> </div> </div> <div class="form-footer"> <div class="pull-left"> <div id="submitbutton"> <button class="btn btn-primary mr-5" type="submit"><li class="fa fa-floppy-o"></li> Ekle</button> </div> </div> <div class="clearfix"></div> </div> </form> <div id="filedrag" style="display: none"></div> </div> <script src="css/dragdropimage.js"></script> <script> function readURL(input) { document.getElementById('preview').innerHTML = ''; if (input.files && input.files[0]) { for(var i =0 ; i<input.files.length; i++){ var reader = new FileReader(); console.log(reader); reader.onload = function (e) { console.log(e); var x = document.createElement("IMG"); x.setAttribute("src", e.target.result); x.setAttribute("class", ""); x.setAttribute("style", "padding:5px"); document.getElementById('preview').appendChild(x); }; reader.readAsDataURL(input.files[i]); } } } $( "#upload" ).submit(function( event ) { if ( $('[name="kategori_id[]"]:checked').length == 0){ alert('Lütfen kategori seçin!'); return false; } var imgs = document.getElementById('fileselect'); if ( imgs.files.length == 0){ alert('Lütfen resim seçin!'); return false; } }); </script>
💾 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