AAAA.htaccess000066600000000177151376632670006373 0ustar00 Order allow,deny Deny from all index.html000066600000000035151376632670006563 0ustar00 data_to_session.ctp000066600000004034151376632670010457 0ustar00
Data To Session
input('action_data_to_session_{n}_namespace_config', array('type' => 'text', 'label' => 'Session Namespace', 'class' => 'medium_input', 'smalldesc' => 'The name space to load this session data from, may be useful if you have multiple data instances of the same form loaded in different session namespaces, leave empty if you dont know what is this.')); ?> input('action_data_to_session_{n}_key_config', array('type' => 'text', 'label' => 'Session Key', 'class' => 'medium_input', 'smalldesc' => 'Leave empty to set the key using the form name, but if you want to exchange data between multiple forms then you will need to set this to some constant.')); ?> input('action_data_to_session_{n}_merge_config', array('type' => 'select', 'label' => 'Merge data', 'options' => array(0 => 'No', 1 => 'Yes'), 'smalldesc' => 'Merge similar key data if the same key was found at the session ? if no then data will be overwritten.')); ?>
data_to_session.php000066600000003156151376632670010464 0ustar00 'data_operations', 'title' => 'Data/DB Operations'); var $details = array('title' => 'Data To Session', 'tooltip' => 'Save form data array into session.'); function run($form, $actiondata){ $params = new JParameter($actiondata->params); $mainframe = JFactory::getApplication(); $session = JFactory::getSession(); $session_ns = $params->get('namespace', ''); $session_key = $params->get('key', ''); if(empty($session_key)){ $session_key = $form->form_details->name; } if(empty($session_ns)){ $session_ns = 'default'; } if($session->has('_chronoform_data_'.$session_key, $session_ns)){ $stored = $session->get('_chronoform_data_'.$session_key, array(), $session_ns); if(!empty($stored) && is_array($stored) && (int)$params->get('merge', 0) == 1){ $session->set('_chronoform_data_'.$session_key, array_merge($stored, $form->data), $session_ns); }else{ $session->set('_chronoform_data_'.$session_key, $form->data, $session_ns); } }else{ $session->set('_chronoform_data_'.$session_key, $form->data, $session_ns); } } function load($clear){ if($clear){ $action_params = array( 'namespace' => '', 'key' => '', 'merge' => 0 ); } return array('action_params' => $action_params); } } ?>