1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-23 16:52:54 +02:00

This commit was manufactured by cvs2svn to create tag

'release_2_0_2'.

git-svn-id: file:///svn/phpbb/tags/release_2_0_2@2845 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
(no author)
2002-08-08 18:06:53 +00:00
parent 212515e02c
commit 435058a7be
561 changed files with 24331 additions and 19533 deletions

View File

@@ -417,22 +417,6 @@ function make_user($username)
message_die(GENERAL_ERROR, "Couldn't obtained next user_id information.", "", __LINE__, __FILE__, $sql);
}
$sql = "SELECT MAX(group_id) AS total
FROM " . GROUPS_TABLE;
if($result = $db->sql_query($sql))
{
$row = $db->sql_fetchrow($result);
$new_group_id = $row['total'] + 1;
unset($result);
unset($row);
}
else
{
message_die(GENERAL_ERROR, "Couldn't obtained next user_id information.", "", __LINE__, __FILE__, $sql);
}
$sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
VALUES ($new_user_id, '$username', " . time() . ", '$password', '$email', '$icq', '$website', '$occupation', '$location', '$interests', '$signature', '$signature_bbcode_uid', '$avatar_filename', $viewemail, '$aim', '$yim', '$msn', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $user_timezone, '$user_dateformat', '$user_lang', $user_style, 0, 1, ";
@@ -441,12 +425,14 @@ function make_user($username)
if($result = $db->sql_query($sql, BEGIN_TRANSACTION))
{
$sql = "INSERT INTO " . GROUPS_TABLE . " (group_id, group_name, group_description, group_single_user, group_moderator)
VALUES ($new_group_id, '', 'Personal User', 1, 0)";
$sql = "INSERT INTO " . GROUPS_TABLE . " (group_name, group_description, group_single_user, group_moderator)
VALUES ('', 'Personal User', 1, 0)";
if($result = $db->sql_query($sql))
{
$group_id = $db->sql_nextid();
$sql = "INSERT INTO " . USER_GROUP_TABLE . " (user_id, group_id, user_pending)
VALUES ($new_user_id, $new_group_id, 0)";
VALUES ($new_user_id, $group_id, 0)";
if($result = $db->sql_query($sql, END_TRANSACTION))
{

View File

@@ -0,0 +1,73 @@
<?php
/***************************************************************************
* revar_lang_files.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
//
// Security message:
//
// This script is potentially dangerous.
// Remove or comment the next line (die(".... ) to enable this script.
// Do NOT FORGET to either remove this script or disable it after you have used it.
//
die("Please read the first lines of this script for instructions on how to enable it");
$dirname = "./../language";
$dir = opendir($dirname);
while ( $file = readdir($dir) )
{
if ( ereg('^lang_', $file) && !is_file($dirname . '/' . $file) && !is_link($dirname . '/' . $file) )
{
include($dirname . '/' . $file . '/lang_main.php');
$lang_dir = opendir($dirname . '/' . $file . '/email');
while ( $email = readdir($lang_dir) )
{
if ( ereg('\.tpl$', $email) && is_file($dirname . '/' . $file . '/email/' . $email) )
{
$fp = fopen($dirname . '/' . $file . '/email/' . $email, 'r+');
$email_file = "";
while ( $line = fread($fp, 100000) )
{
$email_file .= $line;
}
if ( !preg_match('/^Charset: .*?$/m', $email_file) )
{
$email_file = preg_replace('/^((Subject: .*?\n)(\n))?/i', "\\2Charset: " . $lang['ENCODING'] . "\n\n", $email_file);
}
echo '<b>' . $dirname . '/' . $file . '/email/' . $email . "</b><br />\n";
echo nl2br($email_file);
echo "\n\n<br /><br />\n\n";
fseek($fp, 0);
fwrite($fp, $email_file);
fclose($fp);
}
}
echo "\n\n<hr />\n\n";
}
}
?>