Location: PHPKode > projects > MembersGear > membersgear/templates/admin_newsletter.tpl
{$ADMIN_HEADER}
{*
include_php file="$INCLUDE_DIR/spaw2/spaw.inc.php"
*}
{literal}
<script type="text/javascript">
         function Change(value)
          {
              //alert(value.checked);   
              var TextControl = document.getElementById('format_text');
              var HtmlControl = document.getElementById('format_html');
              if(value.checked)
              {
                    TextControl.style.display = 'none';
                    HtmlControl.style.display = 'block';
              }
              else
              {
                    TextControl.style.display = 'block';
                    HtmlControl.style.display = 'none';
              }
                //alert('here from '+ value + 'element is ' + element);
          }
</script>

{/literal}
  <div id="content" class="setdiv">
    <div id="full-contentdiv">
        <div class="righttop">
            <h2 align="center">
                
                {if $IsEdit neq ''}
                    Edit Canned Email
                    {assign var="action" value="update"}
                {else}
                    Create/Send Newsletter
                    {assign var="action" value="insert"}
                {/if}
            </h2>
        </div>
        <div class="whole-page clear">
           
           <form name="frmNewsLetter" id="frmNewsLetter" action="#" method="post">  
              
              <div class="borderless borderless-1">
                
            
              <table border="0" cellpadding="0" cellspacing="0" style="width:800px" align="center">
                    <tr>
                            <td colspan="2">
                                    <div class="horizontal-line">
                                    </div>
                            </td>
                    </tr>
                    
                    <tr>
                            
                            <td class="right-side-text-borderless space" style="width:250px !important" valign="top"><label>
                                Send To :
                            </label>
                            </td>
                            <td class="left-side-text-borderless">
                                <select id="groups[]" name="groups[]" multiple="" class="selectcss" style="width: 550px ! important;" >
                                                   <option value="A">Active users</option>
                                                    <option value="E">Expired users</option>
                                                    <option value="P">Pending users</option>
                                </select>            
                            </td>
                    </tr>
                    
                    <tr>
                            
                            <td class="right-side-text-borderless space" style="width:250px !important" valign="top"><label>
                                In :
                            </label>
                            </td>
                            <td class="left-side-text-borderless">
                                <select id="in_groups[]" name="in_groups[]" multiple="" class="selectcss" style="width: 550px ! important;" >
                                            <option value="0">All groups</option>
                                            <option value="2">members (Member users group)</option>
                                </select>            
                            </td>
                    </tr>
                    
                    <tr>
                            
                            <td class="right-side-text-borderless space" style="width:250px !important" valign="top"><label>
                                Subject :
                            </label>
                            </td>
                            <td class="left-side-text-borderless">
                                <input type="text" class="txtcss" id="txtSubject" name="txtSubject" style="width: 542px ! important;" value="">
                            </td>
                    </tr>
                    
                     <tr>
                            
                            <td class="right-side-text-borderless space" style="width:250px !important" valign="top"><label>
                                HTML Format :
                            </label>
                            </td>
                            <td class="left-side-text-borderless">
                                <input type="checkbox" class="chkcss" id="chkHTMLFormat" name="chkHTMLFormat" onclick="Change(this);">
                            </td>
                    </tr>
                    
                    <tr id="user_email_config" name="user_email_config">
                            <td class="right-side-text-borderless space" style="width:250px !important" valign="top" id=""><label>
                              Add unsubsciption link :
                            </label>
                            </td>
                            <td class="left-side-text-borderless">
                                <input type="checkbox" class="chkcss" id="chkUnsubscriptionLink" name="chkUnsubscriptionLink" value="">
                            </td>
                    </tr>
                    
                    <tr id="user_email_config" name="user_email_config">
                            <td class="right-side-text-borderless space" style="width:250px !important" valign="top" id=""><label>
                              Remember Message :
                            </label>
                            </td>
                            <td class="left-side-text-borderless">
                                <input type="checkbox" class="chkcss" id="chkRememberMsg" name="chkRememberMsg" value="">
                            </td>
                    </tr>

                    <tr id="user_email_config" name="user_email_config">
                            <td class="right-side-text-borderless space" style="width:250px !important" valign="top" id=""><label>
                              Message :
                            </label>
                            </td>
                            <td class="left-side-text-borderless">
                                <span id="format_text" style="display:block">
                                        <textarea id="txtMessage" name="txtMessage" class="txtareacss" style="width:546px"></textarea>
                                </span>
                                <span id="format_html" style="display:none">
                                        {assign var="page_content" value="<br/>"}
                                      {php}
                                              $content = $this->get_template_vars('page_content');
                                               
                                              $spaw1 = new SpawEditor("spaw1",$content);  
              
                                              $spaw1->show();
                  
                                     {/php}
                                </span>
                                
                            </td>
                    </tr>
                    
                    <tr>
                        <td colspan="2">
                             <div class="horizontal-line">
                                    </div>   
                        </td>
                    </tr>
                  
                    <tr>
                        <td class="buttontd" colspan="2" style="text-align:center">
                                <input type="submit" class="btncss" name="submit" {if $IsEdit eq 'yes'}value="Send Newsletter"{else}value="Send NewsLetter"{/if}>&nbsp;&nbsp;&nbsp;
                                <input type="reset" class="btncss" name="reset" value="Clear">
                         </td>
                    </tr>
                     <input  type="hidden" name="hdnTest" id="hdnTest" value="0">
              </table>
            
        </div>
           </form>
         {literal}
           <script language="JavaScript" type="text/javascript">
                //You should create the validator only after the definition of the HTML form
                  var frmvalidator  = new Validator("frmNewsLetter");

                  frmvalidator.EnableMsgsTogether();
                  //frmvalidator.EnableOnPageErrorDisplaySingleBox();
                  
                  frmvalidator.addValidation("txtSubject","req","Please enter Canned Email name.","document.getElementById('hdnTest').value==1");
                  frmvalidator.addValidation("txtSubject","maxlen=100",    "Maximum length for Canned Email name is 100 character.");
                  frmvalidator.addValidation("txtSubject","alnum_s","Enter only alphabetic/numeric characters in Canned Email name.");
                  /*
                  frmvalidator.addValidation("txtSenderName","req","Please enter Sender name.");
                  frmvalidator.addValidation("txtSenderName","maxlen=45",    "Maximum length for Sender name is 45 character.");
                  frmvalidator.addValidation("txtSenderName","alnum_s","Enter only alphabetic/numeric characters Sender name.");
                  
                  frmvalidator.addValidation("txtSenderEmail","req","Please enter Sender Email.");
                  frmvalidator.addValidation("txtSenderEmail","maxlen=45","Maximum length for Sender Email is 45 character.");
                  frmvalidator.addValidation("txtSenderEmail","email","Invalid Sender Email.");
                  
                 // frmvalidator.addValidation("dirlist","dontselect=''","Please select Email attachment.");
                    */
                  
                  /*
                  
                  frmvalidator.addValidation("txtFieldDescription","req","Please enter field description.");
                  frmvalidator.addValidation("txtFieldDescription","maxlen=100","Max length for field description is 100 character.");
                  
                  frmvalidator.addValidation("ddlSQLFieldType","dontselect=''","Please select  SQL field type.");
                  
                  
                  frmvalidator.addValidation("txtFieldSize","req","Please enter field size.");
                  frmvalidator.addValidation("txtFieldSize","maxlen=20",    "Max length for field name is 20 character.");
                  frmvalidator.addValidation("txtFieldSize","num","Enter only digits in field size.");
                  
                  
                  frmvalidator.addValidation("txtDefaultValue","req","Please enter field default value.");
                  
                  frmvalidator.addValidation("ddlDisplaySignup","dontselect=''","Please select display in signup form.");
                  
                  frmvalidator.addValidation("ddlDisplayProfile","dontselect=''","Please select display in profile form.");
                  
                  frmvalidator.addValidation("ddlValidateFunction","dontselect=''","Please select validate function.");
                  */
                  
           </script>
          {/literal}
    </div>
</div>
</div>
{$ADMIN_FOOTER}
Return current item: MembersGear