/[LeafOK_CVS]/fenglin/bbs/user_reg_check.inc.php
ViewVC logotype

Annotation of /fenglin/bbs/user_reg_check.inc.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Wed Apr 23 06:36:57 2025 UTC (10 months, 3 weeks ago) by sysadm
Branch: MAIN
Rename reg_check.inc.php to user_reg_check.inc.php

1 sysadm 1.1 <?php
2     function check_str($str)
3     {
4     $filename = "../conf/deny_reg.conf";
5     $contents = file_get_contents($filename);
6    
7     if ($contents == false)
8     {
9     echo ("Reversed words list not exist!\n");
10     return false;
11     }
12    
13     // Builds the reserved words array
14     $word_list = explode("\n", str_replace("\r\n", "\n", $contents));
15    
16     // Do the checking
17     foreach ($word_list as $reg_exp)
18     {
19     if ($reg_exp != "" && preg_match("/" . $reg_exp . "/i", $str))
20     {
21     return false;
22     }
23     }
24    
25     return true;
26     }
27     ?>

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1