Hacked By AnonymousFox

Current Path : /home/krishnamexports/www/
Upload File :
Current File : /home/krishnamexports/www/custom-order.php

<?php include("common/header.php");?>

    <main>       



        <!-- contact area start -->

        <div class="contact-area section-padding pt-0">

            <div class="container">

                <div class="row">

                    <div class="col-lg-12">

                        <div class="contact-message custom-order">                        	

                            <h4 class="contact-title">CUSTOM JEWELRY</h4>

                            <?php if(isset($_SESSION['successMsg'])){ echo "<br>".$_SESSION['successMsg']; unset($_SESSION['successMsg']);}?>

                            <p>Krishnam Exports takes great pride in the ability to create for you bespoke products and services that best meet your business needs. Fill in the form below and let us know what we can do for you. Our representative will be more than happy to get in touch with you.</p>                            

                            <form method="post" enctype="multipart/form-data" class="contact-form">

                                <div class="row">

                                    <div class="col-lg-3 col-md-6 col-sm-6">

                                        <input name="name" placeholder="Name *" type="text" required>

                                    </div>

                                    

                                    <div class="col-lg-3 col-md-6 col-sm-6">

                                        <input name="email" placeholder="Email *" type="email" required>

                                    </div>

                                     <div class="col-lg-2 col-md-6 col-sm-6">

                                        <input name="isd_code" placeholder="ISD code *" type="text" required>

                                    </div>

                                                                        

                                    <div class="col-lg-2 col-md-6 col-sm-6">

                                        <input name="phone" placeholder="Phone *" type="text" required>

                                    </div>

                                    

                                    <div class="col-lg-2 col-md-6 col-sm-6">

                                        <select class="form-control" name="jewellery_type" required>

                                            <option value="">JEWELLERY TYPE</option>

                                            <option value="SILVER JEWELLERY">SILVER JEWELLERY</option>

                                            <option value="FASHION JEWELLERY">FASHION JEWELLERY</option>

                                            <option value="OTHER">OTHER</option>

                                        </select>

                                    </div>

                                                                                                            

                                    <div class="col-12">

                                        <div class="contact2-textarea text-center">

                                            <textarea placeholder="Please take a moment to write up a short description of the piece you would like us to create. *" name="short_description" class="form-control2" required></textarea>

                                        </div>                                        

                                    </div>

                                    

                                    <div class="col-lg-4 col-md-6 col-sm-6">

                                        <label>LINK TO ITEM YOU LIKE (OPTIONAL)</label>                                        

                                        <input name="ref_link" placeholder="http://www.example.com" type="text" style="margin-bottom:5px;">

                                    	<p style="font-size:12px;">If you've seen something similar to what you like online, enter the URL of the web page below.</p>

                                    </div>

                                    

                                                                       

                                     

                                    <div class="col-lg-8 col-md-6 col-sm-6">

                                        <div class="container">

                                            <div class="row">

                                                <div class="col-lg-4 imgUp">

                                                	<div class="imagePreview"></div>

                                                	<label class="btn2 btn-primary2">Upload <input type="file" name="attachment[]" class="uploadFile img" value="Upload Photo" style="width: 0px;height: 0px;overflow: hidden;"></label>

                                                </div>

                                                <i class="fa fa-plus imgAdd"></i>

                                            </div>

										</div>

                                    </div>

                                                                       

                                    <div class="col-12">                                       

                                        <div class="contact-btn">

                                            <button class="btn btn-sqr" name="save" type="submit">SEND REQUEST</button>

                                        </div>

                                    </div>

                                                                                                                                                                                                                                                                                                

                                    <div class="col-12 d-flex justify-content-center">

                                        <p class="form-messege"></p>

                                    </div>

                                </div>

                            </form>

                        </div>

                    </div>        

                </div>

            </div>

        </div>

        <!-- contact area end -->

    </main>

    <?php

	if(isset($_POST['save']))

	{

		$name              = mysqli_real_escape_string($cn,$_POST['name']);

		$email             = $_POST['email'];

		$isd_code          = $_POST['isd_code'];

		$phone             = $_POST['phone'];

		$jewellery_type    = $_POST['jewellery_type'];

		$short_description = mysqli_real_escape_string($cn,$_POST['short_description']);

		$ref_link          = $_POST['ref_link'];			

		$imagesCount       = count($_FILES['attachment']['name']);		

		$producImage       = array();

		if($imagesCount > 0)

		{

			for($i=0;$i<$imagesCount;$i++)

			{

				if(!empty($_FILES['attachment']['name'][$i])){

					$imgPro = rand()."_".$_FILES['attachment']['name'][$i];

					move_uploaded_file($_FILES['attachment']['tmp_name'][$i],"attachment/".$imgPro);								

					array_push($producImage,$imgPro);

				}

			}

		}

		$attachment = implode('$',$producImage);

		$sqlOrder   = mysqli_query($cn, "INSERT INTO `tbl_custom_order` SET `name`='".$name."', `email`='".$email."', `isd_code`='".$isd_code."', `phone`='".$phone."', `jewellery_type`='".$jewellery_type."', `short_description`='".$short_description."', `attachment`='".$attachment."', `date`=Now()");

		if($sqlOrder)

		{

			$_SESSION['successMsg'] =  '<div class="alert alert-success"><strong>Success!</strong> Thank you for your Interest. Our Team will revert Shortly.</div>';

		}

		else

		{

			$_SESSION['successMsg'] = '<div class="alert alert-danger"><strong>Warring ! </strong> Sorry, something went wrong. Try Again.</div>';

		}

		header("location:".$_SERVER['REQUEST_URI']);

	}

	?>    

    <!-- footer area start -->

    <?php include("popup/loginsignup.php");?>

    <?php include("common/footer.php");?>

    <!-- footer area end -->    

    <!-- offcanvas mini cart start -->

    <?php include("popup/mini-cart.php");?>

    <!-- offcanvas mini cart end -->

    <!-- Modernizer JS -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/vendor/modernizr-3.6.0.min.js"></script>

    <!-- jQuery JS -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/vendor/jquery-3.3.1.min.js"></script>

    <!-- Popper JS -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/vendor/popper.min.js"></script>

    <!-- Bootstrap JS -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/vendor/bootstrap.min.js"></script>

    <!-- slick Slider JS -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/plugins/slick.min.js"></script>

    <!-- Countdown JS -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/plugins/countdown.min.js"></script>

    <!-- Nice Select JS -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/plugins/nice-select.min.js"></script>

    <!-- jquery UI JS -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/plugins/jqueryui.min.js"></script>

    <!-- Image zoom JS -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/plugins/image-zoom.min.js"></script>

    <!-- Imagesloaded JS -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/plugins/imagesloaded.pkgd.min.js"></script>

    <!-- Instagram feed JS -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/plugins/instagramfeed.min.js"></script>

    <!-- mailchimp active js -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/plugins/ajaxchimp.js"></script>

    <!-- contact form dynamic js -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/plugins/ajax-mail.js"></script>

    <!-- google map api -->

    <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCfmCVTjRI007pC1Yk2o2d_EhgkjTsFVN8"></script>

    <!-- google map active js -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/plugins/google-map.js"></script>

    <!-- Main JS -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/main.js"></script>

    <script src="<?php echo DEFAULT_URL;?>js/blockui.min.js"></script>

    <script src="<?php echo DEFAULT_URL;?>js/function.js"></script>

    <script>

    $(".imgAdd").click(function(){

  		$(this).closest(".row").find('.imgAdd').before('<div class="col-lg-4 imgUp"><div class="imagePreview"></div><label class="btn2 btn-primary2">Upload<input type="file" class="uploadFile img" name="attachment[]" value="Upload Photo" style="width:0px;height:0px;overflow:hidden;"></label><i class="fa fa-times del"></i></div>');

	});

	

	$(document).on("click", "i.del" , function() {

		$(this).parent().remove();

	});

	

	$(function() {

		$(document).on("change",".uploadFile", function()

		{

				var uploadFile = $(this);

			var files = !!this.files ? this.files : [];

			if (!files.length || !window.FileReader) return; // no file selected, or no FileReader support

	 

			if (/^image/.test( files[0].type)){ // only image file

				var reader = new FileReader(); // instance of the FileReader

				reader.readAsDataURL(files[0]); // read the local file

	 

				reader.onloadend = function(){ // set image data as background of div

					//alert(uploadFile.closest(".upimage").find('.imagePreview').length);

					uploadFile.closest(".imgUp").find('.imagePreview').css("background-image", "url("+this.result+")");

				}

			}

		  

		});

	});

    </script>

</body>

</html>

Hacked By AnonymousFox1.0, Coded By AnonymousFox