View Single Post
  #1  
Old 29th November 2018, 09:10
elvira's Avatar
elvira elvira is offline
Senior Member
 
Join Date: Jan 2008
Slovenia
Posts: 172
Default User Color in browse
Hi something not working so I need any idea

I put this in global.php

PHP Code:
  function get_user_class_color($class)
{
      switch (
$class)
  {
    case 
UC_USER: return "black";

    case 
UC_POWER_USER: return "#f9a200";

    case 
UC_VIP: return "#009F00";

    case 
UC_UPLOADER: return "#6464FF";

    case 
UC_MODERATOR: return "#ff5151";

    case 
UC_ADMINISTRATOR: return "#B000B0";

    case 
UC_SYSOP: return "#2587A7";
    
    case 
UC_STAFFLEADER: return "darkred";

    }
    return 
"";


and add in fuctions.php


PHP Code:
print("<td align=center>" . (isset($row["username"]) ? ("<a href=userdetails.php?id=" $row["owner"] . "><font color=\"#" get_user_class_color($row["class"]) . "\">" htmlspecialchars($row["username"]) . "</font></a>") : "<i>(unknown)</i>") . "</td>\n"); 

and still not work, what I missed, thanks for help

Last edited by elvira; 29th November 2018 at 10:16.
Reply With Quote