70 $this->CachedMultyFS =
get_package(
'cached_multy_fs' ,
'last' , __FILE__ );
71 $this->Mail =
get_package(
'mail' ,
'last' , __FILE__ );
72 $this->PackageSettings =
get_package_object(
'settings::package_settings' ,
'last' , __FILE__ );
73 $this->String =
get_package(
'string' ,
'last' , __FILE__ );
74 $this->SecurityUtilities =
get_package(
'security::security_utilities' ,
'last' , __FILE__ );
100 private function send_email( $Email )
104 $From = $this->PackageSettings->get_package_setting(
105 'gui::forms' ,
'last' ,
'cf_forms' ,
'from_email' ,
'no_answer@localhost'
108 $To = $this->PackageSettings->get_package_setting(
109 'gui::forms' ,
'last' ,
'cf_forms' ,
'to_email' ,
'admin@localhost'
112 $Subject = $this->PackageSettings->get_package_setting(
113 'gui::forms' ,
'last' ,
'cf_forms' ,
'subject' ,
'New message'
116 $this->Mail->send_email( $From , $To , $Subject , $Email );
118 catch( Exception $e )
146 $EmailFile = $Options->get_setting(
'email_template' );
148 $Email = $this->CachedMultyFS->get_template( __FILE__ ,
"$EmailFile.tpl" );
150 $Data = $this->SecurityUtilities->get_all_posted_data();
152 $Email = $this->String->print_record( $Email , $Data );
154 $this->send_email( $Email );
156 catch( Exception $e )
184 $FormFile = $Options->get_setting(
'form_template' );
186 $this->Output = $this->CachedMultyFS->get_template( __FILE__ ,
"$FormFile.tpl" );
188 catch( Exception $e )
222 return( $this->Output );
224 catch( Exception $e )
252 $ContextSet =
get_package(
'gui::context_set' ,
'last' , __FILE__ );
254 $ContextSet->add_context( dirname( __FILE__ ).
'/conf/cfcx_send_form' );
256 $ContextSet->execute( $Options , $this , __FILE__ );
258 catch( Exception $e )
290 $ContextSet =
get_package(
'gui::context_set' ,
'last' , __FILE__ );
292 $ContextSet->add_context( dirname( __FILE__ ).
'/conf/cfcx_draw_form' );
294 $ContextSet->execute( $Options , $this , __FILE__ );
296 return( $this->Output );
298 catch( Exception $e )