Mission impossible

Posted on Tuesday 10th June 2008 at 05:15 PM
VicVance
VicVance's Avatar
A task that no one can solve. It is very hard. I got a css that is suppose to load on the staff page., but my text just comes black when I want it to come white. I dont know why is this happening but it should not have because my css test clour is white, but it just comes black... I don't know why is this happening..

This is staff.php

PHP Code
  1. <LINK REL=stylesheet HREF="includes/lc.css" TYPE="text/css">
  2. <?php
  3. include("config.php");
  4. function color($rcolor){//start function to color userlevels
  5. $rank = array('0','1','2','3','4','5','6'); //basic levels 1-6 not all used i'm pretty sure :P but never know
  6. $color = array('#FFFFFF','#ffffff','#ffffff','#ffffff','#ffffff','#ffffff','#ffffff'); //all your colors for each of the user levels
  7. return str_replace($rank, $color, $rcolor); //replace level with color then return the color instead of level :P
  8. } //end function
  9.  
  10. echo "<b><u>Administration</u></b>:<Br />"; //admin administration same thing pretty much
  11. $getadmins = mysql_query("SELECT * FROM `users` WHERE `userlevel` = '5' ORDER BY `id` ASC"); //get admins order by ID
  12. if(mysql_num_rows($getadmins) == '0'){ //no admins?!?!
  13. echo "There Are No Admins "; //no admins :)
  14. }else{ //maybe..
  15. while($radmin = mysql_fetch_array($getadmins)){ //make our loop.
  16. echo "<p class='item_top'><font color="".color($rmods[userlevel])."">$radmin[username]</font> | Content/mod | <a href="index.php?page=members&user=$radmin[username]"><font color="".color($rmods[userlevel])."">Profile</font></a><Br /> </p><BR />
  17.  
  18.  
  19.  
  20.  
  21. "; //send link with colored name :)
  22. } //end loop
  23. } //end no admin check :)
  24.  
  25. echo "<b><u>Mods</u></b>:<Br />"; //mods
  26. $getmods = mysql_query("SELECT * FROM `users` WHERE `userlevel` = '2' ORDER BY `id` ASC"); //get admins order by ID
  27. if(mysql_num_rows($getmods) == '0'){ //no admins?!?!
  28. echo "There Are No mods Yet"; //no admins :)
  29. }else{ //maybe..
  30. while($rmods = mysql_fetch_array($getmods)){ //make our loop.
  31. echo "<table width='100%' border='1' align='center' cellpadding='5' cellspacing='0' bordercolor='#333333' class='table1_2'>
  32. <tr>
  33. <th><div align='right'><strong>$rmods[username]</strong></div></th>
  34. <td><div align='center'>Content / Moderation</td>
  35. <td><div align='left'><strong><a href="index.php?page=members&user=$rmods[username]"><font color="".color($rmods[userlevel])."">Profile</font></a><Br /></a></strong></div></td>
  36. </tr>
  37. </table><BR />"; //send link with colored name :)
  38. } //end loop
  39. } //end no admin check :)
  40. ?>




The following text comes black.

Mods:
There Are No mods Yet

Name of the member

Content/mod

Administration:
They come in black, as you can see thier is no reson for why it should come black as css is used.

Please help
Posted on Tuesday 10th June 2008 at 05:35 PM
DanielXP
DanielXP's Avatar
Updated post.

Added BBCode for [php*][/php*]

Maybe add a demo so I could have a look at it live (it helps)
Posted on Wednesday 11th June 2008 at 10:01 AM
VicVance
VicVance's Avatar
I have sorted it.. see I never called for my css.
Posted on Wednesday 11th June 2008 at 10:47 AM
ilyas-shezad
ilyas-shezad's Avatar
hehe lol
PHP-MYSQL-JAVASCRIPT-ACTIONSCRIPT-CSS-HTML
Making tutorials for flash, php and javascript
Topic is locked