80 |
|
|
81 |
#include("debug.inc"); |
#include("debug.inc"); |
82 |
|
|
|
function check_required() { |
|
|
global $inputs_required; |
|
|
global $inputs_required_type; |
|
|
$ok=1; |
|
|
if (isset($inputs_required)) { |
|
|
foreach ($inputs_required as $i) { |
|
|
if (! isset($GLOBALS[$i]) || $GLOBALS[$i] == "") $ok=0; |
|
|
switch (strtolower($inputs_required_type[$i])) { |
|
|
case 'email': |
|
|
if (!strstr($GLOBALS[$i],'@')) $ok=0; |
|
|
} |
|
|
# print "$i: $GLOBALS[$i] type: $inputs_required_type[$i] $ok --<br>\n "; |
|
|
|
|
|
} |
|
|
} else { |
|
|
print "<!-- no inputs required -->"; |
|
|
} |
|
|
return $ok; |
|
|
} |
|
|
|
|
83 |
?> |
?> |