Fetching mod

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Fetching mod
stealthusa
CZ Addict
stealthusa has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Self-Employed
Age: 58
Gender: Male
Fav. Sports Team: Cowboys
Website:
Status: Offline
Joined: Jan 23, 2004
0.05 posts per day
Posts: 353
Points: 14,459
 Yahoo Messenger  ICQ Number
can someone tell me how to get the fetching mod to work and not to show letters but numbers only.



Back to top Reply with quote
#2   re: Fetching mod
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Post it in a zip and I will take a look at it.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: Fetching mod
stealthusa
CZ Addict
stealthusa has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Self-Employed
Age: 58
Gender: Male
Fav. Sports Team: Cowboys
Website:
Status: Offline
Joined: Jan 23, 2004
0.05 posts per day
Posts: 353
Points: 14,459
 Yahoo Messenger  ICQ Number
the only thing not sure if it will work with my download i have nukestyle v2.0 waiting on my email for the upgrade



Back to top Reply with quote
#4   re: Fetching mod
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Ok lets try this make a back up of your modules/Downloads/index.php

find
function getit($lid) {


and replace that whole function with

//
// Begin Fetching Mod
//

/* Download Fetching Hack by MGCJerry */
function gfx($random_num) {
    global $prefix, $db, $module_name;
    require("config.php");
    $datekey = date("F j");
    $rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
    $code = substr($rcode, 2, 6);
    $image = ImageCreateFromJPEG("modules/$module_name/images/code_bg.jpg&q uot;);
    $text_color = ImageColorAllocate($image, 80, 80, 80);
    Header("Content-type: image/jpeg");
    ImageString ($image, 5, 12, 2, $code, $text_color);
    ImageJPEG($image, '', 75);
    ImageDestroy($image);
    die();
}
function download($lid, $checkpass, $fetchid, $title, $passcode, $url){
global $db, $prefix, $user;
if ($fetchid == "") {
        header("location: index.php");
}
        require("config.php");
        $datekey = date("F j");
        $rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $_POST[checkpass] . $datekey));
        $code = substr($rcode, 2, 6);
if ($code == $passcode) {
$url = base64_decode($fetchid);
        if (ereg ("http", $url, $location)) {
                /* Increase the counter for total downloads */
                $db->sql_query("update ".$prefix."_downloads_downloads set hits=hits+1 where lid=$lid");
                header("location: $url");
                exit;
        }
       if (file_exists($url)) {
                /* Fetch the file if it exists */

                /* Increase the counter for total downloads */
                $db->sql_query("update ".$prefix."_downloads_downloads set hits=hits+1 where lid=$lid");
                header("location: $url");
                exit;
        } else {
                cookiedecode($user);
                $username = $cookie[1];
                if ($username == "") {
                        $username = "Guest";
                }
                $date = date("M d, Y g:i:a");

                /* Flag it for being a broken link if it isn't found */
                $db->sql_query("insert into ".$prefix."_downloads_modrequest values (NULL, $lid, 0, 0, '', '', '', 'Download Script<br>$date', 1, '$auth_name', '$email', '$filesize', '$version', '$homepage')");

                include("header.php");

    menu(1);
    echo "<a name=\"dlcom\">";
    ns_mod_title3("File Not Found for $title","File Not Found for $title");
    echo"<br>";
                OpenTable();
                ns_dl_OpenTable();
                echo "<p>Sorry $username, The file for <b>\"$title\"</b> was not found. It
                could be because the person hosting the download may removed or renamed the
                file.</p>
                <p>This download has now been automatically flagged for review by the
                webmaster.</p>
                <center>[ <a href=\"modules.php?name=Downloads\">Back To Downloads</a> ]</center>";
                ns_dl_CloseTable();
                CloseTable();
                echo "<br>";

        OpenTable();
        ns_dl_OpenTable();
        echo "<div align=\"right\"><font class=\"tiny\">Fetching Mod by
        <a href=\"http://www.2thextreme.org\">MGCJerry</a> and adjusted by <a href=\"http://www.portedmods.com\">Mighty_Y</a></div>";
        ns_dl_CloseTable();
        CloseTable();

                include("footer.php");
                return;
        }

} else {
        include("header.php");
    menu(1);
    echo "<a name=\"dlcom\">";
    ns_mod_title3("Password Error","Password Error");
    echo"<br>";
        OpenTable();
        ns_dl_OpenTable();
        echo "
        <p>You have entered an invalid Password.</p>
        <input type=\"button\" value=\"Try Again\" onclick=\"history.go(-1)\">";
        ns_dl_CloseTable();
        CloseTable();
        echo "<br>";

        OpenTable();
        ns_dl_OpenTable();
        echo "<div align=\"right\"><font class=\"tiny\">Fetching Mod by
        <a href=\"http://www.2thextreme.org\">MGCJerry</a> and adjusted by <a href=\"http://www.portedmods.com\">Mighty_Y</a></div>";
        ns_dl_CloseTable();
        CloseTable();

        include("footer.php");
        return;
}
       }
function getit($lid) {
    global $prefix, $dbi, $module_name, $user, $sitename, $my_headlines;
    $result = sql_query("SELECT ns_dl_reg_down from ".$prefix."_ns_downloads_general", $dbi);
    list($ns_dl_reg_down) = sql_fetch_row($result, $dbi);
    if ($ns_dl_reg_down == 0) {
    mt_srand ((double)microtime()*1000000);
    $maxran = 1000000;
    $random_num = mt_rand(0, $maxran);
    $result = sql_query("select lid, title, url from ".$prefix."_downloads_downloads where lid=$lid", $dbi);
    list($lid, $title, $url) = sql_fetch_row($result, $dbi);
        $fetchid = base64_encode($url);
        $transfertitle = str_replace (" ", "_", $title);
        include("header.php");

$codepass = "<img src='modules.php?name=Downloads&d_op=gfx&random_num=$random_num ' border='1'>";
    menu(1);
    echo "<a name=\"dlcom\">";
    ns_mod_title3("Downloading $title","Downloading $title");
        echo "<br>\n";
        OpenTable();
        ns_dl_OpenTable();
        echo "<p><b>Directions:</b> To download the the file &quot;<b>$title</b>&quot;,
you need to retype the displayed password,
and click &quot;Download&quot;. In a few moments you will receive
the download dialog or you will be directed to the appropriate site.</p>

<form action=\"modules.php?name=$module_name\" method=\"POST\">
    <input type=\"hidden\" name=\"lid\" value=\"$lid\">
    <input type=\"hidden\" name=\"checkpass\" value=\"$random_num\">
    <input type=\"hidden\" name=\"fetchid\" value=\"$fetchid\">
    <input type=\"hidden\" name=\"title\" value=\"$title\">
    <input type=\"hidden\" name=\"url\" value=\"$url\">
    <div align=\"center\"><center><table border=\"0\">
        <tr>
            <td><b>Password:</b></td>
            <td valign=\"middle\">$codepass</td>
        </tr>
        <tr>
            <td><b>Retype Password:</b></td>
            <td><input type=\"text\" size=\"20\" name=\"passcode\"></td>
        </tr>
    </table>
    </center></div><p align=\"center\">
    <input type=\"hidden\" name=\"d_op\" value=\"download\">
    <input type=\"button\" value=\"Cancel\" onclick=\"history.go(-1)\">
    <input type=\"submit\" name=\"Fetch It\" value=\"Download\">
    </p><p align=\"center\">
[ <a href=\"modules.php?name=Downloads&d_op=brokendownload&amp; lid=$lid\">"._REPORTBROKEN."</a>
| <a href=\"modules.php?name=Downloads&d_op=viewdownloaddetails&amp ;amp;lid=$lid&amp;ttitle=$transfertitle\">"._DETAILS.& quot;</a> ]
</p>
</form>";
        ns_dl_CloseTable();
        CloseTable();
        echo "<br>\n";
        OpenTable();
        ns_dl_OpenTable();
        echo "<div align=\"right\"><font class=\"tiny\">Fetching Mod by
        <a href=\"http://www.2thextreme.org\">MGCJerry</a> and adjusted by <a href=\"http://www.portedmods.com\">Mighty_Y</a></div>";
        ns_dl_CloseTable();
        CloseTable();
        echo "<br>";
        include("footer.php");
    } else if ($ns_dl_reg_down == 1 && (is_user($user))) {
    mt_srand ((double)microtime()*1000000);
    $maxran = 1000000;
    $random_num = mt_rand(0, $maxran);
    $result = sql_query("select lid, title, url from ".$prefix."_downloads_downloads where lid=$lid", $dbi);
    list($lid, $title, $url) = sql_fetch_row($result, $dbi);
        $fetchid = base64_encode($url);
        $transfertitle = str_replace (" ", "_", $title);
        include("header.php");
        $codepass = "<img src='modules.php?name=Downloads&d_op=gfx&random_num=$random_num ' border='1'>";
    menu(1);
    echo "<a name=\"dlcom\">";
    ns_mod_title3("Downloading $title","Downloading $title");
        echo "<br>\n";
        OpenTable();
        ns_dl_OpenTable();
        echo "<p><b>Directions:</b> To download the the file &quot;<b>$title</b>&quot;,
you need to retype the displayed password,
and click &quot;Download&quot;. In a few moments you will receive
the download dialog or you will be directed to the appropriate site.</p>

<form action=\"modules.php?name=$module_name\" method=\"POST\">
    <input type=\"hidden\" name=\"lid\" value=\"$lid\">
    <input type=\"hidden\" name=\"checkpass\" value=\"$random_num\">
    <input type=\"hidden\" name=\"fetchid\" value=\"$fetchid\">
    <input type=\"hidden\" name=\"title\" value=\"$title\">
    <input type=\"hidden\" name=\"url\" value=\"$url\">
    <div align=\"center\"><center><table border=\"0\">
        <tr>
            <td><b>Password:</b></td>
            <td valign=\"middle\">$codepass</td>
        </tr>
        <tr>
            <td><b>Retype Password:</b></td>
            <td><input type=\"text\" size=\"20\" name=\"passcode\"></td>
        </tr>
    </table>
    </center></div><p align=\"center\">
    <input type=\"hidden\" name=\"d_op\" value=\"download\">
    <input type=\"button\" value=\"Cancel\" onclick=\"history.go(-1)\">
    <input type=\"submit\" name=\"Fetch It\" value=\"Download\">
    </p><p align=\"center\">
[ <a href=\"modules.php?name=Downloads&d_op=brokendownload&amp; lid=$lid\">"._REPORTBROKEN."</a>
| <a href=\"modules.php?name=Downloads&d_op=viewdownloaddetails&amp ;amp;lid=$lid&amp;ttitle=$transfertitle\">"._DETAILS.& quot;</a> ]
</p>
</form>";
        ns_dl_CloseTable();
        CloseTable();
        echo "<br>\n";
        OpenTable();
        ns_dl_OpenTable();
        echo "<div align=\"right\"><font class=\"tiny\">Fetching Mod by
        <a href=\"http://www.2thextreme.org\">MGCJerry</a> and adjusted by <a href=\"http://www.portedmods.com\">Mighty_Y</a></div>";
        ns_dl_CloseTable();
        CloseTable();
        echo "<br>";
        include("footer.php");
    } else if ($ns_dl_reg_down == 1 && (!is_user($user))) {
    include("header.php");
    menu(1);
    echo "<a name=\"dl\">";
    ns_mod_title3("download_reg",""._REGDOWNLOAD.");
    OpenTable();
    ns_dl_register2($dlreg = 2);
    CloseTable();
    $maindownload = 1;
    ns_dl_link_bar($maindownload);
   }
}

//
// End Fetching Mod
//


find

case "viewdownloaddetails":                         
    viewdownloaddetails($lid, $ttitle);                   
    break;


After add

case "gfx":
    gfx($random_num);
    break;
    case "download":
    download($lid, $checkpass, $fetchid, $title, $passcode, $url);
    break;


And see if that works with the EDL 2.0



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#5   
stealthusa
CZ Addict
stealthusa has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Self-Employed
Age: 58
Gender: Male
Fav. Sports Team: Cowboys
Website:
Status: Offline
Joined: Jan 23, 2004
0.05 posts per day
Posts: 353
Points: 14,459
 Yahoo Messenger  ICQ Number
ok i will try and let you know
thank you.



Back to top Reply with quote
#6   Nukestyle EDM 1.7a fetch error
astalavistabd
CZ Newbie
astalavistabd has been a member for over 19 year's 19 Year Member
canada.gif
Occupation: Web Developer
Gender: Male
Website:
Status: Offline
Joined: Apr 24, 2005
0.00 posts per day
Posts: 21
Points: 2,231
AIM Address Yahoo Messenger MSN Messenger ICQ Number
I have been using this mod for last one year. Everything was working fine. But now when i moved my site to new server and change the download links formet from [http://www.mysite.com/downloads/somthing.exe] to [ /downloads/somthing.exe] my fatching section is giving this very known mysql error:
Column Count Doesn't Match Value Count At Row 1
and says, downlaod file has been moved to new location although all the links are correct. So, i just disable the fetch (security code section) and everything is working perfectly. Does anyone know the solution? Do i have to re-insert the EDM tables. Im scared, i will lose all my new settings. I noticed, the author of the fetch.php has a newer version in his site. Will it solve my problem, if i install the new fetch mod?

Nukestyle.com is down for a while, otherwise i would post this problem there. Thanks for your help.

My PHP : v2.4.0
My PHP-Nuke : v7.7
My Enhanced Download Module : 1.7a
My Fetch Mod : 1b



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum