Changeset 316
- Timestamp:
- 06/22/10 18:52:19 (2 years ago)
- Files:
-
- admin/admin_db_utilities.php (modified) (1 diff)
- admin/admin_users.php (modified) (7 diffs)
- browse.php (modified) (2 diffs)
- comment.php (modified) (5 diffs)
- details.php (modified) (1 diff)
- docleanup.php (modified) (1 diff)
- include/constants.php (modified) (3 diffs)
- include/functions.php (modified) (3 diffs)
- include/functions_delete.php (modified) (1 diff)
- include/functions_post.php (modified) (1 diff)
- include/sessions.php (modified) (1 diff)
- include/ucp/checkcomm.php (modified) (1 diff)
- languages/lang_english/email/comments_notify.txt (added)
- languages/lang_english/email/topic_notify.txt (modified) (1 diff)
- languages/lang_english/lang_main.php (modified) (1 diff)
- languages/lang_russian/email/comments_notify.txt (added)
- languages/lang_russian/email/topic_notify.txt (modified) (1 diff)
- languages/lang_russian/lang_main.php (modified) (1 diff)
- my.php (modified) (4 diffs)
- news.php (modified) (1 diff)
- offers.php (modified) (1 diff)
- phpBB2/includes/functions_post.php (modified) (2 diffs)
- phpBB2/includes/prune.php (modified) (1 diff)
- phpBB2/index.php (modified) (2 diffs)
- phpBB2/modcp.php (modified) (3 diffs)
- phpBB2/posting.php (modified) (2 diffs)
- phpBB2/quick_reply.php (modified) (1 diff)
- phpBB2/viewtopic.php (modified) (4 diffs)
- redir.php (modified) (1 diff)
- requests.php (modified) (1 diff)
- rss.php (modified) (1 diff)
- sql.sql (modified) (70 diffs)
- templates/admin/user_edit_body.tpl (modified) (3 diffs)
- templates/bithdtv/details.html (modified) (1 diff)
- templates/bithdtv/ucp_body.html (modified) (2 diffs)
- templates/bithdtv/ucp_checkcomm_body.html (modified) (2 diffs)
- templates/main/ucp_body.html (modified) (1 diff)
- templates/main/ucp_checkcomm_body.html (modified) (2 diffs)
- templates/reflection/details.html (modified) (1 diff)
- templates/reflection/ucp_body.html (modified) (1 diff)
- templates/reflection/ucp_checkcomm_body.html (modified) (2 diffs)
- updates/034.316.php (added)
- upload.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
admin/admin_db_utilities.php
r307 r316 643 643 } 644 644 645 $tables = array(BANLIST_TABLE, BOOKMARKS_TABLE, CATEGORIES_TABLE, CHEATERS_TABLE, COMMENTS_NOTIFY_TABLE, COMMENTS_TABLE, CONFIG_TABLE, CONFIRM_TABLE, COUNTRIES_TABLE, DISALLOW_TABLE, FILES_TABLE, AUTH_ACCESS_TABLE, FORUM_CATEGORIES_TABLE, FORUMS_TABLE, GROUPS_TABLE, POSTS_TABLE, POSTS_TEXT_TABLE, PRUNE_TABLE, SEARCH_TABLE, SEARCH_WORD_TABLE, SEARCH_MATCH_TABLE, TOPICS_TABLE, TOPICS_WATCH_TABLE,USER_GROUP_TABLE, FRIENDS_TABLE, HELPDESK_TABLE, INDEXRELEASES_TABLE, INVITES_TABLE, PRIVATE_MESSAGES_TABLE, NEWS_TABLE, OFFERS_TABLE, OFFERS_VOTES_TABLE, PEERS_TABLE, RATINGS_TABLE, RELEASE_GROUPS_TABLE, REPORTS_TABLE, REQUESTS_TABLE, REQUESTS_VOTES_TABLE, SESSIONS_TABLE, SESSIONS_KEYS_TABLE, SIMPATY_TABLE, SITELOG_TABLE, SMILIES_TABLE, SNATCHED_TABLE, SOS_TABLE, THANKS_TABLE, THEMES_TABLE, TORRENTS_TABLE, UPLOADAPP_TABLE, USERS_TABLE, WORDS_TABLE, VOTE_DESC_TABLE, VOTE_RESULTS_TABLE, VOTE_USERS_TABLE);645 $tables = array(BANLIST_TABLE, BOOKMARKS_TABLE, CATEGORIES_TABLE, CHEATERS_TABLE, COMMENTS_NOTIFY_TABLE, COMMENTS_TABLE, CONFIG_TABLE, CONFIRM_TABLE, COUNTRIES_TABLE, DISALLOW_TABLE, FILES_TABLE, AUTH_ACCESS_TABLE, FORUM_CATEGORIES_TABLE, FORUMS_TABLE, GROUPS_TABLE, POSTS_TABLE, POSTS_TEXT_TABLE, PRUNE_TABLE, SEARCH_TABLE, SEARCH_WORD_TABLE, SEARCH_MATCH_TABLE, TOPICS_TABLE, USER_GROUP_TABLE, FRIENDS_TABLE, HELPDESK_TABLE, INDEXRELEASES_TABLE, INVITES_TABLE, PRIVATE_MESSAGES_TABLE, NEWS_TABLE, OFFERS_TABLE, OFFERS_VOTES_TABLE, PEERS_TABLE, RATINGS_TABLE, RELEASE_GROUPS_TABLE, REPORTS_TABLE, REQUESTS_TABLE, REQUESTS_VOTES_TABLE, SESSIONS_TABLE, SESSIONS_KEYS_TABLE, SIMPATY_TABLE, SITELOG_TABLE, SMILIES_TABLE, SNATCHED_TABLE, SOS_TABLE, THANKS_TABLE, THEMES_TABLE, TORRENTS_TABLE, UPLOADAPP_TABLE, USERS_TABLE, WORDS_TABLE, VOTE_DESC_TABLE, VOTE_RESULTS_TABLE, VOTE_USERS_TABLE); 646 646 647 647 admin/admin_users.php
r269 r316 88 88 'skype' => '', 89 89 'user_sig' => '', 90 'notifyreply' => 0,91 90 'notifypm' => '', 92 91 'parked' => 0, … … 125 124 126 125 $signature = str_replace('<br />', "\n", $user_sig); 127 $notifypm = ( $notifypm ? '[pm]' : '' );126 $notifypm = ''; 128 127 129 128 validate_optional_fields($icq, $aim, $msn, $yim, $skype, $signature); … … 277 276 if( !$error ) 278 277 { 278 $user_notify = request_var('user_notify', array(''=>0)); 279 foreach ( $user_notify AS $key => $val ) { 280 $notifypm .= '[' . $key . ']'; 281 } 279 282 280 283 $sql = 'SELECT id FROM ' . CATEGORIES_TABLE; … … 290 293 $updateset[] = "aim = '" . $db->sql_escape($aim) . "'"; 291 294 $updateset[] = "yahoo = '" . $db->sql_escape($yim) . "'"; 292 $updateset[] = "msn = '" . $db->sql_escape($ icq) . "'";295 $updateset[] = "msn = '" . $db->sql_escape($msn) . "'"; 293 296 $updateset[] = "skype = '" . $db->sql_escape($skype) . "'"; 294 297 $updateset[] = "enabled = '" . $db->sql_escape($user_status) . "'"; 295 $updateset[] = "notify_forum = '" . $db->sql_escape($notifyreply) . "'";296 298 $updateset[] = "tzoffset = '" . $db->sql_escape($user_timezone) . "'"; 297 299 $updateset[] = "user_dst = '" . $db->sql_escape($user_dst) . "'"; … … 394 396 $signature = preg_replace($html_entities_match, $html_entities_replace, $signature); 395 397 396 $notifyreply = $this_userdata['notify_forum'];397 $notifypm = ( strpos($this_userdata['notifs'], "[pm]") !== false ? 1 : 0 );398 398 $parked = ( $this_userdata['parked'] ? 1 : 0 ); 399 399 $accept_pm = $this_userdata['acceptpms']; … … 470 470 $privacy_input .= ' <input type="radio" name="privacy" id="privacy" value="' . PRIVACY_LEVEL_HIGH . '"' . ( $this_userdata['privacy'] == PRIVACY_LEVEL_HIGH ?' checked="checked"':'') . ' /> ' . $lang['high']; 471 471 472 $notifs = array('pm', 'forum', 'comments'); 473 474 $notifs_options = ''; 475 foreach ( $notifs AS $_null => $val ) { 476 $name = 'user_notify[' . $val . ']'; 477 $notifs_options .= '<input type="checkbox" id="' . $name . '" name="' . $name . '"' . ( strpos($this_userdata['notifs'], '[' . $val . ']') !== false ? ' checked="checked"' : '' ) . ' value="1" /> ' . $lang['email_notifis_' . $val] . '<br />'; 478 } 479 472 480 $template->set_filenames(array( 473 481 "body" => "../admin/user_edit_body.tpl" … … 490 498 'SKYPE' => $skype, 491 499 'SIGNATURE' => str_replace('<br />', "\n", $signature), 492 'NOTIFY_REPLY_YES' => ( $notifyreply ) ? 'checked="checked"' : '', 493 'NOTIFY_REPLY_NO' => ( !$notifyreply ) ? 'checked="checked"' : '', 494 'NOTIFY_PM_YES' => ( $notifypm ) ? 'checked="checked"' : '', 495 'NOTIFY_PM_NO' => ( !$notifypm ) ? 'checked="checked"' : '', 500 'NOTIFY_OPTIONS' => $notifs_options, 496 501 'PARKED_YES' => ( $parked ) ? 'checked="checked"' : '', 497 502 'PARKED_NO' => ( !$parked ) ? 'checked="checked"' : '', browse.php
r315 r316 476 476 } 477 477 478 if ( $userdata['hiddentorrents'] || $userdata['class'] >= UC_MODERATOR ) {479 $template->assign_block_vars('switch_hidden_section', array());480 }481 482 478 $incldead_ary = array( 483 479 0 => $lang['include_dead'], … … 532 528 else { 533 529 $back_link = ''; 534 }535 536 if ( $userdata['class'] >= UC_UPLOADER ) {537 $template->assign_block_vars('switch_uploader_section', array());538 }539 540 if ( $searchstr ) {541 $template->assign_block_vars('switch_searchstring_section', array());542 530 } 543 531 comment.php
r313 r316 139 139 $sql = 'UPDATE ' . COMMENTS_TABLE . ' SET comment_text = ' . $updated_comment . ', comment_added = ' . time() . ' WHERE comment_id = ' . $merge_arr['comment_id']; 140 140 $db->sql_query($sql); 141 $sql = 'UPDATE ' . COMMENTS_NOTIFY_TABLE . ' SET checkcomm_notify_status = 0 WHERE checkcomm_userid != ' . $userdata['uid'] . ' AND checkcomm_notify_status = 1 AND checkcomm_for_id = ' . $id . ' AND checkcomm_type = ' . $type;142 $db->sql_query($sql);141 //$sql = 'UPDATE ' . COMMENTS_NOTIFY_TABLE . ' SET checkcomm_view_status = ' . VIEW_STATUS_NOT_VIEWED . ' WHERE checkcomm_userid != ' . $userdata['uid'] . ' AND checkcomm_view_status = 1 AND checkcomm_for_id = ' . $id . ' AND checkcomm_type = ' . $type; 142 //$db->sql_query($sql); 143 143 } 144 144 else { … … 160 160 $db->sql_query($sql); 161 161 162 $sql = 'UPDATE ' . COMMENTS_NOTIFY_TABLE . ' SET checkcomm_notify_status = 0, checkcomm_last_comment_id = ' . $newid . ' WHERE checkcomm_userid != ' . $userdata['uid'] . ' AND checkcomm_notify_status = 1 AND checkcomm_for_id = ' . $id . ' AND checkcomm_type = ' . $type;162 /*$sql = 'UPDATE ' . COMMENTS_NOTIFY_TABLE . ' SET checkcomm_view_status = ' . VIEW_STATUS_NOT_VIEWED . ', checkcomm_last_comment_id = ' . $newid . ' WHERE checkcomm_userid != ' . $userdata['uid'] . ' AND checkcomm_view_status = 1 AND checkcomm_for_id = ' . $id . ' AND checkcomm_type = ' . $type; 163 163 $db->sql_query($sql); 164 164 … … 168 168 $docheck = ( $row = $db->sql_fetchrow($result) ) ? $row['count'] : 0; 169 169 if ( !$docheck ) { 170 $sql = 'INSERT INTO ' . COMMENTS_NOTIFY_TABLE . ' (checkcomm_userid, checkcomm_for_id, checkcomm_type, checkcomm_last_comment_id ) VALUES (' . $userdata['uid'] . ', ' . $id . ', ' . $type . ', ' . $newid. ')';170 $sql = 'INSERT INTO ' . COMMENTS_NOTIFY_TABLE . ' (checkcomm_userid, checkcomm_for_id, checkcomm_type, checkcomm_last_comment_id, checkcomm_view_status) VALUES (' . $userdata['uid'] . ', ' . $id . ', ' . $type . ', ' . $newid . ', ' . VIEW_STATUS_VIEWED . ')'; 171 171 $db->sql_query($sql); 172 172 } 173 } 174 } 173 }*/ 174 } 175 176 user_notification($userdata['commentpm'], $type, array('for_id' => $id, 'last_id' => $newid, 'name' => $arr['name'])); 175 177 redirect( append_sid($root_path . 'comment.php?cid=' . $newid) ); 176 178 } … … 309 311 310 312 if ( $action == 'check' ) { 311 $sql = 'INSERT INTO ' . COMMENTS_NOTIFY_TABLE . ' (checkcomm_userid, checkcomm_for_id, checkcomm_type, checkcomm_ notify_status) VALUES (' . $userdata['uid'] . ', ' . $tid . ', ' . $type . ', 1)';313 $sql = 'INSERT INTO ' . COMMENTS_NOTIFY_TABLE . ' (checkcomm_userid, checkcomm_for_id, checkcomm_type, checkcomm_view_status) VALUES (' . $userdata['uid'] . ', ' . $tid . ', ' . $type . ', ' . VIEW_STATUS_VIEWED . ')'; 312 314 $db->sql_query($sql); 313 315 trigger_error($lang['now_check_on']); … … 358 360 $db->sql_query($sql); 359 361 360 $sql = 'UPDATE ' . COMMENTS_NOTIFY_TABLE . ' SET checkcomm_ notify_status = 1WHERE checkcomm_last_comment_id = ' . $id;362 $sql = 'UPDATE ' . COMMENTS_NOTIFY_TABLE . ' SET checkcomm_view_status = ' . VIEW_STATUS_VIEWED . ' WHERE checkcomm_last_comment_id = ' . $id; 361 363 $db->sql_query($sql); 362 364 details.php
r313 r316 662 662 } 663 663 if ( $userdata['session_logged_in'] ) { 664 $sql = 'SELECT checkcomm_ notify_status FROM ' . COMMENTS_NOTIFY_TABLE . ' WHERE checkcomm_userid = ' . $userdata['uid'] . ' AND checkcomm_type = ' . TYPE_TORRENT . ' AND checkcomm_for_id = ' . $id;664 $sql = 'SELECT checkcomm_view_status FROM ' . COMMENTS_NOTIFY_TABLE . ' WHERE checkcomm_userid = ' . $userdata['uid'] . ' AND checkcomm_type = ' . TYPE_TORRENT . ' AND checkcomm_for_id = ' . $id; 665 665 $result = $db->sql_query( $sql ); 666 666 $checkcomm = $db->sql_fetchrow( $result ); 667 667 $db->sql_freeresult( $result ); 668 668 if ( $checkcomm ) { 669 if ( !$checkcomm['checkcomm_notify_status']) {669 if ( $checkcomm['checkcomm_view_status'] == VIEW_STATUS_NOT_VIEWED ) { 670 670 $sql_priority = ( $db_type == 'mysql' ) ? ' LOW_PRIORITY' : ''; 671 $sql = 'UPDATE' . $sql_priority . ' ' . COMMENTS_NOTIFY_TABLE . ' SET checkcomm_ notify_status = 1WHERE checkcomm_userid = ' . $userdata['uid'] . ' AND checkcomm_type = ' . TYPE_TORRENT . ' AND checkcomm_for_id = ' . $id;671 $sql = 'UPDATE' . $sql_priority . ' ' . COMMENTS_NOTIFY_TABLE . ' SET checkcomm_view_status = ' . VIEW_STATUS_VIEWED . ', checkcomm_notify_status = ' . NOTIFY_STATUS_UN_NOTIFIED . ' WHERE checkcomm_userid = ' . $userdata['uid'] . ' AND checkcomm_type = ' . TYPE_TORRENT . ' AND checkcomm_for_id = ' . $id; 672 672 $db->sql_query($sql); 673 673 } docleanup.php
r313 r316 8 8 @set_time_limit(0); 9 9 10 $step = request_var('step', 0); 11 10 12 if ( $userdata['class'] < UC_SYSOP ) { 11 13 trigger_error($lang['access_denied']); 12 14 } 13 15 else { 14 if ( empty($_REQUEST['explain']) && defined('DEBUG_EXTRA') ) {15 redirect( append_sid('docleanup.php?explain=1'));16 }17 //begin sync tables, delete some old shit18 $db->sql_query('DELETE c.* FROM ' . COMMENTS_TABLE . ' c LEFT JOIN ' . TORRENTS_TABLE . ' t ON ( c.comment_for_id = t.fid ) WHERE t.name IS NULL AND c.comment_type = ' . TYPE_TORRENT);19 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned comments from torrents deleted', LOG_VIEW_SYSOP);20 $db->sql_query('DELETE f.* FROM ' . FILES_TABLE . ' f LEFT JOIN ' . TORRENTS_TABLE . ' t ON f.torrent = t.fid WHERE t.name IS NULL');21 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned files from torrents deleted', LOG_VIEW_SYSOP);22 $db->sql_query('DELETE s.* FROM ' . SOS_TABLE . ' s LEFT JOIN ' . TORRENTS_TABLE . ' t ON s.torrentid = t.fid WHERE t.name IS NULL');23 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned sos requests deleted', LOG_VIEW_SYSOP);24 $db->sql_query('DELETE t1.* FROM ' . THANKS_TABLE . ' t1 LEFT JOIN ' . TORRENTS_TABLE . ' t ON t1.torrentid = t.fid WHERE t.name IS NULL');25 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned thankses deleted', LOG_VIEW_SYSOP);26 $db->sql_query('DELETE s.* FROM ' . SNATCHED_TABLE . ' s LEFT JOIN ' . TORRENTS_TABLE . ' t ON s.torrentid = t.fid WHERE t.name IS NULL');27 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned snatched rows deleted', LOG_VIEW_SYSOP);28 $db->sql_query('DELETE r.* FROM ' . RATINGS_TABLE . ' r LEFT JOIN ' . TORRENTS_TABLE . ' t ON r.torrent = t.fid WHERE t.name IS NULL');29 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned ratings deleted', LOG_VIEW_SYSOP);30 $db->sql_query('DELETE i.* FROM ' . INDEXRELEASES_TABLE . ' i LEFT JOIN ' . TORRENTS_TABLE . ' t ON i.torrent_id = t.fid WHERE t.name IS NULL');31 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned indexreleases deleted', LOG_VIEW_SYSOP);32 $db->sql_query('DELETE c.* FROM ' . COMMENTS_NOTIFY_TABLE . ' c LEFT JOIN ' . TORRENTS_TABLE . ' t ON ( c.checkcomm_for_id = t.fid ) WHERE t.name IS NULL AND c.checkcomm_type = ' . TYPE_TORRENT);33 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned comments notifis deleted', LOG_VIEW_SYSOP);34 $db->sql_query('DELETE b.* FROM ' . BOOKMARKS_TABLE . ' b LEFT JOIN ' . TORRENTS_TABLE . ' t ON b.torrentid = t.fid WHERE t.name IS NULL');35 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned bookmarks deleted', LOG_VIEW_SYSOP);36 $db->sql_query('DELETE s.* FROM ' . SNATCHED_TABLE . ' s LEFT JOIN ' . TORRENTS_TABLE . ' t ON s.torrentid = t.fid WHERE t.name IS NULL');37 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned snatched deleted', LOG_VIEW_SYSOP);38 $db->sql_query('DELETE r.* FROM ' . REPORTS_TABLE . ' r LEFT JOIN ' . TORRENTS_TABLE . ' t ON r.votedfor = t.fid WHERE t.name IS NULL AND r.type = 2');39 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned reports deleted', LOG_VIEW_SYSOP);40 16 41 $db->sql_query('DELETE c.* FROM ' . COMMENTS_TABLE . ' c LEFT JOIN ' . REQUESTS_TABLE . ' r ON ( c.comment_for_id = r.id ) WHERE r.request IS NULL AND c.comment_type = ' . TYPE_REQUEST); 42 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned comments from requests deleted', LOG_VIEW_SYSOP); 43 $db->sql_query('DELETE c.* FROM ' . COMMENTS_TABLE . ' c LEFT JOIN ' . OFFERS_TABLE . ' o ON ( c.comment_for_id = o.id ) WHERE o.name IS NULL AND c.comment_type = ' . TYPE_OFFER); 44 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned comments from offers deleted', LOG_VIEW_SYSOP); 45 $db->sql_query('DELETE v.* FROM ' . REQUESTS_VOTES_TABLE . ' v LEFT JOIN ' . REQUESTS_TABLE . ' r ON v.requestid = r.id WHERE r.request IS NULL'); 46 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned requests votes deleted', LOG_VIEW_SYSOP); 47 $db->sql_query('DELETE ov.* FROM ' . OFFERS_VOTES_TABLE . ' ov LEFT JOIN ' . OFFERS_TABLE . ' o ON ov.offerid = o.id WHERE o.name IS NULL'); 48 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned offers votes deleted', LOG_VIEW_SYSOP); 17 switch($step) { 18 case 0: 19 $db->sql_query('DELETE c.* FROM ' . COMMENTS_TABLE . ' c LEFT JOIN ' . TORRENTS_TABLE . ' t ON ( c.comment_for_id = t.fid ) WHERE t.name IS NULL AND c.comment_type = ' . TYPE_TORRENT); 20 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned comments from torrents deleted', LOG_VIEW_SYSOP); 21 $db->sql_query('DELETE f.* FROM ' . FILES_TABLE . ' f LEFT JOIN ' . TORRENTS_TABLE . ' t ON f.torrent = t.fid WHERE t.name IS NULL'); 22 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned files from torrents deleted', LOG_VIEW_SYSOP); 23 $db->sql_query('DELETE s.* FROM ' . SOS_TABLE . ' s LEFT JOIN ' . TORRENTS_TABLE . ' t ON s.torrentid = t.fid WHERE t.name IS NULL'); 24 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned sos requests deleted', LOG_VIEW_SYSOP); 25 $db->sql_query('DELETE t1.* FROM ' . THANKS_TABLE . ' t1 LEFT JOIN ' . TORRENTS_TABLE . ' t ON t1.torrentid = t.fid WHERE t.name IS NULL'); 26 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned thankses deleted', LOG_VIEW_SYSOP); 27 $db->sql_query('DELETE s.* FROM ' . SNATCHED_TABLE . ' s LEFT JOIN ' . TORRENTS_TABLE . ' t ON s.torrentid = t.fid WHERE t.name IS NULL'); 28 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned snatched rows deleted', LOG_VIEW_SYSOP); 29 $db->sql_query('DELETE r.* FROM ' . RATINGS_TABLE . ' r LEFT JOIN ' . TORRENTS_TABLE . ' t ON r.torrent = t.fid WHERE t.name IS NULL'); 30 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned ratings deleted', LOG_VIEW_SYSOP); 31 $db->sql_query('DELETE i.* FROM ' . INDEXRELEASES_TABLE . ' i LEFT JOIN ' . TORRENTS_TABLE . ' t ON i.torrent_id = t.fid WHERE t.name IS NULL'); 32 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned indexreleases deleted', LOG_VIEW_SYSOP); 33 $db->sql_query('DELETE c.* FROM ' . COMMENTS_NOTIFY_TABLE . ' c LEFT JOIN ' . TORRENTS_TABLE . ' t ON ( c.checkcomm_for_id = t.fid ) WHERE t.name IS NULL AND c.checkcomm_type = ' . TYPE_TORRENT); 34 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned comments notifis deleted', LOG_VIEW_SYSOP); 35 $db->sql_query('DELETE b.* FROM ' . BOOKMARKS_TABLE . ' b LEFT JOIN ' . TORRENTS_TABLE . ' t ON b.torrentid = t.fid WHERE t.name IS NULL'); 36 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned bookmarks deleted', LOG_VIEW_SYSOP); 37 $db->sql_query('DELETE s.* FROM ' . SNATCHED_TABLE . ' s LEFT JOIN ' . TORRENTS_TABLE . ' t ON s.torrentid = t.fid WHERE t.name IS NULL'); 38 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned snatched deleted', LOG_VIEW_SYSOP); 39 $db->sql_query('DELETE r.* FROM ' . REPORTS_TABLE . ' r LEFT JOIN ' . TORRENTS_TABLE . ' t ON r.votedfor = t.fid WHERE t.name IS NULL AND r.type = 2'); 40 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned reports deleted', LOG_VIEW_SYSOP); 41 break; 49 42 50 $db->sql_query('DELETE m.* FROM ' . PRIVATE_MESSAGES_TABLE . ' m LEFT JOIN ' . USERS_TABLE . ' u ON m.sender = u.uid WHERE u.uid IS NULL'); 51 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned private messages deleted', LOG_VIEW_SYSOP); 52 $db->sql_query('DELETE m.* FROM ' . PRIVATE_MESSAGES_TABLE . ' m LEFT JOIN ' . USERS_TABLE . ' u ON m.receiver = u.uid WHERE u.uid IS NULL'); 53 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned private messages deleted', LOG_VIEW_SYSOP); 54 $db->sql_query('DELETE s.* FROM ' . SNATCHED_TABLE . ' s LEFT JOIN ' . USERS_TABLE . ' u ON s.userid = u.uid WHERE u.uid IS NULL'); 55 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned snatched deleted', LOG_VIEW_SYSOP); 56 $db->sql_query('DELETE f.* FROM ' . FRIENDS_TABLE . ' f LEFT JOIN ' . USERS_TABLE . ' u ON f.userid = u.uid WHERE u.uid IS NULL'); 57 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned friends deleted', LOG_VIEW_SYSOP); 58 $db->sql_query('DELETE f.* FROM ' . FRIENDS_TABLE . ' f LEFT JOIN ' . USERS_TABLE . ' u ON f.friendid = u.uid WHERE u.uid IS NULL'); 59 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned friends deleted', LOG_VIEW_SYSOP); 60 $db->sql_query('DELETE f.* FROM ' . FRIENDS_TABLE . ' f LEFT JOIN ' . USERS_TABLE . ' u ON f.blockid = u.uid WHERE u.uid IS NULL'); 61 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned friends deleted', LOG_VIEW_SYSOP); 62 $db->sql_query('DELETE r.* FROM ' . REPORTS_TABLE . ' r LEFT JOIN ' . USERS_TABLE . ' u ON r.addedby = u.uid WHERE u.uid IS NULL'); 63 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned reports deleted', LOG_VIEW_SYSOP); 64 $db->sql_query('DELETE r.* FROM ' . REPORTS_TABLE . ' r LEFT JOIN ' . USERS_TABLE . ' u ON r.votedfor = u.uid WHERE u.uid IS NULL AND r.type = 1'); 65 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned reports deleted', LOG_VIEW_SYSOP); 66 $db->sql_query('DELETE s.* FROM ' . SESSIONS_TABLE . ' s LEFT JOIN ' . USERS_TABLE . ' u ON s.session_user_id = u.uid WHERE u.uid IS NULL'); 67 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned sessions deleted', LOG_VIEW_SYSOP); 68 $db->sql_query('DELETE s.* FROM ' . SESSIONS_KEYS_TABLE . ' s LEFT JOIN ' . USERS_TABLE . ' u ON s.user_id = u.uid WHERE u.uid IS NULL'); 69 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned session keys deleted', LOG_VIEW_SYSOP); 70 //end sync tables, delete some old shit 43 case 1: 44 $db->sql_query('DELETE c.* FROM ' . COMMENTS_TABLE . ' c LEFT JOIN ' . REQUESTS_TABLE . ' r ON ( c.comment_for_id = r.id ) WHERE r.request IS NULL AND c.comment_type = ' . TYPE_REQUEST); 45 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned comments from requests deleted', LOG_VIEW_SYSOP); 46 $db->sql_query('DELETE c.* FROM ' . COMMENTS_TABLE . ' c LEFT JOIN ' . OFFERS_TABLE . ' o ON ( c.comment_for_id = o.id ) WHERE o.name IS NULL AND c.comment_type = ' . TYPE_OFFER); 47 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned comments from offers deleted', LOG_VIEW_SYSOP); 48 $db->sql_query('DELETE v.* FROM ' . REQUESTS_VOTES_TABLE . ' v LEFT JOIN ' . REQUESTS_TABLE . ' r ON v.requestid = r.id WHERE r.request IS NULL'); 49 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned requests votes deleted', LOG_VIEW_SYSOP); 50 $db->sql_query('DELETE ov.* FROM ' . OFFERS_VOTES_TABLE . ' ov LEFT JOIN ' . OFFERS_TABLE . ' o ON ov.offerid = o.id WHERE o.name IS NULL'); 51 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned offers votes deleted', LOG_VIEW_SYSOP); 52 break; 71 53 72 //begin delete some old torrent-files and not torrent files from torrents dir 73 $sql = 'SELECT fid FROM ' . TORRENTS_TABLE; 74 $result = $db->sql_query($sql); 75 $torrents = $files = $delete_files = array(); 76 while ($row = $db->sql_fetchrow($result)) { 77 $torrents[$row['fid']] = 1; 78 } 79 $torrent_dir = $root_path . ( !empty($config['torrent_dir']) ? $config['torrent_dir'] : 'torrents'); 54 case 2: 55 $db->sql_query('DELETE m.* FROM ' . PRIVATE_MESSAGES_TABLE . ' m LEFT JOIN ' . USERS_TABLE . ' u ON m.sender = u.uid WHERE u.uid IS NULL'); 56 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned private messages deleted', LOG_VIEW_SYSOP); 57 $db->sql_query('DELETE m.* FROM ' . PRIVATE_MESSAGES_TABLE . ' m LEFT JOIN ' . USERS_TABLE . ' u ON m.receiver = u.uid WHERE u.uid IS NULL'); 58 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned private messages deleted', LOG_VIEW_SYSOP); 59 $db->sql_query('DELETE s.* FROM ' . SNATCHED_TABLE . ' s LEFT JOIN ' . USERS_TABLE . ' u ON s.userid = u.uid WHERE u.uid IS NULL'); 60 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned snatched deleted', LOG_VIEW_SYSOP); 61 $db->sql_query('DELETE f.* FROM ' . FRIENDS_TABLE . ' f LEFT JOIN ' . USERS_TABLE . ' u ON f.userid = u.uid WHERE u.uid IS NULL'); 62 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned friends deleted', LOG_VIEW_SYSOP); 63 $db->sql_query('DELETE f.* FROM ' . FRIENDS_TABLE . ' f LEFT JOIN ' . USERS_TABLE . ' u ON f.friendid = u.uid WHERE u.uid IS NULL'); 64 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned friends deleted', LOG_VIEW_SYSOP); 65 $db->sql_query('DELETE f.* FROM ' . FRIENDS_TABLE . ' f LEFT JOIN ' . USERS_TABLE . ' u ON f.blockid = u.uid WHERE u.uid IS NULL'); 66 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned friends deleted', LOG_VIEW_SYSOP); 67 $db->sql_query('DELETE r.* FROM ' . REPORTS_TABLE . ' r LEFT JOIN ' . USERS_TABLE . ' u ON r.addedby = u.uid WHERE u.uid IS NULL'); 68 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned reports deleted', LOG_VIEW_SYSOP); 69 $db->sql_query('DELETE r.* FROM ' . REPORTS_TABLE . ' r LEFT JOIN ' . USERS_TABLE . ' u ON r.votedfor = u.uid WHERE u.uid IS NULL AND r.type = 1'); 70 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned reports deleted', LOG_VIEW_SYSOP); 71 $db->sql_query('DELETE s.* FROM ' . SESSIONS_TABLE . ' s LEFT JOIN ' . USERS_TABLE . ' u ON s.session_user_id = u.uid WHERE u.uid IS NULL'); 72 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned sessions deleted', LOG_VIEW_SYSOP); 73 $db->sql_query('DELETE s.* FROM ' . SESSIONS_KEYS_TABLE . ' s LEFT JOIN ' . USERS_TABLE . ' u ON s.user_id = u.uid WHERE u.uid IS NULL'); 74 write_log('docleanup - ' . $db->sql_affectedrows() . ' orphaned session keys deleted', LOG_VIEW_SYSOP); 75 break; 80 76 81 if ( $dp = opendir($torrent_dir . DIRECTORY_SEPARATOR) ) { 82 while ( ( $file = readdir($dp) ) !== false ) { 83 if ( $file != '.' && $file != '..' && !is_dir($torrent_dir . DIRECTORY_SEPARATOR . $file) ) { 84 if ( !preg_match('/^(\d+)\.torrent$/', $file, $matches) ) { 85 $delete_files[] = $file; 86 } 87 else { 88 if ( !isset($torrents[$matches[1]]) ) { 89 $delete_files[] = $file; 77 case 3: 78 //begin delete some old torrent-files and not torrent files from torrents dir 79 $sql = 'SELECT fid FROM ' . TORRENTS_TABLE; 80 $result = $db->sql_query($sql); 81 $torrents = $files = $delete_files = array(); 82 while ($row = $db->sql_fetchrow($result)) { 83 $torrents[$row['fid']] = 1; 84 } 85 $torrent_dir = $root_path . ( !empty($config['torrent_dir']) ? $config['torrent_dir'] : 'torrents'); 86 87 if ( $dp = opendir($torrent_dir . DIRECTORY_SEPARATOR) ) { 88 while ( ( $file = readdir($dp) ) !== false ) { 89 if ( $file != '.' && $file != '..' && !is_dir($torrent_dir . DIRECTORY_SEPARATOR . $file) ) { 90 if ( !preg_match('/^(\d+)\.torrent$/', $file, $matches) ) { 91 $delete_files[] = $file; 92 } 93 else { 94 if ( !isset($torrents[$matches[1]]) ) { 95 $delete_files[] = $file; 96 } 97 } 90 98 } 91 99 } 100 closedir($dp); 92 101 } 93 } 94 closedir($dp); 95 } 96 if ( sizeof($delete_files) ) { 97 for ( $i = 0; $i < sizeof($delete_files); ++$i ) { 98 @unlink($torrent_dir . '/' . $delete_files[$i]); 99 write_log('docleanup - ' . $delete_files[$i] . ' file deleted - not present in torrents table', LOG_VIEW_SYSOP); 100 } 101 } 102 //end delete some old torrent-files and not torrent files from torrents dir 102 if ( sizeof($delete_files) ) { 103 for ( $i = 0; $i < sizeof($delete_files); ++$i ) { 104 @unlink($torrent_dir . '/' . $delete_files[$i]); 105 write_log('docleanup - ' . $delete_files[$i] . ' file deleted - not present in torrents table', LOG_VIEW_SYSOP); 106 } 107 } 108 //end delete some old torrent-files and not torrent files from torrents dir 109 break; 103 110 104 $user_uid = array(); 105 $sql = 'SELECT COUNT(m.id) AS unread_pms, m.receiver, u.user_unread_pms 111 case 4: 112 $user_uid = array(); 113 $sql = 'SELECT COUNT(m.id) AS unread_pms, m.receiver, u.user_unread_pms 106 114 FROM ' . PRIVATE_MESSAGES_TABLE . ' m, ' . USERS_TABLE . ' u 107 115 WHERE m.unread = 1 AND m.location = 1 AND m.receiver = u.uid 108 116 GROUP BY m.receiver 109 117 HAVING COUNT(m.id) <> user_unread_pms'; 110 $result = $db->sql_query($sql);111 if ( $row = $db->sql_fetchrow($result) ) {112 do {113 $user_uid[$row['user_unread_pms']][] = $row['receiver'];114 }115 while ( $row = $db->sql_fetchrow($result) );118 $result = $db->sql_query($sql); 119 if ( $row = $db->sql_fetchrow($result) ) { 120 do { 121 $user_uid[$row['user_unread_pms']][] = $row['receiver']; 122 } 123 while ( $row = $db->sql_fetchrow($result) ); 116 124 117 foreach ( $user_uid AS $pms_count => $ary ) { 118 $sql = 'UPDATE ' . USERS_TABLE . ' SET user_unread_pms = ' . $pms_count . ' WHERE ' . $db->sql_in_set('uid', $ary); 125 foreach ( $user_uid AS $pms_count => $ary ) { 126 $sql = 'UPDATE ' . USERS_TABLE . ' SET user_unread_pms = ' . $pms_count . ' WHERE ' . $db->sql_in_set('uid', $ary); 127 $db->sql_query($sql); 128 } 129 130 write_log('docleanup - ' . sizeof($user_uid) . ' user PMs count updated', LOG_VIEW_SYSOP); 131 } 132 break; 133 134 case 5: 135 $user_limit_ary_torrents = unserialize($config['user_limit_ary_torrents']); 136 $user_limit_ary_allow_download = unserialize($config['user_limit_ary_allow_download']); 137 $users_class_arr = array(); 138 $i = 0; 139 while ( get_user_class_name($i) !== '' ) { 140 $can_leech = ( isset($user_limit_ary_allow_download[$i]) ? 1 : 0 ); 141 $sql = 'UPDATE ' . USERS_TABLE . ' SET torrents_limit = ' . $user_limit_ary_torrents[$i] . ', can_leech = ' . $can_leech . ' WHERE class = ' . $i; 142 $db->sql_query($sql); 143 ++$i; 144 write_log('docleanup - ' . $db->sql_affectedrows() . ' users torrent limits updated', LOG_VIEW_SYSOP); 145 } 146 147 $sql = 'UPDATE ' . USERS_TABLE . ' SET torrents_limit = ' . $user_limit_ary_torrents['D'] . ' WHERE donor = 1'; 119 148 $db->sql_query($sql); 120 }149 write_log('docleanup - ' . $db->sql_affectedrows() . ' users torrent limits updated', LOG_VIEW_SYSOP); 121 150 122 write_log('docleanup - ' . sizeof($user_uid) . ' user PMs count updated', LOG_VIEW_SYSOP); 151 $sql = 'UPDATE ' . USERS_TABLE . ' SET torrents_limit = ' . $user_limit_ary_torrents['W'] . ' WHERE warneduntil > 0'; 152 $db->sql_query($sql); 153 write_log('docleanup - ' . $db->sql_affectedrows() . ' users torrent limits updated', LOG_VIEW_SYSOP); 154 break; 155 156 case 6: 157 $sql = 'SELECT t.fid, u.uid FROM ' . TORRENTS_TABLE . ' t LEFT JOIN ' . USERS_TABLE . ' u ON ( t.owner = u.uid ) WHERE u.uid IS NULL'; 158 $result = $db->sql_query($sql); 159 if ( $row = $db->sql_fetchrow($result) ) { 160 $i = 0; 161 do { 162 $sql = 'UPDATE ' . TORRENTS_TABLE . ' SET owner = ' . ANONYMOUS . ' WHERE fid = ' . $row['fid']; 163 $db->sql_query($sql); 164 165 ++$i; 166 } 167 while ( $row = $db->sql_fetchrow($result) ); 168 169 write_log('docleanup - ' . $i . ' torrent owner fixed', LOG_VIEW_SYSOP); 170 } 171 break; 172 173 default: 174 trigger_error('all is ok'); 175 break; 176 123 177 } 124 178 125 $user_limit_ary_torrents = unserialize($config['user_limit_ary_torrents']); 126 $user_limit_ary_allow_download = unserialize($config['user_limit_ary_allow_download']); 127 $users_class_arr = array(); 128 $i = 0; 129 while ( get_user_class_name($i) !== '' ) { 130 $can_leech = ( isset($user_limit_ary_allow_download[$i]) ? 1 : 0 ); 131 $sql = 'UPDATE ' . USERS_TABLE . ' SET torrents_limit = ' . $user_limit_ary_torrents[$i] . ', can_leech = ' . $can_leech . ' WHERE class = ' . $i; 132 $db->sql_query($sql); 133 ++$i; 134 write_log('docleanup - ' . $db->sql_affectedrows() . ' users torrent limits updated', LOG_VIEW_SYSOP); 135 } 136 137 $sql = 'UPDATE ' . USERS_TABLE . ' SET torrents_limit = ' . $user_limit_ary_torrents['D'] . ' WHERE donor = 1'; 138 $db->sql_query($sql); 139 write_log('docleanup - ' . $db->sql_affectedrows() . ' users torrent limits updated', LOG_VIEW_SYSOP); 140 141 $sql = 'UPDATE ' . USERS_TABLE . ' SET torrents_limit = ' . $user_limit_ary_torrents['W'] . ' WHERE warneduntil > 0'; 142 $db->sql_query($sql); 143 write_log('docleanup - ' . $db->sql_affectedrows() . ' users torrent limits updated', LOG_VIEW_SYSOP); 144 145 $sql = 'SELECT t.fid, u.uid FROM ' . TORRENTS_TABLE . ' t LEFT JOIN ' . USERS_TABLE . ' u ON ( t.owner = u.uid ) WHERE u.uid IS NULL'; 146 $result = $db->sql_query($sql); 147 if ( $row = $db->sql_fetchrow($result) ) { 148 $i = 0; 149 do { 150 $sql = 'UPDATE ' . TORRENTS_TABLE . ' SET owner = ' . ANONYMOUS . ' WHERE fid = ' . $row['fid']; 151 $db->sql_query($sql); 152 153 ++$i; 154 } 155 while ( $row = $db->sql_fetchrow($result) ); 156 157 write_log('docleanup - ' . $i . ' torrent owner fixed', LOG_VIEW_SYSOP); 158 } 159 160 trigger_error('all is ok'); 179 meta_refresh(10, append_sid($root_path . 'docleanup.php?step=' . ($step + 1) )); 180 trigger_error('Wait 10 seconds'); 161 181 } 162 182 ?> include/constants.php
r308 r316 80 80 define('TOPIC_LOCKED', 1); 81 81 define('TOPIC_MOVED', 2); 82 define('TOPIC_WATCH_NOTIFIED', 1);83 define('TOPIC_WATCH_UN_NOTIFIED', 0);84 85 82 86 83 // Topic types … … 146 143 define('TYPE_OFFER', 3); 147 144 define('TYPE_NEWS', 4); 145 define('TYPE_FORUM_POST', 5); 146 147 148 define('NOTIFY_STATUS_NOTIFIED', 1); 149 define('NOTIFY_STATUS_UN_NOTIFIED', 0); 150 define('VIEW_STATUS_VIEWED', 1); 151 define('VIEW_STATUS_NOT_VIEWED', 0); 148 152 149 153 //simpaty type … … 189 193 define('SEARCH_MATCH_TABLE', 'forum_search_wordmatch'); 190 194 define('TOPICS_TABLE', 'forum_topics'); 191 define('TOPICS_WATCH_TABLE', 'forum_topics_watch');192 195 define('USER_GROUP_TABLE', 'forum_user_group'); 193 196 define('FRIENDS_TABLE', 'friends'); include/functions.php
r315 r316 889 889 function getagent($httpagent, $peer_id) { 890 890 891 $httpagents = $peerids = $clients = array(); 892 893 $peerids[] = '/.*BC00([0-9]{2}).*/s'; 894 $clients[] = 'BitComet/0.\\1'; 895 896 $peerids[] = '/.*FG[0-9]+([0-9]+)([0-9]+)([0-9]+).*/s'; 897 $clients[] = 'FlashGet/\\1.\\2.\\3'; 898 899 $peerids[] = '/.*exbc\08.*/s'; 900 $clients[] = 'BitComet/0.56'; 901 902 $peerids[] = '/.*exbc\09.*/s'; 903 $clients[] = 'BitComet/0.57'; 904 905 $peerids[] = '/.*exbc\0:.*/s'; 906 $clients[] = 'BitComet/0.58'; 907 908 $peerids[] = '/.*exbc\0L.*/s'; 909 $clients[] = 'BitLord/1.0'; 910 911 $peerids[] = '/.*exbcL.*/s'; 912 $clients[] = 'BitLord/1.1'; 913 914 $peerids[] = '/.*UDP0.*/s'; 915 $clients[] = 'BitSpirit v.3'; 916 917 $peerids[] = '/.*ML([0-9]+).([0-9]+).([0-9]+).*/s'; 918 $clients[] = 'MLDonkey/\\1.\\2.\\3'; 919 920 $peerids[] = '/.*UT([0-9]+)([0-9]+)([0-9]+)([0-9A-Z]+).*/s'; 921 $clients[] = 'μTorrent/\\1.\\2.\\3.\\4'; 922 923 $peerids[] = '/.*CT([0-9]+)([0-9]+)([0-9]+)([0-9]+).*/s'; 924 $clients[] = 'cTorrent/\\1.\\2.\\3.\\4'; 925 926 $peerids[] = '/.*CD[0-9]+([0-9]+)[0-9]+([0-9]+).*/s'; 927 $clients[] = 'Enhanced CTorrent/\\1.\\2'; 928 929 $peerids[] = '/.*KT([0-9])([0-9])([0-9A-Z])([0-9A-Z]).*/s'; 930 $clients[] = 'KTorrent/\\1.\\2.\\3.\\4'; 931 932 $peerids[] = '/.*btpd\/([0-9]+\.[0-9]{2}).*/s'; 933 $clients[] = 'btpd/\\1'; 934 935 $peerids[] = '/.*M([0-9])-([0-9])-([0-9]).*/s'; 936 $clients[] = 'BitTorrent/\\1.\\2.\\3'; 937 938 $peerids[] = '/-G3.*/s'; 939 $clients[] = 'G3 Torrent'; 940 941 $peerids[] = '/.*AZ([0-9])([0-9])([0-9])([0-9]).*/s'; 942 $clients[] = 'Azureus/\\1.\\2.\\3.\\4'; 943 944 $peerids[] = '/.*LP([0-9])([0-9])([0-9])([0-9]).*/s'; 945 $clients[] = 'Lphant/\\2.\\3\\4'; 946 947 $peerids[] = '/.*DE([0-9])([0-9])([0-9])([0-9]).*/s'; 948 $clients[] = 'Deluge/\\1.\\2.\\3'; 949 950 $peerids[] = '/.*XX([0-9])([0-9])([0-9])([0-9]).*/s'; 951 $clients[] = 'Xtorrent/\\1.\\2'; 952 953 $recognised_client = preg_replace($peerids, $clients, $peer_id); 954 955 if ( $recognised_client != $peer_id ) { 956 return $recognised_client; 957 } 958 else { 959 $clients = array(); 960 961 $httpagents[] = '/.*Bitcomet Turbo ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]).*/s'; 962 $clients[] = 'Bitcomet Turbo/\\1'; 963 964 $httpagents[] = '/.*BitTorrent\/S-([0-9]+\.[0-9]+\.[0-9]+).*/s'; 965 $clients[] = 'Shadow\'s/\\1'; 966 967 $httpagents[] = '/.*BitTorrent\/([0-9]+\.[0-9]+\.[0-9]+).*/s'; 968 $clients[] = 'Bittorrent/\\1'; 969 970 $httpagents[] = '/.*BitTorrent\/U-([0-9]+\.[0-9]+\.[0-9]+).*/s'; 971 $clients[] = 'UPnP/\\1'; 972 973 $httpagents[] = '/.*BitTor(rent|nado)\/T-(.+).*/s'; 974 $clients[] = 'BitTornado/\\2'; 975 976 $httpagents[] = '/.*ABC-([0-9]+\.[0-9]+\.[0-9]).*/s'; 977 $clients[] = 'ABC/\\1'; 978 979 $httpagents[] = '/.*Fast Torrent ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]).*/s'; 980 $clients[] = 'Fast Torrent/\\1'; 981 982 $httpagents[] = '/.*rtorrent\/([0-9]+\.[0-9]+\.[0-9]).*/s'; 983 $clients[] = 'rtorrent/\\1'; 984 985 $httpagents[] = '/.*Python-urllib\/.+?, BitTorrent\/([0-9]+\.[0-9]+\.[0-9]+).*/s'; 986 $clients[] = 'BitTorrent/\\1'; 987 988 $httpagents[] = '/.*DansClient.*/s'; 989 $clients[] = 'XanTorrent'; 990 991 $httpagents[] = '/.*BitTorrent\/brst.*/s'; 992 $clients[] = 'Burst/\\1'; 993 994 $httpagents[] = '/.*Shareaza ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]).*/s'; 995 $clients[] = 'Shareaza/\\1'; 996 997 $httpagents[] = '/.*Rufus\/([0-9]+\.[0-9]+\.[0-9]+).*/s'; 998 $clients[] = 'Rufus/\\1'; 999 1000 $httpagents[] = '/.*eXeem ([0-9]+\.[0-9]{2}).*/s'; 1001 $clients[] = 'eXeem \\1'; 1002 1003 $httpagents[] = '/.*BinTorrent ([0-9]+\.[0-9]+).*/s'; 1004 $clients[] = 'BinTorrent \\1'; 1005 1006 $httpagents[] = '/.*ML(Donkey)\/([0-9]+)\.([0-9]+)(\.([0-9]+)|).*/si'; 1007 $clients[] = 'MLDonkey/\\2.\\3.\\4'; 1008 1009 $httpagents[] = '/.*ed2k_plugin v([0-9]+\.[0-9]+).*/s'; 1010 $clients[] = 'eDonkey/\\1'; 1011 1012 $httpagents[] = '/.*0P3R4H.*/s'; 1013 $clients[] = 'Opera BT Client'; 1014 1015 $httpagents[] = '/.*Opera\/([0-9]+)\.([0-9]+).*/s'; 1016 $clients[] = 'Opera/\\1.\\2'; 1017 1018 $httpagents[] = '/.*qBittorrent v([0-9]+)\.([0-9]+)\.([0-9]+)*/s'; 1019 $clients[] = 'qBittorrent/\\1.\\2.\\3'; 1020 1021 $httpagents[] = '/.*Ares ([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)*/s'; 1022 $clients[] = 'Ares/\\1.\\2.\\3.\\4'; 1023 1024 $httpagents[] = '/.*libtorrent(\/| )([0-9]+)\.([0-9]+)\.([0-9]+)(\.([0-9]+)|)*/s'; 1025 $clients[] = 'libtorrent/\\2.\\3'; 1026 1027 $httpagents[] = '/.*Transmission\/([0-9]+)\.([0-9]+)([0-9]+|)([0-9A-Z]+|).*/s'; 1028 $clients[] = ' Transmission/\\1.\\2 '; 1029 1030 $httpagents[] = '/.*LimeWire\/([0-9]+)\.([0-9]+)\.([0-9]+).*/s'; 1031 $clients[] = ' LimeWire/\\1.\\2.\\3 '; 1032 1033 $httpagents[] = '/.*supertorrent.*/s'; 1034 $clients[] = 'SuperTorrent'; 1035 1036 $httpagents[] = '/.*Halite v ([0-9]+)\.([0-9]+)\.([0-9]+).*/s'; 1037 $clients[] = 'Halite/\\1.\\2.\\3'; 1038 1039 $recognised_client = preg_replace($httpagents, $clients, $httpagent); 1040 1041 if ( $recognised_client != $httpagent ) { 1042 return trim($recognised_client); 1043 } 1044 else { 1045 return '---'; 1046 } 1047 } 891 $peer_ids = array( 892 'BC0([0-9])([0-9])([0-9])' => 'BitComet/', 893 'FG[0-9]+([0-9]+)([0-9]+)([0-9]+)' => 'FlashGet/', 894 'exbc\08' => 'BitComet/0.56', 895 'exbc\09' => 'BitComet/0.57', 896 'exbc\0:' => 'BitComet/0.58', 897 'exbc\0L' => 'BitLord/1.0', 898 'exbcL' => 'BitLord/1.1', 899 'UDP0' => 'BitSpirit v.3', 900 'ML([0-9]+).([0-9]+).([0-9]+)' => 'MLDonkey/', 901 'UT([0-9]+)([0-9]+)([0-9]+)([0-9A-Z]+)' => 'μTorrent/', 902 'CT([0-9]+)([0-9]+)([0-9]+)([0-9]+)' => 'cTorrent/', 903 'CD[0-9]+([0-9]+)[0-9]+([0-9]+)' => 'Enhanced CTorrent/', 904 'KT([0-9])([0-9])([0-9A-Z])([0-9A-Z])' => 'KTorrent/', 905 'btpd\/([0-9]+\.[0-9]{2})' => 'btpd/\\1', 906 'M([0-9])-([0-9])-([0-9])' => 'BitTorrent/', 907 '-G3' => 'G3 Torrent', 908 'AZ([0-9])([0-9])([0-9])([0-9])' => 'Azureus/', 909 'LP[0-9]([0-9])([0-9])([0-9])' => 'Lphant/', 910 'DE([0-9])([0-9])([0-9])([0-9])' => 'Deluge/', 911 'XX([0-9])([0-9])([0-9])([0-9])' => 'Xtorrent/', 912 'TR([0-9])([0-9])([0-9])([0-9])' => 'Transmission/', 913 'LT([0-9])([0-9A-Z])([0-9])([0-9])' => 'libtorrent/', 914 'UM([0-9]+)([0-9]+)([0-9]+)([0-9A-Z]+)' => 'Mac μTorrent/', 915 ); 916 917 foreach ( $peer_ids as $pattern => $recog ) { 918 if ( preg_match('/' . $pattern . '/si', $peer_id, $matches) ) { 919 unset($matches[0]); 920 return $recog . implode('.', $matches); 921 } 922 } 923 924 $httpagents = array( 925 'Bitcomet Turbo ([0-9]+\.[0-9]+\.[0-9]+\.[0-9])' => 'Bitcomet Turbo/', 926 'BitTorrent\/S-([0-9]+\.[0-9]+\.[0-9]+)' => 'Shadow\'s/', 927 'BitTorrent\/([0-9]+\.[0-9]+\.[0-9]+)' => 'Bittorrent/', 928 'BitTorrent\/U-([0-9]+\.[0-9]+\.[0-9]+)' => 'UPnP/', 929 'BitTor(rent|nado)\/T-(.+)' => 'BitTornado/', 930 'ABC-([0-9]+\.[0-9]+\.[0-9])' => 'ABC/', 931 'Fast Torrent ([0-9]+\.[0-9]+\.[0-9]+\.[0-9])' => 'Fast Torrent/', 932 'rtorrent\/([0-9]+\.[0-9]+\.[0-9])' => 'rtorrent/', 933 'Python-urllib\/.+?, BitTorrent\/([0-9]+\.[0-9]+\.[0-9]+)' => 'BitTorrent/', 934 'DansClient' => 'XanTorrent', 935 'BitTorrent\/brst.' => 'Burst/', 936 'Shareaza ([0-9]+\.[0-9]+\.[0-9]+\.[0-9])' => 'Shareaza/', 937 'Rufus\/([0-9]+\.[0-9]+\.[0-9]+)' => 'Rufus/', 938 'eXeem ([0-9]+\.[0-9]{2})' => 'eXeem/', 939 'BinTorrent ([0-9]+\.[0-9]+)' => 'BinTorrent/', 940 'ML(Donkey)\/([0-9]+)\.([0-9]+)(\.([0-9]+)|)' => 'MLDonkey/', 941 'ed2k_plugin v([0-9]+\.[0-9]+)' => 'eDonkey/', 942 '0P3R4H' => 'Opera BT Client', 943 'Opera\/([0-9]+)\.([0-9]+)' => 'Opera/', 944 'qBittorrent v([0-9]+)\.([0-9]+)\.([0-9]+)' => 'qBittorrent/', 945 'Ares ([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)' => 'Ares/', 946 'LimeWire\/([0-9]+)\.([0-9]+)\.([0-9]+)' => 'LimeWire/', 947 'supertorrent' => 'SuperTorrent', 948 'Halite v ([0-9]+)\.([0-9]+)\.([0-9]+)' => 'Halite/\\1.\\2.\\3', 949 ); 950 951 foreach ( $httpagents as $pattern => $recog ) { 952 if ( preg_match('/' . $pattern . '/si', $httpagent, $matches) ) { 953 unset($matches[0]); 954 return $recog . implode('.', $matches); 955 } 956 } 957 return '---'; 1048 958 } 1049 959 … … 1591 1501 'PAGE_DESCRIPTION' => $page_description, 1592 1502 'S_USER_LOGGED_IN' => $userdata['session_logged_in'], 1503 1504 'RSS_FEED' => '<link rel="alternate" type="application/rss+xml" title="' . $config['sitename'] . '" href="' . generate_base_url() . '/rss.php' . ( $userdata['session_logged_in'] ? '?passkey=' . $userdata['torrent_pass'] : '' ) . '" />' . "\n", 1593 1505 1594 1506 'S_USER_IS_MOD' => ( $userdata['class'] >= UC_MODERATOR ) ? 1 : 0, … … 1698 1610 1699 1611 $template->assign_vars(array( 1700 'RSS_FEED' => '<link rel="alternate" type="application/rss+xml" title="' . $config['sitename'] . '" href="' . generate_base_url() . '/rss.php?passkey=' . $userdata['torrent_pass'] . '" />' . "\n",1701 1612 'S_YOU_HAVE_INVITES' => sprintf($lang['you_have_invites'], $userdata['invites']), 1702 1613 'U_LOGOUT' => append_sid($root_path . 'login.php?action=logout'), include/functions_delete.php
r295 r316 101 101 $sql = 'DELETE FROM ' . THANKS_TABLE . ' WHERE userid IN (' . implode(',', $arr_ids) . ')'; 102 102 $db->sql_query($sql); 103 $sql = 'DELETE FROM ' . TOPICS_WATCH_TABLE . ' WHERE user_id IN (' . implode(',', $arr_ids) . ')';104 $db->sql_query($sql);105 103 $sql = 'DELETE FROM ' . USER_GROUP_TABLE . ' WHERE user_id IN (' . implode(',', $arr_ids) . ')'; 106 104 $db->sql_query($sql); include/functions_post.php
r313 r316 352 352 353 353 if ( $row['uid'] <> ANONYMOUS ) { 354 if ( ( $row['class'] == UC_VIP || $row['privacy'] <> PRIVACY_LEVEL_LOW ) && ( $userdata['class'] < UC_MODERATOR && $userdata['uid'] != $row[' comment_user'] ) ) {354 if ( ( $row['class'] == UC_VIP || $row['privacy'] <> PRIVACY_LEVEL_LOW ) && ( $userdata['class'] < UC_MODERATOR && $userdata['uid'] != $row['uid'] ) ) { 355 355 $ratio = '---'; 356 356 $uploaded = '---'; include/sessions.php
r313 r316 1351 1351 } 1352 1352 1353 // 1354 // Handle user notification 1355 // 1356 function user_notification($notify_user, $notify_type, $info_data) 1357 { 1358 global $config, $lang, $db, $root_path, $phpEx, $cache; 1359 global $userdata, $user_ip; 1360 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 1361 global $seo; 1362 // www.phpBB-SEO.com SEO TOOLKIT END 1363 1364 $current_time = time(); 1365 $base_url = generate_base_url(); 1366 1367 switch ( $notify_type ) { 1368 case TYPE_FORUM_POST: 1369 1370 if ( $info_data['mode'] <> 'reply' ) { 1371 return; 1372 } 1373 1374 $post_id = $info_data['post_id']; 1375 $topic_id = $info_data['topic_id']; 1376 1377 $for_id = $topic_id; 1378 $last_id = $post_id; 1379 $notifs_type = '[forum]'; 1380 1381 $email_template = 'topic_notify'; 1382 1383 $title = censor_text(unprepare_message($info_data['topic_title'])); 1384 1385 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 1386 if ( $seo->seo_opt['url_rewrite'] ) { 1387 $seo->set_url(htmlspecialchars_decode($title), $topic_id, $seo->seo_static['topic']); 1388 1389 $u_view_url = append_sid($root_path . "phpbb2.php?page=viewtopic&" . POST_POST_URL . "=$post_id#$post_id", false, false); 1390 $u_view_url = $seo->drop_sid($u_view_url); 1391 1392 $u_stop_watching = append_sid($root_path . "phpbb2.php?page=viewtopic&" . POST_TOPIC_URL . "=$topic_id&unwatch=topic", false, false); 1393 $u_stop_watching = $seo->drop_sid($u_stop_watching); 1394 } 1395 // www.phpBB-SEO.com SEO TOOLKIT END 1396 else { 1397 $u_view_url = $base_url . "/phpbb2.php?page=viewtopic&" . POST_POST_URL . "=$post_id#$post_id"; 1398 $u_stop_watching = $base_url . "/phpbb2.php?page=viewtopic&" . POST_TOPIC_URL . "=$topic_id&unwatch=topic"; 1399 } 1400 break; 1401 1402 case TYPE_TORRENT: 1403 case TYPE_REQUEST: 1404 case TYPE_OFFER: 1405 case TYPE_NEWS: 1406 1407 $for_id = $info_data['for_id']; 1408 $last_id = $info_data['last_id']; 1409 $notifs_type = '[comments]'; 1410 1411 $title = $info_data['name']; 1412 1413 $email_template = 'comments_notify'; 1414 1415 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 1416 if ( $seo->seo_opt['url_rewrite'] ) { 1417 $u_stop_watching = append_sid($root_path . "comment.php?type=$notify_type&action=checkoff&tid=$for_id", false, false); 1418 $u_stop_watching = $seo->drop_sid($u_stop_watching); 1419 1420 $u_view_url = append_sid($root_path . 'comment.php?cid=' . $last_id, false, false); 1421 $u_view_url = $seo->drop_sid($u_view_url); 1422 } 1423 // www.phpBB-SEO.com SEO TOOLKIT END 1424 else { 1425 $u_stop_watching = $base_url . "/comment.php?type=$notify_type&action=checkoff&tid=$for_id"; 1426 $u_view_url = $base_url . '/comment.php?cid=' . $last_id; 1427 } 1428 1429 break; 1430 } 1431 1432 1433 $sql = "SELECT u.uid, u.email, u.language, u.notifs 1434 FROM " . COMMENTS_NOTIFY_TABLE . " tw, " . USERS_TABLE . " u 1435 WHERE tw.checkcomm_for_id = " . $for_id . " 1436 AND tw.checkcomm_userid NOT IN (" . $userdata['uid'] . ", " . ANONYMOUS . ") 1437 AND tw.checkcomm_notify_status = " . NOTIFY_STATUS_UN_NOTIFIED . " 1438 AND u.uid = tw.checkcomm_userid 1439 AND u.enabled = 1 1440 AND tw.checkcomm_type = " . $notify_type; 1441 $result = $db->sql_query($sql); 1442 1443 $update_watched_sql = ''; 1444 $bcc_list_ary = array(); 1445 1446 if ( $row = $db->sql_fetchrow($result) ) { 1447 // Sixty second limit 1448 @set_time_limit(60); 1449 1450 do 1451 { 1452 if ( strpos($row['notifs'], $notifs_type) !== false ) 1453 { 1454 $bcc_list_ary[$row['language']][] = $row['email']; 1455 } 1456 $update_watched_sql .= ($update_watched_sql != '') ? ', ' . $row['uid'] : $row['uid']; 1457 } 1458 while ( $row = $db->sql_fetchrow($result) ); 1459 1460 if ( sizeof($bcc_list_ary) ) 1461 { 1462 include_once($root_path . 'include/functions_messenger.php'); 1463 $messenger = new messenger(true); 1464 1465 foreach ( $bcc_list_ary AS $user_lang => $bcc_list ) { 1466 1467 foreach ( $bcc_list AS $_null => $email ) { 1468 1469 $messenger->template($email_template, $user_lang); 1470 1471 $messenger->to($email, $email); 1472 1473 $messenger->assign_vars(array( 1474 'TITLE' => $title, 1475 'U_VIEW_URL' => $u_view_url, 1476 'U_STOP_WATCHING' => $u_stop_watching 1477 )); 1478 1479 $messenger->send(NOTIFY_EMAIL); 1480 } 1481 } 1482 $messenger->save_queue(); 1483 } 1484 } 1485 $db->sql_freeresult($result); 1486 1487 if ( $update_watched_sql ) 1488 { 1489 $sql = 'UPDATE ' . COMMENTS_NOTIFY_TABLE . ' SET ' . $db->sql_build_array('UPDATE', array( 1490 'checkcomm_notify_status' => NOTIFY_STATUS_NOTIFIED, 1491 'checkcomm_last_comment_id' => $last_id, 1492 'checkcomm_view_status' => VIEW_STATUS_NOT_VIEWED, 1493 )) . ' 1494 WHERE checkcomm_for_id = ' . $for_id . ' 1495 AND checkcomm_type = ' . $notify_type . ' 1496 AND checkcomm_userid IN (' . $update_watched_sql . ')'; 1497 $db->sql_query($sql); 1498 } 1499 1500 if ( $notify_user ) { 1501 $sql = "SELECT checkcomm_for_id 1502 FROM " . COMMENTS_NOTIFY_TABLE . " 1503 WHERE checkcomm_for_id = $for_id 1504 AND checkcomm_type = " . $notify_type . " 1505 AND checkcomm_userid = " . $userdata['uid']; 1506 $result = $db->sql_query($sql); 1507 1508 if ( !$row = $db->sql_fetchrow($result) ) 1509 { 1510 $sql = 'INSERT INTO ' . COMMENTS_NOTIFY_TABLE . ' ' . $db->sql_build_array('INSERT', array( 1511 'checkcomm_userid' => $userdata['uid'], 1512 'checkcomm_for_id' => $for_id, 1513 'checkcomm_type' => $notify_type, 1514 'checkcomm_notify_status' => NOTIFY_STATUS_UN_NOTIFIED, 1515 'checkcomm_view_status' => VIEW_STATUS_VIEWED, 1516 'checkcomm_last_comment_id' => $last_id, 1517 )); 1518 $db->sql_query($sql); 1519 } 1520 } 1521 } 1522 1353 1523 ?> include/ucp/checkcomm.php
r280 r316 1 1 <?php 2 2 3 $sql = 'SELECT COUNT(*) AS count FROM ' . COMMENTS_NOTIFY_TABLE . ' WHERE checkcomm_userid = ' . $userdata['uid'] . ' AND checkcomm_ notify_status = 0 AND checkcomm_last_comment_id <> 0';3 $sql = 'SELECT COUNT(*) AS count FROM ' . COMMENTS_NOTIFY_TABLE . ' WHERE checkcomm_userid = ' . $userdata['uid'] . ' AND checkcomm_view_status = ' . VIEW_STATUS_NOT_VIEWED; 4 4 $result = $db->sql_query($sql); 5 5 $count = ( $row = $db->sql_fetchrow($result) ) ? intval($row['count']) : 0; 6 if ( !$count ) { 7 $template->assign_vars(array( 8 'NO_FOUND' => true 9 )); 10 } 11 else { 12 list($pagertop, $pagerbottom, $limit) = pager($config['posts_per_page'], $count, 'my.php?type=' . $type . '&'); 13 $sql = 'SELECT cn.checkcomm_for_id, cn.checkcomm_type, t.name AS torrent_name, t.category AS torrent_category, r.request AS request_name, r.cat AS request_category, o.name AS offer_name, o.category AS offer_category, n.title AS news_name, NULL AS news_category, c.comment_added, c.comment_id, u.name, u.uid, u.class 14 FROM ' . COMMENTS_NOTIFY_TABLE . ' cn 15 LEFT JOIN ' . TORRENTS_TABLE . ' t ON cn.checkcomm_for_id = t.fid 16 LEFT JOIN ' . REQUESTS_TABLE . ' r ON cn.checkcomm_for_id = r.id 17 LEFT JOIN ' . OFFERS_TABLE . ' o ON cn.checkcomm_for_id = o.id 18 LEFT JOIN ' . NEWS_TABLE . ' n ON cn.checkcomm_for_id = n.id, 19 ' . COMMENTS_TABLE . ' c, 20 ' . USERS_TABLE . ' u 21 WHERE cn.checkcomm_userid = ' . $userdata['uid'] . " 22 AND cn.checkcomm_notify_status = 0 23 AND c.comment_user = u.uid 24 AND cn.checkcomm_last_comment_id = c.comment_id $limit"; 6 7 list($pagertop, $pagerbottom, $limit) = pager($config['posts_per_page'], $count, 'my.php?type=' . $type . '&'); 8 9 $i = 0; 10 11 if ( $count ) { 12 13 //first sql - get all notifies 14 $sql = 'SELECT * 15 FROM ' . COMMENTS_NOTIFY_TABLE . ' 16 WHERE checkcomm_userid = ' . $userdata['uid'] . ' 17 AND checkcomm_view_status = ' . VIEW_STATUS_NOT_VIEWED . ' ' . $limit; 25 18 $result = $db->sql_query($sql); 26 19 27 $template->assign_vars(array( 28 'PAGERBOTTOM' => $pagerbottom, 29 'NO_FOUND' => false, 30 'IMAGE_INBOXNEW' => $images['inboxnew'], 31 'IMAGE_ARROW_RIGHT' => $images['arrow_right'], 32 )); 33 34 $i = 0; 20 $notify_ary = array(); 21 $last_comments = array(); 22 $last_posts = array(); 23 24 while ( $row = $db->sql_fetchrow($result) ) { 25 $notify_ary[$row['checkcomm_type']][$row['checkcomm_for_id']] = $row; 26 27 if ( $row['checkcomm_last_comment_id'] <> 0 ) { 28 if ( $row['checkcomm_type'] == TYPE_FORUM_POST ) { 29 $last_posts[] = $row['checkcomm_last_comment_id']; 30 } 31 else { 32 $last_comments[] = $row['checkcomm_last_comment_id']; 33 } 34 } 35 } 36 37 $comments_data = array(); 38 $forum_posts_data = array(); 39 40 if ( sizeof($last_comments) || sizeof($last_posts) ) { 41 42 if ( ( !empty($notify_ary[TYPE_TORRENT]) || !empty($notify_ary[TYPE_REQUEST]) || !empty($notify_ary[TYPE_OFFER]) || !empty($notify_ary[TYPE_NEWS]) ) && sizeof($last_comments) ) { 43 44 $sql = 'SELECT c.comment_added AS added, c.comment_id, u.name, u.uid, u.class 45 FROM ' . COMMENTS_TABLE . ' c, 46 ' . USERS_TABLE . ' u 47 WHERE c.comment_user = u.uid 48 AND ' . $db->sql_in_set('c.comment_id', $last_comments); 49 $result = $db->sql_query($sql); 50 51 while ( $row = $db->sql_fetchrow($result) ) { 52 $comments_data[$row['comment_id']] = $row; 53 } 54 } 55 56 if ( !empty($notify_ary[TYPE_FORUM_POST]) && sizeof($last_posts) ) { 57 58 $sql = 'SELECT p.post_id, p.post_time AS added, u.name, u.uid, u.class 59 FROM ' . POSTS_TABLE . ' p, 60 ' . USERS_TABLE . ' u 61 WHERE p.poster_id = u.uid 62 AND ' . $db->sql_in_set('p.post_id', $last_posts); 63 $result = $db->sql_query($sql); 64 65 while ( $row = $db->sql_fetchrow($result) ) { 66 $forum_posts_data[$row['post_id']] = $row; 67 } 68 } 69 } 35 70 36 71 $cats = $cache->obtain_cats(); 37 72 38 while ( $row = $db->sql_fetchrow($result) ) { 39 ++$i; 40 41 switch ( $row['checkcomm_type'] ) { 73 foreach ( $notify_ary AS $notify_type => $ary ) { 74 75 $keys = array_keys($ary); 76 77 $data_ary = array(); 78 79 switch ( $notify_type ) { 42 80 case TYPE_TORRENT: 43 $filename = 'details'; 44 $table = 'torrent'; 45 $name = $lang['torrent']; 81 $sql = 'SELECT t.name, t.category, t.fid AS id 82 FROM ' . TORRENTS_TABLE . ' t 83 WHERE ' . $db->sql_in_set('t.fid', $keys); 84 $result = $db->sql_query($sql); 85 86 while ( $row = $db->sql_fetchrow($result) ) { 87 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 88 $seo->set_torrent_url($row['id'], $row['name'], $row['category']); 89 // www.phpBB-SEO.com SEO TOOLKIT END 90 91 $row['u_file'] = 'details.php?id=' . $row['id']; 92 $data_ary[$row['id']] = $row; 93 } 94 95 $type_name = $lang['torrent']; 46 96 break; 47 97 48 98 case TYPE_REQUEST: 49 $filename = 'requests'; 50 $table = 'request'; 51 $name = $lang['request']; 99 $sql = 'SELECT t.request AS name, t.cat, t.id 100 FROM ' . REQUESTS_TABLE . ' t 101 WHERE ' . $db->sql_in_set('t.id', $keys); 102 $result = $db->sql_query($sql); 103 104 while ( $row = $db->sql_fetchrow($result) ) { 105 $row['u_file'] = 'requests.php?id=' . $row['id']; 106 $data_ary[$row['id']] = $row; 107 } 108 109 $type_name = $lang['request']; 52 110 break; 53 111 54 112 case TYPE_OFFER: 55 $filename = 'offers'; 56 $table = 'offer'; 57 $name = $lang['offer']; 58 break; 113 $sql = 'SELECT t.name AS name, t.category, t.id 114 FROM ' . OFFERS_TABLE . ' t 115 WHERE ' . $db->sql_in_set('t.id', $keys); 116 $result = $db->sql_query($sql); 117 118 while ( $row = $db->sql_fetchrow($result) ) { 119 $row['u_file'] = 'requests.php?id=' . $row['id']; 120 $data_ary[$row['id']] = $row; 121 } 122 123 $type_name = $lang['offer']; 124 break; 125 59 126 case TYPE_NEWS: 60 $filename = 'news'; 61 $table = 'news'; 62 $name = $lang['news']; 63 break; 64 } 65 66 $cat_id = $row[$table . '_category']; 67 68 if ( isset($cats[$cats[$cat_id]['cat_parent']]['cat_name']) ) { 69 $cat_parent = $cats[$cats[$cat_id]['cat_parent']]; 70 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 71 $seo->set_url($cat_parent['cat_name'], $cat_parent['cat_id'], $seo->seo_static['browse']); 72 $seo->set_parent($cats[$cat_id]['cat_id'], $seo->seo_static['browse'], $cat_parent['cat_id'], $seo->seo_static['browse']); 73 // www.phpBB-SEO.com SEO TOOLKIT END 74 } 75 76 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 77 $seo->set_url($cats[$cat_id]['cat_name'], $cats[$cat_id]['cat_id'], $seo->seo_static['browse']); 78 $seo->set_parent($row['checkcomm_for_id'], $seo->seo_static[$filename], $cats[$cat_id]['cat_id'], $seo->seo_static['browse']); 79 $seo->set_url($row[$table . '_name'], $row['checkcomm_for_id'], $seo->seo_static[$filename]); 80 // www.phpBB-SEO.com SEO TOOLKIT END 81 82 if ( $row['uid'] <> ANONYMOUS ) { 83 $u_last_poster = append_sid('userdetails.php?id=' . $row['uid']); 84 $last_poster_name = get_user_class_color($row['class'], $row['name']); 85 } 86 else { 87 $u_last_poster = ''; 88 $last_poster_name = '<i>' . $lang['unknown'] . '</i>'; 89 } 90 91 $template->assign_block_vars('checkcomm_row', array( 92 'U_FILE' => append_sid($root_path . $filename . '.php?id=' . $row['checkcomm_for_id']), 93 'U_CHECKOFF' => append_sid($root_path . 'comment.php?type=' . $row['checkcomm_type'] . '&action=checkoff&tid=' . $row['checkcomm_for_id']), 94 'TORRENT_NAME' => $row[$table . '_name'], 95 'NAME' => $name, 96 'ADDED' => create_date($row['comment_added']), 97 'U_LAST_POSTER' => $u_last_poster, 98 'U_COMMENTS' => append_sid($root_path . 'comment.php?cid=' . $row['comment_id']), 99 'LAST_POSTER_NAME' => $last_poster_name, 100 'ROW_CLASS' => ( $i % 2? $theme['td_class1'] : $theme['td_class2'] ) 101 )); 127 $sql = 'SELECT t.title AS name, t.id 128 FROM ' . NEWS_TABLE . ' t 129 WHERE ' . $db->sql_in_set('t.id', $keys); 130 $result = $db->sql_query($sql); 131 132 while ( $row = $db->sql_fetchrow($result) ) { 133 $row['u_file'] = 'news.php?id=' . $row['id']; 134 $data_ary[$row['id']] = $row; 135 } 136 137 $type_name = $lang['news']; 138 break; 139 140 case TYPE_FORUM_POST: 141 $sql = 'SELECT t.topic_id, topic_title AS name, topic_last_post_time, f.forum_id, f.forum_name, f2.forum_id AS p_forum_id, f2.forum_name AS p_forum_name, c.cat_id, c.cat_title 142 FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . ' f 143 LEFT JOIN ' . FORUMS_TABLE . ' f2 ON ( f.forum_parent = f2.forum_id ), 144 ' . FORUM_CATEGORIES_TABLE . ' c 145 WHERE t.forum_id = f.forum_id 146 AND f.cat_id = c.cat_id 147 AND ' . $db->sql_in_set('t.topic_id', $keys); 148 $result = $db->sql_query($sql); 149 150 while ( $row = $db->sql_fetchrow($result) ) { 151 152 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 153 $seo->set_url($row['cat_title'], $row['cat_id'], $seo->seo_static['forum_cat']); 154 $seo->set_parent($row['forum_id'], $seo->seo_static['forum'], $row['cat_id'], $seo->seo_static['forum_cat']); 155 156 if ( !empty($row['p_forum_id']) ) { 157 $seo->set_url($row['p_forum_name'], $row['p_forum_id'], $seo->seo_static['forum']); 158 $seo->set_parent($row['forum_id'], $seo->seo_static['forum'], $row['p_forum_id'], $seo->seo_static['forum']); 159 } 160 161 $seo->set_url($row['forum_name'], $row['forum_id'], $seo->seo_static['forum']); 162 163 $seo->set_parent($row['topic_id'], $seo->seo_static['topic'], $row['forum_id'], $seo->seo_static['forum']); 164 $seo->set_url($row['name'], $row['topic_id'], $seo->seo_static['topic']); 165 // www.phpBB-SEO.com SEO TOOLKIT END 166 167 $row['u_file'] = 'phpbb2.php?page=viewtopic&t=' . $row['topic_id']; 168 169 $data_ary[$row['topic_id']] = $row; 170 } 171 172 $type_name = $lang['forum_post']; 173 break; 174 } 175 176 $i = 0; 177 178 foreach ( $ary AS $for_id => $data ) { 179 180 ++$i; 181 182 if ( $notify_type == TYPE_FORUM_POST ) { 183 $comment_data = ( !empty($forum_posts_data[$data['checkcomm_last_comment_id']]) ? $forum_posts_data[$data['checkcomm_last_comment_id']] : false ); 184 } 185 else { 186 $comment_data = ( !empty($comments_data[$data['checkcomm_last_comment_id']]) ? $comments_data[$data['checkcomm_last_comment_id']] : false ); 187 } 188 189 $info = $data_ary[$for_id]; 190 191 $name = $info['name']; 192 193 if ( $comment_data ) { 194 $last_post_time = create_date($comment_data['added']); 195 196 if ( $comment_data['uid'] <> ANONYMOUS ) { 197 $u_last_poster = append_sid($root_path . 'userdetails.php?id=' . $comment_data['uid']); 198 $last_poster_name = parse_username($comment_data); 199 } 200 else { 201 $u_last_poster = ''; 202 $last_poster_name = '<i>' . $lang['unknown'] . '</i>'; 203 } 204 } 205 else { 206 $last_post_time = $lang['na']; 207 $u_last_poster = ''; 208 $last_poster_name = '<i>' . $lang['unknown'] . '</i>'; 209 } 210 211 if ( $notify_type == TYPE_FORUM_POST ) { 212 $u_comments = 'phpbb2.php?page=viewtopic&p=' . $data['checkcomm_last_comment_id'] . '#' . $data['checkcomm_last_comment_id']; 213 $u_checkoff = 'phpbb2.php?page=viewtopic&t=' . $for_id . '&unwatch=topic'; 214 } 215 else { 216 $u_comments = 'comment.php?cid=' . $data['checkcomm_last_comment_id']; 217 $u_checkoff = 'comment.php?type=' . $notify_type . '&action=checkoff&tid=' . $for_id; 218 } 219 220 $template->assign_block_vars('checkcomm_row', array( 221 'U_FILE' => append_sid($root_path . $info['u_file']), 222 'U_CHECKOFF' => append_sid($root_path . $u_checkoff), 223 'NAME' => $name, 224 'TYPE_NAME' => $type_name, 225 'ADDED' => $last_post_time, 226 'U_LAST_POSTER' => $u_last_poster, 227 'U_COMMENTS' => append_sid($root_path . $u_comments), 228 'LAST_POSTER_NAME' => $last_poster_name, 229 'ROW_CLASS' => ( $i % 2? $theme['td_class1'] : $theme['td_class2'] ) 230 )); 231 } 102 232 } 103 233 } 104 234 235 $template->assign_vars(array( 236 'PAGERBOTTOM' => $pagerbottom, 237 'COUNT' => $count + $i, 238 )); 239 240 105 241 $body = 'ucp_checkcomm_body.html'; 106 242 ?> languages/lang_english/email/topic_notify.txt
r85 r316 1 Subject: Topic Reply Notification - {T OPIC_TITLE}1 Subject: Topic Reply Notification - {TITLE} 2 2 3 3 Hello, 4 4 5 You are receiving this email because you are watching the topic, "{T OPIC_TITLE}" at {SITENAME}. This topic has received a reply since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic.5 You are receiving this email because you are watching the topic, "{TITLE}" at {SITENAME}. This topic has received a reply since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic. 6 6 7 {U_ TOPIC}7 {U_VIEW_URL} 8 8 9 9 If you no longer wish to watch this topic you can either click the "Stop watching this topic link" found at the bottom of the topic above, or by clicking the following link: 10 10 11 {U_STOP_WATCHING _TOPIC}11 {U_STOP_WATCHING} 12 12 13 13 {EMAIL_SIG} languages/lang_english/lang_main.php
r308 r316 628 628 'email_notifis_pm' => 'Notify about new PMs by e-mail', 629 629 'email_notifis_forum' => 'Notify about new forum messages', 630 'email_notifis_ torrent' => 'Nofity about new torrent in chosen categories (default view)',631 ' commentpm' => 'Subscription',632 ' commentpm_descr' => 'Automaticaly enable subscription to torrent/request/offer, where you leave a comment',630 'email_notifis_comments' => 'Nofity about new comments', 631 'auto_notify' => 'Auto subscription', 632 'auto_notify_explain' => 'Automaticaly enable subscription to torrent/request/offer/forum topic, where you leave a comment', 633 633 'default_categories' => 'Default categories', 634 634 'expand_cats_in_browse' => 'Expand default cats in browse', languages/lang_russian/email/topic_notify.txt
r221 r316 1 Subject: Уведомление об ответе - {T OPIC_TITLE}1 Subject: Уведомление об ответе - {TITLE} 2 2 3 3 Здравствуйте! 4 4 5 Вы получили это сообщение потому, что следите за темой "{T OPIC_TITLE}" на сайте {SITENAME}. В этой теме со времени вашего последнего посещения появилось новое сообщение. Вы можете перейти по ссылке, чтобы прочитать поступившие ответы; новые уведомления не будут приходить, пока вы не просмотрите тему:5 Вы получили это сообщение потому, что следите за темой "{TITLE}" на сайте {SITENAME}. В этой теме со времени вашего последнего посещения появилось новое сообщение. Вы можете перейти по ссылке, чтобы прочитать поступившие ответы; новые уведомления не будут приходить, пока вы не просмотрите тему: 6 6 7 {U_ TOPIC}7 {U_VIEW_URL} 8 8 9 9 Если вы больше не хотите следить за темой, то либо щёлкните по ссылке "перестать следить за темой" внизу страницы, либо перейдите по следующей ссылке: 10 10 11 {U_STOP_WATCHING _TOPIC}11 {U_STOP_WATCHING} 12 12 13 13 {EMAIL_SIG} languages/lang_russian/lang_main.php
r313 r316 635 635 'email_notifis_pm' => 'Уведомлять когда приходит ЛС', 636 636 'email_notifis_forum' => 'Уведомлять о новых сообщениях на форуме', 637 'email_notifis_ torrent' => 'Уведомлять когда появляется новый торрент в выбранных категориях просмотра по умолчанию',638 ' commentpm' => 'Подписка',639 ' commentpm_descr' => 'Включать подписку на торрент/запрос/предложение, где вы оставляли комментарий, автоматически',637 'email_notifis_comments' => 'Уведомлять о новых комментариях', 638 'auto_notify' => 'Автоматическая подписка', 639 'auto_notify_explain' => 'Включать подписку на торрент/запрос/предложение/тему на форуме, где вы оставляли комментарий, автоматически', 640 640 'default_categories' => 'Категории просмотра по умолчанию', 641 641 'expand_cats_in_browse' => 'Разворачивать категории просмотра по умолчанию в обзоре', my.php
r276 r316 41 41 if ( isset($_POST['submit']) ) { 42 42 $updateset = array(); 43 $notifs = ''; 43 44 $full_cats = $cache->obtain_cats(); 44 45 … … 63 64 $updateset['savepms'] = ( isset($_POST['savepms']) ? 1 : 0 ); 64 65 65 $ pmnotif = ( isset($_POST['pmnotif']) ? 1 : 0);66 $notifs = ( $pmnotif ? '[pm]' : '' );67 68 $updateset['notify_forum'] = ( isset($_POST['notif_forum']) ? 1 : 0 );66 $user_notify = request_var('user_notify', array(''=>0)); 67 foreach ( $user_notify AS $key => $val ) { 68 $notifs .= '[' . $key . ']'; 69 } 69 70 70 71 $comment_pm = request_var('commentpm', 0); … … 380 381 } 381 382 383 $notifs = array('pm', 'forum', 'comments'); 384 385 $notifs_options = ''; 386 foreach ( $notifs AS $_null => $val ) { 387 $name = 'user_notify[' . $val . ']'; 388 $notifs_options .= '<input type="checkbox" id="' . $name . '" name="' . $name . '"' . ( strpos($userdata['notifs'], '[' . $val . ']') !== false ? ' checked="checked"' : '' ) . ' value="1" /> ' . $lang['email_notifis_' . $val] . '<br />'; 389 } 390 382 391 $template->assign_vars(array( 383 392 'LANG_INPUT' => $lang_select, … … 390 399 'BIRTHDAY_OPTIONS' => $birthday_select, 391 400 'PRIVACY_INPUT' => $privacy_input, 392 'EMAIL_NOTIFIS_INPUT' => '<input type="checkbox" id="pmnotif" name="pmnotif"' . (strpos($userdata['notifs'], "[pm]") !== false ? ' checked="checked"' : "") . ' value="yes" /> ' . $lang['email_notifis_pm'] . '<br /><input type="checkbox" id="notif_forum" name="notif_forum"' . (($userdata['notify_forum'] == 1)? ' checked="checked"' : '') . ' value="yes" /> ' . $lang['email_notifis_forum'] . "<br />\n")393 ) ;401 'EMAIL_NOTIFIS_INPUT' => $notifs_options 402 )); 394 403 } 395 404 news.php
r311 r316 32 32 )); 33 33 34 $sql = 'SELECT checkcomm_ notify_status FROM ' . COMMENTS_NOTIFY_TABLE . ' WHERE checkcomm_userid = ' . $userdata['uid'] . ' AND checkcomm_type = ' . TYPE_NEWS . ' AND checkcomm_for_id = ' . $id;34 $sql = 'SELECT checkcomm_view_status FROM ' . COMMENTS_NOTIFY_TABLE . ' WHERE checkcomm_userid = ' . $userdata['uid'] . ' AND checkcomm_type = ' . TYPE_NEWS . ' AND checkcomm_for_id = ' . $id; 35 35 $result = $db->sql_query( $sql ); 36 36 $checkcomm = $db->sql_fetchrow( $result ); 37 37 $db->sql_freeresult( $result ); 38 38 if ( $checkcomm ) { 39 if ( !$checkcomm['checkcomm_ notify_status'] ) {39 if ( !$checkcomm['checkcomm_view_status'] ) { 40 40 $sql_priority = ( $db_type == 'mysql' ) ? ' LOW_PRIORITY' : ''; 41 $sql = 'UPDATE' . $sql_priority . ' ' . COMMENTS_NOTIFY_TABLE . ' SET checkcomm_notify_status = 1WHERE checkcomm_userid = ' . $userdata['uid'] . ' AND checkcomm_type = ' . TYPE_NEWS . ' AND checkcomm_for_id = ' . $id;41 $sql = 'UPDATE' . $sql_priority . ' ' . COMMENTS_NOTIFY_TABLE . ' SET checkcomm_view_status = ' . VIEW_STATUS_VIEWED . ', checkcomm_notify_status = ' . NOTIFY_STATUS_UN_NOTIFIED . ' WHERE checkcomm_userid = ' . $userdata['uid'] . ' AND checkcomm_type = ' . TYPE_NEWS . ' AND checkcomm_for_id = ' . $id; 42 42 $db->sql_query($sql); 43 43 } offers.php
r311 r316 340 340 } 341 341 342 $sql = 'SELECT checkcomm_ notify_status FROM ' . COMMENTS_NOTIFY_TABLE . ' WHERE checkcomm_userid = ' . $userdata['uid'] . ' AND checkcomm_for_id = ' . $id . ' AND checkcomm_type = ' . TYPE_OFFER;342 $sql = 'SELECT checkcomm_view_status FROM ' . COMMENTS_NOTIFY_TABLE . ' WHERE checkcomm_userid = ' . $userdata['uid'] . ' AND checkcomm_for_id = ' . $id . ' AND checkcomm_type = ' . TYPE_OFFER; 343 343 $result = $db->sql_query($sql); 344 344 $checkcomm = $db->sql_fetchrow($result); 345 345 if ( $checkcomm ) { 346 if ( !$checkcomm['checkcomm_ notify_status'] ) {346 if ( !$checkcomm['checkcomm_view_status'] ) { 347 347 $sql_priority = ($db_type == 'mysql') ? ' LOW_PRIORITY' : ''; 348 $sql = 'UPDATE' . $sql_priority . ' ' . COMMENTS_NOTIFY_TABLE . ' SET checkcomm_notify_status = 1WHERE checkcomm_userid = ' . $userdata['uid'] . ' AND checkcomm_for_id = ' . $id . ' AND checkcomm_type = ' . TYPE_OFFER;348 $sql = 'UPDATE' . $sql_priority . ' ' . COMMENTS_NOTIFY_TABLE . ' SET checkcomm_view_status = ' . VIEW_STATUS_VIEWED . ', checkcomm_notify_status = ' . NOTIFY_STATUS_UN_NOTIFIED . ' WHERE checkcomm_userid = ' . $userdata['uid'] . ' AND checkcomm_for_id = ' . $id . ' AND checkcomm_type = ' . TYPE_OFFER; 349 349 $db->sql_query($sql); 350 350 } phpBB2/includes/functions_post.php
r310 r316 635 635 $db->sql_query($sql); 636 636 637 $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . "638 WHERE topic_id = $topic_id";637 $sql = "DELETE FROM " . COMMENTS_NOTIFY_TABLE . " 638 WHERE checkcomm_for_id = $topic_id AND checkcomm_type = " . TYPE_FORUM_POST; 639 639 $db->sql_query($sql); 640 640 } … … 679 679 } 680 680 681 //682 // Handle user notification on new post683 //684 function user_notification($mode, &$post_data, &$topic_title, &$forum_id, &$topic_id, &$post_id, &$notify_user)685 {686 global $config, $lang, $db, $root_path, $phpEx, $cache;687 global $userdata, $user_ip;688 // www.phpBB-SEO.com SEO TOOLKIT BEGIN689 global $seo;690 // www.phpBB-SEO.com SEO TOOLKIT END691 692 $current_time = time();693 694 if ($mode != 'delete')695 {696 if ($mode == 'reply')697 {698 699 $sql = "SELECT u.uid, u.email, u.language700 FROM " . TOPICS_WATCH_TABLE . " tw, " . USERS_TABLE . " u701 WHERE tw.topic_id = $topic_id702 AND tw.user_id NOT IN (" . $userdata['uid'] . ", " . ANONYMOUS . ")703 AND tw.notify_status = " . TOPIC_WATCH_UN_NOTIFIED . "704 AND u.uid = tw.user_id705 AND u.enabled = 1";706 $result = $db->sql_query($sql);707 708 $update_watched_sql = '';709 $bcc_list_ary = array();710 711 if ($row = $db->sql_fetchrow($result))712 {713 // Sixty second limit714 @set_time_limit(60);715 $base_url = generate_base_url();716 717 do718 {719 if ($row['email'] != '')720 {721 $bcc_list_ary[$row['language']][] = $row['email'];722 }723 $update_watched_sql .= ($update_watched_sql != '') ? ', ' . $row['uid'] : $row['uid'];724 }725 while ($row = $db->sql_fetchrow($result));726 727 if (sizeof($bcc_list_ary))728 {729 include_once($root_path . 'include/functions_messenger.php');730 $messenger = new messenger(true);731 732 $topic_title = censor_text(unprepare_message($topic_title));733 734 @reset($bcc_list_ary);735 while (list($user_lang, $bcc_list) = each($bcc_list_ary))736 {737 for ($i = 0; $i < sizeof($bcc_list); $i++)738 {739 // www.phpBB-SEO.com SEO TOOLKIT BEGIN740 if ( $seo->seo_opt['url_rewrite'] ) {741 $seo->set_url(htmlspecialchars_decode($topic_title), $topic_id, $seo->seo_static['topic']);742 743 $u_topic = append_sid($root_path . "phpbb2.php?page=viewtopic&" . POST_POST_URL . "=$post_id#$post_id", false, false);744 $u_topic = $seo->drop_sid($u_topic);745 746 $u_stop_watching_topic = append_sid($root_path . "phpbb2.php?page=viewtopic&" . POST_TOPIC_URL . "=$topic_id&unwatch=topic", false, false);747 $u_stop_watching_topic = $seo->drop_sid($u_stop_watching_topic);748 }749 // www.phpBB-SEO.com SEO TOOLKIT END750 else {751 $u_topic = $base_url . "/phpbb2.php?page=viewtopic&" . POST_POST_URL . "=$post_id#$post_id";752 $u_stop_watching_topic = $base_url . "/phpbb2.php?page=viewtopic&" . POST_TOPIC_URL . "=$topic_id&unwatch=topic";753 }754 755 $messenger->template('topic_notify', $user_lang);756 757 $messenger->to($bcc_list[$i], $bcc_list[$i]);758 759 $messenger->assign_vars(array(760 'SITENAME' => $config['sitename'],761 'TOPIC_TITLE' => $topic_title,762 'U_TOPIC' => $u_topic,763 'U_STOP_WATCHING_TOPIC' => $u_stop_watching_topic764 ));765 766 $messenger->send(NOTIFY_EMAIL);767 }768 }769 $messenger->save_queue();770 }771 }772 $db->sql_freeresult($result);773 774 if ($update_watched_sql != '')775 {776 $sql = "UPDATE " . TOPICS_WATCH_TABLE . "777 SET notify_status = " . TOPIC_WATCH_NOTIFIED . "778 WHERE topic_id = $topic_id779 AND user_id IN ($update_watched_sql)";780 $db->sql_query($sql);781 }782 }783 784 $sql = "SELECT topic_id785 FROM " . TOPICS_WATCH_TABLE . "786 WHERE topic_id = $topic_id787 AND user_id = " . $userdata['uid'];788 $result = $db->sql_query($sql);789 790 $row = $db->sql_fetchrow($result);791 792 if (!$notify_user && !empty($row['topic_id']))793 {794 $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . "795 WHERE topic_id = $topic_id796 AND user_id = " . $userdata['uid'];797 $db->sql_query($sql);798 }799 else if ($notify_user && empty($row['topic_id']))800 {801 $sql = "INSERT INTO " . TOPICS_WATCH_TABLE . " (user_id, topic_id, notify_status)802 VALUES (" . $userdata['uid'] . ", $topic_id, 0)";803 $db->sql_query($sql);804 }805 }806 }807 681 808 682 /** phpBB2/includes/prune.php
r184 r316 84 84 if ( $sql_post != '' ) 85 85 { 86 $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . "87 WHERE topic_id IN ($sql_topics)";86 $sql = "DELETE FROM " . COMMENTS_NOTIFY_TABLE . " 87 WHERE checkcomm_for_id IN ($sql_topics) AND checkcomm_type = " . TYPE_FORUM_POST; 88 88 $db->sql_query($sql); 89 89 phpBB2/index.php
r313 r316 461 461 } 462 462 else { 463 $last_post = str_replace('%', '%%', $last_post); 463 464 $last_post = sprintf($last_post, append_sid($root_path . "phpbb2.php?page=viewtopic&" . POST_TOPIC_URL . '=' . $forum_data[$j]['topic_id'])); 464 465 } … … 565 566 $seo->set_url($forum_data['topic_title'], $forum_data['topic_id'], $seo->seo_static['topic']); 566 567 568 $subforums_list[$i]['last_post'] = str_replace('%', '%%', $subforums_list[$i]['last_post']); 567 569 $subforums_list[$i]['last_post'] = sprintf($subforums_list[$i]['last_post'], append_sid($root_path . "phpbb2.php?page=viewtopic&" . POST_TOPIC_URL . '=' . $forum_data['topic_id'])); 568 570 // www.phpBB-SEO.com SEO TOOLKIT END phpBB2/modcp.php
r307 r316 370 370 } 371 371 372 $sql = "DELETE 373 FROM " . TOPICS_WATCH_TABLE . " 374 WHERE topic_id IN ($topic_id_sql)"; 372 $sql = "DELETE FROM " . COMMENTS_NOTIFY_TABLE . " 373 WHERE checkcomm_for_id IN ($topic_id_sql) AND checkcomm_type = " . TYPE_FORUM_POST; 375 374 $db->sql_query($sql); 376 375 … … 821 820 // Update topic watch table, switch users whose posts 822 821 // have moved, over to watching the destination topic 823 $sql = "UPDATE " . TOPICS_WATCH_TABLE . " 824 SET topic_id = $destination_topic_id 825 WHERE topic_id = $topic_id 826 AND user_id IN ($user_id_sql)"; 822 $sql = "UPDATE " . COMMENTS_NOTIFY_TABLE . " 823 SET checkcomm_for_id = $destination_topic_id 824 WHERE checkcomm_for_id = $topic_id 825 AND checkcomm_type = " . TYPE_FORUM_POST . " 826 AND checkcomm_userid IN ($user_id_sql)"; 827 827 $db->sql_query($sql); 828 828 … … 907 907 // Update topic watch table, switch users whose posts 908 908 // have moved, over to watching the new topic 909 $sql = "UPDATE " . TOPICS_WATCH_TABLE . " 910 SET topic_id = $new_topic_id 911 WHERE topic_id = $topic_id 912 AND user_id IN ($user_id_sql)"; 909 $sql = "UPDATE " . COMMENTS_NOTIFY_TABLE . " 910 SET checkcomm_for_id = $new_topic_id 911 WHERE checkcomm_for_id = $topic_id 912 AND checkcomm_type = " . TYPE_FORUM_POST . " 913 AND checkcomm_userid IN ($user_id_sql)"; 913 914 $db->sql_query($sql); 914 915 phpBB2/posting.php
r308 r316 432 432 if ( $mode != 'newtopic' && $userdata['session_logged_in'] && $is_auth['auth_read'] ) 433 433 { 434 $sql = "SELECT topic_id 435 FROM " . TOPICS_WATCH_TABLE . " 436 WHERE topic_id = $topic_id 437 AND user_id = " . $userdata['uid']; 434 $sql = "SELECT checkcomm_for_id 435 FROM " . COMMENTS_NOTIFY_TABLE . " 436 WHERE checkcomm_for_id = $topic_id 437 AND checkcomm_type = " . TYPE_FORUM_POST . " 438 AND checkcomm_userid = " . $userdata['uid']; 438 439 $result = $db->sql_query($sql); 439 440 440 $notify_user = ( $db->sql_fetchrow($result) ) ? TRUE : $userdata[' notify_forum'];441 $notify_user = ( $db->sql_fetchrow($result) ) ? TRUE : $userdata['commentpm']; 441 442 $db->sql_freeresult($result); 442 443 } 443 444 else 444 445 { 445 $notify_user = ( $userdata['session_logged_in'] && $is_auth['auth_read'] ) ? $userdata[' notify_forum'] : 0;446 $notify_user = ( $userdata['session_logged_in'] && $is_auth['auth_read'] ) ? $userdata['commentpm'] : 0; 446 447 } 447 448 } … … 638 639 if ($error_msg == '' && $mode != 'poll_delete' && (!$merge)) 639 640 { 640 user_notification($ mode, $post_data, $post_info['topic_title'], $forum_id, $topic_id, $post_id, $notify_user);641 user_notification($notify_user, TYPE_FORUM_POST, array('mode' => $mode, 'topic_title' => $post_info['topic_title'], 'topic_id' => $topic_id, 'post_id' => $post_id)); 641 642 } 642 643 phpBB2/quick_reply.php
r255 r316 31 31 32 32 $attach_sig = ( $userdata['session_logged_in'] && $config['allow_sig'] && $userdata['user_sig'] != '' ) ? "checked='checked'" : ''; 33 $notify_user = ( $userdata['notify_forum']) ? 'checked="checked"' : '';33 $notify_user = ( $userdata['commentpm'] ? 'checked="checked"' : '' ); 34 34 35 35 $template->assign_vars(array( phpBB2/viewtopic.php
r313 r316 268 268 $can_watch_topic = true; 269 269 270 $sql = "SELECT notify_status 271 FROM " . TOPICS_WATCH_TABLE . " 272 WHERE topic_id = $topic_id 273 AND user_id = " . $userdata['uid']; 270 $sql = "SELECT checkcomm_view_status, checkcomm_notify_status 271 FROM " . COMMENTS_NOTIFY_TABLE . " 272 WHERE checkcomm_for_id = $topic_id 273 AND checkcomm_type = " . TYPE_FORUM_POST . " 274 AND checkcomm_userid = " . $userdata['uid']; 274 275 $result = $db->sql_query($sql); 275 276 … … 283 284 284 285 $sql_priority = ($db_type == "mysql") ? "LOW_PRIORITY" : ''; 285 $sql = "DELETE $sql_priority FROM " . TOPICS_WATCH_TABLE . " 286 WHERE topic_id = $topic_id 287 AND user_id = " . $userdata['uid']; 286 $sql = "DELETE $sql_priority FROM " . COMMENTS_NOTIFY_TABLE . " 287 WHERE checkcomm_for_id = $topic_id 288 AND checkcomm_type = " . TYPE_FORUM_POST . " 289 AND checkcomm_userid = " . $userdata['uid']; 288 290 $result = $db->sql_query($sql); 289 291 } … … 300 302 $is_watching_topic = true; 301 303 302 if ( $row['notify_status'] ) 304 $sql_priority = ($db_type == "mysql") ? "LOW_PRIORITY" : ''; 305 306 if ( $row['checkcomm_view_status'] == VIEW_STATUS_NOT_VIEWED ) 303 307 { 304 $sql _priority = ($db_type == "mysql") ? "LOW_PRIORITY" : '';305 $sql = "UPDATE $sql_priority " . TOPICS_WATCH_TABLE. "306 SET notify_status = 0307 WHERE topic_id = $topic_id308 AND user_id = " . $userdata['uid'];308 $sql = "UPDATE $sql_priority " . COMMENTS_NOTIFY_TABLE . " 309 SET checkcomm_view_status = " . VIEW_STATUS_VIEWED . ", checkcomm_notify_status = " . NOTIFY_STATUS_UN_NOTIFIED . " 310 WHERE checkcomm_for_id = $topic_id 311 AND checkcomm_type = " . TYPE_FORUM_POST . " 312 AND checkcomm_userid = " . $userdata['uid']; 309 313 $result = $db->sql_query($sql); 310 314 } 315 elseif ( $row['checkcomm_view_status'] == VIEW_STATUS_VIEWED && $row['checkcomm_notify_status'] == NOTIFY_STATUS_NOTIFIED ) { 316 $sql = "UPDATE $sql_priority " . COMMENTS_NOTIFY_TABLE . " 317 SET checkcomm_notify_status = " . NOTIFY_STATUS_UN_NOTIFIED . " 318 WHERE checkcomm_for_id = $topic_id 319 AND checkcomm_type = " . TYPE_FORUM_POST . " 320 AND checkcomm_userid = " . $userdata['uid']; 321 } 322 323 $result = $db->sql_query($sql); 311 324 } 312 325 } … … 320 333 321 334 $sql_priority = ($db_type == "mysql") ? "LOW_PRIORITY" : ''; 322 $sql = "INSERT $sql_priority INTO " . TOPICS_WATCH_TABLE . " (user_id, topic_id,notify_status)323 VALUES (" . $userdata['uid'] . ", $topic_id, 0)";335 $sql = "INSERT $sql_priority INTO " . COMMENTS_NOTIFY_TABLE . " (checkcomm_userid, checkcomm_for_id, checkcomm_type, checkcomm_view_status, checkcomm_notify_status) 336 VALUES (" . $userdata['uid'] . ", $topic_id, " . TYPE_FORUM_POST . ", " . VIEW_STATUS_VIEWED . ", " . NOTIFY_STATUS_NOTIFIED . ")"; 324 337 $result = $db->sql_query($sql); 325 338 } redir.php
r184 r316 4 4 $userdata = session_pagestart($user_ip); 5 5 init_userprefs($userdata); 6 6 7 $url = ''; 7 8 8 while (list($var,$val) = each($_GET)) {9 foreach( $_GET AS $var => $val ) { 9 10 $url .= "&$var=$val"; 10 11 } 12 11 13 $i = strpos($url, "&url="); 12 14 13 if ( $i !== false) {14 $url = substr($url, $i + 5);15 if ( $i !== false ) { 16 $url = substr($url, $i + 5); 15 17 } 18 16 19 if (substr($url, 0, 4) == "www.") { 17 $url = "http://" . $url;20 $url = "http://" . $url; 18 21 } 22 23 if ( strpos($url, '?') !== false ) { 24 $args = explode('?', $url); 25 $_url = $args[0] . '?'; 26 unset($args[0]); 27 28 if ( strpos($url, '&') !== false ) { 29 $args = explode('&',$args[1]); 30 } 31 32 $new_args = ''; 33 34 foreach ( $args AS $_null => $arg ) { 35 list($key, $val) = explode('=',$arg); 36 37 $new_args .= ( $new_args ? '&' : '' ) . $key . '=' . urlencode($val); 38 } 39 40 $url = $_url . $new_args; 41 } 42 19 43 if (strstr(urldecode($url), "\n") || strstr(urldecode($url), "\r")) { 20 44 trigger_error('Tried to redirect to potentially insecure url.'); requests.php
r311 r316 342 342 } 343 343 344 $sql = 'SELECT checkcomm_ notify_status FROM ' . COMMENTS_NOTIFY_TABLE . ' WHERE checkcomm_userid = ' . $userdata['uid'] . ' AND checkcomm_for_id = ' . $id . ' AND checkcomm_type = ' . TYPE_REQUEST;344 $sql = 'SELECT checkcomm_view_status FROM ' . COMMENTS_NOTIFY_TABLE . ' WHERE checkcomm_userid = ' . $userdata['uid'] . ' AND checkcomm_for_id = ' . $id . ' AND checkcomm_type = ' . TYPE_REQUEST; 345 345 $result = $db->sql_query($sql); 346 346 $checkcomm = $db->sql_fetchrow($result); 347 347 if ( $checkcomm ) { 348 if ( !$checkcomm['checkcomm_ notify_status'] ) {348 if ( !$checkcomm['checkcomm_view_status'] ) { 349 349 $sql_priority = ($db_type == 'mysql') ? ' LOW_PRIORITY' : ''; 350 $sql = 'UPDATE' . $sql_priority . ' ' . COMMENTS_NOTIFY_TABLE . ' SET checkcomm_notify_status = 1WHERE checkcomm_userid = ' . $userdata['uid'] . ' AND checkcomm_for_id = ' . $id . ' AND checkcomm_type = ' . TYPE_REQUEST;350 $sql = 'UPDATE' . $sql_priority . ' ' . COMMENTS_NOTIFY_TABLE . ' SET checkcomm_view_status = ' . VIEW_STATUS_VIEWED . ', checkcomm_notify_status = ' . NOTIFY_STATUS_UN_NOTIFIED . ' WHERE checkcomm_userid = ' . $userdata['uid'] . ' AND checkcomm_for_id = ' . $id . ' AND checkcomm_type = ' . TYPE_REQUEST; 351 351 $db->sql_query($sql); 352 352 } rss.php
r307 r316 108 108 else { 109 109 $sql = "SELECT t.fid, t.name AS torrent_name, t.descr, t.filename, t.size, t.category, t.ctime, u.name, t.owner, u.privacy 110 FROM " . TORRENTS_TABLE . " t, " . USERS_TABLE . " u 110 FROM " . TORRENTS_TABLE . " t, " . USERS_TABLE . " u, " . CATEGORIES_TABLE . " c 111 111 WHERE $where t.visible = 1 112 112 AND t.hidden = 0 113 113 AND t.banned = 0 114 114 AND t.moderated = 1 115 AND c.id = t.category 115 116 AND t.owner = u.uid 116 117 " . ( $s_modified ? ' AND t.ctime > ' . $s_modified : '' ) . ' ORDER BY t.ctime DESC'; sql.sql
r313 r316 1 -- 2 -- ����� `banlist` 3 -- 4 1 -- phpMyAdmin SQL Dump 2 -- version 3.2.3 3 -- http://www.phpmyadmin.net 4 -- 5 -- Хост: localhost 6 -- Время создания: Июн 22 2010 г., 17:41 7 -- Версия сервера: 5.1.40 8 -- Версия PHP: 5.2.12 9 10 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; 11 12 13 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 14 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 15 /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 16 /*!40101 SET NAMES utf8 */; 17 18 -- 19 -- База данных: `svn` 20 -- 21 22 -- -------------------------------------------------------- 23 24 -- 25 -- Структура таблицы `banlist` 26 -- 27 28 DROP TABLE IF EXISTS `banlist`; 5 29 CREATE TABLE IF NOT EXISTS `banlist` ( 6 30 `ban_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, … … 17 41 18 42 -- 19 -- ���� �� `banlist` 20 -- 21 22 23 -- -------------------------------------------------------- 24 25 -- 26 -- ����� `bookmarks` 27 -- 28 43 -- Дамп данных таблицы `banlist` 44 -- 45 46 47 -- -------------------------------------------------------- 48 49 -- 50 -- Структура таблицы `bookmarks` 51 -- 52 53 DROP TABLE IF EXISTS `bookmarks`; 29 54 CREATE TABLE IF NOT EXISTS `bookmarks` ( 30 55 `id` int(10) unsigned NOT NULL AUTO_INCREMENT, … … 35 60 36 61 -- 37 -- ���� �� `bookmarks` 38 -- 39 40 41 -- -------------------------------------------------------- 42 43 -- 44 -- ����� `categories` 45 -- 46 62 -- Дамп данных таблицы `bookmarks` 63 -- 64 65 66 -- -------------------------------------------------------- 67 68 -- 69 -- Структура таблицы `categories` 70 -- 71 72 DROP TABLE IF EXISTS `categories`; 47 73 CREATE TABLE IF NOT EXISTS `categories` ( 48 74 `id` int(10) unsigned NOT NULL AUTO_INCREMENT, … … 57 83 58 84 -- 59 -- ���� �� `categories` 60 -- 61 62 63 -- -------------------------------------------------------- 64 65 -- 66 -- ����� `chat_messages` 67 -- 68 85 -- Дамп данных таблицы `categories` 86 -- 87 88 89 -- -------------------------------------------------------- 90 91 -- 92 -- Структура таблицы `chat_messages` 93 -- 94 95 DROP TABLE IF EXISTS `chat_messages`; 69 96 CREATE TABLE IF NOT EXISTS `chat_messages` ( 70 97 `chat_msg_id` int(10) NOT NULL AUTO_INCREMENT, … … 79 106 80 107 -- 81 -- ���� �� `chat_messages` 82 -- 83 84 85 -- -------------------------------------------------------- 86 87 -- 88 -- ����� `cheaters` 89 -- 90 108 -- Дамп данных таблицы `chat_messages` 109 -- 110 111 112 -- -------------------------------------------------------- 113 114 -- 115 -- Структура таблицы `cheaters` 116 -- 117 118 DROP TABLE IF EXISTS `cheaters`; 91 119 CREATE TABLE IF NOT EXISTS `cheaters` ( 92 120 `id` int(10) unsigned NOT NULL AUTO_INCREMENT, … … 107 135 108 136 -- 109 -- ���� �� `cheaters` 110 -- 111 112 113 -- -------------------------------------------------------- 114 115 -- 116 -- ����� `checkcomm` 117 -- 118 137 -- Дамп данных таблицы `cheaters` 138 -- 139 140 141 -- -------------------------------------------------------- 142 143 -- 144 -- Структура таблицы `checkcomm` 145 -- 146 147 DROP TABLE IF EXISTS `checkcomm`; 119 148 CREATE TABLE IF NOT EXISTS `checkcomm` ( 120 149 `checkcomm_userid` int(10) DEFAULT '0', 121 150 `checkcomm_notify_status` tinyint(1) DEFAULT '0', 151 `checkcomm_view_status` tinyint(1) NOT NULL DEFAULT '0', 122 152 `checkcomm_for_id` int(10) DEFAULT '0', 123 153 `checkcomm_type` tinyint(1) DEFAULT '0', … … 128 158 129 159 -- 130 -- ���� �� `checkcomm` 131 -- 132 133 134 -- -------------------------------------------------------- 135 136 -- 137 -- ����� `comments` 138 -- 139 160 -- Дамп данных таблицы `checkcomm` 161 -- 162 163 164 -- -------------------------------------------------------- 165 166 -- 167 -- Структура таблицы `comments` 168 -- 169 170 DROP TABLE IF EXISTS `comments`; 140 171 CREATE TABLE IF NOT EXISTS `comments` ( 141 172 `comment_id` int(10) unsigned NOT NULL AUTO_INCREMENT, … … 154 185 155 186 -- 156 -- ���� �� `comments` 157 -- 158 159 160 -- -------------------------------------------------------- 161 162 -- 163 -- ����� `config` 164 -- 165 187 -- Дамп данных таблицы `comments` 188 -- 189 190 191 -- -------------------------------------------------------- 192 193 -- 194 -- Структура таблицы `config` 195 -- 196 197 DROP TABLE IF EXISTS `config`; 166 198 CREATE TABLE IF NOT EXISTS `config` ( 167 199 `name` varchar(255) NOT NULL DEFAULT '', … … 173 205 174 206 -- 175 -- ���� ��`config`207 -- Дамп данных таблицы `config` 176 208 -- 177 209 … … 180 212 ('onlinesince', '1268666465', 0), 181 213 ('sitename', '', 0), 182 ('autoclean_last_run_clean_peers', '12 68666468', 1),214 ('autoclean_last_run_clean_peers', '1277214019', 1), 183 215 ('sitemail', '', 0), 184 216 ('max_torrent_size', '1000000', 0), … … 243 275 ('server_port', '', 0), 244 276 ('script_path', '', 0), 245 ('version', '0.3.4svn3 07', 0),277 ('version', '0.3.4svn316', 0), 246 278 ('default_lang', 'english', 0), 247 279 ('max_login_attempts', '5', 0), … … 251 283 ('merge_flood_interval', '5', 0), 252 284 ('search_flood_interval', '0', 0), 253 ('rand_seed', ' 2f31aa0b65e7e8d00bbaa17169bb74a9', 1),285 ('rand_seed', '7454c7512ffc7cfd8eb3d5c2fd56efb2', 1), 254 286 ('search_min_chars', '3', 0), 255 287 ('inactive_users_del_days', '0', 0), … … 325 357 ('autoclean_interval_parse_queue', '10', 0), 326 358 ('autoclean_interval_tidy_cache', '10', 0), 327 ('autoclean_last_run_sync_torrents_info', '12 68666468', 1),328 ('autoclean_last_run_clean_pending_accounts', '12 68666468', 1),329 ('autoclean_last_run_clean_inactive_users', '12 68666468', 1),330 ('autoclean_last_run_clean_old_torrents', '12 68666468', 1),331 ('autoclean_last_run_autowarn_autodemote', '12 68666468', 1),332 ('autoclean_last_run_remove_expired_warnings', '12 68666468', 1),333 ('autoclean_last_run_demote_uploaders', '12 68666468', 1),359 ('autoclean_last_run_sync_torrents_info', '1277214019', 1), 360 ('autoclean_last_run_clean_pending_accounts', '1277214019', 1), 361 ('autoclean_last_run_clean_inactive_users', '1277214019', 1), 362 ('autoclean_last_run_clean_old_torrents', '1277214019', 1), 363 ('autoclean_last_run_autowarn_autodemote', '1277214019', 1), 364 ('autoclean_last_run_remove_expired_warnings', '1277214019', 1), 365 ('autoclean_last_run_demote_uploaders', '1277214019', 1), 334 366 ('autoclean_last_run_receive_invites', '0', 1), 335 ('autoclean_last_run_parse_queue', '12 68666468', 1),336 ('autoclean_last_run_tidy_cache', '12 68666468', 1),367 ('autoclean_last_run_parse_queue', '1277214019', 1), 368 ('autoclean_last_run_tidy_cache', '1277214019', 1), 337 369 ('autoclean_interval_promote_demote_users', '1440', 0), 338 ('autoclean_last_run_promote_demote_users', '12 68666468', 1),370 ('autoclean_last_run_promote_demote_users', '1277214019', 1), 339 371 ('user_limit_ary_allow_download', 'a:10:{s:1:"W";i:1;s:1:"D";i:1;i:0;i:0;i:1;i:1;i:2;i:1;i:3;i:1;i:4;i:1;i:5;i:1;i:6;i:1;i:7;i:1;}', 0), 340 372 ('min_seeders_for_sos_button', '3', 0), … … 343 375 ('site_keywords', '', 0), 344 376 ('autoclean_interval_delete_old_sessions', '10', 0), 345 ('autoclean_last_run_delete_old_sessions', '12 68666468', 1),377 ('autoclean_last_run_delete_old_sessions', '1277214019', 1), 346 378 ('cleanup_lock', '0', 1), 347 379 ('offline_text', '', 0), … … 361 393 362 394 -- 363 -- ����� `confirm` 364 -- 365 395 -- Структура таблицы `confirm` 396 -- 397 398 DROP TABLE IF EXISTS `confirm`; 366 399 CREATE TABLE IF NOT EXISTS `confirm` ( 367 400 `confirm_id` char(32) NOT NULL DEFAULT '', … … 372 405 373 406 -- 374 -- ���� �� `confirm` 375 -- 376 377 378 -- -------------------------------------------------------- 379 380 -- 381 -- ����� `countries` 382 -- 383 407 -- Дамп данных таблицы `confirm` 408 -- 409 410 411 -- -------------------------------------------------------- 412 413 -- 414 -- Структура таблицы `countries` 415 -- 416 417 DROP TABLE IF EXISTS `countries`; 384 418 CREATE TABLE IF NOT EXISTS `countries` ( 385 419 `id` int(10) unsigned NOT NULL AUTO_INCREMENT, … … 390 424 391 425 -- 392 -- ���� ��`countries`426 -- Дамп данных таблицы `countries` 393 427 -- 394 428 … … 501 535 502 536 -- 503 -- ����� `disallow` 504 -- 505 537 -- Структура таблицы `disallow` 538 -- 539 540 DROP TABLE IF EXISTS `disallow`; 506 541 CREATE TABLE IF NOT EXISTS `disallow` ( 507 542 `disallow_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, … … 511 546 512 547 -- 513 -- ���� �� `disallow` 514 -- 515 516 517 -- -------------------------------------------------------- 518 519 -- 520 -- ����� `files` 521 -- 522 548 -- Дамп данных таблицы `disallow` 549 -- 550 551 552 -- -------------------------------------------------------- 553 554 -- 555 -- Структура таблицы `files` 556 -- 557 558 DROP TABLE IF EXISTS `files`; 523 559 CREATE TABLE IF NOT EXISTS `files` ( 524 560 `torrent` int(10) unsigned DEFAULT '0', … … 529 565 530 566 -- 531 -- ���� �� `files` 532 -- 533 534 535 -- -------------------------------------------------------- 536 537 -- 538 -- ����� `forum_auth_access` 539 -- 540 567 -- Дамп данных таблицы `files` 568 -- 569 570 571 -- -------------------------------------------------------- 572 573 -- 574 -- Структура таблицы `forum_auth_access` 575 -- 576 577 DROP TABLE IF EXISTS `forum_auth_access`; 541 578 CREATE TABLE IF NOT EXISTS `forum_auth_access` ( 542 579 `group_id` mediumint(8) DEFAULT '0', … … 559 596 560 597 -- 561 -- ���� �� `forum_auth_access` 562 -- 563 564 565 -- -------------------------------------------------------- 566 567 -- 568 -- ����� `forum_categories` 569 -- 570 598 -- Дамп данных таблицы `forum_auth_access` 599 -- 600 601 602 -- -------------------------------------------------------- 603 604 -- 605 -- Структура таблицы `forum_categories` 606 -- 607 608 DROP TABLE IF EXISTS `forum_categories`; 571 609 CREATE TABLE IF NOT EXISTS `forum_categories` ( 572 610 `cat_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, … … 578 616 579 617 -- 580 -- ���� �� `forum_categories` 581 -- 582 583 584 -- -------------------------------------------------------- 585 586 -- 587 -- ����� `forum_forums` 588 -- 589 618 -- Дамп данных таблицы `forum_categories` 619 -- 620 621 622 -- -------------------------------------------------------- 623 624 -- 625 -- Структура таблицы `forum_forums` 626 -- 627 628 DROP TABLE IF EXISTS `forum_forums`; 590 629 CREATE TABLE IF NOT EXISTS `forum_forums` ( 591 630 `forum_id` smallint(5) unsigned NOT NULL DEFAULT '0', … … 620 659 621 660 -- 622 -- ���� �� `forum_forums` 623 -- 624 625 626 -- -------------------------------------------------------- 627 628 -- 629 -- ����� `forum_groups` 630 -- 631 661 -- Дамп данных таблицы `forum_forums` 662 -- 663 664 665 -- -------------------------------------------------------- 666 667 -- 668 -- Структура таблицы `forum_groups` 669 -- 670 671 DROP TABLE IF EXISTS `forum_groups`; 632 672 CREATE TABLE IF NOT EXISTS `forum_groups` ( 633 673 `group_id` mediumint(8) NOT NULL AUTO_INCREMENT, … … 642 682 643 683 -- 644 -- ���� ��`forum_groups`684 -- Дамп данных таблицы `forum_groups` 645 685 -- 646 686 … … 660 700 661 701 -- 662 -- ����� `forum_posts` 663 -- 664 702 -- Структура таблицы `forum_posts` 703 -- 704 705 DROP TABLE IF EXISTS `forum_posts`; 665 706 CREATE TABLE IF NOT EXISTS `forum_posts` ( 666 707 `post_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, … … 687 728 688 729 -- 689 -- ���� �� `forum_posts` 690 -- 691 692 693 -- -------------------------------------------------------- 694 695 -- 696 -- ����� `forum_posts_text` 697 -- 698 730 -- Дамп данных таблицы `forum_posts` 731 -- 732 733 734 -- -------------------------------------------------------- 735 736 -- 737 -- Структура таблицы `forum_posts_text` 738 -- 739 740 DROP TABLE IF EXISTS `forum_posts_text`; 699 741 CREATE TABLE IF NOT EXISTS `forum_posts_text` ( 700 742 `post_id` mediumint(8) unsigned NOT NULL DEFAULT '0', … … 705 747 706 748 -- 707 -- ���� �� `forum_posts_text` 708 -- 709 710 711 -- -------------------------------------------------------- 712 713 -- 714 -- ����� `forum_prune` 715 -- 716 749 -- Дамп данных таблицы `forum_posts_text` 750 -- 751 752 753 -- -------------------------------------------------------- 754 755 -- 756 -- Структура таблицы `forum_prune` 757 -- 758 759 DROP TABLE IF EXISTS `forum_prune`; 717 760 CREATE TABLE IF NOT EXISTS `forum_prune` ( 718 761 `prune_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, … … 725 768 726 769 -- 727 -- ���� �� `forum_prune` 728 -- 729 730 731 -- -------------------------------------------------------- 732 733 -- 734 -- ����� `forum_search_results` 735 -- 736 770 -- Дамп данных таблицы `forum_prune` 771 -- 772 773 774 -- -------------------------------------------------------- 775 776 -- 777 -- Структура таблицы `forum_search_results` 778 -- 779 780 DROP TABLE IF EXISTS `forum_search_results`; 737 781 CREATE TABLE IF NOT EXISTS `forum_search_results` ( 738 782 `search_id` int(11) unsigned NOT NULL DEFAULT '0', 739 783 `session_id` varchar(32) DEFAULT NULL, 740 `search_array` LONGTEXT,784 `search_array` longtext, 741 785 `search_time` int(11) DEFAULT '0', 742 786 PRIMARY KEY (`search_id`), … … 745 789 746 790 -- 747 -- ���� �� `forum_search_results` 748 -- 749 750 751 -- -------------------------------------------------------- 752 753 -- 754 -- ����� `forum_search_wordlist` 755 -- 756 791 -- Дамп данных таблицы `forum_search_results` 792 -- 793 794 795 -- -------------------------------------------------------- 796 797 -- 798 -- Структура таблицы `forum_search_wordlist` 799 -- 800 801 DROP TABLE IF EXISTS `forum_search_wordlist`; 757 802 CREATE TABLE IF NOT EXISTS `forum_search_wordlist` ( 758 803 `word_text` varchar(50) NOT NULL DEFAULT '', … … 764 809 765 810 -- 766 -- ���� �� `forum_search_wordlist` 767 -- 768 769 770 -- -------------------------------------------------------- 771 772 -- 773 -- ����� `forum_search_wordmatch` 774 -- 775 811 -- Дамп данных таблицы `forum_search_wordlist` 812 -- 813 814 815 -- -------------------------------------------------------- 816 817 -- 818 -- Структура таблицы `forum_search_wordmatch` 819 -- 820 821 DROP TABLE IF EXISTS `forum_search_wordmatch`; 776 822 CREATE TABLE IF NOT EXISTS `forum_search_wordmatch` ( 777 823 `post_id` mediumint(8) unsigned DEFAULT '0', … … 783 829 784 830 -- 785 -- ���� �� `forum_search_wordmatch` 786 -- 787 788 789 -- -------------------------------------------------------- 790 791 -- 792 -- ����� `forum_topics` 793 -- 794 831 -- Дамп данных таблицы `forum_search_wordmatch` 832 -- 833 834 835 -- -------------------------------------------------------- 836 837 -- 838 -- Структура таблицы `forum_topics` 839 -- 840 841 DROP TABLE IF EXISTS `forum_topics`; 795 842 CREATE TABLE IF NOT EXISTS `forum_topics` ( 796 843 `topic_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, … … 818 865 819 866 -- 820 -- ���� �� `forum_topics` 821 -- 822 823 824 -- -------------------------------------------------------- 825 826 -- 827 -- ����� `forum_topics_watch` 828 -- 829 830 CREATE TABLE IF NOT EXISTS `forum_topics_watch` ( 831 `topic_id` mediumint(8) unsigned DEFAULT '0', 832 `user_id` mediumint(8) DEFAULT '0', 833 `notify_status` tinyint(1) DEFAULT '0', 834 KEY `topic_id` (`topic_id`), 835 KEY `user_id` (`user_id`), 836 KEY `notify_status` (`notify_status`) 837 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 838 839 -- 840 -- ���� �� `forum_topics_watch` 841 -- 842 843 844 -- -------------------------------------------------------- 845 846 -- 847 -- ����� `forum_user_group` 848 -- 849 867 -- Дамп данных таблицы `forum_topics` 868 -- 869 870 871 -- -------------------------------------------------------- 872 873 -- 874 -- Структура таблицы `forum_user_group` 875 -- 876 877 DROP TABLE IF EXISTS `forum_user_group`; 850 878 CREATE TABLE IF NOT EXISTS `forum_user_group` ( 851 879 `group_id` mediumint(8) DEFAULT '0', … … 857 885 858 886 -- 859 -- ���� ��`forum_user_group`887 -- Дамп данных таблицы `forum_user_group` 860 888 -- 861 889 … … 874 902 875 903 -- 876 -- ����� `friends` 877 -- 878 904 -- Структура таблицы `friends` 905 -- 906 907 DROP TABLE IF EXISTS `friends`; 879 908 CREATE TABLE IF NOT EXISTS `friends` ( 880 909 `id` int(10) unsigned NOT NULL AUTO_INCREMENT, … … 887 916 888 917 -- 889 -- ���� �� `friends` 890 -- 891 892 893 -- -------------------------------------------------------- 894 895 -- 896 -- ����� `helpdesk` 897 -- 898 918 -- Дамп данных таблицы `friends` 919 -- 920 921 922 -- -------------------------------------------------------- 923 924 -- 925 -- Структура таблицы `helpdesk` 926 -- 927 928 DROP TABLE IF EXISTS `helpdesk`; 899 929 CREATE TABLE IF NOT EXISTS `helpdesk` ( 900 930 `id` int(10) unsigned NOT NULL AUTO_INCREMENT, … … 914 944 915 945 -- 916 -- ���� �� `helpdesk` 917 -- 918 919 920 -- -------------------------------------------------------- 921 922 -- 923 -- ����� `indexreleases` 924 -- 925 946 -- Дамп данных таблицы `helpdesk` 947 -- 948 949 950 -- -------------------------------------------------------- 951 952 -- 953 -- Структура таблицы `indexreleases` 954 -- 955 956 DROP TABLE IF EXISTS `indexreleases`; 926 957 CREATE TABLE IF NOT EXISTS `indexreleases` ( 927 958 `id` int(10) unsigned NOT NULL AUTO_INCREMENT, … … 937 968 938 969 -- 939 -- ���� �� `indexreleases` 940 -- 941 942 943 -- -------------------------------------------------------- 944 945 -- 946 -- ����� `invites` 947 -- 948 970 -- Дамп данных таблицы `indexreleases` 971 -- 972 973 974 -- -------------------------------------------------------- 975 976 -- 977 -- Структура таблицы `invites` 978 -- 979 980 DROP TABLE IF EXISTS `invites`; 949 981 CREATE TABLE IF NOT EXISTS `invites` ( 950 982 `id` int(10) unsigned NOT NULL AUTO_INCREMENT, … … 960 992 961 993 -- 962 -- ���� �� `invites` 963 -- 964 965 966 -- -------------------------------------------------------- 967 968 -- 969 -- ����� `messages` 970 -- 971 994 -- Дамп данных таблицы `invites` 995 -- 996 997 998 -- -------------------------------------------------------- 999 1000 -- 1001 -- Структура таблицы `messages` 1002 -- 1003 1004 DROP TABLE IF EXISTS `messages`; 972 1005 CREATE TABLE IF NOT EXISTS `messages` ( 973 1006 `id` int(10) unsigned NOT NULL AUTO_INCREMENT, … … 989 1022 990 1023 -- 991 -- ���� �� `messages` 992 -- 993 994 995 -- -------------------------------------------------------- 996 997 -- 998 -- ����� `news` 999 -- 1000 1024 -- Дамп данных таблицы `messages` 1025 -- 1026 1027 1028 -- -------------------------------------------------------- 1029 1030 -- 1031 -- Структура таблицы `news` 1032 -- 1033 1034 DROP TABLE IF EXISTS `news`; 1001 1035 CREATE TABLE IF NOT EXISTS `news` ( 1002 1036 `id` int(10) unsigned NOT NULL AUTO_INCREMENT, … … 1013 1047 1014 1048 -- 1015 -- ���� �� `news` 1016 -- 1017 1018 1019 -- -------------------------------------------------------- 1020 1021 -- 1022 -- ����� `offers` 1023 -- 1024 1049 -- Дамп данных таблицы `news` 1050 -- 1051 1052 1053 -- -------------------------------------------------------- 1054 1055 -- 1056 -- Структура таблицы `offers` 1057 -- 1058 1059 DROP TABLE IF EXISTS `offers`; 1025 1060 CREATE TABLE IF NOT EXISTS `offers` ( 1026 1061 `id` int(10) unsigned NOT NULL AUTO_INCREMENT, … … 1040 1075 1041 1076 -- 1042 -- ���� �� `offers` 1043 -- 1044 1045 1046 -- -------------------------------------------------------- 1047 1048 -- 1049 -- ����� `offers_votes` 1050 -- 1051 1077 -- Дамп данных таблицы `offers` 1078 -- 1079 1080 1081 -- -------------------------------------------------------- 1082 1083 -- 1084 -- Структура таблицы `offers_votes` 1085 -- 1086 1087 DROP TABLE IF EXISTS `offers_votes`; 1052 1088 CREATE TABLE IF NOT EXISTS `offers_votes` ( 1053 1089 `id` int(10) unsigned NOT NULL AUTO_INCREMENT, … … 1059 1095 1060 1096 -- 1061 -- ���� �� `offers_votes` 1062 -- 1063 1064 1065 -- -------------------------------------------------------- 1066 1067 -- 1068 -- ����� `peers` 1069 -- 1070 1097 -- Дамп данных таблицы `offers_votes` 1098 -- 1099 1100 1101 -- -------------------------------------------------------- 1102 1103 -- 1104 -- Структура таблицы `peers` 1105 -- 1106 1107 DROP TABLE IF EXISTS `peers`; 1071 1108 CREATE TABLE IF NOT EXISTS `peers` ( 1072 1109 `fid` int(10) unsigned DEFAULT '0', … … 1091 1128 1092 1129 -- 1093 -- ���� �� `peers` 1094 -- 1095 1096 1097 -- -------------------------------------------------------- 1098 1099 -- 1100 -- ����� `ranks` 1101 -- 1102 1130 -- Дамп данных таблицы `peers` 1131 -- 1132 1133 1134 -- -------------------------------------------------------- 1135 1136 -- 1137 -- Структура таблицы `ranks` 1138 -- 1139 1140 DROP TABLE IF EXISTS `ranks`; 1103 1141 CREATE TABLE IF NOT EXISTS `ranks` ( 1104 1142 `rank_id` int(10) NOT NULL AUTO_INCREMENT, … … 1112 1150 1113 1151 -- 1114 -- ���� ��`ranks`1152 -- Дамп данных таблицы `ranks` 1115 1153 -- 1116 1154 … … 1121 1159 1122 1160 -- 1123 -- ����� `ratings` 1124 -- 1125 1161 -- Структура таблицы `ratings` 1162 -- 1163 1164 DROP TABLE IF EXISTS `ratings`; 1126 1165 CREATE TABLE IF NOT EXISTS `ratings` ( 1127 1166 `torrent` int(10) unsigned NOT NULL DEFAULT '0', … … 1133 1172 1134 1173 -- 1135 -- ���� �� `ratings` 1136 -- 1137 1138 1139 -- -------------------------------------------------------- 1140 1141 -- 1142 -- ����� `release_groups` 1143 -- 1144 1174 -- Дамп данных таблицы `ratings` 1175 -- 1176 1177 1178 -- -------------------------------------------------------- 1179 1180 -- 1181 -- Структура таблицы `release_groups` 1182 -- 1183 1184 DROP TABLE IF EXISTS `release_groups`; 1145 1185 CREATE TABLE IF NOT EXISTS `release_groups` ( 1146 1186 `group_id` smallint(5) NOT NULL AUTO_INCREMENT, … … 1151 1191 1152 1192 -- 1153 -- ���� �� `release_groups` 1154 -- 1155 1156 1157 -- -------------------------------------------------------- 1158 1159 -- 1160 -- ����� `reports` 1161 -- 1162 1193 -- Дамп данных таблицы `release_groups` 1194 -- 1195 1196 1197 -- -------------------------------------------------------- 1198 1199 -- 1200 -- Структура таблицы `reports` 1201 -- 1202 1203 DROP TABLE IF EXISTS `reports`; 1163 1204 CREATE TABLE IF NOT EXISTS `reports` ( 1164 1205 `id` int(10) unsigned NOT NULL AUTO_INCREMENT, … … 1174 1215 1175 1216 -- 1176 -- ���� �� `reports` 1177 -- 1178 1179 1180 -- -------------------------------------------------------- 1181 1182 -- 1183 -- ����� `requests` 1184 -- 1185 1217 -- Дамп данных таблицы `reports` 1218 -- 1219 1220 1221 -- -------------------------------------------------------- 1222 1223 -- 1224 -- Структура таблицы `requests` 1225 -- 1226 1227 DROP TABLE IF EXISTS `requests`; 1186 1228 CREATE TABLE IF NOT EXISTS `requests` ( 1187 1229 `id` int(10) unsigned NOT NULL AUTO_INCREMENT, … … 1200 1242 1201 1243 -- 1202 -- ���� �� `requests` 1203 -- 1204 1205 1206 -- -------------------------------------------------------- 1207 1208 -- 1209 -- ����� `requests_votes` 1210 -- 1211 1244 -- Дамп данных таблицы `requests` 1245 -- 1246 1247 1248 -- -------------------------------------------------------- 1249 1250 -- 1251 -- Структура таблицы `requests_votes` 1252 -- 1253 1254 DROP TABLE IF EXISTS `requests_votes`; 1212 1255 CREATE TABLE IF NOT EXISTS `requests_votes` ( 1213 1256 `id` int(10) unsigned NOT NULL AUTO_INCREMENT, … … 1219 1262 1220 1263 -- 1221 -- ���� �� `requests_votes` 1222 -- 1223 1224 1225 -- -------------------------------------------------------- 1226 1227 -- 1228 -- ����� `sessions` 1229 -- 1230 1264 -- Дамп данных таблицы `requests_votes` 1265 -- 1266 1267 1268 -- -------------------------------------------------------- 1269 1270 -- 1271 -- Структура таблицы `sessions` 1272 -- 1273 1274 DROP TABLE IF EXISTS `sessions`; 1231 1275 CREATE TABLE IF NOT EXISTS `sessions` ( 1232 1276 `session_id` varchar(32) NOT NULL DEFAULT '', … … 1244 1288 1245 1289 -- 1246 -- ���� �� `sessions` 1247 -- 1248 1249 1250 -- -------------------------------------------------------- 1251 1252 -- 1253 -- ����� `sessions_keys` 1254 -- 1255 1290 -- Дамп данных таблицы `sessions` 1291 -- 1292 1293 1294 -- -------------------------------------------------------- 1295 1296 -- 1297 -- Структура таблицы `sessions_keys` 1298 -- 1299 1300 DROP TABLE IF EXISTS `sessions_keys`; 1256 1301 CREATE TABLE IF NOT EXISTS `sessions_keys` ( 1257 1302 `key_id` varchar(32) NOT NULL DEFAULT '', … … 1263 1308 1264 1309 -- 1265 -- ���� �� `sessions_keys` 1266 -- 1267 1268 1269 -- -------------------------------------------------------- 1270 1271 -- 1272 -- ����� `simpaty` 1273 -- 1274 1310 -- Дамп данных таблицы `sessions_keys` 1311 -- 1312 1313 1314 -- -------------------------------------------------------- 1315 1316 -- 1317 -- Структура таблицы `simpaty` 1318 -- 1319 1320 DROP TABLE IF EXISTS `simpaty`; 1275 1321 CREATE TABLE IF NOT EXISTS `simpaty` ( 1276 1322 `id` int(10) unsigned NOT NULL AUTO_INCREMENT, … … 1289 1335 1290 1336 -- 1291 -- ���� �� `simpaty` 1292 -- 1293 1294 1295 -- -------------------------------------------------------- 1296 1297 -- 1298 -- ����� `sitelog` 1299 -- 1300 1337 -- Дамп данных таблицы `simpaty` 1338 -- 1339 1340 1341 -- -------------------------------------------------------- 1342 1343 -- 1344 -- Структура таблицы `sitelog` 1345 -- 1346 1347 DROP TABLE IF EXISTS `sitelog`; 1301 1348 CREATE TABLE IF NOT EXISTS `sitelog` ( 1302 1349 `id` int(10) unsigned NOT NULL AUTO_INCREMENT, … … 1309 1356 1310 1357 -- 1311 -- ���� �� `sitelog` 1312 -- 1313 1314 1315 -- -------------------------------------------------------- 1316 1317 -- 1318 -- ����� `smilies` 1319 -- 1320 1358 -- Дамп данных таблицы `sitelog` 1359 -- 1360 1361 1362 -- -------------------------------------------------------- 1363 1364 -- 1365 -- Структура таблицы `smilies` 1366 -- 1367 1368 DROP TABLE IF EXISTS `smilies`; 1321 1369 CREATE TABLE IF NOT EXISTS `smilies` ( 1322 1370 `smilies_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, … … 1328 1376 1329 1377 -- 1330 -- ���� ��`smilies`1378 -- Дамп данных таблицы `smilies` 1331 1379 -- 1332 1380 … … 1513 1561 1514 1562 -- 1515 -- ����� `snatched` 1516 -- 1517 1563 -- Структура таблицы `snatched` 1564 -- 1565 1566 DROP TABLE IF EXISTS `snatched`; 1518 1567 CREATE TABLE IF NOT EXISTS `snatched` ( 1519 1568 `torrentid` int(10) DEFAULT '0', … … 1529 1578 1530 1579 -- 1531 -- ���� �� `snatched` 1532 -- 1533 1534 1535 -- -------------------------------------------------------- 1536 1537 -- 1538 -- ����� `sos` 1539 -- 1540 1580 -- Дамп данных таблицы `snatched` 1581 -- 1582 1583 1584 -- -------------------------------------------------------- 1585 1586 -- 1587 -- Структура таблицы `sos` 1588 -- 1589 1590 DROP TABLE IF EXISTS `sos`; 1541 1591 CREATE TABLE IF NOT EXISTS `sos` ( 1542 1592 `torrentid` int(11) DEFAULT '0', … … 1547 1597 1548 1598 -- 1549 -- ���� �� `sos` 1550 -- 1551 1552 1553 -- -------------------------------------------------------- 1554 1555 -- 1556 -- ����� `tags` 1557 -- 1558 1599 -- Дамп данных таблицы `sos` 1600 -- 1601 1602 1603 -- -------------------------------------------------------- 1604 1605 -- 1606 -- Структура таблицы `tags` 1607 -- 1608 1609 DROP TABLE IF EXISTS `tags`; 1559 1610 CREATE TABLE IF NOT EXISTS `tags` ( 1560 1611 `tag_name` varchar(255) NOT NULL, … … 1567 1618 1568 1619 -- 1569 -- ���� �� `tags` 1570 -- 1571 1572 1573 -- -------------------------------------------------------- 1574 1575 -- 1576 -- ����� `tags_users` 1577 -- 1578 1620 -- Дамп данных таблицы `tags` 1621 -- 1622 1623 1624 -- -------------------------------------------------------- 1625 1626 -- 1627 -- Структура таблицы `tags_users` 1628 -- 1629 1630 DROP TABLE IF EXISTS `tags_users`; 1579 1631 CREATE TABLE IF NOT EXISTS `tags_users` ( 1580 1632 `tag_users_uid` int(10) NOT NULL, … … 1588 1640 1589 1641 -- 1590 -- ���� �� `tags_users` 1591 -- 1592 1593 1594 -- -------------------------------------------------------- 1595 1596 -- 1597 -- ����� `thanks` 1598 -- 1599 1642 -- Дамп данных таблицы `tags_users` 1643 -- 1644 1645 1646 -- -------------------------------------------------------- 1647 1648 -- 1649 -- Структура таблицы `thanks` 1650 -- 1651 1652 DROP TABLE IF EXISTS `thanks`; 1600 1653 CREATE TABLE IF NOT EXISTS `thanks` ( 1601 1654 `torrentid` int(10) DEFAULT '0', … … 1606 1659 1607 1660 -- 1608 -- ���� �� `thanks` 1609 -- 1610 1611 1612 -- -------------------------------------------------------- 1613 1614 -- 1615 -- ����� `themes` 1616 -- 1617 1661 -- Дамп данных таблицы `thanks` 1662 -- 1663 1664 1665 -- -------------------------------------------------------- 1666 1667 -- 1668 -- Структура таблицы `themes` 1669 -- 1670 1671 DROP TABLE IF EXISTS `themes`; 1618 1672 CREATE TABLE IF NOT EXISTS `themes` ( 1619 1673 `themes_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, … … 1670 1724 1671 1725 -- 1672 -- ���� ��`themes`1726 -- Дамп данных таблицы `themes` 1673 1727 -- 1674 1728 … … 1681 1735 1682 1736 -- 1683 -- ����� `torrents` 1684 -- 1685 1737 -- Структура таблицы `torrents` 1738 -- 1739 1740 DROP TABLE IF EXISTS `torrents`; 1686 1741 CREATE TABLE IF NOT EXISTS `torrents` ( 1687 1742 `fid` int(10) unsigned NOT NULL AUTO_INCREMENT, … … 1734 1789 1735 1790 -- 1736 -- ���� �� `torrents` 1737 -- 1738 1739 1740 -- -------------------------------------------------------- 1741 1742 -- 1743 -- ����� `uploadapp` 1744 -- 1745 1791 -- Дамп данных таблицы `torrents` 1792 -- 1793 1794 1795 -- -------------------------------------------------------- 1796 1797 -- 1798 -- Структура таблицы `uploadapp` 1799 -- 1800 1801 DROP TABLE IF EXISTS `uploadapp`; 1746 1802 CREATE TABLE IF NOT EXISTS `uploadapp` ( 1747 1803 `id` int(10) unsigned NOT NULL AUTO_INCREMENT, … … 1762 1818 1763 1819 -- 1764 -- ���� �� `uploadapp` 1765 -- 1766 1767 1768 -- -------------------------------------------------------- 1769 1770 -- 1771 -- ����� `users` 1772 -- 1773 1820 -- Дамп данных таблицы `uploadapp` 1821 -- 1822 1823 1824 -- -------------------------------------------------------- 1825 1826 -- 1827 -- Структура таблицы `users` 1828 -- 1829 1830 DROP TABLE IF EXISTS `users`; 1774 1831 CREATE TABLE IF NOT EXISTS `users` ( 1775 1832 `uid` int(10) unsigned NOT NULL DEFAULT '0', … … 1850 1907 1851 1908 -- 1852 -- ���� �� `users` 1853 -- 1854 1855 INSERT INTO `users` (`uid`, `name`, `pass`, `secret`, `email`, `status`, `added`, `editsecret`, `privacy`, `acceptpms`, `ip`, `class`, `avatar`, `uploaded`, `downloaded`, `title`, `country`, `notifs`, `modcomment`, `enabled`, `avatars`, `donor`, `warneduntil`, `warn`, `torrentsperpage`, `deletepms`, `savepms`, `torrent_pass`, `tzoffset`, `user_dst`, `hiddentorrents`, `parked`, `invites`, `invited_by`, `download`, `upload`, `icq`, `msn`, `aim`, `yahoo`, `skype`, `commentpm`, `gender`, `birthday`, `autodemote`, `language`, `total_seed_time`, `user_reputation`, `user_reputation_level`, `user_session_time`, `user_session_page`, `user_level`, `user_posts`, `user_lastvisit`, `notify_forum`, `user_sig`, `user_style`, `can_leech`, `torrents_limit`, `user_unread_pms`, `user_rank_id`, `user_lastmark`) VALUES 1856 (0, 'Anonymous', '', '', '', 1, 943909200, '', 1, 1, '0.0.0.0', 1, '', 0, 0, '', 0, '', '', 1, 1, 0, 0, 0, 0, 1, 0, 'fbc807cec4a079dd5add35845ec9d059', 0.00, 0, 0, 0, 0, 0, 65536, 65536, '', '', '', '', '', 1, 0, '0000-00-00', 1, 'russian', 3600000, 0, 0, 943909200, '0', 0, 0, 0, 1, '', 1, 0, 0, 0, 0, 0), 1857 (1, 'admin', 'd41d8cd98f00b204e9800998ecf8427e', '', 'EMAIL@ADDRESS.COM', 1, 1268666466, '', 3, 1, '127.0.0.1', 7, '', 0, 0, '', 3, '', '', 1, 1, 0, 0, 0, 60, 1, 1, '57154e78ba0de787487576ae87207371', 3.00, 1, 0, 0, 0, 0, 10485760, 10485760, '', '', '', '', '', 1, 0, '0000-00-00', 1, 'english', 0, 0, 0, 1268666598, 'chat.php?action=view', 1, 0, 1268666469, 1, '', 1, 0, 0, 0, 0, 0); 1858 1859 -- -------------------------------------------------------- 1860 1861 -- 1862 -- ����� `vote_desc` 1863 -- 1864 1909 -- Дамп данных таблицы `users` 1910 -- 1911 1912 INSERT INTO `users` (`uid`, `name`, `name_append`, `pass`, `secret`, `email`, `status`, `added`, `editsecret`, `privacy`, `acceptpms`, `ip`, `class`, `avatar`, `uploaded`, `downloaded`, `title`, `country`, `notifs`, `modcomment`, `enabled`, `avatars`, `donor`, `warneduntil`, `warn`, `torrentsperpage`, `deletepms`, `savepms`, `torrent_pass`, `tzoffset`, `user_dst`, `hiddentorrents`, `parked`, `invites`, `invited_by`, `download`, `upload`, `icq`, `msn`, `aim`, `yahoo`, `skype`, `commentpm`, `gender`, `birthday`, `autodemote`, `language`, `total_seed_time`, `user_reputation`, `user_reputation_level`, `user_session_time`, `user_session_page`, `user_level`, `user_posts`, `user_lastvisit`, `notify_forum`, `user_sig`, `user_style`, `can_leech`, `torrents_limit`, `user_unread_pms`, `user_rank_id`, `user_lastmark`) VALUES 1913 (0, 'Anonymous', '', '', '', '', 1, 943909200, '', 1, 1, '0.0.0.0', 1, '', 0, 0, '', 0, '[forum]', '', 1, 1, 0, 0, 0, 0, 1, 0, 'fbc807cec4a079dd5add35845ec9d059', 0.00, 0, 0, 0, 0, 0, 65536, 65536, '', '', '', '', '', 1, 0, '0000-00-00', 1, 'russian', 3600000, 0, 0, 943909200, '0', 0, 0, 0, 1, '', 1, 0, 0, 0, 0, 0), 1914 (1, 'admin', '', 'd41d8cd98f00b204e9800998ecf8427e', '', 'EMAIL@ADDRESS.COM', 1, 1268666466, '', 3, 1, '127.0.0.1', 7, '', 0, 0, '', 3, '[forum]', '', 1, 1, 0, 0, 0, 60, 1, 1, '57154e78ba0de787487576ae87207371', 3.00, 1, 0, 0, 0, 0, 10485760, 10485760, '', '', '', '', '', 1, 0, '0000-00-00', 1, 'english', 0, 0, 0, 1277214025, 'login.php', 1, 0, 1268666598, 1, '', 1, 0, 0, 0, 0, 0); 1915 1916 -- -------------------------------------------------------- 1917 1918 -- 1919 -- Структура таблицы `vote_desc` 1920 -- 1921 1922 DROP TABLE IF EXISTS `vote_desc`; 1865 1923 CREATE TABLE IF NOT EXISTS `vote_desc` ( 1866 1924 `vote_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, … … 1874 1932 1875 1933 -- 1876 -- ���� �� `vote_desc` 1877 -- 1878 1879 1880 -- -------------------------------------------------------- 1881 1882 -- 1883 -- ����� `vote_results` 1884 -- 1885 1934 -- Дамп данных таблицы `vote_desc` 1935 -- 1936 1937 1938 -- -------------------------------------------------------- 1939 1940 -- 1941 -- Структура таблицы `vote_results` 1942 -- 1943 1944 DROP TABLE IF EXISTS `vote_results`; 1886 1945 CREATE TABLE IF NOT EXISTS `vote_results` ( 1887 1946 `vote_id` mediumint(8) unsigned DEFAULT '0', … … 1894 1953 1895 1954 -- 1896 -- ���� �� `vote_results` 1897 -- 1898 1899 1900 -- -------------------------------------------------------- 1901 1902 -- 1903 -- ����� `vote_voters` 1904 -- 1905 1955 -- Дамп данных таблицы `vote_results` 1956 -- 1957 1958 1959 -- -------------------------------------------------------- 1960 1961 -- 1962 -- Структура таблицы `vote_voters` 1963 -- 1964 1965 DROP TABLE IF EXISTS `vote_voters`; 1906 1966 CREATE TABLE IF NOT EXISTS `vote_voters` ( 1907 1967 `vote_id` mediumint(8) unsigned DEFAULT '0', … … 1915 1975 1916 1976 -- 1917 -- ���� �� `vote_voters` 1918 -- 1919 1920 1921 -- -------------------------------------------------------- 1922 1923 -- 1924 -- ����� `words` 1925 -- 1926 1977 -- Дамп данных таблицы `vote_voters` 1978 -- 1979 1980 1981 -- -------------------------------------------------------- 1982 1983 -- 1984 -- Структура таблицы `words` 1985 -- 1986 1987 DROP TABLE IF EXISTS `words`; 1927 1988 CREATE TABLE IF NOT EXISTS `words` ( 1928 1989 `word_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, … … 1933 1994 1934 1995 -- 1935 -- ���� �� `words` 1936 -- 1996 -- Дамп данных таблицы `words` 1997 -- 1998 templates/admin/user_edit_body.tpl
r223 r316 155 155 <tr> 156 156 <td class="row1"><span class="gen">{L_NOTIFY_ON_REPLY}</span></td> 157 <td class="row2"> 158 <input type="radio" name="notifyreply" value="1" {NOTIFY_REPLY_YES} /> 159 <span class="gen">{L_YES}</span> 160 <input type="radio" name="notifyreply" value="0" {NOTIFY_REPLY_NO} /> 161 <span class="gen">{L_NO}</span></td> 157 <td class="row2">{NOTIFY_OPTIONS}</td> 162 158 </tr> 163 159 <tr> 164 <td class="row1"><span class="gen">{L_NOTIFY_PM}</span></td> 165 <td class="row2"> 166 <input type="radio" name="notifypm" value="1" {NOTIFY_PM_YES} /> 167 <span class="gen">{L_YES}</span> 168 <input type="radio" name="notifypm" value="0" {NOTIFY_PM_NO} /> 169 <span class="gen">{L_NO}</span></td> 170 </tr> 171 <tr> 172 <td class="row1"><span class="gen">{L_COMMENTPM}</span></td> 160 <td class="row1"><span class="gen">{L_AUTO_NOTIFY}</span></td> 173 161 <td class="row2"> 174 162 <input type="radio" name="commentpm" value="1" {COMMENT_PM_YES} /> … … 177 165 <span class="gen">{L_NO}</span></td> 178 166 </tr> 167 179 168 <tr> 180 169 <td class="row1"><span class="gen">{L_ACCEPT_PM_FROM}</span></td> … … 189 178 <tr> 190 179 <td class="row1"><span class="gen">{L_DELETE_PM}</span></td> 191 <td class="row2"><input type="checkbox" name="deletepms" {DELETE_PM} />180 <td class="row2"><input type="checkbox" name="deletepms" value="1" {DELETE_PM} /> 192 181 <span class="gen">{L_DELETE_PM_DESCR}</span></td> 193 182 </tr> 194 183 <tr> 195 184 <td class="row1"><span class="gen">{L_SAVE_PM}</span></td> 196 <td class="row2"><input type="checkbox" name="savepms" {SAVE_PM} />185 <td class="row2"><input type="checkbox" name="savepms" value="1" {SAVE_PM} /> 197 186 <span class="gen">{L_SAVE_PM_DESCR}</span></td> 198 187 </tr> templates/bithdtv/details.html
r305 r316 10 10 <tr> 11 11 <td class="detail" valign="top" align="right" width="100">{L_DOWNLOAD}</td> 12 <td class="detail" valign="top" align="left"><a href="{U_DOWNLOAD}" onclick="alert('{L_DOWNLOAD_WARNING}'); return true;"<!-- IF U_DOWNLOAD_AS_GZIP --> onmouseover="return overlib('<a href="{U_DOWNLOAD_AS_GZIP}">{L_DOWNLOAD_AS_GZIP_ARCHIVE}</a>', STICKY, MOUSEOFF);" onmouseout="return nd();"<!-- ENDIF -->><img src="{TEMPLATE_PATH}/images/arrowdown.gif" border="0" alt="{L_DOWNLOAD}" title="{L_DOWNLOAD}" /> {TORRENT_FILENAME}</a><!-- IF L_ADD_TO_BOOKMARKS --> [<a href="{U_ADD_TO_BOOKMARKS}"><img src="{TEMPLATE_PATH}/images/bookmarks.gif" border="0" alt="{L_ADD_TO_BOOKMARKS}" title="{L_ADD_TO_BOOKMARKS}" /></a>] 12 <td class="detail" valign="top" align="left"><a href="{U_DOWNLOAD}" onclick="alert('{L_DOWNLOAD_WARNING}'); return true;"<!-- IF U_DOWNLOAD_AS_GZIP --> onmouseover="return overlib('<a href="{U_DOWNLOAD_AS_GZIP}">{L_DOWNLOAD_AS_GZIP_ARCHIVE}</a>', STICKY, MOUSEOFF);" onmouseout="return nd();"<!-- ENDIF -->><img src="{TEMPLATE_PATH}/images/arrowdown.gif" border="0" alt="{L_DOWNLOAD}" title="{L_DOWNLOAD}" /> {TORRENT_FILENAME}</a> 13 14 <!-- IF S_USER_LOGGED_IN --> 15 16 [<a href="{U_ADD_TO_BOOKMARKS}">{L_ADD_TO_BOOKMARKS}</a>] 13 17 <!-- BEGIN switch_add_to_index --> 14 [<a href="{switch_add_to_index.U_ADD_TO_INDEX}">{L_ADD_TO_INDEX}</a>] 15 <!-- END switch_add_to_index --> 16 <!-- ENDIF --> 18 19 [<a href="{switch_add_to_index.U_ADD_TO_INDEX}">{L_ADD_TO_INDEX}</a>] 20 21 <!-- END switch_add_to_index --> 22 23 <!-- ENDIF --> 17 24 </td> 18 25 </tr> templates/bithdtv/ucp_body.html
r308 r316 24 24 </tr> 25 25 <tr> 26 <td class="detail"><label for="commentpm">{L_ COMMENTPM}</label><br /><span>{L_COMMENTPM_DESCR}</span></td>26 <td class="detail"><label for="commentpm">{L_AUTO_NOTIFY}</label><br /><span>{L_AUTO_NOTIFY_EXPLAIN}</span></td> 27 27 <td class="detail">{COMMENTPM_INPUT}</td> 28 28 </tr> … … 66 66 <tr> 67 67 <td class="detail"><label for="upload">{L_INTERNET_SPEED}</label><br /><span>{L_INTERNET_SPEED_EXPLAIN}</span></td> 68 <td class="detail"><img src=" {ROOT_PATH}pic/speed_up.png" alt="" /> {UPLOAD_SPEED_OPTIONS} <img src="{ROOT_PATH}pic/speed_down.png" alt="" /> {DOWNLOAD_SPEED_OPTIONS}</td>68 <td class="detail"><img src="pic/speed_up.png" alt="" /> {UPLOAD_SPEED_OPTIONS} <img src="pic/speed_down.png" alt="" /> {DOWNLOAD_SPEED_OPTIONS}</td> 69 69 </tr> 70 70 <tr> 71 71 <td class="detail"><label for="icq">{L_MESSAGING_SYSTEM}</label></td> 72 <td class="detail"><img src=" {ROOT_PATH}pic/contact/icq.gif" width="17" height="17" alt="{L_ICQ}" /><input maxlength="10" size="25" name="icq" id="icq" value="{USER_ICQ}" />{L_ICQ}<br />73 <img src=" {ROOT_PATH}pic/contact/aim.gif" width="17" height="17" alt="{L_AIM}" /><input maxlength="30" size="25" name="aim" id="aim" value="{USER_AIM}" />{L_AIM}<br />74 <img src=" {ROOT_PATH}pic/contact/msn.gif" width="17" height="17" alt="{L_MSN}" /><input maxlength="30" size="25" name="msn" id="msn" value="{USER_MSN}" />{L_MSN}<br />75 <img src=" {ROOT_PATH}pic/contact/yahoo.gif" width="17" height="17" alt="{L_YAHOO}" /><input maxlength="30" size="25" name="yahoo" id="yahoo" value="{USER_YAHOO}" />{L_YAHOO}<br />76 <img src=" {ROOT_PATH}pic/contact/skype.gif" width="17" height="17" alt="{L_SKYPE}" /><input maxlength="20" size="25" name="skype" id="skype" value="{USER_SKYPE}" />{L_SKYPE}</td>72 <td class="detail"><img src="pic/contact/icq.gif" width="17" height="17" alt="{L_ICQ}" /><input maxlength="10" size="25" name="icq" id="icq" value="{USER_ICQ}" />{L_ICQ}<br /> 73 <img src="pic/contact/aim.gif" width="17" height="17" alt="{L_AIM}" /><input maxlength="30" size="25" name="aim" id="aim" value="{USER_AIM}" />{L_AIM}<br /> 74 <img src="pic/contact/msn.gif" width="17" height="17" alt="{L_MSN}" /><input maxlength="30" size="25" name="msn" id="msn" value="{USER_MSN}" />{L_MSN}<br /> 75 <img src="pic/contact/yahoo.gif" width="17" height="17" alt="{L_YAHOO}" /><input maxlength="30" size="25" name="yahoo" id="yahoo" value="{USER_YAHOO}" />{L_YAHOO}<br /> 76 <img src="pic/contact/skype.gif" width="17" height="17" alt="{L_SKYPE}" /><input maxlength="20" size="25" name="skype" id="skype" value="{USER_SKYPE}" />{L_SKYPE}</td> 77 77 </tr> 78 78 <tr> templates/bithdtv/ucp_checkcomm_body.html
r148 r316 1 1 <!-- INCLUDE ucp_header.html --> 2 2 3 <!-- IF NO_FOUND-->3 <!-- IF not COUNT --> 4 4 5 5 {L_NO_CHECKCOMM} … … 13 13 <td class="colhead" width=25% align="left" style="font-size:10px;">{L_LAST_POST}</td> 14 14 </tr> 15 <!-- BEGIN checkcomm_row --> 15 16 <!-- BEGIN checkcomm_row --> 17 16 18 <tr> 17 <td class="{checkcomm_row.ROW_CLASS}"><img src="{ IMAGE_INBOXNEW}" title="{L_NEW_POSTS}" alt="{L_NEW_POSTS}" /></td>18 <td align="left" class="{checkcomm_row.ROW_CLASS}"><b><a href="{checkcomm_row.U_FILE}">{checkcomm_row. TORRENT_NAME}</a></b><br />19 <td class="{checkcomm_row.ROW_CLASS}"><img src="{TEMPLATE_IMAGE_INBOXNEW}" title="{L_NEW_POSTS}" alt="{L_NEW_POSTS}" /></td> 20 <td align="left" class="{checkcomm_row.ROW_CLASS}"><b><a href="{checkcomm_row.U_FILE}">{checkcomm_row.NAME}</a></b><br /> 19 21 <i>{checkcomm_row.NAME}</i> | <i><a href="{checkcomm_row.U_CHECKOFF}">{L_CHECKOFF}</a></i> 20 22 </td> 21 23 <td align="left" class="{checkcomm_row.ROW_CLASS}">{L_FROM} <!-- IF checkcomm_row.U_LAST_POSTER --><a href="{checkcomm_row.U_LAST_POSTER}">{checkcomm_row.LAST_POSTER_NAME}</a><!-- ELSE -->{checkcomm_row.LAST_POSTER_NAME}<!-- ENDIF --> 22 <a href="{checkcomm_row.U_COMMENTS}"><img src="{ IMAGE_ARROW_RIGHT}" alt="{L_GO_TO_THE_LAST_POST}" title="{L_GO_TO_THE_LAST_POST}" /></a><br />24 <a href="{checkcomm_row.U_COMMENTS}"><img src="{TEMPLATE_IMAGE_ARROW_RIGHT}" alt="{L_GO_TO_THE_LAST_POST}" title="{L_GO_TO_THE_LAST_POST}" /></a><br /> 23 25 <i>{checkcomm_row.ADDED}</i> 24 26 </td> 25 27 </tr> 26 <!-- END checkcomm_row --> 28 29 30 <!-- END checkcomm_row --> 31 27 32 </table> 33 28 34 {PAGERBOTTOM} 29 35 templates/main/ucp_body.html
r308 r316 24 24 </dl> 25 25 <dl> 26 <dt><label for="commentpm">{L_ COMMENTPM}</label><br /><span>{L_COMMENTPM_DESCR}</span></dt>26 <dt><label for="commentpm">{L_AUTO_NOTIFY}</label><br /><span>{L_AUTO_NOTIFY_EXPLAIN}</span></dt> 27 27 <dd>{COMMENTPM_INPUT}</dd> 28 28 </dl> templates/main/ucp_checkcomm_body.html
r189 r316 1 1 <!-- INCLUDE ucp_header.html --> 2 2 3 <!-- IF NO_FOUND-->3 <!-- IF not COUNT --> 4 4 5 5 {L_NO_CHECKCOMM} … … 19 19 <!-- BEGIN checkcomm_row --> 20 20 <tr> 21 <td class="{checkcomm_row.ROW_CLASS}"><img src="{ IMAGE_INBOXNEW}" title="{L_NEW_POSTS}" alt="{L_NEW_POSTS}" /></td>22 <td align="left" class="{checkcomm_row.ROW_CLASS}"><b><a href="{checkcomm_row.U_FILE}">{checkcomm_row. TORRENT_NAME}</a></b><br />23 <i>{checkcomm_row. NAME}</i> | <i><a href="{checkcomm_row.U_CHECKOFF}">{L_CHECKOFF}</a></i>21 <td class="{checkcomm_row.ROW_CLASS}"><img src="{TEMPLATE_IMAGE_INBOXNEW}" title="{L_NEW_POSTS}" alt="{L_NEW_POSTS}" /></td> 22 <td align="left" class="{checkcomm_row.ROW_CLASS}"><b><a href="{checkcomm_row.U_FILE}">{checkcomm_row.NAME}</a></b><br /> 23 <i>{checkcomm_row.TYPE_NAME}</i> | <i><a href="{checkcomm_row.U_CHECKOFF}" target="_blank">{L_CHECKOFF}</a></i> 24 24 </td> 25 25 <td align="left" class="{checkcomm_row.ROW_CLASS}">{L_FROM} <!-- IF checkcomm_row.U_LAST_POSTER --><a href="{checkcomm_row.U_LAST_POSTER}">{checkcomm_row.LAST_POSTER_NAME}</a><!-- ELSE -->{checkcomm_row.LAST_POSTER_NAME}<!-- ENDIF --> 26 <a href="{checkcomm_row.U_COMMENTS}"><img src="{ IMAGE_ARROW_RIGHT}" alt="{L_GO_TO_THE_LAST_POST}" title="{L_GO_TO_THE_LAST_POST}" /></a><br />26 <a href="{checkcomm_row.U_COMMENTS}"><img src="{TEMPLATE_IMAGE_ARROW_RIGHT}" alt="{L_GO_TO_THE_LAST_POST}" title="{L_GO_TO_THE_LAST_POST}" /></a><br /> 27 27 <i>{checkcomm_row.ADDED}</i> 28 28 </td> templates/reflection/details.html
r305 r316 12 12 <div class="torrentViewLeft">{L_DOWNLOAD}</div> 13 13 <div class="torrentViewRight"> 14 <a href="{U_DOWNLOAD}" onclick="alert('{L_DOWNLOAD_WARNING}'); return true;"<!-- IF U_DOWNLOAD_AS_GZIP --> onmouseover="return overlib('<a href="{U_DOWNLOAD_AS_GZIP}">{L_DOWNLOAD_AS_GZIP_ARCHIVE}</a>', STICKY, MOUSEOFF);" onmouseout="return nd();"<!-- ENDIF -->>{TORRENT_FILENAME}</a><!-- IF L_ADD_TO_BOOKMARKS --> [<a href="{U_ADD_TO_BOOKMARKS}">{L_ADD_TO_BOOKMARKS}</a>] 14 <a href="{U_DOWNLOAD}" onclick="alert('{L_DOWNLOAD_WARNING}'); return true;"<!-- IF U_DOWNLOAD_AS_GZIP --> onmouseover="return overlib('<a href="{U_DOWNLOAD_AS_GZIP}">{L_DOWNLOAD_AS_GZIP_ARCHIVE}</a>', STICKY, MOUSEOFF);" onmouseout="return nd();"<!-- ENDIF -->>{TORRENT_FILENAME}</a> 15 16 <!-- IF S_USER_LOGGED_IN --> 17 18 [<a href="{U_ADD_TO_BOOKMARKS}">{L_ADD_TO_BOOKMARKS}</a>] 15 19 <!-- BEGIN switch_add_to_index --> 16 [<a href="{switch_add_to_index.U_ADD_TO_INDEX}">{L_ADD_TO_INDEX}</a>] 17 <!-- END switch_add_to_index --> 18 <!-- ENDIF --> 20 21 [<a href="{switch_add_to_index.U_ADD_TO_INDEX}">{L_ADD_TO_INDEX}</a>] 22 23 <!-- END switch_add_to_index --> 24 25 <!-- ENDIF --> 19 26 </div> 20 27 templates/reflection/ucp_body.html
r308 r316 28 28 </div> 29 29 <div class="tableRow"> 30 <div class="leftCell" style="width:38%"><label for="commentpm">{L_ COMMENTPM}</label><br /><span>{L_COMMENTPM_DESCR}</span></div>30 <div class="leftCell" style="width:38%"><label for="commentpm">{L_AUTO_NOTIFY}</label><br /><span>{L_AUTO_NOTIFY_EXPLAIN}</span></div> 31 31 <div class="rightCell" style="width:60%">{COMMENTPM_INPUT}</div> 32 32 <div class="clear"> </div> templates/reflection/ucp_checkcomm_body.html
r148 r316 1 1 <!-- INCLUDE ucp_header.html --> 2 2 3 <!-- IF NO_FOUND-->3 <!-- IF not COUNT --> 4 4 5 5 {L_NO_CHECKCOMM} … … 16 16 <!-- BEGIN checkcomm_row --> 17 17 <div class="tableRow"> 18 <div class="leftCell" style="width:2%;"><img src="{ IMAGE_INBOXNEW}" title="{L_NEW_POSTS}" alt="{L_NEW_POSTS}" /></div>19 <div class="middleCell" style="width:73%;"><b><a href="{checkcomm_row.U_FILE}">{checkcomm_row. TORRENT_NAME}</a></b><br />20 <i>{checkcomm_row. NAME}</i> | <i><a href="{checkcomm_row.U_CHECKOFF}">{L_CHECKOFF}</a></i>18 <div class="leftCell" style="width:2%;"><img src="{TEMPLATE_IMAGE_INBOXNEW}" title="{L_NEW_POSTS}" alt="{L_NEW_POSTS}" /></div> 19 <div class="middleCell" style="width:73%;"><b><a href="{checkcomm_row.U_FILE}">{checkcomm_row.NAME}</a></b><br /> 20 <i>{checkcomm_row.TYPE_NAME}</i> | <i><a href="{checkcomm_row.U_CHECKOFF}" target="_blank">{L_CHECKOFF}</a></i> 21 21 </div> 22 22 <div class="rightCell" style="width:25%;">{L_FROM} <!-- IF checkcomm_row.U_LAST_POSTER --><a href="{checkcomm_row.U_LAST_POSTER}">{checkcomm_row.LAST_POSTER_NAME}</a><!-- ELSE -->{checkcomm_row.LAST_POSTER_NAME}<!-- ENDIF --> 23 <a href="{checkcomm_row.U_COMMENTS}"><img src="{ IMAGE_ARROW_RIGHT}" alt="{L_GO_TO_THE_LAST_POST}" title="{L_GO_TO_THE_LAST_POST}" /></a><br />23 <a href="{checkcomm_row.U_COMMENTS}"><img src="{TEMPLATE_IMAGE_ARROW_RIGHT}" alt="{L_GO_TO_THE_LAST_POST}" title="{L_GO_TO_THE_LAST_POST}" /></a><br /> 24 24 <i>{checkcomm_row.ADDED}</i> 25 25 </div> upload.php
r308 r316 86 86 $id = $db->sql_nextid(); 87 87 if ( $userdata['commentpm'] ) { 88 $sql = 'INSERT INTO ' . COMMENTS_NOTIFY_TABLE . ' (checkcomm_userid, checkcomm_for_id, checkcomm_type ) VALUES (' . $userdata['uid'] . ', ' . $id . ', ' . TYPE_REQUEST. ')';88 $sql = 'INSERT INTO ' . COMMENTS_NOTIFY_TABLE . ' (checkcomm_userid, checkcomm_for_id, checkcomm_type, checkcomm_view_status) VALUES (' . $userdata['uid'] . ', ' . $id . ', ' . TYPE_REQUEST . ', ' . VIEW_STATUS_VIEWED . ')'; 89 89 $db->sql_query($sql); 90 90 } … … 110 110 111 111 if ( $userdata['commentpm'] ) { 112 $sql = 'INSERT INTO ' . COMMENTS_NOTIFY_TABLE . ' (checkcomm_userid, checkcomm_for_id, checkcomm_type ) VALUES (' . $userdata['uid'] . ', ' . $id . ', ' . TYPE_OFFER. ')';112 $sql = 'INSERT INTO ' . COMMENTS_NOTIFY_TABLE . ' (checkcomm_userid, checkcomm_for_id, checkcomm_type, checkcomm_view_status) VALUES (' . $userdata['uid'] . ', ' . $id . ', ' . TYPE_OFFER . ', ' . VIEW_STATUS_VIEWED . ')'; 113 113 $db->sql_query($sql); 114 114 } … … 205 205 @rename($torrent_dir . DIRECTORY_SEPARATOR . $filename . '.torrent', $torrent_dir . DIRECTORY_SEPARATOR . $id . '.torrent'); 206 206 207 $sql = 'INSERT INTO ' . COMMENTS_NOTIFY_TABLE . ' (checkcomm_userid, checkcomm_for_id, checkcomm_type ) VALUES (' . $userdata['uid'] . ', ' . $id . ', ' . TYPE_TORRENT. ')';207 $sql = 'INSERT INTO ' . COMMENTS_NOTIFY_TABLE . ' (checkcomm_userid, checkcomm_for_id, checkcomm_type, checkcomm_view_status) VALUES (' . $userdata['uid'] . ', ' . $id . ', ' . TYPE_TORRENT . ', ' . VIEW_STATUS_VIEWED . ')'; 208 208 $db->sql_query($sql); 209 209
