forked from XinFinOrg/Official-XinFinOrg
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontactus.php
286 lines (257 loc) · 11.8 KB
/
contactus.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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
<?php
$title = "Contact Us | XinFin Hybrid Blockchain";
$desc = "Let your business cross the horizon by using XinFin’s fast and secure XDC tokens. Contact us Now.";
include('inc/header.php') ?>
<style>
.inputTxtError1 {
border: 1px solid #f00!important;
}
</style>
<section id="contactbanner">
<div class="container">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12 bannertext">
<h1>CONTACT US</h1>
<p>Use the XDC token on the public state that is identical in functionality to public blockchains.<br/> Or set up private networks to run enterprise use cases.</p>
</div>
</div>
</div>
</section>
<!--<section id="contact" style="background: #f3f3f3">-->
<section id="contact">
<div class="container">
<!--<div class="tab-content" style="background: #fff; margin-bottom:10%">-->
<div class="tab-content">
<div id="network">
<div class="row pb-2">
<div class="col-md-12">
<h3>GET IN TOUCH WITH US</h3>
<h4>We appreciate you taking the time to get in touch.</h4>
<h4 class="visible-md visible-lg">Post your query and get community Support.</h4>
</div>
</div>
<div class="row">
<div class="col-md-5 col-md-offset-1 col-md-push-6">
<div class="contact-info">
<p class="contactpara">Contact Info</p>
<hr class="mb-1" style="margin-top: 0px;">
<p style="margin: 0 auto; text-align: center;"><a href="mailto:[email protected]" style="font-size: 18px; color: #002752">[email protected]</a></p>
<p class="contact-info-gap"></p>
<p class="contactpara">Join the Discord or Reddit to get Community Support</p>
<hr class="mb-1" style="margin-top: 0px;">
<p class="socialicons1 mb-0">
<a href="https://discord.com/invite/KZdD6pkFxp" target="_blank"><i class="fab fa-discord"></i></a>
<a href="https://www.reddit.com/r/xinfin/" target="_blank"><i class="fa fa-reddit-square"></i></a>
</p>
<p class="contact-info-gap"></p>
<p class="contactpara">Connect With Us</p>
<hr class="mb-1" style="margin-top: 0px;">
<p class="socialicons1">
<a href="https://t.me/xinfintalk" target="_blank"><i class="fa fa-paper-plane"></i></a>
<a href="https://www.linkedin.com/company/xinfin/" target="_blank"><i class="fa fa-linkedin"></i></a>
<a href="https://www.youtube.com/channel/UCQaL6FixEQ80RJC0B2egX6g" target="_blank"><i class="fa fa-youtube"></i></a>
<a href="https://twitter.com/XinFin_Official" target="_blank"><i class="fa fa-twitter"></i></a>
<a href="https://www.facebook.com/XinFinHybridBlockchain/" target="_blank"><i class="fa fa-facebook"></i></a>
<a href="https://github.com/XinFinorg" target="_blank"><i class="fa fa-github"></i></a>
<a href="https://xinfin-public.slack.com/" target="_blank"><i class="fa fa-slack"></i></a>
</p>
</div>
</div>
<div class="col-md-6 col-md-pull-6">
<h4 class="visible-xs visible-sm">Post your query and get community Support</h4>
<br/>
<form action="#" method="" id="contactForm">
<div class="form-group">
<label for="email">Name (required)</label>
<input type="text" class="form-control" id="name" name="name" required>
</div>
<div class="form-group">
<label for="email">Email (required)</label>
<input type="email" class="form-control" id="email" name="email" required>
</div>
<div class="form-group">
<label for="email">Contact Number (required)</label>
<input type="text" class="form-control" id="contact_number" name="contact" maxlength="10" minlength="10" onkeypress="return isNumber(event)">
</div>
<div class="form-group">
<label for="email">Comments</label>
<textarea class="form-control" id="comments" name="comments"></textarea>
</div>
<div class="form-group">
<div class="g-recaptcha" data-sitekey="6Lere-8UAAAAAIhU_6OquF27rHJR7Kqfa1y70oeY"></div>
<p id="gcaptch"></p>
</div>
<!-- <div class="checkbox">
<label><input type="checkbox" name="remember"> Remember me</label>
</div> -->
<!--<button type="button" id="contactBtn" class="btn btn-default submitbtn">Submit</button>-->
<button type="button" id="contactBtn" class="btn-hover color-1 submitbtn">Submit</button>
</form>
</div>
</div>
<br/><br/>
<!--<div class="row">
<div class="col-md-5">
<p class="contactpara">CONTACT INFO</p>
<hr style="margin-top: 0px; ">
<p style="margin: 0 auto; text-align: center;"><a href="mailto:[email protected]" style="font-size: 18px; color: #002752">[email protected]</a></p>
</div>
<div class="col-md-2 line1" style="">
<p class="line1p"></p>
</div>
<div class="col-md-5">
<p class="contactpara">CONNECT WITH US</p>
<hr style="margin-top: 0px; ">
<p class="socialicons1">
<a href="https://t.me/xinfintalk" target="_blank"><i class="fa fa-paper-plane"></i></a>
<a href="https://www.linkedin.com/company/xinfin/" target="_blank"><i class="fa fa-linkedin"></i></a>
<a href="https://www.youtube.com/channel/UCQaL6FixEQ80RJC0B2egX6g" target="_blank"><i class="fa fa-youtube"></i></a>
<a href="https://twitter.com/XinFin_Official" target="_blank"><i class="fa fa-twitter"></i></a>
<a href="https://www.facebook.com/XinFinHybridBlockchain/" target="_blank"><i class="fa fa-facebook"></i></a>
<a href="https://github.com/XinFinorg" target="_blank"><i class="fa fa-github"></i></a>
<a href="https://www.reddit.com/r/xinfin/" target="_blank"><i class="fa fa-reddit"></i></a>
<a href="https://xinfin-public.slack.com/" target="_blank"><i class="fa fa-slack"></i></a>
</p>
</div>
</div>-->
</div>
</div>
<div class="clear"></div>
</div>
</section>
<?php include('inc/footer.php') ?>
<script>
$(document).ready(function(){
// START OF FORM VALIDATION SCRIPT
var data = {};
var name_pattern=/^[A-Za-z .'-]+$/;
var email_pattern=/^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/;
var phone_pattern = /^[0-9]+$/;
$(document).on('focus', 'input,select', function() {
$(this).removeClass('inputTxtError1');
});
$(document).on('focus', 'textarea', function() {
$(this).removeClass('inputTxtError');
});
$("#contactBtn").click(function()
{
var validation = true;
user_name_val = $("#name").val().trim();
$("#name").val(user_name_val);
email_val = $("#email").val();
phone_val = $("#contact_number").val();
var phone_val_len = phone_val.length;
console.log("phone_val_len : "+phone_val_len);
var
user_name_match = user_name_val .match(name_pattern);
email_match = email_val.match(email_pattern);
phone_match = phone_val.match(phone_pattern);
if(user_name_val!= '')
{
if(user_name_match === null){
validation = false;
$('#name').val('');
$('#name').attr("placeholder","Invalid format");
$('#name').addClass('inputTxtError1');
}else{
$('#name').parent().find('.error').text("span").remove();
$('#name').removeClass('inputTxtError1');
}
}else{
$('#name').attr("placeholder","Enter Your Name");
$('#name').addClass('inputTxtError1');
validation = false;
}
if(email_val!= '')
{
if(email_match === null){
validation = false;
$('#email').val('');
$('#email').attr("placeholder","Invalid format");
$('#email').addClass('inputTxtError1');
}else{
$('#email').parent().find('.error').text("span").remove();
$('#email').removeClass('inputTxtError1');
}
}else{
$('#email').attr("placeholder","Enter Your Email");
$('#email').addClass('inputTxtError1');
validation = false;
}
if(phone_val!= '')
{
console.log("if phone_val : "+phone_val);
if(phone_match === null)
{
console.log("if phone_match : "+phone_val);
validation = false;
$('#contact_number').val('');
$('#contact_number').attr("placeholder","Invalid format");
$('#contact_number').addClass('inputTxtError1');
}else{
console.log("else phone_match : "+phone_val);
$('#contact_number').parent().find('.error').text("span").remove();
$('#contact_number').removeClass('inputTxtError1');
}
}
else{
console.log("else phone_val : "+phone_val);
$('#contact_number').attr("placeholder","Enter Your Phone Number");
$('#contact_number').addClass('inputTxtError1');
validation = false;
}
if(phone_val_len == 0){
console.log("phone_val_len : "+phone_val_len);
$('#contact_number').attr("placeholder","Please enter 10 digit number");
$('#contact_number').addClass('inputTxtError1');
validation = false;
}
if(grecaptcha.getResponse() == "") {
$('#gcaptch').text("You must verify reCAPTCH");
$('#gcaptch').addClass("text-danger");
validation = false;
}else{
$('#gcaptch').hide();
}
if(validation)
{
//console.log('If Block');
$('#contactBtn').text("Submitting...");
// console.log($("#contactForm").serialize());
// alert('hi');
$.ajax({
type: "POST",
url: "contactpost.php",
data: $("#contactForm").serialize(), // serializes the form's elements.
beforeSend: function() {
// alert(data);
//alert("before send");
},
success: function(data)
{
console.log(data);
$('#contactBtn').text("SUBMIT");
$('#contactForm')[0].reset();
$('#name').attr('placeholder', 'User Name');
$('#email').attr('placeholder', 'Email Id');
$('#contact_number').attr('placeholder', 'Mobile Number');
if(data == "mailsentmailsent"){
window.location = "thankyou.php";
}
else{
alert("Mail Not Sent!!");
}
}
});
}
});
});
function isNumber(evt) {
evt = (evt) ? evt : window.event;
var charCode = (evt.which) ? evt.which : evt.keyCode;
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
return false;
}
return true;
}
</script>