336 lines
13 KiB
PHP
336 lines
13 KiB
PHP
<html>
|
|
<head>
|
|
<title>Admin Page</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="description" content="">
|
|
<meta name="author" content="">
|
|
<link href="<?php echo base_url(); ?>asset/bootstrap/css/bootstrap.css" rel="stylesheet">
|
|
<!--table sorter-->
|
|
<link href="<?php echo base_url(); ?>asset/tablesorter/demo_table.css" rel="stylesheet">
|
|
<style type="text/css">
|
|
body {padding-top: 40px;padding-bottom: 40px;}
|
|
.well-white {
|
|
min-height: 20px;
|
|
margin-bottom: 0px;
|
|
background-color: #fff;
|
|
-webkit-border-radius: 4px;
|
|
-moz-border-radius: 4px;
|
|
border-radius: 4px;
|
|
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
|
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
|
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
|
}
|
|
ul#sidebar{border: outset 1px;margin-top:15px;border-radius:5px;padding:10px;list-style:none;}
|
|
#sidebar li a{display:block;color:#777;outline:none;font-weight:bold;text-decoration:none;line-height:30px;padding:0px 20px;}
|
|
#sidebar li a:hover,#sidebar li.selected a{background:#C0C0C0;color:#fff;}
|
|
#sidebar li a:hover{background:#CDFFFF;color:#000;}
|
|
#steps{height:auto;overflow:hidden;border-left:outset 1px;padding:15px;}
|
|
.formside{display:block;}
|
|
.staffside, statsside{display:none;}
|
|
.stafflist{border:inset 1px rgba(0, 0, 0, 0.05);border-radius:5px;padding:30px;background-color:#F0F0F0 ;}
|
|
.modal-body input{padding: 11px 0px 11px 11px;height : 36px;}
|
|
</style>
|
|
<script type="text/javascript" language="javascript" src="<?php echo base_url(); ?>asset/tablesorter/jquery.js"></script>
|
|
<script type="text/javascript" language="javascript" src="<?php echo base_url(); ?>asset/tablesorter/jquery.dataTables.min.js"></script>
|
|
<script src="<?php echo base_url(); ?>asset/rf/razorflow.jquery.js" type="text/javascript"></script>
|
|
<script type="text/javascript" charset="utf-8">
|
|
$(document).ready(function() {
|
|
$('#formpending').dataTable();
|
|
$('#formsaved').dataTable();
|
|
$('#stafflist').dataTable();
|
|
/*
|
|
setTimeout(function(){
|
|
$("div.alert").fadeOut("slow", function () {
|
|
$("div.alert").remove();
|
|
});
|
|
}, 1000);
|
|
*/
|
|
});
|
|
function stafffunc(){
|
|
$(".formside").hide();
|
|
$(".statsside").hide();
|
|
$(".staffside").fadeIn(800);
|
|
$(".selected", event.delegateTarget).removeClass("selected");
|
|
$('#staff').addClass("selected");
|
|
$('*').css('text-shadow','none');
|
|
$('*').css('box-shadow','none');
|
|
}
|
|
function formfunc(){
|
|
$(".staffside").hide();
|
|
$(".statsside").hide();
|
|
$(".formside").fadeIn(800);
|
|
$(".selected", event.delegateTarget).removeClass("selected");
|
|
$('#form').addClass("selected");
|
|
$('*').css('text-shadow','none');
|
|
$('*').css('box-shadow','none');
|
|
}
|
|
function statsfunc(){
|
|
$('#loading').css("display","block");
|
|
$.ajax({
|
|
url: '<?php echo base_url(); ?>form/test/7',
|
|
success: function(msg)
|
|
{
|
|
$(".staffside").hide();
|
|
$(".formside").hide();
|
|
$(".statsside").fadeIn(800);
|
|
$(".selected", event.delegateTarget).removeClass("selected");
|
|
$('#stats').addClass("selected");
|
|
//$("#dashboardTarget").load("user/test");
|
|
$("#dashboardTarget").delay(90000).html(msg);
|
|
$('#loading').delay(90000).css("display","none");
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
</script>
|
|
<link href="<?php echo base_url(); ?>asset/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
|
|
</head>
|
|
<body>
|
|
<!--Navigation bar-->
|
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
|
<div class="navbar-inner">
|
|
<div class="container-fluid">
|
|
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</button>
|
|
<a class="brand" href="#"><i class="icon-wrench icon-white"></i> Everseiko</a>
|
|
<div class="nav-collapse collapse">
|
|
<ul class="nav pull-right">
|
|
<li id="fat-menu" class="dropdown">
|
|
<a href="#" id="drop3" role="button" class="dropdown-toggle" data-toggle="dropdown" style="background-color:#fff;">
|
|
<i class="icon-user"></i>
|
|
<?php echo $this->auth->CI->session->userdata('nama'); ?><b class="caret"></b></a>
|
|
<ul class="dropdown-menu" role="menu" aria-labelledby="drop3">
|
|
<li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo base_url(); ?>">
|
|
<i class="icon-tags"></i>
|
|
<?php echo $this->auth->CI->session->userdata('role'); ?></a></li>
|
|
<li role="presentation" class="divider"></li>
|
|
<li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo base_url(); ?>user/logout"><i class="icon-off"></i> Logout</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<ul class="nav">
|
|
<!--
|
|
<li class="active"><a href="#">Home</a></li>
|
|
<li><a href="#about">About</a></li>
|
|
<li><a href="#contact">Contact</a></li>
|
|
-->
|
|
</ul>
|
|
</div><!--/.nav-collapse -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!--Container fluid-->
|
|
<div class="row-fluid">
|
|
<!--sidebar-->
|
|
<div class="span2">
|
|
<ul id="sidebar">
|
|
<li class="selected" id="form"><a href="#" onclick="formfunc()"><i class="icon-list-alt"></i> Form</a></li>
|
|
<li id="staff"><a href="#" onclick="stafffunc()"><i class="icon-user"></i> Sales</a></li>
|
|
<li id="stats"><a href="#" onclick="statsfunc()"><i class="icon-signal"></i> Stats <img id="loading" src="<?php echo base_url(); ?>asset/img/ajax_loading.gif" alt="loading" width="20px;" style="float:right;margin-top:12px;display:none;"/></a><li>
|
|
</ul>
|
|
</div>
|
|
<!--Content-->
|
|
<div class="span10" id="steps">
|
|
<div class="container-fluid">
|
|
<?php
|
|
if ($this->session->userdata('status')=='1' )
|
|
{
|
|
$tipe = $this->session->userdata('tipe');
|
|
echo "
|
|
<div class='alert ".$tipe."'>
|
|
<button type='button' class='close' data-dismiss='alert'>×</button>
|
|
".$this->session->userdata('message')."
|
|
</div>";
|
|
}
|
|
?>
|
|
<div class="formside">
|
|
<div class="well-white">
|
|
<div class="navbar">
|
|
<div class="navbar-inner">
|
|
<a class="brand"><i class="icon-list-alt"></i> List Form</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<ul id="myTab" class="nav nav-tabs">
|
|
<li class="active"><a href="#pending" data-toggle="tab"><i class="icon-time"></i> Pending</a></li>
|
|
<li><a href="#save" data-toggle="tab"><i class="icon-ok"></i> Saved</a></li>
|
|
</ul>
|
|
<div id="myTabContent" class="tab-content well">
|
|
<div class="tab-pane fade in active" id="pending">
|
|
<table cellpadding="0" cellspacing="0" border="0" class="table display" id="formpending">
|
|
<thead>
|
|
<tr>
|
|
<th><i class="icon-calendar"></i> Date/Time</th>
|
|
<th><i class="icon-envelope"></i> Sender</th>
|
|
<th><i class="icon-map-marker"></i> Area</th>
|
|
<th><i class="icon-briefcase"></i> Customer/Client</th>
|
|
<th><i class="icon-wrench"></i> Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>2013-05-27 16:25:39</td>
|
|
<td>Mark</td>
|
|
<td>Jawa Tengah</td>
|
|
<td>Omdo</td>
|
|
<td align="center">
|
|
<button class="btn btn-small btn-info disabled">View</button></td>
|
|
</tr>
|
|
<?php
|
|
foreach($form_pending as $pform){
|
|
?>
|
|
<tr>
|
|
<td><?php echo $pform->date; ?></td>
|
|
<td><?php echo $pform->sender; ?></td>
|
|
<td><?php echo $pform->area; ?></td>
|
|
<td><?php echo $pform->customer; ?></td>
|
|
<td align="center">
|
|
<button class="btn btn-small btn-info" onclick="parent.location='<?php echo base_url(); ?>form/view_form/view/<?php echo $pform->id; ?>'">View</button>
|
|
</td>
|
|
</tr>
|
|
<?php } ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="tab-pane fade" id="save">
|
|
<a class="btn pull-right" href="<?php echo base_url(); ?>form"><i class="icon-plus-sign"></i>Tambah</a>
|
|
<br /><br />
|
|
<table cellpadding="0" cellspacing="0" border="0" class="table display" id="formsaved">
|
|
<thead>
|
|
<tr>
|
|
<th><i class="icon-calendar"></i> Date/Time</th>
|
|
<th><i class="icon-envelope"></i> Sender</th>
|
|
<th><i class="icon-map-marker"></i> Area</th>
|
|
<th><i class="icon-briefcase"></i> Customer/Client</th>
|
|
<th><i class="icon-wrench"></i> Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>1</td>
|
|
<td>Mark</td>
|
|
<td>Jawa Tengah</td>
|
|
<td>Omdo</td>
|
|
<td align="center">
|
|
<button class="btn btn-small btn-info disabled">View</button>
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
foreach($form_saved as $pform){
|
|
?>
|
|
<tr>
|
|
<td><?php echo $pform->date; ?></td>
|
|
<td><?php echo $pform->sender; ?></td>
|
|
<td><?php echo $pform->area; ?></td>
|
|
<td><?php echo $pform->customer; ?></td>
|
|
<td align="center">
|
|
<button class="btn btn-small btn-info" onclick="parent.location='<?php echo base_url(); ?>form/view_form/edit/<?php echo $pform->id; ?>'">View</button>
|
|
</td>
|
|
</tr>
|
|
<?php } ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="staffside">
|
|
<div class="well-white">
|
|
<div class="navbar">
|
|
<div class="navbar-inner">
|
|
<a class="brand"><i class="icon-user"></i> List Sales</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="well-white stafflist">
|
|
<a data-toggle="modal" href="#myModal" class="btn pull-right" href=""><i class="icon-plus-sign"></i>Tambah</a>
|
|
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
|
|
<h3 id="myModalLabel">Add New User</h3>
|
|
</div>
|
|
<form class="form-horizontal" action="<?php echo base_url(); ?>user/insert_user" method="post">
|
|
<div class="modal-body">
|
|
<label class="control-label">Nama</label>
|
|
<div class="controls">
|
|
<input type="text" placeholder="Nama" name="nama">
|
|
</div><br />
|
|
<label class="control-label">Username</label>
|
|
<div class="controls">
|
|
<input type="text" placeholder="Username" name="username">
|
|
</div><br />
|
|
<label class="control-label">Password</label>
|
|
<div class="controls">
|
|
<input type="password" placeholder="Password" name="password">
|
|
</div><br />
|
|
<!--
|
|
<label class="control-label">Confirm Password</label>
|
|
<div class="controls">
|
|
<input type="password" placeholder="Re-Type Password">
|
|
</div><br>
|
|
-->
|
|
<label class="control-label">Role</label>
|
|
<div class="controls">
|
|
<input type="text" placeholder="Role" name="role">
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn" data-dismiss="modal">Cancel</button>
|
|
<button type="submit" class="btn btn-primary">Save</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<br /><br />
|
|
<table cellpadding="0" cellspacing="0" border="0" class="table display" id="stafflist">
|
|
<thead>
|
|
<tr>
|
|
<th><i class="icon-user"></i> Name</th>
|
|
<th><i class="icon-info-sign"></i> Username</th>
|
|
<th><i class="icon-tags"></i> Role</th>
|
|
<th><i class="icon-wrench"></i> Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Mark</td>
|
|
<td>Mark</td>
|
|
<td>Jawa Tengah</td>
|
|
<td align="center">
|
|
<button class="btn btn-small btn-info disabled">Action</button>
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
foreach($user as $puser){
|
|
?>
|
|
<tr>
|
|
<td><?php echo $puser->nama; ?></td>
|
|
<td><?php echo $puser->username; ?></td>
|
|
<td><?php echo $puser->role; ?></td>
|
|
<td align="center">
|
|
<button class="btn btn-small btn-info" onclick="parent.location=''">Action</button>
|
|
</td>
|
|
</tr>
|
|
<?php } ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div><!--/staffside-->
|
|
<div class="statsside">
|
|
<div id="dashboardTarget"></div>
|
|
</div>
|
|
</div><!--/span10-->
|
|
</div>
|
|
</div>
|
|
|
|
<!--javascript-->
|
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-dropdown.js"></script>
|
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-tab.js"></script>
|
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-collapse.js"></script>
|
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-modal.js"></script>
|
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-alert.js"></script>
|
|
</body>
|
|
</html>
|