Help with gateway script!

Reply

Join Date: Apr 2008
Posts: 17
Reputation: elbuhleini is an unknown quantity at this point 
Solved Threads: 0
elbuhleini's Avatar
elbuhleini elbuhleini is offline Offline
Newbie Poster

Help with gateway script!

 
0
  #1
Dec 19th, 2008
Hi,
I have a site with free games, etc..
I want to do this: when a user clicks on a game to play, he is redirected to the landing page, where a script checks, if he has our toolbar installed; if yes, then he can play the game - if not, the background freezes and in the front shows a prompt window (mgate.php), to install the toolbar.
I have developed a code, but it does not work properly, so I am asking for a little help
Here is the code for the page with game on it (example: index.php):

  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. toolbar=0;
  5. function ToolBarInit(tool) {
  6. toolbar=1;
  7. }
  8.  
  9. function checkToolbar(){
  10. if(toolbar!=1) {
  11. window.location.href="landingpage.php";
  12. }
  13. }
  14. </script>
  15. <script language="javascript">
  16. document.getElementById('mask').style.visibility='visible'
  17. document.getElementById('mask2').style.visibility='visible'
  18.  
  19. document.getElementById('mask').style.height=document.body.clientHeight
  20.  
  21. function loadContent(){
  22.  
  23. if(toolbar==1){ document.getElementById('cont').innerHTML='<div width=500 height=500 style="overflow: hidden;" id=media_container><embed src= "http://www.odeo.com/flash/audio_player_standard_gray.swf" quality="high" width="300" height="52" allowScriptAccess="always" wmode="transparent" type="application/x-shockwave-flash" flashvars= "valid_sample_rate=true&external_url=<?=$_GET[url];?>" pluginspage="http://www.macromedia.com/go/getflashplayer"> </embed></div>'
  24. document.getElementById('mask').style.visibility='hidden'
  25. document.getElementById('mask2').style.visibility='hidden'
  26.  
  27. }
  28. }
  29.  
  30. function confirmDL(){
  31. location.href='http://mydomain/toolbar.exe';
  32. }
  33.  
  34. </script>
  35. </head>
  36. <body>
  37.  
  38. <h1><a href="http://mydomain/game.swf">Click to Play!</a></h1>
  39. </body>
  40. </html>

And here is the code for the landing page:

  1. <html>
  2. <head>
  3. </head>
  4. <body onLoad="loadContent();" style="position:relative; display:block">
  5. <div id=mask style="width:100%; height:100%; position:absolute; z-index:1000; background-color: black; filter:alpha(opacity=50);-moz-opacity:.50;opacity:.50;left:0px; top:0px; display:block; visibility:hidden" align=center></div>
  6. <div id=mask2 style=" position: absolute; width: 650px; z-index:1500; display:block; margin-left:50%; visibility:hidden" ><div style='position:absolute; z-index:1500; width:650px; height:450px; background-color:white; border:1px solid gray; margin-left:-325px; display:block; margin-top:200px; ' align=center><?php include_once("mgate.php");?></div></div>
  7. <script language="javascript">
  8. document.getElementById('mask').style.visibility='visible'
  9. document.getElementById('mask2').style.visibility='visible'
  10.  
  11. document.getElementById('mask').style.height=document.body.clientHeight
  12.  
  13. function loadContent(){
  14.  
  15. if(toolbar==1){ document.getElementById('cont').innerHTML='<div width=500 height=500 style="overflow: hidden;" id=media_container><embed src= "http://www.odeo.com/flash/audio_player_standard_gray.swf" quality="high" width="300" height="52" allowScriptAccess="always" wmode="transparent" type="application/x-shockwave-flash" flashvars= "valid_sample_rate=true&external_url=<?=$_GET[url];?>" pluginspage="http://www.macromedia.com/go/getflashplayer"> </embed></div>'
  16. document.getElementById('mask').style.visibility='hidden'
  17. document.getElementById('mask2').style.visibility='hidden'
  18.  
  19. }
  20. }
  21.  
  22. function confirmDL(){
  23. location.href='http://mydomain/toolbar.exe';
  24. }
  25.  
  26. </script>
  27.  
  28. <div id=('cont')
  29.  
  30. </body>
  31. </html>
Help pls!
If you think you are the smartest, you definetly are not. But you can strive to be one. Cashwizz Affiliate network
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC