Changeset 300
- Timestamp:
- 02/17/10 15:41:40 (2 years ago)
- Files:
-
- admin/admin_user_ban.php (modified) (6 diffs)
- ajax.php (modified) (1 diff)
- announce.php (modified) (3 diffs)
- browse.php (modified) (1 diff)
- faq.php (modified) (5 diffs)
- include/acp/config/email_settings.php (modified) (2 diffs)
- include/bbcode/Xbb/Tags/youtube.php (modified) (1 diff)
- include/bbcode/config/tags.php (modified) (1 diff)
- include/class.cache.php (modified) (1 diff)
- include/constants.php (modified) (1 diff)
- include/details/viewnfo.php (modified) (3 diffs)
- include/functions.php (modified) (1 diff)
- include/functions_admin.php (modified) (2 diffs)
- include/functions_check.php (modified) (2 diffs)
- include/functions_post.php (modified) (4 diffs)
- include/modtask/mass_torrent_actions.php (modified) (1 diff)
- include/modtask/new_comments.php (modified) (1 diff)
- include/sessions.php (modified) (1 diff)
- index.php (modified) (2 diffs)
- languages/lang_english/lang_admin.php (modified) (2 diffs)
- languages/lang_english/lang_bbcode.php (deleted)
- languages/lang_english/lang_faq.php (modified) (3 diffs)
- languages/lang_english/lang_faq_bbcode.php (added)
- languages/lang_english/lang_main.php (modified) (2 diffs)
- languages/lang_russian/lang_admin.php (modified) (1 diff)
- languages/lang_russian/lang_bbcode.php (deleted)
- languages/lang_russian/lang_faq.php (modified) (3 diffs)
- languages/lang_russian/lang_faq_bbcode.php (added)
- languages/lang_russian/lang_main.php (modified) (2 diffs)
- message.php (modified) (3 diffs)
- offers.php (modified) (1 diff)
- phpBB2/viewtopic.php (modified) (1 diff)
- reports.php (modified) (1 diff)
- requests.php (modified) (1 diff)
- tags.php (deleted)
- updates/034.300.php (added)
- upload.php (modified) (1 diff)
- userdetails.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
admin/admin_user_ban.php
r212 r300 180 180 181 181 $sql = "SELECT * 182 FROM " . BANLIST_TABLE; 182 FROM " . BANLIST_TABLE . " 183 WHERE ban_type = " . BAN_GLOBAL; 183 184 $result = $db->sql_query($sql); 184 185 … … 202 203 $kill_session_sql .= ( ( $kill_session_sql != '' ) ? ' OR ' : '' ) . "session_user_id = " . $user_list[$i]; 203 204 204 $sql = "INSERT INTO " . BANLIST_TABLE . " (ban_userid, ban_added )205 VALUES (" . $user_list[$i] . ", " . time() . " )";205 $sql = "INSERT INTO " . BANLIST_TABLE . " (ban_userid, ban_added, ban_type) 206 VALUES (" . $user_list[$i] . ", " . time() . ", " . BAN_GLOBAL . ")"; 206 207 $db->sql_query($sql); 207 208 } … … 225 226 $kill_session_sql .= ( ( $kill_session_sql != '' ) ? ' OR ' : '' ) . $kill_ip_sql; 226 227 227 $sql = "INSERT INTO " . BANLIST_TABLE . " (ban_ip, ban_added )228 VALUES ('" . $banlist_ary[$i] . "', " . time() . " )";228 $sql = "INSERT INTO " . BANLIST_TABLE . " (ban_ip, ban_added, ban_type) 229 VALUES ('" . $banlist_ary[$i] . "', " . time() . ", " . BAN_GLOBAL . ")"; 229 230 $db->sql_query($sql); 230 231 } … … 256 257 if ( !$in_banlist ) 257 258 { 258 $sql = "INSERT INTO " . BANLIST_TABLE . " (ban_email, ban_added )259 VALUES ('" . str_replace("\'", "''", $email_list[$i]) . "', " . time() . " )";259 $sql = "INSERT INTO " . BANLIST_TABLE . " (ban_email, ban_added, ban_type) 260 VALUES ('" . str_replace("\'", "''", $email_list[$i]) . "', " . time() . ", " . BAN_GLOBAL . ")"; 260 261 $db->sql_query($sql); 261 262 } … … 342 343 AND b.ban_userid <> 0 343 344 AND u.uid <> " . ANONYMOUS . " 345 AND b.ban_type = " . BAN_GLOBAL . " 344 346 ORDER BY u.uid ASC"; 345 347 $result = $db->sql_query($sql); … … 363 365 364 366 $sql = "SELECT ban_id, ban_ip, ban_email 365 FROM " . BANLIST_TABLE; 367 FROM " . BANLIST_TABLE . " 368 WHERE ban_type = " . BAN_GLOBAL; 366 369 $result = $db->sql_query($sql); 367 370 ajax.php
r269 r300 209 209 $name = ( !empty($name) ? censor_text($name) : $lang['preview'] ); 210 210 211 $message = censor_text($message);212 211 $bb_code = new bbcode($message); 213 212 $message = $bb_code->get_html(); 213 $message = censor_text($message); 214 214 215 215 $template->set_filenames(array( announce.php
r293 r300 324 324 'uploaded' => $uploaded, 325 325 'downloaded' => $downloaded, 326 'port' => $port,327 326 'last_action' => $current_time, 328 327 'completedat' => $completedat, … … 330 329 ' ON DUPLICATE KEY UPDATE 331 330 last_action = VALUES(last_action), 332 port = VALUES(port),333 331 uploaded = uploaded + VALUES(uploaded), 334 332 downloaded = downloaded + VALUES(downloaded), … … 416 414 $upd_sql = ( $upthis ? 'uploaded = uploaded + ' . $upthis . ',' : '' ); 417 415 $upd_sql .= ( $downthis ? 'downloaded = downloaded + ' . $downthis . ',' : '' ); 418 $upd_sql .= ( $port <> $self['port'] ? 'port = ' . $port . ',' : '' );419 416 $upd_sql .= ( $completedat ? 'completedat = ' . $completedat . ',' : '' ); 420 417 $sql = 'UPDATE' . $sql_priority . ' ' . SNATCHED_TABLE . ' SET ' . $upd_sql . ' last_action = ' . $current_time . ' WHERE torrentid = ' . $torrentdata['fid'] . ' AND userid = ' . $userdata['uid']; browse.php
r297 r300 454 454 $count = ( $row = $db->sql_fetchrow($result) ) ? $row['count'] : 0; 455 455 } 456 457 $torrentsperpage = ( $userdata['torrentsperpage'] ? $userdata['torrentsperpage'] : 30 ); 456 $torrentsperpage = ( $userdata['torrentsperpage'] ? $userdata['torrentsperpage'] : 40 ); 458 457 459 458 if ( $count ) { faq.php
r280 r300 45 45 break; 46 46 47 case 'tags': 48 $lang_file = 'lang_faq_bbcode.php'; 49 50 function parse_faq_lang ( &$faq ) { 51 global $root_path, $lang; 52 static $bb_code; 53 54 require ($root_path . 'include/bbcode/config/tags.php'); 55 require ($root_path . 'include/bbcode/bbcode.lib.php'); 56 57 $faq_tags = array(); 58 $tags = array_keys($tags); 59 60 if ( !isset($bb_code) ) { 61 $bb_code = new bbcode(); 62 } 63 64 for($i = 0, $count = sizeof($faq); $i < $count; $i++) { 65 if ( $faq[$i][0] != '--' ) { 66 list($name, $tag, $descr, $explain) = $faq[$i]; 67 68 $parsed = $explain; 69 70 $bb_code->parse($parsed); 71 $parsed = $bb_code->get_html(); 72 73 $faq_text = $lang['tag'] . ': [' . $tag . ']<br />'; 74 $faq_text .= $lang['description'] . ': ' . $descr . '<br />'; 75 $faq_text .= '<div class="codetitle"><b>' . $lang['example'] . ':</b></div><div class="codecontent">' . $explain . '</div>'; 76 $faq_text .= '<div class="codetitle"><b>' . $lang['result'] . ':</b></div><div class="codecontent">' . $parsed . '</div>'; 77 78 $faq[$i] = array( 79 0 => '[' . $tag . '] ' . $name, 80 1 => $faq_text, 81 ); 82 83 $faq_tags[] = $tag; 84 } 85 } 86 87 $tags_diff = array_diff($tags, $faq_tags); 88 89 if ( sizeof($tags_diff) ) { 90 $faq[$i] = array( 91 0 => $lang['other_tags'], 92 1 => implode(', ', $tags_diff), 93 ); 94 } 95 } 96 break; 97 47 98 default: 48 99 $lang_file = 'lang_faq.php'; … … 53 104 require_once ($root_path . 'languages/lang_' . ( $userdata['session_logged_in'] ? $userdata['language'] : $config['default_lang']) . '/' . $lang_file); 54 105 106 if ( function_exists('parse_faq_lang') ) { 107 parse_faq_lang($faq); 108 } 109 55 110 $j = 0; 56 111 $counter = 0; … … 59 114 $faq_block_titles = array(); 60 115 61 for($i = 0 ; $i < sizeof($faq); $i++)116 for($i = 0, $count = sizeof($faq); $i < $count; $i++) 62 117 { 63 118 if ( !empty($faq[$i][0]) ) { … … 80 135 } 81 136 82 for($i = 0 ; $i < sizeof($faq_block); $i++) {137 for($i = 0, $count = sizeof($faq_block); $i < $count; $i++) { 83 138 if( sizeof($faq_block[$i]) ) { 84 139 $template->assign_block_vars('faq_block', array( … … 96 151 97 152 98 for($i = 0 ; $i < sizeof($faq_block); $i++) {153 for($i = 0, $count = sizeof($faq_block); $i < $count; $i++) { 99 154 if( sizeof($faq_block[$i]) ) { 100 155 $template->assign_block_vars('answers_block', array( include/acp/config/email_settings.php
r226 r300 18 18 'smtp_host' => array('lang' => 'smtp_server', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => false), 19 19 'smtp_port' => array('lang' => 'smtp_port', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => false), 20 'smtp_auth_method' => array('lang' => 'smtp_auth_method', 'validate' => 'string', 'type' => 'select', 'function' => 'mail_auth_select', 'params' => array('{CONFIG_VALUE}'), 'explain' => true), 20 21 'smtp_username' => array('lang' => 'smtp_username', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true), 21 22 'smtp_password' => array('lang' => 'smtp_password', 'validate' => 'string', 'type' => 'password:40:255', 'explain' => true), … … 23 24 'board_email_sig' => array('lang' => 'email_sig', 'validate' => 'string', 'type' => 'textarea:5:40', 'explain' => true), 24 25 )); 26 27 if ( !isset($load_modules) ) { 28 29 30 function mail_auth_select($selected_method, $key = '') 31 { 32 global $lang; 33 34 $auth_methods = array('PLAIN', 'LOGIN', 'CRAM-MD5', 'DIGEST-MD5', 'POP-BEFORE-SMTP'); 35 $s_smtp_auth_options = '<select name="config[smtp_auth_method]">'; 36 37 foreach ($auth_methods as $method) 38 { 39 $s_smtp_auth_options .= '<option value="' . $method . '"' . (($selected_method == $method) ? ' selected="selected"' : '') . '>' . $lang['smtp_' . strtolower(str_replace('-', '_', $method))] . '</option>'; 40 } 41 42 $s_smtp_auth_options .= '</select>'; 43 44 return $s_smtp_auth_options; 45 } 46 } 25 47 ?> include/bbcode/Xbb/Tags/youtube.php
r297 r300 32 32 } 33 33 34 preg_match("/v(=|\/)([0-9A-Za-z- ]+)(&|$|\n)/", $href, $matches);34 preg_match("/v(=|\/)([0-9A-Za-z-_]+)(&|$|\n)/", $href, $matches); 35 35 if ( isset($matches[2]) ) { 36 36 $movie_id = $matches[2]; include/bbcode/config/tags.php
r274 r300 88 88 'mod' => 'Xbb_Tags_Mod' , 89 89 'offtop' => 'Xbb_Tags_Offtop' , 90 'youtube' => 'Xbb_Tags_youtube' , 91 'gametrailers' => 'Xbb_Tags_gametrailers' , 90 92 91 93 // ��� �� �� ����������Hi) include/class.cache.php
r266 r300 173 173 while ($row = $db->sql_fetchrow($result)) 174 174 { 175 $smilies[$row['smilies_id']]['code'] = str_replace("'", "\\'", str_replace('\\', '\\\\', $row['code'])); 176 $smilies[$row['smilies_id']]['smile_url'] = $row['smile_url']; 177 $smilies[$row['smilies_id']]['emoticon'] = $row['emoticon']; 175 $smilies[$row['smilies_id']] = $row; 178 176 } 179 177 $db->sql_freeresult($result); include/constants.php
r293 r300 160 160 161 161 define('XBTT_TORRENT_MODIFIED', 9); 162 163 define('BAN_GLOBAL', 0); 164 define('BAN_CHAT', 1); 162 165 163 166 // Table names include/details/viewnfo.php
r280 r300 1 1 <?php 2 2 3 $sql = 'SELECT name, nfo FROM ' . TORRENTS_TABLE . ' WHERE fid = ' . $id;3 $sql = 'SELECT name, nfo, category FROM ' . TORRENTS_TABLE . ' WHERE fid = ' . $id; 4 4 $result = $db->sql_query( $sql ); 5 5 $nfo = ( $row = $db->sql_fetchrow( $result ) ) ? $row['nfo'] : ''; … … 7 7 trigger_error( sprintf( $lang['invalid_id'], $id ) ); 8 8 } 9 10 $cats = $cache->obtain_cats(); 11 $torrent_name = censor_text($row['name']); 12 13 if ( isset($cats[$cats[$row['category']]['cat_parent']]['cat_name']) ) { 14 $cat_parent = $cats[$cats[$row['category']]['cat_parent']]; 15 16 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 17 $seo->set_url($cat_parent['cat_name'], $cat_parent['cat_id'], $seo->seo_static['browse']); 18 $seo->set_parent($cats[$row['category']]['cat_id'], $seo->seo_static['browse'], $cat_parent['cat_id'], $seo->seo_static['browse']); 19 // www.phpBB-SEO.com SEO TOOLKIT END 20 } 21 22 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 23 $seo->set_url($cats[$row['category']]['cat_name'], $cats[$row['category']]['cat_id'], $seo->seo_static['browse']); 24 $seo->set_parent($id, $seo->seo_static['details'], $cats[$row['category']]['cat_id'], $seo->seo_static['browse']); 25 $seo->set_url($torrent_name, $id, $seo->seo_static['details']); 26 // www.phpBB-SEO.com SEO TOOLKIT END 9 27 10 28 switch ( $do ) { … … 46 64 } 47 65 48 $torrent_name = censor_text($row['name']); 49 50 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 51 $seo->seo_url['details'][$id] = $seo->set_url($torrent_name, $id, $seo->seo_static['details']); 52 // www.phpBB-SEO.com SEO TOOLKIT END 53 54 $template->assign_vars( array( 'NFO_FOR' => sprintf( $lang['view_nfo_for'], $torrent_name), 66 $template->assign_vars( array( 67 'NFO_FOR' => sprintf( $lang['view_nfo_for'], $torrent_name), 55 68 'NAME' => $row['name'], 56 69 'U_DOWNLOAD_NFO' => append_sid($root_path . 'details.php?id=' . $id . '&action=viewnfo&do=save'), include/functions.php
r293 r300 1720 1720 1721 1721 $sql = "SELECT f.*, t.topic_title, t.topic_id 1722 FROM " . FORUMS_TABLE . " f 1723 LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id 1722 FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p 1724 1723 LEFT JOIN " . TOPICS_TABLE . " t ON t.topic_id = p.topic_id 1724 WHERE f.forum_last_post_id = p.post_id 1725 1725 ORDER BY t.topic_last_post_id DESC"; 1726 1726 $result = $db->sql_query($sql, 10 * 60); include/functions_admin.php
r259 r300 142 142 $total_topics = ( $row = $db->sql_fetchrow($result) ) ? ( ( $row['total'] ) ? $row['total'] : 0 ) : 0; 143 143 144 $sql = 'SELECT post_time FROM ' . POSTS_TABLE . ' WHERE post_id = ' . $last_post; 145 $result = $db->sql_query($sql); 146 $last_post_time = ( $subrow = $db->sql_fetchrow($result) ) ? $subrow['post_time'] : 0; 147 144 148 $sql = "UPDATE " . FORUMS_TABLE . " 145 SET forum_last_post_id = $last_post, forum_posts = $total_posts, forum_topics = $total_topics 149 SET forum_last_post_id = $last_post, forum_posts = $total_posts, forum_topics = $total_topics, forum_last_post_time = $last_post_time 146 150 WHERE forum_id = $id"; 147 151 $db->sql_query($sql); … … 149 153 150 154 case 'topic': 151 $sql = "SELECT MAX(p ost_id) AS last_post, MIN(post_id) AS first_post, COUNT(post_id) AS total_posts152 FROM " . POSTS_TABLE . " 153 WHERE topic_id = $id";155 $sql = "SELECT MAX(p.post_id) AS last_post, MIN(p.post_id) AS first_post, COUNT(p.post_id) AS total_posts 156 FROM " . POSTS_TABLE . " p 157 WHERE p.topic_id = $id"; 154 158 $result = $db->sql_query($sql); 155 159 156 160 if ( $row = $db->sql_fetchrow($result) ) 157 161 { 162 163 $sql = 'SELECT post_time FROM ' . POSTS_TABLE . ' WHERE post_id = ' . $row['last_post']; 164 $result = $db->sql_query($sql); 165 $last_post_time = ( $subrow = $db->sql_fetchrow($result) ) ? $subrow['post_time'] : 0; 166 158 167 if ($row['total_posts']) 159 168 { 160 169 // Correct the details of this topic 161 170 $sql = 'UPDATE ' . TOPICS_TABLE . ' 162 SET topic_replies = ' . ($row['total_posts'] - 1) . ', topic_first_post_id = ' . $row['first_post'] . ', topic_last_post_id = ' . $row['last_post'] . " 171 SET topic_replies = ' . ($row['total_posts'] - 1) . ', 172 topic_first_post_id = ' . $row['first_post'] . ', 173 topic_last_post_id = ' . $row['last_post'] . ", 174 topic_last_post_time = " . $last_post_time . " 163 175 WHERE topic_id = $id"; 164 176 include/functions_check.php
r293 r300 69 69 { 70 70 $sql = 'SELECT ban_email 71 FROM ' . BANLIST_TABLE; 71 FROM ' . BANLIST_TABLE . ' 72 WHERE ban_type = ' . BAN_GLOBAL; 72 73 if ($result = $db->sql_query($sql)) 73 74 { … … 346 347 $base_announce = $site_url . '/announce.php'; 347 348 } 348 349 349 350 $torrent->announce(array($base_announce)); 350 351 include/functions_post.php
r286 r300 105 105 //now we delete imgs if config allow_sig == 2 106 106 $user_sig = ( $config['allow_sig'] == 2 ) ? preg_replace('#((\r)+?(\n)+?)*(\[url?(.*)\])?\[img.*?\]((ht|f)tp://)([^\r\n\t<\"]*?)\[/img.*?\](\[/url\])?#i', '', $row['user_sig']) : $row['user_sig']; 107 // Replace naughty words108 $user_sig = censor_text($user_sig);109 107 //and now we format sig 110 108 $bb_code->parse($user_sig); 111 109 $user_sig = $bb_code->get_html(); 110 $user_sig = censor_text($user_sig); 112 111 //last preparation :) 113 112 $user_sig = ( $user_sig != '' ? '<br />_________________<br />' . $user_sig : '' ); … … 138 137 } 139 138 140 $bb_code->parse($row['comment_text']);141 $text = $bb_code->get_html();142 $text = censor_text($text);139 $bb_code->parse($row['comment_text']); 140 $text = $bb_code->get_html(); 141 $text = censor_text($text); 143 142 144 143 $post_time = create_date($row['comment_added']); … … 443 442 444 443 function textbbcode( $content = '' ) { 445 global $lang, $template, $userdata, $db, $config ;444 global $lang, $template, $userdata, $db, $config, $root_path; 446 445 447 446 $template->set_filenames(array( … … 452 451 'EDITOR_NAME' => $userdata['name'], 453 452 'CONTENT' => $content, 454 'U_TAGS' => append_sid( 'tags.php')453 'U_TAGS' => append_sid($root_path . 'faq.php?mode=tags') 455 454 )); 456 455 include/modtask/mass_torrent_actions.php
r291 r300 5 5 $ids = request_var('torrent_id', array(0=>0)); 6 6 7 $back_url = 'browse.php' . ( $back_link ? '?' . base64_decode($back_link) : '' );7 $back_url = 'browse.php' . ( $back_link ? '?' . urldecode(base64_decode($back_link)) : '' ); 8 8 $back_url = append_sid($root_path . $back_url); 9 9 include/modtask/new_comments.php
r269 r300 44 44 $user_sig = ( $config['allow_sig'] == 2 ) ? preg_replace('#((\r)+?(\n)+?)*(\[url(.*)\])?\[img.*?\]((ht|f)tp://)([^\r\n\t<\"]*?)\[/img.*?\](\[/url\])?#i', '', $user_sig) : $user_sig; 45 45 // Replace naughty words 46 $user_sig = censor_text($user_sig);47 46 $bb_code->parse($user_sig); 48 47 $user_sig = $bb_code->get_html(); 48 $user_sig = censor_text($user_sig); 49 49 //last preparation :) 50 50 $user_sig = ( $user_sig != '' ? '<br />_________________<br />' . $user_sig : '' ); include/sessions.php
r295 r300 1127 1127 // Create date/time from format and timezone 1128 1128 // 1129 function create_date( $gmepoch, $format = '')1129 function create_date( $gmepoch, $format = '' ) 1130 1130 { 1131 1131 global $config, $lang, $userdata; 1132 static $translate; 1133 1134 if ( !$format ) { 1135 $format = $config['default_dateformat']; 1136 } 1137 1138 $tz = $userdata['tzoffset']; 1132 static $midnight; 1133 static $date_cache; 1134 1135 $format = (!$format) ? $config['default_dateformat'] : $format; 1136 $now = time(); 1137 $delta = $now - $gmepoch; 1138 1139 $zone_offset = $userdata['tzoffset']; 1139 1140 // [start] DST 1140 1141 if ( ($userdata['uid'] != ANONYMOUS && $userdata['user_dst']) || ( $userdata['uid'] == ANONYMOUS && $config['board_dst'] ) ) { 1141 $tz += date('I', $gmepoch); 1142 } 1142 $zone_offset += date('I', $gmepoch); 1143 } 1144 $zone_offset *= 3600; 1143 1145 // [end] DST 1144 1146 1145 if ( empty($translate) && $config['default_lang'] != 'english' ) { 1146 @reset($lang['datetime']); 1147 foreach ( $lang['datetime'] AS $match => $replace ) { 1148 $translate[$match] = $replace; 1149 } 1150 } 1151 1152 return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + (3600 * $tz)), $translate) : @gmdate($format, $gmepoch + (3600 * $tz)); 1147 if (!isset($date_cache[$format])) 1148 { 1149 // Is the user requesting a friendly date format (i.e. 'Today 12:42')? 1150 $date_cache[$format] = array( 1151 'is_short' => strpos($format, '|'), 1152 'format_short' => substr($format, 0, strpos($format, '|')) . '||' . substr(strrchr($format, '|'), 1), 1153 'format_long' => str_replace('|', '', $format), 1154 'lang' => $lang['datetime'], 1155 ); 1156 1157 // Short representation of month in format? Some languages use different terms for the long and short format of May 1158 if ((strpos($format, '\M') === false && strpos($format, 'M') !== false) || (strpos($format, '\r') === false && strpos($format, 'r') !== false)) 1159 { 1160 $date_cache[$format]['lang']['may'] = $lang['datetime']['may_short']; 1161 } 1162 } 1163 1164 // Show date <= 1 hour ago as 'xx min ago' 1165 // A small tolerence is given for times in the future but in the same minute are displayed as '< than a minute ago' 1166 if ($delta <= 3600 && ($delta >= -5 || (($now / 60) % 60) == (($gmepoch / 60) % 60)) && $date_cache[$format]['is_short'] !== false && isset($lang['datetime']['ago'])) 1167 { 1168 $_null = max(0, (int) floor($delta / 60)); 1169 $numbers = array_keys($lang['datetime']['ago']); 1170 1171 foreach ($numbers as $num) 1172 { 1173 if ($num > $_null) 1174 { 1175 break; 1176 } 1177 $key_found = $num; 1178 } 1179 return sprintf($lang['datetime']['ago'][$key_found], $_null); 1180 //return $this->lang(array('datetime', 'AGO'), max(0, (int) floor($delta / 60))); 1181 } 1182 1183 if (!$midnight) 1184 { 1185 list($d, $m, $y) = explode(' ', gmdate('j n Y', time() + $zone_offset)); 1186 $midnight = gmmktime(0, 0, 0, $m, $d, $y) - $zone_offset; 1187 } 1188 1189 if ($date_cache[$format]['is_short'] !== false && !($gmepoch < $midnight - 86400 || $gmepoch > $midnight + 172800)) 1190 { 1191 $day = false; 1192 1193 if ($gmepoch > $midnight + 86400) 1194 { 1195 $day = 'tomorrow'; 1196 } 1197 else if ($gmepoch > $midnight) 1198 { 1199 $day = 'today'; 1200 } 1201 else if ($gmepoch > $midnight - 86400) 1202 { 1203 $day = 'yesterday'; 1204 } 1205 1206 if ($day !== false) 1207 { 1208 return str_replace('||', $lang['datetime'][$day], strtr(@gmdate($date_cache[$format]['format_short'], $gmepoch + $zone_offset), $date_cache[$format]['lang'])); 1209 } 1210 } 1211 1212 return strtr(@gmdate($date_cache[$format]['format_long'], $gmepoch + $zone_offset), $date_cache[$format]['lang']); 1153 1213 } 1154 1214 index.php
r299 r300 196 196 else { 197 197 $template->assign_block_vars("poll.no_voted", array( 198 'S_FORM_ACTION' => append_sid( 'index.php')198 'S_FORM_ACTION' => append_sid($root_path . 'index.php') 199 199 )); 200 200 … … 329 329 // www.phpBB-SEO.com SEO TOOLKIT END 330 330 331 $description = censor_text($row['description']); 332 $bb_code->parse($description); 331 $bb_code->parse($row['description']); 333 332 $description = $bb_code->get_html(); 333 $description = censor_text($description); 334 334 335 335 $template->assign_block_vars('releases.releases_row', array( languages/lang_english/lang_admin.php
r269 r300 979 979 'template_preview' => 'Template preview', 980 980 'template_edit' => 'Template editing', 981 'template_edit_help' => 'Р В Р ІР‚”Р ТвЂР  ВµРЎРѓРЎРЉ РІС‹ Р В РЎВожете СЃРѕР·РТвЂР  В°РЎвЂљРЎРЉ шаблон Р В РўвЂР  В»РЎРЏ категорРСвЂР В РЎвЂ. Р В РІР‚в„ўР РЋРІР‚в„– Р В РЎВожете Р В РЎвЂР ЎРѓР С—ользовать любой bb-РєРѕРТвЂ. Для Р В РЎвЂР ЎРѓР С—ользованРСвЂР РЋР РЏ значенРСвЂР  в„– Р В РЎвЂР В Р’В· полей форРСВР РЋРІР‚в„– Р В РЎвЂР ЎРѓР С—ользуйте названРСвЂР В Р’Вµ поля Рцслово value, напрРСвЂР В РЎВер как Обложка.value. Для полей С‚РСвЂР  С—Р В° select РІС‹ Р В РЎВожете Р В РЎвЂР ЎРѓР С—ользовать переРСВенную value2, вэтоРѠслучае Р±СѓРТвЂР  ВµРЎвЂљ Р В РЎвЂР ЎРѓР С—ользовано значенРСвЂР В Р’Вµ Р В РЎвЂР ЎРѓР С—ользуеРСВРѕРµ Р В РЎВеж теговoption, Р В Р’В° Р Р…Р Вµ value тега option. Для СЃРѕР·РТвЂР  В°Р Р…Р СвЂР РЋР РЏ тега select Р РЋР С“ разныРСВРцзначенРСвЂР РЋР РЏР В РЎВРцРІvalue option РцРСВеж option Р В РЎвЂР ЎРѓР С—ользуйте конструкцРСвЂР ЎР‹ РІРСвЂР В РўвЂР В Р’В° "Да [YES]; Нет [NO]", то есть РІРєРІР°РТвЂР ЎР‚атных скобках указывайте текст, который Р В РўвЂР  С•лжен быть Р В РЎВеж тегоРРвЂoption.',982 'name_help' => 'Р В Р ЎСљР  В°Р В·Р Р†Р В°Р Р…Р СвЂР В Р’Вµ поля так, как РѕРЅРѕ Р±СѓРТвЂР  ВµРЎвЂљ показано вшаблонРВР’Вµ',981 'template_edit_help' => 'Р—РТвЂВесь РІС‹ Р В Р’В Р РЋР’Вожете СЃРѕР·РТвЂВать шаблон Р В Р’В Р СћРІР‚Вля категорРСвЂВР В Р’В Р РЋРІР‚В. Р В РІР‚в„ўР РЋРІР‚в„– Р В Р’В Р РЋР’Вожете Р В Р’В Р РЋРІР‚Вспользовать любой bb-РєРѕРТвЂВ. Для Р В Р’В Р РЋРІР‚ВспользованРСвЂВР РЋР РЏ значенРСвЂВР в„– Р В Р’В Р РЋРІР‚ВР В Р’В· полей форРСВВР РЋРІР‚в„– Р В Р’В Р РЋРІР‚Вспользуйте названРСвЂВР В Р’Вµ поля Рцслово value, напрРСвЂВР В Р’В Р РЋР’Вер как Обложка.value. Для полей С‚РСвЂВР С—Р В° select РІС‹ Р В Р’В Р РЋР’Вожете Р В Р’В Р РЋРІР‚Вспользовать переРСВВенную value2, вэтоРѠслучае Р±СѓРТвЂВет Р В Р’В Р РЋРІР‚Вспользовано значенРСвЂВР В Р’Вµ Р В Р’В Р РЋРІР‚ВспользуеРСВВРѕРµ Р В Р’В Р РЋР’Веж теговoption, Р В Р’В° Р Р…Р Вµ value тега option. Для СЃРѕР·РТвЂВанРСвЂВР РЋР РЏ тега select Р РЋР С“ разныРСВВРцзначенРСвЂВР РЋР РЏР В РЎВВРцРІvalue option РцРСВВеж option Р В Р’В Р РЋРІР‚Вспользуйте конструкцРСвЂВРЎР‹ РІРСвЂВР В Р’В Р СћРІР‚ВР В Р’В° "Да [YES]; Нет [NO]", то есть РІРєРІР°РТвЂВратных скобках указывайте текст, который Р В Р’В Р СћРІР‚Волжен быть Р В Р’В Р РЋР’Веж теговoption.', 982 'name_help' => 'НазванРСвЂВР В Р’Вµ поля так, как РѕРЅРѕ Р±СѓРТвЂВет показано вшаблоне', 983 983 'default_value' => 'Default value', 984 'default_value_help' => 'Рто значенРСвЂР В Р’Вµ Р±СѓРТвЂР  ВµРЎвЂљ Р С—Р С• СѓРСВолчанРСвЂР ЎР‹ вполе шаблона. Для поля С‚РСвЂР  С—Р В° select укажРСвЂР ЎвЂљР Вµ РІСЃРµ значенРСвЂР РЋР РЏ, разРТвЂР  ВµР В»РЎРЏРЎРЏ Р В РЎвЂР ЎвЂ¦ ;',985 'note_help' => 'Ртот текст Р±СѓРТвЂР  ВµРЎвЂљ показ около поля',984 'default_value_help' => 'Р В Р’ВВто значенРСвЂВР В Р’Вµ Р±СѓРТвЂВет Р С—Р С• СѓРСВВолчанРСвЂВРЎР‹ вполе шаблона. Для поля С‚РСвЂВР С—Р В° select укажРСвЂВте РІСЃРµ значенРСвЂВР РЋР РЏ, разРТвЂВеляя Р В Р’В Р РЋРІР‚ВС… ;', 985 'note_help' => 'Р В Р’ВВтот текст Р±СѓРТвЂВет показ около поля', 986 986 'must_be_filled' => 'Required', 987 'must_be_filled_help' => 'Р В Р ІР‚ўРЎРѓР В»Р С†Р Р†РЎвЂ№ поставРСвЂР ЎвЂљР Вµ Р В Р’В·Р В РўвЂР  ВµРЎРѓРЎРЉ галочку, то пользователь Р±СѓРТвЂР  ВµРЎвЂљ обязан заполнРСвЂР ЎвЂљРЎРЉ это РїРѕР»РВР’Вµ',987 'must_be_filled_help' => 'ЕслРцРІС‹ поставРСвЂВте Р В Р’В·Р В РўвЂВесь галочку, то пользователь Р±СѓРТвЂВет обязан заполнРСвЂВть это поле', 988 988 'add_new_field' => 'Add new field', 989 989 'show_at' => 'Show at', … … 1108 1108 1109 1109 1110 'tags_settings' => 'Настройки тегов', 1111 'tags_max_allow' => 'Максимальное количество тегов', 1112 'tags_max_allow_explain' => 'Максимальное количество тегов, которое может поставить один пользователь для одной раздачи', 1113 'tags_max_length' => 'Максимальная длинна тега', 1114 'tags_max_length_explain' => 'Максимальная длинна тега (в символах)', 1115 'tags_min_length' => 'Минимальная длинна тега', 1116 'tags_min_length_explain' => 'Минимальная длинна тега (в символах). Не ставьте значение менее 3 символов, они все равно не будут работать в поиске.', 1110 'tags_settings' => 'Настройки тегов', 1111 'tags_max_allow' => 'Максимальное количество тегов', 1112 'tags_max_allow_explain' => 'Максимальное количество тегов, которое может поставить РѕРґРёРЅ пользователь для РѕРґРЅРѕР№ раздачи', 1113 'tags_max_length' => 'Максимальная длинна тега', 1114 'tags_max_length_explain' => 'Максимальная длинна тега (РІ символах)', 1115 'tags_min_length' => 'Минимальная длинна тега', 1116 'tags_min_length_explain' => 'Минимальная длинна тега (РІ символах). РќРµ ставьте значение менее 3 символов, РѕРЅРё РІСЃРµ равно РЅРµ Р±СѓРґСѓС‚ работать РІ РїРѕРёСЃРєРµ.', 1117 1118 1119 'smtp_auth_method' => 'Метод аутентификации для SMTP', 1120 'smtp_auth_method_explain' => 'Используется только в случае, если заданы имя/пароль. Спросите у своего провайдера, если не уверены, какой метод аутентификации использовать.', 1121 'smtp_cram_md5' => 'CRAM-MD5', 1122 'smtp_digest_md5' => 'DIGEST-MD5', 1123 'smtp_login' => 'LOGIN', 1124 'smtp_plain' => 'PLAIN', 1125 'smtp_pop_before_smtp' => 'POP-BEFORE-SMTP', 1117 1126 1118 1127 )); languages/lang_english/lang_faq.php
r245 r300 137 137 ), 138 138 array( 139 0 => 'Что такое bbcode (бибикод) и какие есть теги на сайте?', 140 1 => 'BBcode это специальный язык разметки для форматирования сообщений. Список поодерживаемых тегов вы можете узнать, пройдя по этой ссылке - <a href="' . append_sid($root_path . 'faq.php?mode=tags') . '">Полный список тегов</a>', 141 ), 142 array( 139 143 0 => '--', 140 144 1 => 'Statistics' … … 191 195 array( 192 196 0 => 'For those that are interested ("the anatomy" of a torrent session)', 193 1 => 'Some information about "the anatomy" torrent session" you can find <a href=" ?mode=anatomy">here</a>.'197 1 => 'Some information about "the anatomy" torrent session" you can find <a href="' . append_sid($root_path . 'faq.php?mode=anatomy') . '">here</a>.' 194 198 ), 195 199 … … 224 228 array( 225 229 0 => 'What do I do with files donwloaded form the tracker?', 226 1 => 'You will probably find the answer <a href=" ?mode=formats">here</a>.'230 1 => 'You will probably find the answer <a href="' . append_sid($root_path . 'faq.php?mode=formats') . '">here</a>.' 227 231 ), 228 232 array( 229 233 0 => 'You want to download a movie, but don\'t know what CAMRip, TS, TC, DVDScr in the description of the torrent mean?', 230 1 => 'You should go <a href=" ?mode=videoformats">here</a>.'234 1 => 'You should go <a href="' . append_sid($root_path . 'faq.php?mode=videoformats') . '">here</a>.' 231 235 ), 232 236 array( 233 237 0 => 'Why did the torrent that was just active all of a sudden dissapear?!', 234 238 1 => 'There could be several reasons: :<br /> 235 1) the torrent didn\'t comply with the <a href="' . append_sid( 'rules.php') . '">rules</a>.<br />239 1) the torrent didn\'t comply with the <a href="' . append_sid($root_path . 'rules.php') . '">rules</a>.<br /> 236 240 2) the uploader deleted it because the release was of a low quality. It is possible that it will be substituted with a differet release later.<br /> 237 241 3) torrents are automatically deleted after TTL (Time to Live).' languages/lang_english/lang_main.php
r299 r300 397 397 'refresh' => 'Refresh', 398 398 'description' => 'Description', 399 'html_not_allowed' => 'HTML isn\'t allowed. Click <a href=" tags.php">here</a> to see allowed tags',399 'html_not_allowed' => 'HTML isn\'t allowed. Click <a href="' . append_sid($root_path . 'faq.php?mode=tags') . '">here</a> to see allowed tags', 400 400 'visible' => 'Visible', 401 401 'visible_on_main_page' => 'Visible on main page', … … 1261 1261 'show_only_my_cats' => 'Показывать только мои категории', 1262 1262 1263 1264 'show_profile' => 'Показать профиль', 1265 'search_torrents' => 'Поиск торрентов', 1266 'kick_user' => 'Кикнуть пользователя', 1267 'ban_user' => 'Забанить пользователя', 1268 'invalid_receiver_name' => 'неверное имя получателя', 1269 'private_message_for' => 'приватное сообщение для', 1270 'private_message_from' => 'приватное сообщение от', 1271 'you_have_been_kicked' => 'вы были кикнуты', 1272 'user_kicked' => 'Пользователь %s кикнут', 1273 'user_banned' => 'Пользователь %s забанен', 1274 'banned_users_in_chat' => 'Забанненные пользователи в чате', 1275 'user_banned_until' => 'Пользователь %s забанен до %s', 1276 'you_have_been_kicked' => 'вы были кикнуты', 1277 'you_have_been_banned_in_chat' => 'Вы забанены в чате', 1278 'you_have_been_banned_in_chat_until' => 'Вы забанены в чате до %s', 1279 1280 'tag' => 'Тэг', 1281 'other_tags' => 'Другие теги', 1282 1263 1283 'translated_by' => 'Translation to english made by %s', 1264 1284 )); languages/lang_russian/lang_admin.php
r269 r300 1097 1097 'tags_min_length_explain' => 'Минимальная длинна тега (в символах). Не ставьте значение менее 3 символов, они все равно не будут работать в поиске.', 1098 1098 1099 'smtp_auth_method' => 'Метод аутентификации для SMTP', 1100 'smtp_auth_method_explain' => 'Используется только в случае, если заданы имя/пароль. Спросите у своего провайдера, если не уверены, какой метод аутентификации использовать.', 1101 'smtp_cram_md5' => 'CRAM-MD5', 1102 'smtp_digest_md5' => 'DIGEST-MD5', 1103 'smtp_login' => 'LOGIN', 1104 'smtp_plain' => 'PLAIN', 1105 'smtp_pop_before_smtp' => 'POP-BEFORE-SMTP', 1106 1099 1107 )); 1100 1108 ?> languages/lang_russian/lang_faq.php
r280 r300 150 150 ), 151 151 array( 152 0 => 'Что такое bbcode (бибикод) и какие есть теги на сайте?', 153 1 => 'BBcode это специальный язык разметки для форматирования сообщений. Список поодерживаемых тегов вы можете узнать, пройдя по этой ссылке - <a href="' . append_sid($root_path . 'faq.php?mode=tags') . '">Полный список тегов</a>', 154 ), 155 array( 152 156 0 => '--', 153 157 1 => 'Статистика' … … 213 217 array( 214 218 0 => 'Для интересующихся ("анатомия" торрент-сессии)', 215 1 => 'Некоторую информацию об "анатомии" торрент-сессии вы можете найти <a href="' . append_sid( 'faq.php?mode=anatomy') . '">здесь</a>.'219 1 => 'Некоторую информацию об "анатомии" торрент-сессии вы можете найти <a href="' . append_sid($root_path . 'faq.php?mode=anatomy') . '">здесь</a>.' 216 220 ), 217 221 … … 250 254 array( 251 255 0 => 'Что мне делать с закаченными с трекера файлами?', 252 1 => 'Скорее всего, ответ вы найдёте <a href="' . append_sid( 'faq.php?mode=formats') . '">здесь</a>.'256 1 => 'Скорее всего, ответ вы найдёте <a href="' . append_sid($root_path . 'faq.php?mode=formats') . '">здесь</a>.' 253 257 ), 254 258 array( 255 259 0 => 'Вы хотите скачать фильм, но не понимаете значение терминов CAMRip, TS, TC, DVDScr в описании торрента?', 256 1 => 'Вам <a href="' . append_sid( 'faq.php?mode=videoformats') . '">сюда</a>.'260 1 => 'Вам <a href="' . append_sid($root_path . 'faq.php?mode=videoformats') . '">сюда</a>.' 257 261 ), 258 262 array( 259 263 0 => 'Почему торрент, только что бывший активным, вдруг исчез!?', 260 264 1 => 'На это может быть несколько причин:<br /> 261 1) торрент не соответствовал <a href="' . append_sid( 'rules.php') . '">правилам</a>.<br />265 1) торрент не соответствовал <a href="' . append_sid($root_path . 'rules.php') . '">правилам</a>.<br /> 262 266 2) Аплодер удалил его, т.к. релиз оказался некачественным. Возможно, он будет заменён другим релизом немного позже.<br /> 263 267 3) торренты автоматически удаляются по истечении TTL (англ. Time to Live - время жизни).' languages/lang_russian/lang_main.php
r299 r300 404 404 'refresh' => 'Обновить', 405 405 'description' => 'Описание', 406 'html_not_allowed' => 'HTML запрещен. Кликните <a href=" tags.php">здесь</a> чтобы увидеть разрешенные теги',406 'html_not_allowed' => 'HTML запрещен. Кликните <a href="' . append_sid($root_path . 'faq.php?mode=tags') . '">здесь</a> чтобы увидеть разрешенные теги', 407 407 'visible' => 'Видимый', 408 408 'visible_on_main_page' => 'Виден на главной странице', … … 1285 1285 'show_profile' => 'Показать профиль', 1286 1286 'search_torrents' => 'Поиск торрентов', 1287 'kick_user' => 'Кикнуть пользователя', 1288 'ban_user' => 'Забанить пользователя', 1289 'invalid_receiver_name' => 'неверное имя получателя', 1290 'private_message_for' => 'приватное сообщение для', 1291 'private_message_from' => 'приватное сообщение от', 1292 'you_have_been_kicked' => 'вы были кикнуты', 1293 'user_kicked' => 'Пользователь %s кикнут', 1294 'user_banned' => 'Пользователь %s забанен', 1295 'banned_users_in_chat' => 'Забанненные пользователи в чате', 1296 'user_banned_until' => 'Пользователь %s забанен до %s', 1297 'you_have_been_kicked' => 'вы были кикнуты', 1298 'you_have_been_banned_in_chat' => 'Вы забанены в чате', 1299 'you_have_been_banned_in_chat_until' => 'Вы забанены в чате до %s', 1300 1301 'tag' => 'Тэг', 1302 'other_tags' => 'Другие теги', 1287 1303 1288 1304 'translated_by' => 'На русский язык перевел %s', message.php
r269 r300 117 117 } 118 118 } 119 $body = censor_text($message['msg']); 120 $bb_code->parse($ body);119 120 $bb_code->parse($message['msg']); 121 121 $body = $bb_code->get_html(); 122 $body = censor_text($body); 122 123 123 124 $added = create_date($message['added']); … … 316 317 foreach ( $reply_msg AS $msg_id => $ary ) { 317 318 $added = create_date($ary['added']); 318 $msg = censor_text($ary['msg']); 319 $bb_code->parse($msg); 319 $bb_code->parse($ary['msg']); 320 320 $msg = $bb_code->get_html(); 321 $msg = censor_text($msg); 321 322 322 323 $template->assign_block_vars('reply_to.reply_to_row', array( … … 465 466 466 467 $body = sprintf($lang['pm_message_separator'], $orig2['name'], $message['msg']); 467 $body = censor_text($body);468 468 $bb_code->parse($body); 469 469 $body = $bb_code->get_html(); 470 $body = censor_text($body); 470 471 471 472 $template->assign_vars(array( offers.php
r280 r300 317 317 } 318 318 319 $description = censor_text($row['descr']); 320 $bb_code = new bbcode($description); 319 $bb_code = new bbcode($row['descr']); 321 320 $description = $bb_code->get_html(); 321 $description = censor_text($description); 322 322 323 323 $template->assign_vars(array( phpBB2/viewtopic.php
r299 r300 1277 1277 if ($user_sig != '') 1278 1278 { 1279 $user_sig = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#s e', "@censor_text('\\0')", '>' . $user_sig . '<'), 1, -1));1279 $user_sig = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#s', "\\0", '>' . $user_sig . '<'), 1, -1)); 1280 1280 1281 1281 $bb_code->parse($user_sig); 1282 1282 $user_sig = $bb_code->get_html(); 1283 } 1284 1285 $message = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@censor_text('\\0')", '>' . $message . '<'), 1, -1)); 1283 $user_sig = censor_text($user_sig); 1284 } 1285 1286 $message = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#s', "\\0", '>' . $message . '<'), 1, -1)); 1286 1287 1287 1288 if ( $postrow[$i]['enable_bbcode'] ) { 1288 1289 $bb_code->parse($message); 1289 1290 $message = $bb_code->get_html(); 1291 $message = censor_text($message); 1290 1292 } 1291 1293 reports.php
r280 r300 173 173 case 2: 174 174 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 175 if ( empty($seo->seo_url['details'][$id]) ) { 176 $seo->seo_url['details'][$id] = $seo->set_url(censor_text($row['name']), $id, $seo->seo_static['details']); 177 } 175 $seo->set_url(censor_text($row['name']), $id, $seo->seo_static['details']); 178 176 // www.phpBB-SEO.com SEO TOOLKIT END 179 177 break; requests.php
r280 r300 320 320 } 321 321 322 $description = censor_text($row['descr']); 323 $bb_code = new bbcode($description); 322 $bb_code = new bbcode($row['descr']); 324 323 $description = $bb_code->get_html(); 324 $description = censor_text($description); 325 325 326 326 $template->assign_vars(array( upload.php
r293 r300 310 310 } 311 311 312 $descr = censor_text($descr);313 312 $bb_code = new bbcode($descr); 314 313 $descr = $bb_code->get_html(); 314 $descr = censor_text($descr); 315 315 316 316 $template->assign_block_vars('uploading_preview', array( userdetails.php
r291 r300 394 394 } 395 395 396 $comment_text = censor_text($row['comment_text']); 397 $bb_code->parse($comment_text); 396 $bb_code->parse($row['comment_text']); 398 397 $comment_text = $bb_code->get_html(); 398 $comment_text = censor_text($comment_text); 399 399 400 400 $template->assign_block_vars( 'viewcomm_row', array(
