ok can someone please help to look at the lines below and tell me what's wrong because I keep getting error on the lines

<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
if(!ereg('^[[:alnum:][ unct:][:blank:]]{1,64}$',$title) | | strpos($title,'|') | | strpos($title,"n"))
error('Invalid forum title','Please do not use control characters and stick to a maximum of 64 characters.');
if(!ereg('^[[:alnum:][ unct:][:blank:]]{0,200}$',$description) | | strpos($description,'|') | | strpos($description,"n"))
error('Invalid forum description','Please do not use control characters and stick to a maximum of 200 characters.');
[/code


here's the whole file
Code:
<?
function ubb_auth($username,$password) {

require('commonvars.php3');

$memberslist=fopen($ubbmembersdir.'memberslist.cgi','r');
while (!feof($memberslist)) {
list($nick,$number)=explode('|!!|',chop(fgets($memberslist,4096)));
if($username==$nick) {
$memberinfo=fopen($ubbmembersdir.$number.'.cgi','r');

if(($username==chop(fgets($memberinfo,4096)))&&($password==chop(fgets($memberinfo,4096)))) {
return(1);
}

fclose($memberinfo);
}
}
fclose($memberslist);

return(0);

}

function forumedit($username,$title,$description) {

require('commonvars.php3');

$forumInfo=readForums($ubbcgidir.'forums.cgi');
$userdata=af_read($userdatafile);

//first check parameters
$title=stripslashes($title);
$description=stripslashes($description);

if(!ereg('^[[:alnum:][   unct:][:blank:]]{1,64}$',$title) | | strpos($title,'|') | | strpos($title,"n")) 
error('Invalid forum title','Please do not use control characters and stick to a maximum of 64 characters.');
if(!ereg('^[[:alnum:][   unct:][:blank:]]{0,200}$',$description) | | strpos($description,'|') | | strpos($description,"n")) 
error('Invalid forum description','Please do not use control characters and stick to a maximum of 200 characters.');


if (!$userdata[$username]) {
//get a new forum number
reset($forumInfo);
while(list($forum_key,$forum_value)=each($forumInfo))
{
if ($forum_value[3]=='Off' && $forum_value[1]=='Forum '.$forum_key.' Name' && $forum_value[2]=='Forum '.$forum_key.' Description.')
break;
}

if (!$forum_key) {
//have to create new forum directory, entry etc
for($forum_key=1;$forum_key<=$maxForums;$forum_key++) {
if (!$forumInfo[$forum_key]) break;
}

if ($forum_key>$maxForums) error('Forums are full','Please wait a few days and then try to register again.');

// echo('Final: '.$forum_key);
}

//change memberInfo to reflect forum settings and update
$userdata[$username]=$forum_key;
af_write($userdatafile,$userdata);
}

//check for existence of directory
if(!file_exists($ubbdir.'Forum'.$userdata[$username])) {
//does not exist so create and chmod
$oldumask = umask(0);
mkdir($ubbdir.'Forum'.$forum_key,0777);
umask($oldumask);
}

$forumInfo[$userdata[$username]][0]=10; //category
$forumInfo[$userdata[$username]][1]=$title;
$forumInfo[$userdata[$username]][2]=$description;
$forumInfo[$userdata[$username]][3]='On';
$forumInfo[$userdata[$username]][4]='is not';
$forumInfo[$userdata[$username]][5]='is';
$forumInfo[$userdata[$username]][6]='allreg&allreg';
$forumInfo[$userdata[$username]][7]='';
$forumInfo[$userdata[$username]][8]=$userdata[$username];
$forumInfo[$userdata[$username]][9]='';
$forumInfo[$userdata[$username]][10]='ON';
$forumInfo[$userdata[$username]][11]='no';
$forumInfo[$userdata[$username]][12]='';
$forumInfo[$userdata[$username]][13]='';
$forumInfo[$userdata[$username]][14]=$userdata[$username];
while(strlen($forumInfo[$userdata[$username]][14])<6) $forumInfo[$userdata[$username]][14]='0'.$forumInfo[$userdata[$username]][14];
writeForums($ubbcgidir.'forums.cgi',$forumInfo);


$modsIn=fopen($ubbcgidir.'mods.file','r');
while (!feof($modsIn)) {
eval(fgets($modsIn,4096));
}
fclose($modsIn);
//writing...
$mod=str_replace('@','@',quotemeta($username));

${'Forum'.$userdata[$username].'Moderator'}=$mod.'| |^| | | |^| | | |^| |';
$modOut=fopen($ubbcgidir.'mods.file','w');

reset($forumInfo);
while(list($key,$value)=each($forumInfo)) {
if($key)
fputs($modOut,'$Forum'.$key.'Moderator = "'.${'Forum'.$key.'Moderator'}.'";'."n");
}
fputs($modOut,'1;');
fclose($modOut);
//
}


function forumdelete($username) {

require('commonvars.php3');
$forumInfo=readForums($ubbcgidir.'forums.cgi');
$userdata=af_read($userdatafile);

if(!$userdata[$username]) error('Invalid command','You have no forum to delete.');

if(file_exists($ubbdir.'Forum'.$userdata[$username])) {
cleardir($ubbdir.'Forum'.$userdata[$username]);
}
if(file_exists($ubbdir.'Forum'.$userdata[$username].'/HTML')) {
cleardir($ubbdir.'Forum'.$userdata[$username].'/HTML');
rmdir($ubbdir.'Forum'.$userdata[$username].'/HTML');
}
if(file_exists($ubbdir.'Forum'.$userdata[$username].'/ANNC')) {
cleardir($ubbdir.'Forum'.$userdata[$username].'/ANNC');
rmdir($ubbdir.'Forum'.$userdata[$username].'/ANNC');
}

$forumInfo[$userdata[$username]][0]='';
$forumInfo[$userdata[$username]][1]='Forum '.$userdata[$username].' Name';
$forumInfo[$userdata[$username]][2]='Forum '.$userdata[$username].' Description.';
$forumInfo[$userdata[$username]][3]='Off';
$forumInfo[$userdata[$username]][4]='is not';
$forumInfo[$userdata[$username]][5]='is';
$forumInfo[$userdata[$username]][6]='allreg&allreg';
$forumInfo[$userdata[$username]][7]='';
$forumInfo[$userdata[$username]][8]=$userdata[$username];
$forumInfo[$userdata[$username]][9]='';
$forumInfo[$userdata[$username]][10]='ON';
$forumInfo[$userdata[$username]][11]='no';
$forumInfo[$userdata[$username]][12]='';
$forumInfo[$userdata[$username]][13]='';
$forumInfo[$userdata[$username]][14]=$userdata[$username];
while(strlen($forumInfo[$userdata[$username]][14])<6) $forumInfo[$userdata[$username]][14]='0'.$forumInfo[$userdata[$username]][14];
writeForums($ubbcgidir.'forums.cgi',$forumInfo);

//change memberInfo to reflect forum settings and update
$userdata[$username]=0;
af_write($userdatafile,$userdata);
}
/////////////////////////

function readForums($forumfile) {
if(!$forumIn=fopen($forumfile,'r')) error('File access error');

while (!feof($forumIn)) {
$temp=explode('|',chop(fgets($forumIn,4096)));
$forumInfo[$temp[8]]=$temp;
}
fclose($forumIn);

/* while(list($forum_key,$forum_value)=each($forumInfo)) {
echo ("$forum_key $forum_value[1] $forum_value[2] $forum_value[3] $forum_value[8] $forum_value[14]<br>");
}*/

return ($forumInfo);
}

function writeForums($forumfile,$forumInfo) {
if (!$forumOut=fopen($forumfile,'w')) error('File access error');

reset($forumInfo);
while(list($forum_key,$forum_value)=each($forumInfo)) {
if(strpos($forum_value,"|")) error('Illegal entry detected');
if(strpos($forum_value,"n")) error('Illegal entry detected');
}
reset($forumInfo);
while(list($forum_key,$forum_value)=each($forumInfo)) {
fputs($forumOut,implode('|',$forum_value)."n");
}

fclose($forumOut);
}

function cleardir($dir) {
$handle=opendir($dir);
while ($file = readdir($handle)) {
if(filetype($dir.'/'.$file)=='file')
unlink($dir.'/'.$file);
}
}

//////
function af_write($file,$array) {
while(list($key,$value)=each($array)) {
$outarray[]=$key.'='.rawurlencode($value);
}
$out=implode('|',$outarray);

if (!$fp = fopen($file,'w')) jlafio_error('Error writing to '.$file);
fputs($fp,$out);
fclose($fp);
}

function af_read($file) {
if (!$fp = fopen($file,'r')) jlafio_error('Error reading '.$file);
$in=fread($fp,filesize($file));
fclose($fp);

$inarray=explode('|',$in);
while(list($key,$value)=each($inarray)) {
list($key2,$value2)=explode('=',$value);
$array[$key2]=rawurldecode($value2);
}

return $array;
}

function jlafio_error($msg) {
echo('jlafio [ERROR] - '.$msg);
exit();
}

function error($errhead, $errmsg) {
require('error.php3');
exit();
}

require('commonvars.php3');

if(!ubb_auth($username,$password)) error('Invalid username or password.','Please type in a valid username and password.');

if($action=='login') {
include('webmaster_index.php3');
exit();
}
elseif($action=='forumedit') {
if($delete) {
forumdelete($username);
include('webmaster_index.php3');
exit();
} else {
forumedit($username,$title,$description);
include('webmaster_index.php3');
exit();
}
}
?>

any help would be greatly apperciated!

[This message has been edited by LazyMonk (edited April 07, 2000).]

[This message has been edited by LazyMonk (edited April 07, 2000).]