Mini Shell

Direktori : /home/rizant5/public_html_old/
Upload File :
Current File : //home/rizant5/public_html_old/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>Lanka Virtual Academy | Tell a Friend</title>
	<meta name="description" content="Tell your friends and family about what Lanka Virtual Academy has to offer.">
	<meta name="Keywords" content="">
  <?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_text = nl2br($_POST['fnd_message']);
                  /**/
                  $message ="<table cellpadding='0' cellspacing='0' align='center' width='600' bgcolor='#f5f5f5'>
                  <style>
                  @import url(http://weloveiconfonts.com/api/?family=entypo);
                  [class*='entypo-']:before {
                     font-family: 'entypo', sans-serif;
                  }
                  #sticky-social a {
                    background: #333;
                    color: #fff;
                    display: block;
                    height: 35px;
                    font: 16px 'Open Sans', sans-serif;
                    line-height: 35px;
                    position: relative;
                    text-align: center;
                    width: 35px;
                    text-decoration: none;
                  }
                  #sticky-social a[class*='facebook'],
                  #sticky-social a[class*='facebook']:hover,
                  #sticky-social a[class*='facebook'] span { background: #3b5998; }
                  #sticky-social a[class*='twitter'],
                  #sticky-social a[class*='twitter']:hover,
                  #sticky-social a[class*='twitter'] span { background: #00aced; }
                  #sticky-social a[class*='gplus'],
                  #sticky-social a[class*='gplus']:hover,
                  #sticky-social a[class*='gplus'] span { background: #dd4b39; }
                  #sticky-social a[class*='linkedin'],
                  #sticky-social a[class*='linkedin']:hover,
                  #sticky-social a[class*='linkedin'] span { background: #007bb6; }
                  #sticky-social a[class*='instagrem'],
                  #sticky-social a[class*='instagrem']:hover,
                  #sticky-social a[class*='instagrem'] span { background: #517fa4; }
                  #sticky-social a[class*='stumbleupon'],
                  #sticky-social a[class*='stumbleupon']:hover,
                  #sticky-social a[class*='stumbleupon'] span { background: #eb4924; }
                  #sticky-social a[class*='pinterest'],
                  #sticky-social a[class*='pinterest']:hover,
                  #sticky-social a[class*='pinterest'] span { background: #cc2127; }
                  #sticky-social a[class*='flickr'],
                  #sticky-social a[class*='flickr']:hover,
                  #sticky-social a[class*='flickr'] span { background: #ff0084; }
                  #sticky-social a[class*='tumblr'],
                  #sticky-social a[class*='tumblr']:hover,
                  #sticky-social a[class*='tumblr'] span { background: #32506d; }
                  #sticky-social > td{ padding: 0; }
                  </style>
                          <tr>
                              <td style='background-color: #e4e4e4;'><img src='http://development.lankavirtualacademy.com/images/mail/mail_logo_v2.png' style='display:block;margin: auto;padding:20px 0;' border='0'></td>
                          </tr>
                          <tr>
                              <td style='font-family: Helvetica, Arial, Sans Serif; font-size:12px;'>
                                  <table cellspacing='20'>
                                      <tr>
                                          <td>
                                              <br />
                                              <p style='font-family: Helvetica, Arial, Sans Serif; line-height: 22px; font-size: 16px;'>
                                              $message_text
                                              </p>
                                          </td>
                                      </tr>
                                  </table>
                              </td>
                          </tr>
                          <tr>
                              <td align='center' style='background-color: #e4e4e4;color: #3b5999;'><br />
                                  <span style='font-family: Helvetica, Arial, Sans Serif; font-size:14px;'>Lanka Virtual Academy</span><br/><span style='font-family: Helvetica, Arial, Sans Serif; font-size:14px;'>Sri Lanka</span><br /><br/><span style='font-family: Helvetica, Arial, Sans Serif; font-size:14px;'>WE ARE SOCIAL</span><br /><br/>
                                  <table align='center' cellspacing='0'>
                                      <tr id='sticky-social'>                            
                                          <td align='center' style='padding: 0;'><a href='https://web.facebook.com/Lanka-Virtual-Academy-715033055300562/' class='entypo-facebook' target='_blank'><img src='http://development.lankavirtualacademy.com/images/mail/1.jpg'></a></td>
                                          <td align='center' style='padding: 0;'><a href='https://twitter.com/lvaacademy' class='entypo-twitter' target='_blank'><img src='http://development.lankavirtualacademy.com/images/mail/2.jpg'></a></td>
                                          <td align='center' style='padding: 0;'><a href='#' class='entypo-gplus' target='_blank'><img src='http://development.lankavirtualacademy.com/images/mail/3.jpg'></a></td>
                                          <td align='center' style='padding: 0;'><a href='https://www.linkedin.com/company/lanka-virtual-academy' class='entypo-linkedin' target='_blank'><img src='http://development.lankavirtualacademy.com/images/mail/4.jpg'></a></td>
                                          <td align='center' style='padding: 0;'><a href='https://web.facebook.com/Lanka-Virtual-Academy-715033055300562/' class='entypo-instagrem' taget='_blank'><img src='http://development.lankavirtualacademy.com/images/mail/5.jpg'></a></td>
                                          <td align='center' style='padding: 0;'><a href='http://www.stumbleupon.com/stumbler/LVAcademy' class='entypo-stumbleupon' target='_blank'><img src='http://development.lankavirtualacademy.com/images/mail/6.jpg'></a></td>
                                          <td align='center' style='padding: 0;'><a href='https://www.pinterest.com/lankavirtualaca/' class='entypo-pinterest' target='_blank'><img src='http://development.lankavirtualacademy.com/images/mail/7.jpg'></a></td>
                                          <td align='center' style='padding: 0;'><a href='https://www.flickr.com/people/147006820@N02/' class='entypo-flickr' target='_blank'><img src='http://development.lankavirtualacademy.com/images/mail/8.jpg'></a></td>
                                          <td align='center' style='padding: 0;'><a href='//www.lankavirtualacademy.tumblr.com' class='entypo-tumblr' target='_blank'><img src='http://development.lankavirtualacademy.com/images/mail/9.jpg'></a></td>
                                      </tr>
                                  </table>
                              </td>
                          </tr>
                          <tr>
                              <td align='center' style='background-color: #e4e4e4;color: #3b5999;font-size:12px;padding: 15px 20px;'><hr color=#cdcdcd>The information in this email is intended only for the addressee and may contain confidential, privileged, or otherwise private information. If you have received this email in error, please contact Lanka Virtual Academy immediately and delete the material from any receiving computer. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited.</td>
                          </tr>
                      </table>";
                  /**/
                  //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="Introducing 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" readonly>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