<div class="panel panel-default">
<div class="panel-heading">
<font size="+1"><b>Sosial Media Link</b></font>
<a href="index.php?page=sosmed_add" class="btn btn-success no_radius pull-right">Tambah</a>
</div>
<div class="panel-body">
<div class="row">
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>Edit</th>
<th>Nama</th>
<th>Link</th>
<th>Icon</th>
<th>Hapus</th>
</tr>
</thead>
<tbody>
<?php
if (isset($_GET["actSos"]))
{
if ($_GET["actSos"]=="del")
{
$sql=mysql_query("delete from settings where id='".$_GET['id']."'");
unlink("../images/".$_GET['lg']."");
}
}
$sqlSosmedView=mysql_query("select * from settings where id_key='4'");
while($dataSos=mysql_fetch_array($sqlSosmedView))
{
$link=explode("~~~~",$dataSos['value']);
?>
<tr>
<td><a href="index.php?page=sosmed_edit&id=<?php echo $dataSos['id']; ?>"><i class="fa fa-pencil-square-o fa-2x"></i></a></td>
<td><?php echo $dataSos['deskripsi']; ?></td>
<td><?php echo $link[0]; ?></td>
<td><?php echo $link[1]; ?></td>
<td><a href="index.php?page=profil&actSos=del&id=<?php echo $dataSos['id']; ?>&lg=<?php echo $link[1]; ?>"><i class="fa fa-eraser fa-2x"></i></a>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<font size="+3">Alamat</font>
<a href="index.php?page=profil_add" class="btn btn-success no_radius pull-right">Tambah</a>
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>Edit</th>
<th>Alamat</th>
<th>Hapus</th>
</tr>
</thead>
<tbody>
<?php
if (isset($_GET["act"]))
{
if ($_GET["act"]=="del")
{
$sql=mysql_query("delete from settings where id='".$_GET['id']."'");
}
}
$sql=mysql_query("select * from settings where id_key='2'");
while($data=mysql_fetch_array($sql))
{
?>
<tr>
<td><a href="index.php?page=profil_edit&id=<?php echo $data['id']; ?>"><i class="fa fa-pencil-square-o fa-2x"></i></a></td>
<td><?php echo $data['value']; ?></td>
<td><a href="index.php?page=profil&act=del&id=<?php echo $data['id']; ?>"><i class="fa fa-eraser fa-2x"></i></a>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>