D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
vitalityhealth
/
public_html
/
aa
/
invite
/
Filename :
birthday-invitation-generator-1.php
back
Copy
<?php include 'cn.php'; // session_start(); // if(isset($_SESSION['username'])) { $rand = (rand()); if(isset($_POST['submit'])) { // print_r($_POST); // die(); date_default_timezone_set('Asia/Kolkata'); $curdate= date('d-m-Y H:i'); $filename1 = $_FILES['file1']['name']; // Upload file move_uploaded_file($_FILES['file1']['tmp_name'],'category/'.$filename1); $name = addslashes($_POST['name']); $day = addslashes($_POST['day']); // print_r($_POST);exit; $eventdate = addslashes($_POST['eventdate']); $eventmonth = addslashes($_POST['eventmonth']); $eventyear = addslashes($_POST['eventyear']); $eventtime = addslashes($_POST['eventtime']); $venuetitle = addslashes($_POST['venuetitle']); $address = addslashes($_POST['address']); $time_in_db_format = date('h:i:A', strtotime($eventtime)); $sql = "INSERT INTO `birthdayinv1`(`name`, `day`, `eventdate`, `eventmonth`, `eventyear`, `eventtime`, `venuetitle`, `address`, `random`) VALUES ('".$name."','".$day."','".$eventdate."','".$eventmonth."','".$eventyear."','".$time_in_db_format."','".$venuetitle."','".$address."','".$rand."') "; $result = $con->query($sql); // echo $sql;exit; if($result){ $last_id = $con->insert_id; echo "<script type='text/javascript'> location.href='birthday-templates/temp1/index.php?rand=$rand&id=$last_id'; </script>";} else { echo "<script type='text/javascript'>alert(\"Not Generated\") location.href='fail.php'; </script>"; } } ?> <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <title>BIRTHDAY INVITATION GENERATOR</title> <meta name="description" content=""> <meta name="keywords" content=""> <meta name="author" content="FREE INVITATION GENERATOR"> <link rel="shortcut icon" href="images/favicon.ico"><!-- Favicon Icon --> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i"><!-- Google Fonts --> <link rel="stylesheet" href="css/plugins.css"><!-- plugins Css --> <link rel="stylesheet" href="css/fonts-icons.css"><!-- Font Icons Css --> <link rel="stylesheet" type="text/css" href="css/style.css"><!-- Custom Css --> <link rel="stylesheet" type="text/css" href="css/helper.css"><!-- Helper Css --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> </head> <body> <!-- Start PreLoader ================================================== --> <div id="pre-loader" class="pre-loader"> <div class="cube-wrapper"> <div class="cube-folding"> <span class="leaf1"></span> <span class="leaf2"></span> <span class="leaf3"></span> <span class="leaf4"></span> </div> <span class="loading" data-name="Loading">Loading</span> </div> <div class="pre-loader-logo"><span class="text-uppercase fw-2 text-white">FREE INVITATION GENERATOR</span></div> </div> <!-- End PreLoader ================================================== --> <!-- Start Header ================================================== --> <?php include("header.php");?> <!-- Start Get in touch today ================================================== --> <section id="contact" class="section bg-grey"> <div class="container"> <div class="row justify-content-center text-center mb-60"> <div class="col-lg-12"> <h2 class="text-black fw-3">Submit <strong class="fw-7">Your</strong> <span class="text-orange">Details</span></h2> </div> </div> <div class="row"> <div class="col-lg-12"> <form action="" method="post" enctype="multipart/form-data"> <div class="row form-group pb-3"> <div class="col-lg-4"> <div class="form-group"> <label>Name</label> <div class="position-relative"> <input type="text" class="form-control" name="name" required> </div> </div> </div> <div class="col-lg-4"> <div class="form-group"> <label>Select Day</label> <div class="position-relative"> <select name="day" class="form-control"> <option value="SUNDAY">SUNDAY</option> <option value="MONDAY">MONDAY</option> <option value="TUESDAY">TUESDAY</option> <option value="WEDNESDAY">WEDNESDAY</option> <option value="THURSDAY">THURSDAY</option> <option value="FRIDAY">FRIDAY</option> <option value="SATURDAY">SATURDAY</option> </select> </div> </div> </div> <div class="col-lg-4"> <div class="form-group"> <div class="position-relative"> <label>Select Date</label> <select name="eventdate" class="form-control"> <?php for ($i = 1; $i <= 31; $i++) {?> <option value="<?php echo $i; ?>"><?php echo $i; ?></option> <?php } ?> </select> </div> </div> </div> <div class="col-lg-3"> <label>Select Month</label> <div class="form-group"> <div class="position-relative"> <select name="eventmonth" class="form-control"> <option value="JAN">JAN</option> <option value="FEB">FEB</option> <option value="MAR">MAR</option> <option value="APR">APR</option> <option value="MAY">MAY</option> <option value="JUN">JUN</option> <option value="JUL">JUL</option> <option value="AUG">AUG</option> <option value="SEP">SEP</option> <option value="OCT">OCT</option> <option value="NOV">NOV</option> <option value="DEC">DEC</option> </select> </div> </div> </div> <div class="col-lg-3"> <label>Select Year</label> <div class="form-group"> <div class="position-relative"> <select name="eventyear" class="form-control"> <?php for ($i = 2023; $i <= 2050; $i++) {?> <option value="<?php echo $i; ?>"><?php echo $i; ?></option> <?php } ?> </select> </div> </div> </div> <div class="col-lg-3"> <label>Time</label> <div class="form-group"> <div class="position-relative"> <input type="time" class="form-control" name="eventtime" required> </div> </div> </div> <div class="col-lg-3"> <div class="form-group"> <label>Venue Title</label> <div class="position-relative"> <input type="text" class="form-control" name="venuetitle" required> </div> </div> </div> <div class="col-lg-12"> <label >Address</label> <div class="form-group"> <div class="position-relative"> <textarea id="myTextarea" rows="4" cols="50" oninput="limitTextarea()" placeholder="Type here..." class="form-control" name="address" ></textarea> <p id="wordCount">Word count: 0</p> </div> </div> </div> <script> function limitTextarea() { var textarea = document.getElementById("myTextarea"); var wordCount = document.getElementById("wordCount"); // Split the text by spaces to count words var words = textarea.value.split(/\s+/); // Set your desired word limit var wordLimit = 10; // Update word count wordCount.textContent = "Word count: " + words.length; // Check if the word limit is exceeded and trim the textarea value accordingly if (words.length > wordLimit) { textarea.value = words.slice(0, wordLimit).join(" "); wordCount.textContent = "Word count: " + wordLimit; } } </script> </div> <div class="row"> <div class="col-lg-12"> <center> <button type="submit" name="submit" class="btn btn-send btn-blue">Generate<i class="far fa-paper-plane pl-3"></i></button> </center> </div> </div> </form> </div> </div> </div> </section> <!-- End Get in touch today ================================================== --> <!-- Start Footer ================================================== --> <?php include("footer.php");?> <!-- End Footer ================================================== --> <!-- Start Back to Top ================================================== --> <a href="#" class="back-to-top" id="back-to-top"><span class="ti-arrow-up"></span></a> <!-- End Back to Top ================================================== --> <script src="js/jquery.min.js"></script><!-- jquery JS --> <script src="js/plugins.js"></script><!-- Plugins JS --> <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBhS88E7WGYgrr2chM0z94OLBWKNDXxESk"></script><!-- Google Map JS --> <script src="js/app.js"></script><!-- Custom JS --> </body> </html>