-
Notifications
You must be signed in to change notification settings - Fork 0
/
liability_edit.php
133 lines (117 loc) · 5.68 KB
/
liability_edit.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<?php
include 'inc/header.php';
include 'inc/sidebar.php';
include 'inc/database.php';
?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<div class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1 class="m-0">Starter Page</h1>
</div>
<!-- /.col -->
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active">Starter Page</li>
</ol>
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
<!-- /.container-fluid -->
</div>
<!-- /.content-header -->
<?php
$aaa=$_GET['id'];
$raw=$db->query("select * from liability where id=$aaa");
$infor=$raw->fetch_assoc();
?>
<!-- Main content -->
<div class="content">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header border-0">
<div class="d-flex justify-content-between">
<h3 class="card-title ">Liability CRUD</h3>
<a href="javascript:void(0);">View Report</a>
</div>
</div>
<div class="card-body">
<h1>Liability Update Form</h1>
<form action="liability_update.php" method="post">
<table class="table table-boredered">
<tr>
<input type="hidden" value="<?php echo $infor['id'] ?>" name="id" >
<td colspan="2">Title<input type="text" class="form-control" name="title" value="<?php echo $infor['title'] ?>"></td>
<td> People Id<select name="people" class="form-control select2" style="width: 100%;">
<option value="">Select People</option>
<?php $raw=$db->query('select * from people order by name asc'); while($info=$raw->fetch_assoc()){ ?>
<option value="<?php echo $info['id'] ?>" <?php if($infor['people_id']==$info['id']){ echo 'selected';} ?>><?php echo $info['name'] ?></option>
<?php } ?>
</select></td>
</tr>
<tr>
<td colspan="3">Note<textarea name="note" cols="60" rows="4" class="form-control"><?php echo $infor['note'] ?></textarea></td>
</tr>
<tr>
<td>Amount<input type="text" class="form-control" name="amount" value="<?php echo $infor['amount'] ?>"></td>
<td>Date<input type="date" name="date" class="form-control" value="<?php echo $infor['date'] ?>"></td>
<td><p>Status</p> <input type="radio" class="form-check-input" value="active" name="state" <?php if($infor['status']=='active'){ echo 'checked';} ?>>Active         <input type="radio" class="form-check-input" value="inactive" name="state" <?php if($infor['status']=='inactive'){ echo 'checked';} ?>>Inactive</td>
</tr>
<tr>
<td ></td>
<td><a href="index.php" class="btn btn-block btn-secondary">Cancel</a></td>
<td><input type="submit" class="btn btn-block btn-primary" value="Update"> </td>
</form>
<!-- <td colspan="2"><button class="btn btn-block btn-success">Press me</button></td> -->
<!-- <td colspan="2"><a href="" id="button" class="btn btn-block btn-success">Insert</a></td> -->
</tr>
</table>
</div>
</div>
</div>
</div>
<!-- /.row -->
</div>
<!-- /.container-fluid -->
</div>
<!-- /.content -->
</div>
<!-- contents goes here -->
</div>
<!-- /.row -->
</div>
<!-- /.container-fluid -->
</div>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- Control Sidebar -->
<!-- Main Footer -->
<footer class="main-footer">
<!-- To the right -->
<div class="float-right d-none d-sm-inline">Anything you want</div>
<!-- Default to the left -->
<strong>Copyright © 2014-2021
<a href="https://adminlte.io">AdminLTE.io</a>.</strong
>
All rights reserved.
</footer>
</div>
<!-- ./wrapper -->
<!-- REQUIRED SCRIPTS -->
<!-- jQuery -->
<script src="plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- AdminLTE App -->
<script src="dist/js/adminlte.min.js"></script>
</body>
</html>