HEX
Server: Apache
System: Linux host.hizmetvakfi.org 4.18.0-553.16.1.el8_10.x86_64 #1 SMP Thu Aug 8 07:11:46 EDT 2024 x86_64
User: sinanpasha (1007)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/sinanpasha/public_html/risale/yeni/bilpanel/hakkimizda-guncelle.php
<?php
// Yönetici Kontrol dosyasını çağır
include ("include-panel/yonetici-kontrol.php");


// Link ile gönderilen guncelle_id değişkenini $_GET ile çek.
$guncelle_id		= $_GET ["guncelle_id"];
$bilgiler			= mysql_query(" select * from sayfalar where sayfa_id='1' ");
$dizi				= mysql_fetch_array($bilgiler);

$sayfa_title		= $dizi ["sayfa_title"];
$sayfa_ismi			= $dizi ["sayfa_ismi"];
$description		= $dizi ["description"];
$sayfa_icerik		= $dizi ["sayfa_icerik"];
$durum				= $dizi ["durum"];


if ( $_POST ["button"] ) {
	//Butona basınca Formdan bilgileri $_POST ile tekrar çek.
	$sayfa_title		= $_POST ["sayfa_title"];
	$description		= $_POST ["description"];
	$sayfa_icerik		= $_POST ["sayfa_icerik"];
	$sayfa_ismi			= $_POST ["sayfa_ismi"];
	$durum				= $_POST ["durum"];
}



?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Bil Soft Eticaret - Yönetim Paneli - hakkımızda Güncelle</title>
<link rel="stylesheet" type="text/css" href="css-panel/stiller.css">
<link rel="stylesheet" type="text/css" href="font-awesome/css/font-awesome.css">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico" type="image/x-icon">


<SCRIPT language=javascript>
	function textareaLimiter(field, countfield, maxlimit) {
		if (field.value.length > maxlimit) field.value = field.value.substring(0, maxlimit);
		else countfield.value = maxlimit - field.value.length;
	}
</SCRIPT>

</head>

<body>

<!-- ==================== Header Top ====================  -->
<?php
include("include-panel/header-top.php");
?>

<!-- ==================== Wrapper Top ====================  -->
<div id="wrapper" class="sablon_width">
  <?php
  include ("include-panel/header.php");
  ?>
  <div id="page_title">
    	<h1>HAKKIMIZDA GÜNCELLE</h1>
    </div>
  <div id="page_content">
    <form name="form1" method="post" action="">
            <table width="450" border="0" align="center" cellpadding="5" cellspacing="5">
              <tr>
                <td width="110" scope="col">Sayfa Başlık</td>
                <td width="10" scope="col">:</td>
                <td width="172" scope="col"><input name="sayfa_title" type="text" id="sayfa_title" value="<?php echo $sayfa_title;?>" size="25" maxlength="50"></td>
                <td width="93" scope="col">&nbsp;</td>
              </tr>
              <tr>
                <td>Description</td>
                <td>:</td>
                <td><textarea name="description" cols="25" rows="4" id="description" onKeyUp="textareaLimiter(this.form.description,this.form.descLen,160);" onKeyDown="textareaLimiter(this.form.description,this.form.descLen,160);"><?php echo $description;?></textarea></td>
                <td><input name="descLen" value="160" size="4" maxlength="3" readonly ></td>
              </tr>
              <tr>
                <td>Sayfa İsmi</td>
                <td>&nbsp;</td>
                <td><input name="sayfa_ismi" type="text" id="sayfa_ismi" value="<?php echo $sayfa_ismi;?>" size="25" maxlength="50"></td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td valign="top">Sayfa icerik</td>
                <td>&nbsp;</td>
                <td><?php

// Include CKEditor class.

include("ckeditor/ckeditor.php");

$ckeditor = new CKEditor();

//ckeditor klasörümüz eğer klasörümüz aynıysa değiştirmeyelim

$ckeditor->basePath = 'ckeditor/';

//Ckfinder ile ilgili değişkenler eğer dosya ve klasör isimlerinde değişiklik yoksa aynen devam edelim

$ckeditor->config['filebrowserBrowseUrl'] = 'ckfinder/ckfinder.html';

$ckeditor->config['filebrowserImageBrowseUrl'] = 'ckfinder/ckfinder.html?type=Images';

$ckeditor->config['filebrowserImageUploadUrl'] = 'ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images';

//ckeditor temamız daha fazlası için ckeditor/skins klasörüne bakın

$ckeditor->config['skin'] = 'office2003';

//Editör genişlik değerimiz

$ckeditor->config['width'] = 700;

//aciklama name yine sahip textarea oluşturuyor

$ckeditor->editor('sayfa_icerik',$sayfa_icerik);

?></td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td>Durum</td>
                <td>:</td>
                <td><input name="durum" type="checkbox" id="durum" value="1" <?php if ( $durum==1 ) { echo ' checked="CHECKED" '; } ?> ></td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td><input type="submit" name="button" id="button" value="Güncelle"></td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>
                <?php
                if ( $_POST ["button"] ) {
				// Butona basılmış ise kontrolleri yap
					if (!$sayfa_title) {
						echo "sayfa adı giriniz";
					} elseif (!$description) {
						echo "Description giriniz";
					} else {
					// Kategori güncelle başladı
						$guncelle	= mysql_query("update sayfalar set sayfa_title='$sayfa_title',description='$description',sayfa_ismi='$sayfa_ismi',sayfa_icerik='$sayfa_icerik', durum='$durum' where sayfa_id='1' ");
						if ($guncelle) {
							echo "Güncellendi";
							header("refresh:3;url=hakkimizda-guncelle.php");
						} else {
							echo "HATA :Güncellenemedi";
						}
							
					//--------------------------	
					}
				//--------------------------------------					
				}				
				?>
                </td>
                <td>&nbsp;</td>
              </tr>
            </table>
          </form>
  </div>
</div>

<!-- ==================== Footer Bottom ====================  -->
<?php
include("include-panel/footer.php");
?>


</body>
</html>