AAAAemail_verification_sender.php000066600000003650151375011710012457 0ustar00 '1_validation', 'title' => 'Validation'); var $details = array('title' => 'Email Verification', 'tooltip' => 'Sends the email and saves the data into DB.'); function run($form, $actiondata){ $mainframe = JFactory::getApplication(); $uri = JFactory::getURI(); $params = new JParameter($actiondata->params); //save the data to db $db_save_details = $actiondata; $db_save_details->type = 'db_save'; $db_save_Params = new JParameter(''); $db_save_Params->set('table_name', $params->get('table_name')); $db_save_details->params = $db_save_Params->toString(); $form->data[trim($params->get('verify_field', 'verify'))] = md5(uniqid(rand(), true)); $form->data[trim($params->get('verification_status_field', 'verified'))] = 0; if(trim($params->get('files_array_field', ''))){ $form->data[trim($params->get('files_array_field'))] = var_export($form->files, true); } $form->runAction($db_save_details); //add the verification link value to the data array $form->data['verification_link'] = $params->get('verification_link_path', $uri->root().'index.php?option=com_chronoforms&chronoform='.$form->form_name); $form->data['verification_link'] .= '&action=verify&hash='.$form->data[trim($params->get('verify_field', 'verify'))]; } function load($clear){ if($clear){ $action_params = array( 'table_name' => '', 'verify_field' => '', 'verification_status_field' => '', 'files_array_field' => '', 'verification_link_path' => '' ); } return array('action_params' => $action_params); } } ?>email_verification_sender.ctp000066600000011303151375011710012450 0ustar00
Email Verification Sender
Header(array('settings' => 'Settings', 'help' => 'Help'), 'email_verification_sender_config_{n}'); ?> tabStart('settings'); ?> getTableList(); $options = array(); foreach($tables as $table){ $options[$table] = $table; } ?> input('action_email_verification_sender_{n}_table_name_config', array('type' => 'select', 'label' => 'Table', 'options' => $options, 'empty' => " - ", 'class' => 'medium_input', 'smalldesc' => 'The table to which the form data will be stored, form fields names should match the table columns names.')); ?> input('action_email_verification_sender_{n}_verify_field_config', array('type' => 'text', 'label' => "Verification code field name", 'class' => 'medium_input', 'smalldesc' => 'The field name at which the verification code will be stored.')); ?> input('action_email_verification_sender_{n}_verification_status_field_config', array('type' => 'text', 'label' => "Verification status field name", 'class' => 'medium_input', 'smalldesc' => 'The field name at which the verification status (0 or 1) will be stored. (a TINYINT(1) field is perfect)')); ?> input('action_email_verification_sender_{n}_files_array_field_config', array('type' => 'text', 'label' => "Files array field name", 'class' => 'medium_input', 'smalldesc' => 'The field name at which the form files array is going to be saved, this is necessary only if your form is uploading some files, should be of type TEXT')); ?> input('action_email_verification_sender_{n}_verification_link_path_config', array('type' => 'text', 'label' => "Verification link path", 'class' => 'big_input', 'value' => '', 'smalldesc' => 'The verification link path, this is typically the link to your form event which has the "Email verification response" action.')); ?> tabEnd(); ?> tabStart('help'); ?>

tabEnd(); ?>
.htaccess000066600000000177151375011710006354 0ustar00 Order allow,deny Deny from all index.html000066600000000035151375011710006544 0ustar00