<div class="content-wrapper">
    <div class="container-fluid">

		<div class="row">
        <div class="col-lg-12">
          <div class="card">
            <div class="card-header"><i class="fa fa-car"></i> <?= $pagetitle; ?></div>
            <div class="card-body">
				<?php $pagemsg = $this->session->flashdata('page_message'); 
					if($pagemsg){
						echo $pagemsg;
					}
				?>
				<div class="row">
					<div class="col-sm-12">
						<form action="#" class="dropzone" id='fileupload'>
							<input type="hidden" name="id" value="999">
							<input type="hidden" name="table" value="press">
						</form> 
					</div>
				</div>
			</div>
			<div class="card-body">
              <div class="table-responsive">
              <table id="myimgtb" class="table table-bordered">
                <thead>
                    <tr>
                        <th>Image</th>	
						<th>Name</th>		
						<th>Order</th>								
						<th>Added On</th>
                        <th>Action</th>
                    </tr>
                </thead>
                <tbody>
					<?php $srno=1;
					for($i=0;$i<count($response);$i++){?>
						 <tr id="row-<?= $response[$i]->id; ?>">
							<td><a href="<?= base_url('uploads/gallery/'.$response[$i]->url); ?>"><img src="<?= base_url('uploads/gallery/'.$response[$i]->url); ?>" width="50px" target='_blank'></a></td>
							<td>
								<input type="text" class="form-control imgtitle" data-id="<?= $response[$i]->id; ?>" value="<?= $response[$i]->title; ?>">
							</td>
							<td>
								<input type="text" class="form-control imgorder" data-id="<?= $response[$i]->id; ?>" value="<?= $response[$i]->order; ?>">
							</td>
							
							<td><?= $response[$i]->updatedon; ?></td>
							
							<td align="center">
								<button class="btn  btn-danger mb-2 removeimg" data-id="<?= $response[$i]->id; ?>" data-url="<?= $response[$i]->url; ?>"> X</button>
							</td>
						</tr>
					<?php $srno++; } ?>
                   
                </tbody>
            </table>
            </div>
            </div>
          </div>
        </div>
      </div><!-- End Row-->