Thread: [phpMP-CVS] CVS: phpMP error.php,1.1,1.2 index.php,1.21,1.22 modules.php,1.12,1.13 profile.php,1.5,1
Status: Pre-Alpha
Brought to you by:
heimidal
From: Brian R. <hei...@us...> - 2002-11-05 22:11:39
|
Update of /cvsroot/phpmp/phpMP In directory usw-pr-cvs1:/tmp/cvs-serv19025 Modified Files: error.php index.php modules.php profile.php Log Message: Complete rewrite has begun! Index: error.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/error.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** error.php 5 Apr 2002 07:37:05 -0000 1.1 --- error.php 5 Nov 2002 22:11:05 -0000 1.2 *************** *** 1,5 **** <? ! print "We apologize, but there was an $ecode error."; ?> --- 1,5 ---- <? ! // Error handling. ?> Index: index.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/index.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** index.php 14 Aug 2002 06:24:23 -0000 1.21 --- index.php 5 Nov 2002 22:11:05 -0000 1.22 *************** *** 1,54 **** <? ! /****************************************************************************** ! ******************************************************************************* ! ! phpMP - The World's Greatest Modular Portal ! *********************************************** ! Are you MPowered? ! ! Copyright (C) 2002 phpMP Development Group ! All rights reserved. ! ! Lead Programmer: Brian Rose ! Lead Designer: Trevor Joynson ! ! Filename: /index.php ! Usage & Function: The file that makes it all happen! ! Create Date: March 31, 2002 ! ! $Id$ ! ! ******************************************************************************* ! ******************************************************************************* ! ! This software is provided under the GPL software license. A copy of the ! license should have been included with this software, located in the Docs ! folder. Feel free to redistribute and/or modify it according to the ! regulations stated in the license. ! ! ******************************************************************************* ! ******************************************************************************/ ! ! // Include The Main Configuration File ! include("./config.php"); ! ! if(!defined("PHPMP_INSTALLED")) { ! header('Location: ./install.php'); ! } ! ! define('IN_PHPMP', true); ! ! include($MPCONF['GEN']['abs_path'] . "/includes/core.php"); ! ! global $PHPMP; ! ! // Start phpMP ! $PHPMP = new PHPMP(); ! ! $PHPMP->Init(); ! ! $Template->assign( 'page_title', $Language->lang['l_home'] ); ! $Template->display_template('index.tpl'); ?> --- 1,5 ---- <? ! // Index file. ?> Index: modules.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** modules.php 14 Aug 2002 06:24:23 -0000 1.12 --- modules.php 5 Nov 2002 22:11:05 -0000 1.13 *************** *** 1,108 **** <? ! /****************************************************************************** ! ******************************************************************************* ! ! phpMP - The World's Greatest Modular Portal ! *********************************************** ! Are you MPowered? ! ! Copyright (C) 2002 phpMP Development Group ! All rights reserved. ! ! Lead Programmer: Brian Rose ! Lead Designer: Trevor Joynsond ! ! Filename: /modules.php ! Usage & Function: Puts together all module content. ! Create Date: April 9, 2002 ! ! $Id$ ! ! ******************************************************************************* ! ******************************************************************************* ! ! This software is provided under the GPL software license. A copy of the ! license should have been included with this software, located in the Docs ! folder. Feel free to redistribute and/or modify it according to the ! regulations stated in the license. ! ! ******************************************************************************* ! ******************************************************************************/ ! ! include("./config.php"); ! ! define('IN_PHPMP', true); ! ! include($MPCONF['GEN']['abs_path'] . "/includes/core.php"); ! ! global $PHPMP; ! ! $PHPMP = new PHPMP(); ! ! $PHPMP->Init(); ! ! class ModClass { ! ! var $modulename; ! var $_inactive; ! var $_exists; ! ! function Init() { ! global $MPCONF, $DBA, $HTTP_GET_VARS; ! ! $this->modulename = $HTTP_GET_VARS['module']; ! $this->_inactive = 0; ! $this->_exists = 1; ! ! $query = $DBA->query("SELECT * FROM " . $MPCONF['DB']['table_prefix'] . "modules WHERE unixname='" . $this->modulename . "'"); ! $num_rows = $DBA->num_rows($query); ! if($num_rows > 0) { ! $MPCONF['MOD'] = $DBA->fetch_array($query); ! } else { ! $this->_exists = 0; ! } ! if($MPCONF['MOD']['active'] != 1) { ! $this->_inactive = 1; ! } ! } ! ! function DoCheck() { ! if(($this->_inactive == 1) || ($this->_exists != 1) || defined('PHPMP_MOD_' . $MPCONF['MOD']['mod_id'])) { ! return 0; ! } else { ! define('PHPMP_MOD_' . $MPCONF['MOD']['mod_id'], true); ! return 1; ! } ! } ! } ! ! $ModClass = new ModClass(); ! $ModClass->Init(); ! ! $ModCheck = $ModClass->DoCheck(); ! ! $my_page_title = "Module Error"; ! ! $ModFunctions = new ModFunctions(); ! ! if($ModCheck != 0) { ! include($MPCONF['GEN']['abs_path'] . '/modules/' . $MPCONF['MOD']['filename']); ! ! $Module->Init(); ! ! } ! ! if($ModCheck != 0) { ! $Module->MakeContent(); ! } else { ! $Template->Blocking('BeginBig', array(PAGETITLE => 'Module Error' )); ! print "An error occured while trying to process the module. It is either inactive or does not exist."; ! $Template->Blocking('EndBig'); ! } ! ! $Template->assign( 'page_title', $Module->module_title ); ! $Template->assign( 'module_content', $Module->module_content ); ! $Template->display_template('modules.tpl'); ?> --- 1,5 ---- <? ! // Module handler. ?> Index: profile.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/profile.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** profile.php 14 Aug 2002 06:28:14 -0000 1.5 --- profile.php 5 Nov 2002 22:11:05 -0000 1.6 *************** *** 1,112 **** <? ! /****************************************************************************** ! ******************************************************************************* ! ! phpMP - The World's Greatest Modular Portal ! *********************************************** ! Are you MPowered? ! ! Copyright (C) 2002 phpMP Development Group ! All rights reserved. ! ! Lead Programmer: Brian Rose ! Lead Designer: Trevor Joynson ! ! Filename: /profile.php ! Usage & Function: Profile/registration functions. ! Create Date: March 31, 2002 ! ! $Id$ ! ! ******************************************************************************* ! ******************************************************************************* ! ! This software is provided under the GPL software license. A copy of the ! license should have been included with this software, located in the Docs ! folder. Feel free to redistribute and/or modify it according to the ! regulations stated in the license. ! ! ******************************************************************************* ! ******************************************************************************/ ! ! include("./config.php"); ! ! define('IN_PHPMP', true); ! ! // Include The Main Core File ! include($MPCONF['GEN']['abs_path'] . "/includes/core.php"); ! ! global $PHPMP; ! ! // Start phpMP ! $PHPMP = new PHPMP(); ! ! $PHPMP->Init(); ! ! if($_GET['mode'] == 'register') { ! ! if($_GET['action'] == 'submit') { ! ! $sql = "SELECT user_id FROM " . $MPCONF['DB']['table_prefix'] . "users WHERE username='" . $_POST['r_username'] . "' OR email='" . $_POST['r_email'] . "'"; ! ! $qry = $DBA->query($sql); ! ! if((!empty($_POST['r_username'])) && (!empty($_POST['r_password'])) && (!empty($_POST['r_password_conf'])) && (!empty($_POST['r_email']))) { ! ! if(($DBA->num_rows($qry) == 0) && ($_POST['r_password'] == $_POST['r_password_conf'])) { ! ! $act_code = $_POST['r_username'] . md5( $_POST['r_email'] ); ! ! $sql = "INSERT INTO " . $MPCONF['DB']['table_prefix'] . "users (username, password, realname, email, location, act_code) VALUES('" . $_POST['r_username'] . "', MD5('" . $_POST['r_password'] . "'), '" . $_POST['r_realname'] . "', '" . $_POST['r_email'] . "', '" . $_POST['r_location'] . "', '" . $act_code . "')"; ! ! $DBA->query($sql); ! ! $url_for_act = $MPCONF['GEN']['address'] . $MPCONF['GEN']['uri'] . 'profile.php?mode=activate&u=' . $_POST['r_username'] . '&c=' . $act_code; ! ! eval( $Language->lang['l_fin_register_message'] ); ! ! mail($_POST['r_email'], $Language->lang['l_fin_register_subject'], $temp_message); ! ! $Template->assign( 'page_title', $Language->lang['l_register'] ); ! $Template->assign( "general_message", $Language->lang['l_register_fin'] ); ! ! $Template->display_template('general.tpl'); ! ! } else { ! ! header("Location: error.php?ecode=registration"); ! ! } ! ! } else { ! ! header("Location: error.php?ecode=registration"); ! ! } ! ! } else { ! ! $Template->assign( 'page_title', $Language->lang['l_register'] ); ! $Template->display_template('register.tpl'); ! ! } ! ! } elseif($_GET['mode'] == 'activate') { ! ! if( ($_GET['u'] != '') && ($_GET['c'] != '') ) { ! ! $sql = "UPDATE " . $MPCONF['DB']['table_prefix'] . "users SET active=1 WHERE username='" . $_GET['u'] . "' AND act_code='" . $_GET['c'] . "'"; ! ! $DBA->query($sql); ! ! $Template->assign( 'page_title', $Language->lang['l_register'] ); ! $Template->assign( "general_message", $Language->lang['l_activated'] ); ! ! $Template->display_template('general.tpl'); ! ! } ! ! } ?> --- 1,6 ---- <? ! // Profile handlers. ! // May be combined with other files, like auth.php or something. ?> |