diff --git a/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/assets/css/index.html b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/assets/css/index.html new file mode 100644 index 00000000..6bfc7988 --- /dev/null +++ b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/assets/css/index.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/assets/css/style.css b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/assets/css/style.css new file mode 100644 index 00000000..b39f3b8a --- /dev/null +++ b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/assets/css/style.css @@ -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} \ No newline at end of file diff --git a/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/assets/images/ajax-loader.gif b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/assets/images/ajax-loader.gif new file mode 100644 index 00000000..e846e1d6 Binary files /dev/null and b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/assets/images/ajax-loader.gif differ diff --git a/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/assets/images/index.html b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/assets/images/index.html new file mode 100644 index 00000000..6bfc7988 --- /dev/null +++ b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/assets/images/index.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/assets/index.html b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/assets/index.html new file mode 100644 index 00000000..6bfc7988 --- /dev/null +++ b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/assets/index.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/assets/js/index.html b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/assets/js/index.html new file mode 100644 index 00000000..6bfc7988 --- /dev/null +++ b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/assets/js/index.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/assets/js/script.js b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/assets/js/script.js new file mode 100644 index 00000000..1ffe0afb --- /dev/null +++ b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/assets/js/script.js @@ -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('

'); + }, + success: function (response) { + $('#sp_qc_status').hide().html(response).fadeIn().delay(2000).fadeOut(500); + $('.sp_qc_loading').fadeOut(function(){ + $(this).remove(); + }); + } + }); + return false; + }); + + }); +})(jQuery); \ No newline at end of file diff --git a/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/helper.php b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/helper.php new file mode 100644 index 00000000..38078bce --- /dev/null +++ b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/helper.php @@ -0,0 +1,86 @@ +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 '

' . $failed_captcha . '

'; + } + } + + $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 '

' . $success . '

'; + } else { + return '

' . $failed . '

'; + } + } +} \ No newline at end of file diff --git a/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/index.html b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/index.html new file mode 100644 index 00000000..6bfc7988 --- /dev/null +++ b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/index.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/language/en-GB.mod_sp_quickcontact.ini b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/language/en-GB.mod_sp_quickcontact.ini new file mode 100644 index 00000000..c37995f7 --- /dev/null +++ b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/language/en-GB.mod_sp_quickcontact.ini @@ -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" \ No newline at end of file diff --git a/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/language/index.html b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/language/index.html new file mode 100644 index 00000000..6bfc7988 --- /dev/null +++ b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/language/index.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/mod_sp_quickcontact.php b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/mod_sp_quickcontact.php new file mode 100644 index 00000000..a6978b7f --- /dev/null +++ b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/mod_sp_quickcontact.php @@ -0,0 +1,35 @@ +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')); \ No newline at end of file diff --git a/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/mod_sp_quickcontact.xml b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/mod_sp_quickcontact.xml new file mode 100644 index 00000000..4a12c814 --- /dev/null +++ b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/mod_sp_quickcontact.xml @@ -0,0 +1,52 @@ + + + SP Quick Contact + JoomShaper.com + Aug 2011 + Copyright (C) 2010 - 2012 JoomShaper.com. All rights reserved. + PHP files are licensed under GNU/GPL V2, CSS - JS - IMAGE files are Copyrighted material + support@joomshaper.com + www.joomshaper.com + 1.4 + SP Quick Contact - Ajax based Quick Contact Module for Joomla! + + language/en-GB.mod_sp_quickcontact.ini + + + mod_sp_quickcontact.php + helper.php + index.html + language + tmpl + assets + + + +
+ + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+
+
\ No newline at end of file diff --git a/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/tmpl/default.php b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/tmpl/default.php new file mode 100644 index 00000000..c24cf992 --- /dev/null +++ b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/tmpl/default.php @@ -0,0 +1,33 @@ + +
+
+
+
+ +
+ +
+ +
+ +
+ + + +
+ +
+
+
\ No newline at end of file diff --git a/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/tmpl/index.html b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/tmpl/index.html new file mode 100644 index 00000000..6bfc7988 --- /dev/null +++ b/deployed/mod_sp_quickcontact/modules/mod_sp_quickcontact/tmpl/index.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file