Web Analytics Made Easy -
StatCounter Help With nav bar - CodingForum

Announcement

Collapse
No announcement yet.

Help With nav bar

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help With nav bar

    Hiya

    I own a website at www.autourlhits.com. This is a hits website. People view others websites thorugh an auto rotating browser in exchange for credits. The credits are then used when other people see your site in the browser. The browser has a 20 second timer, then automatically opens someone elses site. I want to change it so that the user has to click "next" before it opens the new site. This will stop cheaters from leaving there computers on overnight and not actually seeing anyone elses sites. I Dont know how to change this though. I think there is also a problem with the "next" button, as it seems to count down the timer at double speed. If you could help me with this, i will be incredibly gratefull, and if you have a site you need to promote, i will give you unlimited free credits (effectively advertising your site for free!)

    you can view the script (in a .txt file form) at http://www.bluhalo.ws/files/navbar.txt

    Please email me with any changes at [email protected] or leave a post in the forum with any questions.

    Thanks soooo much!!!!

    Tom

    **EDIT** I have just fixed the browser in respect to that users have to click next, but there is still the proble with the counter counting down at double speed after next has been clicked. This is a major problem as after the user has clicked next to go to the next browser, they can speed through the sites. Thanks in advance for your help.
    Last edited by bluhalo; Aug 1, 2005, 04:04 PM.

  • #2
    Just found this function! will save you going to the webpage!!!

    Code:
    <?
    
    require('config_inc.php');
    require('error_inc.php');
    
    //require('error_inc.php');
    //require('config_inc.php');
    require('apanel/vars.conf.php');
    
    $id=intval($id);
    
    $query = "select * from ".$t_user." where id=".$id;
    $result = MYSQL_QUERY($query);
    $type=mysql_result($result,0,"type");
    $br=mysql_result($result,0,"br");
    
    if($type==0){
            if($br==0){
                    $cr=$basic_min;
            }elseif($br==1){
                    $cr=$basic_max;
            }
    }elseif($type==1){
            if($br==0){
                    $cr=$silver_min;
            }elseif($br==1){
                    $cr=$silver_max;
            }
    }elseif($type==2){
            if($br==0){
                    $cr=$gold_min;
            }elseif($br==1){
                    $cr=$gold_max;
            }
    }
    
    
    //if($sss==1){ $result1=MYSQL_QUERY($query1); }
    
    
    
    ?>
    
    <html>
    
    <head>
    
    <title>Navigation system</title>
    
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
    <style type="text/css">
    
    <!--
    
    .tab_brd {  border: 0px #000000 solid}
    
    .timer {  background-color: #006699; font-weight: normal; color: #FFFFFF; border: 0px none; font-size: 13px; font-family: "Verdana"}
    
    -->
    
    </style>
    
    <script language="JavaScript">
    
    
    
    maximize=<?print $br;?>;//maximize after loading;
    Top=<?print $br;?>;//always on top vaiable;
    delay=<?=$delay;?>;//time variable sec;
    begin="no";
    t2=delay;
    
    
    Stop="yes";
    
    
    
    function start(){
    
    begin="yes";
    
    if (Stop=="yes") {
    
     Stop="no";
    
    // play();
    
    timer();
    
    }
    
    }
    
    
    
    function initialize()
    
    {
    
    parent.autohit();
    
    Stop="no";
    
    begin="yes";
    
    timer();
    
    if(delay>=10)document.form1.timer.value="0:"+delay;
    
    else document.form1.timer.value="0:0"+delay;
    
    document.form1.score.value=0;
    document.form1.con.style.display = "none";
    
    }
    
    
    
    function play()
    
    {
    
    if (Stop=="no"){
    
    if(Top==1) {this.focus();}
    
    if(maximize==0) {parent.maxWindow();}
    
     newSite();
    
    //parent.score=parseInt((parent.score+<?print $cr;?>)*10);
    //parent.score=(parent.score)/10;
    
    //score=parseInt((score+koef[1])*10);
    //score=(score)/10;
    //document.form1.score.value=parent.score;
    
     t2=delay;
    
     timer();
    
     }
    
    }
    
    
    function cont()
    {
    
    //if(delay>=10)document.form1.timer.value="0:"+delay;
    //else document.form1.timer.value="0:0"+delay;
    t2=delay;
    timer();
     newSite();
    document.form1.con.style.display = "none";
    }
    
    
    
    function timer()
    
    {
    
    if (Stop=="no"){
    
    if (t2>=10) document.form1.timer.value="0:";
    
    else {//this.focus();
    
    document.form1.timer.value="0:0";}
    
    document.form1.timer.value+=t2;
    
    if(t2>0) {
            setTimeout('timer()',1000);
            t2--;
            if(t2==0){
                    parent.score=parseInt((parent.score+<?=$cr;?>)*100);
                    parent.score=(parent.score)/100;
                    parent.topFrame.form1.score.value=parent.score;
                    }
            }
    
    else 
    	
    cont();
    //play();
           //Stop="yes";
           //pause();
           document.form1.con.style.display = "block";
    }
    
    }
    
    
    
    function pause()
    
    {
    
    if(begin=="yes"){
    
    if (Stop=="no") Stop="yes";
    
    else {Stop="no";timer();}
    
    }
    
    }
    
    
    
    function newSite() {
    
    parent.mainFrame.location.href="autohit.php?id=<?print $id?>&id1="+parent.ida[1]+"&id2="+parent.ida[2];
    
    }
    
    
    
    
    
    function createWnd(){
    
            newwnd=window.open(parent.url[1],"hehe","toolbar,location=1,scrollbars=1,status,titlebar,menubar,height=500,width=800,resizable=1");
    
    }
    
    function abuse() {
            newwnd=window.open("<?=$path;?>/abuse.php?id="+parent.ida[1]+"&url="+parent.url[1]+"&idu=<?print $id?>", "haha","toolbar,resizable,scrollbars=1,statusbar,titlebar,menubar,height=600,width=800");
    }
    </script>
    
    
    
    </head>
    
    
    
    <body bgcolor="#006699" text="#FFFFFF" leftmargin="0" topmargin="3" onLoad="initialize()" >
    <form name="form1" method="post" action="">
    <table width="500" border="0" cellspacing="0" cellpadding="0"  class="tab_brd" align=center>
      <tr>
    <!--    <td width="70"><img src="images/spacer.gif" width="5" height="60"></td>-->
        <td width="70">
          <table border="0" cellspacing="0" cellpadding="0"  class="tab_brd" align="left">
            <tr>
              <td align="center" ><a href="javascript:start();"><img src="images/buttons_r1_c1.gif" border="0" alt="Play" ></a></td>
              <td align="center" ><a href="javascript:pause();"><img src="images/buttons_r1_c2.gif" border="0" alt="Pause"></a></td>
              <td align="center" ><a href="javascript: createWnd();"><img src="images/buttons_r1_c3.gif" border="0" alt="Open  curent site in the new window"></a></td>
              <td align="center" ><a href="user_menu.php?PHPSESSID=<?print $PHPSESSID;?>" target=_top><img src="images/buttons_r1_c4.gif" border="0" alt="User menu"></a></td>
              <td align="center" ><a href="javascript: abuse();"><img src="images/buttons_r1_c5.gif" border="0"></a></td>
            </tr>
          </table>
        </td>
        <td >
         <!-- <form name="form1" method="post" action="">-->
            <table border="0" cellspacing="0" cellpadding="5" align="left"  class="tab_brd">
              <tr>
                <td valign="middle"><font face="Arial, Helvetica, sans-serif" size="2"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
                  &nbsp;TIMER:</font></b></font></td>
                <td> <input type="text" name="timer" size="4" class="timer" > </td>
                <td><font face="Arial, Helvetica, sans-serif" size="2"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="1">SCORE:</font></b></font></td>
                <td><input type="text" name="score" size="6" class="timer" ></td>
              </tr>
            </table>
         <!-- </form> -->
        </td>
        <td><a href="javascript:cont();"><img src="images/next.gif" border="0" id="con"></a></span></td></tr>
    </table>
    
    </form>
    
    <script language="JavaScript">
    
    Stop="yes";
    
    begin="no";
    
    timer();
    
    //score=koef[1];//user's score;
    
    </script>
    
    </html>

    Comment

    Working...
    X