Location: PHPKode > projects > MembersGear > membersgear/templates/admin_send_email.tpl
{$ADMIN_HEADER}

  {*---------------------Change functionality of check box --------------------------*}
  {literal} 
          <script language="JavaScript" type="text/javascript">
          </script>
  {/literal}
  <div id="content" class="setdiv"> 
{encryptUrl enstring=$hi} 
{if $msg neq ''}  
    <div class='errormsg' style="">{if $msg neq ''}{$msg}{/if}</div>
{/if}                        
<div id="full-contentdiv">
          <div class="righttop">
                <h2  align="center">
                   {if $showfg eq 'senduser'}Send Email to User{elseif $showfg eq 'sendgp'}Send Email to Group{/if}
                </h2>
            </div>
         <div class="whole-page clear">
            <!-- Place your content here -->
             {if $IsEdit eq 'yes'}
                    {assign var="action" value="update"}
              {else}
                    {assign var="action" value="insert"}
              {/if}
              <form method="post" name="myform" action="admin_send_email.php?action=sendmail">
                 <input type="hidden" name="hdn_sendtype" id="hdn_sendtype" value="{$showfg}">  
                 <input type="hidden" name="hdn_uid" id="hdn_uid" value="{$userid}">
                 <div class="formformat">
                 <table  border="0"  cellspacing="0" cellpadding="0" width="90%"  align="center">    
                  <tbody>
                       
                         <tr>
                                <td   class="right-side-text" width="width:200px"><label>Select Email Template<label class="star">*</label></label></td>
                                <td class="left-side-text">
                                <table class="borderless" cellspacing="0" cellpadding="0" border="0">
                                     <tr>
                                           <td>
                                        <select id="ddltmp" name="ddltmp" class="selectcss" style="font-weight: normal;width:300px;" >
                                        <option value=''>select..</option>
                                        {section name=tmp_name loop=$latemplate}   
                                             <option value="{$latemplate[$smarty.section.tmp_name.index].id}" 
                                      {if $IsEdit eq 'yes'}          
                                            {if $latemplate[$smarty.section.tmp_name.index].id eq $userdata[0].name} 
                                                selected  
                                            {/if}
                                      {elseif $latemplate[$smarty.section.tmp_name.index].name eq   'Default'} 
                                        selected
                                      {/if}>{$latemplate[$smarty.section.tmp_name.index].name}</option>{/section}</select> 
                                        </td>
                                         <td class="left-side-text">
                                           <div id='loading' style="visibility:hidden;">
                                            Cargando...
                                            </div> 
                                        </td>
                                      
                                     </tr>
                                    </table> 
                                

                                 
                                  </td>

                            </tr>
                       <tr>
                            <td valign="top"  class="right-side-text" style="width:200px"><label>Subject <label class="star">*</label></label></td>
                            <td class="left-side-text">
                               <input type="text"  name="txtsubject" id="txtsubject" class="txtcss"  style="width:500px;" 
                              value="">
                              <div  class="comment-div" style="width:490px !important">
                                <strong>You may use the following attributes in any of your Email subject :</strong><br/>
                                first name-[firstname]<br/>
                                last name-[lastname]<br/>
                                username-[username]<br/> 
                                product name-[productname]
                            </div>
                            </td>

                        </tr>
                         <tr style="display:none">
                            <td valign="top"  class="right-side-text" style="width:200px"><label>To <label class="star">*</label></label></td>
                            <td class="left-side-text">
                             
                                <textarea class="txtareacss" readonly style="width:500px;" rows="2" cols="100" name="txtto" id="txtto"/>{$email|escape}</textarea>   
                            </td>

                        </tr>
                         <tr>
                            <td valign="top"  class="right-side-text" style="width:200px"><label>Body <label class="star">*</label></label></td>
                            <td class="left-side-text">
                            <span id="spntmpmsg" name="spntmpmsg" style="font-weight: normal;"> 
                                   
                               <textarea class="txtareacss" style="width:500px;" rows="20" cols="100" name="txtContent" id="txtContent"/>{$email_msg}</textarea>   
                              <input type="hidden" name="hdn_tmp_id" id="hdn_tmp_id" value={$tmpid}>
                            </span>
                            </td>

                        </tr>
                        <tr>
                        <td style="border-top:0px important">
                        </td>
                        <td class="left-side-text">
                            <div  class="comment-div" style="width:490px !important">
                                <strong>You may use the following attributes in any of your Emails:</strong><br/>
                                [username] - username<br/>
                                [password] - password<br/>
                                [email] - user Email<br/>
                                [firstname] - first name<br/>
                                [lastname] - last name<br/>
                                [productname] - product name<br/> 
                                [product_url] - product url<br/> 
                                [unsubscribe_link] - unsubscribe link<br/>
                                [today_date] - date when Email sent<br/>
                                [today_time] - time when Email sent<br/>
                                [today_datetime] - date and time when Email sent<br/>
                                [validateuser_link] - validate user link<br/>
                            </div>
                        </td>
                    </tr>
                         <tr>
                            <td valign="top"  class="right-side-text">&nbsp;</td>
                            <td class="buttontd"> 
                            
                                           {if $lsnodata eq 'Yes'}
                                                <input class="btndisabled" type="submit" value="Send" style="margin-top:10px">    &nbsp;&nbsp;
                                        
                                           {else}
                                               <input class="btncss" type="submit" value="Send" style="margin-top:10px">
                                           {/if}
                                           <input type="button" class="btncss" name="btnBack" value="Cancel" onclick="javascript:window.history.go(-1);">
                           </td>      
                           </tr>          
                     </tbody>
                   </table> 
                   </div>      
               </form>
            </div>
              </div>
         {literal} 
          <script language="JavaScript" type="text/javascript">
          
          var $j = jQuery.noConflict();  
          $j(document).ready(function(){  
             
          $j('#ddltmp').change(function(){
           var Temval=  $j(this).val();
           if(Temval=='') 
              return false;
            
           var dataString = 'ddltmp='+ $j(this).val() ;
           var web_url='{/literal}{$WEB_URL}{literal}';
            
           $j.ajax({
               type: "POST",
               url: web_url+"/includes/getemailtemplate.php",
               datatype: 'html',
               data: dataString,
               success: function(msg){
                   $j('#spntmpmsg').html(msg);
                      
                 
               }
           }); 
            
            
        }); 
       
     });    
    
       $j(document).ajaxStart($j.blockUI).ajaxStop($j.unblockUI);   
  
           var frmvalidator  = new Validator("myform");
           frmvalidator.EnableMsgsTogether();
            frmvalidator.addValidation("ddltmp","dontselect=''","Please select Email Template."); 
            frmvalidator.addValidation("txtsubject","req","Please enter Email Subject.");   
            frmvalidator.addValidation("txtsubject","req","Please enter Email Address."); 
            frmvalidator.addValidation("txtContent","req","Please enter Email Body."); 
            
            
              
          </script>
          {/literal} 
</div>                  
{$ADMIN_FOOTER}
Return current item: MembersGear