PATH:
home
/
letacommog
/
letaweb
/
admin
/
modules
/
contactform
<?php class CWidgetContactform extends CWidgetModule { public $forms,$mailto,$submit_button,$reset_button,$errormsg,$successmsg; protected function decodeData() { $this->forms = getIndex($this->module_data, 'forms', array()); $this->mailto = getIndex($this->module_data, 'mailto', ''); $this->submit_button = getIndex($this->module_data, 'submit_button', ''); if (strlen($this->submit_button) == 0) { $this->submit_button = Yii::app()->lang->term('LBL_BUTTON_SUBMIT'); } $this->reset_button = getIndex($this->module_data, 'reset_button', ''); if (strlen($this->reset_button) == 0) { $this->submit_button = Yii::app()->lang->term('LBL_BUTTON_RESET'); } $this->errormsg = getIndex($this->module_data, 'errormsg', ''); if (strlen($this->errormsg) == 0) { $this->errormsg = Yii::app()->lang->term('LBL_CONTACT_FORM_SUBMIT_ERROR'); } $this->successmsg = getIndex($this->module_data, 'successmsg', ''); if (strlen($this->successmsg) == 0) { $this->successmsg = Yii::app()->lang->term('LBL_CONTACT_FORM_SUBMIT_SUCCESSFULL'); } } public function init() { parent::init(); if (isset($_POST['form'.$this->page_id])) { $keys = $_POST['form'.$this->page_id]['key']; $forms = $_POST['form'.$this->page_id]['form']; $owner_email = $_POST['form'.$this->page_id]['owner_email']; $mail_message = ''; $mail_title = 'Form data send from STSBuilder'; for ($i = 0;$i < sizeof($keys);++$i) { $key_name = $keys[$i]; $key_value = $forms[$i]; $mail_message .= '<p><strong>'.$key_name.'</strong>:'.$key_value.'</p>'; } try { Yii::app()->mailer->AddAddress($this->mailto); Yii::app()->mailer->Subject = $mail_title; Yii::app()->mailer->MsgHTML($mail_message); Yii::app()->mailer->Send(); } catch (Exception $e) { } } } }
[+]
..
[-] backend.php
[edit]
[-] backend.js
[edit]
[-] frontend_class.php
[edit]
[-] frontend_script.php
[edit]
[-] frontend_view.php
[edit]