AAAAcustom_event_switch.ctp000066600000007761151374453460011403 0ustar00
Custom Event Switcher
Header(array('settings' => 'Settings', 'help' => 'Help'), 'custom_event_switch_config_{n}'); ?> tabStart('settings'); ?>

input('action_custom_event_switch_{n}_events_config', array('type' => 'text', 'label' => 'Events list', 'class' => 'big_input', 'smalldesc' => 'Comma separated list of events, no spaces.')); ?> input('action_custom_event_switch_{n}_content1_config', array('type' => 'textarea', 'label' => "Code", 'rows' => 20, 'cols' => 70, 'smalldesc' => 'The code here should return the deisred event name to be processed as a string.')); ?> tabEnd(); ?> tabStart('help'); ?>

tabEnd(); ?>
index.html000066600000000035151374453460006557 0ustar00 custom_event_switch.php000066600000001660151374453460011374 0ustar00 0, 'fail' => 0); var $group = array('id' => '1_validation', 'title' => 'Validation'); var $details = array('title' => 'Custom Event Switcher', 'tooltip' => 'Run PHP code and switch the execution path based on the result.'); function run($form, $actiondata){ $code = $actiondata->content1; $return = eval('?>'.$code); $this->events[$return] = 1; } function load($clear){ if($clear){ $action_params = array( 'content1' => '', 'events' => 'success,fail', ); } return array('action_params' => $action_params); } } ?>.htaccess000066600000000177151374453460006367 0ustar00 Order allow,deny Deny from all