Update of /cvsroot/phpmp/phpMP
In directory usw-pr-cvs1:/tmp/cvs-serv19943
Modified Files:
index.php modules.php profile.php
Log Message:
Auth a little better. Added verification. I keep updating that whole language thing, too.
Index: index.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/index.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** index.php 29 Jul 2002 12:22:12 -0000 1.19
--- index.php 12 Aug 2002 01:08:29 -0000 1.20
***************
*** 32,36 ****
// Include The Main Configuration File
! include("config.php");
if(!defined("PHPMP_INSTALLED")) {
--- 32,36 ----
// Include The Main Configuration File
! include("./config.php");
if(!defined("PHPMP_INSTALLED")) {
***************
*** 38,42 ****
}
! // Include The Main Core File
include($MPCONF['GEN']['abs_path'] . "/includes/core.php");
--- 38,43 ----
}
! define('IN_PHPMP', true);
!
include($MPCONF['GEN']['abs_path'] . "/includes/core.php");
Index: modules.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/modules.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** modules.php 29 Jul 2002 12:49:28 -0000 1.10
--- modules.php 12 Aug 2002 01:08:29 -0000 1.11
***************
*** 31,40 ****
******************************************************************************/
! // Include The Main Configuration File
! include("config.php");
! if(!defined("PHPMP_INSTALLED")) {
! header('Location: ./install.php');
! }
include($MPCONF['GEN']['abs_path'] . "/includes/core.php");
--- 31,37 ----
******************************************************************************/
! include("./config.php");
! define('IN_PHPMP', true);
include($MPCONF['GEN']['abs_path'] . "/includes/core.php");
Index: profile.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/profile.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** profile.php 10 Aug 2002 21:39:50 -0000 1.2
--- profile.php 12 Aug 2002 01:08:29 -0000 1.3
***************
*** 31,40 ****
******************************************************************************/
! // Include The Main Configuration File
! include("config.php");
! if(!defined("PHPMP_INSTALLED")) {
! header('Location: ./install.php');
! }
// Include The Main Core File
--- 31,37 ----
******************************************************************************/
! include("./config.php");
! define('IN_PHPMP', true);
// Include The Main Core File
***************
*** 60,68 ****
if(($DBA->num_rows($qry) == 0) && ($_POST['r_password'] == $_POST['r_password_conf'])) {
! $sql = "INSERT INTO " . $MPCONF['DB']['table_prefix'] . "users (username, password, realname, email, location) VALUES('" . $_POST['r_username'] . "', MD5('" . $_POST['r_password'] . "'), '" . $_POST['r_realname'] . "', '" . $_POST['r_email'] . "', '" . $_POST['r_location'] . "')";
$DBA->query($sql);
! $Template->display_template('register_fin.tpl');
} else {
--- 57,76 ----
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( "general_subject", $Language->lang['l_register'] );
! $Template->assign( "general_message", $Language->lang['l_register_fin'] );
!
! $Template->display_template('general.tpl');
} else {
***************
*** 84,87 ****
--- 92,110 ----
}
+ } 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( "general_subject", $Language->lang['l_register'] );
+ $Template->assign( "general_message", $Language->lang['l_activated'] );
+
+ $Template->display_template('general.tpl');
+
+ }
+
}
|