thehost5968 Posted August 7, 2009 Share Posted August 7, 2009 Hi I need to added this bite of code to the ADMIN header somewhere between <head></head> but it is php here is the code: <?php check_for_settings(); if( isset($_GET['refresh']) && is_numeric($_GET['refresh']) ){ $query = 'refresh='. $_GET['refresh']; if( isset($_GET['show']) ) { if ( $_GET['show'] == 'all' || $_GET['show'] == 'bots' || $_GET['show'] == 'guests' ){ $query .= '&show='. $_GET['show']; } } if( isset($_GET['bots']) && $_GET['bots'] == 'show') { $query .= '&bots=show'; } echo '<meta http-equiv="refresh" content="' . $_GET['refresh'] . ';URL=' . $C['filename_whos_online'] . '?' . $query . '" /> '; } ?> I have tried just this code and also {php}this code{/php} but all I get is the header background and no page showing. So what am I doing wrong. Thanks Simon 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted August 7, 2009 Share Posted August 7, 2009 Did you tried it like {php} check_for_settings(); if( isset($_GET['refresh']) && is_numeric($_GET['refresh']) ){ $query = 'refresh='. $_GET['refresh']; if( isset($_GET['show']) ) { if ( $_GET['show'] == 'all' || $_GET['show'] == 'bots' || $_GET['show'] == 'guests' ){ $query .= '&show='. $_GET['show']; } } if( isset($_GET['bots']) && $_GET['bots'] == 'show') { $query .= '&bots=show'; } echo '<meta http-equiv="refresh" content="' . $_GET['refresh'] . ';URL=' . $C['filename_whos_online'] . '?' . $query . '" /> '; } {/php} 0 Quote Link to comment Share on other sites More sharing options...
thehost5968 Posted August 7, 2009 Author Share Posted August 7, 2009 Just tried that again it still will not work all I get is a blank page but with the header background showing. 0 Quote Link to comment Share on other sites More sharing options...
thehost5968 Posted August 7, 2009 Author Share Posted August 7, 2009 this is the <header></header> part of the page: <!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={$charset}" /> <title>WHMCS - {$pagetitle}</title> <link href="templates/v4/style.css" rel="stylesheet" type="text/css" /> <link href="../includes/jscript/css/ui.all.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../includes/jscript/jquery.js"></script> <script type="text/javascript" src="../includes/jscript/jqueryui.js"></script> <script type="text/javascript" src="../includes/jscript/adminmenu.js"></script> <script type="text/javascript" src="../includes/jscript/adminsearchbox.js"></script> {literal} <script type="text/javascript" language="JavaScript"> <!-- function who_is(query) { var whoisurl = '<?php echo $C['whois_url'] ?>' + query; window.open(whoisurl,"who_is_lookup","height=460,width=430,toolbar=no,statusbar=no,scrollbars=yes").focus(); } //--> </script> <script> $(document).ready(function(){ $("#intellisearchval").keyup(function () { var intellisearchlength = $("#intellisearchval").val().length; if (intellisearchlength>2) { $.post("search.php", { intellisearch: "true", value: $("#intellisearchval").val() }, function(data){ $("#searchresults").html(data); $("#searchresults").slideDown("slow"); }); } }); $("#intellisearchcancel").click(function () { $("#intellisearchval").val(""); $("#searchresults").slideUp("slow"); }); $(".datepick").datepicker({ dateFormat: "{/literal}{$datepickerformat}{literal}", showOn: "button", buttonImage: "images/showcalendar.gif", buttonImageOnly: true, showButtonPanel: true }); {/literal}{$jquerycode}{literal} });{/literal} {$jscode} </script> <script type="text/javascript" src="../includes/jscript/password_generator.js"></script> <script type="text/javascript"> // Hook AddGeneratePasswordButton to window load addEvent(window,'load',AddGeneratePasswordButton); </script> {php} check_for_settings(); if( isset($_GET['refresh']) && is_numeric($_GET['refresh']) ){ $query = 'refresh='. $_GET['refresh']; if( isset($_GET['show']) ) { if ( $_GET['show'] == 'all' || $_GET['show'] == 'bots' || $_GET['show'] == 'guests' ){ $query .= '&show='. $_GET['show']; } } if( isset($_GET['bots']) && $_GET['bots'] == 'show') { $query .= '&bots=show'; } echo '<meta http-equiv="refresh" content="' . $_GET['refresh'] . ';URL=' . $C['filename_whos_online'] . '?' . $query . '" /> '; } {/php} </head> if that helps 0 Quote Link to comment Share on other sites More sharing options...
thehost5968 Posted August 8, 2009 Author Share Posted August 8, 2009 OK where on this forum can I post to see if I can hire someone to get this working or can that not be done on this forum? 0 Quote Link to comment Share on other sites More sharing options...
bear Posted August 8, 2009 Share Posted August 8, 2009 OK where on this forum can I post to see if I can hire someone to get this working or can that not be done on this forum? Not allowed, sorry. Where is "check_for_settings();" defined? If I have a normal php page with just your php in it, it errors out asking for it. 0 Quote Link to comment Share on other sites More sharing options...
thehost5968 Posted August 8, 2009 Author Share Posted August 8, 2009 (edited) good Q I did not see that. That is why I need to p somesone to get this working. what it is I have a whos-online script that I need coding in to a admin add-on mod or report and I have been trying to get it working for about 5 day know. Edited August 8, 2009 by thehost5968 0 Quote Link to comment Share on other sites More sharing options...
bear Posted August 8, 2009 Share Posted August 8, 2009 I'd agree, but Matt doesn't want this to become that sort of forum. You can open a ticket to ask about custom coding or assistance, or post at a coding or similar forum. In looking at the code you provided, you jump out of the {literal} tags several times to have what appear to be PHP vars parsed/run, but it's not within {php} or even <?php tags unless I've missed something. Little wonder they won't be parsed. 0 Quote Link to comment Share on other sites More sharing options...
thehost5968 Posted August 8, 2009 Author Share Posted August 8, 2009 do you now if I can try on php error like so i can see php errors print to screen like std php? 0 Quote Link to comment Share on other sites More sharing options...
bear Posted August 8, 2009 Share Posted August 8, 2009 Possibly by adding this to the top, within {php} tags? ERROR_REPORTING(E_ALL); 0 Quote Link to comment Share on other sites More sharing options...
thehost5968 Posted August 8, 2009 Author Share Posted August 8, 2009 just compared my header with fresh one and it is only this : <?php echo $C['whois_url'] ?> I still do not get all this smarty after about 3 days of reading. do you now how I should replace the above code. 0 Quote Link to comment Share on other sites More sharing options...
thehost5968 Posted August 8, 2009 Author Share Posted August 8, 2009 ok Thanks for all your help now php errors are showing i should be ok I think I hade the code in the wrong header but if not i will find out later. Thanks Simon 0 Quote Link to comment Share on other sites More sharing options...
thehost5968 Posted August 8, 2009 Author Share Posted August 8, 2009 Just one more Q ref database call's am I right in that I do not need to keep calling the configuration.php to make a call on the D/B? 0 Quote Link to comment Share on other sites More sharing options...
bear Posted August 8, 2009 Share Posted August 8, 2009 just compared my header with fresh one and it is only this....do you now how I should replace the above code. <?php echo $C['whois_url'] ?> {php} echo $C['whois_url']; {/php} (note also the addition of the ";" at the end which was missing in yours) As for the database call, once per page should work, but with all the jumping in and out of scope you might have problems. 0 Quote Link to comment Share on other sites More sharing options...
thehost5968 Posted August 8, 2009 Author Share Posted August 8, 2009 do you have a website? 0 Quote Link to comment Share on other sites More sharing options...
bear Posted August 8, 2009 Share Posted August 8, 2009 Several, but I don't advertise or divulge them here. I'm also not the best choice for getting this working, if that's why you're asking. 0 Quote Link to comment Share on other sites More sharing options...
thehost5968 Posted August 8, 2009 Author Share Posted August 8, 2009 ok thanks Simon 0 Quote Link to comment Share on other sites More sharing options...
jongill04 Posted August 20, 2009 Share Posted August 20, 2009 How come anytime I try to add just HTML to the header I get that blank white page. I want to add my site header to the script just plain HTML 0 Quote Link to comment Share on other sites More sharing options...
thehost5968 Posted August 20, 2009 Author Share Posted August 20, 2009 You need to give more info? with out see your code we can not help? 0 Quote Link to comment Share on other sites More sharing options...
thehost5968 Posted August 21, 2009 Author Share Posted August 21, 2009 How come anytime I try to add just HTML to the header I get that blank white page. I want to add my site header to the script just plain HTML Please do not post a question then not reply in a open thread as all the others that have post's in the thread may drop what they are doing to try and help to just waste there time. 0 Quote Link to comment Share on other sites More sharing options...
bear Posted August 21, 2009 Share Posted August 21, 2009 Relax, thehost5968. Not everyone isn't busy just now. 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.