siddharth_application/application/views/editOldasset.php
2017-04-03 14:30:54 +05:30

204 lines
10 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
$Asset_Code = '';
$Asset_Name = '';
$Description = '';
$Department = '';
$Location = '';
$User = '';
$SupplierName = '';
$DateOfPurchase = '';
$DateOfCommission = '';
$CreatedDate = '';
$AssetValue = '';
$Createdby = '';
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;
$User = $uf->User;
$SupplierName = $uf->SupplierName;
$DateOfPurchase = $uf->DateOfPurchase;
$DateOfCommission = $uf->DateOfCommission;
$CreatedDate = $uf->CreatedDate;
$AssetValue = $uf->AssetValue;
$Createdby = $uf->Createdby;
}
}
?>
<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() ?>editasset" method="post" id="editasset" role="form">
<div class="box-body">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="Asset_Name">Asset_Name</label>
<input type="text" class="form-control" id="fname" placeholder="Asset_Name" name="Asset_Name" value="<?php echo $Asset_Name; ?>" maxlength="128">
<input type="hidden" value="<?php echo $Asset_Code; ?>" name="Asset_Code" id="Asset_Code" />
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="Description">Description</label>
<input type="text" class="form-control" id="Description" placeholder="Description" name="Description" value="<?php echo $Description; ?>" maxlength="255">
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="DepartmentList">DepartmentList</label>
<select class="form-control" id="Department" name="Department">
<option value="<?php echo $Department ?>"><?php echo $Department ?></option>
<?php
if(!empty($DepartmentList))
{
foreach ($DepartmentList as $SID)
{
?>
<option value="<?php echo $SID->ConfigValue ?>"><?php echo $SID->ConfigValue ?></option>
<?php
}
}
?>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="Location">Location</label>
<input type="text" class="form-control" value="<?php echo $Location; ?>"id="Location" placeholder="Location" name="Location" >
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="User">User</label>
<input type="text" class="form-control" id="User" placeholder="User" name="User" >
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="SupplierName">SupplierName</label>
<select class="form-control" id="SupplierName" name="SupplierName">
<option value="<?php echo $SupplierName; ?>"><?php echo $SupplierName; ?></option>
<?php
if(!empty($SupplierList))
{
foreach ($SupplierList as $SID)
{
?>
<option value="<?php echo $SID->SupplierID; ?>"><?php echo $SID->SupplierID; ?> - <?php echo $SID->SupplierName; ?></option>
<?php
}
}
?>
</select>
</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="AssetValue">AssetValue</label>
<input type="text" class="form-control" id="User" placeholder="AssetValue" name="AssetValue" Value="<?php echo $AssetValue;?>">
<input type="hidden" class="form-control" id="Createdby" placeholder="Createdby" name="Createdby" Value="<?php echo $Createdby;?>"readonly>
</div>
</div>
</div>
<!-- /.box-body -->
<div class="box-footer" style="text-align:right">
<input type="submit" class="btn btn-info" value="Submit" />
<input type="reset" class="btn btn-info" value="Cancel" />
</div>
</form>
</div>
</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>
</section>
</div>
<script src="<?php echo base_url(); ?>assets/js/editUser.js" type="text/javascript"></script>