Daniel Posted June 9, 2008 Share Posted June 9, 2008 Hi, I've found the wiki page on creating pages in WHMCS, but can't work out how to add my script to it. The code is below.. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title></title> <link href="report.css" rel="stylesheet" type="text/css"> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> </head> <body> <?php putenv("TZ=GMT"); require("includes/hyperspinRSSParser.class.php"); function removePort($name) { if(strpos($name, "HTTP port")) return substr($name,0,strpos($name, "HTTP port")); else return $name; } $rss_parser = new hyperspinRSSParser("http://www.hyperspin.com/publicreportrss2.0/",false); $rss_parser->parse(); $currMonth = date('M'); $prevMonth = date('M', mktime(0, 0, 0, date("m")-1, date("d"), date("Y"))); ?> <table> <tr class="tableHead"> <td>Name</td> <td>Status</td> <td><?=$currMonth;?> Uptime</td> <td><?=$prevMonth;?> Uptime</td> <td>Total Uptime</td> </tr> <? foreach($rss_parser->uptimeInfo as $row) { ?> <tr> <td><?=removePort($row['name']);?></td> <td class="<?=$row['status'];?>"><?=$row['status'];?></td> <td><?=$row['cm_uptime'];?>%</td> <td><?=$row['pm_uptime'];?>%</td> <td><?=$row['tot_uptime'];?>%</td> </tr> <? } ?> </table> </body> </html> How would I do this? I've tried replacing the php tags with {php} but it just shows a white page. Any help would be appreciated. Dan 0 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.