Ben Nash Posted January 21, 2012 Share Posted January 21, 2012 (edited) I'm trying to intergrate mccodes 2.03 intot his xhtml/css layout but its all messed up... <?php class headers { function startheaders() { global $ir, $set; ?> <html> <head> <style type="text/css"> body { background-color:#7F0172; font-family:Segoe Script; } #wrapper { width:900px; margin-right:auto; margin-left:auto; } #head { background-image:url("ingameimages/banner.png"); background-repeat:no-repeat; width:900px; height:130px; } #left { float:left; height:700px; width:130px; background-color:#f11ff4; border-right:solid 5px #000; } #right{ float:right; height:700px; width:130px; background-color:#f11ff4; border-left:solid 5px #000; } #content { height:700px; width:900px; background-color:#f11ff4; } #footer { clear:both; background-image:url("ingameimages/footer.png"); background-repeat:no-repeat; width:900px; height:130px; } </style> </head> <body> <div id="wrapper"> <div id="head"></div> <div id="left"> <?php } } function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $db,$c,$userid, $set; $IP = $db->escape($_SERVER['REMOTE_ADDR']); $db->query("UPDATE `users` SET `laston` = ".$_SERVER['REQUEST_TIME'].",`lastip` = '$IP' WHERE `userid` = $userid"); if(!$ir['email']) { global $domain; die ("<body>Your account may be broken. Please mail help@{$domain} stating your username and player ID."); } if($dosessh && ($_SESSION['attacking'] || $ir['attacking'])) { echo "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=(int) ($ir['will']/$ir['maxwill']*100); $experc=(int) ( $ir['exp']/$ir['exp_needed']*100); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($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' />"; } } $gn=""; global $staffpage; ?> <?php echo" <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 />"; ?> <?php function menuarea() { define('jdsf45tji', true, true); include 'mainmenu.php'; global $ir,$c; } function smenuarea() { define('jdsf45tji', true, true); include 'smenu.php'; global $ir,$c; } ?> </div> <div id="right"> <?php echo" <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>EXP:</b> {$experc}%<br /> <img src=navybar.png width=$experc height=10><img src=redbar.png width=$exopp 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 />"; ?> </div> <div id="content"> </div> <div id="footer"></div> </div> </body> </html> <?php function endpage() { global $db; } ?> This is what it looks like... [ATTACH=CONFIG]244[/ATTACH] Please fix this Edited January 21, 2012 by Ben Nash Quote Link to comment Share on other sites More sharing options...
Uridium Posted January 22, 2012 Share Posted January 22, 2012 try <?php class headers { function startheaders() { global $ir, $set; echo <<<EOF <html> <head> <style type="text/css"> body { background-color:#7F0172; font-family:Segoe Script; } #wrapper { width:900px; margin-right:auto; margin-left:auto; } #head { background-image:url("ingameimages/banner.png"); background-repeat:no-repeat; width:900px; height:130px; } #left { float:left; height:700px; width:130px; background-color:#f11ff4; border-right:solid 5px #000; } #right{ float:right; height:700px; width:130px; background-color:#f11ff4; border-left:solid 5px #000; } #content { height:700px; width:900px; background-color:#f11ff4; } #footer { clear:both; background-image:url("ingameimages/footer.png"); background-repeat:no-repeat; width:900px; height:130px; } </style> </head> <body> <div id="wrapper"> <div id="head"></div> <div id="left"> EOF; } } function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $db,$c,$userid, $set; $IP = $db->escape($_SERVER['REMOTE_ADDR']); $db->query("UPDATE `users` SET `laston` = ".$_SERVER['REQUEST_TIME'].",`lastip` = '$IP' WHERE `userid` = $userid"); if(!$ir['email']) { global $domain; die ("<body>Your account may be broken. Please mail help@{$domain} stating your username and player ID."); } if($dosessh && ($_SESSION['attacking'] || $ir['attacking'])) { echo "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=(int) ($ir['will']/$ir['maxwill']*100); $experc=(int) ( $ir['exp']/$ir['exp_needed']*100); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($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' />"; } } $gn=""; global $staffpage; echo" <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 />"; function menuarea() { define('jdsf45tji', true, true); include 'mainmenu.php'; global $ir,$c; } function smenuarea() { define('jdsf45tji', true, true); include 'smenu.php'; global $ir,$c; } echo" </div> <div id=\"right\">"; echo" <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>EXP:</b> {$experc}%<br /> <img src=navybar.png width=$experc height=10><img src=redbar.png width=$exopp 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 />"; echo" </div> <div id=\"content\"> </div> <div id=\"footer\"></div> </div> </body> </html>"; function endpage() { global $db; } ?> Quote Link to comment Share on other sites More sharing options...
W3Theory || Peter Posted January 22, 2012 Share Posted January 22, 2012 The messed up part about this is that he is asking someone to pay him to do this. In the end he paid me to integrate it, but I find it really disappointing and immoral to charge someone and then come on here and ask someone to fix your errors.... Quote Link to comment Share on other sites More sharing options...
Tysoon Posted January 22, 2012 Share Posted January 22, 2012 Indeed Yes, your correct peter, i havnt released any funds to him as of yet, i'm still fixing alot of stuff, that needs doing. I'll make a decision on the payment to him in due course. 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.