You've already forked codeigniter_test
first commit
This commit is contained in:
61
application/views/admin/post.php
Normal file
61
application/views/admin/post.php
Normal file
@ -0,0 +1,61 @@
|
||||
<div class="span9 well">
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<div class="head">
|
||||
<img src="<?php echo base_url(); ?>image/page_white_text.png" style="vertical-align: middle">
|
||||
Manage Posts
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table class="view table-striped table-bordered">
|
||||
|
||||
<thead id="header">
|
||||
<th>#</th>
|
||||
<th>Date</th>
|
||||
<th>Title</th>
|
||||
<th>Author</th>
|
||||
<th>Category</th>
|
||||
<th>Tags</th>
|
||||
<th>Status</th>
|
||||
</thead>
|
||||
|
||||
<?php
|
||||
foreach($listpost as $post){
|
||||
?>
|
||||
<tr>
|
||||
<td width="80px"><?php echo '<a href="'.base_url().'admin/edit/'.$post->id.'"><button class="edit"></button></a>' ?>
|
||||
<button class="delete" onclick="myFunction(<?php echo $post->id;?>)"></button></td>
|
||||
<td><?php echo $post->id; ?></td>
|
||||
<td><?php echo $post->post_title; ?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
<a style="margin-left:30px;" href="<?php echo base_url().'admin/add_post'; ?>"><button class="add"></button></a>
|
||||
</div><!--/span-->
|
||||
<!--script-->
|
||||
<script src="<?php echo base_url(); ?>bootstrap/js/jquery.js"></script>
|
||||
<script src="<?php echo base_url(); ?>bootstrap/js/bootstrap-dropdown.js"></script>
|
||||
<script src="<?php echo base_url(); ?>bootstrap/js/bootstrap-collapse.js"></script>
|
||||
<script>
|
||||
function myFunction(id)
|
||||
{
|
||||
var url="<?php echo base_url();?>";
|
||||
var r=confirm("Do you want to delete this?");
|
||||
if (r==true)
|
||||
{
|
||||
window.location = url+"admin/delete/"+id;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user