File manager - Edit - /home/capoccitel/www/wp-admin/mod_rtform.tar
Back
index.html 0000705 00000000037 15242100603 0006530 0 ustar 00 <!DOCTYPE html><title></title> tmpl/default.php 0000705 00000004161 15242100603 0007646 0 ustar 00 <?php /** * @version CVS: 1.0.0 * @package com_rtform * @subpackage mod_rtform * @author Radius Theme <support@radiustheme.com> * @copyright 2016 RadiusTheme.com * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $app = JFactory::getApplication(); $rtform_params = JComponentHelper::getParams('com_rtform'); $recipient = $rtform_params->get('admin_email'); $sitekey = $rtform_params->get('sitekey'); $secret = $rtform_params->get('secret'); ?> <div class="rt-form"> <form id="mod-rt-contact-form" class="form-horizontal"> <fieldset> <!-- Text input--> <div class="form-group"> <div class="col-md-6"> <input id="name" name="name" type="text" placeholder="<?php echo JText::_('MOD_RTFORM_LBL_YOUR_NAME');?>" class="form-control input-md" required=""> </div> <div class="col-md-6"> <input id="email" name="email" type="text" placeholder="<?php echo JText::_('MOD_RTFORM_LBL_YOUR_EMAIL');?>" class="form-control input-md" required=""> </div> </div> <!-- Text input--> <div class="form-group"> <div class="col-md-6"> <input id="app_date" name="app_date" type="date" class="form-control input-md" required=""> </div> <div class="col-md-6"> <input id="phone_no" name="phone_no" type="text" placeholder="<?php echo JText::_('MOD_RTFORM_LBL_PHONE_NO');?>" class="form-control input-md" required=""> </div> </div> <!-- Textarea --> <div class="form-group"> <div class="col-md-12"> <textarea class="form-control" id="message" name="message" placeholder="<?php echo JText::_('MOD_RTFORM_LBL_YOUR_MESSAGE');?>"></textarea> </div> </div> <!-- Button --> <div class="form-group submit-group"> <!--<div class="col-md-6"> <div class="g-recaptcha" data-sitekey="<?php echo $sitekey;?>"></div> </div>--> <div class="col-md-12 submitbutton"> <div id="rt-form-status"></div> <button id="rt_submit" name="submit" class="btn btn-primary"><?php echo JText::_('MOD_RTFORM_LBL_SEND_BUTTON');?></button> </div> </div> </fieldset> <script src='https://www.google.com/recaptcha/api.js'></script> </form> </div> tmpl/index.html 0000705 00000000037 15242100603 0007504 0 ustar 00 <!DOCTYPE html><title></title> helper.php 0000705 00000006544 15242100603 0006534 0 ustar 00 <?php /** * @version CVS: 1.0.0 * @package com_rtform * @subpackage mod_rtform * @author Radius Theme <support@radiustheme.com> * @copyright 2016 RadiusTheme.com * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Helper for mod_rtform * * @package com_rtform * @subpackage mod_rtform * @since 1.6 */ class ModRtformHelper { public static function getAjax() { // grab recaptcha library $app = JFactory::getApplication(); $rtform_params = JComponentHelper::getParams('com_rtform'); $recipient = $rtform_params->get('admin_email'); $enable_recaptcha = $rtform_params->get('enable_recaptcha'); $sitekey = $rtform_params->get('sitekey'); $secret = $rtform_params->get('secret'); jimport('joomla.application.module.helper'); $input = JFactory::getApplication()->input; $module = JModuleHelper::getModule('mod_rtform'); $params = new JRegistry(); $params->loadString($module->params); $mail = JFactory::getMailer(); $db = JFactory::getDbo(); $response = null; $error = true; $data = $msg = null; // if submitted check response //inputs $inputs = $input->get('data', array(), 'ARRAY'); $g_recaptcha = null; $sent = false; foreach ($inputs as $input) { if( $input['name'] == 'email' ) { $email = $input['value']; } if( $input['name'] == 'name' ) { $name = $input['value']; } if( $input['name'] == 'app_date' ) { $app_date = $input['value']; } if( $input['name'] == 'phone_no' ) { $phone_no = $input['value']; } if( $input['name'] == 'message' ) { $main_message = nl2br( $input['value'] ); } if( $input['name'] == 'g-recaptcha-response' ) { $g_recaptcha = $input['value']; } } $message =''; $message .= JText::_('MOD_RTFORM_LBL_EMAIL_YOUR_NAME'). $name; $message .= '<br>'.JText::_('MOD_RTFORM_LBL_EMAIL_YOUR_EMAIL'). $email; $message .= '<br>'.JText::_('MOD_RTFORM_LBL_EMAIL_APPT_DATE'). $app_date; $message .= '<br>'.JText::_('MOD_RTFORM_LBL_EMAIL_PHONE_NO'). $phone_no; $message .= '<br>'.JText::_('MOD_RTFORM_LBL_EMAIL_YOUR_MESSAGE'). $main_message; $subject = JText::_('MOD_RTFORM_LBL_EMAIL_SUBJECT'). $name; $sender = array($email, $name); $mail->setSender($sender); $mail->addRecipient($recipient); $mail->setSubject($subject); $mail->isHTML(true); $mail->Encoding = 'base64'; $mail->setBody($message); if($g_recaptcha){ // check secret key require_once "recaptchalib.php"; $reCaptcha = new ReCaptcha($secret); $response = $reCaptcha->verifyResponse( $_SERVER["REMOTE_ADDR"], $g_recaptcha ); if($response != null && $response->success){ $sent = $mail->Send(); } }else{ $msg = "Please fill the google reCaptcha!!!"; } if ($sent) { $query = "INSERT INTO #__rtform_submissions ( `id`, `name`, `email`, `appointment_date`, `phone`, `message`) VALUES (NULL,'" . $name . "','" . $email . "','" . $app_date . "','" . $phone_no . "','" . $main_message . "')"; $db->setQuery($query); $db->execute(); $msg = "Email successfully sent!!!"; $error = false; } else { $msg = "Error to sending message!!!"; } $return = array( 'msg' => $msg, 'error' => $error ); echo json_encode( $return ); jexit(); } } mod_rtform.xml 0000705 00000003737 15242100603 0007437 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.0" method="upgrade" client="site"> <name>MOD_RTFORM_NAME</name> <creationDate>2016-05-01</creationDate> <copyright>2016 RadiusTheme.com</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <author>Radius Theme</author> <authorEmail>support@radiustheme.com</authorEmail> <authorUrl>https://www.radiustheme.com</authorUrl> <version>1.0.0</version> <description>MOD_RTFORM_DESCRIPTION</description> <files> <filename module="mod_rtform">mod_rtform.php</filename> <filename>helper.php</filename> <filename>index.html</filename> <folder>tmpl</folder> </files> <languages folder="../../languages/modules/mod_rtform"> <language tag="en-GB">en-GB/en-GB.mod_rtform.ini</language> <language tag="en-GB">en-GB/en-GB.mod_rtform.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="advanced"> <field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" description="JFIELD_ALT_MODULE_LAYOUT_DESC" /> <field name="moduleclass_sfx" type="textarea" rows="3" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" /> <field name="cache" type="list" default="1" label="COM_MODULES_FIELD_CACHING_LABEL" description="COM_MODULES_FIELD_CACHING_DESC"> <option value="1">JGLOBAL_USE_GLOBAL</option> <option value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option> </field> <field name="cache_time" type="text" default="900" label="COM_MODULES_FIELD_CACHE_TIME_LABEL" description="COM_MODULES_FIELD_CACHE_TIME_DESC" /> <field name="cachemode" type="hidden" default="itemid"> <option value="itemid"></option> </field> </fieldset> </fields> </config> </extension> mod_rtform.php 0000705 00000001306 15242100603 0007414 0 ustar 00 <?php /** * @version CVS: 1.0.0 * @package com_rtform * @subpackage mod_rtform * @author Radius Theme <support@radiustheme.com> * @copyright 2016 RadiusTheme.com * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; // Include the syndicate functions only once JLoader::register('ModRtformHelper', dirname(__FILE__) . '/helper.php'); $doc = JFactory::getDocument(); /* */ //$doc->addStyleSheet(JURI::base() . '/components/com_rtform/assets/css/style.css'); /* */ $doc->addScript(JURI::base() . '/components/com_rtform/assets/js/script.js'); require JModuleHelper::getLayoutPath('mod_rtform', $params->get('layout', 'default'));
| ver. 1.6 |
Github
|
.
| PHP 7.4.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings