ok

Mini Shell

Direktori : /proc/thread-self/root/home2/selectio/www/salemgovtitialumni.in/dashboard/admin/
Upload File :
Current File : //proc/thread-self/root/home2/selectio/www/salemgovtitialumni.in/dashboard/admin/history-list.php

<?php require_once('header.php'); ?>



<?php

$page_name = '';
$condition = '';
$ids = '';

if(isset($_GET['id']) && $_GET['id'] != '' ){
    $ids = $_GET['id'];
}

if($ids==1){
  $page_name = 'View ITI History';
  $condition = ' AND id=1 AND content_type=1';
}else if($ids==2){
    $page_name = 'View Vision';
    $condition = ' AND id=2 AND content_type=2';
}else if($ids==4){ 
    
    $page_name = 'View ITI History';
    $condition = ' AND id=4 AND content_type=4';
    
}

else if($ids==5){ 
    
    $page_name = 'View ITI About';
    $condition = ' AND id=5 AND content_type=5';
    
}
else{
    $page_name = 'View Mission';
    $condition = ' AND id=3 AND content_type=3';
}


?>


<section class="content-header">
	<div class="content-header-left">
		<h1><?= $page_name ?></h1>
	</div>
</section>

<section class="content">
	<div class="row">
		<div class="col-md-12">
			<div class="box box-info">
				<div class="box-body table-responsive">
					<table id="example1" class="table table-bordered table-striped">
						<thead>
							<tr>
								<th>SL</th>
								<th>Title</th>
								<td>Content</td>
								<th>status</th>
								<th width="140">Action</th>
							</tr>
						</thead>
						<tbody>
							<?php
							$i=0;
							$statement = $pdo->prepare("SELECT * FROM tbl_content WHERE 1=1".$condition);
							$statement->execute();
							$result = $statement->fetchAll(PDO::FETCH_ASSOC);							
							foreach ($result as $row) {
							    
							    if($row['status']==1){
							         $status = '<button class="btn btn-danger btn-xs">Active</button>';
							    }else{
							         $status = '<button  class="btn btn-warning btn-xs">In-Active</button>';
							    }
							    
								$i++;
								?>
								<tr>
									<td><?php echo $i; ?></td>
									<td><?php echo $row['title']; ?></td>
									<td><?php echo substr($row['content'], 0, 56).'...'; ?></td>
									<td><?php echo $status; ?></td>
								
									<td>										
										<a href="history-edit.php?id=<?=$row['id']; ?>&content_type=<?=$row['content_type'];?>" class="btn btn-primary btn-xs">Edit</a>
									</td>
								</tr>
								<?php
							}
							?>							
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>
</section>


<div class="modal fade" id="confirm-delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">Delete Confirmation</h4>
            </div>
            <div class="modal-body">
                <p>Are you sure want to delete this item?</p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                <a class="btn btn-danger btn-ok">Delete</a>
            </div>
        </div>
    </div>
</div>

<?php require_once('footer.php'); ?>

Zerion Mini Shell 1.0