-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtransfer.php
executable file
·210 lines (202 loc) · 9.85 KB
/
transfer.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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<?php
session_start();
include('assets/configs/config.php');
include('assets/configs/checklogin.php');
check_login();
$aid=$_SESSION['admin_id'];
if(isset($_POST['post_transfer']))
{
$bank_account=$_POST['bank_account'];
$to_bankacc=$_POST['to_bankacc'];
$posting_date=$_POST['posting_date'];
$description=$_POST['description'];
$amount=$_POST['amount'];
//sql to inset the values to the database
$query="insert into expense (bank_account, to_bankacc, posting_date, description, amount, type) values(?,?,?,?,?,'Transfer')";
$stmt = $mysqli->prepare($query);
//bind the submitted values with the matching columns in the database.
$rc=$stmt->bind_param('sssss', $bank_account, $to_bankacc, $posting_date, $description, $amount);
$stmt->execute();
$msg = "Transfer Added!";
}
?>
<!DOCTYPE html>
<html lang="en">
<?php include('assets/_partials/head.php');?>
<body class="hold-transition sidebar-mini">
<!--preloader-->
<div id="preloader">
<div id="status"></div>
</div>
<!-- Site wrapper -->
<div class="wrapper">
<?php include('assets/_partials/header.php');?>
<!-- =============================================== -->
<!-- Left side column. contains the sidebar -->
<aside class="main-sidebar">
<!-- sidebar -->
<?php include("assets/_partials/navbar.php");?>
<!-- /.sidebar -->
</aside>
<!-- =============================================== -->
<!-- Content Wrapper. Contains page content -->
<!--trigger alert if its a success or its an eror-->
<?php if(isset($msg))
{?>
<script>
setTimeout(function ()
{
swal("Success!","<?php echo $msg;?>!","success");
},
100);
</script>
<?php }?>
<!--End Trigger-->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<div class="header-icon">
<i class="fa fa-send"></i>
</div>
<div class="header-title">
<h1>Transfer</h1>
<small>Transfer list & Add transfer</small>
</div>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-sm-4">
<div class="panel lobidisable panel-bd">
<div class="panel-heading">
<div class="panel-title">
<h4>Add Transfer</h4>
</div>
</div>
<div class="panel-body">
<form method="POST">
<div class="form-group">
<label> From Bank Account</label>
<select name="bank_account" required class="form-control">
<option>Bank of asia</option>
<option>Brac Bank</option>
<option>National Bank</option>
<option>Exim Bank</option>
<option>Datchbangla Bank</option>
<option>Sonali Bank</option>
</select>
</div>
<div class="form-group">
<label> To Bank Account</label>
<select name="to_bankacc" required class="form-control">
<option>Bank of asia</option>
<option>Brac Bank</option>
<option>National Bank</option>
<option>Exim Bank</option>
<option>Datchbangla Bank</option>
<option>Sonali Bank</option>
</select>
</div>
<div class="form-group">
<label>Date</label>
<div class=" input-group date form_date">
<input id='minMaxExample' type="text" name="posting_date" class="form-control years"><span class="input-group-addon"><a href="#"><i class="fa fa-calendar"></i></a></span>
</div>
</div>
<div class="form-group">
<label>Description</label>
<textarea type="text" class="form-control" name="description" placeholder="Enter Short description" required></textarea>
</div>
<div class="form-group">
<label>Amount</label>
<input type="number" class="form-control" name="amount" placeholder="Enter Amount" required>
</div>
<div class="form-group">
<button type="submit" name="post_transfer" class="btn btn-add"><i class="fa fa-check"></i> Submit
</button>
</div>
</form>
</div>
</div>
</div>
<div class="col-sm-8">
<div class="panel lobidisable panel-bd">
<div class="panel-heading">
<div class="panel-title">
<h4>Recent Transfers</h4>
</div>
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr class="info">
<th>#</th>
<th>From</th>
<th>To</th>
<th>Description</th>
<th>Amount</th>
</tr>
</thead>
<?php
$ret="SELECT * FROM `expense` WHERE type = 'Transfer' ";
$stmt= $mysqli->prepare($ret) ;
//$stmt->bind_param('i',$aid);
$stmt->execute() ;//ok
$res=$stmt->get_result();
$cnt=1;
while($row=$res->fetch_object())
{
?>
<tbody>
<tr>
<td><?php echo $cnt;?></td>
<td><?php echo $row->bank_account;?></td>
<td><?php echo $row->to_bankacc;?></td>
<td><?php echo $row->description;?></td>
<td>$ <?php echo $row->amount;?></td>
</tr>
</tbody>
<?php $cnt=$cnt+1; } ?>
</table>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<?php include('assets/_partials/footer.php');?>
</div>
<!-- ./wrapper -->
<!-- Start Core Plugins
=====================================================================-->
<!-- jQuery -->
<script src="assets/plugins/jQuery/jquery-1.12.4.min.js" type="text/javascript"></script>
<!-- jquery-ui -->
<script src="assets/plugins/jquery-ui-1.12.1/jquery-ui.min.js" type="text/javascript"></script>
<!-- Bootstrap -->
<script src="assets/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<!-- lobipanel -->
<script src="assets/plugins/lobipanel/lobipanel.min.js" type="text/javascript"></script>
<!-- Pace js -->
<script src="assets/plugins/pace/pace.min.js" type="text/javascript"></script>
<!-- SlimScroll -->
<script src="assets/plugins/slimScroll/jquery.slimscroll.min.js" type="text/javascript"></script>
<!-- FastClick -->
<script src="assets/plugins/fastclick/fastclick.min.js" type="text/javascript"></script>
<!-- CRMadmin frame -->
<script src="assets/dist/js/custom.js" type="text/javascript"></script>
<!-- End Core Plugins
=====================================================================-->
<!-- Start Theme label Script
=====================================================================-->
<!-- Dashboard js -->
<script src="assets/dist/js/dashboard.js" type="text/javascript"></script>
<!-- End Theme label Script
=====================================================================-->
</body>
<!-- Mirrored from thememinister.com/crm/transfer.html by HTTrack Website Copier/3.x [XR&CO'2014], Thu, 04 Jul 2019 11:39:44 GMT -->
</html>