Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
pure
New Member
New Member


Joined: Jan 07, 2004
Posts: 8

PostPosted: Tue Sep 14, 2004 3:05 pm Reply with quote

Hi,

A friend of mine installed this but he messed it up and it didn't work. So I had to uninstall all of it. I just followed the readme file and uninstall all the stuff that it asks you to install. Everything seems to be working fine except if a user try to login they get a blank page and in the address bar the address shows Only registered users can see links on this board! Get registered or login!

Before the installation of this nsn I had my default page setup to Forums so when users login they would be redirected to the Forums. But now if any user try to login it just comes up with a blank page with no error or anything and the address bar shows the above link.

Please con someone help out? I would really appriciate it.

Here's my index.html file from modules/Your_Account
Code:


<?php

/********************************************************/
/* CNB Your Account                                     */
/* By: Comunidade PHP Nuke Brasil                       */
/* Only registered users can see links on this board! Get registered or login!                              */
/* http://dev.phpnuke.org.br                            */
/* Copyright © 2004 by Comunidade PHP Nuke Brasil       */
/* ==================================================== */
/* Based from:                                          */
/* PHP-NUKE: Web Portal System                          */
/********************************************************/

if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
        die ("You can't access this file directly...");
}

require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
include("modules/$module_name/includes/functions.php");
$ya_config = ya_get_configs();
get_lang($module_name);
$userpage = 1;
$index = 1;
include("modules/$module_name/navbar.php");
cookiedecode($user);
getusrinfo($user);
if ((is_user($user)) AND (strtolower($userinfo[username]) == strtolower($cookie[1])) AND ($userinfo[user_password] == $cookie[2])) {

switch($op) {

    case "activate":
        include("modules/$module_name/public/activate.php");
    break;

    case "avatarlist":
        if (is_user($user)) {
            include("modules/$module_name/public/avatarlist.php");
        } else {
            notuser();
        }
    break;

    case "avatarsave":
        if (is_user($user)) {
            include("modules/$module_name/public/avatarsave.php");
        } else {
            notuser();
        }
    break;

    case "avatarlinksave":
        if (is_user($user)) {
            include("modules/$module_name/public/avatarlinksave.php");
        } else {
            notuser();
        }
    break;

    case "broadcast":
        if ($broadcast_msg == 1) {
            include("modules/$module_name/public/broadcast.php");
        } else {
            disabled();
        }
    break;

    case "delete":
        if ($ya_config['allowuserdelete'] == 1) {
            include("modules/$module_name/public/delete.php");
        } else {
            disabled();
        }
    break;

    case "deleteconfirm":
        if ($ya_config['allowuserdelete'] == 1) {
            include("modules/$module_name/public/deleteconfirm.php");
        } else {
            disabled();
        }
    break;

    case "editcomm":
        include("modules/$module_name/public/editcomm.php");
    break;

    case "edithome":
        include("modules/$module_name/public/edithome.php");
    break;

    case "edittheme":
    case "chgtheme":
        if ($ya_config['allowusertheme']==0) {
            include("modules/$module_name/public/chngtheme.php");
        } else {
            disabled();
        }
    break;

    case "edituser":
        include("modules/$module_name/public/edituser.php");
    break;

    case "gfx":
    // Begin Copyright (c) 2004 by NukeScripts Network
        $datekey = date("F j");
        $rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
        $code = substr($rcode, 2, 8);
        $ThemeSel = get_theme();
        if (file_exists("themes/$ThemeSel/images/code_bg.png")) {
            $codeimg = "themes/$ThemeSel/images/code_bg.png";
            include("themes/$ThemeSel/theme.php");
            $tcolor = str_replace("#", "", $textcolor1);
            $tc_r = hexdec(substr($tcolor, 0, 2));
            $tc_g = hexdec(substr($tcolor, 2, 2));
            $tc_b = hexdec(substr($tcolor, 4, 2));
        } else {
            $codeimg = "images/code_bg.png";
            $tc_r = $tc_g = $tc_b = 0;
        }
        $image = ImageCreateFromPNG($codeimg);
        $text_color = ImageColorAllocate($image, $tc_r, $tc_g, $tc_b);
        Header("Content-type: image/png");
        ImageString ($image, 5, 5, 2, $code, $text_color);
        ImagePNG($image, '', 75);
        ImageDestroy($image);
        die();
    // End Copyright (c) 2004 by NukeScripts Network
    break;

    case "login":
        $result = $db->sql_query("SELECT * FROM ".$user_prefix."_users WHERE username='$username'");
        $setinfo = $db->sql_fetchrow($result);
        $forward = ereg_replace("redirect=", "", "$redirect");
        if (ereg("privmsg", $forward)) { $pm_login = "active"; }
        if ($db->sql_numrows($result) == 0) {
            include("header.php");
            title(_USERREGLOGIN);
            OpenTable();
            echo "<center><font class='title'>"._SORRYNOUSERINFO."</font></center>\n";
            CloseTable();
            include("footer.php");
        } elseif ($db->sql_numrows($result) == 1 AND $setinfo['user_id'] != 1 AND $setinfo['user_password'] != "" AND $setinfo['user_active'] > 0 AND $setinfo['user_level'] > 0) {
            $dbpass=$setinfo[user_password];
            $non_crypt_pass = $user_password;
            $old_crypt_pass = crypt($user_password,substr($dbpass,0,2));
            $new_pass = md5($user_password);
            if (($dbpass == $non_crypt_pass) OR ($dbpass == $old_crypt_pass)) {
                $db->sql_query("UPDATE ".$user_prefix."_users SET user_password='$new_pass' WHERE username='$username'");
                $result = $db->sql_query("SELECT user_password FROM ".$user_prefix."_users WHERE username='$username'");
                list($dbpass) = $db->sql_fetchrow($result);
            }
            if ($dbpass != $new_pass) {
                Header("Location: modules.php?name=$module_name&stop=1");
                return;
            }
            $datekey = date("F j");
            $rcode = hexdec(md5($_SERVER['HTTP_USER_AGENT'] . $sitekey . $random_num . $datekey));
            $code = substr($rcode, 2, 8);
            if (extension_loaded("gd") AND $code != $gfx_check AND ($ya_config['usegfxcheck'] == 2 OR $ya_config['usegfxcheck'] == 3)) {
                Header("Location: modules.php?name=$module_name&stop=1");
                die();
            } else {
                yacookie($setinfo[user_id], $setinfo[username], $new_pass, $setinfo[storynum], $setinfo[umode], $setinfo[uorder], $setinfo[thold], $setinfo[noscore], $setinfo[ublockon], $setinfo[theme], $setinfo[commentmax]);
                $uname = $_SERVER["REMOTE_ADDR"];
                $db->sql_query("DELETE FROM ".$prefix."_session WHERE uname='$uname' AND guest='1'");
            }
            if ($pm_login != "") {
                Header("Location: modules.php?name=Your_Account&op=userinfo&bypass=1&username =$username");
            } else if ($redirect == "" ) {
                Header("Location: modules.php?name=Your_Account&op=userinfo&bypass=1&username =$username");
            } else if ($mode == "") {
                Header("Location: forums.html?file=$forward");
            } else if ($t !="")  {
                Header("Location: forums.html?file=$forward&mode=$mode&t=$t");
            } else {
                Header("Location: forums.html?file=$forward&mode=$mode&f=$f");
            }
        } elseif ($db->sql_numrows($result) == 1 AND ($setinfo['user_level'] < 1 OR $setinfo['user_active'] < 1)) {
            include("header.php");
            title(_USERREGLOGIN);
            OpenTable();
            if ($setinfo['user_level'] == 0) {
                echo "<center><font class=\"title\"><b>"._ACCSUSPENDED."</b></font></center>\n";
            } elseif ($setinfo['user_level'] == -1) {
                echo "<center><font class=\"title\"><b>"._ACCDELETED."</b></font></center>\n";
            } else {
                echo "<center><font class=\"title\"><b>"._SORRYNOUSERINFO."</b></font></center>\n";
            }
            CloseTable();
            include("footer.php");
        } else {
            Header("Location: modules.php?name=$module_name&stop=1");
        }
    break;

    case "logout":
        cookiedecode($user);
        $r_uid = $cookie[0];
        $r_username = $cookie[1];
        setcookie("user");
      if (trim($ya_config[cookiepath]) != '') setcookie("user","","","$ya_config[cookiepath]"); //correct the problem of path change
      $db->sql_query("DELETE FROM ".$prefix."_session WHERE uname='$r_username'");
        $db->sql_query("OPTIMIZE TABLE ".$prefix."_session");
        //$db->sql_query("DELETE FROM ".$prefix."_bbsessions WHERE session_user_id='$r_uid'");
        //$db->sql_query("OPTIMIZE TABLE ".$prefix."_bbsessions");
        $user = "";
        include("header.php");
        if ($redirect != "") {
            echo "<META HTTP-EQUIV=\"refresh\" content=\"2;URL=modules.php?name=$redirect\">";
        } else {
            echo "<META HTTP-EQUIV=\"refresh\" content=\"2;URL=index.html\">";
        }
        title(_YOUARELOGGEDOUT);
        include("footer.php");
    break;

    case "mailpasswd":
        include("modules/$module_name/public/mailpass.php");
    break;

    case "my_headlines":
        include("modules/$module_name/public/headlines.php");
    break;

    case "new_user":
        if (is_user($user)) {
            mmain($user);
        } else {
            if ($ya_config['allowuserreg']==0) {
                if ($ya_config['requireadmin'] == 1) {
                    include("modules/$module_name/public/new_user1.php");
                } elseif ($ya_config['requireadmin'] == 0 AND $ya_config['useactivate'] == 0) {
                    include("modules/$module_name/public/new_user2.php");
                } elseif ($ya_config['requireadmin'] == 0 AND $ya_config['useactivate'] == 1) {
                    include("modules/$module_name/public/new_user3.php");
                }
            } else {
                disabled();
            }
        }
    break;

    case "new_confirm":
        if (is_user($user)) {
            mmain($user);
        } else {
            if ($ya_config['allowuserreg']==0) {
                if ($ya_config['requireadmin'] == 1) {
                    include("modules/$module_name/public/new_confirm1.php");
                } elseif ($ya_config['requireadmin'] == 0 AND $ya_config['useactivate'] == 0) {
                    include("modules/$module_name/public/new_confirm2.php");
                } elseif ($ya_config['requireadmin'] == 0 AND $ya_config['useactivate'] == 1) {
                    include("modules/$module_name/public/new_confirm3.php");
                }
            } else {
                disabled();
            }
        }
    break;

    case "new_finish":
        if (is_user($user)) {
            mmain($user);
        } else {
            if ($ya_config['allowuserreg']==0) {
                if ($ya_config['requireadmin'] == 1) {
                    include("modules/$module_name/public/new_finish1.php");
                } elseif ($ya_config['requireadmin'] == 0 AND $ya_config['useactivate'] == 0) {
                    include("modules/$module_name/public/new_finish2.php");
                } elseif ($ya_config['requireadmin'] == 0 AND $ya_config['useactivate'] == 1) {
                    include("modules/$module_name/public/new_finish3.php");
                }
            } else {
                disabled();
            }
        }
    break;

    case "pass_lost":
        include("modules/$module_name/public/passlost.php");
    break;

    case "saveactivate":
        include("modules/$module_name/public/saveactivate.php");
    break;

    case "savecomm":
        if (is_user($user)) {
            include("modules/$module_name/public/savecomm.php");
        } else {
            notuser();
        }
    break;

    case "savehome":
        if (is_user($user)) {
            include("modules/$module_name/public/savehome.php");
        } else {
            notuser();
        }
    break;

    case "savetheme":
        if (is_user($user)) {
            if ($ya_config['allowusertheme']==0) {
                include("modules/$module_name/public/savetheme.php");
            } else {
                disabled();
            }
        } else {
            notuser();
        }
    break;

    case "saveuser":
        if (is_user($user)) {
            include("modules/$module_name/public/saveuser.php");
        } else {
            notuser();
        }
    break;

    case "userinfo":
        include("modules/$module_name/public/userinfo.php");
    break;

    default:
        mmain($user);
    break;

}

?>


Admin Note:I moved this and modified the titlte since it has nothing to do with NukeSentinel.
 
View user's profile Send private message
pure
PostPosted: Tue Sep 14, 2004 5:40 pm Reply with quote

So there is no fix?
 
Nukeum66
Life Cycles Becoming CPU Cycles


Joined: Jul 30, 2003
Posts: 551
Location: Neurotic, State, USA

PostPosted: Tue Sep 14, 2004 8:01 pm Reply with quote

Have you re-activated or put your original Your_Account module back? If you place an original copy of the Your_Account module back I think you'll have your FIX! Wink Or are you trying to reinstall CNB YA?

_________________
Scott Johnson MIS Ubuntu/Linux 11.10 
View user's profile Send private message Visit poster's website
escudero
New Member
New Member


Joined: Oct 25, 2004
Posts: 9

PostPosted: Wed Oct 27, 2004 8:40 pm Reply with quote

pure wrote:
Hi,

A friend of mine installed this but he messed it up and it didn't work. So I had to uninstall all of it. I just followed the readme file and uninstall all the stuff that it asks you to install. Everything seems to be working fine except if a user try to login they get a blank page and in the address bar the address shows Only registered users can see links on this board! Get registered or login!

Before the installation of this nsn I had my default page setup to Forums so when users login they would be redirected to the Forums. But now if any user try to login it just comes up with a blank page with no error or anything and the address bar shows the above link.

Please con someone help out? I would really appriciate it.

Here's my index.html file from modules/Your_Account

Admin Note:I moved this and modified the titlte since it has nothing to do with NukeSentinel.


Hello pure,

did you solve this error? Is it happening yet?

André
 
View user's profile Send private message Send e-mail
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

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 ©