athena26 Posted March 24, 2021 Share Posted March 24, 2021 How do I add a background image were the color is , example I want to remove the #333333 and replace it with a image . <?php class headers { function startheaders() { global $ir, $set; echo <<<EOF <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>{$set['game_name']}</title> <style type="text/css"> <!-- body { background-image: url('main.png'); margin-top: 0px; margin-bottom: 0px; font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px;color: white; scrollbar-base-color: #333333; scrollbar-arrow-color: #333333; scrollbar-DarkShadow-Color: #333333; } a:visited,a:active,a:hover,a:link { color: white;text-decoration: none; } table,tr,td { font-family:helvetica, arial, geneva, sans-serif;font-size: 12px; } img { border:none; } textarea { font-family:helvetica, arial, geneva, sans-serif;font-size:12px;color: black; } .table2 { } .lgrad { background-image:url(); background-repeat:repeat-y; width:19px; } .linegrad { background-image:url(linegrad.PNG); background-repeat:repeat-y; background-align: center; width:2px; } .rgrad { background-image:url(); background-repeat:repeat-y; width:19px; } .dgrad { background-image:url(); background-repeat:repeat-x; height:38px; } .dgradl { background-image:url(); background-repeat:no-repeat; height:38px; width:38px; } .dgradr { background-image:url(); background-repeat:no-repeat; height:38px; width:38px; } .center { width:932px; background-image: url(''); vertical-align:top; text-align:center; } .table { background-image: url(''); } .table3 { background-image: url(''); } .table td { background-image: url(''); height:22px; } .table3 td { background-image: url(''); } td .alt { background-image: url(''); height:22px; } td .h { background-image:url(main.png); background-repeat:repeat-x; font-weight: bold; background-image: url(''); } .table th { background-image:url(main.png); background-repeat:repeat-x; font-weight: bold; body { background-image: url('main.png'); } --> </style></head> <body> <center> <table width="970" border="0" cellpadding="0" cellspacing="0" class="table2"> <tr> <td class="lgrad"></td> <td class="center"> EOF; } function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $db,$c,$userid, $set; $IP = $_SERVER['REMOTE_ADDR']; $IP=addslashes($IP); $IP=mysql_real_escape_string($IP); $IP=strip_tags($IP); $db->query("UPDATE users SET laston=unix_timestamp(),lastip='$IP' WHERE userid=$userid"); if(!$ir['email']) { global $domain; die ("<body>Your account may be broken. Please mail [email protected]{$domain} stating your username and player ID."); } if($dosessh && ($_SESSION['attacking'] || $ir['attacking'])) { print "You lost all your EXP for running from the fight."; $db->query("UPDATE users SET exp=0,attacking=0 WHERE userid=$userid"); $_SESSION['attacking']=0; } $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc = ($ir['will'] > $ir['maxwill']) ? $ir['maxwill'] : ($ir['will']/$ir['maxwill']*100); $experc = ($ir['exp'] > $ir['exp_needed']) ? $ir['exp_needed'] : ($ir['exp']/$ir['exp_needed']*100); $brperc = ($ir['brave'] > $ir['maxbrave']) ? $ir['maxbrave'] : ($ir['brave']/$ir['maxbrave']*100); $hpperc = ($ir['hp'] > $ir['maxhp']) ? $ir['maxhp'] : ($ir['hp']/$ir['maxhp']*100); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; $d=""; $u=$ir['username']; if($ir['donatordays']) { $u = "<font color=red>{$ir['username']}</font>";$d="<img src='donator.gif' alt='Donator: {$ir['donatordays']} Days Left' title='Donator: {$ir['donatordays']} Days Left' />"; } if($ir['smoking'] > 100) { $smoking = "<font color=red>Addictive</font>"; } else { $smoking = "<font color=blue>Not Addictive</font>"; } if($ir['smoking'] == 0) { $smoke = "Dont Smoke "; } else { $smoke = "$smoking"; } $gn=""; global $staffpage; $bgcolor = '333333'; print <<<OUT <img src="Good pic.bmp" alt="Gangster Paradise" /><br /> <!-- Begin Main Content --> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="20%" bgcolor="#$bgcolor" valign="top"> <!-- Side Panel --> <b>Name:</b> $gn{$u} [{$ir['userid']}] $d<br /> <b>Money:</b> {$fm}<br /> <b>Level:</b> {$ir['level']}<br /> <b>Crystals:</b> {$ir['crystals']}<br /> OUT; if($ir['smoking'] > 0) { print " <b>Smoking Level:</b> {$ir['smoking']}<br /> <b>Smoker:</b> $smoke<br />"; } print <<<OUT [<a href='logout.php'>Emergency Logout</a>] <hr /> <b>Energy:</b> {$enperc}%<br /> <img src=greenbar.png width=$enperc height=10><img src=redbar.png width=$enopp height=10><br /> <b>Will:</b> {$wiperc}%<br /> <img src=bluebar.png width=$wiperc height=10><img src=redbar.png width=$wiopp height=10><br /> <b>Brave:</b> {$ir['brave']}/{$ir['maxbrave']}<br /> <img src=yellowbar.png width=$brperc height=10><img src=redbar.png width=$bropp height=10><br /> <b>Health:</b> {$hpperc}%<br /> <img src=greenbar.png width=$hpperc height=10><img src=redbar.png width=$hpopp height=10><br /><hr /> <!-- Links --> OUT; if($ir['fedjail']) { $q=$db->query("SELECT * FROM fedjail WHERE fed_userid=$userid"); $r=$db->fetch_row($q); die("<b><font color=red size=+1>You have been put in the {$set['game_name']} Federal Jail for {$r['fed_days']} day(s).<br /> Reason: {$r['fed_reason']}</font></b></body></html> Quote Link to comment Share on other sites More sharing options...
CrazyElk Posted March 25, 2021 Share Posted March 25, 2021 Did you get this sorted? Quote Link to comment Share on other sites More sharing options...
athena26 Posted March 25, 2021 Author Share Posted March 25, 2021 Yes it's sorted thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.