mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 13:24:01 -07:00
r247
размер всех бд и дата старта вашего проекта git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@247 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
cab12f92c3
commit
0e7be4e7ae
23 changed files with 74 additions and 80 deletions
|
@ -201,7 +201,7 @@ if ($mode == 'submit' || $mode == 'refresh')
|
||||||
'search_words' => add_search_words($row['post_id'], stripslashes($row['post_text']), stripslashes($row['post_subject']), true),
|
'search_words' => add_search_words($row['post_id'], stripslashes($row['post_text']), stripslashes($row['post_subject']), true),
|
||||||
);
|
);
|
||||||
|
|
||||||
$timer_expired = (time() > $expire_time);
|
$timer_expired = (TIMENOW > $expire_time);
|
||||||
$num_rows++;
|
$num_rows++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ if ($mode == 'submit' || $mode == 'refresh')
|
||||||
}
|
}
|
||||||
|
|
||||||
// find how much time the last cycle took
|
// find how much time the last cycle took
|
||||||
$last_cycle_time = intval(time() - $start_time);
|
$last_cycle_time = intval(TIMENOW - $start_time);
|
||||||
|
|
||||||
// check if we had any data
|
// check if we had any data
|
||||||
if ($num_rows != 0)
|
if ($num_rows != 0)
|
||||||
|
@ -222,7 +222,7 @@ if ($mode == 'submit' || $mode == 'refresh')
|
||||||
// insert a new session entry
|
// insert a new session entry
|
||||||
$args = DB()->build_array('INSERT', array(
|
$args = DB()->build_array('INSERT', array(
|
||||||
'end_post_id' => (int) $end_post_id,
|
'end_post_id' => (int) $end_post_id,
|
||||||
'end_time' => (int) time(),
|
'end_time' => (int) TIMENOW,
|
||||||
'last_cycle_time' => (int) $last_cycle_time,
|
'last_cycle_time' => (int) $last_cycle_time,
|
||||||
'session_time' => (int) $last_cycle_time,
|
'session_time' => (int) $last_cycle_time,
|
||||||
'session_posts' => (int) $num_rows,
|
'session_posts' => (int) $num_rows,
|
||||||
|
@ -240,7 +240,7 @@ if ($mode == 'submit' || $mode == 'refresh')
|
||||||
DB()->query("
|
DB()->query("
|
||||||
UPDATE ". BB_SEARCH_REBUILD ." SET
|
UPDATE ". BB_SEARCH_REBUILD ." SET
|
||||||
end_post_id = $end_post_id,
|
end_post_id = $end_post_id,
|
||||||
end_time = ". time() .",
|
end_time = ". TIMENOW .",
|
||||||
last_cycle_time = $last_cycle_time,
|
last_cycle_time = $last_cycle_time,
|
||||||
session_time = session_time + $last_cycle_time,
|
session_time = session_time + $last_cycle_time,
|
||||||
session_posts = session_posts + $num_rows,
|
session_posts = session_posts + $num_rows,
|
||||||
|
@ -255,7 +255,7 @@ if ($mode == 'submit' || $mode == 'refresh')
|
||||||
$template->assign_vars(array('TPL_REBUILD_SEARCH_PROGRESS' => true));
|
$template->assign_vars(array('TPL_REBUILD_SEARCH_PROGRESS' => true));
|
||||||
|
|
||||||
$processing_messages = '';
|
$processing_messages = '';
|
||||||
$processing_messages .= ($timer_expired) ? sprintf($lang['TIMER_EXPIRED'], time() - $start_time) : '';
|
$processing_messages .= ($timer_expired) ? sprintf($lang['TIMER_EXPIRED'], TIMENOW - $start_time) : '';
|
||||||
$processing_messages .= ($start == 0 && $clear_search) ? $lang['CLEARED_SEARCH_TABLES'] : '';
|
$processing_messages .= ($start == 0 && $clear_search) ? $lang['CLEARED_SEARCH_TABLES'] : '';
|
||||||
|
|
||||||
// check if we have reached the end of our post processing
|
// check if we have reached the end of our post processing
|
||||||
|
@ -350,7 +350,7 @@ if ($mode == 'submit' || $mode == 'refresh')
|
||||||
'TOTAL_DETAILS' => sprintf($lang['PROCESS_DETAILS'], $total_posts_processed - $num_rows + 1, $total_posts_processed, $total_posts),
|
'TOTAL_DETAILS' => sprintf($lang['PROCESS_DETAILS'], $total_posts_processed - $num_rows + 1, $total_posts_processed, $total_posts),
|
||||||
'TOTAL_PERCENT' => sprintf($lang['PERCENT_COMPLETED'], round($total_percent, 2)),
|
'TOTAL_PERCENT' => sprintf($lang['PERCENT_COMPLETED'], round($total_percent, 2)),
|
||||||
|
|
||||||
'LAST_CYCLE_TIME' => delta_time(time()),
|
'LAST_CYCLE_TIME' => delta_time(TIMENOW),
|
||||||
'SESSION_TIME' => delta_time($last_session_data['start_time']),
|
'SESSION_TIME' => delta_time($last_session_data['start_time']),
|
||||||
'SESSION_AVERAGE_CYCLE_TIME'=> delta_time($session_average_cycle_time, 0),
|
'SESSION_AVERAGE_CYCLE_TIME'=> delta_time($session_average_cycle_time, 0),
|
||||||
'SESSION_ESTIMATED_TIME' => delta_time($session_estimated_time, 0),
|
'SESSION_ESTIMATED_TIME' => delta_time($session_estimated_time, 0),
|
||||||
|
@ -399,7 +399,7 @@ else // show the input page
|
||||||
{
|
{
|
||||||
$last_saved_processing = sprintf($lang['INFO_PROCESSING_ABORTED'], $last_saved_post_id, $total_posts_processed, $last_saved_date);
|
$last_saved_processing = sprintf($lang['INFO_PROCESSING_ABORTED'], $last_saved_post_id, $total_posts_processed, $last_saved_date);
|
||||||
// check if the interrupted cycle has finished
|
// check if the interrupted cycle has finished
|
||||||
if ( time() - $last_session_data['end_time'] < $last_session_data['last_cycle_time'] )
|
if ( TIMENOW - $last_session_data['end_time'] < $last_session_data['last_cycle_time'] )
|
||||||
{
|
{
|
||||||
$last_saved_processing .= '<br />'.$lang['INFO_PROCESSING_ABORTED_SOON'];
|
$last_saved_processing .= '<br />'.$lang['INFO_PROCESSING_ABORTED_SOON'];
|
||||||
}
|
}
|
||||||
|
|
|
@ -953,7 +953,7 @@ else
|
||||||
|
|
||||||
$base_url .= "&search_lastvisited=true&lastvisited_type=".rawurlencode(stripslashes($lastvisited_type))."&lastvisited_days=".rawurlencode($lastvisited_days);
|
$base_url .= "&search_lastvisited=true&lastvisited_type=".rawurlencode(stripslashes($lastvisited_type))."&lastvisited_days=".rawurlencode($lastvisited_days);
|
||||||
|
|
||||||
$lastvisited_seconds = ( time() - ( ( ( $lastvisited_days * 24 ) * 60 ) * 60 ) );
|
$lastvisited_seconds = ( TIMENOW - ( ( ( $lastvisited_days * 24 ) * 60 ) * 60 ) );
|
||||||
|
|
||||||
switch($lastvisited_type)
|
switch($lastvisited_type)
|
||||||
{
|
{
|
||||||
|
|
|
@ -71,7 +71,7 @@ else if( isset($_GET['pane']) && $_GET['pane'] == 'right' )
|
||||||
|
|
||||||
$start_date = bb_date($bb_cfg['board_startdate']);
|
$start_date = bb_date($bb_cfg['board_startdate']);
|
||||||
|
|
||||||
$boarddays = ( time() - $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);
|
||||||
|
@ -133,23 +133,43 @@ else if( isset($_GET['pane']) && $_GET['pane'] == 'right' )
|
||||||
// in phpMyAdmin 2.2.0
|
// in phpMyAdmin 2.2.0
|
||||||
//
|
//
|
||||||
|
|
||||||
$dbsize = $lang['NOT_AVAILABLE'];
|
$sql = "SELECT VERSION() AS mysql_version";
|
||||||
|
if($result = DB()->sql_query($sql))
|
||||||
|
{
|
||||||
|
$row = DB()->sql_fetchrow($result);
|
||||||
|
$version = $row['mysql_version'];
|
||||||
|
|
||||||
if ( is_integer($dbsize) )
|
if( preg_match("/^(3\.23|4\.|5\.)/", $version) )
|
||||||
{
|
{
|
||||||
if( $dbsize >= 1048576 )
|
$dblist = array();
|
||||||
|
foreach($bb_cfg['db'] as $name => $row)
|
||||||
|
{
$sql = "SHOW TABLE STATUS
|
||||||
|
FROM {$row[1]}";
|
||||||
|
if($result = DB()->sql_query($sql))
|
||||||
{
|
{
|
||||||
$dbsize = sprintf("%.2f MB", ( $dbsize / 1048576 ));
|
$tabledata_ary = DB()->sql_fetchrowset($result);
|
||||||
|
|
||||||
|
$dbsize = 0;
|
||||||
|
for($i = 0; $i < count($tabledata_ary); $i++)
|
||||||
|
{
|
||||||
|
if( @$tabledata_ary[$i]['Type'] != "MRG_MyISAM" )
|
||||||
|
{
|
||||||
|
$dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length'];
|
||||||
}
|
}
|
||||||
else if( $dbsize >= 1024 )
|
}
|
||||||
{
|
$dblist[] = '<span title="'. $name .'">'. humn_size($dbsize) .'</span>';
|
||||||
$dbsize = sprintf("%.2f KB", ( $dbsize / 1024 ));
|
}
}
|
||||||
|
$dbsize = implode(' | ', $dblist);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$dbsize = sprintf("%.2f Bytes", $dbsize);
|
$dbsize = $lang['Not_available'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$dbsize = $lang['Not_available'];
|
||||||
|
}
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
"NUMBER_OF_POSTS" => $total_posts,
|
"NUMBER_OF_POSTS" => $total_posts,
|
||||||
|
@ -179,7 +199,7 @@ else if( isset($_GET['pane']) && $_GET['pane'] == 'right' )
|
||||||
WHERE s.session_logged_in = 1
|
WHERE s.session_logged_in = 1
|
||||||
AND u.user_id = s.session_user_id
|
AND u.user_id = s.session_user_id
|
||||||
AND u.user_id <> " . ANONYMOUS . "
|
AND u.user_id <> " . ANONYMOUS . "
|
||||||
AND s.session_time >= " . ( time() - 300 ) . "
|
AND s.session_time >= " . ( TIMENOW - 300 ) . "
|
||||||
ORDER BY s.session_ip ASC, s.session_time DESC";
|
ORDER BY s.session_ip ASC, s.session_time DESC";
|
||||||
if(!$result = DB()->sql_query($sql))
|
if(!$result = DB()->sql_query($sql))
|
||||||
{
|
{
|
||||||
|
@ -190,7 +210,7 @@ else if( isset($_GET['pane']) && $_GET['pane'] == 'right' )
|
||||||
$sql = "SELECT session_logged_in, session_time, session_ip, session_start
|
$sql = "SELECT session_logged_in, session_time, session_ip, session_start
|
||||||
FROM " . BB_SESSIONS . "
|
FROM " . BB_SESSIONS . "
|
||||||
WHERE session_logged_in = 0
|
WHERE session_logged_in = 0
|
||||||
AND session_time >= " . ( time() - 300 ) . "
|
AND session_time >= " . ( TIMENOW - 300 ) . "
|
||||||
ORDER BY session_ip ASC, session_time DESC";
|
ORDER BY session_ip ASC, session_time DESC";
|
||||||
if(!$result = DB()->sql_query($sql))
|
if(!$result = DB()->sql_query($sql))
|
||||||
{
|
{
|
||||||
|
|
|
@ -60,7 +60,7 @@ if(isset($_POST['submit']) && !defined('DEMO_MODE'))
|
||||||
}
|
}
|
||||||
if($update_time)
|
if($update_time)
|
||||||
{
|
{
|
||||||
$bb_cfg['xs_template_time'] = time() + 10; // set time 10 seconds in future in case if some tpl file would be compiled right now with current settings
|
$bb_cfg['xs_template_time'] = TIMENOW + 10; // set time 10 seconds in future in case if some tpl file would be compiled right now with current settings
|
||||||
bb_update_config(array('xs_template_time' => $bb_cfg['xs_template_time']));
|
bb_update_config(array('xs_template_time' => $bb_cfg['xs_template_time']));
|
||||||
}
|
}
|
||||||
$template->assign_block_vars('switch_updated', array());
|
$template->assign_block_vars('switch_updated', array());
|
||||||
|
|
|
@ -69,4 +69,4 @@ if ($tor['tor_status'] != TOR_NOT_APPROVED && $tor['checked_user_id'] != $userda
|
||||||
change_tor_status($attach_id, $new_status);
|
change_tor_status($attach_id, $new_status);
|
||||||
|
|
||||||
$this->response['attach_id'] = $attach_id;
|
$this->response['attach_id'] = $attach_id;
|
||||||
$this->response['status'] = $bb_cfg['tor_icons'][$new_status] .' <b> '. $lang['TOR_STATUS_NAME'][$new_status]. '</b> · <a class="med" href='. PROFILE_URL . $userdata['user_id'] . '>' . $userdata['username'] . '</a> · <i>'. delta_time(time()) . $lang['BACK']. '</i>';
|
$this->response['status'] = $bb_cfg['tor_icons'][$new_status] .' <b> '. $lang['TOR_STATUS_NAME'][$new_status]. '</b> · <a class="med" href='. PROFILE_URL . $userdata['user_id'] . '>' . $userdata['username'] . '</a> · <i>'. delta_time(TIMENOW) . $lang['BACK']. '</i>';
|
|
@ -142,34 +142,6 @@ switch($this->request['type'])
|
||||||
$this->ajax_die(sprintf($lang['SORRY_AUTH_EDIT'], strip_tags($is_auth['auth_edit_type'])));
|
$this->ajax_die(sprintf($lang['SORRY_AUTH_EDIT'], strip_tags($is_auth['auth_edit_type'])));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Запрет на редактирование раздачи юзером
|
|
||||||
if ($post['allow_reg_tracker'] && ($post['topic_first_post_id'] == $post_id) && !IS_AM)
|
|
||||||
{
|
|
||||||
$tor_status = DB()->fetch_row("SELECT tor_status FROM ". BB_BT_TORRENTS ." WHERE topic_id = {$post['topic_id']} LIMIT 1", 'tor_status');
|
|
||||||
if ($tor_status != false)
|
|
||||||
{
|
|
||||||
// по статусу раздачи
|
|
||||||
if (isset($bb_cfg['tor_cannot_edit'][$tor_status]))
|
|
||||||
{
|
|
||||||
$this->ajax_die($lang['NOT_EDIT_TOR_STATUS'] .' - '. $lang['TOR_STATUS_NAME'][$tor_status]);
|
|
||||||
}
|
|
||||||
// проверенный, через время
|
|
||||||
if ($tor_status == TOR_APPROVED)
|
|
||||||
{
|
|
||||||
$days_after_last_edit = $bb_cfg['dis_edit_tor_after_days'];
|
|
||||||
$last_edit_time = max($post['post_time'], $post['post_edit_time']) + 86400*$days_after_last_edit;
|
|
||||||
$disallowed_by_forum_perm = in_array($post['forum_id'], $bb_cfg['dis_edit_tor_forums']);
|
|
||||||
$disallowed_by_user_opt = bf($user->opt, 'user_opt', 'allow_post_edit');
|
|
||||||
|
|
||||||
if ($last_edit_time < TIMENOW && ($disallowed_by_forum_perm || $disallowed_by_user_opt))
|
|
||||||
{
|
|
||||||
$how_msg = ($disallowed_by_user_opt) ? $lang['EDIT_POST_NOT_1'] : $lang['EDIT_POST_NOT_2'];
|
|
||||||
$this->ajax_die("$how_msg" .$lang['EDIT_POST_AJAX']. $lang['TOR_STATUS_NAME'][$tor_status] . $lang['AFTER_THE_LAPSE']. "$days_after_last_edit" . $lang['TOR_STATUS_DAYS']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$hidden_form = '<input type="hidden" name="mode" value="editpost" />';
|
$hidden_form = '<input type="hidden" name="mode" value="editpost" />';
|
||||||
$hidden_form .= '<input type="hidden" name="'. POST_POST_URL .'" value="'. $post_id .'" />';
|
$hidden_form .= '<input type="hidden" name="'. POST_POST_URL .'" value="'. $post_id .'" />';
|
||||||
$hidden_form .= '<input type="hidden" name="subject" value="'. $post['topic_title'] .'" />';
|
$hidden_form .= '<input type="hidden" name="subject" value="'. $post['topic_title'] .'" />';
|
||||||
|
@ -268,8 +240,7 @@ switch($this->request['type'])
|
||||||
$sql = "
|
$sql = "
|
||||||
SELECT pt.post_text
|
SELECT pt.post_text
|
||||||
FROM ". BB_POSTS ." p, ". BB_POSTS_TEXT ." pt
|
FROM ". BB_POSTS ." p, ". BB_POSTS_TEXT ." pt
|
||||||
WHERE
|
WHERE $where_sql
|
||||||
$where_sql
|
|
||||||
AND p.post_time = ". (int) $row['last_post_time'] ."
|
AND p.post_time = ". (int) $row['last_post_time'] ."
|
||||||
AND pt.post_id = p.post_id
|
AND pt.post_id = p.post_id
|
||||||
LIMIT 1
|
LIMIT 1
|
||||||
|
|
|
@ -338,7 +338,7 @@ function search_attachments($order_by, &$total_rows)
|
||||||
// Search Attachment Time
|
// Search Attachment Time
|
||||||
if ($search_days_greater != '')
|
if ($search_days_greater != '')
|
||||||
{
|
{
|
||||||
$where_sql[] = ' (a.filetime < ' . ( time() - ((int) $search_days_greater * 86400)) . ') ';
|
$where_sql[] = ' (a.filetime < ' . ( TIMENOW - ((int) $search_days_greater * 86400)) . ') ';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Search Forum
|
// Search Forum
|
||||||
|
|
|
@ -966,7 +966,7 @@ class attach_parent
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Prepare Values
|
// Prepare Values
|
||||||
$this->filetime = time();
|
$this->filetime = TIMENOW;
|
||||||
|
|
||||||
$this->filename = $r_file;
|
$this->filename = $r_file;
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ function tracker_exit ()
|
||||||
$sql_total_perc = round($DBS->sql_timetotal*100/$gen_time);
|
$sql_total_perc = round($DBS->sql_timetotal*100/$gen_time);
|
||||||
|
|
||||||
$str = array();
|
$str = array();
|
||||||
$str[] = substr(time(), -4, 4);
|
$str[] = substr(TIMENOW, -4, 4);
|
||||||
$str[] = sprintf('%.4f', $gen_time);
|
$str[] = sprintf('%.4f', $gen_time);
|
||||||
$str[] = sprintf('%.4f'. LOG_SEPR .'%02d%%', $DBS->sql_inittime, $sql_init_perc);
|
$str[] = sprintf('%.4f'. LOG_SEPR .'%02d%%', $DBS->sql_inittime, $sql_init_perc);
|
||||||
$str[] = sprintf('%.4f'. LOG_SEPR .'%02d%%', $DBS->sql_timetotal, $sql_total_perc);
|
$str[] = sprintf('%.4f'. LOG_SEPR .'%02d%%', $DBS->sql_timetotal, $sql_total_perc);
|
||||||
|
|
|
@ -30,7 +30,7 @@ if ($cron_jobs)
|
||||||
require(CRON_DIR .'cron_run.php');
|
require(CRON_DIR .'cron_run.php');
|
||||||
|
|
||||||
// Update cron_last_check
|
// Update cron_last_check
|
||||||
bb_update_config(array('cron_last_check' => (time() + 10)));
|
bb_update_config(array('cron_last_check' => (TIMENOW + 10)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -177,7 +177,7 @@ class emailer
|
||||||
|
|
||||||
// Build header
|
// Build header
|
||||||
//$this->extra_headers = (($this->reply_to != '') ? "Reply-to: $this->reply_to\n" : '') . (($this->from != '') ? "From: $this->from\n" : "From: " . $bb_cfg['board_email'] . "\n") . "Return-Path: " . $bb_cfg['board_email'] . "\nMessage-ID: <" . md5(uniqid(time())) . "@" . $bb_cfg['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . date('r', time()) . "\nX-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\nX-MimeOLE: Produced By phpBB2\n" . $this->extra_headers . (($cc != '') ? "Cc: $cc\n" : '') . (($bcc != '') ? "Bcc: $bcc\n" : '');
|
//$this->extra_headers = (($this->reply_to != '') ? "Reply-to: $this->reply_to\n" : '') . (($this->from != '') ? "From: $this->from\n" : "From: " . $bb_cfg['board_email'] . "\n") . "Return-Path: " . $bb_cfg['board_email'] . "\nMessage-ID: <" . md5(uniqid(time())) . "@" . $bb_cfg['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . date('r', time()) . "\nX-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\nX-MimeOLE: Produced By phpBB2\n" . $this->extra_headers . (($cc != '') ? "Cc: $cc\n" : '') . (($bcc != '') ? "Bcc: $bcc\n" : '');
|
||||||
$this->extra_headers = (($this->reply_to != '') ? "Reply-to: $this->reply_to\n" : '') . (($this->from != '') ? "From: $this->from\n" : "From: " . $bb_cfg['board_email'] . "\n") . "Return-Path: " . $bb_cfg['board_email'] . "\nMessage-ID: <" . md5(uniqid(time())) . "@" . $bb_cfg['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . date('r', time()) . "\nX-Priority: 0\nX-MSMail-Priority: Normal\nX-Mailer: Microsoft Office Outlook, Build 11.0.5510\nX-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441\nX-Sender: " . $bb_cfg['board_email'] . "\n" . $this->extra_headers . (($cc != '') ? "Cc: $cc\n" : '') . (($bcc != '') ? "Bcc: $bcc\n" : '');
|
$this->extra_headers = (($this->reply_to != '') ? "Reply-to: $this->reply_to\n" : '') . (($this->from != '') ? "From: $this->from\n" : "From: " . $bb_cfg['board_email'] . "\n") . "Return-Path: " . $bb_cfg['board_email'] . "\nMessage-ID: <" . md5(uniqid(TIMENOW)) . "@" . $bb_cfg['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . date('r', TIMENOW) . "\nX-Priority: 0\nX-MSMail-Priority: Normal\nX-Mailer: Microsoft Office Outlook, Build 11.0.5510\nX-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441\nX-Sender: " . $bb_cfg['board_email'] . "\n" . $this->extra_headers . (($cc != '') ? "Cc: $cc\n" : '') . (($bcc != '') ? "Bcc: $bcc\n" : '');
|
||||||
|
|
||||||
// Send message ... removed $this->encode() from subject for time being
|
// Send message ... removed $this->encode() from subject for time being
|
||||||
if ( $this->use_smtp )
|
if ( $this->use_smtp )
|
||||||
|
|
|
@ -108,7 +108,7 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
|
||||||
{
|
{
|
||||||
global $userdata, $post_info, $is_auth, $bb_cfg, $lang;
|
global $userdata, $post_info, $is_auth, $bb_cfg, $lang;
|
||||||
|
|
||||||
$current_time = time();
|
$current_time = TIMENOW;
|
||||||
|
|
||||||
// Flood control
|
// Flood control
|
||||||
$row = null;
|
$row = null;
|
||||||
|
@ -453,7 +453,7 @@ function user_notification($mode, &$post_data, &$topic_title, &$forum_id, &$topi
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$current_time = time();
|
$current_time = TIMENOW;
|
||||||
|
|
||||||
if ($mode != 'delete')
|
if ($mode != 'delete')
|
||||||
{
|
{
|
||||||
|
@ -633,7 +633,7 @@ function insert_post ($mode, $topic_id, $forum_id = '', $old_forum_id = '', $new
|
||||||
|
|
||||||
$post_username = $post_subject = $post_text = $poster_ip = '';
|
$post_username = $post_subject = $post_text = $poster_ip = '';
|
||||||
|
|
||||||
$post_time = $current_time = time();
|
$post_time = $current_time = TIMENOW;
|
||||||
$username = $userdata['username'];
|
$username = $userdata['username'];
|
||||||
$user_id = $userdata['user_id'];
|
$user_id = $userdata['user_id'];
|
||||||
|
|
||||||
|
|
|
@ -144,7 +144,7 @@ function report_modules($mode = 'all', $module = null)
|
||||||
$module_names[$row['report_module_name']] = $row['report_module_id'];
|
$module_names[$row['report_module_name']] = $row['report_module_id'];
|
||||||
|
|
||||||
// Delete old reports
|
// Delete old reports
|
||||||
if ($row['report_module_prune'] && $row['report_module_last_prune'] + ($row['report_module_prune'] * 3600) < time())
|
if ($row['report_module_prune'] && $row['report_module_last_prune'] + ($row['report_module_prune'] * 3600) < TIMENOW)
|
||||||
{
|
{
|
||||||
report_prune($row['report_module_id'], $row['report_module_prune'] * 86400);
|
report_prune($row['report_module_id'], $row['report_module_prune'] * 86400);
|
||||||
|
|
||||||
|
@ -997,7 +997,7 @@ function report_prune($module_id, $prune_time)
|
||||||
ON rc.report_change_id = r.report_last_change
|
ON rc.report_change_id = r.report_last_change
|
||||||
WHERE r.report_module_id = ' . (int) $module_id . '
|
WHERE r.report_module_id = ' . (int) $module_id . '
|
||||||
AND r.report_status IN(' . REPORT_CLEARED . ', ' . REPORT_DELETE . ')
|
AND r.report_status IN(' . REPORT_CLEARED . ', ' . REPORT_DELETE . ')
|
||||||
AND rc.report_change_time < ' . (time() - (int) $prune_time);
|
AND rc.report_change_time < ' . (TIMENOW - (int) $prune_time);
|
||||||
if (!$result = DB()->sql_query($sql))
|
if (!$result = DB()->sql_query($sql))
|
||||||
{
|
{
|
||||||
message_die(GENERAL_ERROR, 'Could not obtain old reports', '', __LINE__, __FILE__, $sql);
|
message_die(GENERAL_ERROR, 'Could not obtain old reports', '', __LINE__, __FILE__, $sql);
|
||||||
|
@ -1021,7 +1021,7 @@ function report_prune($module_id, $prune_time)
|
||||||
// Set last prune date
|
// Set last prune date
|
||||||
//
|
//
|
||||||
$sql = 'UPDATE ' . BB_REPORTS_MODULES . '
|
$sql = 'UPDATE ' . BB_REPORTS_MODULES . '
|
||||||
SET report_module_last_prune = ' . time() . '
|
SET report_module_last_prune = ' . TIMENOW . '
|
||||||
WHERE report_module_id = ' . (int) $module_id;
|
WHERE report_module_id = ' . (int) $module_id;
|
||||||
if (!DB()->sql_query($sql))
|
if (!DB()->sql_query($sql))
|
||||||
{
|
{
|
||||||
|
@ -1071,7 +1071,7 @@ function report_insert($module_id, $report_subject, $report_reason, $report_titl
|
||||||
//
|
//
|
||||||
$sql = 'INSERT INTO ' . BB_REPORTS . ' (user_id, report_time, report_module_id, report_status, report_reason_id,
|
$sql = 'INSERT INTO ' . BB_REPORTS . ' (user_id, report_time, report_module_id, report_status, report_reason_id,
|
||||||
report_subject, report_subject_data, report_title, report_desc)
|
report_subject, report_subject_data, report_title, report_desc)
|
||||||
VALUES (' . $userdata['user_id'] . ', ' . time() . ', ' . (int) $module_id . ', ' . REPORT_NEW . ', ' . (int) $report_reason . ',
|
VALUES (' . $userdata['user_id'] . ', ' . TIMENOW . ', ' . (int) $module_id . ', ' . REPORT_NEW . ', ' . (int) $report_reason . ',
|
||||||
' . (int) $report_subject . ", $report_subject_data_sql, '" . DB()->escape($report_title) . "',
|
' . (int) $report_subject . ", $report_subject_data_sql, '" . DB()->escape($report_title) . "',
|
||||||
'" . DB()->escape($report_desc) . "')";
|
'" . DB()->escape($report_desc) . "')";
|
||||||
if (!DB()->sql_query($sql))
|
if (!DB()->sql_query($sql))
|
||||||
|
@ -1083,7 +1083,7 @@ function report_insert($module_id, $report_subject, $report_reason, $report_titl
|
||||||
|
|
||||||
$report = array(
|
$report = array(
|
||||||
'report_id' => $report_id,
|
'report_id' => $report_id,
|
||||||
'report_time' => time(),
|
'report_time' => TIMENOW,
|
||||||
'report_module_id' => $module_id,
|
'report_module_id' => $module_id,
|
||||||
'report_reason_id' => $report_reason,
|
'report_reason_id' => $report_reason,
|
||||||
'report_subject' => $report_subject,
|
'report_subject' => $report_subject,
|
||||||
|
@ -1189,7 +1189,7 @@ function reports_update_status($report_ids, $report_status, $comment = '', $auth
|
||||||
foreach ($report_ids as $report_id)
|
foreach ($report_ids as $report_id)
|
||||||
{
|
{
|
||||||
$sql = 'INSERT INTO ' . BB_REPORTS_CHANGES . " (report_id, user_id, report_change_time, report_status, report_change_comment)
|
$sql = 'INSERT INTO ' . BB_REPORTS_CHANGES . " (report_id, user_id, report_change_time, report_status, report_change_comment)
|
||||||
VALUES($report_id, " . $userdata['user_id'] . ', ' . time() . ", $report_status, '$comment')";
|
VALUES($report_id, " . $userdata['user_id'] . ', ' . TIMENOW . ", $report_status, '$comment')";
|
||||||
if (!DB()->sql_query($sql))
|
if (!DB()->sql_query($sql))
|
||||||
{
|
{
|
||||||
message_die(GENERAL_ERROR, 'Could not insert report change', __LINE__, __FILE__, $sql);
|
message_die(GENERAL_ERROR, 'Could not insert report change', __LINE__, __FILE__, $sql);
|
||||||
|
|
|
@ -544,13 +544,16 @@ $datastore->enqueue(array(
|
||||||
'cat_forums',
|
'cat_forums',
|
||||||
));
|
));
|
||||||
|
|
||||||
|
// Дата старта вашего проэкта
|
||||||
|
if(!$bb_cfg['board_startdate']) bb_update_config(array('board_startdate' => TIMENOW));
|
||||||
|
|
||||||
// Cron
|
// Cron
|
||||||
if ((empty($_POST) && !defined('IN_ADMIN') && !defined('IN_AJAX') && !defined('IN_SERVICE') && !file_exists(CRON_RUNNING) && ($bb_cfg['cron_enabled'] || defined('START_CRON'))) || defined('FORCE_CRON'))
|
if ((empty($_POST) && !defined('IN_ADMIN') && !defined('IN_AJAX') && !defined('IN_SERVICE') && !file_exists(CRON_RUNNING) && ($bb_cfg['cron_enabled'] || defined('START_CRON'))) || defined('FORCE_CRON'))
|
||||||
{
|
{
|
||||||
if (TIMENOW - $bb_cfg['cron_last_check'] > $bb_cfg['cron_check_interval'])
|
if (TIMENOW - $bb_cfg['cron_last_check'] > $bb_cfg['cron_check_interval'])
|
||||||
{
|
{
|
||||||
// Update cron_last_check
|
// Update cron_last_check
|
||||||
bb_update_config(array('cron_last_check' => (time() + 10)));
|
bb_update_config(array('cron_last_check' => (TIMENOW + 10)));
|
||||||
|
|
||||||
define('CRON_LOG_ENABLED', true); // global ON/OFF
|
define('CRON_LOG_ENABLED', true); // global ON/OFF
|
||||||
define('CRON_FORCE_LOG', false); // always log regardless of job settings
|
define('CRON_FORCE_LOG', false); // always log regardless of job settings
|
||||||
|
|
|
@ -899,7 +899,7 @@ class Template {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$line = '<'.'?php ';
|
$line = '<'.'?php ';
|
||||||
$filehash = md5($params_str . $this->include_count . time());
|
$filehash = md5($params_str . $this->include_count . TIMENOW);
|
||||||
$line .= ' $this->set_filename(\'xs_include_' . $filehash . '\', \'' . $params_str .'\', true); ';
|
$line .= ' $this->set_filename(\'xs_include_' . $filehash . '\', \'' . $params_str .'\', true); ';
|
||||||
$line .= ' $this->pparse(\'xs_include_' . $filehash . '\'); ';
|
$line .= ' $this->pparse(\'xs_include_' . $filehash . '\'); ';
|
||||||
$line .= ' ?'.'>';
|
$line .= ' ?'.'>';
|
||||||
|
|
|
@ -10,7 +10,7 @@ if (!$profiledata['user_id'] || $profiledata['user_id'] == ANONYMOUS)
|
||||||
$seeding = $leeching = $releasing = array();
|
$seeding = $leeching = $releasing = array();
|
||||||
|
|
||||||
$profile_user_id = intval($profiledata['user_id']);
|
$profile_user_id = intval($profiledata['user_id']);
|
||||||
$current_time = (isset($_GET['time']) && $_GET['time'] == 'all') ? 0 : time();
|
$current_time = (isset($_GET['time']) && $_GET['time'] == 'all') ? 0 : TIMENOW;
|
||||||
|
|
||||||
// Get username
|
// Get username
|
||||||
if (!$username = $profiledata['username'])
|
if (!$username = $profiledata['username'])
|
||||||
|
|
|
@ -13,7 +13,7 @@ $lang['TRANSLATION_INFO'] = '';
|
||||||
$lang['FORUM'] = 'Forum';
|
$lang['FORUM'] = 'Forum';
|
||||||
$lang['CATEGORY'] = 'Category';
|
$lang['CATEGORY'] = 'Category';
|
||||||
$lang['HIDE_CAT'] = 'Hide categories';
|
$lang['HIDE_CAT'] = 'Hide categories';
|
||||||
$lang['HIDE_CAT_MESS'] = 'Part categories hidden <a class="menu-root" href="#only-new-options">options Show</a> <span class="small"> · <a class="small" href="index.php?sh=1">Show All</a>';
|
$lang['HIDE_CAT_MESS'] = 'Part categories hidden "options Show" · <a href="index.php?sh=1">Show All</a>';
|
||||||
$lang['TOPIC'] = 'Topic';
|
$lang['TOPIC'] = 'Topic';
|
||||||
$lang['TOPICS'] = 'Topics';
|
$lang['TOPICS'] = 'Topics';
|
||||||
$lang['TOPICS_SHORT'] = 'Topics';
|
$lang['TOPICS_SHORT'] = 'Topics';
|
||||||
|
|
|
@ -18,7 +18,7 @@ $lang['TRANSLATION_INFO'] = '';
|
||||||
$lang['FORUM'] = 'Форум';
|
$lang['FORUM'] = 'Форум';
|
||||||
$lang['CATEGORY'] = 'Категория';
|
$lang['CATEGORY'] = 'Категория';
|
||||||
$lang['HIDE_CAT'] = 'Скрыть категории';
|
$lang['HIDE_CAT'] = 'Скрыть категории';
|
||||||
$lang['HIDE_CAT_MESS'] = 'Часть категорий скрыта <a class="menu-root" href="#only-new-options">Опциями показа</a> <span class="small"> · <a class="small" href="index.php?sh=1">Показать все</a>';
|
$lang['HIDE_CAT_MESS'] = 'Часть категорий скрыта "Опциями показа" · <a href="index.php?sh=1">Показать все</a>';
|
||||||
$lang['TOPIC'] = 'Тема';
|
$lang['TOPIC'] = 'Тема';
|
||||||
$lang['TOPICS'] = 'Темы';
|
$lang['TOPICS'] = 'Темы';
|
||||||
$lang['TOPICS_SHORT'] = 'Тем';
|
$lang['TOPICS_SHORT'] = 'Тем';
|
||||||
|
|
|
@ -461,7 +461,7 @@ switch ($mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
$new_forum_id = intval($_POST['new_forum_id']);
|
$new_forum_id = intval($_POST['new_forum_id']);
|
||||||
$topic_time = time();
|
$topic_time = TIMENOW;
|
||||||
|
|
||||||
$sql = 'SELECT forum_id FROM ' . BB_FORUMS . '
|
$sql = 'SELECT forum_id FROM ' . BB_FORUMS . '
|
||||||
WHERE forum_id = ' . $new_forum_id;
|
WHERE forum_id = ' . $new_forum_id;
|
||||||
|
|
|
@ -913,7 +913,7 @@ else if ( $submit || $refresh || $mode != '' )
|
||||||
$db_row = DB()->sql_fetchrow($result);
|
$db_row = DB()->sql_fetchrow($result);
|
||||||
|
|
||||||
$last_post_time = $db_row['last_post_time'];
|
$last_post_time = $db_row['last_post_time'];
|
||||||
$current_time = time();
|
$current_time = TIMENOW;
|
||||||
|
|
||||||
if ( ( $current_time - $last_post_time ) < $bb_cfg['flood_interval'])
|
if ( ( $current_time - $last_post_time ) < $bb_cfg['flood_interval'])
|
||||||
{
|
{
|
||||||
|
@ -1000,7 +1000,7 @@ else if ( $submit || $refresh || $mode != '' )
|
||||||
bb_die($lang['CANNOT_SEND_PRIVMSG']);
|
bb_die($lang['CANNOT_SEND_PRIVMSG']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$msg_time = time();
|
$msg_time = TIMENOW;
|
||||||
|
|
||||||
if ( $mode != 'edit' )
|
if ( $mode != 'edit' )
|
||||||
{
|
{
|
||||||
|
@ -1518,7 +1518,7 @@ else
|
||||||
if ( $submit_msgdays && ( !empty($_POST['msgdays']) || !empty($_GET['msgdays']) ) )
|
if ( $submit_msgdays && ( !empty($_POST['msgdays']) || !empty($_GET['msgdays']) ) )
|
||||||
{
|
{
|
||||||
$msg_days = ( !empty($_POST['msgdays']) ) ? intval($_POST['msgdays']) : intval($_GET['msgdays']);
|
$msg_days = ( !empty($_POST['msgdays']) ) ? intval($_POST['msgdays']) : intval($_GET['msgdays']);
|
||||||
$min_msg_time = time() - ($msg_days * 86400);
|
$min_msg_time = TIMENOW - ($msg_days * 86400);
|
||||||
|
|
||||||
$limit_msg_time_total = " AND privmsgs_date > $min_msg_time";
|
$limit_msg_time_total = " AND privmsgs_date > $min_msg_time";
|
||||||
$limit_msg_time = " AND pm.privmsgs_date > $min_msg_time ";
|
$limit_msg_time = " AND pm.privmsgs_date > $min_msg_time ";
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
<!-- IF SHOW_FORUMS -->
|
<!-- IF SHOW_FORUMS -->
|
||||||
|
|
||||||
<!-- IF H_C_AL_MESS -->
|
<!-- IF H_C_AL_MESS -->
|
||||||
<div class="row1 med tCenter pad_4 border bw_TRBL">{L_HIDE_CAT_MESS}</span></div>
|
<div class="row1 med tCenter pad_4 border bw_TRBL">{L_HIDE_CAT_MESS}</div>
|
||||||
<div class="cat_separator"></div>
|
<div class="cat_separator"></div>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ $is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata);
|
||||||
$sql = "SELECT u.user_id, u.username, u.user_opt, u.user_rank, s.session_logged_in, s.session_time, s.session_ip
|
$sql = "SELECT u.user_id, u.username, u.user_opt, u.user_rank, s.session_logged_in, s.session_time, s.session_ip
|
||||||
FROM ".BB_USERS." u, ".BB_SESSIONS." s
|
FROM ".BB_USERS." u, ".BB_SESSIONS." s
|
||||||
WHERE u.user_id = s.session_user_id
|
WHERE u.user_id = s.session_user_id
|
||||||
AND s.session_time >= ".( time() - 300 ) . "
|
AND s.session_time >= ".( TIMENOW - 300 ) . "
|
||||||
ORDER BY u.username ASC, s.session_ip ASC";
|
ORDER BY u.username ASC, s.session_ip ASC";
|
||||||
if ( !($result = DB()->sql_query($sql)) )
|
if ( !($result = DB()->sql_query($sql)) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -666,7 +666,7 @@ if ( !empty($t_data['topic_vote']) )
|
||||||
$view_result = 0;
|
$view_result = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$poll_expired = ( $vote_info[0]['vote_length'] ) ? ( ( $vote_info[0]['vote_start'] + $vote_info[0]['vote_length'] < time() ) ? TRUE : 0 ) : 0;
|
$poll_expired = ( $vote_info[0]['vote_length'] ) ? ( ( $vote_info[0]['vote_start'] + $vote_info[0]['vote_length'] < TIMENOW ) ? TRUE : 0 ) : 0;
|
||||||
|
|
||||||
if ( $user_voted || $view_result || $poll_expired || !$is_auth['auth_vote'] || $t_data['topic_status'] == TOPIC_LOCKED )
|
if ( $user_voted || $view_result || $poll_expired || !$is_auth['auth_vote'] || $t_data['topic_status'] == TOPIC_LOCKED )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue