
PK 
<?php
ob_start();
//error_reporting(E_ALL ^ E_NOTICE);
@session_start();
ini_set('allow_url_include',1);
date_default_timezone_set("Asia/Kolkata");
set_time_limit(600);
ini_set('max_execution_time',600);
include '../includes/settings/constant.php';
require_once '../includes/settings/PDODB.php';
include '../includes/modules/functions.php';
$function = new FUNCTIONS();
if(empty($_SESSION['adminId'])){
header("Location: ../index.php");
exit();
}
$gallerydata = $function->getGallery(NULL,@$_GET['id'],1);
//print_r($news); exit;
//print_r($_POST);
//delete latest news
if(!empty($_GET['img-id']) && ($_GET['action']=='Del')) {
//print_r($_GET['id']); exit;
$id=$_GET['img-id'];
$cat_id=$_GET['cat-id'];
$pdodb = PDODB::getInstance();
$sql = "UPDATE gallery SET isactive=0 WHERE id = '".$id."'";
//print_r($sql); exit;
$result = $pdodb->query($sql);
PDODB::closeInstance();
if(!empty($result)){
echo "<script>window.location.href='gallery.php?id=$cat_id';</script>";
}
}
//end delete latest news
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>INSPINIA | Basic Form</title>
<?php include_once '../layout/style.php'; ?>
</head>
<body>
<div id="wrapper">
<nav class="navbar-default navbar-static-side" role="navigation">
<div class="sidebar-collapse">
<ul class="nav metismenu" id="side-menu">
<li class="nav-header">
<div class="dropdown profile-element">
<span>
<img alt="image" class="img-circle" src="../img/profile_small.jpg" />
</span>
<a data-toggle="dropdown" class="dropdown-toggle" href="#">
<span class="clear"> <span class="block m-t-xs"> <strong class="font-bold">Taattva</strong>
</span> <span class="text-muted text-xs block">Art Director <b class="caret"></b></span> </span> </a>
<ul class="dropdown-menu animated fadeInRight m-t-xs">
<li><a href="#">Profile</a></li>
<li class="divider"></li>
<li><a href="#">Logout</a></li>
</ul>
</div>
<div class="logo-element">Taattva</div>
</li>
<li>
<a href="#"><i class="fa fa-th-large"></i> <span class="nav-label">Dashboards</span> <span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li><a href="../dashboard/index.php">Dashboard</a></li>
</ul>
</li>
<li>
<a href="#"><i class="fa fa-list"></i><span class="nav-label">Meta Tag</span><span class="fa arrow"></span></a>
<ul class="nav nav-second-level collapse">
<li><a href="../meta/create.php">Create</a></li>
<li><a href="../meta/index.php">List</a></li>
</ul>
</li>
<li>
<a href="#"><i class="fa fa-list"></i><span class="nav-label">About</span><span class="fa arrow"></span></a>
<ul class="nav nav-second-level collapse">
<li><a href="../aboutus/index.php">View</a></li>
</ul>
</li>
<li>
<a href="#"><i class="fa fa-list"></i><span class="nav-label">Contact</span><span class="fa arrow"></span></a>
<ul class="nav nav-second-level collapse">
<li><a href="../contact/index.php">View</a></li>
</ul>
</li>
<li>
<a href="#"><i class="fa fa-list"></i><span class="nav-label">Category</span><span class="fa arrow"></span></a>
<ul class="nav nav-second-level collapse">
<li><a href="../category/create.php">Create Category</a></li>
<li><a href="../category/index.php">List of Category</a></li>
<li><a href="../category/inactive.php">Off Category List</a></li>
</ul>
</li>
<li class="active">
<a href="#"><i class="fa fa-file-image-o"></i> <span class="nav-label">Gallery</span><span class="fa arrow"></span></a>
<ul class="nav nav-second-level collapse">
<li class="active"><a href="../gallery/index.php">Products Category</a></li>
</ul>
</li>
<li>
<a href="#"><i class="fa fa-file-image-o"></i> <span class="nav-label">Home Banner</span><span class="fa arrow"></span></a>
<ul class="nav nav-second-level collapse">
<li><a href="../banner/index.php">Banner List</a></li>
<li><a href="../banner/create.php">Add Banner</a></li>
</ul>
</li>
</ul>
</div>
</nav>
<div id="page-wrapper" class="gray-bg">
<?php include_once '../layout/header.php'; ?>
<div class="row wrapper border-bottom white-bg page-heading">
<div class="col-lg-10">
<h2>Lightbox Gallery</h2>
<ol class="breadcrumb">
<li>
<a href="index.html">Home</a>
</li>
<li>
<a>Gallery</a>
</li>
<li class="active">
<strong>Lightbox Gallery</strong>
</li>
</ol>
</div>
<div class="col-lg-2">
</div>
</div>
<div class="wrapper wrapper-content">
<div class="row">
<div class="col-lg-12">
<div class="ibox float-e-margins">
<div class="ibox-content">
<h2>Image Gallery</h2>
<div class="lightBoxGallery">
<div class="row">
<?php foreach ($gallerydata as $key => $value) { ?>
<div class="col-lg-3">
<img src="../uploads/category/<?=$value['file'];?>" class="img-thumbnail">
<a class="btn btn-primary btn-xs" href="edit.php?id=<?=$value['id'];?>"><i class="fa fa-pencil"></i> Edit</a>
<a class="btn btn-danger btn-xs" href="gallery.php?img-id=<?=$value['id'];?>&cat-id=<?=$value['cat_id'];?>&action=Del" onclick=" return confirm('Do you really want to delete!')"><i class="fa fa-trash"></i> Delete</a>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include_once '../layout/script.php'; ?>
<script>
function tossterMsgAlert(msg='Welcome',title='') {
toastr.options = {
closeButton: true,
//debug: false,
newestOnTop: false,
//progressBar: false,
positionClass: 'toast-top-center',
preventDuplicates: true,
//onclick: null,
//showDuration: 300,
//hideDuration: 1000,
timeOut: 2000,
//extendedTimeOut: 1000,
//showEasing: 'swing',
//hideEasing: 'linear',
//showMethod: 'fadeIn',
hideMethod: 'fadeOut'
};
toastr.warning(title,msg);
}
</script>
<!-- Page-Level Scripts -->
<script>
$(document).ready(function(){
$('.dataTables-example').DataTable({
dom: '<"html5buttons"B>lTfgitp',
columnDefs: [
{ type: "num-fmt", symbols:"R$" , targets: 4 }
],
buttons: [
{ extend: 'copy'},
{extend: 'csv'},
/*{extend: 'excel', title: 'ExampleFile'},
{extend: 'pdf', title: 'ExampleFile'},*/
/*{extend: 'print',
customize: function (win){
$(win.document.body).addClass('white-bg');
$(win.document.body).css('font-size', '10px');
$(win.document.body).find('table')
.addClass('compact')
.css('font-size', 'inherit');
}
}*/
]
});
});
</script>
</body>
</html>


PK 99