YourWBB


yourWBB » WoltLab Burning Board Generation 2 * » Alles von und für das WBB Lite 1.0.x » [WBB Lite 1.0.x] Allg. Fragen und Probleme » Gruppe bearbeiten Fehler » Hallo Gast [Anmelden|Registrieren]
Letzter Beitrag | Erster ungelesener Beitrag 1.009 Views | | Thema zu Favoriten hinzufügen

Neues Thema erstellen Antwort erstellen

Dieses Thema wurde als unerledigt markiert. Thread unerledigt

Zum Ende der Seite springen Gruppe bearbeiten Fehler
Autor
Beitrag « Vorheriges Thema | Nächstes Thema »
Erguterjunge
Guterjunge


Dabei seit: 29.06.08
Beiträge: 71
Fähigkeiten: WBB Lite 2 Profi; WBB Lite 1 Profi
Forenversion: 1.0

 Gruppe bearbeiten Fehler Antworten Zitieren Editieren Melden       UP

Problembeschreibung:
wenn ich im acp auf
Gruppe bearbeiten gehe kommt ein fehler

Fehlermeldung:
Parse error: syntax error, unexpected T_STRING in /data/apache/users/kilu.de/albanienforum/www/acp/group.php on line 176



Was wurde zuletzt geändert oder eingebaut?
das portal myWBB-Portal lite plus 1.0.7 pl1+


Hier meine group.php

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:
<?php
require ("./global.php");
isAdmin();

function set_hilight_ids() {
 global $db, $n;

 $modids = "";
 $smodids = "";
 $adminids = "";

 $result=$db->query("SELECT groupid FROM bb".$n."_groups WHERE canuseacp=1");
 while($row=$db->fetch_array($result)) {
  if($adminids) $adminids.=",".$row['groupid'];
  else $adminids=$row['groupid'];
 }

 $result=$db->query("SELECT groupid FROM bb".$n."_groups WHERE issupermod=1 AND canuseacp=0");
 while($row=$db->fetch_array($result)) {
  if($smodids) $smodids.=",".$row['groupid'];
  else $smodids=$row['groupid'];
 }

 $result=$db->query("SELECT groupid FROM bb".$n."_groups WHERE ismod=1 AND issupermod=0 AND canuseacp=0");
 while($row=$db->fetch_array($result)) {
  if($modids) $modids.=",".$row['groupid'];
  else $modids=$row['groupid'];
 }

 $db->query("UPDATE bb".$n."_options SET value='$adminids' WHERE varname='adminids'");
 $db->query("UPDATE bb".$n."_options SET value='$smodids' WHERE varname='smodids'");
 $db->query("UPDATE bb".$n."_options SET value='$modids' WHERE varname='modids'");

 require("lib/class_options.php");
 $option=new options("lib");
 $option->write();
}

if(isset($_REQUEST['action'])) $action=$_REQUEST['action'];
else $action="view";

if($action == "view") {
 $result=$db->query("SELECT COUNT(u.userid) AS count, g.groupid, g.title FROM bb".$n."_groups g LEFT JOIN bb".$n."_users u USING (groupid) GROUP BY groupid ORDER BY title ASC");
 $count=0;
 $group_viewbit="";
 while($row=$db->fetch_array($result)) {
  $rowclass=getone($count++,"firstrow","secondrow");
  eval ("\$group_viewbit .= \"".gettemplate("group_viewbit")."\";");
 }
 eval("print(\"".gettemplate("group_view")."\");");
}

function makeboardlist($boardid,$x=0) {
 global $boardcache, $session, $maxcolspan, $permissioncache;

 if(!isset($boardcache[$boardid])) return;

 while (list($key1,$val1) = each($boardcache[$boardid])) {
  while(list($key2,$boards) = each($val1)) {
   $colspan=$maxcolspan-$x;
   $temp=$maxcolspan-($maxcolspan-$x);
   if($temp) $tds=str_repeat("<td class=\"secondrow\">&nbsp;&nbsp;</td>",$temp);
   else $tds="";

   if($permissioncache[$boards['boardid']]['boardpermission']==1) $checked1=" checked";
   else $checked1="";
   if($permissioncache[$boards['boardid']]['startpermission']==1) $checked2=" checked";
   else $checked2="";
   if($permissioncache[$boards['boardid']]['replypermission']==1) $checked3=" checked";
   else $checked3="";


   eval ("\$out .= \"".gettemplate("group_rightsbit")."\";");
   $out .= makeboardlist($boards[boardid],$x+1);
  }
 }
 unset($boardcache[$boardid]);
 return $out;
}

if($action == "rights") {
 $groupid=intval($_REQUEST['groupid']);
 $group = $db->query_first("SELECT groupid, title FROM bb".$n."_groups WHERE groupid='$groupid'");
 if(!$group['groupid']) {
  header("Location: group.php?action=view&sid=$session[hash]");
  exit();
 }

 if(isset($_POST['send'])) {
  reset($_POST);
  while(list($key,$val)=each($_POST)) $$key=$val;

  $result=$db->query("SELECT boardid FROM bb".$n."_boards");
  while($row=$db->fetch_array($result)) $db->query("REPLACE INTO bb".$n."_permissions (boardid,groupid,boardpermission,startpermission,replypermission) VALUES ('$row[boardid]','$groupid','".$boardpermission[$row['boardid']]."','".$startpermission[$row['boardid']]."','".$replypermission[$row['boardid']]."')");
  header("Location: group.php?action=view&sid=$session[hash]");
  exit();
 }

 $result = $db->query("SELECT * FROM bb".$n."_permissions WHERE groupid = '$groupid'");
 while ($row = $db->fetch_array($result)) $permissioncache[$row['boardid']] = $row;

 $maxcolspan=0;
 $result = $db->query("SELECT boardid, parentid, boardorder, title, parentlist FROM bb".$n."_boards ORDER by parentid ASC, boardorder ASC");
 while ($row = $db->fetch_array($result)) {
  $temp=count(explode(",",$row['parentlist']));
  if($temp>$maxcolspan) $maxcolspan=$temp;
  $boardcache[$row['parentid']][$row['boardorder']][$row['boardid']] = $row;
 }
 $boardlist = makeboardlist(0);

 $maxcolspan2=$maxcolspan+3;
 eval("print(\"".gettemplate("group_rights")."\");");
}

if($action == "default") {
 if(isset($_POST['send'])) {
  reset($_POST);
  while(list($key,$val)=each($_POST)) $$key=trim($val);

  if($default1==$default2) eval("acp_error(\"".gettemplate("error_default2groups")."\");");
  $db->query("UPDATE bb".$n."_groups SET default_group='0'");
  $db->query("UPDATE bb".$n."_groups SET default_group='1' WHERE groupid='$default1'");
  $db->query("UPDATE bb".$n."_groups SET default_group='2' WHERE groupid='$default2'");
 }

 $result=$db->query("SELECT groupid, default_group FROM bb".$n."_groups WHERE default_group > 0");
 while($row=$db->fetch_array($result)) $default[$row['default_group']]=$row['groupid'];

 $result=$db->query("SELECT groupid, title FROM bb".$n."_groups ORDER BY title ASC");
 while($row=$db->fetch_array($result)) {
  $options1.=makeoption($row['groupid'],$row['title'],$default[1],1);
  $options2.=makeoption($row['groupid'],$row['title'],$default[2],1);
 }

 eval("print(\"".gettemplate("group_default")."\");");
}

if($action == "del") {
 $groupid=intval($_REQUEST['groupid']);

 $group = $db->query_first("SELECT groupid, title, default_group FROM bb".$n."_groups WHERE groupid='$groupid'");
 if(!$group[groupid]) {
  header("Location: group.php?action=view&sid=$session[hash]");
  exit();
 }

 if($group['default_group']!=0) eval("acp_error(\"".gettemplate("error_isdefaultgroup")."\");");
 if($group['groupid']==$wbbuserdata[groupid]) eval("acp_error(\"".gettemplate("error_isyourgroup")."\");");

 if(isset($_POST['send'])) {
  list($newgroupid)=$db->query_first("SELECT groupid FROM bb".$n."_groups WHERE default_group='2'");
  $db->query("UPDATE bb".$n."_users SET groupid='$newgroupid' WHERE groupid='$groupid'");
  $db->query("DELETE FROM bb".$n."_groups WHERE groupid='$groupid'");
  $db->query("UPDATE bb".$n."_avatars SET groupid=0 WHERE groupid='$groupid'");
  $db->query("UPDATE bb".$n."_events SET groupid=0 WHERE groupid='$groupid'");
  $db->query("DELETE FROM bb".$n."_permissions WHERE groupid='$groupid'");
  $db->query("DELETE FROM bb".$n."_ranks WHERE groupid='$groupid'");
  $db->query("DELETE FROM bb".$n."_portal_navilink WHERE link_groupid='$groupid'");
  $db->query("DELETE FROM bb".$n."_portal_object2box WHERE objectid='$groupid'");
  set_hilight_ids();
  header("Location: group.php?action=view&sid=$session[hash]");
  exit();
 }
 eval("print(\"".gettemplate("group_del")."\");");
}

if($action == "add") {
 if(isset($_POST["send"])) {
  reset($_POST);
  while(list($key,$val)=each($_POST)) $$key=trim($val);

  $allowedavatarextensions = preg_replace("/\s*\n\s*/","\n",trim($allowedavatarextensions));

  $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,shorttitle,shorttitlecolor)
  VALUES (NULL,'".addslashes($title)."',$insertid=$db->insert_id();
  list($group_count) = $db->query_first("SELECT COUNT(groupid) FROM bb".$n."_groups");
  $result=$db->query("SELECT parentid,COUNT(parentid) AS gc FROM bb".$n."_portal_navilink WHERE parentid<>0 GROUP BY parentid;");
  while($row = $db->fetch_array($result)) if($row['gc']==(intval($group_count)-1)) $db->query("INSERT INTO bb".$n."_portal_navilink (linkid,parentid,link_groupid) VALUES (NULL, ".intval($row['parentid']).", ".intval($insertid).")");
  $result=$db->query("SELECT boxid,COUNT(boxid) AS gc FROM bb".$n."_portal_object2box WHERE viewpermission<>0 GROUP BY boxid;");
  while($row = $db->fetch_array($result)) if($row['gc']==(intval($group_count)-1)) $db->query("INSERT INTO bb".$n."_portal_object2box (boxid,objectid,viewpermission) VALUES (".intval($row['boxid']).", ".intval($insertid).",1)");
  $result=$db->query("SELECT boxid,COUNT(boxid) AS gc FROM bb".$n."_portal_object2box WHERE modulpermission<>0 GROUP BY boxid;");
  while($row = $db->fetch_array($result)) if($row['gc']==(intval($group_count)-1)) $db->query("INSERT INTO bb".$n."_portal_object2box (boxid,objectid,modulpermission) VALUES (".intval($row['boxid']).", ".intval($insertid).",1)");'$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','".addslashes($shorttitle)."','$shorttitlecolor')");
  set_hilight_ids();
  header("Location: group.php?action=view&sid=$session[hash]");
  exit();
 }

 eval("print(\"".gettemplate("group_add")."\");");
}

if($action == "edit") {
 $groupid=intval($_REQUEST['groupid']);
 $group = $db->query_first("SELECT * FROM bb".$n."_groups WHERE groupid='$groupid'");
 if(!$group['groupid']) {
  header("Location: group.php?action=view&sid=$session[hash]");
  exit();
 }

 if(isset($_POST["send"])) {
  reset($_POST);
  while(list($key,$val)=each($_POST)) $$key=trim($val);

  $allowedavatarextensions = preg_replace("/\s*\n\s*/","\n",trim($allowedavatarextensions));
#### Anfang Member ~ Groupcolor ####
  $db->query("UPDATE bb".$n."_groups SET postcolor = '".$_POST['color']."' WHERE groupid LIKE '".$_POST['groupid']."'");
  #### Ende Member ~ Groupcolor ####
  $db->query("UPDATE bb".$n."_groups SET title='".addslashes($title)."',canviewboard='$canviewboard',canviewoffboard='$canviewoffboard',canusesearch='$canusesearch',canusepms='$canusepms',canstarttopic='$canstarttopic',canreplyowntopic='$canreplyowntopic',canreplytopic='$canreplytopic',canpostwithoutmoderation='$canpostwithoutmoderation',caneditownpost='$caneditownpost',candelownpost='$candelownpost',cancloseowntopic='$cancloseowntopic',candelowntopic='$candelowntopic',caneditowntopic='$caneditowntopic',canpostpoll='$canpostpoll',canvotepoll='$canvotepoll',canuseavatar='$canuseavatar',canuploadavatar='$canuploadavatar',canratethread='$canratethread',appendeditnote='$appendeditnote',avoidfc='$avoidfc',ismod='$ismod',issupermod='$issupermod',canuseacp='$canuseacp',maxpostimage='".intval($maxpostimage)."',maxsigimage='".intval($maxsigimage)."',maxsiglength='".intval($maxsiglength)."',allowedavatarextensions='".addslashes($allowedavatarextensions)."',maxavatarwidth='".intval($maxavatarwidth)."',maxavatarheight='".intval($maxavatarheight)."',maxavatarsize='".intval($maxavatarsize)."',maxusertextlength='".intval($maxusertextlength)."', canviewprofile='$canviewprofile', canviewcalender='$canviewcalender', canprivateevent='$canprivateevent', canpublicevent='$canpublicevent', canrateusers='$canrateusers', canviewmblist='$canviewmblist',shorttitle='".addslashes($shorttitle)."',shorttitlecolor='$shorttitlecolor' WHERE groupid='$groupid'");
  set_hilight_ids();
  header("Location: group.php?action=view&sid=$session[hash]");
  exit();
 }

 $sel_canviewboard[$group[canviewboard]]=" selected";
 $sel_canviewoffboard[$group[canviewoffboard]]=" selected";
 $sel_canusesearch[$group[canusesearch]]=" selected";
 $sel_canusepms[$group[canusepms]]=" selected";
 $sel_canvotepoll[$group[canvotepoll]]=" selected";
 $sel_canratethread[$group[canratethread]]=" selected";
 $sel_canuseavatar[$group[canuseavatar]]=" selected";
 $sel_canuploadavatar[$group[canuploadavatar]]=" selected";
 $sel_canstarttopic[$group[canstarttopic]]=" selected";
 $sel_canreplyowntopic[$group[canreplyowntopic]]=" selected";
 $sel_canreplytopic[$group[canreplytopic]]=" selected";
 $sel_canpostwithoutmoderation[$group[canpostwithoutmoderation]]=" selected";
 $sel_caneditownpost[$group[caneditownpost]]=" selected";
 $sel_candelownpost[$group[candelownpost]]=" selected";
 $sel_cancloseowntopic[$group[cancloseowntopic]]=" selected";
 $sel_candelowntopic[$group[candelowntopic]]=" selected";
 $sel_caneditowntopic[$group[caneditowntopic]]=" selected";
 $sel_canpostpoll[$group[canpostpoll]]=" selected";
 $sel_appendeditnote[$group[appendeditnote]]=" selected";
 $sel_avoidfc[$group[avoidfc]]=" selected";
 $sel_ismod[$group[ismod]]=" selected";
 $sel_issupermod[$group[issupermod]]=" selected";
 $sel_canuseacp[$group[canuseacp]]=" selected";
 $sel_canviewprofile[$group['canviewprofile']]=" selected";
 $sel_canviewcalender[$group['canviewcalender']]=" selected";
 $sel_canprivateevent[$group['canprivateevent']]=" selected";
 $sel_canpublicevent[$group['canpublicevent']]=" selected";
 $sel_canrateusers[$group['canrateusers']]=" selected";
 $sel_canviewmblist[$group['canviewmblist']]=" selected";
#### Anfang Member ~ Groupcolor ####
 $postcolor = ($group['postcolor']);
 #### Ende Member ~ Groupcolor ####
 eval("print(\"".gettemplate("group_edit")."\");");
}
?>
21.09.08 01:33 Erguterjunge ist offline E-Mail Finden Als Freund hinzufügen
Biggi
Mitglied


Dabei seit: 08.01.07
Beiträge: 3.479
Fähigkeiten: WBB2 Profi
Forenversion: 2.3

Antworten Zitieren Editieren Melden       UP

In der Einbauanleitung des Portals steht:
Zitat:
suche

---------------------

VALUES (NULL,'".addslashes($title)."', ...... (die Zeile geht noch weiter, also die ganze Zeile als Suchstelle betrachten und unverändert belassen)

---------------------

und füge in der Zeile darunter ein

---------------------

$insertid=$db->insert_id();
list($group_count) = $db->query_first("SELECT COUNT(groupid) FROM bb".$n."_groups");
$result=$db->query("SELECT parentid,COUNT(parentid) AS gc FROM bb".$n."_portal_navilink WHERE parentid<>0 GROUP BY parentid;");
while($row = $db->fetch_array($result)) if($row['gc']==(intval($group_count)-1)) $db->query("INSERT INTO bb".$n."_portal_navilink (linkid,parentid,link_groupid) VALUES (NULL, ".intval($row['parentid']).", ".intval($insertid).")");
$result=$db->query("SELECT boxid,COUNT(boxid) AS gc FROM bb".$n."_portal_object2box WHERE viewpermission<>0 GROUP BY boxid;");
while($row = $db->fetch_array($result)) if($row['gc']==(intval($group_count)-1)) $db->query("INSERT INTO bb".$n."_portal_object2box (boxid,objectid,viewpermission) VALUES (".intval($row['boxid']).", ".intval($insertid).",1)");
$result=$db->query("SELECT boxid,COUNT(boxid) AS gc FROM bb".$n."_portal_object2box WHERE modulpermission<>0 GROUP BY boxid;");
while($row = $db->fetch_array($result)) if($row['gc']==(intval($group_count)-1)) $db->query("INSERT INTO bb".$n."_portal_object2box (boxid,objectid,modulpermission) VALUES (".intval($row['boxid']).", ".intval($insertid).",1)");


Warum hast du also den Code direkt hinter VALUES (NULL,'".addslashes($title)."', geschrieben, statt die Anleitung vernünftig zu befolgen?

Also:
Suche in deiner group.php (Zeilen 174 - 186):
code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
  $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,shorttitle,shorttitlecolor)
  VALUES (NULL,'".addslashes($title)."',$insertid=$db->insert_id();
  list($group_count) = $db->query_first("SELECT COUNT(groupid) FROM bb".$n."_groups");
  $result=$db->query("SELECT parentid,COUNT(parentid) AS gc FROM bb".$n."_portal_navilink WHERE parentid<>0 GROUP BY parentid;");
  while($row = $db->fetch_array($result)) if($row['gc']==(intval($group_count)-1)) $db->query("INSERT INTO bb".$n."_portal_navilink (linkid,parentid,link_groupid) VALUES (NULL, ".intval($row['parentid']).", ".intval($insertid).")");
  $result=$db->query("SELECT boxid,COUNT(boxid) AS gc FROM bb".$n."_portal_object2box WHERE viewpermission<>0 GROUP BY boxid;");
  while($row = $db->fetch_array($result)) if($row['gc']==(intval($group_count)-1)) $db->query("INSERT INTO bb".$n."_portal_object2box (boxid,objectid,viewpermission) VALUES (".intval($row['boxid']).", ".intval($insertid).",1)");
  $result=$db->query("SELECT boxid,COUNT(boxid) AS gc FROM bb".$n."_portal_object2box WHERE modulpermission<>0 GROUP BY boxid;");
  while($row = $db->fetch_array($result)) if($row['gc']==(intval($group_count)-1)) $db->query("INSERT INTO bb".$n."_portal_object2box (boxid,objectid,modulpermission) VALUES (".intval($row['boxid']).", ".intval($insertid).",1)");'$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','".addslashes($shorttitle)."','$shorttitlecolor')");
  set_hilight_ids();
  header("Location: group.php?action=view&sid=$session[hash]");
  exit();
 }


Und ersetze sie gegen dies:
code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
  $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)
  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')");
  $insertid=$db->insert_id();
  list($group_count) = $db->query_first("SELECT COUNT(groupid) FROM bb".$n."_groups");
  $result=$db->query("SELECT parentid,COUNT(parentid) AS gc FROM bb".$n."_portal_navilink WHERE parentid<>0 GROUP BY parentid;");
  while($row = $db->fetch_array($result)) if($row['gc']==(intval($group_count)-1)) $db->query("INSERT INTO bb".$n."_portal_navilink (linkid,parentid,link_groupid) VALUES (NULL, ".intval($row['parentid']).", ".intval($insertid).")");
  $result=$db->query("SELECT boxid,COUNT(boxid) AS gc FROM bb".$n."_portal_object2box WHERE viewpermission<>0 GROUP BY boxid;");
  while($row = $db->fetch_array($result)) if($row['gc']==(intval($group_count)-1)) $db->query("INSERT INTO bb".$n."_portal_object2box (boxid,objectid,viewpermission) VALUES (".intval($row['boxid']).", ".intval($insertid).",1)");
  $result=$db->query("SELECT boxid,COUNT(boxid) AS gc FROM bb".$n."_portal_object2box WHERE modulpermission<>0 GROUP BY boxid;");
  while($row = $db->fetch_array($result)) if($row['gc']==(intval($group_count)-1)) $db->query("INSERT INTO bb".$n."_portal_object2box (boxid,objectid,modulpermission) VALUES (".intval($row['boxid']).", ".intval($insertid).",1)");
  set_hilight_ids();
  header("Location: group.php?action=view&sid=$session[hash]");
  exit();
 }


__________________

21.09.08 11:21 Biggi ist offline Finden Als Freund hinzufügen
Erguterjunge
Guterjunge


Dabei seit: 29.06.08
Beiträge: 71
Fähigkeiten: WBB Lite 2 Profi; WBB Lite 1 Profi
Forenversion: 1.0

Themenstarter Thema begonnen von Erguterjunge
Antworten Zitieren Editieren Melden       UP

Danke geht wieder^^
21.09.08 12:50 Erguterjunge ist offline E-Mail Finden Als Freund hinzufügen
Baumstruktur | Brettstruktur
Gehe zu:

Neues Thema erstellen Antwort erstellen

yourWBB » WoltLab Burning Board Generation 2 * » Alles von und für das WBB Lite 1.0.x » [WBB Lite 1.0.x] Allg. Fragen und Probleme » Gruppe bearbeiten Fehler