Ejemplo n.º 1
0
// 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: Francisco Burzi
// Purpose of file:
// ----------------------------------------------------------------------
// include base api
include 'includes/pnAPI.php';
// start PN
pnInit();
// Get module
$module = pnVarCleanFromInput('module');
if (empty($module)) {
    // call for admin.php without module parameter
    pnRedirect(pnModURL('Admin', 'admin', 'adminpanel'));
    exit;
} else {
    if (!pnModAvailable($module) || !pnSecAuthAction(0, "{$module}::", '::', ACCESS_EDIT)) {
        // call for an unavailable module - either not available or not authorized
        header('HTTP/1.0 403 Access Denied');
        include 'header.php';
        echo 'Module <strong>' . pnVarPrepForDisplay($module) . '</strong> not available';
        include 'footer.php';
        exit;
    }
function start_postnuke($name, $pwd)
{
    include_once 'includes/pnAPI.php';
    pnInit();
    // login
    return pnUserLogIn($name, $pwd, false);
}