PATH:
home
/
letacommog
/
letaweb
/
admin
/
widgets
/
modules
<?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) { } } } }
[+]
..
[-] CWidgetYoutube.php
[edit]
[-] CWidgetInfobanner.php
[edit]
[-] CWidgetTextimage.php
[edit]
[-] CWidgetShare_buttons.php
[edit]
[-] CWidgetIframe.php
[edit]
[-] CWidgetNewslist.php
[edit]
[-] CWidgetNewsdetail.php
[edit]
[+]
slick
[-] CWidgetNavbar.php
[edit]
[-] CWidgetAlert.php
[edit]
[-] CWidgetFacebookvideo.php
[edit]
[-] CWidgetSlick.php
[edit]
[-] CWidgetTitle.php
[edit]
[-] CWidgetGallery.php
[edit]
[-] CWidgetSocial_buttons.php
[edit]
[-] CWidgetFacebookpage.php
[edit]
[+]
accordion
[-] CWidgetContactform.php
[edit]
[-] CWidgetButton.php
[edit]
[-] CWidgetProgress_bar.php
[edit]
[-] CWidgettestmodule.php
[edit]
[-] CWidgetStatcounter.php
[edit]
[-] CWidgetEmbed.php
[edit]
[-] CWidgetFacebooksend.php
[edit]
[-] CWidgetRecentnews.php
[edit]
[-] CWidgetIcon.php
[edit]
[-] CWidgetNewscomment.php
[edit]
[-] CWidgetFacebookcomment.php
[edit]
[-] CWidgetIhover.php
[edit]
[-] CWidgetMenu.php
[edit]
[+]
tab
[-] CWidgetSpacer.php
[edit]
[-] CWidgetBox.php
[edit]
[-] CWidgetHtml.php
[edit]
[-] CWidgetImage.php
[edit]
[-] CWidgetAudio_player.php
[edit]
[-] CWidgetCountdown.php
[edit]
[-] CWidgetTypedtext.php
[edit]
[-] CWidgetCarousel.php
[edit]
[-] CWidgetText.php
[edit]
[-] CWidgetVideo.php
[edit]
[-] CWidgetFacebookpost.php
[edit]
[-] CWidgetRssfeed.php
[edit]
[-] CWidgetInfobox.php
[edit]
[-] CWidgetInfotable.php
[edit]
[-] CWidgetFancytext.php
[edit]
[-] CWidgetGooglemap.php
[edit]
[-] CWidgetSlideshow.php
[edit]
[-] CWidgetPricetable.php
[edit]
[-] CWidgetNewscategory.php
[edit]
[-] CWidgetLine.php
[edit]
[-] CWidgetModal.php
[edit]
[-] CWidgetMailchimp.php
[edit]
[-] CWidgetFacebooklike.php
[edit]