Forgot Password / Register
Site Statistics
Total Members: 520
Total Tutorials: 242
Newsest User: 8884244477
Todays Unique Hits: 616
0 Users 1 Guests Online
Forum Index » PHP + MySQL » Mission impossible
Posted on Tuesday 10th June 2008 at 05:15 PM
Vic Vance
templates/default/images/noavatar.png's Avatar
Active Member
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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<LINK REL=stylesheet HREF="includes/lc.css" TYPE="text/css">
<?php 
include("config.php");
function 
color($rcolor){//start function to color userlevels 
    
$rank = array('0','1','2','3','4','5','6'); //basic levels 1-6 not all used i'm pretty sure :P but never know 
    
$color = array('#FFFFFF','#ffffff','#ffffff','#ffffff','#ffffff','#ffffff','#ffffff'); //all your colors for each of the user levels 
    
return str_replace($rank$color$rcolor); //replace level with color then return the color instead of level :P 
//end function 

echo "<b><u>Administration</u></b>:<Br />"//admin administration same thing pretty much 
$getadmins mysql_query("SELECT * FROM `users` WHERE `userlevel` = '5' ORDER BY `id` ASC"); //get admins order by ID 
if(mysql_num_rows($getadmins) == '0'){ //no admins?!?! 
echo "There Are No Admins "//no admins :) 
}else{ //maybe.. 
while($radmin mysql_fetch_array($getadmins)){ //make our loop. 
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 />




"
//send link with colored name :) 
//end loop 
//end no admin check :) 

echo "<b><u>Mods</u></b>:<Br />"//mods
$getmods mysql_query("SELECT * FROM `users` WHERE `userlevel` = '2' ORDER BY `id` ASC"); //get admins order by ID 
if(mysql_num_rows($getmods) == '0'){ //no admins?!?! 
echo "There Are No mods Yet"//no admins :) 
}else{ //maybe.. 
while($rmods mysql_fetch_array($getmods)){ //make our loop. 
echo "<table width='100%' border='1' align='center' cellpadding='5' cellspacing='0' bordercolor='#333333' class='table1_2'>
  <tr>
    <th><div align='right'><strong>
$rmods[username]</strong></div></th>
    <td><div align='center'>Content / Moderation</td>
    <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>
  </tr>
</table><BR />"
//send link with colored name :) 
//end loop 
//end no admin check :)
?>




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
avatars/1.png's Avatar
Senior Member
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
Vic Vance
templates/default/images/noavatar.png's Avatar
Active Member
I have sorted it.. see I never called for my css.
Posted on Wednesday 11th June 2008 at 10:47 AM
ilyas-shezad
templates/default/images/noavatar.png's Avatar
Junior Member
hehe lol