Gcards1.44 > Gcards / Admin / Loginfunction.php

Questions? Need Help? Want to share? » PHP Forum
Script Name:
Gcards1.44

Download:
gcards1.44.zip

Category:
Postcards

Archive Content:

Gcards1.44 > Gcards > Admin

Gcards1.44 > Gcards

Gcards1.44 > Gcards > Css

Gcards1.44 > Gcards

Gcards1.44 > Gcards > Images > ImageTemplates > Dropshadow

Gcards1.44 > Gcards > Images > ImageTemplates > Smiley

Gcards1.44 > Gcards > Images > ImageTemplates > Stamp

Gcards1.44 > Gcards > Images > SiteImages > Dropshadow

Gcards1.44 > Gcards > Images > SiteImages > Flags

Gcards1.44 > Gcards > Images > SiteImages

Gcards1.44 > Gcards > Images > SiteImages > Smilies

Gcards1.44 > Gcards > Images > SiteImages > Stamps

Gcards1.44 > Gcards > Images > SiteImages

Gcards1.44 > Gcards > Inc > Adodb

Gcards1.44 > Gcards > Inc > Adodb > Drivers

Gcards1.44 > Gcards > Inc > Adodb

Gcards1.44 > Gcards > Inc

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Css > Behaviors

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Css

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Dialog > Common

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Dialog > Common > Images

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Dialog > Fck About

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Dialog

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Dialog > Fck Docprops

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Dialog

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Dialog > Fck Image

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Dialog

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Dialog > Fck Link

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Dialog

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Dialog > Fck Select

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Dialog

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Dialog > Fck Spellerpages > Spellerpages

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Dialog > Fck Spellerpages > Spellerpages > Server Scripts

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Dialog > Fck Spellerpages > Spellerpages

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Dialog

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Dialog > Fck Universalkey

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Dialog

Gcards1.44 > Gcards > Inc > FCKeditor > Editor

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Images

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Js

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Lang

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Skins > Default

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Skins > Default > Images

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Skins > Default > Toolbar

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Source > Classes

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Source > Commandclasses

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Source > Globals

Gcards1.44 > Gcards > Inc > FCKeditor > Editor > Source > Internals

Gcards1.44 > Gcards > Inc > FCKeditor

Gcards1.44 > Gcards > Inc

Gcards1.44 > Gcards > Inc > ImageResizer

Gcards1.44 > Gcards > Inc > Lang

Gcards1.44 > Gcards > Inc

Gcards1.44 > Gcards > Inc > Phpmailer

Gcards1.44 > Gcards > Inc > Phpmailer > Language

Gcards1.44 > Gcards > Inc > Phpmailer

Gcards1.44 > Gcards > Inc

Gcards1.44 > Gcards

Loginfunction.php:


<?
/*
 * gCards - a web-based eCard application
 * Copyright (C) 2003 Greg Neustaetter
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License 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.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not,  write to the Free Software
 * Foundation,  Inc.,  59 Temple Place - Suite 330,  Boston,  MA  02111-1307,  USA.
 */
function loginuser()
{
    global 
$nav11;
    global 
$auth01;
    global 
$auth02;
    global 
$nav05;
    global 
$nav03;
    global 
$nav09;
    
$username $_POST['username'];
    
$userpass $_POST['userpass'];
    if (
$username && $userpass)
    {
        include(
'../inc/adodb/adodb.inc.php');       # load code common to ADOdb
        
include('../config.php');
        
$ADODB_FETCH_MODE ADODB_FETCH_ASSOC;
        
$conn = &ADONewConnection('mysql');    # create a connection
        
$conn->Connect($dbhost, $dbuser, $dbpass, $dbdatabase);
        
$sqlstmt "SELECT role FROM ".$tablePrefix."cardusers WHERE username='$username' AND userpass=password('$userpass')";
        
$recordSet = &$conn->Execute("$sqlstmt" );
        
$numResults $recordSet->RecordCount();
        
$userRole $recordSet->fields['role'];
        if (
$numResults 0)
            {
                
$_SESSION['auth_user'] = $username;
                
$_SESSION['auth_role'] = $userRole;
            }
        else
            {
                
$page = new pagebuilder('../');
                
$page->showHeader($nav05);
                echo 
"<span class='error'>$auth01: $username. $nav11</span>";
                
$page->showFooter();
                exit;
            }
    }
    else 
    {
        
$page = new pagebuilder('../');
        
$page->showHeader($nav05);
        echo 
"<span class='error'>$auth02 $nav11</span>";
        
$page->showFooter();
        exit;
    }
}

function 
checkUser($check='')
{
    global 
$nav11;
    global 
$auth03;
    global 
$auth04;
    global 
$nav05;
    global 
$nav03;
    global 
$nav09;
    if (!isset(
$_SESSION['auth_user']))
    {
        
$page = new pagebuilder('../');
        
$page->showHeader($nav05);
        echo 
"<span class='error'>$auth03<br>";
        echo 
"$nav11</span><br>";
        
$page->showFooter();
        exit;
    }
    if (
$check)
    {
        if (
$_SESSION['auth_role'] != $check)
        {
            
$page = new pagebuilder('../');
            
$page->showHeader($nav05);
            echo 
"<span class='error'>$auth04<br></span>";
            
$page->showFooter();
            exit;    
        }
    }
}
?>



Other Postcards Scripts:

  • Gcards1.44
WebMaster Resources Home

©RingsWorld.com