Location: PHPKode > projects > MembersGear > membersgear/templates/user_onetimeoffer.tpl
   <div style="margin: 0px auto; width: 400px;display:none;" id="ctl00_ContentPlaceHolder1_UpdateProgress1">
   <center>
          <table border="0" align="center"  cellspacing="0" cellpadding="0" id="ctl00_ContentPlaceHolder1_UpdatePanel1" style="width:100%;height:35px;">
           <tr>
                     <td>
                     <table border="0" align="center"  cellspacing="0" cellpadding="0" style="width:100%;">
                     <tr>
                     <td>
                        
                        <img src="{$ADMIN_IMAGE_DIR}/DBRestoreloader.gif" align="absmiddle"/> 
                        
                     </td>
                     <td align="left" style="padding-left:8px;">
                     <span class="Lable" id="ctl00_ContentPlaceHolder1_UpdatePanelProgressLoading1_lblmessage" style="font-size:12px"><b>&nbsp;&nbsp;Please wait while your request is being processed..</b></span>
                     </td>
                    </tr>
                   </table>            
                   </td>
           </tr>
           </table>            
   </center>
   </div>  
 <div id="formlayout"> 
 <div id="formlayout-top"></div>
  
            <div id="formlayout-bg">
           <div id="divonetimeoffer"> 
         
    <form name="frmvalidatorMember" id="frmvalidatorMember" method="post" action="user_onetimeoffer_product_subscribe.php">              

    
      
    <script language="javascript" type="text/javascript" src="{$WEB_URL}/js/functions.js"></script>
        <input type="hidden" name="hdn_userid" id="hdn_userid" value="{$userid}">
        {if $productlen gt "0"}
 
        <table  cellpadding="" cellspacing="0" align="center" id="tableonetimeoffer" style="">
                {if $msg neq ''}
                <tr>
                
                    <td colspan="2" class="succmsg">
                        {if $msg neq ''}{$msg}{/if}
                    </td>
                </tr>
                {/if}
                <tr>
                    <td colspan="2">
                        <h1> One Time Offer Signup</h1>
                    </td>
                </tr>
                <tr>
                <td class="right-side-text"><label>Membership Type <label class="star">*</label></label></label><div class="FieldLabelNote" ></div></td>
                <td class="left-side-text">
                {if $totalProducts eq 1}
                    
                                 
                                         <input type="radio" value="{$products[0].id}" id="{$products[0].id}" class="radioonetimeoffer"  style="display:none" name="products" checked> 
                                         <label for="{$products[0].id}"  class="lblonetimeoffer"><strong>{$products[0].name}&nbsp;{*(${$products[0].price|string_format:"%.2f"})*}</strong></label> 
                                         <br>
                                                
                            
                    {else}
                    
                    <table cellpadding="0" cellspacing="0" id="tableonetimeofferproduct">   
                        {section name=product loop=$products}
                                 <tr>
                                       <td id="tdrightonetimeoffer">   
                                         <input class="chkcss radioonetimeoffer" type="radio" value="{$products[$smarty.section.product.index].id}" id="{$products[$smarty.section.product.index].id}" name="products" {if $post.products eq $products[$smarty.section.product.index].id } checked
                                          {/if} onclick="checkAgreement(this.value)">  
                                       </td>
                                       <td id="tdleftonetimeoffer">  
                                         <label for="{$products[$smarty.section.product.index].id}"><strong>{$products[$smarty.section.product.index].name}&nbsp;{*(${$products[$smarty.section.product.index].price|string_format:"%.2f"})*}</strong></label> 
                                       </td>
                                 </tr>        
                             
                            {/section}
                     </table>       
                    {/if}                
                              
                </td>
                      
                      
              </tr>
         
                <tr>
                            <td class="right-side-text"><div id="agdisp" style="display:none"><label>Agreement <label class="star">*</label></label></div></td>
                              <td class="left-side-text tdonetimeofferagreement">
                               <div style="display:none;" id="agreement">
                                {php}
                                    $filename=PHYSICAL_DIR."/templates/agreement.html";
                                    if(file_exists($filename))
                                      $handle=fopen($filename, 'r') or die('can not open file to read file');
                                      while(!feof($handle))
                                      {
                                          if("\n"!=$handle || "\r\n"!=$handle)
                                            echo fgets($handle);
                                      }
                                      fclose($handle);
                                {/php}
                               </div>
                                     
                           </td>
                   </tr>      
              
                   <tr>
                            <td class="right-side-text">&nbsp;</td>
                              <td class="left-side-text onetimeofferchktd" style="">
                              <div id="dispAgree" style="display:none;">
                              <input type="radio" class="chkcss" value="Agree" checked name="agreements" id="agreements" style="">
                              <strong style="color:#000;">I Agree</strong>&nbsp;
                                    <input type="radio" class="chkcss" name="agreements" value="dotagree" id="agreements" style=""><strong style="color:#000;">Don't Agree</strong>
                              </div>
                              
                           </td>
                   </tr>      
              
                        
             <tr>  
              <td  class="right-side-text">&nbsp;</td>   
              <td class="buttontd btnonetimetd">
                           {if $productlen>0}<input class="normal-button" type="submit" id="submit"   name="submit" value="Subscribe">{/if}
                      
              </td>
            </tr>  
              
 </table>
 {else}
<table  cellpadding="5" cellspacing="0" align="center" id="tableonetimeoffer" style="" > 
              <tr>
                
                    <td class="" align="center" colspan="2"><span><a href='./user_login.php'>{if $accessmsg neq ''}This is one time offer product so you don't have permission to directly access this product's signup page.{else}You are successfully signup for selected product click here to continue.{/if}</a></span></td> 
                
             </tr>
              <tr>
                
                 <td class="left-side-text" style="text-align:center !important;" colspan="2">
                      {*<input class="btncss" type="button" id="Go" name="Go" value="Go" onclick="location.href='./user_login.php';">}
                      {*<input class="btncss" type="button" id="Cancel" name="Cancel" value="Cancel" onclick="location.href='./user_edit_profile.php';">*}
                 </td>
                 
               </tr>       
            </table>
  {/if}
  


 </form>   

</div>                                 
        </div>
        <div id="formlayout-bottom"></div>        
                  
</div>    
 {literal} 
   <script language="JavaScript" type="text/javascript">
      var $j = jQuery.noConflict();  
      var productsLen='{/literal}{$productlen}{literal}'; 
           
     if(productsLen>0)
     {
      //  alert(productsLen);
        var frmvalidatorMember  = new Validator("frmvalidatorMember");
       frmvalidatorMember.EnableMsgsTogether();
       frmvalidatorMember.addValidation("products","selone_radio","Please select product.");  
     }
    function checkAgreement(product)
     {
     
     
               document.getElementById('agreements').checked = false;

               var dataString = 'products='+ product;
               var products=product;
               
               var web_url='{/literal}{$WEB_URL}{literal}';    
               $j.ajax({
                   type: "POST",
                   url: web_url+"/includes/agreementavailableMember_one_time_offer.php",
                   datatype: 'html',
                   data: dataString,
                   success: function(msg)
                   {
                       var filtermsg=ltrim(rtrim(msg));
                       
                       if(filtermsg=='yes')
                        {
                         
                               $j('#agreement').show(); 
                               $j('#agdisp').show(); 
                               $j('#dispAgree').show(); 
                               frmvalidatorMember.addValidation("agreements","shouldselchk=Agree","Please read the agreement and click on I Agree.");   
                        
                        
                        } 
                      else if(filtermsg=='no')
                       {
                               document.getElementById('agreements').checked=true;
                               
                               $j('#agreement').hide(); 
                               $j('#agdisp').hide(); 
                               $j('#dispAgree').hide(); 
                               


                       
                       }   
                     
                  }
             
             
               });  
                        
                 
                 
               
       }   
        
        
         $j(document).ajaxStart($j.blockUI).ajaxStop($j.unblockUI);           

               
       function EnabledDisableForm(pFormName, ElementsToExclude)
            {
                          var mySplitResult = ElementsToExclude.split(","); 
                          var frm=document.getElementById(pFormName);
                           for (i=0; i<frm.length; i++)
                            {            
                                        doc = frm.elements[i]; 
                                        var type = doc.type;
                                        for(j = 0; j < mySplitResult.length; j++){
                                            if(mySplitResult[j]==type)
                                            {
                                                 doc.disabled=true;
                                                 if(mySplitResult[j]=="button" || mySplitResult[j]=="submit")
                                                  {
                                                     doc.className='btndisabled';
                                                  }                                   
                                               }
                                        }
                                 
                                  }
                                  
                           return true;               
                       
            }            
            
     </script>          
 {/literal}                
Return current item: MembersGear