Чистка голосовавших в оконченных закрытых старых опросах; перенос синхронизаций в админке на ajax; разделение крон-задач обслуживания аттачей от обслуживания форума; разделение ajax-модуля управления пользователями от модуля управлением синхронизацией и очистками кеша в админке; переименование части стандартных функций (отказ от упоминания phpbb); фикс критичной опечатки в ajax.php; фикс крон-задачи чистки кеша и ее логирования. При обновлении не забывайте о выполнении запроса: INSERT INTO `bb_cron` VALUES (22, 1, 'Attach maintenance', 'attach_maintenance.php', 'daily', NULL, '05:00:00', 40, '', '', NULL, 1, '', 0, 1, 0); git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@582 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
glix08@gmail.com 2014-02-08 21:16:47 +00:00
commit 56b44835ec
32 changed files with 471 additions and 479 deletions

View file

@ -659,6 +659,7 @@ INSERT INTO `bb_cron` VALUES (18, 1, 'Seeder last seen', 'tr_update_seeder_last_
INSERT INTO `bb_cron` VALUES (19, 1, 'Captcha', 'captcha_gen_gc.php', 'daily', NULL, '05:00:00', 120, '', '', NULL, 0, '', 0, 0, 0); INSERT INTO `bb_cron` VALUES (19, 1, 'Captcha', 'captcha_gen_gc.php', 'daily', NULL, '05:00:00', 120, '', '', NULL, 0, '', 0, 0, 0);
INSERT INTO `bb_cron` VALUES (20, 1, 'Tracker dl-complete count', 'tr_complete_count.php', 'interval', NULL, NULL, 255, '', '', '06:00:00', 0, '', 0, 0, 0); INSERT INTO `bb_cron` VALUES (20, 1, 'Tracker dl-complete count', 'tr_complete_count.php', 'interval', NULL, NULL, 255, '', '', '06:00:00', 0, '', 0, 0, 0);
INSERT INTO `bb_cron` VALUES (21, 1, 'Cache garbage collector', 'cache_gc.php', 'interval', NULL, NULL, 255, '', '', '00:05:00', 0, '', 0, 0, 0); INSERT INTO `bb_cron` VALUES (21, 1, 'Cache garbage collector', 'cache_gc.php', 'interval', NULL, NULL, 255, '', '', '00:05:00', 0, '', 0, 0, 0);
INSERT INTO `bb_cron` VALUES (22, 1, 'Attach maintenance', 'attach_maintenance.php', 'daily', NULL, '05:00:00', 40, '', '', NULL, 1, '', 0, 1, 0);
-- -------------------------------------------------------- -- --------------------------------------------------------

View file

@ -1,7 +1,5 @@
<?php <?php
// Based on "Rebuild Search Mod" by chatasos [http://www.phpbb.com/phpBB/viewtopic.php?t=329629]
// ACP Header - START // ACP Header - START
if (!empty($setmodules)) if (!empty($setmodules))
{ {

View file

@ -32,7 +32,7 @@ $dir = @opendir(BB_ROOT . $bb_cfg['smilies_path']);
while($file = @readdir($dir)) while($file = @readdir($dir))
{ {
if( !@is_dir(phpbb_realpath(BB_ROOT . $bb_cfg['smilies_path'] . '/' . $file)) ) if( !@is_dir(bb_realpath(BB_ROOT . $bb_cfg['smilies_path'] . '/' . $file)) )
{ {
$img_size = @getimagesize(BB_ROOT . $bb_cfg['smilies_path'] . '/' . $file); $img_size = @getimagesize(BB_ROOT . $bb_cfg['smilies_path'] . '/' . $file);
@ -322,7 +322,7 @@ else if ( $mode != '' )
// //
$smile_code = ( isset($_POST['smile_code']) ) ? trim($_POST['smile_code']) : trim($_GET['smile_code']); $smile_code = ( isset($_POST['smile_code']) ) ? trim($_POST['smile_code']) : trim($_GET['smile_code']);
$smile_url = ( isset($_POST['smile_url']) ) ? trim($_POST['smile_url']) : trim($_GET['smile_url']); $smile_url = ( isset($_POST['smile_url']) ) ? trim($_POST['smile_url']) : trim($_GET['smile_url']);
$smile_url = phpbb_ltrim(basename($smile_url), "'"); $smile_url = bb_ltrim(basename($smile_url), "'");
$smile_emotion = ( isset($_POST['smile_emotion']) ) ? trim($_POST['smile_emotion']) : trim($_GET['smile_emotion']); $smile_emotion = ( isset($_POST['smile_emotion']) ) ? trim($_POST['smile_emotion']) : trim($_GET['smile_emotion']);
$smile_id = ( isset($_POST['smile_id']) ) ? intval($_POST['smile_id']) : intval($_GET['smile_id']); $smile_id = ( isset($_POST['smile_id']) ) ? intval($_POST['smile_id']) : intval($_GET['smile_id']);
@ -366,7 +366,7 @@ else if ( $mode != '' )
// //
$smile_code = ( isset($_POST['smile_code']) ) ? $_POST['smile_code'] : $_GET['smile_code']; $smile_code = ( isset($_POST['smile_code']) ) ? $_POST['smile_code'] : $_GET['smile_code'];
$smile_url = ( isset($_POST['smile_url']) ) ? $_POST['smile_url'] : $_GET['smile_url']; $smile_url = ( isset($_POST['smile_url']) ) ? $_POST['smile_url'] : $_GET['smile_url'];
$smile_url = phpbb_ltrim(basename($smile_url), "'"); $smile_url = bb_ltrim(basename($smile_url), "'");
$smile_emotion = ( isset($_POST['smile_emotion']) ) ? $_POST['smile_emotion'] : $_GET['smile_emotion']; $smile_emotion = ( isset($_POST['smile_emotion']) ) ? $_POST['smile_emotion'] : $_GET['smile_emotion'];
$smile_code = trim($smile_code); $smile_code = trim($smile_code);
$smile_url = trim($smile_url); $smile_url = trim($smile_url);

View file

@ -2,17 +2,15 @@
require('./pagestart.php'); require('./pagestart.php');
//
// Generate relevant output // Generate relevant output
// if (isset($_GET['pane']) && $_GET['pane'] == 'left')
if( isset($_GET['pane']) && $_GET['pane'] == 'left' )
{ {
$dir = @opendir('.'); $dir = @opendir('.');
$setmodules = 1; $setmodules = 1;
while( $file = @readdir($dir) ) while ($file = @readdir($dir))
{ {
if( preg_match('/^admin_.*?\.php$/', $file) ) if (preg_match('/^admin_.*?\.php$/', $file))
{ {
include('./' . $file); include('./' . $file);
} }
@ -30,9 +28,9 @@ if( isset($_GET['pane']) && $_GET['pane'] == 'left' )
ksort($module); ksort($module);
while( list($cat, $action_array) = each($module) ) while (list($cat, $action_array) = each($module))
{ {
$cat = ( !empty($lang[strtoupper($cat)]) ) ? $lang[strtoupper($cat)] : preg_replace('/_/', ' ', $cat); $cat = (!empty($lang[strtoupper($cat)])) ? $lang[strtoupper($cat)] : preg_replace('/_/', ' ', $cat);
$template->assign_block_vars('catrow', array( $template->assign_block_vars('catrow', array(
'ADMIN_CATEGORY' => $cat, 'ADMIN_CATEGORY' => $cat,
@ -41,7 +39,7 @@ if( isset($_GET['pane']) && $_GET['pane'] == 'left' )
ksort($action_array); ksort($action_array);
$row_count = 0; $row_count = 0;
while( list($action, $file) = each($action_array) ) while (list($action, $file) = each($action_array))
{ {
$row_class = !($row_count % 2) ? 'row1' : 'row2'; $row_class = !($row_count % 2) ? 'row1' : 'row2';
@ -56,22 +54,18 @@ if( isset($_GET['pane']) && $_GET['pane'] == 'left' )
} }
} }
} }
elseif( isset($_GET['pane']) && $_GET['pane'] == 'right' ) elseif (isset($_GET['pane']) && $_GET['pane'] == 'right')
{ {
$template->assign_vars(array( $template->assign_vars(array(
'TPL_ADMIN_MAIN' => true, 'TPL_ADMIN_MAIN' => true,
)); ));
//
// Get forum statistics // Get forum statistics
// $total_posts = get_db_stat('postcount');
$total_posts = get_db_stat('postcount'); $total_users = get_db_stat('usercount');
$total_users = get_db_stat('usercount');
$total_topics = get_db_stat('topiccount'); $total_topics = get_db_stat('topiccount');
$start_date = bb_date($bb_cfg['board_startdate']);
$start_date = bb_date($bb_cfg['board_startdate']); $boarddays = (TIMENOW - $bb_cfg['board_startdate']) / 86400;
$boarddays = ( TIMENOW - $bb_cfg['board_startdate'] ) / 86400;
$posts_per_day = sprintf('%.2f', $total_posts / $boarddays); $posts_per_day = sprintf('%.2f', $total_posts / $boarddays);
$topics_per_day = sprintf('%.2f', $total_topics / $boarddays); $topics_per_day = sprintf('%.2f', $total_topics / $boarddays);
@ -90,12 +84,10 @@ elseif( isset($_GET['pane']) && $_GET['pane'] == 'right' )
} }
@closedir($avatar_dir); @closedir($avatar_dir);
$avatar_dir_size = humn_size($avatar_dir_size); $avatar_dir_size = humn_size($avatar_dir_size);
} }
else else
{ {
// Couldn't open Avatar dir.
$avatar_dir_size = $lang['NOT_AVAILABLE']; $avatar_dir_size = $lang['NOT_AVAILABLE'];
} }
@ -114,13 +106,7 @@ elseif( isset($_GET['pane']) && $_GET['pane'] == 'right' )
$users_per_day = $total_users; $users_per_day = $total_users;
} }
//
// DB size ... MySQL only // DB size ... MySQL only
//
// This code is heavily influenced by a similar routine
// in phpMyAdmin 2.2.0
//
$sql = "SELECT VERSION() AS mysql_version"; $sql = "SELECT VERSION() AS mysql_version";
if ($result = DB()->sql_query($sql)) if ($result = DB()->sql_query($sql))
{ {
@ -169,20 +155,17 @@ elseif( isset($_GET['pane']) && $_GET['pane'] == 'right' )
'TOPICS_PER_DAY' => $topics_per_day, 'TOPICS_PER_DAY' => $topics_per_day,
'USERS_PER_DAY' => $users_per_day, 'USERS_PER_DAY' => $users_per_day,
'AVATAR_DIR_SIZE' => $avatar_dir_size, 'AVATAR_DIR_SIZE' => $avatar_dir_size,
'DB_SIZE' => $dbsize, 'DB_SIZE' => $dbsize,
'GZIP_COMPRESSION' => ( $bb_cfg['gzip_compress'] ) ? $lang['ON'] : $lang['OFF'], 'GZIP_COMPRESSION' => ($bb_cfg['gzip_compress']) ? $lang['ON'] : $lang['OFF'],
)); ));
//
// End forum statistics
//
if (@$_GET['users_online']) if (@$_GET['users_online'])
{ {
$template->assign_vars(array( $template->assign_vars(array(
'SHOW_USERS_ONLINE' => true, 'SHOW_USERS_ONLINE' => true,
)); ));
//
// Get users online information. // Get users online information.
//
$sql = "SELECT u.user_id, u.username, u.user_rank, s.session_time AS user_session_time, u.user_opt, s.session_logged_in, s.session_ip, s.session_start $sql = "SELECT u.user_id, u.username, u.user_rank, s.session_time AS user_session_time, u.user_opt, s.session_logged_in, s.session_ip, s.session_start
FROM " . BB_USERS . " u, " . BB_SESSIONS . " s FROM " . BB_USERS . " u, " . BB_SESSIONS . " s
WHERE s.session_logged_in = 1 WHERE s.session_logged_in = 1
@ -248,9 +231,7 @@ elseif( isset($_GET['pane']) && $_GET['pane'] == 'right' )
} }
} }
//
// Guest users // Guest users
//
if( count($onlinerow_guest) ) if( count($onlinerow_guest) )
{ {
$guest_users = 0; $guest_users = 0;
@ -277,42 +258,15 @@ elseif( isset($_GET['pane']) && $_GET['pane'] == 'right' )
else else
{ {
$template->assign_vars(array( $template->assign_vars(array(
'USERS_ONLINE_HREF' => "index.php?pane=right&users_online=1&sid={$userdata['session_id']}", 'USERS_ONLINE_HREF' => "index.php?pane=right&users_online=1",
)); ));
} }
$template->assign_vars(array(
'U_UPDATE_USER_LEVEL' => "index.php?update_user_level=1",
'U_SYNC_TOPICS' => "index.php?sync_topics=1",
'U_SYNC_USER_POSTS' => "index.php?sync_user_posts=1",
));
}
elseif (isset($_REQUEST['update_user_level']))
{
require(INC_DIR .'functions_group.php');
update_user_level('all');
bb_die($lang['USER_LEVELS_UPDATED']);
}
elseif (isset($_REQUEST['sync_topics']))
{
sync('topic', 'all');
sync('forum', 'all');
bb_die($lang['TOPICS_DATA_SYNCHRONIZED']);
}
elseif (isset($_REQUEST['sync_user_posts']))
{
sync('user_posts', 'all');
bb_die($lang['USER POSTS COUNT SYNCHRONIZED']);
} }
else else
{ {
//
// Generate frameset // Generate frameset
//
$template->assign_vars(array( $template->assign_vars(array(
'TPL_ADMIN_FRAMESET' => true, 'TPL_ADMIN_FRAMESET' => true,
'S_FRAME_NAV' => "index.php?pane=left",
'S_FRAME_MAIN' => "index.php?pane=right",
)); ));
send_no_cache_headers(); send_no_cache_headers();
print_page('index.tpl', 'admin', 'no_header'); print_page('index.tpl', 'admin', 'no_header');
@ -320,9 +274,7 @@ else
print_page('index.tpl', 'admin'); print_page('index.tpl', 'admin');
//
// Functions // Functions
//
function inarray($needle, $haystack) function inarray($needle, $haystack)
{ {
for($i = 0; $i < sizeof($haystack); $i++ ) for($i = 0; $i < sizeof($haystack); $i++ )

View file

@ -32,7 +32,7 @@ switch ($ajax->action)
case 'view_torrent': case 'view_torrent':
case 'mod_action': case 'mod_action':
case 'change_tor_status': case 'change_tor_status':
case 'gen_passkey'; case 'gen_passkey':
require(BB_ROOT . 'attach_mod/attachment_mod.php'); require(BB_ROOT . 'attach_mod/attachment_mod.php');
require(INC_DIR . 'functions_torrent.php'); require(INC_DIR . 'functions_torrent.php');
break; break;
@ -47,6 +47,7 @@ switch ($ajax->action)
break; break;
case 'manage_user': case 'manage_user':
case 'manage_admin':
require(INC_DIR . 'functions_admin.php'); require(INC_DIR . 'functions_admin.php');
break; break;
@ -75,6 +76,7 @@ class ajax_common
'change_user_rank' => array('admin'), 'change_user_rank' => array('admin'),
'change_user_opt' => array('admin'), 'change_user_opt' => array('admin'),
'manage_user' => array('admin'), 'manage_user' => array('admin'),
'manage_admin' => array('admin'),
'mod_action' => array('mod'), 'mod_action' => array('mod'),
'topic_tpl' => array('mod'), 'topic_tpl' => array('mod'),
@ -378,6 +380,11 @@ class ajax_common
require(AJAX_DIR . 'manage_user.php'); require(AJAX_DIR . 'manage_user.php');
} }
function manage_admin()
{
require(AJAX_DIR . 'manage_admin.php');
}
function topic_tpl() function topic_tpl()
{ {
require(AJAX_DIR . 'topic_tpl.php'); require(AJAX_DIR . 'topic_tpl.php');

View file

@ -0,0 +1,114 @@
<?php
if (!defined('IN_AJAX')) die(basename(__FILE__));
global $userdata, $lang, $bb_cfg;
$mode = (string) $this->request['mode'];
switch ($mode)
{
case 'clear_cache':
$gc_cache = array(
'bb_cache',
'tr_cache',
'session_cache',
'bb_cap_sid',
'bb_login_err',
'bb_poll_data',
);
// foreach ($bb_cfg['cache']['engines'] as $cache_name => $cache_val)
foreach ($gc_cache as $cache_name)
{
CACHE($cache_name)->rm();
}
$this->response['cache_html'] = '<span class="seed bold">'. $lang['ALL_CACHE_CLEARED'] .'</span>';
break;
case 'clear_datastore':
global $datastore;
$datastore->clean();
$this->response['datastore_html'] = '<span class="seed bold">'. $lang['DATASTORE_CLEARED'] .'</span>';
break;
case 'clear_template_cache':
global $template;
$match = 'tpl_';
$match_len = strlen($match);
$dir = $template->cachedir;
$res = @opendir($dir);
while (($file = readdir($res)) !== false)
{
if (substr($file, 0, $match_len) === $match)
{
@unlink($dir . $file);
}
}
closedir($res);
$this->response['template_cache_html'] = '<span class="seed bold">'. $lang['ALL_TEMPLATE_CLEARED'] .'</span>';
break;
case 'indexer':
exec("indexer --config {$bb_cfg['sphinx_config_path']} --all --rotate", $result);
if (!is_file($bb_cfg['sphinx_config_path'].".log"))
{
file_put_contents($bb_cfg['sphinx_config_path'].".log", "####Logger from dimka3210.####".date("H:i:s", TIMENOW)."##############################\r\n\r\n\r\n\r\n", FILE_APPEND);
}
file_put_contents($bb_cfg['sphinx_config_path'].".log", "##############################".date("H:i:s", TIMENOW)."##############################\r\n", FILE_APPEND);
foreach ($result as $row)
{
file_put_contents($bb_cfg['sphinx_config_path'].".log", $row."\r\n", FILE_APPEND);
}
file_put_contents($bb_cfg['sphinx_config_path'].".log", "\r\n", FILE_APPEND);
file_put_contents($bb_cfg['sphinx_config_path'].".log", "\r\n", FILE_APPEND);
$this->response['indexer_html'] = '<span class="seed bold">'. $lang['INDEXER'] .'</span>';
break;
case 'update_user_level':
require(INC_DIR .'functions_group.php');
update_user_level('all');
$this->response['update_user_level_html'] = '<span class="seed bold">'. $lang['USER_LEVELS_UPDATED'] .'</span>';
break;
case 'sync_topics':
sync('topic', 'all');
sync('forum', 'all');
$this->response['sync_topics_html'] = '<span class="seed bold">'. $lang['TOPICS_DATA_SYNCHRONIZED'] .'</span>';
break;
case 'sync_user_posts':
sync('user_posts', 'all');
$this->response['sync_user_posts_html'] = '<span class="seed bold">'. $lang['USER POSTS COUNT SYNCHRONIZED'] .'</span>';
break;
}
$this->response['mode'] = $mode;

View file

@ -9,53 +9,8 @@ $user_id = $this->request['user_id'];
switch ($mode) switch ($mode)
{ {
case 'clear_cache':
$gc_cache = array(
'bb_cache',
'tr_cache',
'session_cache',
'bb_cap_sid',
'bb_login_err',
'bb_poll_data',
);
// foreach ($bb_cfg['cache']['engines'] as $cache_name => $cache_val)
foreach ($gc_cache as $cache_name)
{
CACHE($cache_name)->rm();
}
$this->response['cache_html'] = '<span class="seed bold">'. $lang['ALL_CACHE_CLEARED'] .'</span>';
break;
case 'clear_datastore':
global $datastore;
$datastore->clean();
$this->response['datastore_html'] = '<span class="seed bold">'. $lang['DATASTORE_CLEARED'] .'</span>';
break;
case 'clear_template_cache':
global $template;
$match = 'tpl_';
$match_len = strlen($match);
$dir = $template->cachedir;
$res = @opendir($dir);
while (($file = readdir($res)) !== false)
{
if (substr($file, 0, $match_len) === $match)
{
@unlink($dir . $file);
}
}
closedir($res);
$this->response['template_cache'] = '<span class="seed bold">'. $lang['ALL_CACHE_CLEARED'] .'</span>';
break;
case 'delete_profile': case 'delete_profile':
if ($userdata['user_id'] == $user_id) $this->ajax_die($lang['USER_DELETE_ME']); if ($userdata['user_id'] == $user_id) $this->ajax_die($lang['USER_DELETE_ME']);
if (empty($this->request['confirmed'])) $this->prompt_for_confirm($lang['USER_DELETE_CONFIRM']); if (empty($this->request['confirmed'])) $this->prompt_for_confirm($lang['USER_DELETE_CONFIRM']);
@ -67,9 +22,11 @@ switch ($mode)
$this->response['info'] = $lang['USER_DELETED']; $this->response['info'] = $lang['USER_DELETED'];
} }
else $this->ajax_die($lang['USER_DELETE_CSV']); else $this->ajax_die($lang['USER_DELETE_CSV']);
break; break;
case 'delete_topics': case 'delete_topics':
if (empty($this->request['confirmed']) && $userdata['user_id'] == $user_id) $this->prompt_for_confirm($lang['DELETE_USER_POSTS_ME']); if (empty($this->request['confirmed']) && $userdata['user_id'] == $user_id) $this->prompt_for_confirm($lang['DELETE_USER_POSTS_ME']);
if (empty($this->request['confirmed'])) $this->prompt_for_confirm($lang['DELETE_USER_ALL_POSTS_CONFIRM']); if (empty($this->request['confirmed'])) $this->prompt_for_confirm($lang['DELETE_USER_ALL_POSTS_CONFIRM']);
@ -82,9 +39,11 @@ switch ($mode)
$this->response['info'] = $lang['USER_DELETED_POSTS']; $this->response['info'] = $lang['USER_DELETED_POSTS'];
} }
else $this->ajax_die($lang['NOT_ADMIN']); else $this->ajax_die($lang['NOT_ADMIN']);
break; break;
case 'delete_message': case 'delete_message':
if (empty($this->request['confirmed']) && $userdata['user_id'] == $user_id) $this->prompt_for_confirm($lang['DELETE_USER_POSTS_ME']); if (empty($this->request['confirmed']) && $userdata['user_id'] == $user_id) $this->prompt_for_confirm($lang['DELETE_USER_POSTS_ME']);
if (empty($this->request['confirmed'])) $this->prompt_for_confirm($lang['DELETE_USER_POSTS_CONFIRM']); if (empty($this->request['confirmed'])) $this->prompt_for_confirm($lang['DELETE_USER_POSTS_CONFIRM']);
@ -95,17 +54,21 @@ switch ($mode)
$this->response['info'] = $lang['USER_DELETED_POSTS']; $this->response['info'] = $lang['USER_DELETED_POSTS'];
} }
else $this->ajax_die($lang['NOT_ADMIN']); else $this->ajax_die($lang['NOT_ADMIN']);
break; break;
case 'user_activate': case 'user_activate':
if (empty($this->request['confirmed'])) $this->prompt_for_confirm($lang['DEACTIVATE_CONFIRM']); if (empty($this->request['confirmed'])) $this->prompt_for_confirm($lang['DEACTIVATE_CONFIRM']);
DB()->query("UPDATE ". BB_USERS ." SET user_active = '1' WHERE user_id = ". $user_id); DB()->query("UPDATE ". BB_USERS ." SET user_active = '1' WHERE user_id = ". $user_id);
$this->response['info'] = $lang['USER_ACTIVATE_ON']; $this->response['info'] = $lang['USER_ACTIVATE_ON'];
break; break;
case 'user_deactivate': case 'user_deactivate':
if ($userdata['user_id'] == $user_id) $this->ajax_die($lang['USER_DEACTIVATE_ME']); if ($userdata['user_id'] == $user_id) $this->ajax_die($lang['USER_DEACTIVATE_ME']);
if (empty($this->request['confirmed'])) $this->prompt_for_confirm($lang['ACTIVATE_CONFIRM']); if (empty($this->request['confirmed'])) $this->prompt_for_confirm($lang['ACTIVATE_CONFIRM']);
@ -113,23 +76,7 @@ switch ($mode)
delete_user_sessions($user_id); delete_user_sessions($user_id);
$this->response['info'] = $lang['USER_ACTIVATE_OFF']; $this->response['info'] = $lang['USER_ACTIVATE_OFF'];
break;
case "indexer":
exec("indexer --config {$bb_cfg['sphinx_config_path']} --all --rotate", $result);
if (!is_file($bb_cfg['sphinx_config_path'].".log"))
{
file_put_contents($bb_cfg['sphinx_config_path'].".log", "####Logger from dimka3210.####".date("H:i:s", TIMENOW)."##############################\r\n\r\n\r\n\r\n", FILE_APPEND);
}
file_put_contents($bb_cfg['sphinx_config_path'].".log", "##############################".date("H:i:s", TIMENOW)."##############################\r\n", FILE_APPEND);
foreach ($result as $row)
{
file_put_contents($bb_cfg['sphinx_config_path'].".log", $row."\r\n", FILE_APPEND);
}
file_put_contents($bb_cfg['sphinx_config_path'].".log", "\r\n", FILE_APPEND);
file_put_contents($bb_cfg['sphinx_config_path'].".log", "\r\n", FILE_APPEND);
$this->response['indexer'] = '<span class="seed bold">'. $lang['INDEXER'] ."</span>";
break; break;
} }

View file

@ -168,7 +168,7 @@ function attachment_quota_settings($admin_mode, $submit = false, $mode)
if ($admin_mode == 'group' && !$submit && isset($_POST['edit'])) if ($admin_mode == 'group' && !$submit && isset($_POST['edit']))
{ {
// Get group id again, we do not trust phpBB here, Mods may be installed ;) // Get group id again
$group_id = get_var(POST_GROUPS_URL, 0); $group_id = get_var(POST_GROUPS_URL, 0);
// Show the contents // Show the contents

View file

@ -55,8 +55,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
// Increase number of revision after update // Increase number of revision after update
$bb_cfg['tp_version'] = '2.6 (RC)'; $bb_cfg['tp_version'] = '2.6 (RC)';
$bb_cfg['tp_release_date'] = '02-02-2014'; $bb_cfg['tp_release_date'] = '09-02-2014';
$bb_cfg['tp_release_state'] = 'R581'; $bb_cfg['tp_release_state'] = 'R582';
// Database // Database
$charset = 'utf8'; $charset = 'utf8';

View file

@ -0,0 +1,224 @@
<?php
if (!defined('BB_ROOT')) die(basename(__FILE__));
DB()->expect_slow_query(600);
$fix_errors = true;
$debug_mode = false;
$tmp_attach_tbl = 'tmp_attachments';
$db_max_packet = 800000;
$sql_limit = 3000;
$check_attachments = false;
$orphan_files = $orphan_db_attach = $orphan_tor = array();
$posts_without_attach = $topics_without_attach = array();
DB()->query("
CREATE TEMPORARY TABLE $tmp_attach_tbl (
physical_filename VARCHAR(255) NOT NULL default '',
KEY physical_filename (physical_filename(20))
) ENGINE = MyISAM DEFAULT CHARSET = utf8
");
DB()->add_shutdown_query("DROP TEMPORARY TABLE IF EXISTS $tmp_attach_tbl");
// Get attach_mod config
$attach_dir = get_attachments_dir();
// Get all names of existed attachments and insert them into $tmp_attach_tbl
if ($dir = @opendir($attach_dir))
{
$check_attachments = true;
$files = array();
$f_len = 0;
while (false !== ($f = readdir($dir)))
{
if ($f == 'index.php' || $f == '.htaccess' || is_dir("$attach_dir/$f") || is_link("$attach_dir/$f"))
{
continue;
}
$f = DB()->escape($f);
$files[] = "('$f')";
$f_len += strlen($f) + 5;
if ($f_len > $db_max_packet)
{
$files = join(',', $files);
DB()->query("INSERT INTO $tmp_attach_tbl VALUES $files");
$files = array();
$f_len = 0;
}
}
if ($files = join(',', $files))
{
DB()->query("INSERT INTO $tmp_attach_tbl VALUES $files");
}
closedir($dir);
}
if ($check_attachments)
{
// Delete bad records
DB()->query("
DELETE a, d
FROM ". BB_ATTACHMENTS_DESC ." d
LEFT JOIN ". BB_ATTACHMENTS ." a USING(attach_id)
WHERE (
d.physical_filename = ''
OR d.real_filename = ''
OR d.extension = ''
OR d.mimetype = ''
OR d.filesize = 0
OR d.filetime = 0
OR a.post_id = 0
)
");
// Delete attachments that exist in file system but not exist in DB
$sql = "SELECT f.physical_filename
FROM $tmp_attach_tbl f
LEFT JOIN ". BB_ATTACHMENTS_DESC ." d USING(physical_filename)
WHERE d.physical_filename IS NULL
LIMIT $sql_limit";
foreach (DB()->fetch_rowset($sql) as $row)
{
if ($filename = basename($row['physical_filename']))
{
if ($fix_errors)
{
@unlink("$attach_dir/$filename");
@unlink("$attach_dir/". THUMB_DIR .'/t_'. $filename);
}
if ($debug_mode)
{
$orphan_files[] = "$attach_dir/$filename";
}
}
}
// Find DB records for attachments that exist in DB but not exist in file system
$sql = "SELECT d.attach_id
FROM ". BB_ATTACHMENTS_DESC ." d
LEFT JOIN $tmp_attach_tbl f USING(physical_filename)
WHERE f.physical_filename IS NULL
LIMIT $sql_limit";
foreach (DB()->fetch_rowset($sql) as $row)
{
$orphan_db_attach[] = $row['attach_id'];
}
// Attachment exist in DESC_TABLE but not exist in ATTACH_TABLE
$sql = "SELECT d.attach_id
FROM ". BB_ATTACHMENTS_DESC ." d
LEFT JOIN ". BB_ATTACHMENTS ." a USING(attach_id)
WHERE a.attach_id IS NULL
LIMIT $sql_limit";
foreach (DB()->fetch_rowset($sql) as $row)
{
$orphan_db_attach[] = $row['attach_id'];
}
// Attachment exist in ATTACH_TABLE but not exist in DESC_TABLE
$sql = "SELECT a.attach_id
FROM ". BB_ATTACHMENTS ." a
LEFT JOIN ". BB_ATTACHMENTS_DESC ." d USING(attach_id)
WHERE d.attach_id IS NULL
LIMIT $sql_limit";
foreach (DB()->fetch_rowset($sql) as $row)
{
$orphan_db_attach[] = $row['attach_id'];
}
// Attachments without post
$sql = "SELECT a.attach_id
FROM ". BB_ATTACHMENTS ." a
LEFT JOIN ". BB_POSTS ." p USING(post_id)
WHERE p.post_id IS NULL
LIMIT $sql_limit";
foreach (DB()->fetch_rowset($sql) as $row)
{
$orphan_db_attach[] = $row['attach_id'];
}
// Delete all orphan attachments
if ($orphans_sql = join(',', $orphan_db_attach))
{
if ($fix_errors)
{
DB()->query("DELETE FROM ". BB_ATTACHMENTS_DESC ." WHERE attach_id IN($orphans_sql)");
DB()->query("DELETE FROM ". BB_ATTACHMENTS ." WHERE attach_id IN($orphans_sql)");
}
}
// Torrents without attachments
$sql = "SELECT tor.topic_id
FROM ". BB_BT_TORRENTS ." tor
LEFT JOIN ". BB_ATTACHMENTS_DESC ." d USING(attach_id)
WHERE d.attach_id IS NULL
LIMIT $sql_limit";
foreach (DB()->fetch_rowset($sql) as $row)
{
$orphan_tor[] = $row['topic_id'];
}
// Delete all orphan torrents
if ($orphans_sql = join(',', $orphan_tor))
{
if ($fix_errors)
{
DB()->query("DELETE FROM ". BB_BT_TORRENTS ." WHERE topic_id IN($orphans_sql)");
}
}
// Check post_attachment markers
$sql = "SELECT p.post_id
FROM ". BB_POSTS ." p
LEFT JOIN ". BB_ATTACHMENTS ." a USING(post_id)
WHERE p.post_attachment = 1
AND a.post_id IS NULL";
foreach (DB()->fetch_rowset($sql) as $row)
{
$posts_without_attach[] = $row['post_id'];
}
if ($posts_sql = join(',', $posts_without_attach))
{
if ($fix_errors)
{
DB()->query("UPDATE ". BB_POSTS ." SET post_attachment = 0 WHERE post_id IN($posts_sql)");
}
}
// Check topic_attachment markers
$sql = "SELECT t.topic_id
FROM ". BB_POSTS ." p, ". BB_TOPICS ." t
WHERE t.topic_id = p.topic_id
AND t.topic_attachment = 1
GROUP BY p.topic_id
HAVING SUM(p.post_attachment) = 0";
foreach (DB()->fetch_rowset($sql) as $row)
{
$topics_without_attach[] = $row['topic_id'];
}
if ($topics_sql = join(',', $topics_without_attach))
{
if ($fix_errors)
{
DB()->query("UPDATE ". BB_TOPICS ." SET topic_attachment = 0 WHERE topic_id IN($topics_sql)");
}
}
}
if ($debug_mode)
{
prn_r($orphan_files, '$orphan_files');
prn_r($orphan_db_attach, '$orphan_db_attach');
prn_r($orphan_tor, '$orphan_tor');
prn_r($posts_without_attach, '$posts_without_attach');
prn_r($topics_without_attach, '$topics_without_attach');
}
DB()->query("DROP TEMPORARY TABLE $tmp_attach_tbl");
unset($fix_errors, $debug_mode);

View file

@ -2,259 +2,47 @@
if (!defined('BB_ROOT')) die(basename(__FILE__)); if (!defined('BB_ROOT')) die(basename(__FILE__));
$fix_errors = true;
$debug_mode = false;
$tmp_attach_tbl = 'tmp_attachments';
$db_max_packet = 800000;
$sql_limit = 3000;
$check_attachments = false;
$orphan_files = $orphan_db_attach = $orphan_tor = array();
$posts_without_attach = $topics_without_attach = array();
$lock_tables = array(
$tmp_attach_tbl .' f',
BB_ATTACHMENTS_DESC .' d',
BB_ATTACHMENTS_DESC,
BB_ATTACHMENTS .' a',
BB_ATTACHMENTS,
BB_BT_TORRENTS .' tor',
BB_BT_TORRENTS,
BB_POSTS .' p',
BB_POSTS,
BB_PRIVMSGS .' pm',
BB_TOPICS .' t',
BB_TOPICS,
);
DB()->query("
CREATE TEMPORARY TABLE $tmp_attach_tbl (
physical_filename VARCHAR(255) NOT NULL default '',
KEY physical_filename (physical_filename(20))
) ENGINE = MyISAM DEFAULT CHARSET = utf8
");
// Get attach_mod config
$attach_dir = get_attachments_dir();
// Get all names of existed attachments and insert them into $tmp_attach_tbl
if ($dir = @opendir($attach_dir))
{
$check_attachments = true;
$files = array();
$f_len = 0;
while (false !== ($f = readdir($dir)))
{
if ($f == 'index.php' || $f == '.htaccess' || is_dir("$attach_dir/$f") || is_link("$attach_dir/$f"))
{
continue;
}
$f = DB()->escape($f);
$files[] = "('$f')";
$f_len += strlen($f) + 5;
if ($f_len > $db_max_packet)
{
$files = join(',', $files);
DB()->query("INSERT INTO $tmp_attach_tbl VALUES $files");
$files = array();
$f_len = 0;
}
}
if ($files = join(',', $files))
{
DB()->query("INSERT INTO $tmp_attach_tbl VALUES $files");
}
closedir($dir);
}
// Lock tables
# $lock = DB()->lock($lock_tables);
if ($check_attachments)
{
// Delete bad records
DB()->query("
DELETE a, d
FROM ". BB_ATTACHMENTS_DESC ." d
LEFT JOIN ". BB_ATTACHMENTS ." a USING(attach_id)
WHERE (
d.physical_filename = ''
OR d.real_filename = ''
OR d.extension = ''
OR d.mimetype = ''
OR d.filesize = 0
OR d.filetime = 0
OR a.post_id = 0
)
");
// Delete attachments that exist in file system but not exist in DB
$sql = "SELECT f.physical_filename
FROM $tmp_attach_tbl f
LEFT JOIN ". BB_ATTACHMENTS_DESC ." d USING(physical_filename)
WHERE d.physical_filename IS NULL
LIMIT $sql_limit";
foreach (DB()->fetch_rowset($sql) as $row)
{
if ($filename = basename($row['physical_filename']))
{
if ($fix_errors)
{
@unlink("$attach_dir/$filename");
@unlink("$attach_dir/". THUMB_DIR .'/t_'. $filename);
}
if ($debug_mode)
{
$orphan_files[] = "$attach_dir/$filename";
}
}
}
// Find DB records for attachments that exist in DB but not exist in file system
$sql = "SELECT d.attach_id
FROM ". BB_ATTACHMENTS_DESC ." d
LEFT JOIN $tmp_attach_tbl f USING(physical_filename)
WHERE f.physical_filename IS NULL
LIMIT $sql_limit";
foreach (DB()->fetch_rowset($sql) as $row)
{
$orphan_db_attach[] = $row['attach_id'];
}
// Attachment exist in DESC_TABLE but not exist in ATTACH_TABLE
$sql = "SELECT d.attach_id
FROM ". BB_ATTACHMENTS_DESC ." d
LEFT JOIN ". BB_ATTACHMENTS ." a USING(attach_id)
WHERE a.attach_id IS NULL
LIMIT $sql_limit";
foreach (DB()->fetch_rowset($sql) as $row)
{
$orphan_db_attach[] = $row['attach_id'];
}
// Attachment exist in ATTACH_TABLE but not exist in DESC_TABLE
$sql = "SELECT a.attach_id
FROM ". BB_ATTACHMENTS ." a
LEFT JOIN ". BB_ATTACHMENTS_DESC ." d USING(attach_id)
WHERE d.attach_id IS NULL
LIMIT $sql_limit";
foreach (DB()->fetch_rowset($sql) as $row)
{
$orphan_db_attach[] = $row['attach_id'];
}
// Attachments without post
$sql = "SELECT a.attach_id
FROM ". BB_ATTACHMENTS ." a
LEFT JOIN ". BB_POSTS ." p USING(post_id)
WHERE p.post_id IS NULL
LIMIT $sql_limit";
foreach (DB()->fetch_rowset($sql) as $row)
{
$orphan_db_attach[] = $row['attach_id'];
}
// Delete all orphan attachments
if ($orphans_sql = join(',', $orphan_db_attach))
{
if ($fix_errors)
{
DB()->query("DELETE FROM ". BB_ATTACHMENTS_DESC ." WHERE attach_id IN($orphans_sql)");
DB()->query("DELETE FROM ". BB_ATTACHMENTS ." WHERE attach_id IN($orphans_sql)");
}
}
// Torrents without attachments
$sql = "SELECT tor.topic_id
FROM ". BB_BT_TORRENTS ." tor
LEFT JOIN ". BB_ATTACHMENTS_DESC ." d USING(attach_id)
WHERE d.attach_id IS NULL
LIMIT $sql_limit";
foreach (DB()->fetch_rowset($sql) as $row)
{
$orphan_tor[] = $row['topic_id'];
}
// Delete all orphan torrents
if ($orphans_sql = join(',', $orphan_tor))
{
if ($fix_errors)
{
DB()->query("DELETE FROM ". BB_BT_TORRENTS ." WHERE topic_id IN($orphans_sql)");
}
}
// Check post_attachment markers
$sql = "SELECT p.post_id
FROM ". BB_POSTS ." p
LEFT JOIN ". BB_ATTACHMENTS ." a USING(post_id)
WHERE p.post_attachment = 1
AND a.post_id IS NULL";
foreach (DB()->fetch_rowset($sql) as $row)
{
$posts_without_attach[] = $row['post_id'];
}
if ($posts_sql = join(',', $posts_without_attach))
{
if ($fix_errors)
{
DB()->query("UPDATE ". BB_POSTS ." SET post_attachment = 0 WHERE post_id IN($posts_sql)");
}
}
// Check topic_attachment markers
$sql = "SELECT t.topic_id
FROM ". BB_POSTS ." p, ". BB_TOPICS ." t
WHERE t.topic_id = p.topic_id
AND t.topic_attachment = 1
GROUP BY p.topic_id
HAVING SUM(p.post_attachment) = 0";
foreach (DB()->fetch_rowset($sql) as $row)
{
$topics_without_attach[] = $row['topic_id'];
}
if ($topics_sql = join(',', $topics_without_attach))
{
if ($fix_errors)
{
DB()->query("UPDATE ". BB_TOPICS ." SET topic_attachment = 0 WHERE topic_id IN($topics_sql)");
}
}
}
if ($debug_mode)
{
prn_r($orphan_files, '$orphan_files');
prn_r($orphan_db_attach, '$orphan_db_attach');
prn_r($orphan_tor, '$orphan_tor');
prn_r($posts_without_attach, '$posts_without_attach');
prn_r($topics_without_attach, '$topics_without_attach');
}
// Unlock tables
# $unlock = DB()->unlock();
DB()->query("DROP TEMPORARY TABLE $tmp_attach_tbl");
unset($fix_errors, $debug_mode);
// Sync
require_once(INC_DIR .'functions_admin.php'); require_once(INC_DIR .'functions_admin.php');
// Синхронизация
sync('topic', 'all'); sync('topic', 'all');
sync('forum', 'all'); sync('forum', 'all');
sync('user_posts', 'all'); sync('user_posts', 'all');
// Clean "user_newpasswd" // Чистка bb_poll_users
DB()->query(" if ($poll_max_days = (int) $bb_cfg['poll_max_days'])
UPDATE ". BB_USERS ." SET {
user_newpasswd = '' $per_cycle = 20000;
WHERE user_lastvisit < ". (TIMENOW - 7*86400) ." $row = DB()->fetch_row("SELECT MIN(topic_id) AS start_id, MAX(topic_id) AS finish_id FROM ". BB_POLL_USERS);
"); $start_id = (int) $row['start_id'];
$finish_id = (int) $row['finish_id'];
// Clean posts cache while (true)
{
set_time_limit(600);
$end_id = $start_id + $per_cycle - 1;
DB()->query("
DELETE FROM ". BB_POLL_USERS ."
WHERE topic_id BETWEEN $start_id AND $end_id
AND vote_dt < DATE_SUB(NOW(), INTERVAL $poll_max_days DAY)
");
if ($end_id > $finish_id)
{
break;
}
if (!($start_id % ($per_cycle*10)))
{
sleep(1);
}
$start_id += $per_cycle;
}
}
// Чистка user_newpasswd
DB()->query("UPDATE ". BB_USERS ." SET user_newpasswd = '' WHERE user_lastvisit < ". (TIMENOW - 7*86400));
// Чистка кеша постов
if ($posts_days = intval($bb_cfg['posts_cache_days_keep'])) if ($posts_days = intval($bb_cfg['posts_cache_days_keep']))
{ {
DB()->query("DELETE FROM ". BB_POSTS_HTML ." WHERE post_html_time < DATE_SUB(NOW(), INTERVAL $posts_days DAY)"); DB()->query("DELETE FROM ". BB_POSTS_HTML ." WHERE post_html_time < DATE_SUB(NOW(), INTERVAL $posts_days DAY)");

View file

@ -3,11 +3,12 @@
if (!defined('BB_ROOT')) die(basename(__FILE__)); if (!defined('BB_ROOT')) die(basename(__FILE__));
$gc_cache = array( $gc_cache = array(
'tr_cache',
'bb_cache', 'bb_cache',
'tr_cache',
'session_cache', 'session_cache',
'bb_login_err',
'bb_cap_sid', 'bb_cap_sid',
'bb_login_err',
'bb_poll_data',
); );
foreach ($gc_cache as $cache_name) foreach ($gc_cache as $cache_name)
@ -15,6 +16,6 @@ foreach ($gc_cache as $cache_name)
if (method_exists(CACHE($cache_name), 'gc')) if (method_exists(CACHE($cache_name), 'gc'))
{ {
$changes = CACHE($cache_name)->gc(); $changes = CACHE($cache_name)->gc();
$cron_runtime_log = date('Y-m-d H:i:s') ." -- tr -- $changes rows deleted\n"; $cron_runtime_log .= date('Y-m-d H:i:s') ." -- ". str_pad("$cache_name ", 25, '-', STR_PAD_RIGHT) ." del: $changes\n";
} }
} }

View file

@ -100,11 +100,11 @@ class emailer
{ {
$tpl_file = LANG_ROOT_DIR ."lang_$template_lang/email/$template_file.tpl"; $tpl_file = LANG_ROOT_DIR ."lang_$template_lang/email/$template_file.tpl";
if (!@file_exists(@phpbb_realpath($tpl_file))) if (!@file_exists(@bb_realpath($tpl_file)))
{ {
$tpl_file = LANG_ROOT_DIR ."lang_{$bb_cfg['default_lang']}/email/$template_file.tpl"; $tpl_file = LANG_ROOT_DIR ."lang_{$bb_cfg['default_lang']}/email/$template_file.tpl";
if (!@file_exists(@phpbb_realpath($tpl_file))) if (!@file_exists(@bb_realpath($tpl_file)))
{ {
message_die(GENERAL_ERROR, 'Could not find email template file :: ' . $template_file, '', __LINE__, __FILE__); message_die(GENERAL_ERROR, 'Could not find email template file :: ' . $template_file, '', __LINE__, __FILE__);
} }

View file

@ -188,7 +188,7 @@ class ads_common
// //
define('AUTH_LIST_ALL', 0); define('AUTH_LIST_ALL', 0);
// forum's ACL types (phpbb_forums: auth_view, auth_read... values) // forum's ACL types (bb_forums: auth_view, auth_read... values)
define('AUTH_REG', 1); define('AUTH_REG', 1);
define('AUTH_ACL', 2); define('AUTH_ACL', 2);
define('AUTH_ADMIN', 5); define('AUTH_ADMIN', 5);
@ -1344,13 +1344,13 @@ function get_db_stat($mode)
function clean_username($username) function clean_username($username)
{ {
$username = mb_substr(htmlspecialchars(str_replace("\'", "'", trim($username))), 0, 25, 'UTF-8'); $username = mb_substr(htmlspecialchars(str_replace("\'", "'", trim($username))), 0, 25, 'UTF-8');
$username = phpbb_rtrim($username, "\\"); $username = bb_rtrim($username, "\\");
$username = str_replace("'", "\'", $username); $username = str_replace("'", "\'", $username);
return $username; return $username;
} }
function phpbb_ltrim($str, $charlist = false) function bb_ltrim($str, $charlist = false)
{ {
if ($charlist === false) if ($charlist === false)
{ {
@ -1362,7 +1362,7 @@ function phpbb_ltrim($str, $charlist = false)
return $str; return $str;
} }
function phpbb_rtrim($str, $charlist = false) function bb_rtrim($str, $charlist = false)
{ {
if ($charlist === false) if ($charlist === false)
{ {
@ -1804,7 +1804,7 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add
// This does exactly what preg_quote() does in PHP 4-ish // This does exactly what preg_quote() does in PHP 4-ish
// If you just need the 1-parameter preg_quote call, then don't bother using this. // If you just need the 1-parameter preg_quote call, then don't bother using this.
// //
function phpbb_preg_quote($str, $delimiter) function bb_preg_quote($str, $delimiter)
{ {
$text = preg_quote($str); $text = preg_quote($str);
$text = str_replace($delimiter, '\\' . $delimiter, $text); $text = str_replace($delimiter, '\\' . $delimiter, $text);
@ -1928,7 +1928,7 @@ function message_die ($msg_code, $msg_text = '', $msg_title = '', $err_line = ''
// Critical errors mean we cannot rely on _ANY_ DB information being // Critical errors mean we cannot rely on _ANY_ DB information being
// available so we're going to dump out a simple echo'd statement // available so we're going to dump out a simple echo'd statement
if (!$msg_text) $msg_text = $lang['A_CRITICAL_ERROR']; if (!$msg_text) $msg_text = $lang['A_CRITICAL_ERROR'];
if (!$msg_title) $msg_title = 'phpBB : <b>Critical Error</b>'; if (!$msg_title) $msg_title = 'BB : <b>Critical Error</b>';
break; break;
} }
// Add on DEBUG info if we've enabled debug mode and this is an error. This // Add on DEBUG info if we've enabled debug mode and this is an error. This
@ -1981,7 +1981,7 @@ function bb_simple_die ($txt)
die($txt); die($txt);
} }
function phpbb_realpath($path) function bb_realpath($path)
{ {
return (!@function_exists('realpath') || !@realpath(INC_DIR . 'functions.php')) ? $path : @realpath($path); return (!@function_exists('realpath') || !@realpath(INC_DIR . 'functions.php')) ? $path : @realpath($path);
} }

View file

@ -78,7 +78,7 @@ function report_modules_inactive($mode = 'all', $module = null)
while ($file = @readdir($dir)) while ($file = @readdir($dir))
{ {
if (!preg_match('#(.*)\.' . phpbb_preg_quote('php', '#') . '$#', $file, $matches)) if (!preg_match('#(.*)\.' . bb_preg_quote('php', '#') . '$#', $file, $matches))
{ {
continue; continue;
} }

View file

@ -15,7 +15,7 @@ function language_select ($default, $select_name = "language", $dirname="languag
$lang = array(); $lang = array();
while ( $file = readdir($dir) ) while ( $file = readdir($dir) )
{ {
if (preg_match('#^lang_#i', $file) && !is_file(@phpbb_realpath(BB_ROOT . $dirname . '/' . $file)) && !is_link(@phpbb_realpath(BB_ROOT . $dirname . '/' . $file))) if (preg_match('#^lang_#i', $file) && !is_file(@bb_realpath(BB_ROOT . $dirname . '/' . $file)) && !is_link(@bb_realpath(BB_ROOT . $dirname . '/' . $file)))
{ {
$filename = trim(str_replace("lang_", "", $file)); $filename = trim(str_replace("lang_", "", $file));
$displayname = preg_replace("/^(.*?)_(.*)$/", "\\1 [ \\2 ]", $filename); $displayname = preg_replace("/^(.*?)_(.*)$/", "\\1 [ \\2 ]", $filename);

View file

@ -9,7 +9,6 @@ if (!empty($template))
$template->assign_vars(array( $template->assign_vars(array(
'SIMPLE_FOOTER' => !empty($gen_simple_header), 'SIMPLE_FOOTER' => !empty($gen_simple_header),
'POWERED' => base64_decode($lang['POWERED']), 'POWERED' => base64_decode($lang['POWERED']),
'TRANSLATION_INFO' => isset($lang['TRANSLATION_INFO']) ? $lang['TRANSLATION_INFO'] : '',
'SHOW_ADMIN_LINK' => (IS_ADMIN && !defined('IN_ADMIN')), 'SHOW_ADMIN_LINK' => (IS_ADMIN && !defined('IN_ADMIN')),
'ADMIN_LINK_HREF' => "admin/index.php", 'ADMIN_LINK_HREF' => "admin/index.php",

View file

@ -1,32 +1,4 @@
<?php <?php
/***************************************************************************
* sql_parse.php
* -------------------
* begin : Thu May 31, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: sql_parse.php,v 1.8 2002/03/18 23:53:12 psotfx Exp $
*
****************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
/***************************************************************************
*
* These functions are mainly for use in the db_utilities under the admin
* however in order to make these functions available elsewhere, specifically
* in the installation phase of phpBB I have seperated out a couple of
* functions into this file. JLH
*
\***************************************************************************/
if (!defined('BB_ROOT')) die(basename(__FILE__)); if (!defined('BB_ROOT')) die(basename(__FILE__));

View file

@ -9,13 +9,6 @@
* *
*/ */
/**
* Original authors: Nathan Codding of the phpBB group, CyberAlien
* The interface was originally inspired by PHPLib templates
* IF, ELSEIF, ENDIF tags are backported from phpBB 2.2
* Thanks to DMaJ007 for idea on how to include some extra tags.
*/
if (!defined('BB_ROOT')) if (!defined('BB_ROOT'))
{ {
die(basename(__FILE__)); die(basename(__FILE__));
@ -569,7 +562,7 @@ class Template
$code = file_get_contents($filename); $code = file_get_contents($filename);
} }
// Replace phpBB 2.2 <!-- (END)PHP --> tags // Replace <!-- (END)PHP --> tags
$search = array('<!-- PHP -->', '<!-- ENDPHP -->'); $search = array('<!-- PHP -->', '<!-- ENDPHP -->');
$replace = array('<'.'?php ', ' ?'.'>'); $replace = array('<'.'?php ', ' ?'.'>');
$code = str_replace($search, $replace, $code); $code = str_replace($search, $replace, $code);

View file

@ -39,7 +39,7 @@ function user_avatar_delete ($avatar_type, $avatar_file)
$avatar_file = basename($avatar_file); $avatar_file = basename($avatar_file);
if ( $avatar_type == USER_AVATAR_UPLOAD && $avatar_file != '' ) if ( $avatar_type == USER_AVATAR_UPLOAD && $avatar_file != '' )
{ {
if ( @file_exists(@phpbb_realpath('./' . $bb_cfg['avatar_path'] . '/' . $avatar_file)) ) if ( @file_exists(@bb_realpath('./' . $bb_cfg['avatar_path'] . '/' . $avatar_file)) )
{ {
@unlink('./' . $bb_cfg['avatar_path'] . '/' . $avatar_file); @unlink('./' . $bb_cfg['avatar_path'] . '/' . $avatar_file);
} }
@ -52,8 +52,8 @@ function user_avatar_gallery ($mode, &$errors, $avatar_filename, $avatar_categor
{ {
global $bb_cfg; global $bb_cfg;
$avatar_filename = phpbb_ltrim(basename($avatar_filename), "'"); $avatar_filename = bb_ltrim(basename($avatar_filename), "'");
$avatar_category = phpbb_ltrim(basename($avatar_category), "'"); $avatar_category = bb_ltrim(basename($avatar_category), "'");
if(!preg_match('/(\.gif$|\.png$|\.jpg|\.jpeg)$/is', $avatar_filename)) if(!preg_match('/(\.gif$|\.png$|\.jpg|\.jpeg)$/is', $avatar_filename))
{ {
@ -64,7 +64,7 @@ function user_avatar_gallery ($mode, &$errors, $avatar_filename, $avatar_categor
return ''; return '';
} }
if ( file_exists(@phpbb_realpath($bb_cfg['avatar_gallery_path'] . '/' . $avatar_category . '/' . $avatar_filename)) && ($mode == 'editprofile') ) if ( file_exists(@bb_realpath($bb_cfg['avatar_gallery_path'] . '/' . $avatar_category . '/' . $avatar_filename)) && ($mode == 'editprofile') )
{ {
return array('user_avatar' => DB()->escape($avatar_category . '/' . $avatar_filename), 'user_avatar_type' => USER_AVATAR_GALLERY); return array('user_avatar' => DB()->escape($avatar_category . '/' . $avatar_filename), 'user_avatar_type' => USER_AVATAR_GALLERY);
} }
@ -83,7 +83,7 @@ function user_avatar_upload ($mode, $avatar_mode, &$current_avatar, &$current_ty
$width = $height = 0; $width = $height = 0;
$type = ''; $type = '';
if ( ( file_exists(@phpbb_realpath($avatar_filename)) ) && preg_match('/\.(jpg|jpeg|gif|png)$/i', $avatar_realname) ) if ( ( file_exists(@bb_realpath($avatar_filename)) ) && preg_match('/\.(jpg|jpeg|gif|png)$/i', $avatar_realname) )
{ {
if ( $avatar_filesize <= $bb_cfg['avatar_filesize'] && $avatar_filesize > 0 ) if ( $avatar_filesize <= $bb_cfg['avatar_filesize'] && $avatar_filesize > 0 )
{ {

View file

@ -152,12 +152,12 @@ switch ($mode)
{ {
$template->assign_block_vars('switch_avatar_block', array()); $template->assign_block_vars('switch_avatar_block', array());
if ($bb_cfg['allow_avatar_upload'] && file_exists(@phpbb_realpath('./' . $bb_cfg['avatar_path']))) if ($bb_cfg['allow_avatar_upload'] && file_exists(@bb_realpath('./' . $bb_cfg['avatar_path'])))
{ {
$template->assign_block_vars('switch_avatar_block.switch_avatar_local_upload', array()); $template->assign_block_vars('switch_avatar_block.switch_avatar_local_upload', array());
} }
if ($bb_cfg['allow_avatar_local'] && file_exists(@phpbb_realpath('./' . $bb_cfg['avatar_gallery_path']))) if ($bb_cfg['allow_avatar_local'] && file_exists(@bb_realpath('./' . $bb_cfg['avatar_gallery_path'])))
{ {
$template->assign_block_vars('switch_avatar_block.switch_avatar_local_gallery', array()); $template->assign_block_vars('switch_avatar_block.switch_avatar_local_gallery', array());
} }

View file

@ -2,7 +2,6 @@
setlocale(LC_ALL, 'eu_US.UTF-8'); setlocale(LC_ALL, 'eu_US.UTF-8');
$lang['CONTENT_ENCODING'] = 'UTF-8'; $lang['CONTENT_ENCODING'] = 'UTF-8';
$lang['TRANSLATION_INFO'] = '';
// //
// Common, these terms are used // Common, these terms are used
@ -95,6 +94,7 @@ $lang['CLICK_RETURN_GROUP'] = 'Click %sHere%s to return to group information';
$lang['ADMIN_PANEL'] = 'Go to Administration Panel'; $lang['ADMIN_PANEL'] = 'Go to Administration Panel';
$lang['ALL_CACHE'] = 'All cache'; $lang['ALL_CACHE'] = 'All cache';
$lang['ALL_CACHE_CLEARED'] = 'Cache has been cleared'; $lang['ALL_CACHE_CLEARED'] = 'Cache has been cleared';
$lang['ALL_TEMPLATE_CLEARED'] = 'Template cache has been cleared';
$lang['DATASTORE'] = 'Datastore'; $lang['DATASTORE'] = 'Datastore';
$lang['DATASTORE_CLEARED'] = 'Datastore has been cleared'; $lang['DATASTORE_CLEARED'] = 'Datastore has been cleared';
$lang['BOARD_DISABLE'] = 'Sorry, but this board is currently unavailable. Please try again later.'; $lang['BOARD_DISABLE'] = 'Sorry, but this board is currently unavailable. Please try again later.';

View file

@ -1,7 +1,6 @@
<?php <?php
$lang['CONTENT_ENCODING'] = 'UTF-8'; $lang['CONTENT_ENCODING'] = 'UTF-8';
$lang['TRANSLATION_INFO'] = '';
// //
// Common, these terms are used // Common, these terms are used
@ -94,6 +93,7 @@ $lang['CLICK_RETURN_GROUP'] = '%sВернуться к информации о
$lang['ADMIN_PANEL'] = 'Администраторский раздел'; $lang['ADMIN_PANEL'] = 'Администраторский раздел';
$lang['ALL_CACHE'] = 'Весь кеш'; $lang['ALL_CACHE'] = 'Весь кеш';
$lang['ALL_CACHE_CLEARED'] = 'Кеш очищен'; $lang['ALL_CACHE_CLEARED'] = 'Кеш очищен';
$lang['ALL_TEMPLATE_CLEARED'] = 'Кеш шаблона очищен';
$lang['DATASTORE'] = 'Datastore'; $lang['DATASTORE'] = 'Datastore';
$lang['DATASTORE_CLEARED'] = 'Datastore очищен'; $lang['DATASTORE_CLEARED'] = 'Datastore очищен';
$lang['BOARD_DISABLE'] = 'Извините, эти форумы отключены. Попробуйте зайти попозже'; $lang['BOARD_DISABLE'] = 'Извините, эти форумы отключены. Попробуйте зайти попозже';

View file

@ -190,7 +190,7 @@ BBCode.prototype = {
return e.returnValue = false; return e.returnValue = false;
}, },
// Available key combinations and these interpretaions for phpBB are // Available key combinations and these interpretaions for BB are
// TAB - Insert TAB char // TAB - Insert TAB char
// CTRL-TAB - Next form field (usual TAB) // CTRL-TAB - Next form field (usual TAB)
// SHIFT-ALT-PAGEUP - Add an Attachment // SHIFT-ALT-PAGEUP - Add an Attachment
@ -226,7 +226,7 @@ BBCode.prototype = {
return this._cancelEvent(e); return this._cancelEvent(e);
} }
// Hot keys (PHPbb-specific!!!). // Hot keys
var form = this.textarea.form; var form = this.textarea.form;
var submitter = null; var submitter = null;
if (e.keyCode == this.VK_PAGE_UP && e.shiftKey && !e.ctrlKey && e.altKey) if (e.keyCode == this.VK_PAGE_UP && e.shiftKey && !e.ctrlKey && e.altKey)
@ -294,7 +294,6 @@ BBCode.prototype = {
if (text.indexOf("\n") >= 0) text = "\n" + text + "\n"; if (text.indexOf("\n") >= 0) text = "\n" + text + "\n";
return text; return text;
} }
} }
// Emulation of innerText for Mozilla. // Emulation of innerText for Mozilla.
@ -441,5 +440,4 @@ function transliterate (msg, e)
if (e) e.disabled = false; if (e) e.disabled = false;
}, 1); }, 1);
} }
// Translit END
// Translit END

View file

@ -23,7 +23,7 @@
</tr> </tr>
<tr> <tr>
<td>{L_GROUP_MODERATOR}:</td> <td>{L_GROUP_MODERATOR}:</td>
<td><input class="post" type="text" class="post" name="username" maxlength="50" size="20" value="{GROUP_MODERATOR}" /> &nbsp; <input type="submit" name="usersubmit" value="{L_FIND_USERNAME}" class="liteoption" onClick="window.open('{U_SEARCH_USER}', '_phpbbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /></td> <td><input class="post" type="text" class="post" name="username" maxlength="50" size="20" value="{GROUP_MODERATOR}" /> &nbsp; <input type="submit" name="usersubmit" value="{L_FIND_USERNAME}" class="liteoption" onClick="window.open('{U_SEARCH_USER}', '_bbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /></td>
</tr> </tr>
<tr> <tr>
<td>{L_GROUP_STATUS}:</td> <td>{L_GROUP_STATUS}:</td>

View file

@ -284,7 +284,7 @@ function mark_changed (f_id, acl_id)
<td class="row1 tCenter pad_8"> <td class="row1 tCenter pad_8">
<p class="mrg_12"> <p class="mrg_12">
<input type="text" class="post" name="username" maxlength="50" size="20" /> <input type="text" class="post" name="username" maxlength="50" size="20" />
<input type="button" name="usersubmit" value="{L_FIND_USERNAME}" onclick="window.open('{U_SEARCH_USER}', '_phpbbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /> <input type="button" name="usersubmit" value="{L_FIND_USERNAME}" onclick="window.open('{U_SEARCH_USER}', '_bbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" />
</p> </p>
<p class="mrg_12"> <p class="mrg_12">
<input type="submit" name="submituser" value="{L_LOOK_UP_USER}" class="bold" /> <input type="submit" name="submituser" value="{L_LOOK_UP_USER}" class="bold" />

View file

@ -12,7 +12,7 @@
</tr> </tr>
<tr> <tr>
<td class="row1">{L_USERNAME}:</td> <td class="row1">{L_USERNAME}:</td>
<td class="row2"><input class="post" type="text" class="post" name="username" maxlength="50" size="20" /> <input type="hidden" name="mode" value="edit" />{S_HIDDEN_FIELDS} <input type="submit" name="usersubmit" value="{L_FIND_USERNAME}" class="liteoption" onClick="window.open('{U_SEARCH_USER}', '_phpbbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /></td> <td class="row2"><input class="post" type="text" class="post" name="username" maxlength="50" size="20" /> <input type="hidden" name="mode" value="edit" />{S_HIDDEN_FIELDS} <input type="submit" name="usersubmit" value="{L_FIND_USERNAME}" class="liteoption" onClick="window.open('{U_SEARCH_USER}', '_bbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /></td>
</tr> </tr>
<tr> <tr>
<th colspan="2">{L_UNBAN_USERNAME}</th> <th colspan="2">{L_UNBAN_USERNAME}</th>

View file

@ -10,16 +10,9 @@
</head> </head>
<frameset cols="220,*" rows="*" border="1" framespacing="1" frameborder="yes"> <frameset cols="220,*" rows="*" border="1" framespacing="1" frameborder="yes">
<frame src="{S_FRAME_NAV}" name="nav" marginwidth="0" marginheight="0" scrolling="auto"> <frame src="index.php?pane=left" name="nav" marginwidth="0" marginheight="0" scrolling="auto">
<frame src="{S_FRAME_MAIN}" name="main" marginwidth="0" marginheight="0" scrolling="auto"> <frame src="index.php?pane=right" name="main" marginwidth="0" marginheight="0" scrolling="auto">
</frameset> </frameset>
<noframes>
<body bgcolor="#FFFFFF" text="#000000">
<p>Sorry, your browser doesn't seem to support frames</p>
</body>
</noframes>
</html> </html>
<!--========================================================================--> <!--========================================================================-->
<!-- ENDIF / TPL_ADMIN_FRAMESET --> <!-- ENDIF / TPL_ADMIN_FRAMESET -->
@ -62,18 +55,21 @@ table.forumline { margin: 0 auto; }
<!-- IF TPL_ADMIN_MAIN --> <!-- IF TPL_ADMIN_MAIN -->
<!--========================================================================--> <!--========================================================================-->
<script type="text/javascript"> <script type="text/javascript">
ajax.manage_user = function(mode) { ajax.manage_admin = function(mode) {
ajax.exec({ ajax.exec({
action : 'manage_user', action : 'manage_admin',
mode : mode, mode : mode,
user_id : '' user_id : ''
}); });
} }
ajax.callback.manage_user = function(data) { ajax.callback.manage_admin = function(data) {
$('#cache').html(data.cache_html); $('#cache').html(data.cache_html);
$('#datastore').html(data.datastore_html); $('#datastore').html(data.datastore_html);
$('#indexer').html(data.indexer); $('#indexer').html(data.indexer_html);
$('#template_cache').html(data.template_cache); $('#template_cache').html(data.template_cache_html);
$('#update_user_level').html(data.update_user_level_html);
$('#sync_topics').html(data.sync_topics_html);
$('#sync_user_posts').html(data.sync_user_posts_html);
} }
</script> </script>
<br /> <br />
@ -82,23 +78,23 @@ ajax.callback.manage_user = function(data) {
<tr> <tr>
<td><b>{L_CLEAR_CACHE}:</b></td> <td><b>{L_CLEAR_CACHE}:</b></td>
<td> <td>
<a href="#" id="datastore" onclick="ajax.manage_user('clear_datastore'); return false;">{L_DATASTORE}</a>,&nbsp; <a href="#" id="datastore" onclick="ajax.manage_admin('clear_datastore'); return false;">{L_DATASTORE}</a>,&nbsp;
<a href="#" id="cache" onclick="ajax.manage_user('clear_cache'); return false;">{L_ALL_CACHE}</a>,&nbsp; <a href="#" id="cache" onclick="ajax.manage_admin('clear_cache'); return false;">{L_ALL_CACHE}</a>,&nbsp;
<a href="#" id="template_cache" onclick="ajax.manage_user('clear_template_cache'); return false;">{L_TEMPLATES}</a> <a href="#" id="template_cache" onclick="ajax.manage_admin('clear_template_cache'); return false;">{L_TEMPLATES}</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td><b>{L_UPDATE}:</b></td> <td><b>{L_UPDATE}:</b></td>
<td> <td>
<a href="{U_UPDATE_USER_LEVEL}">{L_USER_LEVELS}</a> <a href="#" id="update_user_level" onclick="ajax.manage_admin('update_user_level'); return false;">{L_USER_LEVELS}</a>
<!-- IF $bb_cfg['search_engine_type'] == "sphinx" -->,&nbsp;<a href="#" id="indexer" onclick="ajax.manage_user('indexer'); return false;">{L_INDEXER}</a><!-- ENDIF --> <!-- IF $bb_cfg['search_engine_type'] == "sphinx" -->,&nbsp;<a href="#" id="indexer" onclick="ajax.manage_admin('indexer'); return false;">{L_INDEXER}</a><!-- ENDIF -->
</td> </td>
</tr> </tr>
<tr> <tr>
<td><b>{L_SYNCHRONIZE}:</b></td> <td><b>{L_SYNCHRONIZE}:</b></td>
<td> <td>
<a href="{U_SYNC_TOPICS}">{L_TOPICS}</a>,&nbsp; <a href="#" id="sync_topics" onclick="ajax.manage_admin('sync_topics'); return false;">{L_TOPICS}</a>,&nbsp;
<a href="{U_SYNC_USER_POSTS}">{L_USER_POSTS_COUNT}</a> <a href="#" id="sync_user_posts" onclick="ajax.manage_admin('sync_user_posts'); return false;">{L_USER_POSTS_COUNT}</a>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -116,13 +112,15 @@ ajax.callback.manage_user = function(data) {
</tr> </tr>
<tr> <tr>
<td class="row1" nowrap="nowrap" width="25%">{L_TP_VERSION}:</td> <td class="row1" nowrap="nowrap" width="25%">{L_TP_VERSION}:</td>
<td class="row2"><b>{$bb_cfg['tp_version']} ({$bb_cfg['tp_release_state']})</b></td> <td class="row2"><b>{$bb_cfg['tp_version']} [{$bb_cfg['tp_release_state']}]</b></td>
</tr> </tr>
<tr> <tr>
<td class="row1" nowrap="nowrap" width="25%">{L_TP_RELEASE_DATE}:</td> <td class="row1" nowrap="nowrap" width="25%">{L_TP_RELEASE_DATE}:</td>
<td class="row2"><b>{$bb_cfg['tp_release_date']}</b></td> <td class="row2"><b>{$bb_cfg['tp_release_date']}</b></td>
</tr> </tr>
</table> </table>
<br />
<h3>{L_FORUM_STATS}</h3> <h3>{L_FORUM_STATS}</h3>
<table class="forumline"> <table class="forumline">
@ -163,6 +161,7 @@ ajax.callback.manage_user = function(data) {
<td class="row2"><b>{GZIP_COMPRESSION}</b></td> <td class="row2"><b>{GZIP_COMPRESSION}</b></td>
</tr> </tr>
</table> </table>
<br />
<a name="online"></a> <a name="online"></a>
<h3>{L_WHOSONLINE}</h3> <h3>{L_WHOSONLINE}</h3>
@ -197,5 +196,4 @@ ajax.callback.manage_user = function(data) {
<!-- ENDIF --> <!-- ENDIF -->
<!--========================================================================--> <!--========================================================================-->
<!-- ENDIF / TPL_ADMIN_MAIN --> <!-- ENDIF / TPL_ADMIN_MAIN -->

View file

@ -171,7 +171,7 @@
<p id="add_group_member" class="floatL"> <p id="add_group_member" class="floatL">
<input type="text" name="username" maxlength="50" size="20" /> <input type="text" name="username" maxlength="50" size="20" />
<input type="submit" name="add" value="{L_ADD_MEMBER}" class="mainoption" /> <input type="submit" name="add" value="{L_ADD_MEMBER}" class="mainoption" />
<input type="button" name="usersubmit" value="{L_FIND_USERNAME}" class="liteoption" onclick="window.open('{U_SEARCH_USER}', '_phpbbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /> <input type="button" name="usersubmit" value="{L_FIND_USERNAME}" class="liteoption" onclick="window.open('{U_SEARCH_USER}', '_bbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" />
</p> </p>
<p class="floatR" style="padding-top: 1px;"> <p class="floatR" style="padding-top: 1px;">
<input type="submit" name="remove" value="{L_REMOVE_SELECTED}" class="mainoption" onclick="return confirm('{L_REMOVE_SELECTED}?');" /> <input type="submit" name="remove" value="{L_REMOVE_SELECTED}" class="mainoption" onclick="return confirm('{L_REMOVE_SELECTED}?');" />

View file

@ -79,7 +79,7 @@
<td><b>{L_USERNAME}</b></td> <td><b>{L_USERNAME}</b></td>
<td> <td>
<input type="text" name="username" size="25" maxlength="25" tabindex="1" value="{USERNAME}" />&nbsp; <input type="text" name="username" size="25" maxlength="25" tabindex="1" value="{USERNAME}" />&nbsp;
<input type="submit" name="usersubmit" class="lite" value="{L_FIND_USERNAME}" onclick="window.open('{U_SEARCH_USER}', '_phpbbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /> <input type="submit" name="usersubmit" class="lite" value="{L_FIND_USERNAME}" onclick="window.open('{U_SEARCH_USER}', '_bbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" />
</td> </td>
</tr> </tr>
<!-- ENDIF --> <!-- ENDIF -->
@ -105,7 +105,7 @@
<!-- END smilies_row --> <!-- END smilies_row -->
<!-- BEGIN switch_smilies_extra --> <!-- BEGIN switch_smilies_extra -->
<tr> <tr>
<td colspan="{S_SMILIES_COLSPAN}"><a href="{U_MORE_SMILIES}" onclick="window.open('{U_MORE_SMILIES}', '_phpbbsmilies', 'HEIGHT=420,resizable=yes,scrollbars=yes,WIDTH=470'); return false;" target="_phpbbsmilies" class="med">{L_MORE_EMOTICONS}</a></td> <td colspan="{S_SMILIES_COLSPAN}"><a href="{U_MORE_SMILIES}" onclick="window.open('{U_MORE_SMILIES}', '_bbsmilies', 'HEIGHT=420,resizable=yes,scrollbars=yes,WIDTH=470'); return false;" target="_bbsmilies" class="med">{L_MORE_EMOTICONS}</a></td>
</tr> </tr>
<!-- END switch_smilies_extra --> <!-- END switch_smilies_extra -->
</table><!--/smilies--> </table><!--/smilies-->

View file

@ -29,7 +29,7 @@
<div> <div>
<p class="input"> <p class="input">
<input style="width: 50%" id="author" type="text" class="post" name="{POSTER_NAME_KEY}" />&nbsp; <input style="width: 50%" id="author" type="text" class="post" name="{POSTER_NAME_KEY}" />&nbsp;
<input style="width: 40%" type="button" value="{L_FIND_USERNAME}" onclick="window.open('{U_SEARCH_USER}', '_phpbbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400'); return false;" /> <input style="width: 40%" type="button" value="{L_FIND_USERNAME}" onclick="window.open('{U_SEARCH_USER}', '_bbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400'); return false;" />
</p> </p>
<p class="chbox med"> <p class="chbox med">
<label> <label>

View file

@ -281,7 +281,7 @@ $(function(){
<fieldset> <fieldset>
<legend>{L_AUTHOR}</legend> <legend>{L_AUTHOR}</legend>
<div> <div>
<p class="input"><input style="width: 40%" <!-- IF POSTER_ERROR -->style="color: red"<!-- ELSE --> class="post"<!-- ENDIF --> type="text" size="16" maxlength="{POSTER_NAME_MAX}" name="{POSTER_NAME_NAME}" value="{POSTER_NAME_VAL}" /> <input style="width: 40%;" type="button" value="{L_FIND_USERNAME}" onclick="window.open('{U_SEARCH_USER}', '_phpbbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400'); return false;" /></p> <p class="input"><input style="width: 40%" <!-- IF POSTER_ERROR -->style="color: red"<!-- ELSE --> class="post"<!-- ENDIF --> type="text" size="16" maxlength="{POSTER_NAME_MAX}" name="{POSTER_NAME_NAME}" value="{POSTER_NAME_VAL}" /> <input style="width: 40%;" type="button" value="{L_FIND_USERNAME}" onclick="window.open('{U_SEARCH_USER}', '_bbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400'); return false;" /></p>
</div> </div>
</fieldset> </fieldset>
<fieldset> <fieldset>