vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Ignore Mods, but not Admins (https://vborg.vbsupport.ru/showthread.php?t=53467)

MetroSports82 05-27-2003 09:25 PM

Ignore Mods, but not Admins
 
yea, so i'm trying to figure out how to set this up, where i can have users ignore moderators, but not the admins, while having the "Ignore Moderators" enabled. I've serached the DB, and couldn't really find anything to this matter. I'm wondering if there is a way to have the admins bypass this? Any how, here is the block of code I've been working on. thanx. ;)

member2.php

PHP Code:

// ############################### start update list ###############################
if ($HTTP_POST_VARS['action']=="updatelist") {
  
$templatesused "redirect_updatelist";
  include(
"./global.php");
  
//check usergroup of user to see if they can use Profile
  
if ($bbuserinfo[userid]==0) {
    
show_nopermission();
  }

  if (
$userlist!="buddy") {
    
$userlist="ignore";
  }
  
$var=$userlist."list";

  
$listids="";
  while (list(
$key,$val)=each($listbits)) {
    if (
$userid=$DB_site->query_first("SELECT usergroupid, user.userid, moderator.userid as moduserid
                                       FROM user
                                       LEFT JOIN moderator ON (user.userid = moderator.userid)
                                       WHERE username='"
.addslashes(htmlspecialchars($val))."'")) {
      if (
$var=='ignorelist' and !$ignoremods and ($userid[usergroupid]==or $userid[usergroupid]==or $userid[moduserid]) and $bbuserinfo[usergroupid] != 6) {
        
$username=htmlspecialchars($val);
        eval(
"standarderror(\"".gettemplate("error_listignoreuser")."\");");
        exit;
      } else if (
$bbuserinfo['userid'] == $userid['userid']) {
        eval(
"standarderror(\"".gettemplate("error_cantlistself")."\");");
        exit;
      } else {
        
$listids.=$userid[userid]";
      }
    } else {
      if (
trim($val)!="") {
        
$username=htmlspecialchars($val);
        eval(
"standarderror(\"".gettemplate("error_listbaduser")."\");");
        exit;
      }
    }
  }

  
$listids=trim($listids);

  
$DB_site->query("UPDATE user SET $var='".addslashes($listids)."' WHERE userid=$bbuserinfo[userid]");

  eval(
"standardredirect(\"".gettemplate("redirect_updatelist")."\",\"usercp.php?s=$session[sessionhash]\");");



EDIT: nevermind, I think I figured it out. :)


All times are GMT. The time now is 10:03 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00964 seconds
  • Memory Usage 1,729KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete