Mini Shell

Direktori : /proc/self/root/proc/thread-self/root/home/rizant5/public_html/development/
Upload File :
Current File : //proc/self/root/proc/thread-self/root/home/rizant5/public_html/development/tell-friend.php

<?php require_once('function-file.php');
require_once('function-menu.php');
require_once('function-testo-footer.php');
require_once("config.php");?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>Tell a friend | Lanka Virtual Academy</title>
	<?php commoncss();?> 
    <style>
    @media (min-width: 768px) {.login-box{width: 40%;text-align: center;margin-left: 30%;border: 2px solid #ccc;border-radius: 5px;}.error{color: red;}}
    @media(max-width: 767px){
      #friend_form_section .col-sm-4{ text-align: center !important; }
    }
    .margin-bot20{margin-bottom:20px;}
    /*.friend-box{  }*/
    .friend-box h2{ color: #fff;font-size: 32px; }
    .friend_page #friend_form_section{ background: url(images/tell-a-friend.jpg) no-repeat center center / 100% 100%; }
    #friend_form_section .form-group { background-color: #dbe8ee;padding-bottom: 2px;padding-top: 2px;border: 2px solid #0f97ad;margin-bottom:5px; }
    #friend_form_section .col-sm-4 { line-height: 34px;text-align: right; }
    #friend_form_section .col-sm-8, #friend_form_section .col-sm-12{ padding-left: 0;padding-right: 1px; }
    #friend_form_section .form-group.button-group{ background-color: transparent;border-width: 0px; }
    .button-group > div{ padding: 0; }
    #friend_form_section .btn{ background-color: #0ABC98;color: #fff;font-weight: bold;font-size: 20px;margin-top: 32px; }
    </style>   
</head><!--/head-->
<body class="friend_page">
    <?php headermenu();?>
    <script src='https://www.google.com/recaptcha/api.js'></script>
   <section id="friend_form_section">
      <div class="container">
        <div class="row">
            <div class="col-sm-offset-5 col-sm-7 friend-box">
              <h2>Tell a friend about us !</h2>
              <?php
              $modal_show = false;
              if(isset($_REQUEST['fnd_name'])){
                $resp = $_REQUEST['g-recaptcha-response'];

                $url = 'https://www.google.com/recaptcha/api/siteverify';
                $myvars = 'secret=6LcCIAoUAAAAAMCBcvQdipDZYbFt_jNdV1g1lV6C&response=' . $resp;

                $ch = curl_init( $url );
                curl_setopt( $ch, CURLOPT_POST, 1);
                curl_setopt( $ch, CURLOPT_POSTFIELDS, $myvars);
                curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
                curl_setopt( $ch, CURLOPT_HEADER, 0);
                curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);

                $response = curl_exec( $ch );
                $response = json_decode($response);
                if($response->success){
                  $modal_show = true;

                  require_once('phpmailer/class.phpmailer.php');
                  require_once('phpmailer/class.smtp.php');

                  $email_id = $_POST['fnd_email'];
                  $name = $_POST['fnd_name'];
                  $rec_person_id = $_POST['fnd_other_email'];
                  $subject = $_POST['fnd_subject'];
                  $message = nl2br($_POST['fnd_message']);
                  //Send Mail
                  $mail = new PHPMailer; // call the class 
                  $mail->IsSMTP();
                  $mail->SMTPDebug  = 0; 
                  $mail->SMTPSecure = "tls";   
                  // $mail->Host = "smtp.gmail.com"; //Hostname of the mail server
                  $mail->Host = "secure200.inmotionhosting.com"; //Hostname of the mail server
                  $mail->Port = 587; //Port of the SMTP like to be 25, 80, 465 or 587
                  $mail->SMTPAuth = true; //Whether to use SMTP authentication
                  // $mail->Username = "praveen.patel.9595"; //Username for SMTP authentication any valid email created in your domain
                  $mail->Username = "subscription@lankavirtualacademy.com"; //Username for SMTP authentication any valid email created in your domain
                  // $mail->Password = "bgxbpqumcefjrbqi"; //Password for SMTP authentication
                  $mail->Password = "subscription@lva"; //Password for SMTP authentication
                  $mail->AddReplyTo("support@lankavirtualacademy.com", "Lanka Virtual Academy"); //reply-to address
                  $mail->SetFrom("$email_id","Lanka Virtual Academy"); //From address of the mail
                  // put your while loop here like below,
                  $mail->Subject = $subject; //Subject od your mail
                  $mail->AddAddress($rec_person_id,"From $name"); //To address who will receive this email
                  $mail->MsgHTML($message);
                  $send = $mail->Send(); //Send the mails
                  // echo "<script>alert('Your friend got your mail! Thanks.');</script>";
                  // echo "<script>window.onload = function(){
                  //   $('#friend_notified').modal('show');
                  // }</script>";
                }else{
                  // echo 'false';
                }
              }
              ?>
              <form method="post">
                  <div class="col-sm-12 form-group">
                      <div class="col-sm-4">Your Name</div>
                      <div class="col-sm-8"><input type="text" name="fnd_name" class="form-control" required/></div>
                  </div>
                  <div class="col-sm-12 form-group">
                      <div class="col-sm-4">Your e-mail address</div>
                      <div class="col-sm-8"><input type="email" name="fnd_email" class="form-control" required/></div>
                  </div>
                  <div class="col-sm-12 form-group">
                      <div class="col-sm-4">Your friend's e-mail address</div>
                      <div class="col-sm-8"><input type="email" name="fnd_other_email" class="form-control" required/></div>
                  </div>
                  <div class="col-sm-12 form-group">
                      <div class="col-sm-4">Subject</div>
                      <div class="col-sm-8"><input type="text" name="fnd_subject" class="form-control" required value="Lanka Virtual Academy"/></div>
                  </div>
                   <div class="col-sm-12 form-group">
                      <div class="col-sm-4">Message</div>
                      <div class="col-sm-8"><textarea name="fnd_message" class="form-control" required rows="8">I am very much excited about the prospect of learning at Lanka Virtual Academy and thought of sharing with you also this amazing opportunity.

You may please visit http://www.lankavirtualacademy.com to review what they have to offer.

Thank you and good luck!</textarea></div>
                  </div>
                  <div class="col-sm-12 form-group button-group">
                      <div class="col-sm-6">
                        <div class="g-recaptcha" data-callback="allow_now" data-sitekey="6LcCIAoUAAAAANeDMlcWeHYu4PI1anUpR7pM9K5f"></div>
                      </div>
                      <div class="col-sm-6"><input type="submit" name="save" class="btn col-sm-12" value="Send"/></div>
                  </div>
               </form>   
            </div>
          </div>
       </div>
   </section>
  <?php newssletter();  ?>
<?php footer(); commonjs();?>   
<script type="text/javascript">
  $captcha_status = false;
  function allow_now() {
    // $('#submitBtn').removeAttr('disabled');
    $captcha_status = true;
  };
  $("#friend_form_section form").submit(function(e){
    e.preventDefault(); 
    if($captcha_status == true){
      $("#friend_form_section form")[0].submit();
    }else{
      $("#captcha_error").modal('show');
    }
  });
</script>
<!--modal end-->
<div class="modal fade" id="friend_notified" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog modal-sm" role="document">
    <div class="modal-content">
      <div class="modal-header" style="background:#0382A9 !important;border-radius:3px 3px 0px 0px;color:#fff">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" style="color:red">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel" style="color:#fff" align="center"><i class="fa fa-cross"></i> Thank You!</h4>
      </div>
      <div class="modal-body">
        <div><h4 style="text-align: center;font-size: 16px;color: #0382a9;">Your message is delivered.</h4></div>
      </div>
    </div>
  </div>
</div> 
<div class="modal fade" id="captcha_error" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog modal-sm" role="document">
    <div class="modal-content">
      <div class="modal-header" style="background:#0382A9 !important;border-radius:3px 3px 0px 0px;color:#fff">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" style="color:red">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel" style="color:#fff" align="center"><i class="fa fa-cross"></i> Check captcha!</h4>
      </div>
      <div class="modal-body">
        <div><h4 style="text-align: center;font-size: 16px;color: #0382a9;">Please verify that you're not a robot.</h4></div>
      </div>
    </div>
  </div>
</div> 
<!--modal end-->
<?php
if($modal_show){
  echo "<script>
    $('#friend_notified').modal('show');
  </script>";
}
?>
</body>
</html>

Zerion Mini Shell 1.0