Location: PHPKode > projects > Myphpim > MyPhPim-01.05/start.php3
<?php

//****************************************************************************************
//                Copyright (C) 2000 Koen de Boeve
//
//        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.
//
//        Version : MyPhPim-01.05
//        Author : Koen de Boeve
//        Contact: hide@address.com
//**************************************************************************************** 

include "conf/global_conf.inc";
$sql = new DB;
$query = "SELECT user FROM users WHERE user=\"$userid\" AND passwd=PASSWORD(\"$password\")";
$result = $sql->query ( $query );
$err = $sql->error ( );
if ( $err == 0 ) {
	$numrows = $sql->numrows ( $result );
	if ( $numrows != 0) {
		$usercheck = $sql->result ( $result, 0, "user" );
		if ( $userid == $usercheck ) {
			session_start ();
			session_register ( 'user' );
			$user = $userid;
			session_register ( 'login' );
			session_register ( 'choosehost' );
			$login = 1;
			$choosehost = 0;
			$userdata = $sql->Fetch_login ( $userid, 0 );	
		
			if ( $userdata == 0 ) {
				session_register ( 'nomail' );
				$nomail = 1;
				echo "<html>\n";
				echo "<head>\n";
				echo "<title>frame</title>\n";
				echo "</head>\n";
				echo "<frameset cols=100% frameborder=0 border=0 framespacing=0>\n";
				echo "<frameset rows=85,3%,3%,73% frameborder=0 border=0 framespacing=0>\n";
				echo "<frame src=main.php3?menu=top name=topframe noresize scrolling=no marginwidth=0 marginheight=0>\n";
				echo "<frame src=main.php3?menu=navigate&nomail=1 name=navframe noresize scrolling=no marginwidth=0 marginheight=0>\n";
				echo "<frame src=main.php3?menu=noaccount&error=0 name=dependframe noresize scrolling=no marginwidth=0 marginheight=0>\n";
				echo "<frame src=main.php3?menu=noaccount&error=1 name=bodyframe noresize scrolling=auto marginwidth=0 marginheight=0>\n";
				echo "</frameset>\n";
			} else {
				session_register ( 'nomail' );
				$nomail = 0;
				echo "<html>\n";
				echo "<head>\n";
				echo "<title>frame</title>\n";
				echo "</head>\n";
				echo "<frameset cols=100% frameborder=0 border=0 framespacing=0>\n";
				echo "<frameset rows=85,3%,3%,73% frameborder=0 border=0 framespacing=0>\n";
				echo "<frame src=main.php3?menu=top name=topframe noresize scrolling=no marginwidth=0 marginheight=0>\n";
				echo "<frame src=main.php3?menu=navigate name=navframe noresize scrolling=no marginwidth=0 marginheight=0>\n";
				echo "<frame src=main.php3?menu=mail&msgdetail=0 name=dependframe noresize scrolling=no marginwidth=0 marginheight=0>\n";
				echo "<frame src=main.php3?menu=list&folder=INBOX name=bodyframe noresize scrolling=auto marginwidth=0 marginheight=0>\n";
				echo "</frameset>\n";
			}	
		} else {
			Header ( "Location: http://$HTTP_SERVER_VARS[HTTP_HOST]/$basepath/" );
		} 
	} else {
		Header ( "Location: http://$HTTP_SERVER_VARS[HTTP_HOST]/$basepath/" );
	}
} else {
	echo "$err";
}
?>
Return current item: Myphpim