Location: PHPKode > projects > MembersGear > membersgear/includes/getemailtemplate.php
<?php

    require_once("../config/config.php");
    require_once INCLUDE_DIR."/users_class.php";
  
     if(isset($_POST))
     {
        
       if(isset($_POST['ddltmp'])) 
        {
           
             $a = (int)$_POST['ddltmp'];
             $lsValues = array();
             $users = new users_class();
             sleep(1);
             
            if($a==0)
                $a=-1;

            $query="SELECT * FROM ".TABLE_PREFIX."email_templates WHERE productid=0 and id=$a and status = 1 order by `name`";
          
            $laresult=$users->View($query);
            $result='';
            if(is_array($laresult) && sizeof($laresult))
            {
                $lscontent=$laresult[0]['email_message'];
                  $lsid=$laresult[0]['id'];
            }
            else
            {
               $lscontent='';
               $lsid=$laresult[0]['id']; 
            }   
             $result.='<textarea class="txtareacss" style="width:500px;" rows="20" cols="100" name="txtContent" id="txtContent">'.$lscontent.'</textarea>';    
             $result.= '<input type="hidden" name="hdn_tmp_id" id="hdn_tmp_id" value="'.$lsid.'">';
            
            echo $result; 
            
         }
                   
    }
    exit;  
?>
Return current item: MembersGear