Your Time:
Our Time:
← Back to discussions

Adding customer PHP code to header

Need help with a different issue? Search the forums or open a new ticket.
Open a support ticket

This topic has 2 replies, 3 voices, and was last updated 12 years, 6 months ago by Wajid Khan.

  • 2014-02-17 at 10:01 am
    Support Expired
    #2996
    noxstreak
    Participant
    • Topics: 2
    • Replies: 2
    • Total posts: 4
    • Post count: 4

    Hello,

    I am trying to add some php code to the header style 1 but if I add it through the hostme theme program it just edits out key parts of the code making it useless.

    This would be for the top right.

    I tried edit the file header-style1.php:

    <div class=”one_half last”>
    <div id=”social-icons”>
    <?php echo do_shortcode(get_option(‘atp_top_righttext’,'[sociable]’)); ?>

    </div>

    I would remove the <?php echo do_shortcode(get_option(‘atp_top_righttext’,'[sociable]’)); ?> and replace with my code but that would cause the whole theme to stop.

    I would like to add the following code to the top sidebar in order to intergrate whmcs manually (the bridge slows everything down like crazy.)

    <?php

    include(“dbconnect.php”);

    if ($_SESSION[‘uid’]) {

    $result = mysql_query(“SELECT firstname FROM tblclients WHERE id='”.$_SESSION[‘uid’].”‘ LIMIT 1;”);

    while($row = mysql_fetch_array($result))

    echo “<p id=’login’><span class=’loginwelcome’>”.$_LANG[‘welcomeback’].’, ‘.$row[‘firstname’].’: | ‘.$_LANG[‘clientareatitle’].’ | ‘.$_LANG[‘logouttitle’].’</span></p>’;

    }

    else{

    echo ‘<form action=”https://www.YOURSITE.com/YOURWHMCS/dologin.php&#8221; method=”post” name=”loginform” class=”header”>Client Login:

    <input name=”username” type=”text” class=”login” id=”username” value=”username” size=”15″”>

    <input name=”password” type=”password” id=”password” value=”xxxxx” size=”15″”>

    <input type=”hidden” name=”token” value=”add-your-token-here” />

    <input type=”image” src=”/images/go.gif” width=”25″ height=”19″ align=”absmiddle”>

    </form>’;

    }

    ?>

    • This topic was modified 12 years, 7 months ago by noxstreak.
    2014-02-17 at 12:03 pm
    #3001
    Fem
    Keymaster
    • Topics: 2
    • Replies: 5215
    • Total posts: 5217
    • Post count: 6003

    You can add your code and replace the code what you wish to display in the section you have shown. Its perfect place to replace. If you can provide with WP Logins then we can take a closer look at it. Make sure you set the post as private reply so that only admin can see your wp logins.

    Regards
    Maqk

    2014-03-11 at 2:07 pm
    #3332
    Wajid Khan
    Keymaster
    • Topics: 5
    • Replies: 1543
    • Total posts: 1548
    • Post count: 1876

    Topic is set to Solved because of no reply. But if you want to update this topic please reply here.

You must be logged in to reply to this topic.