示例#1
0
		<!-- End breadcrumb -->
		
		<div class="panel panel-info">
		  <div class="panel-heading">
		  	<div class="right-content">
				<a href="add_capitals.php"><button class="btn btn-success btn-perspective btn-lg pull-right">ADD CAPITAL</button></a>
			</div>
		  	<h3>Capital</h3>
		  </div>
		  <div class="panel-body">
			<!-- BEGIN DATA TABLE -->
			<div class="the-box">
				<div class="table-responsive">
					<?php 
$accounts = new accounts();
$results = $accounts->get_capital();
if ($results) {
    ?>
					<table class="table table-striped table-hover" id="datatable-example">
						<thead class="the-box dark full">
							<tr>
								<th>Capital Name</th>
								<th>Assets Amount</th>
								<th>Assets Date</th>
								<th>Action</th>
							</tr>
						</thead>
						<tbody>
							<?php 
    foreach ($results as $res) {
        echo '<tr>';
示例#2
0
    $detail = $_POST['capital_detail'];
    // Update old record
    if (isset($ID)) {
        $results = $accounts->update_capital($name, $amount, $date, $detail, $ID);
    } else {
        // Insert new
        $results = $accounts->create_capital($name, $amount, $date, $detail);
    }
    if ($results) {
        echo '<div class="alert alert-success" role="alert"> Add Capital Sucessfully </div>';
    } else {
        echo '<div class="alert alert-danger" role="alert"> Error </div>';
    }
}
if (isset($ID)) {
    $capital_result = $accounts->get_capital($ID);
}
?>
			<div class="the-box noborder">
				<form id="ExampleBootstrapValidationForm" method="post" action="" class="form-horizontal">
					<fieldset>
						<legend>Product Detail:</legend>
						
						<div class="form-group">
							<label class="col-lg-3 control-label">Capital Person Name</label>
							<div class="col-lg-5">
								<input type="text" name="capital_name" id="capital_name" value="<?php 
echo isset($ID) ? $capital_result[0]->capital_name : '';
?>
" class="form-control" required>
							</div>