Hilfe....Warning: Cannot modify

pizz@king
Zitat:
Warning: Cannot modify header information - headers already sent by (output started at /home/family4u.de/www/w213/index.php:1) in /home Warning: Cannot modify /family4u.de/www/w213/acp/lib/functions.php on line 42


Einige user bei mir bekommen diese fehler angezeigt auf die haupseite des forum. Kann jemannd mir hilfen? Bin ratlos....danke!
Blacksoul
Dann wird irgendetwas vor zeile 42 ausgegeben...ohne quellcode schlecht nachvollziehbar^^

mfG
pizz@king
code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
<?php
/** use stripslashes on all array elements **/
function stripslashes_array(&$array) {
 reset($array);
 while(list($key,$val)=each($array)) {
  if(is_string($val)) $array[$key]=stripslashes($val);
  elseif(is_array($val)) $array[$key]=stripslashes_array($val);
 }
 return $array;
}


/** use wbb_trim on all array elements **/
function trim_array(&$array) {
 reset($array);
 while(list($key,$val)=each($array)) {
  if(is_array($val)) $array[$key]=trim_array($val);
  elseif(is_string($val)) $array[$key]=wbb_trim($val);  
 }
 return $array;
}


/** use intval on all array elements **/
function intval_array(&$array) {
 reset($array);
 while(list($key,$val)=each($array)) {
  if(is_array($val)) $array[$key]=intval_array($val);
  else $array[$key]=intval($val);
 }
 return $array;
}


/** setcookie function **/
function bbcookie($name, $value, $time) {
 global $cookiepath, $cookiedomain, $cookieprefix,  $_SERVER;
 
 if($_SERVER['SERVER_PORT']=="443") $ssl=1;
 else $ssl=0;
 
 setcookie($cookieprefix.$name, $value, $time, $cookiepath, $cookiedomain, $ssl);
}


/** sendmail function **/
function mailer($email,$subject,$text,$sender="",$other="") {
 global $frommail, $master_board_name, $smtp;
 if($smtp && ini_get("SMTP")!=$smtp) {
  @ini_set("SMTP",$smtp);
  $smtp="";
 }
 if($sender) return @mail($email,$subject,$text,"From: $sender".$other);
 else return @mail($email,$subject,$text,"From: $frommail".$other);
}


/** generate an a href tag **/
function makehreftag($url, $name, $target="") {
 return "<a href=\"".$url."\"".(($target!="") ? (" target=\"".$target."\"") : ("")).">".$name."</a>";
}


/** generate a img tag **/
function makeimgtag($path,$alt="",$usehtmlconverter=1) {
 if($alt!="" && $usehtmlconverter==1) $alt=htmlconverter($alt);
 
 $path = replaceImagefolder($path);
 
 return "<img src=\"$path\" border=\"0\" alt=\"".$alt."\" title=\"".$alt."\" />";
}

/** format an unix timestamp **/
function formatdate($timeformat,$timestamp,$replacetoday=0) {
 global $wbbuserdata, $lang;
 $summertime = date("I")*3600;
 $timestamp+=3600*intval($wbbuserdata['timezoneoffset'])+$summertime;
 if($replacetoday==1) {
  if(gmdate("Ymd",$timestamp)==gmdate("Ymd",time()+3600*intval($wbbuserdata['timezoneoffset'])+$summertime)) {
   return $lang->get("LANG_GLOBAL_TODAY");
  }
  elseif(gmdate("Ymd",$timestamp)==gmdate("Ymd",time()-86400+3600*intval($wbbuserdata['timezoneoffset'])+$summertime)) {
   return $lang->get("LANG_GLOBAL_YESTERDAY");
  }
 }
 
 return htmlconverter(gmdate($timeformat, $timestamp));
}


/** get the subboardlist of a boardid **/
function getSubboards($boardid) {
 global $boardcache, $session, $tpl, $permissioncache, $lang, $wbbuserdata;

 if (!isset($boardcache[$boardid])) return;
 
 $subboardbit="";
  
 while(list($key1,$val1)=each($boardcache[$boardid])) {
  while(list($key2,$boards)=each($val1)) {
   if(!isset($permissioncache[$boards['boardid']]['can_view_board']) || $permissioncache[$boards['boardid']]['can_view_board']==-1) $permissioncache[$boards['boardid']]['can_view_board']=$wbbuserdata['can_view_board'];
   if($boards['invisible']==2 || ($boards['invisible']==1 && !$permissioncache[$boards['boardid']]['can_view_board'])) continue;
   
   $boards['title']=getlangvar($boards['title'], $lang);
   
   eval ("\$subboardbit .= \"".$tpl->get("index_subboardbit")."\";");
   $subboardbit.=getSubboards($boards['boardid']);
  }
 }
 return $subboardbit;
}


/** make the boardlist for indexpage **/
function makeboardbit($boardid,$depth=1) {
 global $db, $style, $lang, $n, $tpl, $boardcache, $boardvisit, $visitcache, $permissioncache, $modcache, $wbbuserdata, $session, $hidecats, $index_depth, $show_subboards, $showlastposttitle, $dateformat, $timeformat, $showuseronlineinboard, $filename, $temp_boardid, $hide_modcell;

 if(!isset($boardcache[$boardid])) return;
 reset($boardcache[$boardid]);
 
 $boardbit=""; 
 while(list($key1,$val1)=each($boardcache[$boardid])) {
  while(list($key2,$boards)=each($val1)) {
   if(!isset($permissioncache[$boards['boardid']]['can_view_board']) || $permissioncache[$boards['boardid']]['can_view_board']==-1) $permissioncache[$boards['boardid']]['can_view_board']=$wbbuserdata['can_view_board'];
   if(!isset($permissioncache[$boards['boardid']]['can_enter_board']) || $permissioncache[$boards['boardid']]['can_enter_board']==-1) $permissioncache[$boards['boardid']]['can_enter_board']=$wbbuserdata['can_enter_board'];
   if($boards['invisible']==2 || ($boards['invisible']==1 && !$permissioncache[$boards['boardid']]['can_view_board'])) continue;
   
   $boards['title']=getlangvar($boards['title'], $lang);
   $boards['description']=getlangvar($boards['description'], $lang, 0);
   
   $subboardbit="";
   $subboards="";
   
   if($show_subboards==1 && (($boards['isboard']==1 && $depth==$index_depth) || (isset($hidecats[$boards['boardid']]) && $hidecats[$boards['boardid']]==1) || ($depth==$index_depth && !isset($hidecats[$boards['boardid']])))) {
    $subboardbit=getSubboards($boards['boardid']);
    if($subboardbit) $subboardbit=substr($subboardbit, 0, -2);
   }
   
   if($wbbuserdata['lastvisit'] > $boards['lastposttime'] || $boards['lastvisit'] > $boards['lastposttime']) $onoff="off";
   else {
    $onoff="off";
    $tempids = explode(",","$boards[boardid],$boards[childlist]");
    $tempids_count = count($tempids);
    for($j=0;$j<$tempids_count;$j++) {
     if($tempids[$j]==0) continue;
     if(is_array($visitcache[$tempids[$j]]) && count($visitcache[$tempids[$j]])) {
      reset($visitcache[$tempids[$j]]);
      while(list($threadid,$lastposttime)=each($visitcache[$tempids[$j]])) {
       if($lastposttime>$boardvisit[$tempids[$j]]) {
        $onoff="on";
        break 2;
       } // end if
      } // end while
     } // end if
    } // end for	
   } // end else
   
   if($boards['isboard']) { 
    
   if($boards['closed']==1 || !$permissioncache[$boards['boardid']]['can_enter_board']) $onoff.="closed";
   
   $useronlinebit="";
   $guestcount=0;
   if($showuseronlineinboard==2) {
    global $userinboard, $online;
    
    if(isset($userinboard[$boards['boardid']]) && count($userinboard[$boards['boardid']])) {
     while(list($key,$row)=each($userinboard[$boards['boardid']])) {
      if($row['userid']==0) $guestcount++;
      else $online->user($row['userid'],htmlconverter($row['username']),$row['useronlinemarking'],$row['invisible']);
     }
     
     $useronlinebit=$online->useronlinebit;
 
     if($guestcount==1) $useronline_GUEST = $lang->items['LANG_START_USERONLINE_GUEST_ONE'];
     elseif($guestcount>1) $useronline_GUEST = $lang->items['LANG_START_USERONLINE_GUEST'];
     else $useronline_GUEST="";
 
     if($guestcount>0 && $useronlinebit!="") $useronline_AND = $lang->items['LANG_START_USERONLINE_AND'];
 		 else $useronline_AND="";
 
     if($guestcount>0 || $useronlinebit!="") {
      if($guestcount==0) $guestcount="";
      eval ("\$boards['useronline'] = \"".$lang->get4eval("LANG_START_USERACTIVE")."\";");
      $boards['useronline'] = wbb_trim($boards['useronline']);
     }
     
     $online->useronlinebit="";
    }
   }
   
   if($showuseronlineinboard==1) {
    $guestcount=""; $useronline_GUEST=""; $useronline_AND="";
    $useronlinebit=$boards['useronline'];
    eval ("\$boards[useronline] = \"".$lang->get4eval("LANG_START_USERACTIVE")."\";");
    $boards['useronline'] = wbb_trim($boards['useronline']);
   }
   
   if($boards['threadcount']) {
    $boards['lastposter']=htmlconverter($boards['lastposter']);
    
    $lastpostdate=formatdate($wbbuserdata['dateformat'],$boards['lastposttime'],1); 
    $lastposttime=formatdate($wbbuserdata['timeformat'],$boards['lastposttime']); 
    if($showlastposttitle==1) {
     if($permissioncache[$boards['boardid']]['can_view_board']) {
      if(strlen($boards['topic'])>30) $topic=substr($boards['topic'],0,30)."...";
      else $topic=$boards['topic'];
    
      $topic=htmlconverter($topic);
      $boards['topic']=htmlconverter($boards['topic']);
     }
     if(isset($boards['iconid'])) $ViewPosticon=makeimgtag($boards['iconpath'],getlangvar($boards['icontitle'], $lang),0);
     else $ViewPosticon=makeimgtag($style['imagefolder']."/icons/icon14.gif");
    }
   }
   
		
    $moderatorbit="";
    if(isset($modcache[$boards['boardid']])) while (list($mkey,$moderator)=each($modcache[$boards['boardid']])) {
     $moderator['username']=htmlconverter($moderator['username']);
     eval ("\$moderatorbit .= \"".$tpl->get("index_moderatorbit")."\";");
    }
    
    if($boards['postcount']>=1000) $boards['postcount'] = number_format($boards['postcount'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
    if($boards['threadcount']>=1000) $boards['threadcount'] = number_format($boards['threadcount'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
    
    eval ("\$boardbit .= \"".$tpl->get("index_boardbit")."\";");
    
   }
   else {
    $show_hide=0;
    if($boards['childlist']!="0") {
     if($filename=="index.php") $current_url = "index.php?sid=$session[hash]";
     else $current_url = "board.php?sid=$session[hash]&amp;boardid=$temp_boardid";
     if((isset($hidecats[$boards['boardid']]) && $hidecats[$boards['boardid']]==0) || ($depth<$index_depth && (!isset($hidecats[$boards['boardid']]) || $hidecats[$boards['boardid']]!=1))) {
      $show_hide=1;
      eval ("\$LANG_START_DEACTIVATE_CAT = \"".$lang->get4eval("LANG_START_DEACTIVATE_CAT")."\";");
     }
     else {
      $show_hide=2;
      eval ("\$LANG_START_SHOWCAT = \"".$lang->get4eval("LANG_START_SHOWCAT")."\";");
     }
    }
    eval ("\$boardbit .= \"".$tpl->get("index_catbit")."\";");
   }
   if ((isset($hidecats[$boards['boardid']]) && $hidecats[$boards['boardid']]==0) || ($depth<$index_depth && (!isset($hidecats[$boards['boardid']]) || $hidecats[$boards['boardid']]!=1))) $boardbit.=makeboardbit($boards['boardid'],$depth+1);
  } 
 } 
 unset($boardcache[$boardid]);
 
 return $boardbit;
}


/** generate the board navigationbar **/
function getNavbar($parentlist,$template="navbar_board") {
 global $db, $n, $session, $url2board, $lines, $tpl, $boardnavcache, $lang;
 if($parentlist=="0") return;
 else {
  $navbar="";
  if(!isset($boardnavcache) || !is_array($boardnavcache) || !count($boardnavcache)) {
   $result = $db->unbuffered_query("SELECT boardid, title FROM bb".$n."_boards WHERE boardid IN ($parentlist)");
   while($row=$db->fetch_array($result)) $boardnavcache[$row['boardid']]=$row;
  }
  $parentids=explode(",", $parentlist);
  $parentids_count=count($parentids);
  for($i=1;$i<$parentids_count;$i++) {
   if($template=="print_navbar") $lines.=str_repeat("-",$i);
   $board=$boardnavcache[$parentids[$i]];
   $board['title']=getlangvar($board['title'], $lang);
   eval ("\$navbar .= \"".$tpl->get($template)."\";");
  }
  return $navbar;
 }
}


/** generate the codebuttons for message forms **/
function getcodebuttons() {
 global $_COOKIE, $tpl, $style, $lang, $session;
  
 $modechecked = array("", "");
 if($_COOKIE['bbcodemode']==1) $modechecked[1]="checked=\"checked\"";
 else $modechecked[0]="checked=\"checked\"";
 
 eval ("\$bbcode_sizebits = \"".$tpl->get("bbcode_sizebits")."\";");
 eval ("\$bbcode_fontbits = \"".$tpl->get("bbcode_fontbits")."\";");
 eval ("\$bbcode_colorbits = \"".$tpl->get("bbcode_colorbits")."\";");
 eval ("\$bbcode_buttons = \"".$tpl->get("bbcode_buttons")."\";");
 return $bbcode_buttons;
}


/** generate the smilielist for message forms **/
function getclickysmilies($tableColumns=3,$maxSmilies=-1) {
 global $db, $n, $tpl, $showsmiliesrandom, $style, $lang, $session;






pizz@king
code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
 if($showsmiliesrandom==1) $result = $db->query("SELECT smiliepath, smilietitle, smiliecode FROM bb".$n."_smilies ORDER BY RAND()");
 else $result = $db->query("SELECT smiliepath, smilietitle, smiliecode FROM bb".$n."_smilies ORDER BY smilieorder ASC");
 $totalSmilies = $db->num_rows($result);

 if (($maxSmilies == -1) || ($maxSmilies >= $totalSmilies)) $maxSmilies = $totalSmilies;
 elseif ($maxSmilies < $totalSmilies) eval ("\$bbcode_smilies_getmore = \"".$tpl->get("bbcode_smilies_getmore")."\";");

 $i=0;
 while($row = $db->fetch_array($result)) {
  $row['smilietitle']=getlangvar($row['smilietitle'], $lang);
  $row['smiliepath'] = replaceImagefolder($row['smiliepath']);
  $row['smiliecode'] = addcslashes($row['smiliecode'], "'\\");
  
  eval ("\$smilieArray[\"".$i."\"] = \"".$tpl->get("bbcode_smiliebit")."\";");
  $i++;
 }
        
 $tableRows = ceil($maxSmilies/$tableColumns);
 $count = 0;
 $smiliebits = "";
 for ($i=0; $i<$tableRows; $i++) {
  $smiliebits .= "\t<tr>\n";
  for ($j=0; $j<$tableColumns; $j++) {
   $smiliebits .= $smilieArray[$count];
   $count++;
  }
  $smiliebits .= "\t</tr>\n";
 }

 eval ("\$lang->items['LANG_POSTINGS_SMILIE_COUNT'] = \"".$lang->get4eval("LANG_POSTINGS_SMILIE_COUNT")."\";");
 eval ("\$bbcode_smilies = \"".$tpl->get("bbcode_smilies")."\";");
 return $bbcode_smilies;
}


/** if number is odd get element one otherwise element two **/
function getone($number, $one, $two) {
 if($number & 1) return $one;
 else return $two;
}


/** generate the boardlist for boardjump **/
function makeboardjump($current) {
 global $wbbuserdata, $boardcache, $permissioncache, $useuseraccess, $tpl, $session, $boardnavcache, $style, $lang;
 
 if(!isset($boardcache) || !isset($permissioncache)) {
  global $db, $n, $wbbuserdata, $boardordermode;
  
  switch($boardordermode) {
   case 1: $boardorder="title ASC"; break;
   case 2: $boardorder="title DESC"; break;
   case 3: $boardorder="lastposttime DESC"; break;
   default: $boardorder="boardorder ASC"; break;
  }
    
  $result = $db->unbuffered_query("SELECT boardid, parentid, boardorder, title, invisible FROM bb".$n."_boards ORDER by parentid ASC, $boardorder");
  while ($row = $db->fetch_array($result)) {
   $boardcache[$row['parentid']][$row['boardorder']][$row['boardid']] = $row;
   $boardnavcache[$row['boardid']]=$row;
  }
  $permissioncache=getPermissions();
 }
 if(is_array($boardcache) && count($boardcache)) {
  reset($boardcache);
  $boardoptions=makeboardselect(0,1,$current);
 }
 eval ("\$boardjump = \"".$tpl->get("boardjump")."\";");
 return $boardjump;
}


/** generate a general boardlist **/
function makeboardselect($boardid,$depth=1,$current=0,$catmarking="%s") {
 global $boardcache, $permissioncache, $accesscache, $wbbuserdata, $lang;
 
 if(!isset($boardcache[$boardid])) return;
 $boardbit="";
 while (list($key1,$val1) = each($boardcache[$boardid])) {
  while(list($key2,$boards) = each($val1)) {
   if(!isset($permissioncache[$boards['boardid']]['can_view_board']) || $permissioncache[$boards['boardid']]['can_view_board']==-1) $permissioncache[$boards['boardid']]['can_view_board']=$wbbuserdata['can_view_board'];
   if($boards['invisible']==2 || ($boards['invisible']==1 && !$permissioncache[$boards['boardid']]['can_view_board'])) continue;
   if($depth>1) $prefix=str_repeat("--",$depth-1)." ";
   else $prefix="";
   
   $boards['title']=getlangvar($boards['title'], $lang);
   if(isset($boards['isboard']) && !$boards['isboard'] && $catmarking!="%s") $boards['title']=sprintf($catmarking, $boards['title']);
   $boardbit .= makeoption($boards['boardid'],$prefix.$boards['title'],$current,1);
   $boardbit .= makeboardselect($boards['boardid'],$depth+1,$current);
  } 
 } 
 unset($boardcache[$boardid]);
 return $boardbit;	
}


/** format rank images **/
function formatRI($images) {
 if(!$images) return;
 
 $imgArray = explode(";",$images);
 
 $RI="";
 $imgArray_count=count($imgArray);
 for($i=0;$i<$imgArray_count;$i++) 
  $RI.=makeimgtag($imgArray[$i]);
 
 return $RI;
}


/** parse URLs in post **/
function parseURL($message) {
 $urlsearch[]="/([^]_a-z0-9-=\"'\/])((https?|ftp):\/\/|www\.)([^ \r\n\(\)\^\$!`\"'\|\[\]\{\}<>]*)/si";
 $urlsearch[]="/^((https?|ftp):\/\/|www\.)([^ \r\n\(\)\^\$!`\"'\|\[\]\{\}<>]*)/si";
 $urlreplace[]="\\1[URL]\\2\\4[/URL]";
 $urlreplace[]="[URL]\\1\\3[/URL]";
 $emailsearch[]="/([\s])([_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,}))/si";
 $emailsearch[]="/^([_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,}))/si";
 $emailreplace[]="\\1[EMAIL]\\2[/EMAIL]";
 $emailreplace[]="[EMAIL]\\0[/EMAIL]";
 $message = preg_replace($urlsearch, $urlreplace, $message);
 if (strpos($message, "@")) $message = preg_replace($emailsearch, $emailreplace, $message);
 return $message;
}




/** generate pagelinks **/
function makepagelink($link,$page,$pages,$number) {
 global $tpl, $lang;
 eval ("\$pagelink = \"".$tpl->get("pagelink")."\";");
 
 if($page-$number>1) eval ("\$pagelink .= \"".$tpl->get("pagelink_first")."\";");
 if($page>1) {
  $temppage=$page-1;
  eval ("\$pagelink .= \"".$tpl->get("pagelink_left")."\";");
 }
 $count = (($page+$number>=$pages) ? ($pages) : ($page+$number));
 for($i=$page-$number;$i<=$count;$i++) {
  if($i<1) $i=1;
  if($i==$page) eval ("\$pagelink .= \"".$tpl->get("pagelink_current")."\";");
  else eval ("\$pagelink .= \"".$tpl->get("pagelink_nocurrent")."\";");
 }

 if($page<$pages) {
  $temppage=$page+1;
  eval ("\$pagelink .= \"".$tpl->get("pagelink_right")."\";");
 }
 if($page+$number<$pages) eval ("\$pagelink .= \"".$tpl->get("pagelink_last")."\";");
 
 return $pagelink;
}


/** generate a option tag **/
function makeoption($value,$text,$selected_value="",$selected=1,$style="") {
 $option_selected="";
 if($selected==1) {
  if(is_array($selected_value)) {
   if(in_array($value,$selected_value)) $option_selected=" selected=\"selected\"";
  }
  elseif($selected_value==$value) $option_selected=" selected=\"selected\"";
 }
 return "<option value=\"$value\"".(($style!="") ? (" style=\"color:$style\"") : ("")).$option_selected.">$text</option>";
}


/** get name of a month **/
function getmonth($number) {
 global $months, $lang;
 if(!isset($months)) $months = explode("|", $lang->get("LANG_GLOBAL_MONTHS"));
 return $months[$number-1];
}


/** get name of a day **/
function getday($number) {
 global $days, $lang;
 if(!isset($days)) $days = explode("|", $lang->get("LANG_GLOBAL_DAYS"));
 return $days[$number];
}


/** show access error page and die **/
function access_error($isacp=0)
{
	if($isacp==0)
	{
		global $db,$n,$wbbuserdata, $header, $footer, $headinclude, $session, $sid, $master_board_name, $REQUEST_URI, $tpl, $style, $lang, $usercbar_username, $allowloginencryption;
		
		$update_session=false;
		
		if(!$wbbuserdata['userid'] && $allowloginencryption==1)
		{
			// force authentificationcode
			$authentificationcode=makeAuthentificationcode(0);
			if($authentificationcode!=$session['authentificationcode'])
			{
				$update_session=true;
				$session['authentificationcode']=$authentificationcode;
				$db->unbuffered_query("UPDATE bb".$n."_sessions SET authentificationcode = '".addslashes($session['authentificationcode'])."', request_uri='', boardid=0, threadid=0 WHERE sessionhash = '$sid'",1);
			}
		}
		
		if(!$update_session) $db->unbuffered_query("UPDATE bb".$n."_sessions SET request_uri='', boardid=0, threadid=0 WHERE sessionhash = '$sid'",1);
		
		$REQUEST_URI = htmlconverter($REQUEST_URI);
		
		eval ("\$lang->items['LANG_GLOBAL_ACCESS_ERROR_DESC'] = \"".$lang->get4eval("LANG_GLOBAL_ACCESS_ERROR_DESC")."\";");
		eval("\$tpl->output(\"".$tpl->get("access_error")."\");");
		exit();
	}
	else
	{
		global $tpl, $lang, $master_board_name;
		eval("\$tpl->output(\"".$tpl->get("access_error",1)."\",1);");
		exit;
	}
}


/** verify an username **/
function verify_username($username) {
 global $db, $n, $minusernamelength, $maxusernamelength, $ban_name;

 if(strlen($username)<$minusernamelength || strlen($username)>$maxusernamelength) return false;
 $ban_name=explode("\n",preg_replace("/\s*\n\s*/","\n",strtolower(wbb_trim($ban_name))));
 
 $ban_name_count=count($ban_name);
 for($i = 0; $i < $ban_name_count; $i++) {
  $ban_name[$i]=wbb_trim($ban_name[$i]);
  if(!$ban_name[$i]) continue;
  if(strstr($ban_name[$i], "*")) {
   $ban_name[$i] = str_replace("*",".*",$ban_name[$i]);
   if(preg_match("/$ban_name[$i]/i",$username)) return false;
  }
  elseif(strtolower($username)==$ban_name[$i]) return false;
 }
 
 $result = $db->query_first("SELECT COUNT(*) FROM bb".$n."_users WHERE username = '".addslashes($username)."'");
 if($result[0]!=0) return false;
 else return true;
}


/** verify a email **/
function verify_email($email) {
 global $db, $n, $multipleemailuse, $ban_email;

 $email=strtolower($email);
 if(!preg_match("/^([_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,}))/si",$email)) return false;
 $ban_email=explode("\n",preg_replace("/\s*\n\s*/","\n",strtolower(wbb_trim($ban_email))));
 
 $ban_email_count=count($ban_email);
 for($i = 0; $i < $ban_email_count; $i++) {
  $ban_email[$i]=wbb_trim($ban_email[$i]);
  if(!$ban_email[$i]) continue;
  if(strstr($ban_email[$i], "*")) {
   $ban_email[$i] = str_replace("*",".*",$ban_email[$i]);
   if(preg_match("/$ban_email[$i]/i",$email)) return false;
  }
  elseif($email==$ban_email[$i]) return false;
 }
 if($multipleemailuse==1) return true;
 else {
  $result = $db->query_first("SELECT COUNT(*) FROM bb".$n."_users WHERE email = '".$email."'");
  if($result[0]!=0) return false;
  else return true;
 }
}


/** verify an ip address **/
function verify_ip($ip) {
 global $ban_ip;

 if($ban_ip) {
  $ban_ip=explode("\n",preg_replace("/\s*\n\s*/","\n",strtolower(wbb_trim($ban_ip))));
  
  $ban_ip_count=count($ban_ip);
  for($i = 0; $i < $ban_ip_count; $i++) {
   $ban_ip[$i]=wbb_trim($ban_ip[$i]);
   if(!$ban_ip[$i]) continue;
   if(strstr($ban_ip[$i], "*")) {
    $ban_ip[$i] = str_replace("*",".*",$ban_ip[$i]);
    if(preg_match("/$ban_ip[$i]/i",$ip)) access_error();
   }
   elseif($ip==$ban_ip[$i]) access_error();
  }
 }
}


/** verify an usertitle **/
function verify_usertitle($usertitle) {
 global $db, $n, $wbbuserdata, $ban_usertitle;
 
 if($wbbuserdata['can_avoid_ban_usertitle']==1) return true;
 else
 {
  if(!is_array($ban_usertitle)) $ban_usertitle=explode("\n",preg_replace("/\s*\n\s*/","\n",strtolower(wbb_trim($ban_usertitle))));
  
  $ban_usertitle_count=count($ban_usertitle);
  for($i = 0; $i < $ban_usertitle_count; $i++) {
   $ban_usertitle[$i]=wbb_trim($ban_usertitle[$i]);
   if(!$ban_usertitle[$i]) continue;
   if(strstr($ban_usertitle[$i], "*")) {
    $ban_usertitle[$i] = str_replace("*",".*",$ban_usertitle[$i]);
    if(preg_match("/$ban_usertitle[$i]/i",$usertitle)) return false;
   }
   elseif(strtolower($usertitle)==$ban_usertitle[$i]) return false;
  }
  return true;
 }
}


/** verify posttime for flood control **/
function flood_control($userid,$ipaddress,$avoid_fc) {
 if($avoid_fc==1) return false;
 
 global $db, $n, $fctime;
 if($userid) $result=$db->query_first("SELECT postid FROM bb".$n."_posts WHERE userid='$userid' AND posttime>='".(time()-$fctime)."'",1);	
 else $result=$db->query_first("SELECT postid FROM bb".$n."_posts WHERE ipaddress='$ipaddress' AND posttime>='".(time()-$fctime)."'",1);	
 if($result['postid']) return true;
 else return false;	
}


/** generate a new password **/
function password_generate($numbers=2,$length=8) {
 
 $time = intval(substr(microtime(), 2, 8));
 mt_srand($time);
 
 $numberchain="1234567890";
 
 for($i=0;$i<$numbers;$i++) {
  $random=mt_rand(0,strlen($numberchain)-1);
  $number[intval($numberchain[$random])]=mt_rand(1,9);
  $numberchain=str_replace($random,"",$numberchain);
pizz@king
ich stelle es lieber hier rein als dateianhang ist zu lang,will jetzt nicht spammen!
Blacksoul
Hallo,

Zeile 42:

setcookie($cookieprefix.$name, $value, $time, $cookiepath, $cookiedomain, $ssl);

erstzen mit:

setcookie($cookieprefix, $name, $value, $time, $cookiepath, $cookiedomain, $ssl);

MfG
pizz@king
habs gemacht nur leider jetzt kommt ne etwas andere fehler meldung

code:
1:
2:
3:
Warning: setcookie() expects at most 6 parameters, 7 given in /home/family4u.de/www/w213/acp/lib/functions.php on line 42
Blacksoul
mach das erstmal rückgängig...

ich überleg mal weiter xD
Blacksoul
Zeig mal bitte, den Code der Index.php

(zeile 0-10) ...bzw. 1-10^^

MfG