OverLord Shell
<?php session_start();
include("db/conn.php");
?>
<section id="content">
<div class="container-fluid">
<div class="row">
<div class="col-md-12 well man">
<form id="updateform" role="form">
<input type="hidden" name="catid" id="catid" value="<?php echo $_GET['catid'];?>" readonly>
<input type="hidden" name="subcatid" id="subcatid" value="<?php echo $_GET['subcatid'];?>" readonly>
<input type="hidden" name="uid" id="uid" value="<?php
if(empty($_GET['subcatid']) && empty(base64_decode($_GET['pid']))){
echo $_SESSION['mycompany'];
}else if(empty(base64_decode($_GET['pid']))){
echo $_SESSION['mycompany'];
}else
{
echo base64_decode($_GET['id']);
}?>" readonly>
<input type="hidden" name="cid" id="cid" value="<?php
if(empty($_GET['subcatid']) && empty(base64_decode($_GET['pid']))){
echo $_SESSION['company_id'];
}else if(empty(base64_decode($_GET['pid']))){
echo $_SESSION['company_id'];
}else
{
echo base64_decode($_GET['mycid']);
}?>" readonly>
<input type="hidden" name="pid" id="pid" value="<?php echo base64_decode($_GET['pid']);?>" readonly>
<?php
//print_r($_SESSION);
// code crdeatedby chandrakant
if(!empty(base64_decode($_GET['pid']))){
?>
<input type="hidden" name="fromcid" id="fromcid" value="<?php echo base64_decode($_GET['cid']);?>" readonly>
<?php }?>
<input type="hidden" name="company_email" id="company_email" value="<?php
if(empty($_GET['subcatid']) && empty(base64_decode($_GET['pid']))){
echo $_SESSION['mycompanyemail'];
}else if(empty(base64_decode($_GET['pid']))){
echo $_SESSION['mycompanyemail'];
}else
{
echo base64_decode($_GET['cmail']);
}?>" readonly>
<div class="row">
<div class="col-sm-12">
<div class="form-group">
<label>Enquiry</label>
<textarea class="form-control" name="message" id="message" maxlength="1000" rows="5" data-validation="required" data-validation-error-msg="Invalid Enquiry"></textarea>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<label>Name</label>
<div class="input-icon">
<i class="fa fa-user"></i>
<input type="text" class="form-control" name="name" id="name" maxlength="30" data-validation="required" data-validation-error-msg="Name." value="<?php if(isset($_SESSION['company_id'])){ echo $_SESSION['mycompanynm'];}?>">
</div>
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<label>Mobile No.</label>
<div class="input-icon">
<i class="fa fa-phone"></i>
<input type="text" class="form-control" name="mobno" id="mobno" maxlength="13" data-validation="number" data-validation-error-msg="Invalid Phone No." value="<?php if(isset($_SESSION['company_id'])){ echo $_SESSION['company_mobile'];}?>">
</div>
</div>
</div>
<div class="col-sm-5">
<div class="form-group">
<label>Email</label>
<div class="input-icon">
<i class="fa fa-envelope"></i>
<input type="text" class="form-control" name="email" id="email" maxlength="250" data-validation="email" data-validation-error-msg="Invalid Email" value="<?php if(isset($_SESSION['company_id'])){ echo $_SESSION['company_email']; }?>">
</div>
</div>
</div>
</div>
<div class="alert alert-danger displaynone"></div>
<button style="float:right" type="submit" class="btn-bd hvr-outline-out">Send</button>
</form>
<div class="alert alert-success displaynone">Enquiry Sent Successfully!!!</div>
</div>
</div>
</div>
</section>
<link href="css/jquery.fancybox.css" rel="stylesheet">
<script src="js/jquery.fancybox.pack.js"></script>
<script>
$.validate({
form: '#updateform',
onSuccess: function() {
$('.alert-danger').html('').hide();
$.ajax({
type: 'POST',
url: 'enquiry_save.php',
data: new FormData($('#updateform')[0]),
contentType: false,
processData: false,
success: function(data) {
//alert(data);
var res=data.split('~');
if(res['1']=='1'){
$('#updateform').remove();
$('.alert-success').show();
setTimeout(function() {
location = 'index.php?msg=add_success';
}, 2000);
}else if (res['0'] == 'success') {
$('#updateform').remove();
$('.alert-success').show();
setTimeout(function() {
location = 'product.php?id=<?php echo $_GET['pid'];?>&msg=add_success';
}, 2000);
}
else if (data.substr(data.length - 4) == '.php') location = data;
else {
$('.alert-danger').html(data).show();
}
}
});
return false;
}
});
var width=$(window).width();
if(width>400)$('.container-fluid').css('width',(width*.7));
function ref_and_close()
{
opener.location.reload();
self.close();
}
</script>
xRyukZ - Copyright 2k19