0byt3m1n1-V2
Path:
/
home
/
a
/
c
/
a
/
academiac
/
www
/
[
Home
]
File: custom_serverside_validation.php.tar
com_chronoforms/form_actions/custom_serverside_validation/custom_serverside_validation.php 0000604 00000001747 15140257423 0037534 0 ustar 00 home/academiac/www/administrator/components <?php /** * CHRONOFORMS version 4.0 * Copyright (c) 2006 - 2011 Chrono_Man, ChronoEngine.com. All rights reserved. * Author: Chrono_Man (ChronoEngine.com) * @license GNU/GPL * Visit http://www.ChronoEngine.com for regular updates and information. **/ defined('_JEXEC') or die('Restricted access'); class CfactionCustomServerSideValidation{ var $formname; var $formid; var $events = array('success' => 0, 'fail' => 0); var $group = array('id' => '1_validation', 'title' => 'Validation'); var $details = array('title' => 'Custom Server Side Validation', 'tooltip' => 'Run PHP code and switch the execution path based on the result.'); function run($form, $actiondata){ $code = $actiondata->content1; $return = eval('?>'.$code); if($return === false){ $this->events['fail'] = 1; }else{ $this->events['success'] = 1; } } function load($clear){ if($clear){ $action_params = array( 'content1' => '' ); } return array('action_params' => $action_params); } } ?>