PK

ADDRLIN : /proc/self/root/home/bw2hgtn172qm/www/jeffharrismusic.com/admin/
FLL :
Current File : //proc/self/root/home/bw2hgtn172qm/www/jeffharrismusic.com/admin/gallery_management.php

<?php
include("header.php");
$eid=$_GET['id'];
$aid=$_GET['aid'];
$status=$_GET['status'];
//print_r($_GET);
/* if(isset($eid))
{
	//print_r($_GET);
$query1="SELECT * FROM jeff_galleryimage WHERE id='".$eid."'";
$row = $db->get_a_line($query1);
$path = "uploads/gallery/".$row['galleryimage']."";
unlink($path);
$query=mysql_query("DELETE FROM jeff_galleryimage WHERE id='".$eid."'");
} */

	if($_GET['status']=='1')
	{
		$sql="UPDATE jeff_galleryimage SET status='0' where id='".$aid."'";
		$rs=$db->insert($sql);
	}
	if($_GET['status']=='0')
	{
		$sql="UPDATE jeff_galleryimage SET status='1' where id='".$aid."'";
		$rs=$db->insert($sql);
	}
?>
	<div id="wrapper">
		<?php
			include('sidebar.php');
		?>
		<div id="page-wrapper" class="gray-bg">
			 <?php include('afterlog_top.php'); ?>
			<!--------- Title ------------>
            <div class="row wrapper border-bottom white-bg page-heading">
                <div class="col-lg-10">
                    <h2>Gallery</h2>
						<ol class="breadcrumb">
							<li>
								<a href="#">Home</a>
							</li>
                        
							<li class="active">
								<strong>Gallery</strong>
							</li>
						</ol>
                </div>
                <div class="col-lg-2"> </div>
			</div>
		   <!--------- End Title ------------>
			<div class="wrapper wrapper-content">
                <div class="row animated fadeInRight">
					<div class="col-md-12">
						<div class="ibox float-e-margins">
							<div class="ibox-title">
								<a href="galleryimage_upload.php" class="btn btn-danger btn-xs" id="header_hover" ><h5 >Add</h5></a>
								<a href="gallery_management.php" class="btn btn-primary btn-xs"  ><h5 >Gallery</h5></a>
							    <div class="pull-right tooltip-demo ibox-tools">
									<a class="collapse-link">
										<i class="fa fa-chevron-up"></i>
									</a>
									<a class="close-link">
										<i class="fa fa-times"></i>
									</a>
								</div>
							</div>
						<!---------------- Form ---------------->
							<div class="ibox-content">
								<div class="row">
									<div class="col-lg-12">
										<p>
										<?php 
										if($_REQUEST['msg']=="sucss")
										{
											echo "<font style='text-align:center;color:green;font-size: 15px;'>Image Added Successfully </font>";
										}
										if($_REQUEST['msg']=="delete")
										{
											echo "<font style='text-align:center;color:green;font-size: 15px;'>Image Deleted Successfully </font>";
										}
										if($_REQUEST['msg']=="update")
										{
											echo "<font style='text-align:center;color:green;font-size: 15px;'>Image Update Successfully </font>";
										}
										?>
										</p>
											
										<div class="table-responsive">
											<table class="table table-striped table-bordered table-hover dataTables-example" >
												<thead>
													<tr>
														<th>S.No</th>
														<th>Image Uploaded Date</th>
														<th>Gallery Images</th>
														<th>Status</th>
														<th>Edit</th>
														<th>Delete</th>
													</tr>
												</thead>
												<?php
													$qry="SELECT*FROM jeff_galleryimage ORDER BY id DESC";
													$row = $db->get_rsltset($qry);
													for($i=0;$i<count($row);$i++)
													{
												?>
												<tbody>
													<tr>
														<td><?php echo $i+1;?></td>
														<td><?php echo $row[$i]['image_date'];?></td>
														<td><img src="uploads/gallery/<?php echo  $row[$i]['galleryimage']; ?>"alt="" height="75" width="75"></td>
														<?php
															$status_res=$row[$i]['status'];
															if($status_res == "0"){
																$status = "InActive";
															}
															else
															{
																$status = "Active";
															}
														?>
														<td><a href="gallery_management.php?aid=<?php echo $row[$i]['id']; ?>&&status=<?php echo $status_res?>"><?php echo $status;?> </a></td>
														<td ><a href="galleryimage_edit.php?id=<?php echo $row[$i]['id'];?>"><img src="img/copy.png" alt="icon"/></a></td>
														<td><a href="gallery_management.php?id=<?php echo $row[$i]['id'];?>"><img src="img/delete.png" alt="icon"/></a></td>
													</tr>
												</tbody>
												<?php
													}
												?>
											</table>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<?php include("footer.php");?>
		</div>
	</div>	   
<script>
        $(document).ready(function(){
            $('.dataTables-example').DataTable({
                pageLength: 25,
                responsive: true,
                dom: '<"html5buttons"B>lTfgitp',
                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>
						
								
								
								
								
								
								
								
								
								
								
								
								


PK 99