while(list($key,$val)=each($_POST)) $$key=trim($val); $allowedavatarextensions = preg_replace("/\s*\n\s*/","\n",trim($allowedavatarextensions)); if(is_array($_POST['chgpermission'])) $chgpermission=implode(",",$_POST['chgpermission']); else $chgpermission=""; $db->query("INSERT INTO bb".$n."_groups (groupid,title,canviewboard,canviewoffboard,canusesearch,canusepms,canstarttopic,canreplyowntopic,canreplytopic,canpostwithoutmoderation,caneditownpost,candelownpost,cancloseowntopic,candelowntopic,caneditowntopic,canpostpoll,canvotepoll,canuseavatar,canuploadavatar,canratethread,canviewmblist,appendeditnote,avoidfc,ismod,issupermod,canuseacp,maxpostimage,maxsigimage,maxsiglength,allowedavatarextensions,maxavatarwidth,maxavatarheight,maxavatarsize,maxusertextlength,canviewprofile,canviewcalender,canprivateevent,canpublicevent,canrateusers, chgpermission, canseepublic, canrelcalthread) VALUES (NULL,'".addslashes($title)."','$canviewboard','$canviewoffboard','$canusesearch','$canusepms','$canstarttopic','$canreplyowntopic','$canreplytopic','$canpostwithoutmoderation','$caneditownpost','$candelownpost','$cancloseowntopic','$candelowntopic','$caneditowntopic','$canpostpoll','$canvotepoll','$canuseavatar','$canuploadavatar','$canratethread','$canviewmblist','$appendeditnote','$avoidfc','$ismod','$issupermod','$canuseacp','".intval($maxpostimage)."','".intval($maxsigimage)."','".intval($maxsiglength)."','".addslashes($allowedavatarextensions)."','".intval($maxavatarwidth)."','".intval($maxavatarheight)."','".intval($maxavatarsize)."','".intval($maxusertextlength)."','$canviewprofile','$canviewcalender','$canprivateevent','$canpublicevent','$canrateusers')"); set_hilight_ids(); header("Location: group.php?action=view&sid=$session[hash]"); exit(); }