print_label_row($vbphrase["{$permvalue['phrase']}"], $getval); construct_hidden_code($vbphrase["{$permvalue['phrase']}"], $getval); continue; } } print_input_row($vbphrase["{$permvalue['phrase']}"], "usergroup[{$permtitle}]", $getval, 1, 20); } else { $getval = $ug_bitfield["{$permvalue['parentgroup']}"]["{$permtitle}"]; if (isset($permvalue['readonly'])) { // This permission is readonly for certain usergroups $readonlyids = explode(',', $permvalue['readonly']); if (in_array($vbulletin->GPC['usergroupid'], $readonlyids)) { if ($permvalue['readonlyvalue'] == 'true') { print_yes_row($vbphrase["{$permvalue['phrase']}"], "usergroup[{$permvalue['parentgroup']}][{$permtitle}]", $vbphrase['yes'], true); } else { print_yes_row($vbphrase["{$permvalue['phrase']}"], "usergroup[{$permvalue['parentgroup']}][{$permtitle}]", $vbphrase['no'], false); } continue; } } print_yes_no_row($vbphrase["{$permvalue['phrase']}"], "usergroup[{$permvalue['parentgroup']}][{$permtitle}]", $getval); } } print_table_break(); print_column_style_code(array('width: 70%', 'width: 30%')); } print_submit_row(iif($_REQUEST['do'] == 'add', $vbphrase['save'], $vbphrase['update'])); } // ###################### Start insert / update ####################### if ($_POST['do'] == 'update') { $vbulletin->input->clean_array_gpc('p', array('usergroup' => TYPE_ARRAY, 'ugid_base' => TYPE_INT));
if ($fileext == '.gif' or $fileext == '.bmp' or $fileext == '.jpg' or $fileext == 'jpeg' or $fileext == 'png') { $FileArray[] = htmlspecialchars_uni($filename); } } } if (!is_array($FileArray)) { print_stop_message('no_matches_found'); } print_form_header('ranks', 'insert', 0, 1, 'name', ''); print_table_header($vbphrase['images']); construct_hidden_code('usergroupid', $vbulletin->GPC['usergroupid']); construct_hidden_code('ranklevel', $vbulletin->GPC['ranklevel']); construct_hidden_code('minposts', $vbulletin->GPC['minposts']); construct_hidden_code('doinsert', $vbulletin->GPC['rankimg']); foreach ($FileArray as $key => $val) { print_yes_row("<img src='../" . $vbulletin->GPC['rankimg'] . "/{$val}' border='0' alt='' align='center' />", 'rankimg', '', '', $vbulletin->GPC['rankimg'] . "/{$val}"); } print_submit_row($vbphrase['save']); closedir($dirhandle); exit; } else { // Not a valid dir so assume it is a filename if (!@is_file(DIR . '/' . $vbulletin->GPC['rankimg'])) { print_stop_message('invalid_file_path_specified'); } } $type = 0; } else { $vbulletin->GPC['rankimg'] = $vbulletin->GPC['rankhtml']; $type = 1; }
} else { print_yes_row($vbphrase['delete_avatar'], 'avatarid', $vbphrase['yes'], '', -1); } print_table_break(); print_table_header($vbphrase['custom_avatar']); require_once DIR . '/includes/functions_user.php'; $userinfo['avatarurl'] = fetch_avatar_url($userinfo['userid']); if (empty($userinfo['avatarurl']) or $userinfo['avatarid'] != 0) { $userinfo['avatarurl'] = '<img src="' . vB::getDatastore()->getOption('bburl') . '/' . $vbulletin->options['cleargifurl'] . '" alt="" border="0" />'; } else { $userinfo['avatarurl'] = "<img src=\"../" . $userinfo['avatarurl'][0] . "\" " . $userinfo['avatarurl'][1] . " alt=\"\" border=\"0\" />"; } if (!empty($avatarchecked[0])) { print_label_row($vbphrase['custom_avatar'], $userinfo['avatarurl']); } print_yes_row(!empty($avatarchecked[0]) ? $vbphrase['use_current_avatar'] : $vbphrase['add_new_custom_avatar'], 'avatarid', $vbphrase['yes'], $avatarchecked[0], 0); cache_permissions($userinfo, false); // if ($userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canuseavatar'] AND ($userinfo['permissions']['avatarmaxwidth'] > 0 OR $userinfo['permissions']['avatarmaxheight'] > 0)) // { // print_yes_no_row($vbphrase['resize_image_to_users_maximum_allowed_size'], 'resize'); // } print_input_row($vbphrase['enter_image_url_gcpuser'], 'avatarurl', 'http://'); print_upload_row($vbphrase['upload_image_from_computer'], 'upload'); construct_hidden_code('userid', $vbulletin->GPC['userid']); print_submit_row($vbphrase['save']); } // ###################### Start Update Avatar ################ if ($_POST['do'] == 'updateavatar') { $vbulletin->input->clean_array_gpc('p', array('userid' => vB_Cleaner::TYPE_UINT, 'avatarid' => vB_Cleaner::TYPE_INT, 'avatarurl' => vB_Cleaner::TYPE_STR)); $useavatar = iif($vbulletin->GPC['avatarid'] == -1, 0, 1); $userinfo = fetch_userinfo($vbulletin->GPC['userid']);
} if ($nouseavatarchecked) { print_description_row($vbphrase['user_has_no_avatar']); } else { print_yes_row($vbphrase['delete_avatar'], 'avatarid', $vbphrase['yes'], '', -1); } print_table_break(); print_table_header($vbphrase['custom_avatar']); require_once DIR . '/includes/functions_user.php'; $userinfo['avatarurl'] = fetch_avatar_url($userinfo['userid']); if ($userinfo['avatarurl'] == '' or $userinfo['avatarid'] != 0) { $userinfo['avatarurl'] = '<img src="' . $vbulletin->options['cleargifurl'] . '" alt="" border="0" />'; } else { $userinfo['avatarurl'] = "<img src=\"../" . $userinfo['avatarurl'][0] . "\" " . $userinfo['avatarurl'][1] . " alt=\"\" border=\"0\" />"; } print_yes_row(iif($avatarchecked[0] != '', $vbphrase['use_current_avatar'] . ' ' . $userinfo['avatarurl'], $vbphrase['add_new_custom_avatar']), 'avatarid', $vbphrase['yes'], $avatarchecked[0], 0); cache_permissions($userinfo, false); if ($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'] and $userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canuseavatar'] and ($userinfo['permissions']['avatarmaxwidth'] > 0 or $userinfo['permissions']['avatarmaxheight'] > 0)) { print_yes_no_row($vbphrase['resize_image_to_users_maximum_allowed_size'], 'resize'); } print_input_row($vbphrase['enter_image_url'], 'avatarurl', 'http://www.'); print_upload_row($vbphrase['upload_image_from_computer'], 'upload'); construct_hidden_code('userid', $vbulletin->GPC['userid']); print_submit_row($vbphrase['save']); } // ###################### Start Update Avatar ################ if ($_POST['do'] == 'updateavatar') { if (!can_moderate(0, 'caneditavatar')) { print_stop_message('no_permission_avatars'); } $vbulletin->input->clean_array_gpc('p', array('avatarid' => TYPE_INT, 'avatarurl' => TYPE_STR, 'resize' => TYPE_BOOL));
} else { if ($vbulletin->GPC['dostyleid'] == -1) { $style = array('styleid' => -1, 'title' => $vbphrase['master_style']); } else { $style = $db->query_first("\n\t\t\t\tSELECT styleid, title\n\t\t\t\tFROM " . TABLE_PREFIX . "style\n\t\t\t\tWHERE styleid = " . $vbulletin->GPC['dostyleid']); } print_form_header('css', 'doedit', false, true, 'cpform', '90%', '', true, 'get'); construct_hidden_code('dostyleid', $style['styleid']); construct_hidden_code('group', $vbulletin->GPC['group']); print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['fonts_colors_etc'], $style['title'], $style['styleid'])); print_yes_row($vbphrase['all_style_options'], 'dowhat', $vbphrase['yes'], true, 'all'); print_yes_row($vbphrase['common_templates'], 'dowhat', $vbphrase['yes'], false, 'templates'); print_yes_row($vbphrase['stylevars'], 'dowhat', $vbphrase['yes'], false, 'stylevars'); print_yes_row($vbphrase['main_css'], 'dowhat', $vbphrase['yes'], false, 'maincss'); print_yes_row($vbphrase['replacement_variables'], 'dowhat', $vbphrase['yes'], false, 'replacements'); print_yes_row($vbphrase['toolbar_menu_options'], 'dowhat', $vbphrase['yes'], false, 'posteditor'); print_submit_row($vbphrase['go'], 0); } } // ###################### Start Edit CSS ####################### if ($_REQUEST['do'] == 'doedit') { $vbulletin->input->clean_array_gpc('r', array('dostyleid' => TYPE_INT, 'group' => TYPE_STR, 'dowhat' => TYPE_STR, 'colorPickerType' => TYPE_INT)); if ($vbulletin->GPC['dostyleid'] == 0 or $vbulletin->GPC['dostyleid'] < -1) { print_stop_message('invalid_style_specified'); } // get data from styles table cache_styles(); if (!isset($stylecache[$vbulletin->GPC['dostyleid']]) and !$vbulletin->debug) { print_stop_message('invalid_style_specified'); } ?>
if ($fileext == '.gif' or $fileext == '.bmp' or $fileext == '.jpg' or $fileext == 'jpeg' or $fileext == 'png') { $FileArray[] = htmlspecialchars_uni($filename); } } } if (!is_array($FileArray)) { print_stop_message2('no_matches_found_gerror'); } print_form_header('ranks', 'insert', 0, 1, 'name', ''); print_table_header($vbphrase['images_gcprank']); construct_hidden_code('usergroupid', $iClean['usergroupid']); construct_hidden_code('ranklevel', $iClean['ranklevel']); construct_hidden_code('minposts', $iClean['minposts']); construct_hidden_code('doinsert', $iClean['rankimg']); foreach ($FileArray as $key => $val) { print_yes_row("<img src='../" . $iClean['rankimg'] . "/{$val}' border='0' alt='' align='center' />", 'rankimg', '', '', $iClean['rankimg'] . "/{$val}"); } print_submit_row($vbphrase['save']); closedir($dirhandle); exit; } else { // Not a valid dir so assume it is a filename $iClean['rankimg'] = '/' . ltrim($iClean['rankimg'], '/'); if (!@is_file(DIR . $iClean['rankimg'])) { print_stop_message2('invalid_file_path_specified'); } } $type = 0; } } /*insert query*/
if (!empty($vbulletin->GPC['dowhat'])) { $_REQUEST['do'] = 'doedit'; } else { if ($vbulletin->GPC['dostyleid'] == -1) { $style = array('styleid' => -1, 'title' => $vbphrase['master_style']); } else { $style = $assertor->getRow('vBForum:style', array('styleid' => $vbulletin->GPC['dostyleid'])); } print_form_header('css', 'doedit', false, true, 'cpform', '90%', '', true, 'get'); construct_hidden_code('dostyleid', $style['styleid']); construct_hidden_code('group', $vbulletin->GPC['group']); print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['fonts_colors_etc'], $style['title'], $style['styleid'])); if ($userContext->hasAdminPermission('canadmintemplates')) { print_yes_row($vbphrase['common_templates'], 'dowhat', $vbphrase['yes'], false, 'templates'); } print_yes_row($vbphrase['replacement_variables'], 'dowhat', $vbphrase['yes'], false, 'replacements'); print_submit_row($vbphrase['go'], 0); } } // ###################### Start Edit CSS ####################### if ($_REQUEST['do'] == 'doedit') { global $colorPickerType, $colorPickerWidth, $numcolors; $vbulletin->input->clean_array_gpc('r', array('dostyleid' => vB_Cleaner::TYPE_INT, 'group' => vB_Cleaner::TYPE_STR, 'dowhat' => vB_Cleaner::TYPE_STR, 'colorPickerType' => vB_Cleaner::TYPE_INT)); if ($vbulletin->GPC['dostyleid'] == 0 or $vbulletin->GPC['dostyleid'] < -1) { print_stop_message2('invalid_style_specified'); } $stylecache = vB_Library::instance('Style')->fetchStyles(false, false); if (!isset($stylecache[$vbulletin->GPC['dostyleid']]) and !$vb5_config['Misc']['debug']) { print_stop_message2('invalid_style_specified'); } ?>
{ $getval = $ug_bitfield["$permvalue[parentgroup]"]["$permtitle"]; if (isset($permvalue['readonly'])) { // This permission is readonly for certain usergroups $readonlyids = explode(',', $permvalue['readonly']); if (in_array($vbulletin->GPC['usergroupid'], $readonlyids)) { if ($permvalue['readonlyvalue'] == 'true') { print_yes_row($vbphrase["$permvalue[phrase]"], "usergroup[$permvalue[parentgroup]][$permtitle]", $vbphrase['yes'], true); } else { print_yes_row($vbphrase["$permvalue[phrase]"], "usergroup[$permvalue[parentgroup]][$permtitle]", $vbphrase['no'], false); } continue; } } print_yes_no_row($vbphrase["$permvalue[phrase]"], "usergroup[$permvalue[parentgroup]][$permtitle]", $getval); } } print_table_break(); print_column_style_code(array('width: 70%', 'width: 30%')); } print_submit_row(iif($_REQUEST['do'] == 'add', $vbphrase['save'], $vbphrase['update'])); }