$avatars = $assertor->getRowS('vBForum:getAvatarLimit', array('startat' => $limitlower - 1, 'perpage' => $vbulletin->GPC['perpage'])); $avatarcount = 0; if ($totalavatars > 0) { print_form_header('usertools', 'avatar'); construct_hidden_code('userid', $vbulletin->GPC['userid']); print_table_header($vbphrase['avatars_to_show_per_page_gcpuser'] . ': <input type="text" name="perpage" value="' . $vbulletin->GPC['perpage'] . '" size="5" tabindex="1" /> <input type="submit" class="button" value="' . $vbphrase['go'] . '" tabindex="1" /> '); print_table_footer(); } print_form_header('usertools', 'updateavatar', 1); print_table_header($vbphrase['avatars_gcpglobal']); $output = "<table border=\"0\" cellpadding=\"6\" cellspacing=\"1\" class=\"tborder\" align=\"center\" width=\"100%\">"; foreach ($avatars as $avatar) { $avatarid = $avatar['avatarid']; $avatar['avatarpath'] = resolve_cp_image_url($avatar['avatarpath']); if ($avatarcount == 0) { $output .= '<tr class="' . fetch_row_bgclass() . '">'; } $output .= "<td valign=\"bottom\" align=\"center\" width=\"20%\"><label for=\"av{$avatar['avatarid']}\"><input type=\"radio\" name=\"avatarid\" id=\"av{$avatar['avatarid']}\" value=\"{$avatar['avatarid']}\" tabindex=\"1\" {$avatarchecked[$avatarid]} />"; $output .= "<img src=\"{$avatar['avatarpath']}\" alt=\"\" /><br />{$avatar['title']}</label></td>"; $avatarcount++; if ($avatarcount == 5) { echo '</tr>'; $avatarcount = 0; } } if ($avatarcount != 0) { while ($avatarcount != 5) { $output .= '<td> </td>'; $avatarcount++;
} if ($user['hasprofilepic']) { if ($vbulletin->options['usefileavatar']) { $profilepicurl = resolve_cp_image_url($vbulletin->options['profilepicurl'] . "/profilepic{$user['userid']}_{$user['profilepicrevision']}.gif"); } else { $profilepicurl = "../image.php?" . $vbulletin->session->vars['sessionurl'] . "u={$user['userid']}&type=profile&dateline={$user['profilepicdateline']}"; } if ($user['profilepicwidth'] and $user['profilepicheight']) { $profilepicurl .= "\" width=\"{$user['profilepicwidth']}\" height=\"{$user['profilepicheight']}"; } } else { $profilepicurl = '../' . $vbulletin->options['cleargifurl']; } if ($user['hassigpic']) { if ($vbulletin->options['usefileavatar']) { $sigpicurl = resolve_cp_image_url($vbulletin->options['sigpicurl'] . "/sigpic{$user['userid']}_{$user['sigpicrevision']}.gif"); } else { $sigpicurl = "../image.php?" . $vbulletin->session->vars['sessionurl'] . "u={$user['userid']}&type=sigpic&dateline={$user['sigpicdateline']}"; } if ($user['sigpicwidth'] and $user['sigpicheight']) { $sigpicurl .= "\" width=\"{$user['sigpicwidth']}\" height=\"{$user['sigpicheight']}"; } } else { $sigpicurl = '../' . $vbulletin->options['cleargifurl']; } print_label_row($vbphrase['avatar'] . '<input type="image" src="../' . $vbulletin->options['cleargifurl'] . '" alt="" />', '<img src="' . $avatarurl . '" alt="" align="top" /> <input type="submit" class="button" tabindex="1" name="modifyavatar" value="' . $vbphrase['change_avatar'] . '" />'); print_label_row($vbphrase['profile_picture'] . '<input type="image" src="../' . $vbulletin->options['cleargifurl'] . '" alt="" />', '<img src="' . $profilepicurl . '" alt="" align="top" /> <input type="submit" class="button" tabindex="1" name="modifyprofilepic" value="' . $vbphrase['change_profile_picture'] . '" />'); print_label_row($vbphrase['signature_picture'] . '<input type="image" src="../' . $vbulletin->options['cleargifurl'] . '" alt="" />', '<img src="' . $sigpicurl . '" alt="" align="top" /> <input type="submit" class="button" tabindex="1" name="modifysigpic" value="' . $vbphrase['change_signature_picture'] . '" />'); print_table_break('', $INNERTABLEWIDTH); // USER CSS SECTION if ($user['cachedcss']) {
function construct_img_html($imagepath) { global $vbulletin; static $smiliePath = false; //The handling of images is a bit convoluted, but for smiles we need to respect the datastore smiliepath. See VBV-12255 if ($smiliePath === false) { if (!empty($vbulletin->GPC['table']) and $vbulletin->GPC['table'] == 'smilie') { $smiliePath = vB::getDatastore()->getOption('smiliepath'); } else { $smiliePath = ''; } } if (substr($imagepath, 0, strlen($smiliePath)) != $smiliePath) { $imagepath = $smiliePath . $imagepath; } // returns an image based on imagepath return '<img src="' . resolve_cp_image_url($imagepath) . "\" alt=\"{$imagepath}\" align=\"middle\" />"; }
function construct_img_html($imagepath) { // returns an image based on imagepath return '<img src="' . resolve_cp_image_url($imagepath) . "\" alt=\"{$imagepath}\" align=\"middle\" />"; }
} if ($user['profilepicwidth'] AND $user['profilepicheight']) { $profilepicurl .= "\" width=\"$user[profilepicwidth]\" height=\"$user[profilepicheight]"; } } else { $profilepicurl = '../' . $vbulletin->options['cleargifurl']; } if ($user['hassigpic']) { if ($vbulletin->options['usefileavatar']) { $sigpicurl = resolve_cp_image_url($vbulletin->options['sigpicurl'] . "/sigpic$user[userid]_$user[sigpicrevision].gif"); } else { $sigpicurl = "../image.php?" . $vbulletin->session->vars['sessionurl'] . "u=$user[userid]&type=sigpic&dateline=$user[sigpicdateline]"; } if ($user['sigpicwidth'] AND $user['sigpicheight']) { $sigpicurl .= "\" width=\"$user[sigpicwidth]\" height=\"$user[sigpicheight]"; } } else { $sigpicurl = '../' . $vbulletin->options['cleargifurl']; }