<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<div class="content-wrapper">
	<section class="content-header">
		<?php echo $pagetitle; ?>
		<?php echo $breadcrumb; ?>
	</section>
	<section class="content">
		<!--
		<div class="row">i
			<div class="col-xs-12">
				<button onclick="button_modal_add()" class="btn btn-default"><i class="fa fa-plus"></i> 미디어 등록</button>
			</div>
		</div>
		-->
		<div class="row">
			<div class="col-md-12">
				<div class="box">
					<div class="box-body">
						<table id="table_question" class="table table-striped table-hover">
							<thead>
								<tr>
									<th>순서</th>
									<th>아이디</th>
									<th>이름</th>
									<th>스크린샷</th>
									<!--<th>상태</th>-->
								</tr>
							</thead>
							<tbody>
								<?php foreach ($pictures as $picture){ ?>
								<tr>
									<td><?= $picture->index ?></td>
									<td><?= $picture->id ?></td>
									<td><?= $picture->name ?></td>
									<td><img src="http://118.45.160.139:52532/get_image?uid_u=<?= $picture->uid_u ?>" width="30px"/><button onclick="window.open('http://118.45.160.139:52532/get_image?uid_u=<?= $picture->uid_u ?>', '_blank')" class="btn btn-xs btn-default">다운</button></td>
									<!--<td><?= $picture->is_active == 1 ? '<button class="btn btn-xs btn-success" disabled>활성</button>' : '<button class="btn btn-xs btn-danger" disabled>비활성</button>'?><button onclick='toggle_is_active("<?= $picture->index ?>")' class="btn btn-xs btn-warning">변경</button></td>-->
								</tr>
								<?php } ?>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>
	</section>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/animsition/3.2.1/js/animsition.min.js"></script>
<script>
$(document).ready(function (){
	var table_question = new DataTable('#table_question', {
		pageLength: 25,
		layout: {
			topStart: {
				pageLength: {
					menu: [10, 25, 100]
				}
			}
		}
	});
});
</script>
