Sindbad~EG File Manager

Current Path : /home/numerotech/www/mc.purplemail.in/app/storage/views/
Upload File :
Current File : //home/numerotech/www/mc.purplemail.in/app/storage/views/4b12b35f50589965f85649e5eaa6a442

<?php $__env->startSection('title','Subscribe'); ?>
<?php $__env->startSection('content'); ?>
<?php echo Form::open(array('url'=>'','id'=>'myform','class'=>'form-group largeForm')); ?>


<header class="header">
  <div class="row">    
      <div class="col-lg-12 col-md-12 col-sm-12">
        <h2>Purple Mail - Subscription</h2>      
      </div>          
  </div>
</header>
<div class="row">    
        <div class="col-lg-12 col-md-12 col-sm-12 content">
            <div class="subscriptionmail">
                <div class="heading">
                    <h3>Send Subscription Mail</h3>
                </div>
                <div class="placeholder">
          <div class="col-lg-12 col-md-12 col-sm-12">
              <div class="form-group">
                <h4>Society * </h4>
                <?php echo Form::select('ddlsocieties',array(''=> '--Select--') + $societies,null,array("id"=>"ddlsocieties","class"=>"form-control ddlsocieties")); ?>       
                <label class="text-danger" id="lblErrorddlsocieties"></label>
                </div>
          </div>
          <div class="col-lg-12 col-md-12 col-sm-12">
                <div class="form-group">
                <h4>To *   </h4>
                <?php echo Form::textarea('txtEmailIds',null,['id'=>'txtEmailIds','rows'=>'4','placeholder'=>'test@gmail.com,test2@gmail.com','class'=>'form-control']); ?>   
                <label class="text-danger" id="lblErrortxtEmailIds"></label>
              </div>
          </div>
          <div class="col-lg-12 col-md-12 col-sm-12">
            <div class="form-group">
                <h4>Subject *   </h4>
                <?php echo Form::text('txtEmailSubject','',['placeholder'=>'Email Subject','id'=>'txtEmailSubject']); ?>    
                <label class="text-danger" id="lblErrortxtEmailSubject"></label>
            </div>
          </div>
          <div class="col-lg-12 col-md-12 col-sm-12">
            <div class="form-group">                    
              <h4>Email *</h4>              
              
              <?php echo Form::textarea('txtEmail',null,['id'=>'txtEmail','placeholder'=>'<html>..</html>', 'class'=>'form-control']); ?>    
               <label class="text-danger" id="lblErrortxtEmail"></label>              
            </div>
          <div class="col-lg-12 col-md-12 col-sm-12">
            <div class="form-group">
            Subscribe Link for Mail Template : http://mc.purplemail.in/subscription?sid=*|ID|*&email=*|EMAIL|*&action=subscribe
            </div>
          </div>

          <div class="col-lg-12 col-md-12 col-sm-12">
            <div class="form-group">              
              <button name="btnSend" class="btn btn-primary button-medium" type="button" id="btnSend" aria-expanded ="true">Send Now</button>

              <button name="btnSendSample" class="btn btn-danger button-medium" type="button" id="btnSendSample" aria-expanded="true">Send Sample</button>

              <button name="btnPreviewEmail" class="btn btn-info button-medium" type="button" id="btnPreviewEmail" aria-expanded="true">Preview Email</button>
            </div>
          </div>

                </div>
            </div>
        </div>    
</div>

<?php echo Form::close(); ?>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('script'); ?>
  <script type="text/javascript">

  var baseUrl = "<?php echo url('/'); ?>";
    var myform = "#myform";
    var ddlsocieties = "#ddlsocieties";
    var txtEmailSubject = "#txtEmailSubject";
    var txtEmail = "#txtEmail";
    var txtEmailIds  = "#txtEmailIds";


    var lblErrortxtEmailSubject  = "#lblErrortxtEmailSubject";
    var lblErrorddlsocieties = "#lblErrorddlsocieties";    
    var lblErrortxtEmailIds = "#lblErrortxtEmailIds"; 
    var lblErrortxtEmail  = "#lblErrortxtEmail";


    var btnSend = "#btnSend";
    var btnSendSample = "#btnSendSample";
    var btnPreviewEmail = "#btnPreviewEmail";
    $(document).ready(function () 
    {
      $(btnSend).click(function()
        { 
          if(validation())
          {
            var Url = baseUrl + "<?php echo '/mail/sendmail'; ?>";
              var r = confirm("Are you sure you want to send email?");
              if (r == true) 
              {
                 $(myform).attr('target', "");
                 $(myform).attr('action', Url);
                 $(myform).submit();
              }           
          }
        });

        $(btnSendSample).click(function()
        { 
          if(validation())
          {            
              
            var email = prompt("Are you sure you want to send email sample? \nPlease enter your email Id", "sridharan.r@numerotec.com");

            if (email != null) {
              // var r = confirm("Are you sure you want to send Notification sample?");              
              // if (r == true) 
              // {
                 var Url = baseUrl + "<?php echo '/mail/sendmail?issample=1'; ?>" +"&sampleemail="+ email;
                 $(myform).attr('target', "");
                 $(myform).attr('action', Url);
                 $(myform).submit();
              //}           
            }
          }
        });

        $(btnPreviewEmail).click(function()
        { 

          if(!($.trim($(txtEmail).val())=='') && validation())
          {
            var Url = baseUrl + "<?php echo '/mail/sendmail?ispreview=1'; ?>";
              //var r = confirm("Are you sure you want to send Notification sample?");
              var r = true;
              if (r == true) 
              {
                 $(myform).attr('target', "_blank");
                 $(myform).attr('action', Url);
                 $(myform).submit();
              }           
          }
        });        
    });



    function validation()
    {

      $(lblErrorddlsocieties).text("");
      $(lblErrortxtEmailSubject).text("");      
      $(lblErrortxtEmailIds).text("");      

      if($.trim($(ddlsocieties).val()) == '')    
      {
        $('html, body').animate({ scrollTop: 200 }, 'slow');    
        $(ddlsocieties).focus();
        $(lblErrorddlsocieties).text("Please select Society");
        return false;
      }

      if($.trim($(txtEmailIds).val()) == '')     
      {
        $('html, body').animate({ scrollTop: 400 }, 'slow');        
        $(lblErrortxtEmailIds).text("Please enter EmailIds  ");
        return false;
      }

      if($.trim($(txtEmailSubject).val()) == '')     
      {
        $('html, body').animate({ scrollTop: 400 }, 'slow');        
        $(lblErrortxtEmailSubject).text("Please enter Email Subject");
        return false;
      }
      if($.trim($(txtEmail).val()) == '')     
      {
        $('html, body').animate({ scrollTop: 400 }, 'slow');        
        $(lblErrortxtEmail).text("Please enter Email content");
        return false;
      }
      return true;

    }
  </script>
<?php $__env->stopSection(); ?> 
<?php echo $__env->make('layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists