// Copyright: Copyright (C) 2004-2007 Pristine Communications // Settings $_FORMREG = array(); // register_form: Register a form function register_form($form, $path) { global $_FORMREG; // The counter static $n = 0; // Define the form if (!defined($form)) { // Find the next index that is not used while (array_key_exists($n, $_FORMREG)) { $n++; } define($form, $n); } $_FORMREG[$n] = $path; return; } // get_registered_form: Get a registered form function get_registered_form($form) { global $_FORMREG; return array_key_exists($form, $_FORMREG)? $_FORMREG[$form]: null; } ?>