Initial commit.

This commit is contained in:
2026-03-10 21:25:26 +08:00
commit 78739bf725
3089 changed files with 472990 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
<?php
// File name: formreg.inc.php
// Description: PHP subroutine to handle form registry
// Date: 2006-11-14
// Author: imacat <imacat@pristine.com.tw>
// 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;
}
?>