-
Notifications
You must be signed in to change notification settings - Fork 5
/
manual_payments.php
executable file
·197 lines (169 loc) · 5.08 KB
/
manual_payments.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
<?php
require('connection.php');
require('functions.php');
if(isset($_POST['name']) && $_POST['name']!=''){
$name=$_POST['name'];
$mail=$_POST['email'];
$mobile=$_POST['mobile'];
date_default_timezone_set("Asia/Kolkata");
$added_on=date('Y-m-d h:i:s');
$desc=$_POST['desc'];
$amount=$_POST['amt'];
$txid=$_POST['txid'];
$sqlstat = mysqli_query($con,"INSERT INTO `donations`(`id`, `name`, `mail`, `mobile`, `amount`, `type`, `message`, `txid`, `payment_status`, `custid`, `added_on`) VALUES (NULL,'$name','$mail','$mobile','$amount','0','$desc','$txid','1','0','$added_on')");
$msg = '';
if( $sqlstat !== false ) {
$msg = "Transaction record has been updated.";
$msgcolor="#5fcf80";
}else {
$msg = "Error description: " . mysqli_error($con);
$msgcolor="red";
}
mysqli_close($con);
}
?>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Sign Up Form</title>
<link rel="stylesheet" href="https://codepen.io/gymratpacks/pen/VKzBEp#0" />
<link href="https://fonts.googleapis.com/css?family=Nunito:400,300" rel="stylesheet" type="text/css" />
<style>
*,
*:before,
*:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
body {
font-family: "Nunito", sans-serif;
color: #384047;
}
form {
max-width: 300px;
margin: 10px auto;
padding: 10px 20px;
background: #f4f7f8;
border-radius: 8px;
}
h1 {
margin: 0 0 30px 0;
text-align: center;
}
input[type="text"],
input[type="password"],
input[type="date"],
input[type="datetime"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="time"],
input[type="url"],
textarea,
select {
background: rgba(255, 255, 255, 0.1);
border: none;
font-size: 16px;
height: auto;
margin: 0;
outline: 0;
padding: 15px;
width: 100%;
background-color: #e8eeef;
color: #8a97a0;
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03) inset;
margin-bottom: 30px;
}
input[type="radio"],
input[type="checkbox"] {
margin: 0 4px 8px 0;
}
select {
padding: 6px;
height: 32px;
border-radius: 2px;
}
button {
padding: 19px 39px 18px 39px;
color: #fff;
background-color: #4bc970;
font-size: 18px;
text-align: center;
font-style: normal;
border-radius: 5px;
width: 100%;
border: 1px solid #3ac162;
border-width: 1px 1px 3px;
box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.1) inset;
margin-bottom: 10px;
}
fieldset {
margin-bottom: 30px;
border: none;
}
legend {
font-size: 1.4em;
margin-bottom: 10px;
}
label {
display: block;
margin-bottom: 8px;
}
label.light {
font-weight: 300;
display: inline;
}
.number {
background-color: #5fcf80;
color: #fff;
height: 30px;
width: 30px;
display: inline-block;
font-size: 0.8em;
margin-right: 4px;
line-height: 30px;
text-align: center;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
border-radius: 100%;
}
@media screen and (min-width: 480px) {
form {
max-width: 480px;
}
}
</style>
</head>
<body>
<div class="row">
<div class="col-md-12">
<form method="post">
<h1>Manual Payments</h1>
<p>This is only for us, for manual payments.</p>
<p style="color:<?php echo $msgcolor; ?>"><?php echo $msg; ?></p>
<fieldset>
<legend><span class="number">1</span> Donor Info</legend>
<label for="name">Name:</label>
<input type="text" id="name" name="name" />
<label for="email">Email:</label>
<input type="email" id="mail" name="email" />
<label for="name">mobile:</label>
<input type="text" id="name" name="mobile" />
</fieldset>
<fieldset>
<legend><span class="number">2</span>Payment Info</legend>
<label for="name">Amount :</label>
<input type="text" id="clgid" name="amt" />
<label for="name">Txid :</label>
<input type="text" id="clgid" name="txid" />
<label for="name">Description:</label>
<textarea type="text" id="clgid" name="desc"></textarea>
</fieldset>
<button type="submit">Add Record</button>
</form>
</div>
</div>
</body>
</html>