'.$lang_common['Login'].' '.$lang_common['or'].' '.$lang_common['register'].'.'); $action = isset($_GET['action']); $id = intval($_GET['id']); if ($id < 2) message($lang_common['Bad request']); // Load the profile.php/register.php language file require 'lang/'.$language.'/'.$language.'_prof_reg.php'; // Load the profile.php language file require 'lang/'.$language.'/'.$language.'_profile.php'; if ($action == 'change_pass') { if (isset($_GET['key'])) { // If the user is already logged in we shouldn't be here :) if (!$cookie['is_guest']) header('Location: index.php'); $key = $_GET['key']; $result = $db->query('SELECT activate_string, activate_key FROM '.$db->prefix.'users WHERE id='.$id) or error('Unable to fetch new password', __FILE__, __LINE__, $db->error()); list($new_password, $new_password_key) = $db->fetch_row($result); if (strcmp($key, $new_password_key)) message($lang_profile['Pass key bad'].' '.$options['admin_email'].'.'); else { $db->query('UPDATE '.$db->prefix.'users SET password=\''.$new_password.'\', activate_string=NULL, activate_key=NULL WHERE id='.$id) or error('Unable to update password', __FILE__, __LINE__, $db->error()); message($lang_profile['Pass updated']); } } // Make sure we are allowed to change this users password if ($cur_user['id'] != $id) { if ($cur_user['status'] < 1) // A regular user trying to change another users password? message($lang_common['No permission']); else if ($cur_user['status'] == 1) // A moderator trying to change an admin/mod's password? { $result = $db->query('SELECT status FROM '.$db->prefix.'users WHERE id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error()); if (!$db->num_rows($result)) message($lang_common['Bad request']); else if ($db->result($result) > 0) message($lang_common['No permission']); } } if (isset($_POST['form_sent'])) { $old_password = un_escape(isset($_POST['req_old_password'])); $new_password1 = un_escape(isset($_POST['req_new_password1'])); $new_password2 = un_escape(isset($_POST['req_new_password2'])); if (strlen($new_password1) < 4) message($lang_prof_reg['Pass too short']); if ($new_password1 != $new_password2) message($lang_prof_reg['Pass not match']); $result = $db->query('SELECT password, save_pass FROM '.$db->prefix.'users WHERE id='.$id) or error('Unable to fetch password', __FILE__, __LINE__, $db->error()); list($correct_password, $save_pass) = $db->fetch_row($result); if ($correct_password != NULL && !strcmp($correct_password, md5($old_password)) || $cur_user['status'] > 0) { $db->query('UPDATE '.$db->prefix.'users SET password=\''.md5($new_password1).'\' WHERE id='.$id) or error('Unable to update password', __FILE__, __LINE__, $db->error()); if ($cur_user['id'] == $id) { $expire = ($save_pass == '1') ? time() + 31536000 : 0; list(, , $last_action, $last_timeout) = unserialize(un_escape($_COOKIE['punbb_cookie'])); setcookie('punbb_cookie', serialize(array($cookie['username'], md5($new_password1), $last_action, $last_timeout)), $expire, $cookie_path, $cookie_domain, $cookie_secure); } redirect('profile.php?id='.$id, $lang_profile['Pass updated redirect']); } else message($lang_profile['Wrong pass']); } else { $page_title = htmlspecialchars($options['board_title']).' / '.$lang_profile['Profile']; $validate_form = true; $form_name = 'change_pass'; $focus_element = ($cur_user['status'] < 1) ? 'req_old_password' : 'req_new_password1'; require 'header.php'; ?>
 
    
    
   
  
  

 
query('SELECT activate_string, activate_key FROM '.$db->prefix.'users WHERE id='.$id) or error('Unable to fetch activation data', __FILE__, __LINE__, $db->error()); list($new_email, $new_email_key) = $db->fetch_row($result); if (strcmp($key, $new_email_key)) message($lang_profile['E-mail key bad'].' '.$options['admin_email'].'.'); else { $db->query('UPDATE '.$db->prefix.'users SET email=\''.$new_email.'\', activate_string=NULL, activate_key=NULL WHERE id='.$id) or error('Unable to update e-mail address', __FILE__, __LINE__, $db->error()); message($lang_profile['E-mail updated']); } } else if (isset($_POST['form_sent'])) { require 'include/email.php'; // Validate the email-address $new_email = strtolower(trim($_POST['req_new_email'])); if (!is_valid_email($new_email)) message($lang_common['Invalid e-mail']); // Check it it's a banned e-mail address if (is_banned_email($new_email)) { if ($permissions['allow_banned_email'] == '0') message($lang_prof_reg['Banned e-mail']); else if ($options['mailing_list'] != '') { $mail_subject = 'Alert - Banned e-mail detected'; $mail_message = 'User "'.$cur_user['username'].'" changed to banned e-mail address: '.$new_email."\r\n\r\n".'User profile: '.$options['base_url'].'/profile.php?id='.$id; $mail_extra = 'From: '.$options['board_title'].' Mailer <'.$options['webmaster_email'].'>'; require 'include/email.php'; pun_mail($options['mailing_list'], $mail_subject, $mail_message, $mail_extra); } } // Check if someone else already has registered with that e-mail address $result = $db->query('SELECT id, username FROM '.$db->prefix.'users WHERE email=\''.$new_email.'\'') or error('Unable to fetch user info', __FILE__, __LINE__, $db->error()); $num_dupes = $db->num_rows($result); if ($num_dupes) // We found duplicate e-mail addresses { if ($permissions['allow_dupe_email'] == '0') message($lang_prof_reg['Dupe e-mail']); else if ($options['mailing_list'] != '') { while ($cur_dupe = $db->fetch_assoc($result)) $dupe_list[] = $cur_dupe['username']; $mail_subject = 'Alert - Duplicate e-mail detected'; $mail_message = 'User "'.$cur_user['username'].'" changed to an e-mail address that also belongs to: '.implode(', ', $dupe_list)."\r\n\r\n".'User profile: '.$options['base_url'].'/profile.php?id='.$id; $mail_extra = 'From: '.$options['board_title'].' Mailer <'.$options['webmaster_email'].'>'; require 'include/email.php'; pun_mail($options['mailing_list'], $mail_subject, $mail_message, $mail_extra); } } $new_email_key = random_pass(8); $db->query('UPDATE '.$db->prefix.'users SET activate_string=\''.$new_email.'\', activate_key=\''.$new_email_key.'\' WHERE id='.$id) or error('Unable to update activation data', __FILE__, __LINE__, $db->error()); $mail_subject = $lang_profile['Change mail 1']; $mail_message = $lang_profile['Change mail 2'].' '.$cur_user['username'].','."\r\n\r\n".$lang_profile['Change mail 3'].' '.$options['base_url'].'/. '.$lang_profile['Change mail 4']."\r\n\r\n".$lang_profile['Change mail 5']."\r\n".$options['base_url'].'/profile.php?action=change_email&id='.$id.'&key='.$new_email_key."\r\n\r\n".'/Forum Mailer'."\r\n".'('.$lang_profile['Change mail 6'].')'; $mail_extra = 'From: '.$options['board_title'].' Mailer <'.$options['webmaster_email'].'>'; pun_mail($new_email, $mail_subject, $mail_message, $mail_extra); message($lang_profile['Change mail 7'].' '.$new_email.' '.$lang_profile['Change mail 8'].' '.$options['admin_email'].'.'); } else { $page_title = htmlspecialchars($options['board_title']).' / '.$lang_profile['Profile']; $validate_form = true; $form_name = 'change_email'; $focus_element = 'req_new_email'; require 'header.php'; ?>
 
 
    
  
  

 
$pun_config['o_avatars_width']) { message($lang_profile['Too wide'].' '.$pun_config['o_avatars_width'].' '.$lang_profile['pixels'].'.'); } if ($height > $pun_config['o_avatars_height']) { message($lang_profile['Too high'].' '.$pun_config['o_avatars_height'].' '.$lang_profile['pixels'].'.'); } if ($uploaded_file['size'] > $pun_config['o_avatars_size']) { message($lang_profile['Too large'].' '.$pun_config['o_avatars_size'].' '.$lang_profile['bytes'].'.'); } if ($uploaded_file['type'] == 'image/gif') { $temp = @move_uploaded_file($uploaded_file['tmp_name'], $pun_config['o_avatars_dir'].'/'.$id.'.gif'); @chmod($pun_config['o_avatars_dir'].'/'.$id.'.gif', 0644); @unlink($pun_config['o_avatars_dir'].'/'.$id.'.jpg'); @unlink($pun_config['o_avatars_dir'].'/'.$id.'.png'); } else if ($uploaded_file['type'] == 'image/jpeg' || $uploaded_file['type'] == 'image/pjpeg') { $temp = @move_uploaded_file($uploaded_file['tmp_name'], $pun_config['o_avatars_dir'].'/'.$id.'.jpg'); @chmod($pun_config['o_avatars_dir'].'/'.$id.'.jpg', 0644); @unlink($pun_config['o_avatars_dir'].'/'.$id.'.gif'); @unlink($pun_config['o_avatars_dir'].'/'.$id.'.png'); } else if ($uploaded_file['type'] == 'image/png' || $uploaded_file['type'] == 'image/x-png') { $temp = @move_uploaded_file($uploaded_file['tmp_name'], $pun_config['o_avatars_dir'].'/'.$id.'.png'); @chmod($pun_config['o_avatars_dir'].'/'.$id.'.png', 0644); @unlink($pun_config['o_avatars_dir'].'/'.$id.'.gif'); @unlink($pun_config['o_avatars_dir'].'/'.$id.'.jpg'); if (!$temp) message($lang_profile['Move failed'].' '.$pun_config['o_admin_email'].'.'); } else { message($lang_profile['Unknown failure']); } // Enable use_avatar (seems sane since the user just uploaded an avatar) $result = $db->query('UPDATE '.$db->prefix.'users SET use_avatar=1 WHERE id='.$id); if (!$result) { error('Unable to update avatar state', __FILE__, __LINE__, $db->error()); } redirect('profile.php?id='.$id, $lang_profile['Avatar upload redirect']); } else { $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_profile['Profile']; $validate_form = true; $element_names = array('req_file' => $lang_profile['File']); $form_name = 'upload_avatar'; $focus_element = 'req_file'; require $pun_root.'header.php'; } ?>
 
KB).
 
    
  
  

 
query('UPDATE '.$db->prefix.'users SET status='.$_POST['status'].' WHERE id='.$id) or error('Unable to update status', __FILE__, __LINE__, $db->error()); redirect('profile.php?id='.$id, $lang_profile['Update status redirect']); } else if (isset($_POST['update_forums'])) { if ($cur_user['status'] < 2) message($lang_common['No permission']); confirm_referer('profile.php'); // Get the username of the user we are processing $result = $db->query('SELECT username FROM '.$db->prefix.'users WHERE id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error()); $username = $db->result($result, 0); $moderator_in = (isset($_POST['moderator_in'])) ? array_keys($_POST['moderator_in']) : array(); // Loop through all forums $result = $db->query('SELECT id, moderators FROM '.$db->prefix.'forums') or error('Unable to fetch forum list', __FILE__, __LINE__, $db->error()); while ($cur_forum = $db->fetch_assoc($result)) { $cur_moderators = ($cur_forum['moderators'] != '') ? unserialize($cur_forum['moderators']) : array(); // If the user should have moderator access (and he/she doesn't already have it) if (in_array($cur_forum['id'], $moderator_in) && !in_array($id, $cur_moderators)) { $cur_moderators[$username] = $id; ksort($cur_moderators); $db->query('UPDATE '.$db->prefix.'forums SET moderators=\''.addslashes(serialize($cur_moderators)).'\' WHERE id='.$cur_forum['id']) or error('Unable to update forum', __FILE__, __LINE__, $db->error()); } // If the user shouldn't have moderator access (and he/she already has it) else if (!in_array($cur_forum['id'], $moderator_in) && in_array($id, $cur_moderators)) { unset($cur_moderators[$username]); $cur_moderators = (!empty($cur_moderators)) ? '\''.addslashes(serialize($cur_moderators)).'\'' : 'NULL'; $db->query('UPDATE '.$db->prefix.'forums SET moderators='.$cur_moderators.' WHERE id='.$cur_forum['id']) or error('Unable to update forum', __FILE__, __LINE__, $db->error()); } } redirect('profile.php?id='.$id, $lang_profile['Update forums redirect']); } else if (isset($_POST['ban'])) { if ($cur_user['status'] < 1) message($lang_common['No permission']); redirect('admin_bans.php?add_ban='.$id, $lang_profile['Ban redirect']); } else if (isset($_POST['delete']) || isset($_POST['comply'])) { if ($cur_user['status'] < 2) message($lang_common['No permission']); confirm_referer('profile.php'); if (isset($_POST['comply'])) { // If the user is a moderator or an administrator, we remove him/her from the moderator list in all forums as well $result = $db->query('SELECT username, status FROM '.$db->prefix.'users WHERE id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error()); list($username, $status) = $db->fetch_row($status); if ($status > 0) { $result = $db->query('SELECT id, moderators FROM '.$db->prefix.'forums') or error('Unable to fetch forum list', __FILE__, __LINE__, $db->error()); while ($cur_forum = $db->fetch_assoc($result)) { $cur_moderators = ($cur_forum['moderators'] != '') ? unserialize($cur_forum['moderators']) : array(); if (in_array($id, $cur_moderators)) { unset($cur_moderators[$username]); $cur_moderators = (!empty($cur_moderators)) ? '\''.addslashes(serialize($cur_moderators)).'\'' : 'NULL'; $db->query('UPDATE '.$db->prefix.'forums SET moderators='.$cur_moderators.' WHERE id='.$cur_forum['id']) or error('Unable to update forum', __FILE__, __LINE__, $db->error()); } } } // Delete the user $db->query('DELETE FROM '.$db->prefix.'users WHERE id='.$id) or error('Unable to delete user', __FILE__, __LINE__, $db->error()); // Set all his/her posts to guest $db->query('UPDATE '.$db->prefix.'posts SET poster_id=1 WHERE poster_id='.$id) or error('Unable to update posts', __FILE__, __LINE__, $db->error()); redirect('index.php', $lang_profile['User delete redirect']); } else { $page_title = htmlspecialchars($options['board_title']).' / '.$lang_profile['Profile']; require 'header.php'; ?>
 

 

 

    

 
0) { confirm_referer('profile.php'); $username = trim(un_escape($_POST['username'])); $old_username = trim(un_escape($_POST['old_username'])); if (strlen($username) < 2) message($lang_prof_reg['Username too short']); else if (!strcasecmp($username, 'Guest') || !strcasecmp($username, $lang_common['Guest'])) message($lang_prof_reg['Username guest']); else if (preg_match('/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/', $username)) message($lang_prof_reg['Username IP']); else if (preg_match('#\[b\]|\[/b\]|\[u\]|\[/u\]|\[i\]|\[/i\]|\[color|\[/color\]|\[quote\]|\[/quote\]|\[code\]|\[/code\]|\[img\]|\[/img\]|\[url|\[/url\]|\[email|\[/email\]#i', $username)) message($lang_prof_reg['Username BBCode']); // Check that the username is not already registered $result = $db->query('SELECT 1 FROM '.$db->prefix.'users WHERE username=\''.addslashes($username).'\' AND id!='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error()); if ($db->num_rows($result)) message($lang_profile['Dupe username']); } // Make sure all newlines are \n and not \r\n or \r $signature = str_replace("\r", "\n", str_replace("\r\n", "\n", trim(un_escape($_POST['signature'])))); // Validate signature if (strlen($signature) > $permissions['sig_length']) message($lang_prof_reg['Sig too long'].' '.$permissions['sig_length'].' '.$lang_prof_reg['characters'].'.'); else if (substr_count($signature, "\n") > ($permissions['sig_lines']-1)) message($lang_prof_reg['Sig too many lines'].' '.$permissions['sig_lines'].' '.$lang_prof_reg['lines'].'.'); else if ($signature && $permissions['sig_all_caps'] == '0' && !ereg( "[[:lower:]]", $signature)) message($lang_prof_reg['Sig caps']); if ($permissions['sig_bbcode'] == '1') { // Change all BBCodes to lower case (this way a lot of regex searches can be case sensitive) $a = array('[B]', '[I]', '[U]', '[/B]', '[/I]', '[/U]'); $b = array('[b]', '[i]', '[u]', '[/b]', '[/i]', '[/u]'); $message = str_replace($a, $b, isset($message)); $a = array('#\[colou?r=([a-zA-Z]*|\#?[0-9a-fA-F]{6})\]#i', '#\[/colou?r\]#i', '#\[img\]#i', '#\[/img\]#i', '#\[email\]#i', '#\[email=#i', '#\[/email\]#i', '#\[url\]#i', '#\[url=#i', '#\[/url\]#i'); $b = array('[color=\\1]', '[/color]', '[img]', '[/img]', '[email]', '[email=', '[/email]', '[url]', '[url=', '[/url]'); $message = preg_replace($a, $b, isset($message)); if (preg_match('/\[quote\]|\[\/quote\]|\[code\]|\[\/code\]/i', $signature)) message($lang_prof_reg['Signature quote/code']); } if ($options['regs_validate'] == '0' || $cur_user['status'] > 0) { require 'include/email.php'; // Validate the email-address $email = strtolower(trim($_POST['req_email'])); if (!is_valid_email($email)) message($lang_common['Invalid e-mail']); } // Add http:// if the URL doesn't contain it already if ($form['url'] != '' && !stristr($form['url'], 'http://')) $form['url'] = 'http://'.$form['url']; // If the ICQ UIN contains anything other than digits it's invalid if ($form['icq'] != '' && preg_match('/[^0-9]/', $form[icq])) message($lang_prof_reg['Bad ICQ']); if ($form['disp_topics'] != '' && intval($form['disp_topics']) < 3) $form['disp_topics'] = 3; if ($form['disp_topics'] != '' && intval($form['disp_topics']) > 75) $form['disp_topics'] = 75; if ($form['disp_posts'] != '' && intval($form['disp_posts']) < 3) $form['disp_posts'] = 3; if ($form['disp_posts'] != '' && intval($form['disp_posts']) > 75) $form['disp_posts'] = 75; if (isset($form['use_avatar']) != '1') $form['use_avatar'] = '0'; if (isset($form['hide_email']) != '1') $form['hide_email'] = '0'; if ($form['save_pass'] != '1') $form['save_pass'] = '0'; if ($form['smilies'] != '1') $form['smilies'] = '0'; if ($form['show_img'] != '1') $form['show_img'] = '0'; if ($form['show_sig'] != '1') $form['show_sig'] = '0'; if ($form['link_to_new_win'] != '1') $form['link_to_new_win'] = '0'; // Singlequotes around non-empty values and NULL for empty values foreach ($form as $key => $input) { $value = ($input != '') ? '\''.escape($input).'\'' : 'NULL'; $temp[] = $key.'='.$value; } if ($cur_user['status'] < 1) { if ($permissions['users_set_title'] == '1') { $user_title = trim($_POST['title']); if ($user_title != '') { // A list of words that the title may not contain // If $language == 'en', there will be some duplicates, but it's not the end of the world $forbidden = array('Member', 'Moderator', 'Administrator', 'Banned', 'Guest', $lang_common['Member'], $lang_common['Moderator'], $lang_common['Administrator'], $lang_common['Banned'], $lang_common['Guest']); if (in_array($user_title, $forbidden)) message($lang_profile['Forbidden title']); } $user_title_sql = ($user_title != '') ? 'title=\''.escape($user_title).'\', ' : 'title=NULL, '; } $email_sql = ($options['regs_validate'] == '0') ? 'email=\''.$email.'\', ' : ''; $db->query('UPDATE '.$db->prefix.'users SET '.$email_sql.$user_title_sql.'signature=\''.addslashes($signature).'\', '.implode(',', $temp).' WHERE id='.$id) or error('Unable to update profile', __FILE__, __LINE__, $db->error()); } else { $user_title = trim($_POST['title']); $admin_note = trim($_POST['admin_note']); $user_title = ($user_title != '') ? '\''.escape($user_title).'\'' : 'NULL'; $admin_note = ($admin_note != '') ? '\''.escape($admin_note).'\'' : 'NULL'; // We only allow administrators to update the post counter $posts_sql = ($cur_user['status'] > 1) ? 'num_posts='.intval($_POST['num_posts']).', ' : ''; $db->query('UPDATE '.$db->prefix.'users SET username=\''.addslashes($username).'\', email=\''.$email.'\', title='.$user_title.', signature=\''.addslashes($signature).'\', '.implode(',', $temp).', '.$posts_sql.'admin_note='.$admin_note.' WHERE id='.$id) or error('Unable to update profile', __FILE__, __LINE__, $db->error()); // If we changed the username we have to alter "poster" and "last_poster" for any posts, topics and forums if (strcmp($username, $old_username)) { $db->query('UPDATE '.$db->prefix.'posts SET poster=\''.addslashes($username).'\' WHERE poster_id='.$id) or error('Unable to update posts', __FILE__, __LINE__, $db->error()); $db->query('UPDATE '.$db->prefix.'topics SET poster=\''.addslashes($username).'\' WHERE poster=\''.addslashes($old_username).'\'') or error('Unable to update topics', __FILE__, __LINE__, $db->error()); $db->query('UPDATE '.$db->prefix.'topics SET last_poster=\''.addslashes($username).'\' WHERE last_poster=\''.addslashes($old_username).'\'') or error('Unable to update topics', __FILE__, __LINE__, $db->error()); $db->query('UPDATE '.$db->prefix.'forums SET last_poster=\''.addslashes($username).'\' WHERE last_poster=\''.addslashes($old_username).'\'') or error('Unable to update forums', __FILE__, __LINE__, $db->error()); } } redirect('profile.php?id='.$id, $lang_profile['Profile redirect']); } else { $result = $db->query('SELECT username, email, title, realname, url, icq, aim, yahoo, location, use_avatar, signature, disp_topics, disp_posts, hide_email, save_pass, smilies, show_img, show_sig, link_to_new_win, timezone, style, num_posts, status, last_post, registered, admin_note FROM '.$db->prefix.'users WHERE id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error()); if (!$db->num_rows($result)) message($lang_common['Bad request']); $user = $db->fetch_assoc($result); $last_post = format_time($user['last_post']); if ($user['signature'] != NULL) { require 'include/parser.php'; $parsed_signature = parse_signature($user['signature']); } // Are we viewing our someone elses profile? (and are we not an admin/moderator) if (isset($cur_user['id']) != $id && isset($cur_user['status']) < 1) { if ($user['hide_email'] != '1') $email_field = ''.$user['email'].''; else $email_field = $lang_profile['Not displayed']; $user_title_field = get_title($user); if ($user['url'] != '') { $user['url'] = htmlspecialchars($user['url']); if ($options['censoring'] == '1') $user['url'] = censor_words($user['url']); if ($cur_user['link_to_new_win'] != '0') $url = ''.$user['url'].''; else $url = ''.$user['url'].''; } if ($options['avatars'] == '1') { if ($user['use_avatar'] == '1') { if ($img_size = @getimagesize($options['avatars_dir'].'/'.$id.'.gif')) $avatar_field = ''; else if ($img_size = @getimagesize($options['avatars_dir'].'/'.$id.'.jpg')) $avatar_field = ''; else if ($img_size = @getimagesize($options['avatars_dir'].'/'.$id.'.png')) $avatar_field = ''; } else $avatar_field = $lang_profile['No avatar']; } $page_title = htmlspecialchars($options['board_title']).' / '.$lang_profile['Profile']; require 'header.php'; ?>
 
0): ?>
    
    
    
    
    
    
    
    
    
    
  
    
    
    
 
0) { $username_field = ''; $email_field = ''; $user_title_field = '  '.isset($lang_prof_reg['Leave blank']); } else { $username_field = htmlspecialchars($user['username']); if ($options['regs_validate'] == '1') $email_field = $user['email'].' - '.$lang_profile['Change e-mail'].''; else $email_field = ''; if ($permissions['users_set_title'] == '1') $user_title_field = '  '.$lang_prof_reg['Leave blank']; else { $user_title_field = get_title($user); if ($options['censoring'] == '1') $user_title_field = censor_words($user_title_field); } } if ($img_size = @getimagesize($options['avatars_dir'].'/'.$id.'.gif')) $avatar_field = '
 '.$lang_profile['Change avatar'].''; else if ($img_size = @getimagesize($options['avatars_dir'].'/'.$id.'.jpg')) $avatar_field = '
 '.$lang_profile['Change avatar'].''; else if ($img_size = @getimagesize($options['avatars_dir'].'/'.$id.'.png')) $avatar_field = '
 '.$lang_profile['Change avatar'].''; else $avatar_field = ''.$lang_profile['Upload avatar'].''; if ($cur_user['status'] < 2) $posts_field = $user['num_posts']; else $posts_field = ''; if ($user['signature'] != '') $preview = ' '.$lang_profile['Sig preview'].'
'."\n\t\t\t\t".' _______________________________________
'."\n\t\t\t\t".''."\n\t\t\t\t\t".''."\n\t\t\t\t\t\t".''."\n\t\t\t\t\t".''."\n\t\t\t\t".'
'.$parsed_signature.'

'."\n"; else $preview = ' '.$lang_profile['Sig preview'].'
'."\n\t\t\t\t".' _______________________________________
'."\n\t\t\t\t".' '.$lang_profile['No sig'].'

'."\n"; ?>
 
0): ?> 0): ?>
    
    
    
    
    
    
    
    
    
    
  

 

  

HTML:   
BBCode:   
[img] tag:   
Smilies:   
:   
:   

 

      
      
  

 
  










  

 
    
    
    
    
  
  

 

0) { ?>
 
  
  

  

     

  


query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.moderators FROM '.$db->prefix.'categories AS c INNER JOIN '.$db->prefix.'forums AS f ON c.id=f.cat_id'.$extra.' ORDER BY c.position, c.id, f.position') or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error()); while ($cur_forum = $db->fetch_assoc($result)) { if ($cur_forum['cid'] != $cur_category) // A new category since last iteration? { echo "\t\t\t\t".$cur_forum['cat_name'].'
'; $cur_category = $cur_forum['cid']; } $moderators = ($cur_forum['moderators'] != '') ? unserialize($cur_forum['moderators']) : array(); print "\t\t\t\t".' '.htmlspecialchars($cur_forum['forum_name']).'
'."\n"; } ?>