-function REGISTER_FILL_MUST_CONSTANTS()
-{
- $result = SQL_QUERY("SELECT field_name, field_required FROM "._MYSQL_PREFIX."_must_register ORDER BY id", __FILE__, __LINE__);
- while(list($name, $required) = SQL_FETCHROW($result))
- {
- $value = "";
- if ($required == "Y") $value = "<FONT class=\\\"guest_failed\\\"> (*)</FONT>";
- $eval = "define('MUST_".strtoupper($name)."', \"".$value."\");";
- eval($eval);
- }
-
- // Free memory
- SQL_FREERESULT($result);
-
- // Also fill other constants
- define('MUST_GENDER', "<FONT class=\"guest_failed\"> (*)</FONT>");
- define('MUST_ADDY' , "<FONT class=\"guest_failed\"> (*)</FONT>");
- define('MUST_BIRTH' , "<FONT class=\"guest_failed\"> (*)</FONT>");
- define('MUST_MARKER', "<FONT class=\"guest_failed\"> (*)</FONT>");
-}
-//
-function REGISTER_CHECK_REQUIRED_FIELDS(&$array)
-{
- $ret = false;
- foreach ($array as $key => $value)
- {
- $result = SQL_QUERY("SELECT field_required FROM "._MYSQL_PREFIX."_must_register WHERE field_name='".$key."' LIMIT 1", __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1)
- {
- // "Must-line" found
- list($chk) = SQL_FETCHROW($result);
- SQL_FREERESULT($result);
-
+function ifRequiredRegisterFieldsAreSet (&$array) {
+ // By default all is fine
+ $ret = true;
+ foreach ($array as $key => $value) {
+ // Check all fields that must register
+ $result = SQL_QUERY("SELECT `id` FROM `{?_MYSQL_PREFIX?}_must_register` WHERE `field_name`='".$key."' AND `field_required`='Y' LIMIT 1",
+ __FUNCTION__, __LINE__);
+ if (SQL_NUMROWS($result) == 1) {