211 lines
10 KiB
PHP
211 lines
10 KiB
PHP
<?php
|
||
|
||
$Asset_Code = '';
|
||
$Asset_Name = '';
|
||
$Description = '';
|
||
$Department = '';
|
||
$Location = '';
|
||
$AssetOwner = '';
|
||
$SupplierName = '';
|
||
$DateOfPurchase = '';
|
||
$DateOfCommission = '';
|
||
$SupportVendor = '';
|
||
$SupportFrom = '';
|
||
$SupportTo = '';
|
||
|
||
|
||
|
||
if(!empty($asset))
|
||
{
|
||
foreach ($asset as $uf)
|
||
{
|
||
$Asset_Code = $uf->Asset_Code;
|
||
$Asset_Name = $uf->Asset_Name;
|
||
$Description = $uf->Description;
|
||
$Department = $uf->Department;
|
||
$Location = $uf->Location;
|
||
$AssetOwner = $uf->AssetOwner;
|
||
$SupplierName = $uf->SupplierName;
|
||
$DateOfPurchase = $uf->DateOfPurchase;
|
||
$DateOfCommission = $uf->DateOfCommission;
|
||
$SupportVendor = $uf->SupportVendor;
|
||
$SupportFrom = $uf->SupportFrom;
|
||
$SupportTo = $uf->SupportTo;
|
||
|
||
}
|
||
}
|
||
|
||
|
||
?>
|
||
<script>
|
||
function demo(){
|
||
alert("Update this records");
|
||
|
||
}
|
||
|
||
</script>
|
||
<div class="content-wrapper">
|
||
<!-- Content Header (Page header) -->
|
||
<section class="content-header">
|
||
<h1>
|
||
<center>Asset Details</center>
|
||
|
||
</h1>
|
||
</section>
|
||
|
||
<section class="content">
|
||
<div style="text-align:right;">
|
||
<a href="<?php echo base_url() ?>assetListing" class="btn btn-info" value="Back"/>Back</a>
|
||
</div>
|
||
<br/>
|
||
<div class="row">
|
||
<!-- left column -->
|
||
<div class="col-md-12">
|
||
<!-- general form elements -->
|
||
|
||
|
||
|
||
<div class="box box-primary">
|
||
<div class="box-header">
|
||
<center> <h3 class="box-title">Edit Asset Details</h3><center>
|
||
</div><!-- /.box-header -->
|
||
<!-- form start -->
|
||
|
||
<form role="form" action="<?php echo base_url() ?>assetdetails/editasset" method="post" id="editsupplier" role="form">
|
||
<div class="box-body">
|
||
<div class="row">
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<div class="form-group">
|
||
<label for="Asset_Name">Asset Name</label>
|
||
<input type="text" class="form-control required" id="Asset_Name" name="Asset_Name" value="<?php echo $Asset_Name;?>" required>
|
||
|
||
<input type="hidden" value="<?php echo $Asset_Code; ?>" name="Asset_Code" id="Asset_Code" readonly>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<div class="form-group">
|
||
<label for="Description">Description</label>
|
||
<input type="text" class="form-control required" id="Description" name="Description" value="<?php echo $Description; ?>">
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<div class="form-group">
|
||
<label for="Department">Department</label>
|
||
<input type="text" class="form-control required" id="Department" name="Department" value="<?php echo $Department; ?>">
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<div class="form-group">
|
||
<label for="Location">Location</label>
|
||
<input type="text" class="form-control required" id="Location" name="Location"value="<?php echo $Location;?>">
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<div class="form-group">
|
||
<label for="AssetOwner">Asset Owner</label>
|
||
<input type="text" class="form-control required" id="AssetOwner" name="AssetOwner" value="<?php echo $AssetOwner;?>">
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<label for="SupplierName">Supplier Name</label>
|
||
<input type="text" class="form-control required" id="SupplierName" name="SupplierName" value="<?php echo $SupplierName;?>">
|
||
|
||
</div>
|
||
</div>
|
||
<div class="col-md-6">
|
||
|
||
<div class="form-group">
|
||
<label for="DateOfPurchase">Date Of Purchase</label>
|
||
<input type="date" name="DateOfPurchase" min=<?php $week = date("Y-m-d",mktime(0, 0, 0, date("m"), date("d")-60,date("Y")));echo $week;?> max=<?php echo date('Y-m-d'); ?> value="<?php echo $DateOfPurchase; ?>" class="form-control" placeholder="" />
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<label for="DateOfCommission">Date Of Commission</label>
|
||
<input type="date" name="DateOfCommission" min=<?php $week = date("Y-m-d",mktime(0, 0, 0, date("m"), date("d")-60,date("Y")));echo $week;?> max=<?php echo date('Y-m-d'); ?> value="<?php echo $DateOfCommission;?>" class="form-control" placeholder="" />
|
||
|
||
</div>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<label for="SupportVendor">Support Vendor</label>
|
||
<input type="text" class="form-control required" id="SupportVendor" name="SupportVendor" maxlength="255"value="<?php echo $SupportVendor;?>">
|
||
</div>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<label for="SupportFrom">Support From</label>
|
||
<input type="date" name="SupportFrom" min=<?php $week = date("Y-m-d",mktime(0, 0, 0, date("m"), date("d")-60,date("Y")));echo $week;?> max=<?php echo date('Y-m-d'); ?> value="<?php echo $SupportFrom;?>" class="form-control" placeholder="" />
|
||
</div>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<label for="SupportTo">Support To</label>
|
||
<input type="date" name="SupportTo" min=<?php $week = date("Y-m-d",mktime(0, 0, 0, date("m"), date("d")-60,date("Y")));echo $week;?> max=<?php echo date('Y-m-d'); ?> value="<?php echo $SupportTo;?>" class="form-control" placeholder="" />
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div><!-- /.box-body -->
|
||
|
||
<div class="box-footer" style="text-align:right">
|
||
<input type="submit" class="btn btn-info" onclick="demo()" value="Submit" />
|
||
<input type="reset" class="btn btn-info" value="Cancel" />
|
||
<!--<input type="reset" class="btn btn-default" value="Reset" />-->
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
<div class="col-md-4">
|
||
<?php
|
||
$this->load->helper('form');
|
||
$error = $this->session->flashdata('error');
|
||
if($error)
|
||
{
|
||
?>
|
||
<div class="alert alert-danger alert-dismissable">
|
||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||
<?php echo $this->session->flashdata('error'); ?>
|
||
</div>
|
||
<?php } ?>
|
||
<?php
|
||
$success = $this->session->flashdata('success');
|
||
if($success)
|
||
{
|
||
?>
|
||
<div class="alert alert-success alert-dismissable">
|
||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||
<?php echo $this->session->flashdata('success'); ?>
|
||
</div>
|
||
<?php } ?>
|
||
|
||
<div class="row">
|
||
<div class="col-md-12">
|
||
<?php echo validation_errors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>'); ?>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
|
||
<script src="<?php echo base_url(); ?>assets/js/editUser.js" type="text/javascript"></script>
|