View Single Post
  #6  
Old 10th January 2022, 21:01
BamBam0077 BamBam0077 is offline
Banned
 
Join Date: Jul 2013
P2P
Posts: 410
Default
It was for a demo I just need to add a timer is so it can add points when we setup so for now it updates seedbonus from 0.0 to 2.0 each refresh as far as I understand so it was to basically get more bonus outta the system so they didn't have to just download comment etc a bonus gift for every member of you know what I mean. Was just an idea

Add inside of header.php
Code:
        <!-- Start Infobar -->
        <div style='color:white;' class='infobar'>
          <?php
                if (!$CURUSER){
                    echo "[<a href=\"account-login.php\">".T_("LOGIN")."</a>]<b> ".T_("OR")." </b>[<a href=\"account-signup.php\">".T_("SIGNUP")."</a>]";
                }else{
$bonus=$CURUSER['seedbonus'];
                    print (T_("LOGGED_IN_AS").": ".$CURUSER["username"]."

<br>Seedbonus :<b><a href=mybonus.php>".$bonus."</a></b>");


                    echo " [<a href=\"account-logout.php\">".T_("LOGOUT")."</a>] ";
                    if ($CURUSER["control_panel"]=="yes") {
                        print("[<a href='admincp.php'>".T_("STAFFCP")."</a>] ");
                    }
            
                    //check for new pm's
                    $res = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " and unread='yes' AND location IN ('in','both')");
                    $arr = mysqli_fetch_row($res);
                    $unreadmail = $arr[0];
                    if ($unreadmail){
                        print("[<a href='mailbox.php?inbox'><b><font color='#ff0000'>$unreadmail</font> ".P_("NEWPM", $unreadmail)."</b></a>]");  
                    }else{
                        print("[<a href='mailbox.php'>".T_("YOUR_MESSAGES")."</a>] ");
                    }
                    //end check for pm's
                }
                ?>
        </div>
        <!-- End Infobar -->
Click the image to open in full size. Click the image to open in full size. Click the image to open in full size.


Insert into index.php
Code:
/* seedbonus everytime your on the index page or script :) */
SQL_Query_exec("UPDATE users SET seedbonus=".$CURUSER['seedbonus']."+2.0 where seedbonus = ".$CURUSER['seedbonus']." ");

Click the image to open in full size. Click the image to open in full size. Click the image to open in full size.

Last edited by BamBam0077; 10th January 2022 at 22:11.
Reply With Quote