<?php require admin_view('static/header') ?>
<div class="container">
	<div class="row">
		<div class="col-lg-12">
			<div class="panel panel-default" style="border-radius:0;margin:0;">
				<table class="table order-table table-grey" style="margin-bottom:0;">
					<thead>
						<tr>
							<th>Sipariş ID</th>
							<th>Kullanıcı adı</th>
							<th>Domain</th>
							<th>Admin K. Adı / Şifre</th>
							<th>Oluşturulma Tarihi</th>
							<th>Ücret / Para Birimi</th>
							<th></th>
						</tr>
					</thead>
					<tbody>
						<?php foreach($child as $row): $detail = json_decode($row['panel_detail']); $user = $db->from('users')->where('user_id', $row['user_id'])->first(); ?>
							<tr>
								<td><?=$row['id']?></td>
								<td><?=$user['user_username']?></td>
								<td><?=$row['panel_domain']?></td>
								<td><?= $detail->username ?> / <?= $detail->password ?></td>
								<td><?=str_date($row['panel_created'])?></td>
								<td><?=$row['panel_price']?> / <?=$row['panel_currency']?></td>
								<td>
									<a class="btn btn-danger btn-xs" href="https://my.elinsoft.com/siparis/software/75">Panel Siparişi Ver (Aylık)</a>
								</td>
								<td>
									<button class="btn btn-danger btn-xs" onclick="delete_child(<?=$row['id']?>)">Sil</button>
								</td>
							</tr>
						<?php endforeach; ?>
					</tbody>
				</table>
			</div>
		</div>
	</div>		
</div>
<?php require admin_view('static/footer') ?>