whats wrong in this code ? help me please

Discussion in 'JavaScript' started by matrex722, Dec 31, 2010.

  1. #1
    i dont know whats wrong with this code :


    echo "<S";
        echo "CRIPT> var timer = ";
        echo $loadtime;
        echo "; ti();function ti(){if(timer>0){document.getElementById(\"links\").innerHTML = \"<button name=\"B3\" style=\"font-size: 10px; font-family: tahoma , arial, helvetica, verdana, sans-serif ; color: #000000; font-style: ; border: 1px solid #10315A; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1; background-color:transparent\"><font face=\"Tahoma\" style=\"font-size: 9pt\"><b>جار";
        echo "ي تجهيز الملف &nbsp;\" + timer +'</button></b><br><br>';timer = timer - 1;setTimeout(\"ti()\", 1000)} else {document.getElementById(\"links\").innerHTML = \"<button onclick=\"submit()\" name=\"B3\" style=\"font-size: 10px; font-family: tahoma , arial, helvetica, verdana, sans-serif ; color: #000000; font-style: ; border: 1px solid #10315A; padding-left: 4; padding-right: 4; padding-top: 1; padding-bo";
        echo "ttom: 1; background-color:transparent\"><font face=\"Tahoma\" style=\"font-size: 9pt\"><b>اضغط هنا للتحميل</button></a><br><br>\";}} </SCRIPT> ";
        echo "<S";
        echo "CRIPT> function startDownload(){      window.location = \"code.php?f=load&sb=";
        echo $avilablespped;
        echo "&idxmc=";
        echo $idcm;
        echo "&d=";
        echo $avilabledownlod;
        echo "\";//    document.downloadForm.submit();  }  </script>";
    PHP:

    it works only in IE6

    not working with IE 8 or google chrom

    please help me
     
    matrex722, Dec 31, 2010 IP
  2. shofstetter

    shofstetter Well-Known Member

    Messages:
    178
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    120
    #2
    shofstetter, Dec 31, 2010 IP
  3. matrex722

    matrex722 Active Member

    Messages:
    50
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #3
    i cant understand you

    can you please tell me how to fix it ?

    to make it work in google chrom and IE 8 and fire fox
     
    matrex722, Dec 31, 2010 IP
  4. shofstetter

    shofstetter Well-Known Member

    Messages:
    178
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    120
    #4
    It will never work in any browser new than IE 6. Your code is made to exploit a security hole that has been fixed.
     
    shofstetter, Dec 31, 2010 IP
  5. matrex722

    matrex722 Active Member

    Messages:
    50
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #5
    is there any code do the same and work in IE8 and google chrom and fire fox ?
     
    matrex722, Dec 31, 2010 IP
  6. shofstetter

    shofstetter Well-Known Member

    Messages:
    178
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    120
    #6
    There is no way to make it work, I do not condone drive by downloads which is what your script does. furthermore your code is made to be injected into other peoples websites that run older versions of php. So I will not help you script kitty, and I don't think anyone else here will either.
     
    shofstetter, Dec 31, 2010 IP
  7. matrex722

    matrex722 Active Member

    Messages:
    50
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #7
    what is the meaning of script kitty ?
     
    matrex722, Dec 31, 2010 IP
  8. shofstetter

    shofstetter Well-Known Member

    Messages:
    178
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    120
    #8
    definition:
     
    shofstetter, Dec 31, 2010 IP
  9. matrex722

    matrex722 Active Member

    Messages:
    50
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #9
    im not hacker
    i paid for this script from along time
    but they didnt support it any more cause this script nulled by someone
    this code is in file upload script with timer to download
    for example when you want to download somthing from it you must wait 20 sec to show download link
    it works with IE6 great
    but with highr or fire fox is not
    so i opened site where i was paid the script and i found it closed !!!
    thats what makes me search for resolve for this problem
    thats it
    and i want it work in IE8 and fire fox and google chrom
     
    matrex722, Jan 1, 2011 IP
  10. shofstetter

    shofstetter Well-Known Member

    Messages:
    178
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    120
    #10
    some web browsers block attempts to change location to help prevent automatic download of malware. You can make it work by instead providing the user with a link they can click to start the download. Something like I have below. You can echo the code with php and insert your download url variables.


    
    <script type="text/javascript">
    function delay_download(){
    document.getElementById("mydiv").innerHTML = "<a href=\"download.php?file=00629\">Download Now</a>"; // inset download link
    }
    </script>
    
    <body onload="setTimeout('delay_download()',20000)"> <!-- call function to insert link after 20 seconds has passed -->
    <div name="mydiv" id="mydiv">
    <b>Your download will be ready in 20 Seconds</b><!-- link will appear here after 20 seconds -->
    </div>
    
    
    Code (markup):
     
    shofstetter, Jan 1, 2011 IP
  11. matrex722

    matrex722 Active Member

    Messages:
    50
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #11
    thank you so much

    i will try it now
     
    matrex722, Jan 2, 2011 IP
  12. matrex722

    matrex722 Active Member

    Messages:
    50
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #12
    didnt work too

    how can i make the download url appear without this timer ?
     
    matrex722, Jan 2, 2011 IP