Arama butonu
Bu konudaki kullanıcılar: 1 misafir, 1 mobil kullanıcı
1
Cevap
372
Tıklama
0
Öne Çıkarma
php scriptten anlayan arkadaşlar ?
B
9 yıl
Binbaşı
Konu Sahibi

Selam arkadaşlar, bir abim için oluşturmaya çalıştığım bir site var, sadece mekanının tanıtımı amaçlı, ücretsiz bir script buldum ve kurdum, düzenlemeleri yaptım.

Admin Paneline girdiğim zaman sitedeki hakkımızda bölümü hariç bir yeri düzenleyemiyorum, örnek iletişim sayfaları vs, admin panelinde sayfa yönetimi mevcut fakat düzenleme ve eklemeyi çalıştıramadım, scriptte bu özelliklerde var,

ne yapmalıyım yardımcı olabilecek birisi var mı acaba, çok teşekkürler.

 
<?php
@ob_start();
@session_start();
include("include/baglan.php");
include("include/fonksiyonlar.php");
oturumkontrolana();

if($_POST['sayfa_sira'] && $_GET['islem']=="")
{
$sayfa_sira = $_POST['sayfa_sira'];
$sayfa_adi = $_POST['sayfa_adi'];
$durum = $_POST['durum'];
$aciklama = $_POST['aciklama'];

include_once('class.upload.php');
$upload = new upload($_FILES['resim']);
if ($upload->uploaded){
$upload->file_auto_rename = true;
$upload->image_resize = true;
$upload->image_ratio_crop = true;
$upload->image_x = 978;
$upload->image_y = 110;
$upload->image_text = ''.$yazi.'';
$upload->image_text_color = '#000000';
$upload->process("../Dosyalar/Sayfa/");
if ($upload->processed){
$sayfaresim=''.$upload->file_dst_name.'';
}
}
if($sayfaresim=="")

$gitti=$sayfaresim=''.$upload->file_dst_name.'';

$sayfa_ekle_sorgu=mysql_query("insert into sayfalar (sira,
adi,
resim,
durum,
aciklama)
values ('$sayfa_sira',
'$sayfa_adi',
'$sayfaresim',
'$durum',
'$aciklama')");

$bilgi = ' <div class="alert alert-success">
Başarı ile Eklenmiştir !
</div>' ;
}



if($_POST['sayfa_sira'] && $_GET['islem']=="duzenle")
{
$sayfa_sira = $_POST['sayfa_sira'];
$sayfa_adi = $_POST['sayfa_adi'];
$duzenlenecek_id = $_GET['id'];
$durum = $_POST['durum'];
$aciklama = $_POST['aciklama'];

include_once('class.upload.php');
$upload = new upload($_FILES['resim']);
if ($upload->uploaded){
$upload->file_auto_rename = true;
$upload->image_resize = true;
$upload->image_ratio_crop = true;
$upload->image_x = 978;
$upload->image_y = 110;
$upload->image_text = ''.$yazi.'';
$upload->image_text_color = '#000000';
$upload->process("../Dosyalar/Sayfa/");
if ($upload->processed){
$sayfaresim=''.$upload->file_dst_name.'';
}
}
if($sayfaresim!="")
{
$resim_bul=mysql_fetch_array(mysql_query("select * from sayfalar where id='$duzenlenecek_id'"));
$resim_sil=unlink("../lib/images/sayfalar/".$resim_bul['resim']);

$sayfa_duzenle_sorgu=mysql_query("update sayfalar set durum='$durum', sira='$sayfa_sira', adi='$sayfa_adi', resim='$sayfaresim', aciklama='$aciklama' where id='$duzenlenecek_id'");

$gitti=$sayfaresim=''.$upload->file_dst_name.'';
}
else
{
$sayfa_duzenle_sorgu=mysql_query("update sayfalar set durum='$durum', aciklama='$aciklama', sira='$sayfa_sira', adi='$sayfa_adi' where id='$duzenlenecek_id'");
}

$bilgi = ' <div class="alert alert-success">
Başarı ile Güncellenmiştir !
</div>' ;
}



if($_GET['islem']=="duzenle")
{
$id = $_GET['id'];

$durum = "duzenle" ;

$sayfa_dizi=mysql_fetch_array(mysql_query("select * from sayfalar where id = '$id'"));

}

?>


<!DOCTYPE html>
<!--
Template Name: Conquer Responsive Admin Dashboard Template build with Twitter Bootstrap 2.3.1
Version: 1.4
Author: KeenThemes
Website:http://www.keenthemes.com
Purchase:http://themeforest.net/item/conquer-responsive-admin-dashboard-template/3716838
-->
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!--> <html lang="en"> <!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Yönetim Paneli</title>
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<meta content="" name="description" />
<meta content="" name="author" />
<!-- BEGIN GLOBAL MANDATORY STYLES -->
<link href="assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<link href="assets/plugins/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet" />
<link href="assets/plugins/font-awesome/css/font-awesome.css" rel="stylesheet" />
<link href="assets/css/style.css" rel="stylesheet" />
<link href="assets/css/style-responsive.css" rel="stylesheet" />
<link href="assets/css/themes/default.css" rel="stylesheet" id="style_color" />
<link href="assets/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css" />
<link href="#" rel="stylesheet" id="style_metro" />
<!-- END GLOBAL MANDATORY STYLES -->
<!-- BEGIN PAGE LEVEL STYLES -->
<link href="assets/plugins/fancybox/source/jquery.fancybox.css" rel="stylesheet" rel="stylesheet" type="text/css" />
<link href="assets/plugins/gritter/css/jquery.gritter.css" rel="stylesheet" type="text/css" />
<link href="assets/plugins/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet" type="text/css" />
<link href="assets/plugins/fullcalendar/fullcalendar/bootstrap-fullcalendar.css" rel="stylesheet" type="text/css" />
<link href="assets/plugins/jqvmap/jqvmap/jqvmap.css" media="screen" rel="stylesheet" type="text/css" />
<!-- END PAGE LEVEL STYLES -->
<!-- BEGIN PAGE LEVEL STYLES -->
<link rel="stylesheet" type="text/css" href="assets/plugins/bootstrap-fileupload/bootstrap-fileupload.css" />
<link rel="stylesheet" type="text/css" href="assets/plugins/gritter/css/jquery.gritter.css" />
<link rel="stylesheet" type="text/css" href="assets/plugins/chosen-bootstrap/chosen/chosen.css" />
<link rel="stylesheet" type="text/css" href="assets/plugins/select2/select2.css" />
<link rel="stylesheet" type="text/css" href="assets/plugins/jquery-tags-input/jquery.tagsinput.css" />
<link rel="stylesheet" type="text/css" href="assets/plugins/clockface/css/clockface.css" />
<link rel="stylesheet" type="text/css" href="assets/plugins/bootstrap-wysihtml5/bootstrap-wysihtml5.css" />
<link rel="stylesheet" type="text/css" href="assets/plugins/bootstrap-datepicker/css/datepicker.css" />
<link rel="stylesheet" type="text/css" href="assets/plugins/bootstrap-timepicker/compiled/timepicker.css" />
<link rel="stylesheet" type="text/css" href="assets/plugins/bootstrap-colorpicker/css/colorpicker.css" />
<link rel="stylesheet" type="text/css" href="assets/plugins/bootstrap-toggle-buttons/static/stylesheets/bootstrap-toggle-buttons.css" />
<link rel="stylesheet" type="text/css" href="assets/plugins/bootstrap-daterangepicker/daterangepicker.css" />
<!-- END PAGE LEVEL STYLES -->
</head>
<!-- END HEAD -->

<!-- BEGIN BODY -->
<body class="fixed-top">
<!-- BEGIN HEADER -->
<?php include("header.php") ;?>
<!-- END HEADER -->



<!-- BEGIN CONTAINER -->
<div id="container" class="row-fluid">


<!-- BEGIN SIDEBAR -->
<?php include("menu.php") ;?>
<!-- END SIDEBAR MENU -->
</div>
<!-- END SIDEBAR -->



<!-- BEGIN PAGE -->
<div id="body">

<!-- BEGIN PAGE CONTAINER-->
<div class="container-fluid">
<!-- BEGIN PAGE HEADER-->
<div class="row-fluid">
<div class="span12">

<!-- BEGIN PAGE TITLE & BREADCRUMB-->
<h3 class="page-title">
<?=ucwords($_SESSION['yonetici_ad_soyad'])?> <small>Hoşgeldin | Site Yönetim Paneli</small>
</h3>
<!-- END PAGE TITLE & BREADCRUMB-->
</div>
</div>
<!-- END PAGE HEADER-->


<!-- BURALAR BENIM ALANIM BASI-->
<div id="page" class="dashboard">

<div class="widget box light-grey">

<div class="widget-title">

<h4><i class="icon-edit"></i> Sayfa Ekleme / Güncelleme</h4>

</div> <!--widget-title end-->


<div class="widget-body form">

<?=$bilgi?>

<!-- BEGIN FORM-->
<form action="#" id="form_sample_1" class="form-horizontal" method="post" enctype="multipart/form-data">
<div class="control-group">
<label class="control-label">Sayfa Sırası</label>
<div class="controls">
<input type="text" name="sayfa_sira" data-required="1" class="span6 " value="<?=$sayfa_dizi['sira']?>"/>
</div>
</div>

<div class="control-group">
<label class="control-label">Sayfa Adı</label>
<div class="controls">
<input name="sayfa_adi" type="text" class="span6 " value="<?=$sayfa_dizi['adi']?>"/>
</div>
</div>
<div class="control-group">
<label class="control-label">Durumu</label>
<div class="controls">
<div class="basic-toggle-button">

<?php
if($_GET['islem']=='duzenle')
{
?>
<input type="checkbox" class="toggle" name="durum" <?php if($sayfa_dizi['durum']=='1') {?>checked="checked" <?php } ?> value="1" />
<?php
}
else
{
?>
<input type="checkbox" class="toggle" checked="checked" name="durum" value="1" />
<?php
}
?>
</div>
</div>
</div>


<div class="control-group">
<label class="control-label">Açıklama</label>
<div class="controls">
<textarea class="span12 ckeditor m-wrap" name="aciklama" rows="6"><?=$sayfa_dizi['aciklama']?></textarea>
</div>
</div>


<div class="form-actions">

<?php
if($_GET['islem']=="duzenle")
{
?>
<button type="submit" onclick="submit();" class="btn btn-primary"><i class="icon-ok"></i> Güncelle</button>
<?php
}
else
{
?>
<button type="submit" onclick="submit();" class="btn btn-primary"><i class="icon-ok"></i> Kaydet</button>
<?php
}
?>
</div>
</form>
<!-- END FORM-->

</div> <!--widget box light-grey end-->

</div>
<!-- BURALAR BENIM ALANIM-->


</div>
<!-- END PAGE CONTAINER-->


</div>
<!-- END PAGE -->


</div>
<!-- END CONTAINER -->



<!-- BEGIN FOOTER -->
<?php include("footer.php") ;?>
<!-- END FOOTER -->

<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
<!-- BEGIN CORE PLUGINS -->
<script src="assets/plugins/jquery-1.8.3.min.js" type="text/javascript"></script>
<!-- IMPORTANT! Load jquery-ui-1.10.1.custom.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->
<script src="assets/plugins/jquery-ui/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>
<script src="assets/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<!--[if lt IE 9]>
<script src="assets/plugins/excanvas.js"></script>
<script src="assets/plugins/respond.js"></script>
<![endif]-->
<script src="assets/plugins/breakpoints/breakpoints.js" type="text/javascript"></script>
<!-- IMPORTANT! jquery.slimscroll.min.js depends on jquery-ui-1.10.1.custom.min.js -->
<script src="assets/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
<script src="assets/plugins/jquery.blockui.js" type="text/javascript"></script>
<script src="assets/plugins/jquery.cookie.js" type="text/javascript"></script>
<script src="assets/plugins/uniform/jquery.uniform.min.js" type="text/javascript" ></script>
<!-- END CORE PLUGINS -->
<!-- BEGIN PAGE LEVEL PLUGINS -->
<script type="text/javascript" src="assets/plugins/jquery-validation/dist/jquery.validate.min.js"></script>
<script type="text/javascript" src="assets/plugins/jquery-validation/dist/additional-methods.min.js"></script>
<script type="text/javascript" src="assets/plugins/chosen-bootstrap/chosen/chosen.jquery.min.js"></script>
<!-- END PAGE LEVEL PLUGINS -->
<!-- BEGIN PAGE LEVEL PLUGINS -->
<script type="text/javascript" src="assets/plugins/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="assets/plugins/bootstrap-fileupload/bootstrap-fileupload.js"></script>
<script type="text/javascript" src="assets/plugins/chosen-bootstrap/chosen/chosen.jquery.min.js"></script>
<script type="text/javascript" src="assets/plugins/select2/select2.min.js"></script>
<script type="text/javascript" src="assets/plugins/bootstrap-wysihtml5/wysihtml5-0.3.0.js"></script>
<script type="text/javascript" src="assets/plugins/bootstrap-wysihtml5/bootstrap-wysihtml5.js"></script>
<script type="text/javascript" src="assets/plugins/jquery-tags-input/jquery.tagsinput.min.js"></script>
<script type="text/javascript" src="assets/plugins/bootstrap-toggle-buttons/static/js/jquery.toggle.buttons.js"></script>
<script type="text/javascript" src="assets/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="assets/plugins/clockface/js/clockface.js"></script>
<script type="text/javascript" src="assets/plugins/bootstrap-daterangepicker/date.js"></script>
<script type="text/javascript" src="assets/plugins/bootstrap-daterangepicker/daterangepicker.js"></script>
<script type="text/javascript" src="assets/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.js"></script>
<script type="text/javascript" src="assets/plugins/bootstrap-timepicker/js/bootstrap-timepicker.js"></script>
<script type="text/javascript" src="assets/plugins/jquery-inputmask/jquery.inputmask.bundle.min.js"></script>
<script type="text/javascript" src="assets/plugins/jquery.input-ip-address-control-1.0.min.js"></script>
<!-- END PAGE LEVEL PLUGINS -->
<!-- BEGIN PAGE LEVEL STYLES -->
<script src="assets/scripts/app.js"></script>
<script src="assets/scripts/form-validation.js"></script>
<script src="assets/scripts/form-components.js"></script>
<!-- END PAGE LEVEL STYLES -->
<script>
jQuery(document).ready(function() {
// initiate layout and plugins
App.init();
FormValidation.init();
FormComponents.init();
});
</script>
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>

DH forumlarında vakit geçirmekten keyif alıyor gibisin ancak giriş yapmadığını görüyoruz.

Üye olduğunda özel mesaj gönderebilir, beğendiğin konuları favorilerine ekleyip takibe alabilir ve daha önce gezdiğin konulara hızlıca erişebilirsin.

Üye Ol Şimdi Değil





< Bu mesaj bu kişi tarafından değiştirildi Bmw. -- 25 Ağustos 2016; 2:44:32 >

C
9 yıl
Teğmen

php kodlarında kabataslak baktım ama bi bozukluk yok gibi veritabanıyla alakalı olabilir eklettiğin yerlerin sütunlarına sıralamalarını filan bi gözden geçir derim



DH Mobil uygulaması ile devam edin. Mobil tarayıcınız ile mümkün olanların yanı sıra, birçok yeni ve faydalı özelliğe erişin. Gizle ve güncelleme çıkana kadar tekrar gösterme.