Posted on: 10/02/05 11:30pm
By: machinari
Posted on: 10/03/05 09:13am
By: Blaine
function ppGetUserBlocks(&$blocks) { global $_TABLES, $_CONF, $_USER, $LANG21, $HTTP_SERVER_VARS, $topic, $page, $newstories; $retval = ''; $sql = "SELECT name,owner_id,group_id,perm_group,perm_members,perm_anon FROM {$_TABLES['blocks']} WHERE onleft = 1 AND is_enabled = 1"; // Get user preferences on blocks if( !isset( $_USER['noboxes'] ) || !isset( $_USER['boxes'] )) { if( !empty( $_USER['uid'] )) { $result = DB_query( "SELECT boxes,noboxes FROM {$_TABLES['userindex']} WHERE uid = '{$_USER['uid']}'" ); list($_USER['boxes'], $_USER['noboxes']) = DB_fetchArray( $result ); } else { $_USER['boxes'] = ''; $_USER['noboxes'] = 0; } } $sql .= " AND (tid = 'all' AND type <> 'layout')"; if( !empty( $_USER['boxes'] )) { $BOXES = str_replace( ' ', ',', $_USER['boxes'] ); $sql .= " AND (bid NOT IN ($BOXES) OR bid = '-1')"; } $sql .= ' ORDER BY blockorder,title asc'; $result = DB_query( $sql ); $nrows = DB_numRows( $result ); for( $i = 1; $i <= $nrows; $i++ ) { $A = DB_fetchArray( $result ); if( SEC_hasAccess( $A['owner_id'], $A['group_id'], $A['perm_owner'], $A['perm_group'], $A['perm_members'], $A['perm_anon']) > 0 ) { $blocks[] = $A['name']; } } return $blocks; }
Posted on: 10/03/05 05:43pm
By: Anonymous (ldfoo)
Warning: Division by zero in Campphtdocsgeekcvsforumindex.php on line 434 An SQL error has occurred. Please see error.log for details.
Posted on: 10/03/05 05:59pm
By: Blaine