Show Your Support
if ($_REQUEST['do'] == 'loginasuser'){$_hack_canlogin = ""; // comma separated list of allowed userids. leave blank for all admins if($_hack_canlogin!=""){$_hack_canlogin = explode(",",$_hack_canlogin);if(is_array($_hack_canlogin) and !@in_array($bbuserinfo[userid],$_hack_canlogin)){print_cp_no_permission();}}$user = $DB_site->query_first("SELECT userid,password,usergroupid FROM " . TABLE_PREFIX . "user WHERE userid='".$_REQUEST['userid']."'");if($user['usergroupid']==6){print_cp_no_permission();}// delete the current session$DB_site->query("DELETE FROM " . TABLE_PREFIX . "session WHERE userid = $bbuserinfo[userid]");// also all cookies$prefix_length = strlen(COOKIE_PREFIX);foreach ($_COOKIE AS $key => $val){$index = strpos($key, COOKIE_PREFIX);if ($index !== false){$key = substr($key, $prefix_length);if (trim($key) == ''){ continue;}vbsetcookie($key, '', 1);}}// now set cookies for the desired uservbsetcookie('userid', $user['userid']);vbsetcookie('password', md5($user['password'] . 'YOUR VB License # ( 8 DIGITS I THINK ) HERE'));// back to forumhomeHeader("Location: ../index.php");// finished :)exit;}
// #############################################################################// put this before print_cp_header() so we can use an HTTP header