Location: PHPKode > projects > ProNuke. Postnuke To Oracle > postnuke/html/user.php
<?php // File: $Id: user.php,v 1.104 2001/12/04 01:12:44 gregorrothfuss Exp $ $Name:  $
// ----------------------------------------------------------------------
// POST-NUKE Content Management System
// Copyright (C) 2001 by the Post-Nuke Development Team.
// http://www.postnuke.com/
// ----------------------------------------------------------------------
// Based on:
// PHP-NUKE Web Portal System - http://phpnuke.org/
// Thatware - http://thatware.org/
// ----------------------------------------------------------------------
// LICENSE
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// To read the license please visit http://www.gnu.org/copyleft/gpl.html
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------

include 'mainfile.php';
include 'modules/NS-User/tools.php';
include 'modules/NS-User/password.php';

if (file_exists("language/$currentlang/user.php"))
{
    include "language/$currentlang/user.php";
}
elseif (file_exists("language/eng/user.php"))
{
    include "language/eng/user.php";
}


global $stop, $minage;

if (!is_user($user) && empty($op)) {
    $module='NS-User';
    $op='getlogin';
}


if (isset($op) && ($op == 'userinfo'))
{
    $module='NS-User';
}

// New module way
// userinfo($cookie[1], $uid);
// $module / $op control
if (is_user($user) and (!isset($op) or ($op == 'adminMain')))
{
    $module = 'NS-User';
    $op     = 'main';
}

if (file_exists($file='modules/'.$module.'/user.php'))
{
    user_menu();
    include $file;
    if (substr($module,0,3)=='NS-') {
        $function = substr($module,3).'_user_';
    } else {
        $function = $module.'_user_';
    }
    $function_op = $function.$op;
    $function_main = $function.'main';
    $var = array_merge($GLOBALS['HTTP_GET_VARS'], $GLOBALS['HTTP_POST_VARS']);

    if (function_exists($function_op)) {
        $function_op($var);
    } elseif (function_exists($function_main)) {
        $function_main($var);
    } else {
        die("error : user_execute($file,$function_op)");
    }

}

$moddir = opendir('modules/');
while ($modulename = readdir($moddir))
{
    if (@is_dir("modules/$modulename/user/case/"))
    {
        $casedir = opendir("modules/$modulename/user/case/");
        while ($func = readdir($casedir))
        {
            if (eregi('^case.', $func))
            {
                $caselist[$func]['path'] = "modules/$modulename/user/case";
                $caselist[$func]['module'] = $modulename;
            }
        }
        closedir($casedir);
    }
}
closedir($moddir);
ksort($caselist);
foreach ($caselist as $k=>$v)
{
    $ModName = $v['module'];
    include "$v[path]/$k";
}
$caselist = array();
?>
Return current item: ProNuke. Postnuke To Oracle