www.archline.hu — clean post-compromise baseline #2
@ -0,0 +1,4 @@
|
||||
<html>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,24 @@
|
||||
/*
|
||||
# mod_sp_quickcontact - Ajax based quick contact Module by JoomShaper.com
|
||||
# -----------------------------------------------------------------------
|
||||
# Author JoomShaper http://www.joomshaper.com
|
||||
# Copyright (C) 2010 - 2014 JoomShaper.com. All Rights Reserved.
|
||||
# License - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Websites: http://www.joomshaper.com
|
||||
*/
|
||||
|
||||
textarea#message{width:150px;height:80px}
|
||||
p.sp_qc_loading {
|
||||
background: url(../images/ajax-loader.gif) no-repeat 0 50%;
|
||||
padding: 0;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
float: left;
|
||||
display: inline-block;
|
||||
margin: 5px 10px 0 0;
|
||||
}
|
||||
p.sp_qc_warn{color:red}
|
||||
p.sp_qc_success {color:green; font-weight: bold}
|
||||
.sp_qc_error{border:1px solid #e20000}
|
||||
.sp_qc_error:focus{border:1px solid red}
|
||||
.sp_qc_clr{clear:both;margin-bottom:10px}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 771 B |
@ -0,0 +1,4 @@
|
||||
<html>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,4 @@
|
||||
<html>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,4 @@
|
||||
<html>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,38 @@
|
||||
/*
|
||||
# mod_sp_quickcontact - Ajax based quick contact Module by JoomShaper.com
|
||||
# -----------------------------------------------------------------------
|
||||
# Author JoomShaper http://www.joomshaper.com
|
||||
# Copyright (C) 2010 - 2014 JoomShaper.com. All Rights Reserved.
|
||||
# License - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Websites: http://www.joomshaper.com
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#sp-quickcontact-form').submit(function() {
|
||||
var value = $(this).serializeArray(),
|
||||
request = {
|
||||
'option' : 'com_ajax',
|
||||
'module' : 'sp_quickcontact',
|
||||
'data' : value,
|
||||
'format' : 'jsonp'
|
||||
};
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
data : request,
|
||||
beforeSend: function(){
|
||||
$('#sp_qc_submit').before('<p class="sp_qc_loading"></p>');
|
||||
},
|
||||
success: function (response) {
|
||||
$('#sp_qc_status').hide().html(response).fadeIn().delay(2000).fadeOut(500);
|
||||
$('.sp_qc_loading').fadeOut(function(){
|
||||
$(this).remove();
|
||||
});
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
})(jQuery);
|
||||
@ -0,0 +1,86 @@
|
||||
<?php
|
||||
/*
|
||||
# mod_sp_quickcontact - Ajax based quick contact Module by JoomShaper.com
|
||||
# -----------------------------------------------------------------------
|
||||
# Author JoomShaper http://www.joomshaper.com
|
||||
# Copyright (C) 2010 - 2014 JoomShaper.com. All Rights Reserved.
|
||||
# License - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Websites: http://www.joomshaper.com
|
||||
*/
|
||||
|
||||
class modSpQuickcontactHelper
|
||||
{
|
||||
public static function getAjax()
|
||||
{
|
||||
jimport('joomla.application.module.helper');
|
||||
$input = JFactory::getApplication()->input;
|
||||
$module = JModuleHelper::getModule('sp_quickcontact');
|
||||
$params = new JRegistry();
|
||||
$params->loadString($module->params);
|
||||
|
||||
$mail = JFactory::getMailer();
|
||||
|
||||
$success = $params->get('success');
|
||||
$failed = $params->get('failed');
|
||||
$recipient = $params->get('email');
|
||||
$failed_captcha = $params->get('failed_captcha');
|
||||
|
||||
$formcaptcha = $params->get('formcaptcha', 1);
|
||||
$captcha_question = $params->get('captcha_question');
|
||||
$captcha_answer = $params->get('captcha_answer');
|
||||
|
||||
//inputs
|
||||
$inputs = $input->get('data', array(), 'ARRAY');
|
||||
|
||||
foreach ($inputs as $input) {
|
||||
|
||||
if( $input['name'] == 'email' )
|
||||
{
|
||||
$email = $input['value'];
|
||||
}
|
||||
|
||||
if( $input['name'] == 'name' )
|
||||
{
|
||||
$name = $input['value'];
|
||||
}
|
||||
|
||||
if( $input['name'] == 'subject' )
|
||||
{
|
||||
$subject = $input['value'];
|
||||
}
|
||||
|
||||
if( $input['name'] == 'message' )
|
||||
{
|
||||
$message = nl2br( $input['value'] );
|
||||
}
|
||||
|
||||
if($formcaptcha) {
|
||||
if( $input['name'] == 'sccaptcha' )
|
||||
{
|
||||
$sccaptcha = $input['value'];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if($formcaptcha) {
|
||||
if ($sccaptcha != $captcha_answer) {
|
||||
return '<p class="sp_qc_warn">' . $failed_captcha . '</p>';
|
||||
}
|
||||
}
|
||||
|
||||
$sender = array($email, $name);
|
||||
$mail->setSender($sender);
|
||||
$mail->addRecipient($recipient);
|
||||
$mail->setSubject($subject);
|
||||
$mail->isHTML(true);
|
||||
$mail->Encoding = 'base64';
|
||||
$mail->setBody($message);
|
||||
|
||||
if ($mail->Send()) {
|
||||
return '<p class="sp_qc_success">' . $success . '</p>';
|
||||
} else {
|
||||
return '<p class="sp_qc_warn">' . $failed . '</p>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
<html>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1 @@
|
||||
ADMIN_EMAIL="Admin Email"
ADMIN_EMAIL_DESC="Please enter your wmail id."
NAME="Name..."
EMAIL="Email..."
SUBJECT="Subject..."
MESSAGE="Message..."
SEND_MESSAGE="Send Message"
WAIT_TEXT="Please wait..."
FAILED_TEXT="Email not sent!"
ERR_MSG="All highlighted fields are required."
EMAIL_WARN="Please enter a valid Email."
SUCCESS_NOTICE="Notice Sendmail Success"
FAILED_NOTICE="Notice Sendmail Failed"
CAPTCHA="Enable Captcha"
CAPTCHA_DESC="Enable captcha in order to get protected from SPAM."
CAPTCHA_QUESTION="Captcha Question"
CAPTCHA_ANSWER="Captcha Answer"
WRONG_CAPTCHA="Wrong captcha warning text"
|
||||
@ -0,0 +1,4 @@
|
||||
<html>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
# mod_sp_quickcontact - Ajax based quick contact Module by JoomShaper.com
|
||||
# ------------------------------------------------------------------------
|
||||
# Author JoomShaper http://www.joomshaper.com
|
||||
# Copyright (C) 2010 - 2014 JoomShaper.com. All Rights Reserved.
|
||||
# License - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Websites: http://www.joomshaper.com
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
// Include the syndicate functions only once
|
||||
JHtml::_('jquery.framework');
|
||||
|
||||
$uniqid = $module->id;
|
||||
$name_text = JText::_('NAME');
|
||||
$email_text = JText::_('EMAIL');
|
||||
$subject_text = JText::_('SUBJECT');
|
||||
$msg_text = JText::_('MESSAGE');
|
||||
$send_msg = JText::_('SEND_MESSAGE');
|
||||
|
||||
$formcaptcha = $params->get('formcaptcha', 1);
|
||||
$captcha_question = $params->get('captcha_question');
|
||||
$captcha_answer = $params->get('captcha_answer');
|
||||
|
||||
$document = JFactory::getDocument();
|
||||
$document->addScript(JURI::base(true) . '/modules/mod_sp_quickcontact/assets/js/script.js');
|
||||
$document->addStylesheet(JURI::base(true) . '/modules/mod_sp_quickcontact/assets/css/style.css');
|
||||
|
||||
// Include the helper.
|
||||
require_once __DIR__ . '/helper.php';
|
||||
|
||||
require JModuleHelper::getLayoutPath('mod_sp_quickcontact', $params->get('layout', 'default'));
|
||||
@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="module" version="1.6.0" client="site" method="upgrade">
|
||||
<name>SP Quick Contact</name>
|
||||
<author>JoomShaper.com</author>
|
||||
<creationDate>Aug 2011</creationDate>
|
||||
<copyright>Copyright (C) 2010 - 2012 JoomShaper.com. All rights reserved.</copyright>
|
||||
<license>PHP files are licensed under GNU/GPL V2, CSS - JS - IMAGE files are Copyrighted material</license>
|
||||
<authorEmail>support@joomshaper.com</authorEmail>
|
||||
<authorUrl>www.joomshaper.com</authorUrl>
|
||||
<version>1.4</version>
|
||||
<description>SP Quick Contact - Ajax based Quick Contact Module for Joomla!</description>
|
||||
<languages>
|
||||
<language tag="en-GB">language/en-GB.mod_sp_quickcontact.ini</language>
|
||||
</languages>
|
||||
<files>
|
||||
<filename module="mod_sp_quickcontact">mod_sp_quickcontact.php</filename>
|
||||
<filename>helper.php</filename>
|
||||
<filename>index.html</filename>
|
||||
<folder>language</folder>
|
||||
<folder>tmpl</folder>
|
||||
<folder>assets</folder>
|
||||
</files>
|
||||
<config>
|
||||
<fields name="params">
|
||||
<fieldset name="Basic">
|
||||
<field name="email" type="text" default="" label="ADMIN_EMAIL" description="ADMIN_EMAIL_DESC" />
|
||||
<field name="success" type="text" default="Email was sent successfully." label="SUCCESS_NOTICE" description="SUCCESS_NOTICE" />
|
||||
<field name="failed" type="text" default="Email could not be sent." label="FAILED_NOTICE" description="FAILED_NOTICE" />
|
||||
<field name="formcaptcha" type="radio" class="btn-group" default="1" label="CAPTCHA" description="CAPTCHA_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field name="captcha_question" type="text" default="3 + 4 = ?" label="CAPTCHA_QUESTION" />
|
||||
<field name="captcha_answer" type="text" default="7" label="CAPTCHA_ANSWER" />
|
||||
<field name="failed_captcha" type="text" default="You have entered wrong captcha. Please try again." label="WRONG_CAPTCHA" />
|
||||
</fieldset>
|
||||
|
||||
<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>
|
||||
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/*
|
||||
# mod_sp_quickcontact - Ajax based quick contact Module by JoomShaper.com
|
||||
# -----------------------------------------------------------------------
|
||||
# Author JoomShaper http://www.joomshaper.com
|
||||
# Copyright (C) 2010 - 2014 JoomShaper.com. All Rights Reserved.
|
||||
# License - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Websites: http://www.joomshaper.com
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
?>
|
||||
<div id="sp_quickcontact<?php echo $uniqid ?>" class="sp_quickcontact">
|
||||
<div id="sp_qc_status"></div>
|
||||
<form id="sp-quickcontact-form">
|
||||
<div class="sp_qc_clr"></div>
|
||||
<input type="text" name="name" id="name" onfocus="if (this.value=='<?php echo $name_text ?>') this.value='';" onblur="if (this.value=='') this.value='<?php echo $name_text ?>';" value="<?php echo $name_text ?>" required />
|
||||
<div class="sp_qc_clr"></div>
|
||||
<input type="email" name="email" id="email" onfocus="if (this.value=='<?php echo $email_text ?>') this.value='';" onblur="if (this.value=='') this.value='<?php echo $email_text ?>';" value="<?php echo $email_text ?>" required />
|
||||
<div class="sp_qc_clr"></div>
|
||||
<input type="text" name="subject" id="subject" onfocus="if (this.value=='<?php echo $subject_text ?>') this.value='';" onblur="if (this.value=='') this.value='<?php echo $subject_text ?>';" value="<?php echo $subject_text ?>" />
|
||||
<div class="sp_qc_clr"></div>
|
||||
<textarea name="message" id="message" onfocus="if (this.value=='<?php echo $msg_text ?>') this.value='';" onblur="if (this.value=='') this.value='<?php echo $msg_text ?>';" cols="" rows=""><?php echo $msg_text ?></textarea>
|
||||
<div class="sp_qc_clr"></div>
|
||||
<?php if($formcaptcha) { ?>
|
||||
<input type="text" name="sccaptcha" placeholder="<?php echo $captcha_question ?>" required />
|
||||
<?php } ?>
|
||||
<div class="sp_qc_clr"></div>
|
||||
<input id="sp_qc_submit" class="button" type="submit" value="<?php echo $send_msg ?>" />
|
||||
<div class="sp_qc_clr"></div>
|
||||
</form>
|
||||
</div>
|
||||
@ -0,0 +1,4 @@
|
||||
<html>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue
Block a user