Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
myhelipad
Regular
Regular



Joined: Apr 17, 2004
Posts: 71

PostPosted: Sat Dec 05, 2009 12:44 am Reply with quote

Hi,

Refer: Only registered users can see links on this board! Get registered or login!

I install NSN_GR_Downloads_750_103pl2 into RavenNuke_v2.40.00 all work find after follow those idea on forum refer above, but problem is when I do Downloads Configuration and set Use Security Code to YES all my register user can't download because of Security Code not show.

How do i do?

Regards
 
View user's profile Send private message Visit poster's website
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Sat Dec 05, 2009 6:50 am Reply with quote

Try replacing your modules/Downloads/public/getit.php with this.

Code:
<?php


/********************************************************/
/* NSN GR Downloads                                     */
/* By: NukeScripts Network (webmaster@nukescripts.net)  */
/* http://www.nukescripts.net                           */
/* Copyright © 2000-2005 by NukeScripts Network         */
/********************************************************/

$lid = intval($lid);
$result = $db->sql_query("SELECT * FROM ".$prefix."_nsngd_downloads WHERE lid=$lid AND active>'0'");
$lidinfo = $db->sql_fetchrow($result);
$pagetitle = "- "._DOWNLOADPROFILE.": ".stripslashes($lidinfo['title']);
@include("header.php");
$priv = $lidinfo['sid'] - 2;
if (($lidinfo['sid'] == 0) || ($lidinfo['sid'] == 1 AND is_user($user))  || ($lidinfo['sid'] == 2 AND is_admin($admin)) || ($lidinfo['sid'] > 2 AND of_group($priv)) || $dl_config['show_download'] == '1') {
  if ($lidinfo['lid'] == "" OR $lidinfo['active'] == 0) {
    title(_DOWNLOADPROFILE.": "._INVALIDDOWNLOAD);
    OpenTable();
    echo "<center><b>"._INVALIDDOWNLOAD."</b></center>\n";
  } else {
    $fetchid = base64_encode($lidinfo['url']);
    $title = stripslashes($lidinfo['title']);
    title(_DOWNLOADPROFILE.": $title");
    OpenTable();
    mt_srand ((double)microtime()*1000000);
    $maxran = 1000000;
    $random_num = mt_rand(0, $maxran);
    $lidinfo['description'] = stripslashes($lidinfo['description']);
    $lidinfo['description'] = ereg_replace ("\r\n", "<br />", $lidinfo['description']);
    if (is_admin($admin)) {
      $myimage = myimage("edit.png");
      echo "<a href='".$admin_file.".php?op=DownloadModify&amp;lid=$lid' target='$lid'><img align='middle' src='$myimage' border='0' alt='"._DL_EDIT."' /></a>&nbsp;";
    } else {
      $myimage = myimage("show.png");
      echo "<img align='middle' src='$myimage' border='0' alt='' />&nbsp;";
    }
    echo "<font class='title'>"._DOWNLOADPROFILE.": $title</font><br /><hr />";
    echo "".$lidinfo['description']."<br /><hr />";
    echo "<b>"._VERSION.":</b> ".$lidinfo['version']."<br />\n";
    echo "<b>"._FILESIZE.":</b> ".CoolSize($lidinfo['filesize'])."<br />";
    echo "<b>"._ADDEDON.":</b> ".CoolDate($lidinfo['date'])."<br />\n";
    echo "<b>"._DOWNLOADS.":</b> ".$lidinfo['hits']."<br />";
    echo "<b>"._HOMEPAGE.":</b> ";
    if ($lidinfo['homepage'] == "" || $lidinfo['homepage'] == "http://") {
      echo _DL_NOTLIST;
    } else {
      echo "<a href='".$lidinfo['homepage']."' target='new'>".$lidinfo['homepage']."</a>";
    }
    echo "<hr />";
    if (($lidinfo['sid'] == 0) || ($lidinfo['sid'] == 1 AND is_user($user))  || ($lidinfo['sid'] == 2 AND is_admin($admin)) || ($lidinfo['sid'] > 2 AND of_group($priv))) {
      echo _DL_DIRECTIONS." "._DL_DLNOTES1."$title"._DL_DLNOTES2."</font><br /><br />";
      echo "<center><table border='0'>";
      echo "<form action='modules.php?name=$module_name' method='POST'>";
      echo "<input type='hidden' name='op' value='go' />";
      echo "<input type='hidden' name='lid' value='".$lidinfo['lid']."' />";
      echo "<input type='hidden' name='fetchid' value='$fetchid' />";
    if ($dl_config['usegfxcheck'] == 1) {
       /*****[BEGIN]******************************************
                 [ Base:    GFX Code                           v1.0.0 ]
                 ******************************************************/
                global $modGFXChk, $module_name;
                echo security_code($modGFXChk[$module_name], 'stacked');
                /*****[END]********************************************
                 [ Base:    GFX Code                           v1.0.0 ]
                 ******************************************************/
            }
      echo "<tr><td colspan='2' align='center'><input type='submit' name='"._DL_GOGET."' value='"._DL_GOGET."' /></td></tr>";
      echo "</form>";
      echo "</table></center><br />";
      echo "<center><font class='content'>[ <a href='modules.php?name=$module_name&amp;op=modifydownloadrequest&amp;lid=$lid'>"._MODIFY."</a> ]</font></center>\n";
    } else {
      restricted($lidinfo['sid']);
    }
  }
  CloseTable();
} else {
  OpenTable();
  restricted($lidinfo['sid']);
  CloseTable();
}
@include("footer.php");

?>

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website
myhelipad







PostPosted: Sat Dec 05, 2009 7:37 am Reply with quote

nuken wrote:
Try replacing your modules/Downloads/public/getit.php with this.


Hi nuken;

has try edit getit.php, the Security Code appear but click on button Go Get It, its return with

Code:
[b]Passcode Error[/b]


You have entered an invalid Passcode.


Regards
 
nuken







PostPosted: Sat Dec 05, 2009 7:46 am Reply with quote

in rnconfig.php does the Downloads have a 3 by it like this

Code:
$modGFXChk = array(

   'Downloads' => 3,
   'Feedback' => 3,
   'News' => 3,
   'Recommend_Us' => 3,
   'Reviews' => 3,
   'Submit_News' => 3,
   'Surveys' => 3,
   'Web_Links' => 3
);
 
nuken







PostPosted: Sat Dec 05, 2009 7:56 am Reply with quote

Hmmm. You may need to replace modules/Downloads/public/go.php with this.

Code:
<?php


/********************************************************/
/* NSN GR Downloads                                     */
/* By: NukeScripts Network (webmaster@nukescripts.net)  */
/* http://www.nukescripts.net                           */
/* Copyright © 2000-2005 by NukeScripts Network         */
/********************************************************/

$lid = intval($lid);
$lidinfo = $db->sql_fetchrow($db->sql_query("SELECT * FROM ".$prefix."_nsngd_downloads WHERE lid=$lid"));
$priv = $lidinfo['sid'] - 2;
if (($lidinfo['sid'] == 0) || ($lidinfo['sid'] == 1 AND is_user($user)) || ($lidinfo['sid'] == 2 AND is_admin($admin)) || ($lidinfo['sid'] > 2 AND of_group($priv))) {
  if ($fetchid != "") {
    $datekey = date("F j");
    $rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $checkpass . $datekey));
    $code = substr($rcode, 2, 8);
   /*****[BEGIN]******************************************
     [ Base:    GFX Code                           v1.0.0 ]
     ******************************************************/
    global $modGFXChk, $module_name;
    if (isset($_POST['gfx_check'])) $gfx_check = $_POST['gfx_check']; else $gfx_check = '';
    if (!security_code_check($gfx_check, $modGFXChk[$module_name])) {
    /*****[END]********************************************
     [ Base:    GFX Code                           v1.0.0 ]
    ******************************************************/
      @include("header.php");
      title(_DL_PASSERR);
      OpenTable();
      echo "<center>"._DL_INVALIDPASS."</center><br />\n";
      echo "<center>"._GOBACK."</center>\n";
      CloseTable();
      @include("footer.php");
      die();
    } else {
      $url = base64_decode($fetchid);
      if (stristr($lidinfo['url'], "http://") || stristr($lidinfo['url'], "ftp://") || @file_exists($lidinfo['url'])) {
      //if (@file($lidinfo['url'])) {
        @include("includes/counter.php");
        $db->sql_query("UPDATE ".$prefix."_nsngd_downloads SET hits=hits+1 WHERE lid=$lid");
        if (!is_admin($admin)) {
          $uinfo = getusrinfo($user);
          $username = $uinfo['username'];
          if ($username == "") { $username = $_SERVER['REMOTE_ADDR']; }
          $result = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_nsngd_accesses WHERE username='$username'"));
          if ($result < 1) {
            $db->sql_query("INSERT INTO ".$prefix."_nsngd_accesses VALUES ('$username', 1, 0)");
          } else {
            $db->sql_query("UPDATE ".$prefix."_nsngd_accesses SET downloads=downloads+1 WHERE username='$username'");
          }
        }
        Header("Location: ".$lidinfo['url']);
        exit;
      } else {
        cookiedecode($user);
        $username = $cookie[1];
        if ($username == "") { $username = "Guest"; }
        $date = date("M d, Y g:i:a");
        $sub_ip = $_SERVER['REMOTE_ADDR'];
        $db->sql_query("INSERT INTO ".$prefix."_nsngd_mods VALUES (NULL, $lid, 0, 0, '', '', '', '"._DSCRIPT."<br>$date', '$sub_ip', 1, '$auth_name', '$email', '$filesize', '$version', '$homepage')");
        @include("header.php");
        title(_DL_FNF." ".$lidinfo['title']);
        OpenTable();
        echo "<center>"._DL_SORRY." $username, ".$lidinfo['title']." "._DL_NOTFOUND."<br /><br />"._DL_FNFREASON."<br /><br />";
        echo _DL_FLAGGED."</center><br />";
        echo "<center>[ <a href='modules.php?name=$module_name'>"._DL_BACKTO." $module_name</a> ]</center>";
        CloseTable();
        @include("footer.php");
      }
    }
  } else {
    @include("header.php");
    title(_DL_URLERR);
    OpenTable();
    echo "<center>"._DL_INVALIDURL."</center><br>";
    echo "<center>"._GOBACK."</center>";
    CloseTable();
    @include("footer.php");
  }
} else {
  @include("header.php");
  title(_DL_RESTRICTED);
  OpenTable();
  restricted($lidinfo['sid']);
  CloseTable();
  @include("footer.php");
}

?>
 
myhelipad







PostPosted: Sat Dec 05, 2009 8:28 am Reply with quote

nuken wrote:
in rnconfig.php does the Downloads have a 3 by it like this

Code:
$modGFXChk = array(

   'Downloads' => 3,
   'Feedback' => 3,
   'News' => 3,
   'Recommend_Us' => 3,
   'Reviews' => 3,
   'Submit_News' => 3,
   'Surveys' => 3,
   'Web_Links' => 3
);


Yes its the same as what i have.
 
myhelipad







PostPosted: Sat Dec 05, 2009 8:37 am Reply with quote

nuken wrote:
Hmmm. You may need to replace modules/Downloads/public/go.php with this.



after i replace go.php as your advise, its working correctly Security Code appear & user can dowload.

Thank you very much nuken for your help.

all the best for you & your team.

Regards.
 
myhelipad







PostPosted: Sat Dec 05, 2009 9:20 am Reply with quote

hi,

This another bug maybe, when i browse my website using google chrome & IE the Security Code appear as what i aspected but when browse using firefox the Security Code disappear when i click Go Get It a file can be download. I dont no how to describe, hope you can get what i mean.

Thank You

Regards.
 
nuken







PostPosted: Sat Dec 05, 2009 9:54 am Reply with quote

Are you logged in as admin in firefox? If you are logged in as admin, the security code is not there, only for users and visitors.
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Sat Dec 05, 2009 10:29 am Reply with quote

Guys, I took over NSN Group Downloads quite awhile back from Bob, but have not had time to do much with it. I have picked it up again and am working on the 1.1.0 version.

Have you seen this post here:

http://montegoscripts.com/ftopict-210.html

Maybe start with the original code and see if this works.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
myhelipad







PostPosted: Sun Dec 06, 2009 12:12 am Reply with quote

nuken wrote:
Are you logged in as admin in firefox? If you are logged in as admin, the security code is not there, only for users and visitors.


Figured it out this morning untill I realised I was logged in as admin Embarassed
sorry for that.

now working find doing few testing other member and different also working.

Regards
 
montego







PostPosted: Sun Dec 06, 2009 1:09 pm Reply with quote

Excellent!
 
myhelipad







PostPosted: Sun Dec 06, 2009 6:28 pm Reply with quote

hi,

for your info everything running smooth and good as new out of box, the module work great as i try with new members and others type of browser every problem that i ask here is solve you all the one. Hope this be the future release for this module.

All the best.

Regards.
 
montego







PostPosted: Wed Dec 09, 2009 6:35 am Reply with quote

myhelipad wrote:
Hope this be the future release for this module.


I am definitely working on 1.1.0 of NSN Group Downloads and one of the main reasons for doing so, is to propose it as a replacement to the Downloads module currently in RavenNuke(tm).
 
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm



Joined: Aug 13, 2009
Posts: 1123

PostPosted: Wed Dec 09, 2009 9:46 am Reply with quote

you have my vote montego and it will be nice if you implement an option to upload a picture to tinypic or other fast image server or your own server.
 
View user's profile Send private message
montego







PostPosted: Thu Dec 10, 2009 6:16 am Reply with quote

unicornio, it will not be in this initial release, but better support for upload pictures/graphics is in the roadmap. Wink
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous topic
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 can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©