Free Web Hosting Forum
(#1 (permalink))
Old
Junior Member
gyzmoo88 is on a distinguished road
 
Posts: 10
Join Date: May 2012
Post Parent url - 05-04-2012, 04:41 PM

Hello.

I have a traffic exchange script .. and i want to add in surfbar.php a link to current site that is viewed ..



surfbar.php
PHP Code:
<?
// The standard rules and regulations apply. All code is developed 
// by http://www.allthetraffic.com and you should visit there if
// you want the newest version or to check out any of our other 
// programs. We'd prefer if you don't go selling this to other 
// people, but if you do, please remember the donate link on 
// the website keeps us alive.
// ------------------------------------------------------------

require 'require.inc.php';
?>
<html>
 <head>
<script>
<!--
var timeout = 1000; var num = 0; var na = "00"; var secs = <? 
if (@$utype == "gold") {
echo 
$goldSurfTime;
} else {
echo 
$surfTime;
?>;

function go(){ na = secs; if (secs < 10) { na= "0" + na; }
document.getElementById("countDownText").innerHTML = na;

secs = secs - 1;
if (secs < 6) {
 window.focus();
}

if (secs < 1) {
document.getElementById("countDownText").innerHTML = "<form action=surf.php method=POST target='_top'><input type=hidden name=togive value='ha'><?
   srand
((double)microtime()*1000000);
   
$num rand(12);

if (
$num == 1) {
 echo 
"<input type=submit value='Click aici'>";
} else {
 echo 
"<input type=image src='next.gif'>";
}
?></form>";
}
if (secs > 0) { setTimeout("go();",timeout); }
}

-->
</script>

</head>
<body onload="go();" bgcolor=green text=white link=yellow vlink=yellow>
<table width=100%><tr><td valign='top'>
<?
srand
((double)microtime()*1000000);
   
$numb rand(12);

if (
$numb == 1) {
 include 
'banner.php';
 echo 
"</td><td><span id='countDownText'></span>";
} else {
 echo 
"<span id='countDownText'></span></td><td>";
 include 
'banner.php';
}
echo 
"</td><td>";

?>

</td></tr></table>
surf.php

PHP Code:
<?
// The standard rules and regulations apply. All code is developed 
// by http://www.allthetraffic.com and you should visit there if
// you want the newest version or to check out any of our other 
// programs. We'd prefer if you don't go selling this to other 
// people, but if you do, please remember the donate link on 
// the website keeps us alive.
// ------------------------------------------------------------

session_start();
require 
'require.inc.php';
if (!isset(
$_SESSION['username'])){
    
header ("Location: index.php?invalid=PLEASE LOGIN");
                  }

$query "SELECT * FROM $user_table WHERE userid=".$id;


$result mysql_query($query) or die ("There's been a bit of an error. " mysql_error());
$row mysql_fetch_array($result);
$memtype $row["type"];

//ONLY PAYING IF minimum SECONDS IS OVER
if ($memtype == "gold") {
 
$surfTime $goldSurfTime;
}
$old $row["lastsurfed"] + $surfTime;
mysql_query("UPDATE $user_table SET lastsurfed=".time()." WHERE userid=".$id);
 echo 
"<!-- Updating lastsurf time of user "$username ." -->";
echo 
"<!-- ".$row["lastsurfed"]." + $surfTime = ".time()."-->";
if (
$old time()) {
 
$nopay 1;
 
$url "about:You are surfing too fast. Please wait.";
} else {

//FINDING AN OPEN WEBSITE
$query "SELECT $user_table.userid, $user_table.points, $user_table.username, $websites_table.id, $websites_table.url, $websites_table.userid, $websites_table.active 
FROM $user_table INNER JOIN $websites_table ON $websites_table.userid = $user_table.userid 
where $websites_table.active='y' and $user_table.points >0 and $websites_table.userid !="
.$id." order by rand()";

$result mysql_query($query) or die ("Error in query: $query. " mysql_error());
if (
mysql_num_rows($result) != 0) {
 
$wrow mysql_fetch_array($result);
 
$url $wrow["url"];

 echo 
"<!-- removing 1 points from link owner "$wrow["username"] ."-->";
 
mysql_query("UPDATE $user_table SET points=points-1 WHERE userid=".$wrow["userid"]);
 
mysql_query("UPDATE $websites_table SET stats=stats+1 WHERE id=".$wrow["id"]);
} else {
 
$url $defaultsite;
 echo 
"<!-- No websites found, showing default -->";
}

if (@
$HTTP_POST_VARS["togive"]) {
 if (
$memtype == "gold") {
    
mysql_query("UPDATE $user_table SET points=points+$goldreturn WHERE userid=".$id);
 } else {
    
mysql_query("UPDATE $user_table SET points=points+$sreturn WHERE userid=".$id);
 }
  
mysql_query("UPDATE $user_table SET surftime=surftime+$surfTime WHERE userid=".$id);
} else {
  echo 
"<!-- User loaded first or refreshed. No soup for you!-->";
}

// END CHECK FOR SURFING TOO FAST

?>
    <HTML>
     <HEAD>
     <SCRIPT>
        if (top.location != self.location) {
            top.location = self.location;
        }
        window.focus();
     </SCRIPT>
      <TITLE>Surfing - <? echo $title?>: You have <? echo $row["points"]; ?> points</TITLE>
     </HEAD>

<FRAMESET ROWS="20,*" FRAMESPACING="0" BORDER="0"><FRAME MARGINWIDTH="0" MARGINHEIGHT="0" NORESIZE SCROLLING=NO SRC="surfbar.php?utype=<? echo $memtype?>&togive=<? print @$togive?>&webid=<? echo @$wrow["id"]; ?>" FRAMEBORDER="0"><FRAME MARGINWIDTH="0" MARGINHEIGHT="0" NAME="bottom" SCROLLING=AUTO SRC="<? print $url?>" FRAMEBORDER="0">
      <NOFRAMES>
       <BODY>
        <P>
         This page is designed for use with a browser that supports frames.
       </BODY>
      </NOFRAMES>
     </FRAMESET>
    </HTML>
If someone can help me , il be very very grateful

ty and sry my bad english
Reply With Quote
Sponsored Links
(#2 (permalink))
Old
Junior Member
gyzmoo88 is on a distinguished road
 
Posts: 10
Join Date: May 2012
Default 05-05-2012, 05:01 PM

Can anyone help me pls ?

i really googled for java script ... mysql queris .. but nothing ..

i hope il get an answear ..
Reply With Quote
(#3 (permalink))
Old
Senior Member
grace1004 is on a distinguished road
 
Posts: 735
Join Date: Dec 2010
Default 05-05-2012, 09:36 PM

In readme.txt file, you can find:

Quote:
If you need support from a human, feel free to send questions to support@allthetraffic.com
Why don't you send email to support@allthetraffic.com?
Reply With Quote
(#4 (permalink))
Old
Junior Member
gyzmoo88 is on a distinguished road
 
Posts: 10
Join Date: May 2012
Default 05-05-2012, 10:32 PM

i did 1 week ago .. but no sign of life .. from them

i think the mail support@allthetraffic.com is dead ..

Last edited by gyzmoo88; 05-05-2012 at 10:57 PM.
Reply With Quote
(#5 (permalink))
Old
Junior Member
gyzmoo88 is on a distinguished road
 
Posts: 10
Join Date: May 2012
Default 05-06-2012, 12:34 AM

ok , i added this in surfbar.php and surf.php ..

Code:
function createWnd(){

	newwnd=window.open(parent.url[1],"hehe","toolbar,scrollbars=1,statusbar,titlebar,menubar,height=300,width=500");


<td align="center" ><a href="javascript: createWnd();"><img src="images/open.gif" border="0" alt="Open  curent site in the new window"></a></td>
but no results .. the button appears ..but when i press nothing happens ..

im waiting some suggestions ...
Reply With Quote
(#6 (permalink))
Old
Senior Member
grace1004 is on a distinguished road
 
Posts: 735
Join Date: Dec 2010
Default 05-06-2012, 10:50 AM

Why do you want to add surfbar.php directly to your site? You can create an independent site with the traffic
script, and put the link to the traffic site on the main page of the parent site. If you don't like the main page
contents for the traffic site, you can change it by editing require.inc.php file.
Reply With Quote
(#7 (permalink))
Old
Junior Member
gyzmoo88 is on a distinguished road
 
Posts: 10
Join Date: May 2012
Default 05-06-2012, 01:55 PM

i want to add on the top surfbar a button and when some one surf and see a site that is interested ..so he can open that adress in a new tab like other traffic exchanges site have the option open site in a new window .. i dont want to add a link on the main page
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.2
vBulletin Skin developed by: vBStyles.com