<?php session_start();?>
<?php
include_once 'ayarlar.php';
$mysql_baglanti= new yonetici(); 
$mysql_baglanti->mysql_baglan();
error_reporting(E_ALL ^ E_NOTICE);
ini_set('error_reporting', E_ALL ^ E_NOTICE); 
?>
<? if (isset($_SESSION['adminuser'])){?>
<!DOCTYPE html>
<html lang="en">
<head>
<title><?=$site_name?></title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/bootstrap-responsive.min.css" />
<link rel="stylesheet" href="css/colorpicker.css" />
<link rel="stylesheet" href="css/datepicker.css" />
<link rel="stylesheet" href="css/uniform.css" />
<link rel="stylesheet" href="css/select2.css" />
<link rel="stylesheet" href="css/matrix-style.css" />
<link rel="stylesheet" href="css/matrix-media.css" />
<link rel="stylesheet" href="css/bootstrap-wysihtml5.css" />
<link href="font-awesome/css/font-awesome.css" rel="stylesheet" />
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,800' rel='stylesheet' type='text/css'>
<script src="js/jquery.min.js"></script> 
<? include 'tiny_script.php';?>
</head>
<body>
<? include 'inc_header.php'?>
<? include 'inc_leftmenu.php'?>
<div id="content">
<div id="content-header">
  <div id="breadcrumb"> <a href="index.php" title="Anasayfaya Git" class="tip-bottom"><i class="icon-home"></i>ANASAYFA</a><a href="#" class="current">REFERANSLAR</a> </div>
  <h1>REFERANSLAR</h1>
</div>
<div class="container-fluid">
  <hr>
  <div class="row-fluid">
  	<link href="script/upload/css/ui-lightness/jquery-ui-1.8.14.custom.css" rel="stylesheet" type="text/css" />
    <link href="script/upload/css/fileUploader.css" rel="stylesheet" type="text/css" />
    
    <script src="script/upload/js/jquery.fileUploader.js" type="text/javascript"></script>
    <div class="span12">
      <div class="widget-box">
        <div class="widget-title"> <span class="icon"> <i class="icon-align-justify"></i> </span>
          <h5>Kayıt Ekle</h5>
        </div>
        <div class="widget-content nopadding">
          <form action="ajaxfunctions.php" method="post" enctype="multipart/form-data">
                <input type="file" name="userfile" class="fileUpload" multiple>
                <input type="hidden" name="islem" value="add_brands">
                <button id="px-submit" type="submit">Yükle</button>
                <button id="px-clear" type="reset">Temizle</button>
            </form>
            <script type="text/javascript">
                jQuery(function($){
                    $('.fileUpload').fileUploader();
                });
            </script>
        </div>
      </div>
      <div class="widget-box">
          <div class="widget-title"> <span class="icon"> <i class="icon-picture"></i> </span>
            <h5>Gallery</h5>
          </div>
          <div class="widget-content">
            <ul class="thumbnails">
            <? $query=mysql_query("Select * from brands ")?>
            <? while ($data=mysql_fetch_assoc($query)){?>
              <li class="span2" id="thumbnail<?=$data['id']?>"> <a> <img src="../<?=$data['image']?>" alt="" > </a>
                <div class="actions" > <a title="javascript:void(0)" class="image_delete" id="<?=stripslashes($data['id'])?>" href="#"><i class="icon-remove"></i></a> <a class="lightbox_trigger" href="../<?=$data['image']?>"><i class="icon-search"></i></a> </div>
              </li>
            <? }?>
            </ul>
           
            <input type="hidden" name="frend_ids" id="frend_ids" value="" /> 
            <script>
			$(document).ready(function() { 
				$('.image_delete').click(function() {  
					var image = $(this).attr('id');
					$.ajax({
						 type: 'post',
						 url: 'ajaxfunctions.php',
						 data: "f=delete_brand&image="+image,   
						 success: function(sonuc) {
							$('#thumbnail'+image).remove();
						 }
					});
					
				});
			});
			</script>
          </div>
        </div>
        
    </div>
</div>
</div>

<script src="js/jquery.ui.custom.js"></script> 
<script src="js/bootstrap.min.js"></script> 
<script src="js/bootstrap-colorpicker.js"></script> 
<script src="js/bootstrap-datepicker.js"></script> 
<script src="js/jquery.toggle.buttons.html"></script> 
<script src="js/masked.js"></script> 
<script src="js/jquery.uniform.js"></script> 
<script src="js/select2.min.js"></script> 
<script src="js/matrix.js"></script> 
<script src="js/matrix.form_common.js"></script> 
<script src="js/wysihtml5-0.3.0.js"></script> 
<script src="js/jquery.peity.min.js"></script> 
</body>
</html>
<? } else { header('location:login.php');}?>