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/risalepanel/kategoriler.php
<?php
//yonetici kontrol dosyasını çagırır.
include ("include-panel/yonetici-kontrol.php");

// aktiv pasif simgesine tıklayınca durum güncelleme yapsın.
$durum_id  = $_GET["durum_id"];
if($durum_id>0){
	$durum     = $_GET["durum"];
	
	$guncelleme  = mysql_query("update bolumler set durum='$durum' where kategori_id='$durum_id' ");
}
//sil butonuna tıklayınca  kategoriyi sil

$sil_id   = $_GET["sil_id"];
if($sil_id>0){
$sil      = mysql_query("delete from bolumler where kategori_id='$sil_id'");     
}


?>


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>Risale Store</title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/font-awesome.min.css" rel="stylesheet">
    <link href="css/prettyPhoto.css" rel="stylesheet">
    <link href="css/price-range.css" rel="stylesheet">
    <link href="css/animate.css" rel="stylesheet">
	<link href="css/main.css" rel="stylesheet">
	<link href="css/responsive.css" rel="stylesheet">
	<link href="css/amazingslider-1.css" rel="stylesheet">
  
    <!--[if lt IE 9]>
    <script src="js/html5shiv.js"></script>
    <script src="js/respond.min.js"></script>
    <![endif]-->       
    <link rel="shortcut icon" href="images/ico/favicon.ico">
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="images/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="images/ico/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="images/ico/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="images/ico/apple-touch-icon-57-precomposed.png">
</head><!--/head-->

<body>
	 <?php include("include-panel/header-top.php")  ?>
      <?php include("include-panel/header.php")  ?>
	
	
    
	<section>
		<div class="container">
			<div class="row">														
				<div class="col-sm-12 padding-right">
					<div class="features_items"><!--features_items-->
						<h2 class="title text-center">Kateroriler</h2>
						<div class="col-sm-12">
							<table width="100%" border="1" cellspacing="0" cellpadding="2" bordercolor="#CCCCCC">
      <tr>
        <th colspan="7" scope="col">
        <a href="kategori-ekle.php" style="color:#06C;text-decoration:none">
        <i class="fa fa-plus-circle"></i>Kategori Ekle<br>
        <a>
        </th>
      </tr>
      <tr>
              <th scope="col">ID</th>
              <th scope="col">KATEGORİ ADI</th>
              <th scope="col">AÇIKLAMA</th>
              <th scope="col">DURUM</th>
              <th scope="col">AKTİF/PASİF</th>
              <th scope="col">GÜNCELLE</th>
              <th scope="col">SİL</th>
      </tr>
      <?php
	  // kategiri listeleme başladı
	  $listele     = mysql_query("select* from bolumler");
	  while ($dizi = mysql_fetch_array($listele)) {
		  //  fetch array bilgileri okuyup diziye atıyor 
		  
		  $kategori_id  =$dizi ["kategori_id"];
		  $kategori_adi  =$dizi ["kategori_adi"];
		  $description  =$dizi ["description"];
		  $durum  =$dizi ["durum"];
		  
		  
	  ?>
            <tr>
              <td><?php echo $kategori_id;?></td>
              <td><?php echo $kategori_adi;?></td>
              <td><?php echo $description;?></td>
              <td align="center"><?php echo $durum;?></td>
              <td align="center">
              
              <?php
			  if ($durum==1) {
			  ?>              
             <a href="?durum_id=<?php echo $kategori_id;?>&durum=0"> <span class="fa fa-check" style="color:#0F6"></span></a>
              <?php
			  }else{
				  ?>
             <a href="?durum_id=<?php echo $kategori_id;?>&durum=1"> <span class="fa fa-times" style="color:#F00"></span></a>
              <?php
			  }
			  ?>
              </td>
              <td align="center">
              <a href="kategori-guncelle.php?guncelle_id=<?php echo $kategori_id;?>">
              <i class="fa fa-edit"></i>
              </a>
              
                  </td>
              <td align="center">
              
              <a href="?sil_id=<?php echo $kategori_id;?>" onClick="return confirm('<?php echo $kategori_ad;?> kategorisini silmek istediğinizden emin misiniz?')">
              	<i class="fa fa-trash-o" style="color:#F00;"></i> 
              </a>
              
              
              </td>
             
            </tr>
            
             <?php
	  }
	  // kategiri listeleme biiti
	  ?>
      
            <tr>
              <td colspan="7" align="center">Toplam <?php echo mysql_num_rows($listele);?> kategori var.</td>
            </tr>
    </table>
						
						</div>
						
					
				</div>
			</div>
		</div>
	</section>
	
	<?php include("include-panel/footer.php") ?>
	
	
    <script src="sliderengine/jquery.js"></script>
    <script src="sliderengine/amazingslider.js"></script>
	 <script src="sliderengine/initslider-1.js"></script>	 
 	<script src="js/bootstrap.min.js"></script>
	<script src="js/jquery.scrollUp.min.js"></script>
	<script src="js/price-range.js"></script>
    <script src="js/jquery.prettyPhoto.js"></script>
    <script src="js/main.js"></script>
</body>
</html>