mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Various updates and fixes ... no doubt there are new bugs but where would the fun be without them?
git-svn-id: file:///svn/phpbb/trunk@4090 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
8a09c0d75f
commit
d1dd262f83
12 changed files with 222 additions and 181 deletions
|
@ -181,6 +181,10 @@ switch ($mode)
|
|||
<td class="row1"><?php echo $user->lang['MAX_FILESIZE']; ?>: <br /><span class="gensmall"><?php echo $user->lang['MAX_FILESIZE_EXPLAIN']; ?></span></td>
|
||||
<td class="row2"><input class="post" type="text" size="4" maxlength="10" name="avatar_filesize" value="<?php echo $new['avatar_filesize']; ?>" /> Bytes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><?php echo $user->lang['MIN_AVATAR_SIZE']; ?>: <br /><span class="gensmall"><?php echo $user->lang['MIN_AVATAR_SIZE_EXPLAIN']; ?></span></td>
|
||||
<td class="row2"><input class="post" type="text" size="3" maxlength="4" name="avatar_min_height" value="<?php echo $new['avatar_min_height']; ?>" /> x <input class="post" type="text" size="3" maxlength="4" name="avatar_min_width" value="<?php echo $new['avatar_min_width']; ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><?php echo $user->lang['MAX_AVATAR_SIZE']; ?>: <br /><span class="gensmall"><?php echo $user->lang['MAX_AVATAR_SIZE_EXPLAIN']; ?></span></td>
|
||||
<td class="row2"><input class="post" type="text" size="3" maxlength="4" name="avatar_max_height" value="<?php echo $new['avatar_max_height']; ?>" /> x <input class="post" type="text" size="3" maxlength="4" name="avatar_max_width" value="<?php echo $new['avatar_max_width']; ?>"></td>
|
||||
|
@ -308,6 +312,10 @@ switch ($mode)
|
|||
<td class="row1"><?php echo $user->lang['PASSWORD_LENGTH']; ?>: <br /><span class="gensmall"><?php echo $user->lang['PASSWORD_LENGTH_EXPLAIN']; ?></span></td>
|
||||
<td class="row2"><input class="post" type="text" size="3" maxlength="3" name="min_pass_chars" value="<?php echo $new['min_pass_chars']; ?>" /> <?php echo $user->lang['MIN_CHARS']; ?> <input class="post" type="text" size="3" maxlength="3" name="max_pass_chars" value="<?php echo $new['max_pass_chars']; ?>" /> <?php echo $user->lang['MAX_CHARS']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><?php echo $user->lang['MIN_RATINGS']; ?>: <br /><span class="gensmall"><?php echo $user->lang['MIN_RATINGS_EXPLAIN']; ?></span</td>
|
||||
<td class="row2"><input class="post" type="text" size="3" maxlength="5" name="min_ratings" value="<?php echo $new['min_ratings']; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><?php echo $user->lang['ALLOW_EMAIL_REUSE']; ?>: <br /><span class="gensmall"><?php echo $user->lang['ALLOW_EMAIL_REUSE_EXPLAIN']; ?></span></td>
|
||||
<td class="row2"><input type="radio" name="allow_emailreuse" value="1" <?php echo $emailreuse_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="allow_emailreuse" value="0" <?php echo $emailreuse_no; ?> /> <?php echo $user->lang['NO']; ?></td>
|
||||
|
|
|
@ -39,60 +39,66 @@ if (!$auth->acl_get('a_email'))
|
|||
}
|
||||
|
||||
// Set some vars
|
||||
$message = '';
|
||||
$subject = '';
|
||||
$message = $subject = $group_id = '';
|
||||
|
||||
// Do the job ...
|
||||
if (isset($_POST['submit']))
|
||||
{
|
||||
// Increase maximum execution time in case of a lot of users, but don't complain about it if it isn't
|
||||
// allowed.
|
||||
// Increase maximum execution time in case of a lot of users, but don't complain
|
||||
// about it if it isn't allowed.
|
||||
@set_time_limit(1200);
|
||||
|
||||
$group_id = intval($_POST['g']);
|
||||
// Error checking needs to go here ... if no subject and/or no message then skip
|
||||
// over the send and return to the form
|
||||
$group_id = (isset($_POST['g'])) ? intval($_POST['g']) : 0;
|
||||
$subject = (!empty($_POST['subject'])) ? stripslashes(trim($_POST['subject'])) : '';
|
||||
$message = (!empty($_POST['message'])) ? stripslashes(trim($_POST['message'])) : '';
|
||||
|
||||
if ($group_id > 0)
|
||||
$error = array();
|
||||
if ($subject == '')
|
||||
{
|
||||
$sql = 'SELECT u.user_email, u.username, u.user_lang
|
||||
FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug
|
||||
WHERE ug.group_id = $group_id
|
||||
AND g.user_pending <> " . TRUE . "
|
||||
AND u.user_id = ug.user_id";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT user_email FROM ' . USERS_TABLE;
|
||||
}
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$subject = stripslashes(trim($_POST['subject']));
|
||||
$message = stripslashes(trim($_POST['message']));
|
||||
|
||||
if (!($row = $db->sql_fetchrow($result)))
|
||||
{
|
||||
// Output a relevant GENERAL_MESSAGE about users/group
|
||||
// not existing
|
||||
trigger_error($user->lang['GROUP_DOES_NOT_EXIST']);
|
||||
$error[] = $user->lang['NO_EMAIL_SUBJECT'];
|
||||
}
|
||||
|
||||
|
||||
// Error checking needs to go here ... if no subject and/or
|
||||
// no message then skip over the send and return to the form
|
||||
|
||||
|
||||
if ($subject != '' && $message != '')
|
||||
if ($message == '')
|
||||
{
|
||||
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
|
||||
$error[] = $user->lang['NO_EMAIL_MESSAGE'];
|
||||
}
|
||||
|
||||
// Let's do some checking to make sure that mass mail functions
|
||||
// are working in win32 versions of php.
|
||||
if (preg_match('/[c-z]:\\\.*/i', getenv('PATH')) && !$config['smtp_delivery'])
|
||||
if (!sizeof($error))
|
||||
{
|
||||
$sql = ($group_id) ? 'SELECT u.user_email, u.username, u.user_lang FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug WHERE ug.group_id = $group_id AND ug.user_pending <> 1 AND u.user_id = ug.user_id AND u.user_allow_massemail = 1" : 'SELECT user_email FROM ' . USERS_TABLE . ' WHERE user_allow_massemail = 1';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if (!($row = $db->sql_fetchrow($result)))
|
||||
{
|
||||
// We are running on windows, force delivery to use
|
||||
// our smtp functions since php's are broken by default
|
||||
$config['smtp_delivery'] = 1;
|
||||
$config['smtp_host'] = get_cfg_var('SMTP');
|
||||
trigger_error($user->lang['NO_USER']);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$i = 0;
|
||||
$email_list = array();
|
||||
do
|
||||
{
|
||||
$email_list[$row['user_lang']][$i]['email'] = $row['user_email'];
|
||||
$email_list[$row['user_lang']][$i]['name'] = $row['username'];
|
||||
$i++;
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
// Let's do some checking to make sure that mass mail functions are working in win32 versions of php.
|
||||
if (preg_match('#^[c-z]:\\\#i', getenv('PATH')) && !$config['smtp_delivery'] && phpversion() < '4.3')
|
||||
{
|
||||
// We are running on windows, force delivery to use our smtp functions since
|
||||
// php's are broken by default
|
||||
$config['smtp_delivery'] = 1;
|
||||
$config['smtp_host'] = @ini_get('SMTP');
|
||||
}
|
||||
|
||||
|
||||
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
|
||||
$emailer = new emailer(true);
|
||||
|
||||
$extra_headers = 'X-AntiAbuse: Board servername - ' . $config['server_name'] . "\r\n";
|
||||
|
@ -100,62 +106,72 @@ if (isset($_POST['submit']))
|
|||
$extra_headers .= 'X-AntiAbuse: Username - ' . $user->data['username'] . "\r\n";
|
||||
$extra_headers .= 'X-AntiAbuse: User IP - ' . $user->ip . "\r\n";
|
||||
|
||||
$email_list = array();
|
||||
$count = 0;
|
||||
do
|
||||
foreach ($email_list as $lang => $to_ary)
|
||||
{
|
||||
$email_list[$count]['email'] = $row['user_email'];
|
||||
$email_list[$count]['name'] = $row['username'];
|
||||
$email_list[$count]['lang'] = $row['user_lang'];
|
||||
$count++;
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
$db->sql_freeresult($result);
|
||||
foreach ($to_ary as $to)
|
||||
{
|
||||
$emailer->template('admin_send_email', $lang);
|
||||
|
||||
foreach ($email_list as $addr)
|
||||
{
|
||||
$emailer->template('admin_send_email', $addr['lang']);
|
||||
$emailer->subject($subject);
|
||||
$emailer->headers($extra_headers);
|
||||
|
||||
$emailer->subject($subject);
|
||||
$emailer->headers($extra_headers);
|
||||
$emailer->replyto($config['board_email']);
|
||||
$emailer->to($to['email'], $to['name']);
|
||||
|
||||
$emailer->replyto($config['board_email']);
|
||||
$emailer->to($addr['email'], $addr['name']);
|
||||
$emailer->assign_vars(array(
|
||||
'SITENAME' => $config['sitename'],
|
||||
'CONTACT_EMAIL' => $config['board_contact'],
|
||||
'MESSAGE' => $message)
|
||||
);
|
||||
|
||||
|
||||
$emailer->assign_vars(array(
|
||||
'SITENAME' => $config['sitename'],
|
||||
'CONTACT_EMAIL' => $config['board_contact'],
|
||||
'MESSAGE' => $message)
|
||||
);
|
||||
|
||||
$emailer->send();
|
||||
$emailer->reset();
|
||||
$emailer->send();
|
||||
$emailer->reset();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$emailer->queue->save();
|
||||
unset($email_list);
|
||||
|
||||
add_log('admin', 'LOG_MASS_EMAIL');
|
||||
trigger_error($user->lang['EMAIL_SENT'], E_USER_NOTICE);
|
||||
|
||||
if ($group_id)
|
||||
{
|
||||
$sql = 'SELECT group_name
|
||||
FROM ' . GROUPS_TABLE . "
|
||||
WHERE group_id = $group_id";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
extract($row);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not great but the logging routine doesn't cope well with localising
|
||||
// on the fly
|
||||
$group_name = $user->lang['ALL_USERS'];
|
||||
}
|
||||
|
||||
add_log('admin', 'LOG_MASS_EMAIL', $group_name);
|
||||
trigger_error($user->lang['EMAIL_SENT']);
|
||||
}
|
||||
}
|
||||
|
||||
// Initial selection
|
||||
$sql = 'SELECT group_id, group_name
|
||||
FROM ' . GROUPS_TABLE;
|
||||
$sql = 'SELECT group_id, group_type, group_name
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
ORDER BY group_type DESC, group_name ASC';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$select_list = '<select name="g"><option value="-1">' . $user->lang['ALL_USERS'] . '</option>';
|
||||
$select_list = '<option value="0"' . ((!$group_id) ? ' selected="selected"' : '') . '>' . $user->lang['ALL_USERS'] . '</option>';
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
do
|
||||
{
|
||||
$select_list .= '<option value = "' . $row['group_id'] . '">' . $row['group_name'] . '</option>';
|
||||
$selected = ($group_id == $row['group_id']) ? ' selected="selected"' : '';
|
||||
$select_list .= '<option value = "' . $row['group_id'] . '"' . (($row['group_type'] == GROUP_SPECIAL) ? ' class="blue"' : '') . $selected . '>' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
}
|
||||
$select_list .= '</select>';
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
adm_page_header($user->lang['MASS_EMAIL']);
|
||||
|
||||
|
@ -165,22 +181,35 @@ adm_page_header($user->lang['MASS_EMAIL']);
|
|||
|
||||
<p><?php echo $user->lang['MASS_EMAIL_EXPLAIN']; ?></p>
|
||||
|
||||
<form method="post" action="admin_email.<?php echo $phpEx.$SID; ?>">
|
||||
<table class="bg" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<form method="post" action="admin_email.<?php echo $phpEx.$SID; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<tr>
|
||||
<th colspan="2"><?php echo $user->lang['COMPOSE']; ?></th>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
if (sizeof($error))
|
||||
{
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td class="row3" colspan="2" align="center"><span class="error"><?php echo implode('<br />', $error); ?></span></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td class="row1" align="right"><b><?php echo $user->lang['RECIPIENTS']; ?></b></td>
|
||||
<td class="row2" align="left"><?php echo $select_list; ?></td>
|
||||
<td class="row2" align="left"><select name="g"><?php echo $select_list; ?></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right"><b><?php echo $user->lang['SUBJECT']; ?></b></td>
|
||||
<td class="row2"><span class="gen"><input type="text" name="subject" size="45" maxlength="100" tabindex="2" class="post" value="<?php echo $subject; ?>" /></span></td>
|
||||
<td class="row2"><input class="post" type="text" name="subject" size="45" maxlength="100" tabindex="2" value="<?php echo $subject; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="right" valign="top"><span class="gen"><b><?php echo $user->lang['MESSAGE']; ?></b></span>
|
||||
<td class="row2"><textarea class="post" name="message" rows="15" cols="35" wrap="virtual" style="width:450px" tabindex="3"><?php echo $message; ?></textarea></td>
|
||||
<td class="row2"><textarea class="post" name="message" rows="10" cols="76" wrap="virtual" tabindex="3"><?php echo $message; ?></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="cat" colspan="2" align="center"><input type="submit" value="<?php echo $user->lang['EMAIL']; ?>" name="submit" class="mainoption" /></td>
|
||||
|
|
|
@ -515,15 +515,15 @@ switch ($mode)
|
|||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><?php echo $user->lang['FORUM_TOPICS_PAGE'] ?>: <br /><span class="gensmall"><?php echo $user->lang['FORUM_TOPICS_PAGE_EXPLAIN']; ?></span></td>
|
||||
<td class="row2"><input type="text" name="topics_per_page" value="<?php echo $forum_topics_per_page; ?>" size="3" maxlength="3" /></td>
|
||||
<td class="row2"><input class="post" type="text" name="topics_per_page" value="<?php echo $forum_topics_per_page; ?>" size="3" maxlength="3" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><?php echo $user->lang['FORUM_PASSWORD'] ?>: <br /><span class="gensmall"><?php echo $user->lang['FORUM_PASSWORD_EXPLAIN']; ?></span></td>
|
||||
<td class="row2"><input type="password" name="forum_password" value="<?php echo $forum_password; ?>" size="25" maxlength="25" /></td>
|
||||
<td class="row2"><input class="post" type="password" name="forum_password" value="<?php echo $forum_password; ?>" size="25" maxlength="25" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><?php echo $user->lang['FORUM_PASSWORD_CONFIRM'] ?>: <br /><span class="gensmall"><?php echo $user->lang['FORUM_PASSWORD_CONFIRM_EXPLAIN']; ?></span></td>
|
||||
<td class="row2"><input type="password" name="forum_password_confirm" value="<?php echo $forum_password_confirm; ?>" size="25" maxlength="25" /></td>
|
||||
<td class="row2"><input class="post" type="password" name="forum_password_confirm" value="<?php echo $forum_password_confirm; ?>" size="25" maxlength="25" /></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
|
@ -992,25 +992,31 @@ while ($row = $db->sql_fetchrow($result))
|
|||
<tr>
|
||||
<td class="row1" width="5%"><?php echo $folder_image; ?></td>
|
||||
<td class="row1" width="50%"><table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><span class="forumlink"><?php echo $forum_title ?></span></td><?php
|
||||
|
||||
if ($forum_type == FORUM_POST)
|
||||
{
|
||||
|
||||
?>
|
||||
<td class="gensmall" align="right"> <?php echo $user->lang['TOPICS']; ?>: <b><?php echo $row['forum_topics'] ?></b> / <?php echo $user->lang['POSTS']; ?>: <b><?php echo $row['forum_posts'] ?></b></td><?php
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="forumlink"><?php echo $forum_title ?></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing="5" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td class="gensmall"><?php echo $row['forum_desc'] ?></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</table>
|
||||
<?php
|
||||
|
||||
if ($forum_type == FORUM_POST)
|
||||
{
|
||||
|
||||
?>
|
||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td class="gensmall"> <?php echo $user->lang['TOPICS']; ?>: <b><?php echo $row['forum_topics'] ?></b> / <?php echo $user->lang['POSTS']; ?>: <b><?php echo $row['forum_posts'] ?></b></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
?></td>
|
||||
<td class="row2" width="15%" align="center" valign="middle" nowrap="nowrap"><a href="admin_forums.<?php echo $url ?>&mode=move_up"><?php echo $user->lang['MOVE_UP'] ?></a><br /><a href="admin_forums.<?php echo $url ?>&mode=move_down"><?php echo $user->lang['MOVE_DOWN'] ?></a></td>
|
||||
<td class="row2" width="20%" align="center" valign="middle" nowrap="nowrap"> <a href="admin_forums.<?php echo $url ?>&mode=edit"><?php echo $user->lang['EDIT'] ?></a> | <a href="admin_forums.<?php echo $url ?>&mode=delete"><?php echo $user->lang['DELETE'] ?></a><?php
|
||||
|
||||
|
@ -1030,7 +1036,7 @@ while ($row = $db->sql_fetchrow($result))
|
|||
|
||||
?>
|
||||
<tr>
|
||||
<td width="100%" colspan="6" class="cat"><input type="hidden" name="mode" value="add" /><input type="hidden" name="parent_id" value="<? echo $forum_id ?>" /><input type="text" name="forum_name" /> <input class="liteoption" type="submit" value="<?php echo $user->lang['CREATE_FORUM'] ?>" /></td>
|
||||
<td width="100%" colspan="6" class="cat"><input type="hidden" name="mode" value="add" /><input type="hidden" name="parent_id" value="<? echo $forum_id ?>" /><input class="post" type="text" name="forum_name" /> <input class="liteoption" type="submit" value="<?php echo $user->lang['CREATE_FORUM'] ?>" /></td>
|
||||
</tr>
|
||||
</table></form>
|
||||
|
||||
|
|
|
@ -721,37 +721,4 @@ function update_image_dimensions()
|
|||
break;
|
||||
}
|
||||
|
||||
// ---------
|
||||
// FUNCTIONS
|
||||
//
|
||||
function filelist($rootdir, $dir = '', $type = 'gif|jpg|png')
|
||||
{
|
||||
static $images = array();
|
||||
|
||||
$dh = opendir($rootdir . $dir);
|
||||
|
||||
while ($fname = readdir($dh))
|
||||
{
|
||||
if (is_file($rootdir . $dir . '/' . $fname) &&
|
||||
preg_match('#\.' . $type . '$#i', $fname) &&
|
||||
filesize($rootdir . $dir . '/' . $fname))
|
||||
{
|
||||
$images[] = array('path' => $dir, 'file' => $fname);
|
||||
}
|
||||
else if ($fname != '.' && $fname != '..' &&
|
||||
!is_file($rootdir . $dir . '/' . $fname) &&
|
||||
!is_link($rootdir . $dir . '/' . $fname))
|
||||
{
|
||||
filelist($rootdir, $dir . '/'. $fname, $type);
|
||||
}
|
||||
}
|
||||
|
||||
closedir($dh);
|
||||
|
||||
return $images;
|
||||
}
|
||||
//
|
||||
// FUNCTIONS
|
||||
// ---------
|
||||
|
||||
?>
|
|
@ -220,7 +220,7 @@ else
|
|||
<td class="row2"><input type="radio" name="prune_sticky" value="1" /> <?php echo $user->lang['YES']; ?> <input type="radio" name="prune_sticky" value="0" checked="checked" /> <?php echo $user->lang['NO']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="cat" colspan="2" align="center"><?php echo $s_hidden_fields; ?><input type="submit" name="submit" value="<?php echo $user->lang['SUBMIT']; ?>" class="mainoption"></td>
|
||||
<td class="cat" colspan="2" align="center"><input type="submit" name="submit" value="<?php echo $user->lang['SUBMIT']; ?>" class="mainoption"></td>
|
||||
</tr>
|
||||
</table></form>
|
||||
|
||||
|
|
|
@ -277,9 +277,7 @@ function update_image_dimensions()
|
|||
</tr>
|
||||
<?php
|
||||
|
||||
//
|
||||
// Show the default page
|
||||
//
|
||||
$sql = "SELECT * FROM " . RANKS_TABLE . "
|
||||
ORDER BY rank_min ASC, rank_special ASC";
|
||||
$result = $db->sql_query($sql);
|
||||
|
@ -329,37 +327,4 @@ function update_image_dimensions()
|
|||
break;
|
||||
}
|
||||
|
||||
// ---------
|
||||
// FUNCTIONS
|
||||
//
|
||||
function filelist($rootdir, $dir = '', $type = 'gif|jpg|jpeg|png')
|
||||
{
|
||||
static $images = array();
|
||||
|
||||
$dh = opendir($rootdir . $dir);
|
||||
|
||||
while ($fname = readdir($dh))
|
||||
{
|
||||
if (is_file($rootdir . $dir . '/' . $fname) &&
|
||||
preg_match('#\.' . $type . '$#i', $fname) &&
|
||||
filesize($rootdir . $dir . '/' . $fname))
|
||||
{
|
||||
$images[] = array('path' => $dir, 'file' => $fname);
|
||||
}
|
||||
else if ($fname != '.' && $fname != '..' &&
|
||||
!is_file($rootdir . $dir . '/' . $fname) &&
|
||||
!is_link($rootdir . $dir . '/' . $fname))
|
||||
{
|
||||
filelist($rootdir, $dir . '/'. $fname, $type);
|
||||
}
|
||||
}
|
||||
|
||||
closedir($dh);
|
||||
|
||||
return $images;
|
||||
}
|
||||
//
|
||||
// FUNCTIONS
|
||||
// ---------
|
||||
|
||||
?>
|
|
@ -100,6 +100,7 @@ a.nav:hover {
|
|||
font: 8pt Verdana, Arial, Helvetica, sans-serif;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
.error { color: #FF0000 }
|
||||
|
||||
/*
|
||||
Tables
|
||||
|
|
|
@ -157,6 +157,33 @@ function get_forum_branch($forum_id, $type = 'all', $order = 'descending', $incl
|
|||
return $rows;
|
||||
}
|
||||
|
||||
function filelist($rootdir, $dir = '', $type = 'gif|jpg|jpeg|png')
|
||||
{
|
||||
static $matches = array();
|
||||
|
||||
$dh = opendir($rootdir . $dir);
|
||||
|
||||
while ($fname = readdir($dh))
|
||||
{
|
||||
if (is_file($rootdir . $dir . '/' . $fname) &&
|
||||
preg_match('#\.' . $type . '$#i', $fname) &&
|
||||
filesize($rootdir . $dir . '/' . $fname))
|
||||
{
|
||||
$matches[] = array('path' => $dir, 'file' => $fname);
|
||||
}
|
||||
else if ($fname != '.' && $fname != '..' &&
|
||||
!is_file($rootdir . $dir . '/' . $fname) &&
|
||||
!is_link($rootdir . $dir . '/' . $fname))
|
||||
{
|
||||
filelist($rootdir, $dir . '/'. $fname, $type);
|
||||
}
|
||||
}
|
||||
|
||||
closedir($dh);
|
||||
|
||||
return $matches;
|
||||
}
|
||||
|
||||
// Posts and topics manipulation
|
||||
function move_topics($topic_ids, $forum_id, $auto_sync = TRUE)
|
||||
{
|
||||
|
|
|
@ -36,6 +36,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('min_name_chars','3
|
|||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_name_chars','30');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('min_pass_chars','6');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_pass_chars','30');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('min_ratings','10');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('session_length','3600');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('sitename','yourdomain.com');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('site_desc','A _little_ text to describe your forum');
|
||||
|
@ -94,6 +95,8 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation
|
|||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('flood_interval','15');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_interval','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_filesize','6144');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_min_width','20');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_min_height','20');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_width','90');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_height','90');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_enable','1');
|
||||
|
|
|
@ -868,6 +868,7 @@ CREATE TABLE phpbb_users (
|
|||
user_allow_email tinyint(1) DEFAULT '1' NOT NULL,
|
||||
user_allow_viewonline tinyint(1) DEFAULT '1' NOT NULL,
|
||||
user_allow_viewemail tinyint(1) DEFAULT '1' NOT NULL,
|
||||
user_allow_massemail tinyint(1) DEFAULT '1' NOT NULL,
|
||||
user_avatar varchar(100) DEFAULT '' NOT NULL,
|
||||
user_avatar_type tinyint(2) DEFAULT '0' NOT NULL,
|
||||
user_avatar_width tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
|
|
|
@ -92,21 +92,21 @@ $lang = array_merge($lang, array(
|
|||
|
||||
'LOOK_UP_FORUM' => 'Select a Forum',
|
||||
|
||||
'log_index_activate' => '<b>Activated inactive users</b><br />%s users',
|
||||
'log_index_delete' => '<b>Deleted inactive users</b><br />%s',
|
||||
'LOG_INDEX_REMIND' => '<b>Sent reminder emails to inactive users</b><br />%s',
|
||||
'LOG_MASS_EMAIL' => '<b>Sent mass email</b><br />%s',
|
||||
'log_index_activate' => '<b>Activated inactive users</b><br />» %s users',
|
||||
'log_index_delete' => '<b>Deleted inactive users</b><br />» %s',
|
||||
'LOG_INDEX_REMIND' => '<b>Sent reminder emails to inactive users</b><br />» %s',
|
||||
'LOG_MASS_EMAIL' => '<b>Sent mass email</b><br />» %s',
|
||||
'log_delete_word' => '<b>Deleted word censor</b>',
|
||||
'log_edit_word' => '<b>Edited word censor</b><br />%s',
|
||||
'log_add_word' => '<b>Added word censor</b><br />%s',
|
||||
'log_edit_word' => '<b>Edited word censor</b><br />» %s',
|
||||
'log_add_word' => '<b>Added word censor</b><br />» %s',
|
||||
'log_template_edit' => '<b>Edited template</b><br />%s / %s',
|
||||
'log_imageset_edit' => '<b>Edited imageset</b><br />%s',
|
||||
'log_style_edit' => '<b>Edited style</b><br />%s',
|
||||
'log_theme_edit' => '<b>Edited theme</b><br />%s',
|
||||
'log_imageset_edit' => '<b>Edited imageset</b><br />» %s',
|
||||
'log_style_edit' => '<b>Edited style</b><br />» %s',
|
||||
'log_theme_edit' => '<b>Edited theme</b><br />» %s',
|
||||
'log_db_backup' => '<b>Database backup</b>',
|
||||
'log_db_restore' => '<b>Database restore</b>',
|
||||
'log_search_index' => '<b>Re-indexed search system</b><br />%s',
|
||||
'log_disallow_add' => '<b>Added disallowed username</b><br />%s',
|
||||
'log_search_index' => '<b>Re-indexed search system</b><br />» %s',
|
||||
'log_disallow_add' => '<b>Added disallowed username</b><br />» %s',
|
||||
'log_disallow_delete' => '<b>Deleted disallowed username</b>',
|
||||
'log_admin_clear' => '<b>Cleared admin log</b>',
|
||||
|
||||
|
@ -130,6 +130,7 @@ $lang = array_merge($lang, array(
|
|||
'LOG_EMAIL_CONFIG' => '<b>Altered email settings</b>',
|
||||
'LOG_AVATAR_CONFIG' => '<b>Altered avatar settings</b>',
|
||||
'LOG_AUTH_CONFIG' => '<b>Altered authentication settings</b>',
|
||||
'LOG_LOAD_CONFIG' => '<b>Altered load settings</b>',
|
||||
|
||||
'LOG_ATTACH_CONFIG' => '<b>Altered attachment settings</b>',
|
||||
|
||||
|
@ -448,6 +449,8 @@ $lang = array_merge($lang, array(
|
|||
'ALLOW_UPLOAD' => 'Enable avatar uploading',
|
||||
'MAX_FILESIZE' => 'Maximum Avatar File Size',
|
||||
'MAX_FILESIZE_EXPLAIN' => 'For uploaded avatar files',
|
||||
'MIN_AVATAR_SIZE' => 'Minimum Avatar Dimensions',
|
||||
'MIN_AVATAR_SIZE_EXPLAIN' => '(Height x Width in pixels)',
|
||||
'MAX_AVATAR_SIZE' => 'Maximum Avatar Dimensions',
|
||||
'MAX_AVATAR_SIZE_EXPLAIN' => '(Height x Width in pixels)',
|
||||
'AVATAR_STORAGE_PATH' => 'Avatar Storage Path',
|
||||
|
@ -606,6 +609,8 @@ $lang = array_merge($lang, array(
|
|||
'PASSWORD_LENGTH_EXPLAIN' => 'Minimum and maximum number of characters in passwords.',
|
||||
'MIN_CHARS' => 'Min',
|
||||
'MAX_CHARS' => 'Max',
|
||||
'MIN_RATINGS' => 'Ratings count before karma',
|
||||
'MIN_RATINGS_EXPLAIN' => 'Number of distinct ratings before users karma is calculated.',
|
||||
'ALLOW_EMAIL_REUSE' => 'Allow Email address re-use',
|
||||
'ALLOW_EMAIL_REUSE_EXPLAIN' => 'Different users can register with the same email address.',
|
||||
'ALLOW_ATTACHMENTS' => 'Allow Attachments',
|
||||
|
@ -846,6 +851,9 @@ $lang = array_merge($lang, array(
|
|||
'COMPOSE' => 'Compose',
|
||||
'RECIPIENTS' => 'Recipients',
|
||||
'ALL_USERS' => 'All Users',
|
||||
'NO_EMAIL_SUBJECT' => 'You must specify a subject for your message.',
|
||||
'NO_EMAIL_MESSAGE' => 'You must enter a message.',
|
||||
'EMAIL_SENT' => 'Your message has been queued for sending.',
|
||||
|
||||
|
||||
'RANKS_EXPLAIN' => 'Using this form you can add, edit, view and delete ranks. You can also create custom ranks which can be applied to a user via the user management facility',
|
||||
|
@ -887,7 +895,7 @@ $lang = array_merge($lang, array(
|
|||
'Template' => 'Select template',
|
||||
'Download' => 'Download',
|
||||
'Edit_theme' => 'Edit Theme',
|
||||
'Edit_theme_explain' => 'Use this panel to edit an existing theme. You can modify (or add) both CSS to be included within each page output by the forum (subject to the template including it) and an externally linked stylesheet. Remember, the location of the stylesheet is relative to the phpBB root directory.',
|
||||
'Edit_theme_explain' => 'Use this panel to edit an existing theme. Each editable class can be selected individually. Set only the parameters you need, e.g. if you do not want a border leave the border parameters blank.',
|
||||
'Select_theme' => 'Select theme',
|
||||
'CSS_data' => 'CSS Data',
|
||||
'CSS_data_explain' => 'This CSS is output to the template and may be included within the header of each page.',
|
||||
|
|
|
@ -226,6 +226,7 @@ $lang = array(
|
|||
|
||||
'RETURN_INDEX' => 'Click %sHere%s to return to the index',
|
||||
'RETURN_TOPIC' => 'Click %sHere%s to return to the topic',
|
||||
'RETURN_POST' => 'Click %sHere%s to return to the post',
|
||||
'RETURN_FORUM' => 'Click %sHere%s to return to the forum',
|
||||
'RETURN_LOGIN' => 'Click %sHere%s to try again',
|
||||
'RETURN_MCP' => 'Click %sHere%s to return to the Moderator Control Panel',
|
||||
|
@ -299,6 +300,20 @@ $lang = array(
|
|||
'LOGIN_FORUM' => 'To view or post in this forum you must enter a password.',
|
||||
'WRONG_PASSWORD'=> 'You entered an incorrect password.',
|
||||
|
||||
'KARMA' => array(
|
||||
'-5' => 'Extremely Bad',
|
||||
'-4' => 'Very Bad',
|
||||
'-3' => 'Very Poor',
|
||||
'-2' => 'Bad',
|
||||
'-1' => 'Poor',
|
||||
'0' => 'Neutral',
|
||||
'1' => 'Not Bad',
|
||||
'2' => 'Good',
|
||||
'3' => 'Very Good',
|
||||
'4' => 'Extremely good',
|
||||
'5' => 'Excellent'
|
||||
),
|
||||
|
||||
|
||||
'INDEX' => 'Index page',
|
||||
'REDIRECTS' => 'Total redirects',
|
||||
|
@ -420,6 +435,7 @@ $lang = array(
|
|||
'VIEW_FORUM_TOPICS' => '%d Topics',
|
||||
|
||||
|
||||
// Viewtopic
|
||||
'VIEW_TOPIC' => 'View topic',
|
||||
'LOGIN_VIEWTOPIC' => 'The board administrator requires you to be registered and logged in to view this topic.',
|
||||
'PRINT_TOPIC' => 'Print View',
|
||||
|
@ -438,10 +454,14 @@ $lang = array(
|
|||
|
||||
'BACK_TO_TOP' => 'Back to top',
|
||||
'POST_SUBJECT' => 'Post subject',
|
||||
'KARMA_LEVEL' => 'Karma Level',
|
||||
'READ_PROFILE' => 'Profile',
|
||||
'SEND_EMAIL' => 'Email',
|
||||
'VISIT_WEBSITE' => 'WWW',
|
||||
'ICQ_STATUS' => 'ICQ Status',
|
||||
'ICQ_STATUS' => 'ICQ Status',
|
||||
'RATE' => 'Rate',
|
||||
'RATE_GOOD' => 'Good',
|
||||
'RATE_BAD' => 'Bad',
|
||||
'EDIT_POST' => 'Edit',
|
||||
'VIEW_IP' => 'IP',
|
||||
'DELETE_POST' => 'Delete',
|
||||
|
@ -488,6 +508,9 @@ $lang = array(
|
|||
'POLL_RUN_TILL' => 'Poll runs till %s', // %s = date/time
|
||||
'VOTE_SUBMITTED' => 'Your vote has been cast',
|
||||
|
||||
'RATING_UPDATED' => 'Your existing rating for this poster has been updated',
|
||||
'RATING_ADDED' => 'Your rating for this poster has been saved.',
|
||||
|
||||
'VIEW_TOPIC_POST' => '1 Post',
|
||||
'VIEW_TOPIC_POSTS' => '%d Posts',
|
||||
|
||||
|
@ -721,7 +744,7 @@ $lang = array(
|
|||
|
||||
'AVATAR_URL_INVALID' => 'The URL you specified is invalid.',
|
||||
'AVATAR_NOT_UPLOADED' => 'Avatar could not be uploaded.',
|
||||
'AVATAR_WRONG_SIZE' => 'The avatar must be at most %1$d pixels wide and %2$d pixels high.',
|
||||
'AVATAR_WRONG_SIZE' => 'The avatar must be at least %1$d pixels wide, %2$d pixels high and at most %3$d pixels wide and %4$d pixels high.',
|
||||
'AVATAR_WRONG_FILESIZE' => 'The avatar must be between 0 and %d bytes.',
|
||||
'AVATAR_NO_SIZE' => 'Could not obtain width or height of linked avatar, please enter them manually.',
|
||||
|
||||
|
@ -735,6 +758,7 @@ $lang = array(
|
|||
'NOTIFY_ON_PM' => 'Email me on new private messages',
|
||||
'POPUP_ON_PM' => 'Pop up window on new private message',
|
||||
'SHOW_EMAIL' => 'Users can contact me by email',
|
||||
'ADMIN_EMAIL' => 'Administrators can email me information',
|
||||
'BOARD_STYLE' => 'My board style',
|
||||
'BOARD_LANGUAGE' => 'My language',
|
||||
'BOARD_TIMEZONE' => 'My timezone',
|
||||
|
@ -749,6 +773,8 @@ $lang = array(
|
|||
'VIEW_SIGS' => 'Display Signatures',
|
||||
'VIEW_AVATARS' => 'Display Avatars',
|
||||
'DISABLE_CENSORS' => 'Enable Word censoring',
|
||||
'MINIMUM_KARMA' => 'Minimum User Karma',
|
||||
'MINIMUM_KARMA_EXPLAIN'=> 'Posts by users with Karma less than this will be ignored.',
|
||||
'VIEW_TOPICS_DAYS' => 'Display topics from previous days',
|
||||
'VIEW_TOPICS_KEY' => 'Display topics ordering by',
|
||||
'VIEW_TOPICS_DIR' => 'Display topic order direction',
|
||||
|
|
Loading…
Add table
Reference in a new issue