PK

ADDRLIN : /proc/self/root/home/bw2hgtn172qm/www/jeffharrismusic.com/admin/
FLL :
Current File : //proc/self/root/home/bw2hgtn172qm/www/jeffharrismusic.com/admin/album_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_albumimage WHERE id='".$eid."'";
$row = $db->get_a_line($query1);
$path = "uploads/album/".$row['albumimage']."";
unlink($path);
$query=mysql_query("DELETE FROM jeff_albumimage WHERE id='".$eid."'");
}

	

if($_GET['status']=='1')
					{
						$sql="UPDATE jeff_albumimage SET status='0' where id='".$aid."'";
						$rs=$db->insert($sql);
					}
					if($_GET['status']=='0')
					{
						$sql="UPDATE jeff_albumimage 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>Album</h2>
						<ol class="breadcrumb">
							<li>
								<a href="#">Home</a>
							</li>
                        
							<li class="active">
								<strong>Album</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="albumimage_upload.php" class="btn btn-danger btn-xs" id="header_hover" ><h5 >Add</h5></a>
								<a href="album_management.php" class="btn btn-primary btn-xs"  ><h5 >Album</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="wrapper wrapper-content animated fadeInRight">
            <div class="row">
                <div class="col-lg-12">
                <div class="ibox float-e-margins">
                    <!---<div class="ibox-title">
                        <h5>Basic Data Tables example with responsive plugin</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                                <i class="fa fa-wrench"></i>
                            </a>
                            <ul class="dropdown-menu dropdown-user">
                                <li><a href="#">Config option 1</a>
                                </li>
                                <li><a href="#">Config option 2</a>
                                </li>
                            </ul>
                            <a class="close-link">
                                <i class="fa fa-times"></i>
                            </a>
                        </div>
                    </div>--->
                    <div class="ibox-content">
				
                        <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>Album Images</th>
						<th>Status</th>
                        <th>Edit</th>
                        <th>Delete</th>
						
                    </tr>
                    </thead>
					<?php
					//$i=1;
					
					$qry=("SELECT*FROM jeff_albumimage ORDER BY id DESC");
					 $row = $db->get_rsltset($qry);
												
					 for($i=0;$i<count($row);$i++)
													 
					{
					?>
                    <tbody>
                    <tr class="gradeX">
                        <td>
						<?php echo $i+1;?>
						</td>
                        <td>
						<?php echo $row[$i]['image_date'];?>
                        </td>
                        <td>
						<img src="uploads/album/<?php echo  $row[$i]['albumimage']; ?>"alt="" height="75" width="75">
						</td>
						<?php
							$status_res=$row[$i]['status'];
							if($status_res == "0"){
								$status = "InActive";
							}
							else
							{
								$status = "Active";
							}
						?>
						<td>
							<a href="album_management.php?aid=<?php echo $row[$i]['id']; ?>&&status=<?php echo $status_res?>"><?php echo $status;?> </a>
                        </td>
                        <td class="center">
						<a href="albumimage_edit.php?id=<?php echo $row[$i]['id'];?>"><img src="img/copy.png" alt="icon"/></s>
						</td>
                        <td class="center">
						<a href="album_management.php?id=<?php echo $row[$i]['id'];?>"><img src="img/delete.png" alt="icon"/></a>
						</td>
                    </tr>
                    </tbody>
					<?php
					
					}
					?>
                    <tfoot>
                    </table>
                        </div>

                    </div>
                </div>
            </div>
            </div>
        </div>
										</div><!-- card -->
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</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