Changeset 324
- Timestamp:
- 12/07/10 22:45:36 (1 year ago)
- Files:
-
- admin/admin_categories.php (modified) (2 diffs)
- admin/admin_mass_email.php (modified) (6 diffs)
- admin/admin_users.php (modified) (5 diffs)
- admin/admin_voting.php (modified) (5 diffs)
- admin/pagestart.php (modified) (2 diffs)
- ajax.php (modified) (5 diffs)
- announce.php (modified) (1 diff)
- bookmarks.php (modified) (1 diff)
- browse.php (modified) (6 diffs)
- comment.php (modified) (1 diff)
- details.php (modified) (8 diffs)
- include/acp/config/xbt_settings.php (modified) (1 diff)
- include/bbcode/Xbb/Tags/A.php (modified) (3 diffs)
- include/bbcode/Xbb/Tags/Img.php (modified) (1 diff)
- include/bbcode/bbcode.lib.php (modified) (3 diffs)
- include/bbcode/config/parser.config.php (modified) (1 diff)
- include/class.bencode.php (modified) (1 diff)
- include/class.cleanup_types.php (modified) (6 diffs)
- include/class.seo.php (modified) (11 diffs)
- include/class.tags.php (added)
- include/constants.php (modified) (2 diffs)
- include/db/dbal.php (modified) (1 diff)
- include/details/delete.php (modified) (2 diffs)
- include/details/download.php (modified) (3 diffs)
- include/details/edit.php (modified) (7 diffs)
- include/functions.php (modified) (13 diffs)
- include/functions_delete.php (modified) (3 diffs)
- include/functions_messenger.php (modified) (11 diffs)
- include/functions_post.php (modified) (2 diffs)
- include/functions_search.php (modified) (1 diff)
- include/functions_torrenttable.php (modified) (1 diff)
- include/modtask/mass_torrent_actions.php (modified) (2 diffs)
- include/modtask/new_comments.php (modified) (3 diffs)
- include/sessions.php (modified) (6 diffs)
- include/ucp/checkcomm.php (modified) (1 diff)
- include/ucp/friends.php (modified) (3 diffs)
- include/ucp/get_userbar.php (modified) (1 diff)
- include/ucp/simpaty.php (modified) (3 diffs)
- include/userdetails/card.php (added)
- include/userdetails/view_snatched.php (modified) (1 diff)
- js/ajax_common.js (modified) (2 diffs)
- js/chat.js (modified) (2 diffs)
- js/new_message.wav (added)
- languages/lang_english/email/admin_send_email.txt (modified) (1 diff)
- languages/lang_english/lang_admin.php (modified) (2 diffs)
- languages/lang_english/lang_forum.php (modified) (1 diff)
- languages/lang_english/lang_main.php (modified) (6 diffs)
- languages/lang_english/lang_modcomment_log.php (modified) (1 diff)
- languages/lang_russian/email/admin_send_email.txt (modified) (1 diff)
- languages/lang_russian/lang_admin.php (modified) (1 diff)
- languages/lang_russian/lang_forum.php (modified) (1 diff)
- languages/lang_russian/lang_main.php (modified) (7 diffs)
- languages/lang_russian/lang_modcomment_log.php (modified) (1 diff)
- phpBB2/groupcp.php (modified) (1 diff)
- phpBB2/includes/functions.php (modified) (5 diffs)
- phpBB2/modcp.php (modified) (1 diff)
- phpBB2/posting.php (modified) (1 diff)
- phpBB2/search.php (modified) (3 diffs)
- phpBB2/viewforum.php (modified) (2 diffs)
- phpBB2/viewtopic.php (modified) (2 diffs)
- pic/cancel.png (deleted)
- rss.php (modified) (2 diffs)
- templates/admin/admin_voting_body.tpl (modified) (3 diffs)
- templates/admin/user_edit_body.tpl (modified) (1 diff)
- templates/bithdtv/bithdtv.cfg (modified) (1 diff)
- templates/bithdtv/bithdtv.css (modified) (1 diff)
- templates/bithdtv/browse.html (modified) (1 diff)
- templates/bithdtv/details.html (modified) (3 diffs)
- templates/bithdtv/details_edit.html (modified) (1 diff)
- templates/bithdtv/images/ratings (deleted)
- templates/bithdtv/images/ratings.png (added)
- templates/bithdtv/images/torrent_icons.png (added)
- templates/bithdtv/overall_header.html (modified) (2 diffs)
- templates/bithdtv/tags_view_form.html (modified) (2 diffs)
- templates/bithdtv/top_forum_body.html (added)
- templates/bithdtv/top_forum_topics_body.html (added)
- templates/bithdtv/top_peers_body.html (modified) (1 diff)
- templates/bithdtv/top_ten_body.html (modified) (1 diff)
- templates/bithdtv/top_users_body.html (modified) (1 diff)
- templates/bithdtv/ucp_friends_body.html (modified) (1 diff)
- templates/bithdtv/userdetails.html (modified) (2 diffs)
- templates/bithdtv/userdetails_card.html (added)
- templates/main/browse.html (modified) (1 diff)
- templates/main/comments_table.html (modified) (1 diff)
- templates/main/details.html (modified) (6 diffs)
- templates/main/details_edit.html (modified) (1 diff)
- templates/main/forum/confirm_body.tpl (modified) (1 diff)
- templates/main/forum/error_body.tpl (modified) (1 diff)
- templates/main/forum/groupcp_pending_info.tpl (modified) (1 diff)
- templates/main/forum/groupcp_user_body.tpl (modified) (1 diff)
- templates/main/forum/index_body.tpl (modified) (1 diff)
- templates/main/forum/message_body.tpl (modified) (1 diff)
- templates/main/forum/modcp_viewip.tpl (modified) (1 diff)
- templates/main/forum/posting_preview.tpl (modified) (1 diff)
- templates/main/forum/viewtopic_poll_ballot.tpl (modified) (2 diffs)
- templates/main/forum/viewtopic_poll_result.tpl (modified) (2 diffs)
- templates/main/images/new_comments.gif (added)
- templates/main/images/newsn.gif (added)
- templates/main/images/ratings (deleted)
- templates/main/images/ratings.png (added)
- templates/main/images/torrent_icons.png (added)
- templates/main/index_body.html (modified) (1 diff)
- templates/main/main.cfg (modified) (2 diffs)
- templates/main/main.css (modified) (17 diffs)
- templates/main/overall_footer.html (modified) (1 diff)
- templates/main/overall_header.html (modified) (7 diffs)
- templates/main/tags_view_form.html (modified) (2 diffs)
- templates/main/top_forum_body.html (added)
- templates/main/top_forum_topics_body.html (added)
- templates/main/top_ten_body.html (modified) (2 diffs)
- templates/main/torrents_table.html (modified) (7 diffs)
- templates/main/ucp_friends_body.html (modified) (1 diff)
- templates/main/upload_body.html (modified) (3 diffs)
- templates/main/userdetails_card.html (added)
- templates/reflection/browse.html (modified) (1 diff)
- templates/reflection/details.html (modified) (2 diffs)
- templates/reflection/details_edit.html (modified) (1 diff)
- templates/reflection/forum/viewtopic_body.tpl (modified) (2 diffs)
- templates/reflection/images/comment.gif (modified) (previous)
- templates/reflection/images/male.gif (modified) (previous)
- templates/reflection/images/ratings (deleted)
- templates/reflection/images/ratings.png (added)
- templates/reflection/images/torrent_icons.png (added)
- templates/reflection/overall_header.html (modified) (3 diffs)
- templates/reflection/reflection.cfg (modified) (1 diff)
- templates/reflection/reflection.css (modified) (1 diff)
- templates/reflection/tags_view_form.html (modified) (2 diffs)
- templates/reflection/top_forum_body.html (added)
- templates/reflection/top_forum_topics_body.html (added)
- templates/reflection/top_ten_body.html (modified) (1 diff)
- templates/reflection/torrents_table.html (modified) (1 diff)
- templates/reflection/ucp_friends_body.html (modified) (1 diff)
- templates/reflection/userdetails_card.html (added)
- topten.php (modified) (2 diffs)
- updates/034.324.php (added)
- upload.php (modified) (1 diff)
- usersearch.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
admin/admin_categories.php
r294 r324 97 97 $template_file = file_get_contents($root_path . 'templates/upload_templates/' . $cat_id . '.html'); 98 98 99 //preg_match_all('/<tr(.*?)>(.*?)<\/tr>/si', $template_file, $tr_content);100 99 preg_match_all('/<!-- IF(.*?)>(.*?)<!-- ENDIF -->/si', $template_file, $tr_content); 101 100 … … 462 461 463 462 if ( !isset($_POST['move_torrents']) ) { 464 $sql = 'SELECT fid FROM ' . TORRENTS_TABLE . ' WHERE category = ' . $cat_id;463 $sql = 'SELECT fid, info_hash FROM ' . TORRENTS_TABLE . ' WHERE category = ' . $cat_id; 465 464 $result = $db->sql_query($sql); 466 465 $ids = array(); 467 466 while ( $row = $db->sql_fetchrow($result) ) { 468 $ids[ ] = $row['fid'];467 $ids[$row['info_hash']] = $row['fid']; 469 468 } 470 469 deletetorrent($ids); admin/admin_mass_email.php
r317 r324 44 44 @set_time_limit(0); 45 45 @ignore_user_abort(true); 46 @ini_set('memory_limit', -1); 46 47 47 48 $message = ''; … … 74 75 $group_id = ( isset($_POST[POST_GROUPS_URL]) ? intval($_POST[POST_GROUPS_URL]) : 0 ); 75 76 76 $sql = ( $group_id != -1 ) ? "SELECT u.email , u.name FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug WHERE ug.group_id = $group_id AND u.uid = ug.user_id" : "SELECT email, nameFROM " . USERS_TABLE;77 $sql = ( $group_id != -1 ) ? "SELECT u.email FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug WHERE ug.group_id = $group_id AND u.uid = ug.user_id" : "SELECT email FROM " . USERS_TABLE; 77 78 $result = $db->sql_query($sql); 78 79 … … 82 83 83 84 // Send with BCC, no more than 50 recipients for one mail (to not exceed the limit) 84 $max_chunk_size = 50;85 $max_chunk_size = 150; 85 86 $email_list = array(); 86 87 … … 98 99 99 100 $email_list[$j][$i]['email'] = $row['email']; 100 $email_list[$j][$i]['name'] = $row['name'];101 101 $i++; 102 102 } … … 112 112 for ($i = 0, $size = sizeof($email_list); $i < $size; $i++) 113 113 { 114 $send_to = false; 114 115 for ($j = 0, $list_size = sizeof($email_list[$i]); $j < $list_size; $j++) 115 116 { 116 117 $email_row = $email_list[$i][$j]; 117 118 118 $messenger->{((sizeof($email_list[$i]) == 1) ? 'to' : 'bcc')}($email_row['email'], $email_row['name']); 119 if ( sizeof($email_list[$i]) == 1 ) { 120 $messenger->to($email_row['email']); 121 } 122 else { 123 $messenger->bcc($email_row['email']); 124 $send_to = true; 125 } 119 126 } 120 127 if ( $send_to ) { 128 $messenger->to($config['sitemail']); 129 } 121 130 $messenger->template('admin_send_email'); 122 123 /*$messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);124 $messenger->headers('X-AntiAbuse: User_id - ' . $userdata['uid']);125 $messenger->headers('X-AntiAbuse: Username - ' . $userdata['name']);126 $messenger->headers('X-AntiAbuse: User IP - ' . $user_ip);*/127 128 131 $messenger->subject($subject); 129 132 $messenger->set_mail_priority($priority); … … 133 136 'MESSAGE' => $message 134 137 )); 135 136 if (!($messenger->send(NOTIFY_EMAIL))) 137 { 138 $error = true; 139 } 138 unset($email_list[$i]); 139 140 $messenger->send(NOTIFY_EMAIL); 140 141 141 142 } 142 unset($email_list);143 143 144 144 $messenger->save_queue(); admin/admin_users.php
r319 r324 116 116 'year' => 0, 117 117 'month' => 0, 118 'day' => 0 118 'day' => 0, 119 'bonus' => 0 119 120 ); 120 121 … … 265 266 $updateset[] = 'uploaded = uploaded + ' . $add_upload * 1024 * 1024 * 1024; 266 267 $modcomment[] = sprintf($lang['modcomment_add_upload_text'], 't' . time(), $add_upload, $userdata['name'], $add_upload_reason ); 268 } 269 270 if ( $bonus ) { 271 $updateset[] = 'total_seed_time = total_seed_time + ' . ( ( 3600 * $bonus ) / $config['my_bonus_points'] ); 272 $modcomment[] = sprintf($lang['modcomment_add_bonus_text'], 't' . time(), $bonus, $userdata['name']); 267 273 } 268 274 … … 420 426 $user_status = $this_userdata['enabled']; 421 427 $invites = intval($this_userdata['invites']); 428 $bonus = number_format( $config['my_bonus_points'] * ( $this_userdata['total_seed_time'] / 3600 ), 2 ); 422 429 423 430 … … 426 433 $s_hidden_fields .= '<input type="hidden" name="add_upload_reason" value="" />'; 427 434 //$s_hidden_fields .= '<input type="hidden" name="signature" value="' . str_replace("\"", """, $signature) . '" />'; 428 $avatar_prefix = ( ( strpos($this_userdata['avatar'], 'user_avatar_' . $this_userdata['uid']) === false && strpos($this_userdata['avatar'], '/') !== false ) || !$this_userdata['avatar'] ? '' : generate_base_url() . '/' . $config['avatar_path'] . '/' ); 429 $avatar = ( $this_userdata['avatar']? ' <img src="' . $avatar_prefix . $this_userdata['avatar'] . '" alt="" />' : '' ); 435 436 $avatar = get_user_avatar($this_userdata['uid'], $this_userdata['avatar']); 437 $avatar = ( $this_userdata['avatar']? ' <img src="' . $avatar . '" alt="" />' : '' ); 430 438 431 439 $cats = $cache->obtain_cats(); … … 563 571 564 572 'S_HIDDEN_FIELDS' => $s_hidden_fields, 565 'S_PROFILE_ACTION' => append_sid("admin_users.$phpEx")) 566 ); 573 'S_PROFILE_ACTION' => append_sid("admin_users.$phpEx"), 574 575 'BONUS' => $bonus 576 )); 567 577 568 578 $template->display('body'); admin/admin_voting.php
r269 r324 37 37 include($root_path . 'languages/lang_' . $config['default_lang'] . '/lang_admin_voting.' . $phpEx); 38 38 39 if ( isset($_GET['action']) && $_GET['action'] == 'show_voted_users' ) { 40 $poll_id = ( isset($_POST['poll_id']) ? intval($_POST['poll_id']) : 0 ); 41 include($root_path . 'include/functions_admin.' . $phpEx); 42 admin_ajax_show_vote_users($poll_id); 43 exit(); 44 } 45 // 46 // Set mode 47 // 48 if( isset( $_POST['mode'] ) || isset( $_GET['mode'] ) ) 49 { 50 $mode = ( isset( $_POST['mode']) ) ? $_POST['mode'] : $_GET['mode']; 51 $mode = htmlspecialchars($mode); 52 } 53 else 54 { 55 $mode = ''; 56 } 39 $mode = request_var('mode', ''); 40 57 41 if ( $mode == 'delete' ) { 58 42 $vote_id = ( isset($_GET['vote_id']) ? intval($_GET['vote_id']) : 0 ); … … 81 65 trigger_error('Invalid poll id'); 82 66 } 67 } 68 69 if ( $mode == 'show_poll_results' ) { 70 $poll_id = request_var('poll_id', 0); 71 72 // Assign Username array 73 $sql = "SELECT DISTINCT u.uid, u.name AS username, u.class, u.warneduntil, u.enabled, u.donor, u.parked, vote_id, vote_user_id, vote_cast 74 FROM " . USERS_TABLE . " AS u , " . VOTE_USERS_TABLE . " AS vv 75 WHERE u.uid = vv.vote_user_id AND vote_id = " . $poll_id; 76 $result = $db->sql_query($sql); 77 while ( $row = $db->sql_fetchrow($result) ) { 78 $voter_arr[$row['vote_cast']][] = parse_username($row); 79 } 80 81 // Assign poll options array 82 $sql = "SELECT vote_option_id, vote_option_text, vote_result FROM ". VOTE_RESULTS_TABLE . " WHERE vote_id = " . $poll_id; 83 $result = $db->sql_query($sql); 84 85 while ( $row = $db->sql_fetchrow($result) ) { 86 $option_arr[$row['vote_option_id']] = $row; 87 } 88 89 $result_ary = array(); 90 91 foreach( $option_arr AS $vote_option_id => $elem ) { 92 $option_text = $elem["vote_option_text"]; 93 $option_result = $elem["vote_result"]; 94 $user = ( isset($voter_arr[$vote_option_id]) ? $voter_arr[$vote_option_id] : array() ); 95 $user = implode(', ', $user); 96 //$user = substr($user, "0", strrpos($user, ", ")); 97 98 $result_ary[$option_text][] = array('result' => $option_result, 'users' => $user); 99 } 100 gc(json_encode(array('results' => $result_ary))); 83 101 } 84 102 … … 354 372 )); 355 373 356 // Assign Username array357 $sql = "SELECT DISTINCT u.uid, u.name AS username, u.class, u.warneduntil, u.enabled, u.donor, u.parked358 FROM " . USERS_TABLE . " AS u , " . VOTE_USERS_TABLE . " AS vv359 WHERE u.uid = vv.vote_user_id";360 361 $result = $db->sql_query($sql);362 363 while ( $row = $db->sql_fetchrow($result) )364 {365 $user_arr[$row['uid']] = get_user_class_color($row['class'], $row['username']) . get_user_icons($row);366 }367 368 // Assign poll options array369 $sql = "SELECT *370 FROM ". VOTE_RESULTS_TABLE .371 " ORDER BY vote_id";372 373 $result = $db->sql_query($sql);374 375 while ( $row = $db->sql_fetchrow($result) )376 {377 $vote_id = $row['vote_id'];378 $vote_option_id = $row['vote_option_id'];379 $vote_option_text = $row['vote_option_text'];380 $vote_result = $row['vote_result'];381 $option_arr[$vote_id][$vote_option_id]["text"] = $vote_option_text;382 $option_arr[$vote_id][$vote_option_id]["result"] = $vote_result;383 }384 385 // Assign individual vote results386 $sql = "SELECT vote_id, vote_user_id, vote_cast387 FROM ". VOTE_USERS_TABLE .388 " ORDER BY vote_id";389 390 $result = $db->sql_query($sql);391 392 while ( $row = $db->sql_fetchrow($result) )393 {394 $vote_id = $row['vote_id'];395 $vote_user_id = $row['vote_user_id'];396 $vote_cast = $row['vote_cast'];397 $voter_arr[$vote_id][$vote_user_id] = $vote_cast;398 }399 400 374 401 375 $sql ="SELECT * … … 459 433 ); 460 434 461 if ( isset($voter_arr[$vote_id]) && sizeof($voter_arr[$vote_id]) )462 {463 foreach($option_arr[$vote_id] as $vote_option_id => $elem)464 {465 $option_text = $elem["text"];466 $option_result = $elem["result"];467 $user = ( isset($user_option_arr[$vote_option_id]) ? $user_option_arr[$vote_option_id] : 0 );468 $user = substr($user, "0", strrpos($user, ", "));469 470 $template->assign_block_vars("viewresult.votes.detail", array(471 'OPTION' => censor_text($option_text),472 'RESULT' => $option_result,473 'USER' => $user )474 );475 }476 }477 478 $i++;479 480 435 } 481 436 … … 491 446 { 492 447 $total_polls = $total['total']; 493 $pagination = generate_pagination( "admin_voting.$phpEx?mode=$sort_field&order=$sort_order", $total_polls, $config['posts_per_page'], $start). ' ';448 $pagination = generate_pagination($admin_path . "admin_voting.$phpEx?mode=$sort_field&order=$sort_order", $total_polls, $config['posts_per_page'], $start). ' '; 494 449 } 495 450 admin/pagestart.php
r294 r324 36 36 $userdata = session_pagestart($user_ip); 37 37 init_userprefs($userdata); 38 $session_id = ( isset($_GET['sid']) ? $_GET['sid'] : '' ); 38 $session_id = request_var('sid', ''); 39 $no_page_header = ( !empty($no_page_header) ? $no_page_header : request_var('no_page_header', 0) ); 39 40 40 41 $current_page = extract_current_page(); … … 55 56 } 56 57 57 if ( ! isset($no_page_header))58 if ( !$no_page_header ) 58 59 { 59 60 // Not including the pageheader can be neccesarry if META tags are ajax.php
r317 r324 8 8 loggedinorreturn(); 9 9 10 if ( !$_SERVER['HTTP_REFERER']) {10 if (empty($_SERVER['HTTP_REFERER'])) { 11 11 redirect( append_sid($root_path)); 12 12 } … … 146 146 147 147 case 'rating': 148 $id = request_var(' id', 0);148 $id = request_var('torrent_id', 0); 149 149 $rating = request_var('rating', 0); 150 151 if (!$id || $rating <= 0 || $rating > 5) { 152 return $_RESULT = array('text' => $lang['bad_rating'] ); 153 } 154 $sql = 'SELECT owner FROM ' . TORRENTS_TABLE . ' WHERE fid = ' . $id; 150 $error = false; 151 $msg = ''; 152 $rating_sum = $numratings = 0; 153 154 if ( !$id || $rating <= 0 || $rating > 5 ) { 155 gc(json_encode(array('error' => $error, 'msg' => $lang['bad_rating']))); 156 } 157 $sql = 'SELECT numratings, ratingsum, owner FROM ' . TORRENTS_TABLE . ' WHERE fid = ' . $id; 155 158 $result = $db->sql_query($sql); 156 159 if ( !$row = $db->sql_fetchrow($result) ) { 157 return $_RESULT = array('text' => $lang['bad_torrent'] ); 158 } 159 160 $sql = 'SELECT COUNT(*) AS count FROM ' . RATINGS_TABLE . ' WHERE torrent = ' . $id . ' AND user = ' . $userdata['uid']; 161 $result = $db->sql_query($sql); 162 $count = ( $row = $db->sql_fetchrow($result) ) ? intval($row['count']) : 0; 163 if ( $count ) { 164 return $_RESULT = array('text' => $lang['dupe_vote'] ); 165 } 166 $sql = 'INSERT INTO ' . RATINGS_TABLE . ' (torrent, user, rating) VALUES (' . $id . ', ' . $userdata['uid'] . ', ' . $rating . ')'; 167 $db->sql_query($sql); 168 $sql = 'UPDATE ' . TORRENTS_TABLE . ' SET numratings = numratings + 1, ratingsum = ratingsum + ' . $rating. ' WHERE fid = ' . $id; 169 $db->sql_query($sql); 170 171 $sql = 'SELECT t.numratings, t.ratingsum 172 FROM ' . TORRENTS_TABLE . ' t 173 WHERE t.fid = ' . $id; 174 $result = $db->sql_query($sql); 175 $row = $db->sql_fetchrow($result); 176 177 $rating_message = ''; 178 if ( $row['numratings'] < $config['minvotes'] ) { 179 if ( $config['minvotes'] > 1 ) { 180 $rating_message .= sprintf($lang['no_rating'], $config['minvotes']); 181 if ($row['numratings']) { 182 $rating_message .= ( $row['numratings'] == 1? sprintf($lang['voice'], $row['numratings']) : sprintf($lang['voices'], $row['numratings']) ); 183 } 184 else { 185 $rating_message .= $lang['no_voices']; 186 } 187 $rating_message .= ')'; 188 } 189 else { 190 $rating_message .= $lang['no_one_voices']; 191 } 192 } 193 else { 194 $rating_tot = round($row['ratingsum'] / $row['numratings'], 1); 195 $rpic = ratingpic($rating_tot); 196 $rating_message .= sprintf($lang['total_rating'], $rpic, $rating_tot, $row['numratings']); 197 } 198 $rating_message .= sprintf($lang['you_voted_for_this_torrent'], $rating, $lang['ratings_ary'][$rating]); 199 return $_RESULT = array( 'text' => $lang['rating_added'], 'rating_message' => $rating_message ); 200 160 $msg = $lang['bad_torrent']; 161 $error = true; 162 } 163 else { 164 if ( $row['owner'] == $userdata['uid'] ) { 165 $error = true; 166 $msg = $lang['bad_torrent']; 167 } 168 $rating_sum = $row['ratingsum']; 169 $numratings = $row['numratings']; 170 } 171 if ( !$error ) { 172 $sql = 'SELECT torrent FROM ' . RATINGS_TABLE . ' WHERE torrent = ' . $id . ' AND user = ' . $userdata['uid']; 173 $result = $db->sql_query($sql); 174 if ( $row = $db->sql_fetchrow($result) ) { 175 $error = true; 176 $msg = $lang['dupe_vote']; 177 } 178 179 if ( !$error ) { 180 $sql = 'INSERT INTO ' . RATINGS_TABLE . ' (torrent, user, rating) VALUES (' . $id . ', ' . $userdata['uid'] . ', ' . $rating . ')'; 181 $db->sql_query($sql); 182 $sql = 'UPDATE ' . TORRENTS_TABLE . ' SET numratings = numratings + 1, ratingsum = ratingsum + ' . $rating. ' WHERE fid = ' . $id; 183 $db->sql_query($sql); 184 185 $rating_sum += $rating; 186 ++$numratings; 187 188 $msg = sprintf($lang['rating_added'], $rating, $numratings, $config['minvotes']); 189 } 190 } 191 192 $rating = ratingpic($numratings, $rating_sum, false); 193 194 gc(json_encode(array('error' => $error, 'msg' => $msg, 'rating_pic_width' => $rating * $config['rating_pic_width'], 'rating_title' => sprintf($lang['total_rating'], $rating, $rating, $numratings)))); 201 195 break; 202 196 … … 256 250 257 251 case 'update_tag': 252 require_once($root_path . 'include/class.tags.php'); 253 258 254 $name = request_var('tag_name', ''); 259 255 $tag_type = request_var('tag_type', TYPE_TORRENT); 260 256 $id = request_var('id', 0); 261 257 $type = request_var('type', ''); 262 $name = urldecode($name); 263 264 if ( !$name ) { 265 return; 266 } 267 268 if ( strpos($name, ',') !== false ) { 269 $name = explode(',', $name); 270 } 271 else { 272 $name = array($name); 273 } 274 275 //start tags allow 276 $allow_add_tags = false; 277 278 switch ( $config['tags_who_allowed'] ) { 279 case 0: 280 $allow_add_tags = true; 281 break; 282 283 case 1: 284 $sql = 'SELECT owner FROM ' . TORRENTS_TABLE . ' WHERE fid = ' . $id; 285 $result = $db->sql_query($sql); 286 $owner = ( $row = $db->sql_fetchrow($result) ) ? $row['owner'] : 0; 287 288 $allow_add_tags = $userdata['uid'] == $owner || $userdata['class'] >= UC_MODERATOR; 289 break; 290 291 case 2: 292 $allow_add_tags = $userdata['class'] >= UC_MODERATOR; 293 break; 294 } 295 296 if ( !$allow_add_tags ) { 297 return $_RESULT = array( 'message' => $lang['access_denied'] ); 298 } 299 300 //end tags allow 301 302 if ( $config['tags_max_allow'] ) { 303 $sql = 'SELECT COUNT(*) AS count FROM ' . TAGS_USERS_TABLE . ' WHERE tag_users_uid = ' . $userdata['uid'] . ' AND tag_users_for_id = ' . $id . ' AND tag_users_type = ' . $tag_type; 304 $result = $db->sql_query($sql); 305 $count = ( $row = $db->sql_fetchrow($result) ) ? $row['count'] : 0; 306 307 if ( $count >= $config['tags_max_allow'] || ( ( sizeof($name) + $count ) >= $config['tags_max_allow'] ) ) { 308 return $_RESULT = array( 'message' => sprintf($lang['no_more_tags_allowed'], $config['tags_max_allow']) ); 309 } 310 } 311 312 $message = ''; 313 $tags = ''; 314 315 foreach ( $name AS $_null => $tag_name ) { 316 $tag_name = trim($tag_name); 317 $tag_name = preg_replace('/[\.,:\^]/', '', $tag_name); 318 $tag_length = utf_strlen($tag_name); 319 320 if ( $config['tags_max_length'] && $tag_length > $config['tags_max_length'] ) { 321 $message .= sprintf($lang['tag_is_too_short_or_long'], $tag_name, $config['tags_min_length'], $config['tags_max_length']); 322 continue; 323 } 324 325 if ( $config['tags_min_length'] && $tag_length < $config['tags_min_length'] ) { 326 $message .= sprintf($lang['tag_is_too_short_or_long'], $tag_name, $config['tags_min_length'], $config['tags_max_length']); 327 continue; 328 } 329 330 //get info for this tag and user from db -> mb user already voted for this tag? 331 332 $sql = 'SELECT tag_users_for_id 333 FROM ' . TAGS_USERS_TABLE . ' 334 WHERE tag_users_uid = ' . $userdata['uid'] . ' 335 AND tag_users_for_id = ' . $id . ' 336 AND tag_users_type = ' . $tag_type . ' 337 AND tag_users_name = \'' . $db->sql_escape($tag_name) . '\''; 338 $result = $db->sql_query($sql); 339 340 if ( $row = $db->sql_fetchrow($result) ) { 341 $message = $lang['dupe_vote']; 342 } 343 else { 344 if ( $type == 'down' ) { 345 $sql = 'SELECT tag_count 346 FROM ' . TAGS_TABLE . ' 347 WHERE tag_name = \'' . $db->sql_escape($tag_name) . '\' 348 AND tag_type = ' . $tag_type . ' 349 AND tag_for_id = ' . $id; 350 $result = $db->sql_query($sql); 351 $tag_count = ( $row = $db->sql_fetchrow($result) ) ? $row['tag_count'] : false; 352 353 if ( $tag_count <= 1 && $tag_count !== false ) { 354 $sql = 'DELETE 355 FROM ' . TAGS_TABLE . ' 356 WHERE tag_name = \'' . $db->sql_escape($tag_name) . '\' 357 AND tag_type = ' . $tag_type . ' 358 AND tag_for_id = ' . $id; 359 $lets_insert = false; 360 } 361 else { 362 $sql = 'UPDATE ' . TAGS_TABLE . ' 363 SET tag_count = tag_count - 1 364 WHERE tag_name = \'' . $db->sql_escape($tag_name) . '\' 365 AND tag_type = ' . $tag_type . ' 366 AND tag_for_id = ' . $id; 367 $lets_insert = true; 368 } 369 370 $db->sql_query($sql); 371 } 372 else { 373 $sql = 'UPDATE ' . TAGS_TABLE . ' 374 SET tag_count = tag_count + 1 375 WHERE tag_name = \'' . $db->sql_escape($tag_name) . '\' 376 AND tag_type = ' . $tag_type . ' 377 AND tag_for_id = ' . $id; 378 $db->sql_query($sql); 379 $lets_insert = true; 380 } 381 382 //we using LOWER function in mysql, not in php - it's not a mistake! 383 // new tag, let's insert 384 if ( !$db->sql_affectedrows() && $lets_insert ) { 385 $sql = 'INSERT INTO ' . TAGS_TABLE . ' VALUES (LOWER(\'' . $db->sql_escape($tag_name) . '\'), ' . $tag_type . ', ' . $id . ', 1)'; 386 $db->sql_query($sql); 387 388 $tags .= ' <a href="' . append_sid($root_path . 'browse.php?search_in=3&search=' . $tag_name) . '">' . $tag_name . '</a>'; 389 } 390 391 $sql = 'INSERT INTO ' . TAGS_USERS_TABLE . ' VALUES (' . $userdata['uid'] . ', ' . $id . ', ' . $tag_type . ', LOWER(\'' . $db->sql_escape($tag_name) . '\'))'; 392 $db->sql_query($sql); 393 394 //$message .= sprintf($lang['tag_added'], $tag_name) . "\n"; 395 } 396 } 258 259 $message = tags::add_tag($tag_type, $id, $name, $type); 397 260 398 261 if ( $message ) { 399 return $_RESULT = array( 'message' => $message, 'tpl' => '' ); 400 } 401 else { 402 $sql = 'SELECT tag_name, tag_count 403 FROM ' . TAGS_TABLE . ' 404 WHERE tag_type = ' . TYPE_TORRENT . ' 405 AND tag_for_id = ' . $id; 406 $result = $db->sql_query($sql); 407 408 $tags = array(); 409 while ( $row = $db->sql_fetchrow($result) ) { 410 $tags[$row['tag_name']] = $row['tag_count']; 411 } 412 413 //simple tag cloud find here http://www.bytemycode.com/snippets/snippet/415/ 414 $max_qty = max(array_values($tags)); 415 $min_qty = min(array_values($tags)); 416 417 $spread = $max_qty - $min_qty; 418 $spread = ( $spread == 0 ? 1 : $spread ); 419 420 $step = ( $config['max_tag_size'] - $config['min_tag_size'] ) / $spread; 421 422 $i = 0; 423 424 foreach ( $tags AS $tag_name => $tag_count ) { 425 $size = round($config['min_tag_size'] + (($tag_count - $min_qty) * $step)); 426 ++$i; 427 428 $enc_tag_name = undo_htmlspecialchars($tag_name); 429 $enc_tag_name = urlencode($enc_tag_name); 430 262 gc(json_encode(array('message' => $message, 'tpl' => ''))); 263 } 264 else { 265 266 $tags = tags::tags_for_single($tag_type, $id); 267 268 foreach ( $tags AS $_null => $tag_ary ) { 431 269 $template->assign_block_vars('tags_row', array( 432 'TAG_NAME' => $tag_ name,433 'JS_TAG_NAME' => str_replace("'", "\'", $tag_name),434 'ENC_TAG_NAME' => $ enc_tag_name,435 'TAG_SIZE' => $ size,436 'TAG_NUM' => $ i,437 438 'U_TAG' => append_sid($root_path . 'browse.php?search_in=3&search=' . $ enc_tag_name),439 'U_TAG_USERS' => append_sid($root_path . 'modtask.php?action=tags&do=view_users&tag_name=' . $ enc_tag_name . '&tag_type=' . TYPE_TORRENT. '&tag_for_id=' . $id),270 'TAG_NAME' => $tag_ary['tag_name'], 271 'JS_TAG_NAME' => $tag_ary['js_tag_name'], 272 'ENC_TAG_NAME' => $tag_ary['enc_tag_name'], 273 'TAG_SIZE' => $tag_ary['tag_size'], 274 'TAG_NUM' => $tag_ary['tag_num'], 275 276 'U_TAG' => append_sid($root_path . 'browse.php?search_in=3&search=' . $tag_ary['enc_tag_name']), 277 'U_TAG_USERS' => append_sid($root_path . 'modtask.php?action=tags&do=view_users&tag_name=' . $tag_ary['enc_tag_name'] . '&tag_type=' . $tag_type . '&tag_for_id=' . $id), 440 278 )); 441 279 } 442 280 443 281 $template->assign_vars(array( 444 'TAG_TYPE' => TYPE_TORRENT,282 'TAG_TYPE' => $tag_type, 445 283 'ID' => $id, 446 'ALLOW_ADD_TAGS' => $allow_add_tags,284 'ALLOW_ADD_TAGS' => tags::return_allow_add_tag($tag_type, $id), 447 285 )); 448 286 … … 453 291 $tpl = $template->assign_display('template', 'TEMPLATE_FILE'); 454 292 455 return $_RESULT = array( 'message' => '', 'tpl' => $tpl);293 gc(json_encode(array('message' => '', 'tpl' => $tpl))); 456 294 } 457 295 break; … … 473 311 $result = $db->sql_query($sql); 474 312 313 header('Content-type: text/html; charset=UTF-8'); 475 314 while ( $row = $db->sql_fetchrow($result) ) { 476 315 echo $row['tag_name'] . "\n"; 477 316 } 317 gc(); 478 318 } 479 319 break; announce.php
r300 r324 31 31 32 32 if ( defined('USE_XBTT') ) { 33 $get = '';34 foreach($_GET AS $key => $val ) {35 $get .= ( $get ? '&' : '' ) . $key . '=' . $val;36 }37 33 benc_resp_raw('Please redownload torrent from tracker'); 38 34 } bookmarks.php
r317 r324 86 86 case '3': $column = 't.comments'; break; 87 87 case '4': 88 $column = 'IF(t.numratings < ' . $config['minvotes'] . ', 0, ROUND(t.ratingsum / t.numratings, 1)) ' . $ascdesc;89 $column .= ', t.numratings ' . $ascdesc;90 $column .= ', t.ctime';88 $column = 'IF(t.numratings < ' . $config['minvotes'] . ', 0, ROUND(t.ratingsum / t.numratings, 1)) ' . $ascdesc; 89 $column .= ', t.numratings ' . $ascdesc; 90 $column .= ', t.ctime'; 91 91 break; 92 92 case '5': $column = 't.ctime'; break; browse.php
r317 r324 9 9 $where = ''; 10 10 foreach ( $wherea AS $key => $vals ) { 11 foreach ( $vals AS $_null => $val ) { 12 $where .= ( $where ? ' AND ' : '' ) . $key . ' ' . $val; 11 if ( is_array($vals) ) { 12 foreach ( $vals AS $_null => $val ) { 13 $where .= ( $where ? ' AND ' : '' ) . $key . ' ' . $val; 14 } 15 } 16 else { 17 $where .= ( $where ? ' AND ' : '' ) . $key . ' ' . $vals; 13 18 } 14 19 } … … 67 72 case '4': 68 73 $column = 'IF(t.numratings < ' . $config['minvotes'] . ', 0, ROUND(t.ratingsum / t.numratings, 1)) ' . $ascdesc; 69 $column .= ', t.numratings ' . $ascdesc;70 $column .= ', t.ctime';74 $column .= ', t.numratings ' . $ascdesc; 75 $column .= ', t.ctime'; 71 76 break; 72 77 case '5': $column = 't.ctime'; break; … … 191 196 } 192 197 193 if ( defined('USE_XBTT') ) {194 $wherea['t.flags'][] = ' <> 1';195 }196 197 198 if ( sizeof($wherecatina) && sizeof($wherecatina) != sizeof($cats) ) { 198 199 $new_wherecatina = array(); … … 226 227 227 228 $sql = 'SELECT * FROM ' . CATEGORIES_TABLE . ' ORDER BY cat_parent_id, name'; 228 $result = $db->sql_query($sql, 3 0 * 60);229 $result = $db->sql_query($sql, 3600); 229 230 230 231 while( $row = $db->sql_fetchrow($result) ){ … … 351 352 $add_where[] = 'tg.tag_type = ' . TYPE_TORRENT; 352 353 $strict = true; 353 $searchstr = str_replace('+', ' ', $searchstr); //strange bug O_o 354 $searchstr = rawurldecode($searchstr); 355 //$searchstr = str_replace('+', ' ', rawurldecode($searchstr)); //strange bug O_o 354 356 break; 355 357 … … 414 416 415 417 //begin tags 416 $show_tags_cloud = false; 417 418 $sql = 'SELECT tag_name, SUM(tag_count) AS tag_count 419 FROM ' . TAGS_TABLE . ' 420 GROUP BY tag_name 421 ORDER BY tag_count DESC'; 422 $result = $db->sql_query_limit($sql, 30, 0, 3600); 423 if ( $subrow = $db->sql_fetchrow($result) ) { 424 $show_tags_cloud = true; 425 $tags = array(); 426 $max_qty = $min_qty = 0; 427 do { 428 $tags[] = $subrow; 429 $max_qty = max($max_qty, $subrow['tag_count']); 430 $min_qty = min($min_qty, $subrow['tag_count']); 431 } 432 while ( $subrow = $db->sql_fetchrow($result) ); 433 434 //simple tag cloud find here http://www.bytemycode.com/snippets/snippet/415/ 435 //$max_qty = max(array_values($tags)); 436 //$min_qty = min(array_values($tags)); 437 438 $spread = $max_qty - $min_qty; 439 $spread = ( $spread == 0 ? 1 : $spread ); 440 441 $step = ( $config['max_tag_size'] - $config['min_tag_size'] ) / $spread; 442 443 shuffle($tags); 444 445 foreach ( $tags AS $_null => $tag_ary ) { 446 $size = round($config['min_tag_size'] + (($tag_ary['tag_count'] - $min_qty) * $step)); 447 448 $enc_tag_name = undo_htmlspecialchars($tag_ary['tag_name']); 449 $enc_tag_name = urlencode($enc_tag_name); 450 451 $template->assign_block_vars('tags_cloud', array( 452 'TAG_NAME' => $tag_ary['tag_name'], 453 'TAG_SIZE' => $size, 454 455 'U_TAG' => append_sid($root_path . 'browse.php?search_in=3&search=' . $enc_tag_name), 456 )); 457 } 458 } 459 418 require_once($root_path . 'include/class.tags.php'); 419 $tags = tags::tag_cloud_for_cat($wherecatina); 420 $show_tags_cloud = sizeof($tags); 421 422 foreach ( $tags AS $_null => $tag_ary ) { 423 $template->assign_block_vars('tags_row', array( 424 'TAG_NAME' => $tag_ary['tag_name'], 425 'TAG_SIZE' => $tag_ary['size'], 426 'U_TAG' => append_sid($root_path . 'browse.php?search_in=3&search=' . $tag_ary['enc_tag_name']), 427 )); 428 } 460 429 //end tags 430 461 431 $where = _build_where($wherea); 462 432 comment.php
r321 r324 470 470 $sql = 'DELETE FROM ' . COMMENTS_TABLE . ' WHERE ' . $db->sql_in_set('comment_id', $comm_ary); 471 471 $db->sql_query($sql); 472 473 $sql = 'DELETE FROM ' . SIMPATY_TABLE . ' WHERE ' . $db->sql_in_set('simpid', $comm_ary) . ' AND type = ' . SIMPATY_COMMENT; 474 $db->sql_query($sql); 475 476 $sql = 'DELETE FROM ' . REPORTS_TABLE . ' WHERE type = 3 AND ' . $db->sql_in_set('votedfor', $comm_ary); 477 $db->sql_query($sql); 478 479 $sql = 'UPDATE ' . COMMENTS_NOTIFY_TABLE . ' SET checkcomm_view_status = ' . VIEW_STATUS_VIEWED . ' WHERE ' . $db->sql_in_set('checkcomm_last_comment_id', $comm_ary);; 480 $db->sql_query($sql); 472 481 } 473 482 details.php
r322 r324 387 387 require ($root_path . 'include/bbcode/bbcode.lib.php'); 388 388 require ($root_path . 'include/functions_post.php'); 389 require_once($root_path . 'include/class.tags.php'); 389 390 390 391 $view = request_var('view', ''); … … 399 400 t.completed, t.numfiles, t.category, t.hidden, t.free, t.comments, t.moderated, u.name AS username, u.class, u.privacy 400 401 FROM ' . TORRENTS_TABLE . ' t, ' . USERS_TABLE . ' u 401 WHERE t.owner = u.uid AND t.fid = ' . $id . ( defined( 'USE_XBTT' ) ? ' AND t.flags <> 1' : '' );402 WHERE t.owner = u.uid AND t.fid = ' . $id; 402 403 $result = $db->sql_query( $sql ); 403 404 … … 454 455 } 455 456 456 if ( $row['numratings'] < $config['minvotes'] ) {457 $rating_message = '';458 if ( $config['minvotes'] > 1 ) {459 $rating_message .= sprintf( $lang['no_rating'], $config['minvotes'] );460 if ( $row['numratings'] ) {461 $rating_message .= ( $row['numratings'] == 1? sprintf( $lang['voice'], $row['numratings'] ) : sprintf( $lang['voices'], $row['numratings'] ) );462 }463 else {464 $rating_message .= $lang['no_voices'];465 }466 $rating_message .= ')';467 }468 else {469 $rating_message .= $lang['no_one_voices'];470 }471 }472 else {473 $rating = ( $row['numratings'] ? round( $row['ratingsum'] / $row['numratings'], 1 ) : 0 );474 $rpic = ratingpic( $rating );475 $rating_message = sprintf( $lang['total_rating'], $rpic, $rating, $row['numratings'] );476 }477 if ( $userdata['session_logged_in'] ) {478 $rating_options = '';479 $sql = 'SELECT rating FROM ' . RATINGS_TABLE . ' WHERE torrent = ' . $id . ' AND user = ' . $userdata['uid'];480 $result = $db->sql_query( $sql );481 if ( $rating_row = $db->sql_fetchrow( $result ) ) {482 $rating_message .= sprintf( $lang['you_voted_for_this_torrent'], $rating_row['rating'], $lang['ratings_ary'][$rating_row['rating']] );483 }484 elseif ( $userdata['uid'] != $row['owner'] ) {485 foreach ( $lang['ratings_ary'] AS $k => $v ) {486 $rating_options .= '<option value="' . $k . '">' . $k . ' - ' . $v . '</option>';487 }488 $template->assign_block_vars( 'switch_rating_form', array(489 'RATING_OPTIONS' => $rating_options490 ));491 }492 }493 494 457 $tzoffset = ( $userdata['session_logged_in'] ? $userdata['tzoffset'] : $config['board_timezone'] ); 495 458 … … 508 471 $description = censor_text($description); 509 472 473 $page_description = split_string(strip_tags(str_replace(array('<br /><br />', '<br />'), array('<br />', ' '), $description)), 400, false); 510 474 511 475 if ( $highlight ) { … … 515 479 $cat_name = '<a href="' . append_sid($root_path . 'browse.php?cat=' . $cats[$row['category']]['cat_id']) . '">' . $cats[$row['category']]['cat_name'] . '</a>'; 516 480 517 //start tags allow 518 $allow_add_tags = false; 519 520 switch ( $config['tags_who_allowed'] ) { 521 case 0: 522 $allow_add_tags = true; 523 break; 524 525 case 1: 526 $allow_add_tags = $userdata['uid'] == $row['owner'] || $userdata['class'] >= UC_MODERATOR; 527 break; 528 529 case 2: 530 $allow_add_tags = $userdata['class'] >= UC_MODERATOR; 531 break; 532 } 533 //end tags allow 534 481 $rating_voted = true; 482 if ( $userdata['session_logged_in'] && $userdata['uid'] <> $row['owner'] ) { 483 $sql = 'SELECT torrent FROM ' . RATINGS_TABLE . ' WHERE torrent = ' . $id . ' AND user = ' . $userdata['uid']; 484 $result = $db->sql_query($sql); 485 $rating_voted = $db->sql_fetchrow($result); 486 } 487 488 $rating = ratingpic($row['numratings'], $row['ratingsum'], false); 535 489 $info_hash = preg_replace_callback('/./s', create_function('$matches','return sprintf(\'%02x\', ord($matches[0]));'), str_pad($row['info_hash'], 20)); 536 490 … … 561 515 'LAST_ACTIVITY' => $last_activity, 562 516 'SIZE' => mksize( $row['size'] ) . ' (' . number_format( $row['size'] ) . ' ' . $lang['bytes'] . ')', 563 'RATING' => $rating_message,564 517 'ADDED' => create_date($row['ctime']), 565 518 'VIEWS' => $row['views'], … … 576 529 577 530 'TAG_TYPE' => TYPE_TORRENT, 578 'ALLOW_ADD_TAGS' => $allow_add_tags, 531 'ALLOW_ADD_TAGS' => tags::return_allow_add_tag(TYPE_TORRENT, $id, $row['owner']), 532 533 'RATING' => sprintf($lang['total_rating'], $rating, $row['numratings'], $config['minvotes']), 534 'RATING_PIC_WIDTH' => $rating * $config['rating_pic_width'], 535 'RATING_VOTED' => $rating_voted, 579 536 580 537 )); … … 608 565 609 566 /* start tags */ 610 611 $sql = 'SELECT tag_name, tag_count 612 FROM ' . TAGS_TABLE . ' 613 WHERE tag_type = ' . TYPE_TORRENT . ' 614 AND tag_for_id = ' . $id; 615 $result = $db->sql_query($sql); 616 if ( $subrow = $db->sql_fetchrow($result) ) { 617 $template->assign_vars(array( 618 'TAGS' => '' 567 $tags = tags::tags_for_single(TYPE_TORRENT, $id); 568 $template->assign_vars(array( 569 'TAGS' => ( sizeof($tags) ? '' : $lang['no_tags'] ) 570 )); 571 572 foreach ( $tags AS $_null => $tag_ary ) { 573 $template->assign_block_vars('tags_row', array( 574 'TAG_NAME' => $tag_ary['tag_name'], 575 'JS_TAG_NAME' => $tag_ary['js_tag_name'], 576 'ENC_TAG_NAME' => $tag_ary['enc_tag_name'], 577 'TAG_SIZE' => $tag_ary['tag_size'], 578 'TAG_NUM' => $tag_ary['tag_num'], 579 580 'U_TAG' => append_sid($root_path . 'browse.php?search_in=3&search=' . $tag_ary['enc_tag_name']), 581 'U_TAG_USERS' => append_sid($root_path . 'modtask.php?action=tags&do=view_users&tag_name=' . $tag_ary['enc_tag_name'] . '&tag_type=' . TYPE_TORRENT . '&tag_for_id=' . $id), 619 582 )); 620 621 $tags = array();622 do {623 $tags[$subrow['tag_name']] = $subrow['tag_count'];624 }625 while ( $subrow = $db->sql_fetchrow($result) );626 627 //simple tag cloud find here http://www.bytemycode.com/snippets/snippet/415/628 629 $max_qty = max(array_values($tags));630 $min_qty = min(array_values($tags));631 632 $spread = $max_qty - $min_qty;633 $spread = ( $spread == 0 ? 1 : $spread );634 635 $step = ( $config['max_tag_size'] - $config['min_tag_size'] ) / $spread;636 637 $i = 0;638 639 foreach ( $tags AS $tag_name => $tag_count ) {640 $size = round($config['min_tag_size'] + (($tag_count - $min_qty) * $step));641 ++$i;642 643 $enc_tag_name = undo_htmlspecialchars($tag_name);644 $enc_tag_name = urlencode($enc_tag_name);645 646 $template->assign_block_vars('tags_row', array(647 'TAG_NAME' => $tag_name,648 'JS_TAG_NAME' => str_replace("'", "\'", $tag_name),649 'ENC_TAG_NAME' => $enc_tag_name,650 'TAG_SIZE' => $size,651 'TAG_NUM' => $i,652 653 'U_TAG' => append_sid($root_path . 'browse.php?search_in=3&search=' . $enc_tag_name),654 655 'U_TAG_USERS' => append_sid($root_path . 'modtask.php?action=tags&do=view_users&tag_name=' . $enc_tag_name . '&tag_type=' . TYPE_TORRENT . '&tag_for_id=' . $id),656 ));657 }658 }659 else {660 $template->assign_vars(array(661 'TAGS' => $lang['no_tags']662 ));663 583 } 664 584 /* end tags */ 585 665 586 666 587 $include_header = false; include/acp/config/xbt_settings.php
r308 r324 71 71 $str .= 'mysql_table_prefix = ' . $table_prefix . "\n"; 72 72 $str .= 'listen_ipa = ' . ( isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : getenv('SERVER_ADDR') ) . "\n"; 73 $str .= 'listen_port = ' . $config['xbt_listen_port']; 73 $str .= 'listen_port = ' . $config['listen_port'] . "\n"; 74 75 $str .= 'table_files = ' . TORRENTS_TABLE . "\n"; 76 $str .= 'table_files_users = ' . PEERS_TABLE . "\n"; 77 $str .= 'table_users = ' . USERS_TABLE . "\n"; 78 $str .= 'table_deleted_files = ' . XBT_DELETED_HASHES; 74 79 $str .= '</textarea>'; 75 80 include/bbcode/Xbb/Tags/A.php
r313 r324 27 27 28 28 function get_html($tree = null) { 29 global $root_path; 30 29 31 $this -> autolinks = false; 30 32 $text = ''; … … 49 51 } 50 52 53 if ( !$href = $this -> checkUrl($href) ) { 54 return '[url]' . parent::get_html($this -> tree) . '[/url]'; 55 } 56 51 57 if (strpos($href, $this->base_url) !== false && strpos($href, 'sid=') !== false) { 52 58 $href = preg_replace('/(&|\?)sid=[0-9a-f]{32}&/', '\1', $href); … … 54 60 $href = preg_replace("/(&|\?)sid=[0-9a-f]{32}\n/", '', $href); 55 61 } 56 else { 62 elseif ( strpos($href, $this->base_url) === false ) { 63 $href = $root_path . 'redir.php?url=' . $href; 57 64 $attr .= ' target="_blank"'; 58 }59 60 if ( !$href = $this -> checkUrl($href) ) {61 return '[url]' . parent::get_html($this -> tree) . '[/url]';62 65 } 63 66 include/bbcode/Xbb/Tags/Img.php
r317 r324 27 27 function get_html($tree = null) { 28 28 $attr = 'alt=""'; 29 if (isset($this -> attrib['width'])) { 30 $width = (int) $this -> attrib['width']; 31 $attr .= $width ? ' width="'.$width.'"' : ''; 32 } 33 if (isset($this -> attrib['height'])) { 34 $height = (int) $this -> attrib['height']; 35 $attr .= $height ? ' height="'.$height.'"' : ''; 36 } 37 if (isset($this -> attrib['border'])) { 38 $border = (int) $this -> attrib['border']; 39 $attr .= ' border="'.$border.'"'; 40 } 29 30 $attrs = array('width' => 0, 'height' => 0, 'border' => 0, 'align' => ''); 31 foreach ( $attrs AS $key => $val ) { 32 if ( isset($this->attrib[$key]) ) { 33 settype($this->attrib[$key], gettype($val)); 34 $attr .= ( $this->attrib[$key] ? ' '. $key .'="' . $this->attrib[$key] . '"' : '' ); 35 36 if ( $key == 'align' && $this->attrib[$key] ) { 37 $attr .= ( $this->attrib[$key] == 'left' ? ' style="padding-right:5px;"' : ' style="padding-left:5px;"' ); 38 } 39 } 40 } 41 41 42 $src = ''; 42 43 foreach ($this -> tree as $text) { 43 if ('text' == $text['type']) { $src .= $text['str']; } 44 if ('text' == $text['type']) { 45 $src .= $text['str']; 46 } 44 47 } 45 48 if ( !$c_src = $this -> checkUrl($src) ) { include/bbcode/bbcode.lib.php
r302 r324 1015 1015 1016 1016 function parse_url ( &$text ) { 1017 global $root_path; 1018 1017 1019 if (!$this -> autolinks) { 1018 1020 return; … … 1025 1027 } 1026 1028 $search = $this -> preg_autolinks['pattern']; 1027 $replace = $this -> preg_autolinks['replacement'];1028 $text = preg_replace($search, $replace, $text);1029 $replace = $this -> preg_autolinks['replacement']; 1030 $text = preg_replace($search, $replace, $text); 1029 1031 } 1030 1032 … … 1182 1184 $url = htmlentities($url, ENT_QUOTES); 1183 1185 $url = str_replace('&', '&', $url); 1184 $url = str_replace('.', '&#'.ord('.').';', $url);1185 $url = str_replace(':', '&#'.ord(':').';', $url);1186 //$url = str_replace('.', '&#'.ord('.').';', $url); 1187 //$url = str_replace(':', '&#'.ord(':').';', $url); 1186 1188 $url = str_replace('(', '&#'.ord('(').';', $url); 1187 1189 $url = str_replace(')', '&#'.ord(')').';', $url); include/bbcode/config/parser.config.php
r317 r324 37 37 ), 38 38 'replacement' => array( 39 "'<a href=\"\\0\" target=\"_blank\">' . str_replace(\$this->base_url, '', '\\0') . '</a>'",40 "'<a href=\"http://\\2\" target=\"_blank\">' . str_replace('http://' . \$this->base_url, '', '\\2') . '</a>'",39 "'<a ' . ( strpos('\\0', \$this->base_url) !== false ? 'href=\"\\0\">' . str_replace(\$this->base_url, '', '\\0') : 'href=\"' . \$root_path . 'redir.php?url=\\0\" target=\"_blank\">\\0') . '</a>'", 40 "'<a ' . ( strpos('http://\\2', \$this->base_url) !== false ? 'href=\"http://\\2\">' . str_replace('http://' . \$this->base_url, '', 'http://\\2') : 'href=\"' . \$root_path . 'redir.php?url=http://\\2\" target=\"_blank\">http://\\2') . '</a>'", 41 41 '<a href="mailto:$0">$0</a>', 42 42 ), include/class.bencode.php
r315 r324 315 315 */ 316 316 public function save ( $filename = null ) { 317 return file_put_contents( is_null( $filename ) ? $this->info['name'] . '.torrent' : $filename, $this );317 return file_put_contents( is_null( $filename ) ? $this->info['name'] . '.torrent' : $filename, (string) $this ); 318 318 } 319 319 include/class.cleanup_types.php
r311 r324 16 16 } 17 17 18 $sql = 'DELETE FROM ' . PEERS_TABLE . ' WHERE mtime < ' . ( $this->time_now - floor($config['announce_interval']) * 1.4 ) . ( defined('USE_XBTT') ? ' AND active = 0' : '' );18 $sql = 'DELETE FROM ' . PEERS_TABLE . ' WHERE mtime < ' . ( $this->time_now - floor($config['announce_interval']) * 1.4 ); 19 19 $db->sql_query($sql); 20 20 … … 243 243 if ( $config['ttl'] > 0 ) { 244 244 $dt = $this->time_now - ($config['ttl'] * 24 * 60 * 60); 245 $sql = 'SELECT fid, name FROM ' . TORRENTS_TABLE . ' WHERE ctime < ' . $dt . ' AND leechers = 0';245 $sql = 'SELECT fid, name, info_hash FROM ' . TORRENTS_TABLE . ' WHERE ctime < ' . $dt . ' AND leechers = 0'; 246 246 $result = $db->sql_query($sql); 247 247 if ( $row = $db->sql_fetchrow($result) ) { … … 249 249 do { 250 250 write_log( sprintf($lang['log_torrent_deleted_by_system_ttl_expired'], $row['fid'], $row['name'], $config['ttl']) ); 251 $delete_arr_torrents[ ] = $row['fid'];251 $delete_arr_torrents[$row['info_hash']] = $row['fid']; 252 252 } 253 253 while ( $row = $db->sql_fetchrow($result) ); … … 258 258 elseif ( $config['alternate_ttl'] > 0 ) { 259 259 $dt = $this->time_now - ($config['alternate_ttl'] * 24 * 60 * 60); 260 $sql = 'SELECT fid, name FROM ' . TORRENTS_TABLE . ' WHERE mtime < ' . $dt . ' AND leechers = 0';260 $sql = 'SELECT fid, name, info_hash FROM ' . TORRENTS_TABLE . ' WHERE mtime < ' . $dt . ' AND leechers = 0'; 261 261 $result = $db->sql_query($sql); 262 262 if ( $row = $db->sql_fetchrow($result) ) { … … 264 264 do { 265 265 write_log( sprintf($lang['log_torrent_deleted_by_system_no_activity'], $row['fid'], $row['name'], $config['alternate_ttl']) ); 266 $delete_arr_torrents[ ] = $row['fid'];266 $delete_arr_torrents[$row['info_hash']] = $row['fid']; 267 267 } 268 268 while ( $row = $db->sql_fetchrow($result) ); … … 664 664 global $root_path; 665 665 666 include_once($root_path . 'include/functions_messenger.php'); 667 666 668 if ( @file_exists($root_path . 'cache/queue.php') ) { 667 include_once($root_path . 'include/functions_messenger.php'); 668 $queue = new queue(); 669 $queue->process(); 670 } 671 672 return true; 669 $queue = new queue(); 670 $queue->process(); 671 } 672 673 if ( @file_exists($root_path . 'cache/queue_huge.php') ) { 674 $queue = new queue($root_path . 'cache/queue_huge.php'); 675 $queue->process(); 676 } 677 678 return true; 673 679 } 674 680 include/class.seo.php
r313 r324 3 3 * 4 4 * @package Ultimate SEO URL phpBB SEO 5 * @version $ id: seo_class.php - 35345 06-03-2009 16:28:22 - 0.6.0dcz $6 * @copyright (c) 2006 - 20 09www.phpbb-seo.com7 * @license http://www.opensource.org/licenses/rpl .php RPL Public License5 * @version $Id: phpbb_seo_class.php 236 2010-03-03 08:20:36Z dcz $ 6 * @copyright (c) 2006 - 2010 www.phpbb-seo.com 7 * @license http://www.opensource.org/licenses/rpl1.5.txt Reciprocal Public License 1.5 8 8 * 9 9 */ 10 10 /** 11 * SEO Class11 * phpBB_SEO Class 12 12 * www.phpBB-SEO.com 13 13 * @package Ultimate SEO URL phpBB SEO … … 15 15 16 16 class seo { 17 var $version = '0.6. 0';17 var $version = '0.6.4'; 18 18 var $modrtype = 2; // We set it to mixed as a default value 19 19 var $seo_path = array(); … … 135 135 function seo() { 136 136 global $config, $root_path; 137 // fix for an interesting bug with parse_str http://bugs.php.net/bug.php?id=48697 138 // and apparently, the bug is still here in php5.3 139 @ini_set("mbstring.internal_encoding", 'UTF-8'); 137 140 // Nothing should be edited here, please do your custom settings in the 138 141 // seo/includes/seo_modules.php instead to make your updates easier. … … 172 175 $this->seo_path['script'] = $script_path; 173 176 $this->seo_path['files'] = $this->seo_path['url'] . 'download/'; 177 $this->seo_path['canonical'] = ''; 178 179 // File setting 180 $this->seo_req_uri(); 181 $this->seo_opt['seo_base_href'] = $this->seo_opt['req_file'] = $this->seo_opt['req_self'] = ''; 182 if ($script_name = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF')) { 183 // From session.php 184 // Replace backslashes and doubled slashes (could happen on some proxy setups) 185 $this->seo_opt['req_self'] = str_replace(array('\\', '//'), '/', $script_name); 186 // basenamed page name (for example: index) 187 $this->seo_opt['req_file'] = urlencode(htmlspecialchars(str_replace(".php", '', basename($this->seo_opt['req_self'])))); 188 } 174 189 // Load settings from phpbb_seo/includes/seo_modules.php 175 190 if ($this->check_cache()) { … … 370 385 } 371 386 // virtual root option 372 if ($this->seo_opt['virtual_root']) { 387 if ($this->seo_opt['virtual_root'] && $this->seo_path['phpbb_script']) { 388 // virtual root is available and activated 373 389 $this->seo_path['urlR'] = $this->seo_path['root_url']; 374 390 $this->file_hbase['index'] = $this->seo_path['url']; 375 391 $this->seo_static['index'] = empty($this->seo_static['index']) ? '/' : $this->seo_static['index']; 392 } else { 393 // virtual root is not used or usable 394 $this->seo_opt['virtual_root'] = false; 376 395 } 377 396 $this->seo_ext['index'] = empty($this->seo_static['index']) ? '' : ( empty($this->seo_ext['index']) ? '.html' : $this->seo_ext['index']); … … 572 591 static $replace = array('%26', '%2F', '%23', '%2b'); 573 592 return rawurlencode(str_replace( $find, $replace, htmlspecialchars_decode(str_replace('&amp;', '%26', rawurldecode($url))))); 574 return $url;575 593 } 576 594 /** … … 609 627 } 610 628 // Sid ? 611 if ($session_id) { 629 if ($session_id === false && !empty($_SID)) { 630 $qs .= ($qs ? $amp_delim : '') . "sid=$_SID"; 631 } else if ($session_id) { 612 632 $qs .= ($qs ? $amp_delim : '') . "sid=$session_id"; 613 } elseif (!empty($_SID)) {614 $qs .= ($qs ? $amp_delim : '') . "sid=$_SID";615 633 } 616 634 // Build vanilla URL … … 632 650 $this->filename = trim(str_replace(".php", '', $this->file)); 633 651 if ( isset($this->seo_stop_files[$this->filename]) ) { 652 // add full url 653 $url = $this->path == $phpbb_root_path ? $this->seo_path['phpbb_url'] . preg_replace('`^' . $phpbb_root_path . '`', '', $url) : $url; 634 654 return ($this->seo_cache[$url] = $url); 635 655 } 636 // parse_str is here bypassed because it uses magic quotes 637 // parse_str(str_replace('&', '&', $qs), $this->get_vars); 638 // Won't deal with arrays, same as append_sid 639 $pairs = explode('&', str_replace('&', '&', $qs)); 640 foreach($pairs as $pair) { 641 @list($name, $value) = explode('=', $pair, 2); 642 if ($value !== null) { 643 //$this->get_vars[$name] = urldecode($value); 644 $this->get_vars[$name] = $value; 645 } 656 parse_str(str_replace('&', '&', $qs), $this->get_vars); 657 // strp slashes if necessary 658 if (defined('STRIP')) { 659 $this->get_vars = array_map(array(&$this, 'stripslashes'), $this->get_vars); 646 660 } 647 661 if (empty($userdata['session_logged_in'])) { … … 661 675 } 662 676 } 663 664 677 /** 665 678 * URL rewritting for viewtopic.php … … 1131 1144 $params = array(); 1132 1145 foreach($get_vars as $key => $value) { 1133 if ($value !== null) { 1134 $params[$key] = $key . '=' . $value; 1146 if (is_array($value)) { 1147 foreach($value as $k => $v) { 1148 $params[] = $key . '[' . $k . ']=' . $v; 1149 } 1150 } else { 1151 $params[] = $key . (!trim($value) ? '' : '=' . $value); 1135 1152 } 1136 1153 } … … 1272 1289 return preg_match('%(?:[\xC2-\xDF][\x80-\xBF]|\xE0[\xA0-\xBF][\x80-\xBF]|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}|\xED[\x80-\x9F][\x80-\xBF] |\xF0[\x90-\xBF][\x80-\xBF]{2}|[\xF1-\xF3][\x80-\xBF]{3}|\xF4[\x80-\x8F][\x80-\xBF]{2})+%xs', $string); 1273 1290 } 1291 /** 1292 * stripslashes($value) 1293 * Borrowed from php.net : http://www.php.net/stripslashes 1294 */ 1295 function stripslashes($value) { 1296 return is_array($value) ? array_map(array(&$this, 'stripslashes'), $value) : stripslashes($value); 1297 } 1274 1298 // --> Add on Functions <-- 1275 1299 // --> Gen stats include/constants.php
r316 r324 163 163 define('SIMPATY_CUSTOM', 0); 164 164 165 define('XBTT_HASH_CHANGED', 8); 165 166 define('XBTT_TORRENT_MODIFIED', 9); 166 167 … … 228 229 define('VOTE_USERS_TABLE', 'vote_voters'); 229 230 define('CHAT_MESSAGES_TABLE', 'chat_messages'); 231 define('XBT_DELETED_HASHES', 'xbt_deleted_hashes'); 230 232 231 233 ?> include/db/dbal.php
r280 r324 588 588 function sql_error($sql = '') 589 589 { 590 global $ userdata, $config;590 global $config, $userdata; 591 591 592 592 // Set var to retrieve errored status include/details/delete.php
r246 r324 7 7 $pm_ary = array(); 8 8 9 $sql = 'SELECT t.name, t.seeders, t.moderated, u.language, u.name AS username, u.email, u.notifs, u.language, u.class, u.uid, u.user_reputation_level, u.user_rank_id, u.user_reputation9 $sql = 'SELECT t.name, t.seeders, t.moderated, t.info_hash, u.language, u.name AS username, u.email, u.notifs, u.language, u.class, u.uid, u.user_reputation_level, u.user_rank_id, u.user_reputation 10 10 FROM ' . TORRENTS_TABLE . ' t, ' . USERS_TABLE . ' u 11 11 WHERE t.fid = ' . $id . ' … … 39 39 40 40 } 41 $delete_arr = array( $id );42 deletetorrent( $delete_arr);41 $delete_arr[$row['info_hash']] = $id; 42 deletetorrent($delete_arr); 43 43 44 44 $cache->destroy( 'sql', INDEXRELEASES_TABLE ); include/details/download.php
r318 r324 9 9 $type = request_var('type', ''); 10 10 11 if ( !$id ) { 12 trigger_error( sprintf( $lang['invalid_id'], $id ) ); 13 } 14 $sql = 'SELECT name, hidden, filename, moderated, owner FROM ' . TORRENTS_TABLE . ' WHERE fid = ' . $id; 11 $sql = 'SELECT name, hidden, filename, moderated, owner, category FROM ' . TORRENTS_TABLE . ' WHERE fid = ' . $id; 15 12 $result = $db->sql_query( $sql ); 16 13 if ( !$row = $db->sql_fetchrow( $result ) ) { … … 18 15 } 19 16 20 if ( $row['hidden'] ) { 21 if ( !$userdata['hiddentorrents'] && $userdata['class'] < UC_MODERATOR ) { 22 trigger_error( $lang['access_denied'] ); 23 } 17 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 18 $seo->set_torrent_url($id, $row['name'], $row['category']); 19 // www.phpBB-SEO.com SEO TOOLKIT END 20 $ref = ( !empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '' ); 21 if ( strpos($ref, generate_base_url()) === false ) { 22 redirect(append_sid($root_path . 'details.php?id=' . $id)); 23 } 24 25 if ( $row['hidden'] && ( !$userdata['hiddentorrents'] && $userdata['class'] < UC_MODERATOR ) ) { 26 trigger_error( $lang['access_denied'] ); 24 27 } 25 28 … … 49 52 header( 'Content-transfer-encoding: binary' ); 50 53 header( 'Content-length: ' . strlen( $comp_data ) ); 51 echo( $comp_data);54 echo($comp_data); 52 55 } 53 56 else { 54 57 $torrent->send($row['filename']); 55 58 } 59 gc(); 56 60 ?> include/details/edit.php
r307 r324 6 6 FROM ' . TORRENTS_TABLE . ' t, ' . USERS_TABLE . ' u 7 7 WHERE u.uid = t.owner 8 AND fid = ' . $id . ( defined( 'USE_XBTT' ) ? ' AND t.flags <> 1' : '' );8 AND fid = ' . $id; 9 9 $result = $db->sql_query($sql); 10 10 if ( !$row = $db->sql_fetchrow($result) ) { … … 70 70 $updateset['free'] = request_var('free', 0); 71 71 72 $moderated = ( isset( $_POST['moderated'] ) ? 1 : 0);72 $moderated = request_var('moderated', 0); 73 73 $updateset['moderated'] = $moderated; 74 74 75 $updateset['disable_comments'] = ( isset( $_POST['disable_comments'] ) ? 1 : 0);75 $updateset['disable_comments'] = request_var('disable_comments', 0); 76 76 77 77 if ( !$row['moderated'] && $moderated ) { … … 84 84 85 85 if ( $userdata['hiddentorrents'] || $userdata['class'] >= UC_MODERATOR ) { 86 $hidden = ( isset( $_POST['hidden'] ) ? 1 : 0);86 $hidden = request_var('hidden', 0); 87 87 $updateset['hidden'] = $hidden; 88 88 } … … 112 112 $updateset['leechers'] = 0; 113 113 $updateset['ctime'] = time(); 114 115 if ( defined('USE_XBTT') ) { 116 $sql = 'INSERT INTO ' . XBT_DELETED_HASHES . ' ' . $db->sql_build_array('INSERT', array( 117 'fid' => $id, 118 'info_hash' => $row['info_hash'] 119 )); 120 $db->sql_query($sql); 121 } 114 122 } 115 123 … … 120 128 121 129 $changes_does = array( 122 ' seeders' => array(123 'send_changes_to_xbtt' => true,130 'info_hash' => array( 131 'send_changes_to_xbtt' => XBTT_HASH_CHANGED, 124 132 ), 125 133 'free' => array( 126 'send_changes_to_xbtt' => true,134 'send_changes_to_xbtt' => XBTT_TORRENT_MODIFIED, 127 135 ), 128 136 'hidden' => array( 129 'send_changes_to_xbtt' => true,137 'send_changes_to_xbtt' => XBTT_TORRENT_MODIFIED, 130 138 ), 131 139 ); … … 134 142 135 143 foreach ( $updateset AS $key => $val ) { 136 137 if ( !empty($changes_does[$key]['send_changes_to_xbtt']) && defined('USE_XBTT') ) {138 $updateset['flags'] = XBTT_TORRENT_MODIFIED;139 }140 141 144 if ( $val <> $row[$key] && isset($lang['log_tor_edited_' . $key]) ) { 145 146 if ( !empty($changes_does[$key]['send_changes_to_xbtt']) && defined('USE_XBTT') ) { 147 $flag = $changes_does[$key]['send_changes_to_xbtt']; 148 $updateset['flags'] = $flag; 149 } 150 142 151 $write_log_msg[] = $lang['log_tor_edited_' . $key]; 143 152 } … … 149 158 150 159 $sql = 'UPDATE ' . TORRENTS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $updateset) . ' WHERE fid = ' . $id; 160 $db->sql_query($sql); 161 151 162 $db->sql_query($sql); 152 163 $cache->destroy('sql', INDEXRELEASES_TABLE); include/functions.php
r321 r324 241 241 242 242 case E_USER_ERROR: 243 if (!empty($cache))244 {245 $cache->unload();246 }247 if (!empty($db)) {248 $db->sql_close();249 }250 243 echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'; 251 244 echo '<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">'; … … 279 272 echo '</html>'; 280 273 281 exit;274 gc(); 282 275 break; 283 276 … … 464 457 $user_rank = ( isset($ranks[$data['user_rank_id']]['rank_name']) ? $ranks[$data['user_rank_id']]['rank_name'] : '' ); 465 458 466 $ret_string .= ' <span class="' . ( $rep_level < 0 ? 'badUserResp' : 'goodUserResp' ) . '" title="' . $user_rank . ', ' . $lang['reputation'] . ': ' . $data['user_reputation'] . '"><a href="javascript:;" onclick="window.open(\'' . append_sid($root_path . 'userdetails.php?id=' . $data['uid'] . '&action=card') . '\', \'\', \'width= 420,height=230,resizable=yes,scrollbars=yes,status=yes\')">' . $rep_level . '</a></span>';459 $ret_string .= ' <span class="' . ( $rep_level < 0 ? 'badUserResp' : 'goodUserResp' ) . '" title="' . $user_rank . ', ' . $lang['reputation'] . ': ' . $data['user_reputation'] . '"><a href="javascript:;" onclick="window.open(\'' . append_sid($root_path . 'userdetails.php?id=' . $data['uid'] . '&action=card') . '\', \'\', \'width=500,height=230,resizable=yes,scrollbars=yes,status=yes\')">' . $rep_level . '</a></span>'; 467 460 } 468 461 } … … 570 563 571 564 if ( !$db->sql_query($sql) ) { 572 trigger_error($text );565 trigger_error($text, E_USER_ERROR); 573 566 } 574 567 $db->sql_return_on_error(false); … … 765 758 } 766 759 767 function ratingpic($num) { 768 global $lang, $images; 769 770 $r = round($num * 2) / 2; 771 $r = str_replace(',', '.', $r); //on some locales may be symbol ',' instead of '.' 772 if ($r < 1 || $r > 5) { 773 return; 774 } 775 return '<img src="' . $images['rating_' . $r] . '" alt="' . $lang['rating'] . ': ' . $num . ' / 5" title="' . $lang['rating'] . ': ' . $num . ' / 5" />'; 760 function ratingpic( $numratings, $ratingsum, $return_pic = true ) { 761 global $root_path, $lang, $images, $config; 762 763 $rating = ($numratings ? round($ratingsum / $numratings, 1) : 0); 764 $rating = round($rating * 2) / 2; 765 $rating = str_replace(',', '.', $rating); //on some locales may be symbol ',' instead of '.' 766 if ( $numratings > $config['minvotes'] ) { 767 if ( $return_pic ) { 768 $title = $lang['rating'] . ': ' . $rating . ' / 5'; 769 return '<span class="all-ratings" title="' . $title .'"><span style="width:' . ( $rating * $config['rating_pic_width'] ) . 'px">' .$title .'</span></span>'; 770 } 771 else { 772 return $rating; 773 } 774 } 775 else { 776 if ( $return_pic ) { 777 return '<span class="all-ratings"> </span>'; 778 } 779 else { 780 return 0; 781 } 782 } 776 783 } 777 784 … … 970 977 } 971 978 972 function split_string ($string, $length ) {979 function split_string ($string, $length, $hellip = true) { 973 980 if ( utf_strlen($string) <= $length ) { 974 981 return $string; … … 977 984 $line = ''; 978 985 $length = $length - 3; 979 $words = preg_split("/[\s ,]+/u", $string, -1);986 $words = preg_split("/[\s]+/u", $string, 0, PREG_SPLIT_DELIM_CAPTURE); 980 987 for($i = 0; $i < sizeof($words); $i++) { 981 988 if ( utf_strlen($line . $words[$i] . ' ') < $length){ … … 983 990 } 984 991 } 985 return substr($line, 0, -1) . '…';992 return substr($line, 0, -1) . ( $hellip ? '…' : '...' ); 986 993 } 987 994 } … … 1055 1062 global $db, $cache, $config, $root_path, $lang; 1056 1063 1057 if (!$return)1064 /*if (!$return) 1058 1065 { 1059 1066 if (!empty($cache)) { … … 1063 1070 $db->sql_close(); 1064 1071 } 1065 } 1072 }*/ 1066 1073 $current_page = extract_current_page(); 1067 1074 … … 1333 1340 global $userdata, $config, $template, $lang, $db, $images, $root_path, $theme, $cache, $seo; 1334 1341 global $bb_code; 1342 global $page_description; 1335 1343 static $ranks; 1336 1344 … … 1356 1364 1357 1365 $keywords = $title; 1358 $page_description = str_replace( $find, '', $title);1366 $page_description = ( empty($page_description) ? str_replace( $find, '', $title) : $page_description ); 1359 1367 $title = ( !$title ? $config['sitename'] : $config['sitename'] . ' :: ' . $title); 1360 1368 $title = implode(' :: ', array_reverse(explode(' :: ', $title))); … … 1553 1561 'U_USERSEARCH' => append_sid($root_path . 'usersearch.php'), 1554 1562 'U_RELEASES_ADD' => append_sid($root_path . 'releases.php?action=add'), 1555 'U_CHEATERS' => append_sid($root_path . 'cheaters.php') 1563 'U_CHEATERS' => append_sid($root_path . 'cheaters.php'), 1564 'U_NEW_FORUM_POSTS' => append_sid($root_path . 'phpbb2.php?page=search&search_id=newposts'), 1565 'U_NEW_SITE_COMMENTS' => append_sid($root_path . 'modtask.php?action=new_comments'), 1556 1566 )); 1557 1567 include/functions_delete.php
r316 r324 8 8 if ( $count = sizeof($arr_ids) ) { 9 9 if ( defined('USE_XBTT') ) { 10 $sql = 'UPDATE ' . TORRENTS_TABLE . ' SET flags = 1 WHERE fid IN (' . $ids . ')'; 11 $db->sql_query($sql); 12 } 13 else { 14 $sql = 'DELETE FROM ' . TORRENTS_TABLE . ' WHERE fid IN (' . $ids . ')'; 15 $db->sql_query($sql); 16 } 10 foreach ( $arr_ids AS $info_hash => $id ) { 11 $sql = 'INSERT INTO ' . XBT_DELETED_HASHES . ' ' . $db->sql_build_array('INSERT', array( 12 'fid' => $id, 13 'info_hash' => $info_hash 14 )); 15 $db->sql_query($sql); 16 } 17 } 18 19 $sql = 'DELETE FROM ' . TORRENTS_TABLE . ' WHERE fid IN (' . $ids . ')'; 20 $db->sql_query($sql); 17 21 $sql = 'DELETE FROM ' . SNATCHED_TABLE . ' WHERE torrentid IN (' . $ids . ')'; 18 22 $db->sql_query($sql); … … 41 45 $sql = 'DELETE FROM ' . CHEATERS_TABLE . ' WHERE torrentid IN (' . $ids . ')'; 42 46 $db->sql_query($sql); 43 $sql = 'DELETE FROM ' . TAGS_TABLE . ' WHERE tag_for_id IN (' . $ids . ') AND tag_type = ' . SIMPATY_COMMENT;44 $db->sql_query($sql); 45 $sql = 'DELETE FROM ' . TAGS_USERS_TABLE . ' WHERE tag_users_for_id IN (' . $ids . ') AND tag_users_type = ' . SIMPATY_COMMENT;47 $sql = 'DELETE FROM ' . TAGS_TABLE . ' WHERE tag_for_id IN (' . $ids . ') AND tag_type = ' . TYPE_TORRENT; 48 $db->sql_query($sql); 49 $sql = 'DELETE FROM ' . TAGS_USERS_TABLE . ' WHERE tag_users_for_id IN (' . $ids . ') AND tag_users_type = ' . TYPE_TORRENT; 46 50 $db->sql_query($sql); 47 51 … … 104 108 $db->sql_query($sql); 105 109 $sql = 'DELETE FROM ' . UPLOADAPP_TABLE . ' WHERE userid IN (' . implode(',', $arr_ids) . ')'; 110 $db->sql_query($sql); 111 $sql = 'DELETE FROM ' . TAGS_USERS_TABLE . ' WHERE tag_users_uid IN (' . implode(',', $arr_ids) . ')'; 106 112 $db->sql_query($sql); 107 113 $sql = 'UPDATE ' . COMMENTS_TABLE . ' SET comment_user = ' . ANONYMOUS . ' WHERE comment_user IN (' . implode(',', $arr_ids) . ')'; include/functions_messenger.php
r293 r324 66 66 $this->addresses['to'][$pos]['email'] = trim($address); 67 67 68 // If empty sendmail_path on windows, PHP changes the to line 69 if (!$config['smtp_delivery'] && DIRECTORY_SEPARATOR == '\\') 70 { 71 $this->addresses['to'][$pos]['name'] = ''; 72 } 73 else 74 { 75 $this->addresses['to'][$pos]['name'] = trim($realname); 68 if ( trim($realname) ) { 69 // If empty sendmail_path on windows, PHP changes the to line 70 if (!$config['smtp_delivery'] && DIRECTORY_SEPARATOR == '\\') 71 { 72 $this->addresses['to'][$pos]['name'] = ''; 73 } 74 else 75 { 76 $this->addresses['to'][$pos]['name'] = trim($realname); 77 } 76 78 } 77 79 } … … 89 91 $pos = isset($this->addresses['cc']) ? sizeof($this->addresses['cc']) : 0; 90 92 $this->addresses['cc'][$pos]['email'] = trim($address); 91 $this->addresses['cc'][$pos]['name'] = trim($realname); 93 if ( trim($realname) ) { 94 $this->addresses['cc'][$pos]['name'] = trim($realname); 95 } 92 96 } 93 97 … … 104 108 $pos = isset($this->addresses['bcc']) ? sizeof($this->addresses['bcc']) : 0; 105 109 $this->addresses['bcc'][$pos]['email'] = trim($address); 106 $this->addresses['bcc'][$pos]['name'] = trim($realname); 110 if ( trim($realname) ) { 111 $this->addresses['bcc'][$pos]['name'] = trim($realname); 112 } 107 113 } 108 114 … … 120 126 $pos = isset($this->addresses['im']) ? sizeof($this->addresses['im']) : 0; 121 127 $this->addresses['im'][$pos]['uid'] = trim($address); 122 $this->addresses['im'][$pos]['name'] = trim($realname); 128 if ( trim($realname) ) { 129 $this->addresses['im'][$pos]['name'] = trim($realname); 130 } 123 131 } 124 132 … … 417 425 foreach ($address_ary as $which_ary) 418 426 { 419 $$type .= (($$type != '') ? ', ' : '') . (( $which_ary['name'] != '') ? mail_encode($which_ary['name'], $encode_eol) . ' <' . $which_ary['email'] . '>' : $which_ary['email']);427 $$type .= (($$type != '') ? ', ' : '') . ((!empty($which_ary['name'])) ? mail_encode($which_ary['name'], $encode_eol) . ' <' . $which_ary['email'] . '>' : $which_ary['email']); 420 428 } 421 429 } … … 547 555 * constructor 548 556 */ 549 function queue( )557 function queue( $cache_file = '' ) 550 558 { 551 559 global $root_path; 552 560 561 if ( $cache_file ) { 562 $this->cache_file = $cache_file; 563 } 564 else { 565 $this->cache_file = "{$root_path}cache/queue.php"; 566 } 567 553 568 $this->data = array(); 554 $this->cache_file = "{$root_path}cache/queue.php";555 569 556 570 // Determine EOL character (\n for UNIX, \r\n for Windows and \r for Mac) … … 596 610 } 597 611 598 /*if (!file_exists($this->cache_file) || (file_exists($this->cache_file . '.lock') && filemtime($this->cache_file) > time() - $config['queue_interval'])) 599 { 600 return; 601 }*/ 612 @set_time_limit(0); 613 @ignore_user_abort(true); 614 @ini_set('memory_limit', -1); 602 615 603 616 $fp = @fopen($this->cache_file . '.lock', 'wb'); … … 620 633 621 634 // If the amount of emails to be sent is way more than package_size than we need to increase it to prevent backlogs... 622 if (sizeof($data_ary['data']) > $package_size * 2.5)623 { 624 $num_items = sizeof($data_ary['data']);625 } 635 /*if (sizeof($data_ary['data']) > $package_size * 2.5) 636 { 637 $num_items = $package_size * 2.5; 638 }*/ 626 639 627 640 switch ($object) … … 753 766 } 754 767 768 if ( sizeof($this->data['email']['data']) > 5 ) { 769 $this->cache_file = "{$root_path}cache/queue_huge.php"; 770 } 771 772 @set_time_limit(0); 773 @ignore_user_abort(true); 774 @ini_set('memory_limit', -1); 775 755 776 if (file_exists($this->cache_file)) 756 777 { … … 837 858 foreach ($addresses['to'] as $which_ary) 838 859 { 839 $mail_to[] = ( $which_ary['name'] != '') ? mail_encode(trim($which_ary['name'])) . ' <' . trim($which_ary['email']) . '>' : '<' . trim($which_ary['email']) . '>';860 $mail_to[] = (!empty($which_ary['name'])) ? mail_encode(trim($which_ary['name'])) . ' <' . trim($which_ary['email']) . '>' : '<' . trim($which_ary['email']) . '>'; 840 861 $mail_rcpt['to'][] = '<' . trim($which_ary['email']) . '>'; 841 862 } … … 854 875 foreach ($addresses['cc'] as $which_ary) 855 876 { 856 $mail_cc[] = ( $which_ary['name'] != '') ? mail_encode(trim($which_ary['name'])) . ' <' . trim($which_ary['email']) . '>' : '<' . trim($which_ary['email']) . '>';877 $mail_cc[] = (!empty($which_ary['name'])) ? mail_encode(trim($which_ary['name'])) . ' <' . trim($which_ary['email']) . '>' : '<' . trim($which_ary['email']) . '>'; 857 878 $mail_rcpt['cc'][] = '<' . trim($which_ary['email']) . '>'; 858 879 } include/functions_post.php
r321 r324 36 36 37 37 if ( $row['comment_user'] == ANONYMOUS ) { 38 $show_comment_user = =false;39 } 40 else { 41 if ( ( $owner == $row['comment_user'] && $row['privacy'] == PRIVACY_LEVEL_HIGH ) && ( $userdata['class'] < UC_MODERATOR && $userdata['uid'] != $row['comment_user'] ) ) {38 $show_comment_user = false; 39 } 40 else { 41 if ( $type <> TYPE_NEWS && ( $owner == $row['comment_user'] && $row['privacy'] == PRIVACY_LEVEL_HIGH ) && ( $userdata['class'] < UC_MODERATOR && $userdata['uid'] != $row['comment_user'] ) ) { 42 42 $show_comment_user = false; 43 43 } … … 367 367 } 368 368 else { 369 if ( ( $owner == $row['uid'] && $row['privacy'] == PRIVACY_LEVEL_HIGH ) && ( $userdata['class'] < UC_MODERATOR && $userdata['uid'] != $row['uid'] ) ) {369 if ( $type <> TYPE_NEWS && ( $owner == $row['uid'] && $row['privacy'] == PRIVACY_LEVEL_HIGH ) && ( $userdata['class'] < UC_MODERATOR && $userdata['uid'] != $row['uid'] ) ) { 370 370 $show_comment_user = false; 371 371 } include/functions_search.php
r318 r324 94 94 } 95 95 96 $match_word = str_replace('*', '%', $split_search[$i]);97 96 if ( $strict ) { 98 $search = $where_search . ' = \'' . $db->sql_escape($ match_word) . '\'' . $add_where;97 $search = $where_search . ' = \'' . $db->sql_escape($split_search[$i]) . '\'' . $add_where; 99 98 } 100 99 else { 100 $match_word = str_replace('*', '%', $split_search[$i]); 101 101 $search = $where_search . ' LIKE \'%' . $db->sql_escape($match_word) . '%\'' . $add_where; 102 102 } include/functions_torrenttable.php
r318 r324 125 125 $dispname = ( $highlight ? highlight_text($search, $dispname) : $dispname ); 126 126 127 if ( $ary[$i]['numratings'] < $config['minvotes'] ) { 128 $rating = '---'; 129 } 130 else { 131 $rating = ( $ary[$i]['numratings'] ? round($ary[$i]['ratingsum'] / $ary[$i]['numratings'], 1) : 0 ); 132 $rating = ratingpic($rating); 133 } 127 $rating = ratingpic($ary[$i]['numratings'], $ary[$i]['ratingsum']); 134 128 135 129 if ( isset($config['ttl']) && ($config['ttl'] > 0) ) { include/modtask/mass_torrent_actions.php
r307 r324 26 26 $cats = $cache->obtain_cats(); 27 27 28 $sql = 'SELECT t.fid, t.name, t.owner, t.category, u.name AS username, u.language, u.email, u.notifs, u.language, u.class28 $sql = 'SELECT t.fid, t.name, t.owner, t.category, t.info_hash, u.name AS username, u.language, u.email, u.notifs, u.language, u.class 29 29 FROM ' . TORRENTS_TABLE . ' t, ' . USERS_TABLE . ' u 30 30 WHERE t.fid IN (' . $ids . ') … … 110 110 write_log( sprintf( $lang['log_torrent_deleted_by_user'], $ary['fid'] , $ary['name'], $userdata['name'], $reason ) ); 111 111 112 $delete_arr[ ] = $ary['fid'];112 $delete_arr[$ary['info_hash']] = $ary['fid']; 113 113 114 114 } include/modtask/new_comments.php
r317 r324 33 33 $title = ( $row['title'] ? get_user_class_name($row['class']) . '<br />' . $row['title'] : get_user_class_name($row['class']) ); 34 34 $username = $row['name'] . get_user_icons($row); 35 $avatar_prefix = ( ( strpos($row['avatar'], 'user_avatar_' . $row['user']) === false && strpos($row['avatar'], '/') !== false ) || !$row['avatar'] ? '' : generate_base_url() . '/' . $config['avatar_path'] . '/');36 $avatar = ($userdata['avatars'] ? ( !$row['avatar'] ? $images['default_avatar'] : $avatar_prefix . $row['avatar'] ) : $images['default_avatar']); 35 $avatar = get_user_avatar($user_id, $row['avatar']); 36 37 37 $user_sig = ( isset($row['user_sig']) && $row['user_sig'] != '' && $config['allow_sig'] ) ? $row['user_sig'] : ''; 38 38 if ( $user_sig ) { … … 76 76 else 77 77 { 78 $mini_post_img = $images['icon_minipost'];79 $mini_post_alt = $lang['post'];78 $mini_post_img = $images['icon_minipost']; 79 $mini_post_alt = $lang['comment']; 80 80 } 81 81 … … 101 101 while ( $row = $db->sql_fetchrow($result) ); 102 102 103 stdhead();103 stdhead($lang['new_comments']); 104 104 $template->set_filenames(array( 105 105 'body' => 'modtask_newcomments.html' include/sessions.php
r320 r324 531 531 $default_lang = $config['default_lang']; 532 532 $userdata['tzoffset'] = number_format($config['board_timezone']); 533 534 /* $dir = opendir($root_path . 'languages');535 $lang_files = array();536 while ( $file = readdir($dir) ) {537 if (preg_match('#^lang_#i', $file) && !is_file($dir . '/' . $file) && !is_link($dir . '/' . $file)) {538 $filename = trim(str_replace("lang_", "", $file));539 $filename = strtolower($filename);540 $lang_files[format_language($filename)] = $filename;541 }542 }543 544 if ( isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ) {545 $accept_lang_ary = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);546 foreach ($accept_lang_ary AS $accept_lang) {547 $accept_lang_short = substr($accept_lang, 0, 2);548 if ( array_key_exists($accept_lang_short, $lang_files) ) {549 $default_lang = $lang_files[$accept_lang_short];550 break;551 }552 else {553 $accept_lang_short = substr($accept_lang, 3, 2);554 if ( $accept_lang_short ) {555 if ( array_key_exists($accept_lang_short, $lang_files) ) {556 $default_lang = $lang_files[$accept_lang_short];557 break;558 }559 }560 }561 }562 }*/563 533 } 564 534 … … 599 569 } 600 570 601 //$config['default_lang'] = $default_lang;602 603 571 include($root_path . 'languages/lang_' . $default_lang . '/lang_main.php'); 604 572 include($root_path . 'languages/lang_' . $default_lang . '/lang_js.php'); 605 606 //$lang = array_merge($lang, $lang_js);607 573 608 574 if ( defined('IN_PHPBB') ) … … 1230 1196 } 1231 1197 1232 if ( ! $points || !sizeof($user_ary) ) {1198 if ( !sizeof($user_ary) ) { 1233 1199 return; 1234 1200 } … … 1236 1202 if ( !$state ) { 1237 1203 $points = -$points; 1204 } 1205 1206 $field = $add_sql = ''; 1207 switch( $type ) { 1208 case SIMPATY_TORRENT: 1209 $field = 'user_torrents_uploaded'; 1210 break; 1211 1212 case SIMPATY_REQUEST: 1213 $field = 'user_requests_created'; 1214 break; 1215 1216 case SIMPATY_OFFER: 1217 $field = 'user_offers_created'; 1218 break; 1219 1220 case SIMPATY_FILL_REQUEST: 1221 $field = 'user_requests_filled'; 1222 break; 1223 1224 case SIMPATY_FILL_OFFER: 1225 $field = 'user_offers_filled'; 1226 break; 1227 } 1228 1229 if ( $field ) { 1230 $add_sql = ', ' . $field . ' = ' . $field . ( $state ? ' + ' : ' - ') . 1; 1231 } 1232 1233 if ( !$points && !$add_sql ) { 1234 return; 1238 1235 } 1239 1236 … … 1272 1269 } 1273 1270 1274 $sql = 'UPDATE ' . USERS_TABLE . ' SET user_reputation = user_reputation + ' . $points . ', user_reputation_level = ' . $user_reputation_level . ', user_rank_id = ' . $user_rank_id . ' WHERE uid = ' . $ary['uid']; 1275 $db->sql_query($sql); 1276 } 1271 if ( $points || $add_sql ) { 1272 $sql = 'UPDATE ' . USERS_TABLE . ' SET user_reputation = user_reputation + ' . $points . ', user_reputation_level = ' . $user_reputation_level . ', user_rank_id = ' . $user_rank_id . $add_sql . ' WHERE uid = ' . $ary['uid']; 1273 $db->sql_query($sql); 1274 } 1275 } 1276 return; 1277 1277 } 1278 1278 … … 1470 1470 $messenger->template($email_template, $user_lang); 1471 1471 1472 $messenger->to($email , $email);1472 $messenger->to($email); 1473 1473 1474 1474 $messenger->assign_vars(array( include/ucp/checkcomm.php
r318 r324 218 218 if ( $comment_data ) { 219 219 $last_post_time = create_date($comment_data['added']); 220 221 // www.phpBB-SEO.com SEO TOOLKIT START 222 $seo->set_user_url($comment_data['name'], $comment_data['uid']); 223 // www.phpBB-SEO.com SEO TOOLKIT END 220 224 221 225 if ( $comment_data['uid'] <> ANONYMOUS ) { include/ucp/friends.php
r266 r324 54 54 ); 55 55 56 $sql = 'SELECT f.friendid AS id, u.uid AS user_id, u.name, u.class, u.avatar, u.title, u.user_session_time, u.gender, u.birthday56 $sql = 'SELECT f.friendid AS id, u.uid, u.name, u.class, u.avatar, u.title, u.user_session_time, u.gender, u.birthday, u.user_session_time, u.privacy, u.user_reputation_level, u.user_rank_id, u.name_append, u.user_reputation 57 57 FROM ' . FRIENDS_TABLE . ' f, ' . USERS_TABLE . ' u 58 58 WHERE userid=' . $userdata['uid'] . ' … … 63 63 $row = 0; 64 64 $col = 0; 65 $dt = time() - $config['online_time']; 65 66 66 67 if ( $friend = $db->sql_fetchrow($result) ) { … … 73 74 $title = ($friend['title'] ? $friend['title'] : get_user_class_name($friend['class']) ); 74 75 $title = str_replace("'", "\'", $title); 75 $avatar_prefix = ( ( strpos($friend['avatar'], 'user_avatar_' . $friend['id']) === false && strpos($friend['avatar'], '/') !== false ) || !$friend['avatar'] ? '' : generate_base_url() . '/' . $config['avatar_path'] . '/' ); 76 $avatar = ($userdata['avatars'] ? (!$friend['avatar']? $images['default_avatar'] : htmlspecialchars($friend['avatar']) ) : ''); 76 $avatar = get_user_avatar($friend['id'], $friend['avatar']); 77 77 $gender = ( !$friend['gender'] ?'<img src="' . $images['male'] . '" alt="' . $lang['gender_male'] . '" />':'<img src="' . $images['female'] . '" alt="' . $lang['gender_female'] . '" />'); 78 78 $age = get_age($friend['birthday']); 79 79 80 $template->assign_block_vars('friends_list_row.users_col', array( 80 'U_DELETE_FRIEND' => append_sid('my.php?type=friends&id=' . $friend['user_id'] . '&action=del_friend&fr_type=1&targetid=' . $friend['id']), 81 'U_USERDETAILS' => append_sid('userdetails.php?id=' . $friend['user_id']), 82 'U_SENDPM' => append_sid('message.php?action=send&receiver=' . $friend['user_id']), 83 'FRIEND_AVATAR'=> $avatar_prefix . $avatar, 81 'U_DELETE_FRIEND' => append_sid('my.php?type=friends&id=' . $friend['uid'] . '&action=del_friend&fr_type=1&targetid=' . $friend['id']), 82 'U_SENDPM' => append_sid('message.php?action=send&receiver=' . $friend['uid']), 83 'FRIEND_AVATAR'=> $avatar, 84 84 'FRIEND_ID' => $friend['id'], 85 'USER_ID' => $friend['user_id'], 86 'FRIEND_TITLE' => htmlspecialchars($title), 87 'FRIEND_USERNAME' => get_user_class_color($friend['class'], $friend['name']), 85 'USER_ID' => $friend['uid'], 86 'FRIEND_USERNAME' => parse_username($friend), 88 87 'FRIEND_LAST_ACCESS_DATE' => $last_access, 89 88 'FRIEND_LAST_ACCESS_AGO' => get_elapsed_time($friend['user_session_time']), 90 89 'FRIEND_GENDER' => htmlspecialchars($gender), 91 'FRIEND_AGE' => htmlspecialchars($age) 90 'FRIEND_AGE' => htmlspecialchars($age), 91 'ONLINE_PIC' => ($friend['user_session_time'] > $dt ? $images['online'] : $images['offline'] ), 92 'ONLINE_TEXT' => ($friend['user_session_time'] > $dt ? sprintf($lang['user_online'], $friend['name']) : sprintf($lang['user_offline'], $friend['name']) ) 92 93 )); 93 94 if ( $col == $users_split_row ) { include/ucp/get_userbar.php
r307 r324 3 3 $template->assign_vars(array( 4 4 'TRACKER_URL' => generate_base_url(), 5 'CURUSER_USERNAME' => urldecode($userdata['name']),5 'CURUSER_USERNAME' => rawurlencode($userdata['name']), 6 6 'L_LANGUAGE_CHARSET' => 'utf-8' 7 7 )); include/ucp/simpaty.php
r317 r324 16 16 $result = $db->sql_query_limit($sql, $limit, $offset); 17 17 18 $template->assign_vars(array(19 'PAGERBOTTOM' => $pagerbottom,20 ));21 18 $i = 0; 22 $page = request_var('page', 0); 23 $page = ( !$page ? ceil($count / $per_page) : $page ); 19 $page = request_var('page', 1); 24 20 25 21 while ( $row = $db->sql_fetchrow($result) ) { … … 38 34 } 39 35 36 // www.phpBB-SEO.com SEO TOOLKIT START 37 $seo->set_user_url($row['name'], $row['fromuserid']); 38 // www.phpBB-SEO.com SEO TOOLKIT END 39 40 40 $template->assign_block_vars('simpaty_row', array( 41 'U_USERDETAILS' => append_sid( 'userdetails.php?id=' . $row['fromuserid']),41 'U_USERDETAILS' => append_sid($root_path . 'userdetails.php?id=' . $row['fromuserid']), 42 42 'TOUSERID' => $row['touserid'], 43 43 'RESPECT_ID' => $row['id'], 44 'NUMBER' => $i + ( 50* ( $page - 1 ) ),44 'NUMBER' => $i + ( $per_page * ( $page - 1 ) ), 45 45 'TYPE' => $row['simpaty'], 46 46 'FROM_USERID' => $row['fromuserid'], … … 51 51 )); 52 52 } 53 54 $template->assign_vars(array( 55 'PAGERBOTTOM' => $pagerbottom, 56 )); 53 57 } 54 58 include/userdetails/view_snatched.php
r313 r324 77 77 array( 'uploaded_torrents_tpl' => 'userdetails_uploaded_torrents.html' 78 78 )); 79 $sql = 'SELECT t.fid, t.name, t.seeders, t.leechers, t.category, t.ctime, t.free, t.ratingsum, t.numratings,s.uploaded79 $sql = 'SELECT t.fid, t.name, t.seeders, t.leechers, t.category, t.ctime, t.free, s.uploaded 80 80 FROM ' . TORRENTS_TABLE . ' t LEFT JOIN ' . SNATCHED_TABLE . ' s ON ( t.fid = s.torrentid AND t.owner = s.userid ) 81 81 WHERE t.owner = ' . $id . ' js/ajax_common.js
r318 r324 50 50 } 51 51 52 function rating(torrent_id, rating) { 53 var req = new JsHttpRequest(); 54 req.onreadystatechange = function() { 55 if (req.readyState == 4) { 56 if (req.responseJS) { 57 document.getElementById('rating_button').disabled = true; 58 if (req.responseJS.rating_message) { 59 document.getElementById('rating_message').innerHTML = req.responseJS.rating_message; 60 } 61 alert(req.responseJS.text); 62 } 63 } 64 } 65 req.caching = false; 66 req.open('GET', TRACKER_URL + 'ajax.php?action=rating&sid=' + SID, true); 67 req.send({ id: torrent_id, rating: rating }); 52 function add_rating(torrent_id, rating) { 53 $.ajax({ 54 url: TRACKER_URL + 'ajax.php?action=rating', 55 type: "POST", 56 cache: true, 57 data: ({torrent_id: torrent_id, rating: rating, sid: SID}), 58 dataType: "json", 59 success: function(data){ 60 if ( data.error == false ) { 61 $('.current-rating').css('width', data.rating_pic_width + 'px'); 62 $('.current-rating').html(data.rating_title); 63 $('.star-rating').children('li').each(function (i) { 64 $(this).children('a[class*="star"]').remove(); 65 }); 66 } 67 if ( $('#rating-answer').length ) { 68 $('#rating-answer').html(data.msg); 69 } 70 else { 71 $('<div id="rating-answer">' + data.msg + '</div>').insertAfter('.star-rating'); 72 } 73 } 74 }); 68 75 } 69 76 … … 289 296 290 297 function update_tag (tag_name, tag_type, id, type) { 291 var req = new JsHttpRequest(); 292 req.onreadystatechange = function() { 293 if ( req.readyState == 4 ) { 294 if ( req.responseJS.tpl ) { 295 $('#details_tags').html(req.responseJS.tpl); 296 } 297 if ( req.responseJS.message ) { 298 alert(req.responseJS.message); 299 } 300 } 301 } 302 req.caching = false; 303 req.open('POST', TRACKER_URL + 'ajax.php?action=update_tag&sid=' + SID, true); 304 req.send({ tag_name: tag_name, tag_type: tag_type, id: id, type: type }); 298 $.ajax({ 299 url: TRACKER_URL + 'ajax.php?action=update_tag', 300 type: "POST", 301 cache: false, 302 data: ({tag_name: tag_name, tag_type: tag_type, id: id, type: type, sid: SID}), 303 dataType: "json", 304 success: function(data){ 305 if ( data.tpl ) { 306 $('#details_tags').html(data.tpl); 307 } 308 if ( data.message ) { 309 alert(data.message); 310 } 311 } 312 }); 305 313 } 306 314 js/chat.js
r320 r324 110 110 if ( windowFocus == false && new_msg ) { 111 111 document.title = L_JS_CHAT_NEW_MESSAGES; 112 play_sound('js/new_message.wav') 112 113 } 113 114 } … … 265 266 } 266 267 }); 268 } 269 270 function play_sound ( sound ) { 271 if ( $('#chat-sound').attr('id') != undefined ) { 272 $('#chat-sound').remove(); 273 } 274 $('<audio id="chat-sound" src="' + TRACKER_URL + sound + '" autoplay="true"></audio>').appendTo('body'); 267 275 } 268 276 languages/lang_english/email/admin_send_email.txt
r85 r324 1 2 The following is an email sent to you by an administrator of "{SITENAME}". If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address: 3 4 {BOARD_EMAIL} 5 6 Include this full email (particularly the headers). 7 8 Message sent to you follows: 9 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 The following is an email sent to you by an administrator of "{SITENAME}": 10 2 11 3 {MESSAGE} 4 5 {EMAIL_SIG} languages/lang_english/lang_admin.php
r303 r324 933 933 'add_upload_js_reason' => 'Please enter the reason for adding upload', 934 934 'add_upload_js_failed' => 'You haven\'t entered the reason', 935 936 'add_bonus' => 'Add bonus', 937 'add_bonus_explain' => 'Enter bonus points', 935 938 936 939 'gd_library_not_enabled' => 'GD library is not installed or enabled. Captcha function isn\'t working without enabled GD', … … 1126 1129 1127 1130 1128 'seo_settings' => '��� SEO',1131 'seo_settings' => '��������� SEO', 1129 1132 'seo_cache_file_title' => 'Cache file status', 1130 1133 'seo_cache_status' => 'The cache folder configured is : <b>%s</b>', languages/lang_english/lang_forum.php
r299 r324 42 42 'forum' => 'Forum', 43 43 'category' => 'Category', 44 'topic' => 'Topic',45 'topics' => 'Topics',46 'replies' => 'Replies',47 44 'views' => 'Views', 48 45 'post' => 'Post', languages/lang_english/lang_main.php
r318 r324 425 425 'succefully_uploaded_descr' => 'Now you can seed. <b>Attention</b> torrent will be invisible, until any seeders are avalaible!', 426 426 'succefully_edited' => 'Successfully edited!', 427 'rating_added' => 'Rating added!', 427 'rating_added' => 'Ваш рейтинг %d добавлен. Спасибо за голос. Всего добавлено %d голосов (для отображения нужно %d).', 428 'total_rating' => 'Текущий рейтинг - %d. Всего добавлено %d голосов (для отображения нужно %d)', 428 429 'thanks_added' => 'Thanks added!', 429 430 'owner_cant_thanks' => 'You can\'t Thank yourself for torrents', … … 436 437 'last_seeder' => 'Last seeder', 437 438 'last_activity' => 'Last activity %s ago', 438 'no_rating' => 'not yet (need %d votes, and now ',439 'voice' => 'only %d vote',440 'voices' => 'only %d votes',441 'no_voices' => 'no votes',442 'no_one_voices' => 'No votes',443 'total_rating' => '%s (%s of 5. Total votes %d users)',444 'ratings_ary' => array( 1=> 'Worst!', 2=> 'Bad', 3=> 'Normal', 4=> 'Good', 5=> 'Cool!'),445 'you_voted_for_this_torrent' => ' (you voted for this torrent "%d - %s")',446 'add_rating' => 'add rating',447 439 'views' => 'Views', 448 440 'hits' => 'Hits', … … 492 484 'are_you_sure' => 'Are you sure you want to delete this comment? Click <a href="%s">here</a> if you are.', 493 485 'orignal_content_of_comment' => 'Original content of comment #%d', 494 'download_warning' => 'Please say Thanks (button on the bottom of the upload) to the author, and rate it with builtin rate, respect and comment system.',495 486 'category_only_for_registered_users' => 'Viewing of this category is restricted to registred users.', 496 487 'download_as_gzip_archive' => 'Download as gzip archive', … … 731 722 'bonus' => 'Bonus', 732 723 'warnings' => 'Warnings', 733 'rating_descr' => 'Average torrent rating',734 724 'thanks_times' => 'Said Thanks %d times', 735 725 'respects' => 'Respects', … … 1255 1245 'top_ten_by_upspeed' => 'По скорости загрузки', 1256 1246 'top_ten_by_downspeed' => 'По скорости скачивания', 1247 'top_ten_by_popular_topics' => 'По популярным темам', 1248 'top_ten_by_reputation_posts' => 'По полезным сообщениям', 1249 'top_ten_forum' => 'Топ по форуму', 1257 1250 'show_by' => 'Выводить по', 1258 1251 'for' => 'за', … … 1303 1296 'view_only_new_checkcomm' => 'Смотреть только новые сообщения', 1304 1297 1298 'currents_stats' => 'Текущая статистика', 1299 'rep_comments_count' => 'Количество полезных комментариев', 1300 'uploaded_torrents_count' => 'Количество залитых раздач', 1301 'rep_posts_count' => 'Количество полезных сообщений на форуме', 1302 'req_and_off_count' => 'Количество выполненных запросов и предложений', 1303 'rating_for_torrents' => 'Средний рейтинг за раздачи', 1304 1305 'new_comments' => 'New comments', 1306 1307 'i_like_it' => 'Мне понравилось', 1308 'like_it' => 'Понравилось', 1309 'i_dislike_it' => 'Мне не понравилось', 1310 'dislike_it' => 'Не понравилось', 1311 'view_rating' => 'Посмотреть рейтинг', 1312 1313 'topics' => 'Topics', 1314 'topic' => 'Topic', 1315 'replies' => 'Replies', 1316 1305 1317 'translated_by' => 'Translation to english made by %s', 1306 1318 )); languages/lang_english/lang_modcomment_log.php
r307 r324 45 45 'modcomment_nickname_changed' => 'nickname changed from "%s" to "%s"', 46 46 47 'modcomment_add_bonus_text' => '%s - Добавлено %d бонуса пользователем \'%s\'', 48 47 49 )); 48 50 ?> languages/lang_russian/email/admin_send_email.txt
r221 r324 1 2 Это письмо отправлено вам администратором сайта "{SITENAME}". Если это сообщение является спамом, содержит оскорбления или прочие неприятные вам комментарии, пожалуйста свяжитесь с вебмастером по адресу: 3 4 {BOARD_EMAIL} 5 6 Включите данное сообщение целиком (особенно заголовки). 7 8 Отправленное вам сообщение: 9 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 Это письмо отправлено вам администратором сайта "{SITENAME}": 10 2 11 3 {MESSAGE} 4 5 {EMAIL_SIG} languages/lang_russian/lang_admin.php
r303 r324 914 914 'add_upload_js_reason' => 'Пожалуйста, введите причину, по которой вы начисляете аплоад', 915 915 'add_upload_js_failed' => 'Вы не ввели причину, по которой вы начисляете аплоад', 916 917 'add_bonus' => 'Добавить бонус', 918 'add_bonus_explain' => 'Введите количество очков бонуса для добавления', 916 919 917 920 'gd_library_not_enabled' => 'У вас не установлена или не подключена библиотека GD. Функции captcha не работаю без бибилиотеки GD', languages/lang_russian/lang_forum.php
r299 r324 47 47 'forum' => 'Форум', 48 48 'category' => 'Категория', 49 'topic' => 'Тема',50 'topics' => 'Темы',51 'replies' => 'Ответов',52 49 'views' => 'Просмотров', 53 50 'post' => 'Сообщение', // ??? languages/lang_russian/lang_main.php
r318 r324 138 138 'new_pms' => '(%d новых)', //т.е. например 5 новых (сообщений имеется ввиду) 139 139 'warns' => 'Предупреждения', 140 'browse' => 'Торренты', 140 'browse' => 'Скачать торренты', 141 'torrents' => 'Торренты', 141 142 'upload' => 'Загрузить', 142 143 'signup' => 'Регистрация', … … 255 256 'active_torrents' => 'Активные торренты', 256 257 'popular_torrents' => 'Популярные торренты', 257 'disclaimer' => 'Все используемые аудиовизуальные материалы, ссылки на которые размещены на сайте, являются собственностью их изготовителя (владельца прав) и охраняются Законом РФ "Об авторском праве и смежных правах", а также международными правовыми конвенциями.258 'disclaimer' => 'Все используемые аудиовизуальные материалы, ссылки на которые размещены на сайте, являются собственностью их изготовителя (владельца прав) и охраняются Законом РФ "Об авторском праве и смежных правах", а также международными правовыми конвенциями. 258 259 Вы можете использовать эти материалы только в том в случае, если использование производится с ознакомительными целями. Эти материалы предназначены только для ознакомления - для прочих целей Вы должны купить лицензионную запись. 259 Используемый формат кодирования аудиовизуальных материалов не может заменить качество оригинальных лицензионных записей. Eсли Вы оставляете у себя в каком-либо виде эти аудиовизуальные материалы, но не приобретаете соответствующую лицензионную запись - Вы нарушаете законы об Интеллектуальной собственности и Авторском праве, что может повлечь за собой преследование в соответствии с действующим законодательством. 260 Администрация этого сайта не несет никакой ответственности за действия пользователей.', 260 Администрация этого сайта не несет никакой ответственности за действия пользователей. 261 На сервере хранятся только <strong>торрент</strong> файлы. Это значит, что мы не храним никаких нелегальных материалов. 262 <strong>Торрент</strong> (BitTorrent) — пиринговый (от пользователя к пользователю) сетевой протокол для кооперативного обмена файлами через Интернет. 263 Файлы передаются частями, каждый <strong>торрент</strong>-клиент, получая эти части, в то же время отдаёт (закачивает) их другим клиентам и информация о передаче файлов недоступна на этом сайте.', 261 264 262 265 //постинг … … 432 435 'succefully_uploaded_descr' => 'Теперь вы можете сидировать. <b>Внимание</b> торрента не будет видно пока вы это не сделаете!', 433 436 'succefully_edited' => 'Успешно изменено!', 434 'rating_added' => 'Рейтинг добавлен!',435 437 'thanks_added' => 'Спасибо добавлено!', 438 'rating_added' => 'Ваш рейтинг %d добавлен. Спасибо за голос. Всего добавлено %d голосов (для отображения нужно %d).', 439 'total_rating' => 'Текущий рейтинг - %d. Всего добавлено %d голосов (для отображения нужно %d)', 436 440 'owner_cant_thanks' => 'Вы не можете ставить Спасибо на своем торренте', 437 441 'sos_sended' => 'Запрос о помощи послан!', … … 443 447 'last_seeder' => 'Посл. сидер', 444 448 'last_activity' => 'Посл. активность %s назад', 445 'no_rating' => 'еще нет (нужно минимум %d голосов, а сейчас ',446 'voice' => 'только %d голос',447 'voices' => 'только %d голоса',448 'no_voices' => 'ни одного',449 'no_one_voices' => 'Еще нет голосов',450 'total_rating' => '%s (%s из 5. Всего проголосовало %d человек)',451 'ratings_ary' => array( 1 => 'Отстой!', 2 => 'Фигово', 3 => 'Нормально', 4 => 'Хорошо', 5 => 'Круто!'),452 'you_voted_for_this_torrent' => ' (вы голосовали за этот торрент как "%d - %s")',453 'add_rating' => 'добавить рейтинг',454 449 'views' => 'Просмотров', 455 450 'hits' => 'Хитов', … … 738 733 'bonus' => 'Бонус', 739 734 'warnings' => 'Предупреждения', 740 'rating_descr' => 'Средний рейтинг за торренты',741 'thanks_times' => 'Сказали спасибо %d раз',742 735 'respects' => 'Респекты', 743 736 'avatar' => 'Аватар', … … 1277 1270 'top_ten_by_upspeed' => 'По скорости загрузки', 1278 1271 'top_ten_by_downspeed' => 'По скорости скачивания', 1272 'top_ten_by_popular_topics' => 'По популярным темам', 1273 'top_ten_by_reputation_posts' => 'По полезным сообщениям', 1274 'top_ten_forum' => 'Топ по форуму', 1279 1275 'show_by' => 'Выводить по', 1280 1276 'for' => 'за', … … 1325 1321 'view_only_new_checkcomm' => 'Смотреть только новые сообщения', 1326 1322 1323 'current_stats' => 'Текущая статистика', 1324 'rep_comments_count' => 'Количество полезных комментариев', 1325 'uploaded_torrents_count' => 'Количество залитых раздач', 1326 'rep_posts_count' => 'Количество полезных сообщений на форуме', 1327 'req_and_off_count' => 'Количество выполненных запросов и предложений', 1328 'rating_for_torrents' => 'Средний рейтинг за раздачи', 1329 1330 'new_comments' => 'Новые комментарии', 1331 1332 'topics' => 'Темы', 1333 'topic' => 'Тема', 1334 'replies' => 'Ответов', 1335 1327 1336 'translated_by' => 'На русский язык перевел %s', 1328 1337 )); languages/lang_russian/lang_modcomment_log.php
r307 r324 45 45 'modcomment_nickname_changed' => 'изменен ник с "%s" на "%s"', 46 46 47 'modcomment_add_bonus_text' => '%s - Добавлено %d бонуса пользователем \'%s\'', 48 47 49 )); 48 50 ?> phpBB2/groupcp.php
r307 r324 877 877 $template->assign_vars(array( 878 878 //'PAGINATION' => generate_pagination("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id", $members_count, $config['topics_per_page'], $start), 879 'PAGINATION' => generate_pagination( "phpbb2.php?page=groupcp&" . POST_GROUPS_URL . "=$group_id", $members_count, $config['topics_per_page'], $start),879 'PAGINATION' => generate_pagination($root_path . "phpbb2.php?page=groupcp&" . POST_GROUPS_URL . "=$group_id", $members_count, $config['topics_per_page'], $start), 880 880 'PAGE_NUMBER' => sprintf($lang['page_of'], ( floor( $start / $config['topics_per_page'] ) + 1 ), $current_page )) 881 881 ); phpBB2/includes/functions.php
r313 r324 265 265 for($i = 1; $i < $init_page_max + 1; $i++) 266 266 { 267 $page_string .= ( $i == $on_page ) ? $i : '<a href="' . append_sid($ root_path . $base_url . "&start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>';267 $page_string .= ( $i == $on_page ) ? $i : '<a href="' . append_sid($base_url . "&start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>'; 268 268 if ( $i < $init_page_max ) 269 269 { … … 283 283 for($i = $init_page_min - 1; $i < $init_page_max + 2; $i++) 284 284 { 285 $page_string .= ($i == $on_page) ? $i : '<a href="' . append_sid($ root_path . $base_url . "&start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>';285 $page_string .= ($i == $on_page) ? $i : '<a href="' . append_sid($base_url . "&start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>'; 286 286 if ( $i < $init_page_max + 1 ) 287 287 { … … 299 299 for($i = $total_pages - 2; $i < $total_pages + 1; $i++) 300 300 { 301 $page_string .= ( $i == $on_page ) ? $i : '<a href="' . append_sid($ root_path . $base_url . "&start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>';301 $page_string .= ( $i == $on_page ) ? $i : '<a href="' . append_sid($base_url . "&start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>'; 302 302 if( $i < $total_pages ) 303 303 { … … 311 311 for($i = 1; $i < $total_pages + 1; $i++) 312 312 { 313 $page_string .= ( $i == $on_page ) ? $i : '<a href="' . append_sid($ root_path . $base_url . "&start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>';313 $page_string .= ( $i == $on_page ) ? $i : '<a href="' . append_sid($base_url . "&start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>'; 314 314 if ( $i < $total_pages ) 315 315 { … … 323 323 if ( $on_page > 1 ) 324 324 { 325 $page_string = ' <a href="' . append_sid($ root_path . $base_url . "&start=" . ( ( $on_page - 2 ) * $per_page ) ) . '">' . $lang['previous'] . '</a> ' . $page_string;325 $page_string = ' <a href="' . append_sid($base_url . "&start=" . ( ( $on_page - 2 ) * $per_page ) ) . '">' . $lang['previous'] . '</a> ' . $page_string; 326 326 } 327 327 328 328 if ( $on_page < $total_pages ) 329 329 { 330 $page_string .= ' <a href="' . append_sid($ root_path . $base_url . "&start=" . ( $on_page * $per_page ) ) . '">' . $lang['next'] . '</a>';330 $page_string .= ' <a href="' . append_sid($base_url . "&start=" . ( $on_page * $per_page ) ) . '">' . $lang['next'] . '</a>'; 331 331 } 332 332 phpBB2/modcp.php
r316 r324 1486 1486 $template->assign_vars(array( 1487 1487 //'PAGINATION' => generate_pagination("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'], $forum_topics, $config['topics_per_page'], $start), 1488 'PAGINATION' => generate_pagination( "phpbb2.php?page=modcp&" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'], $forum_topics, $config['topics_per_page'], $start),1488 'PAGINATION' => generate_pagination($root_path . "phpbb2.php?page=modcp&" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'], $forum_topics, $config['topics_per_page'], $start), 1489 1489 'PAGE_NUMBER' => sprintf($lang['page_of'], ( floor( $start / $config['topics_per_page'] ) + 1 ), ceil( $forum_topics / $config['topics_per_page'] )), 1490 1490 'L_GOTO_PAGE' => $lang['goto_page']) phpBB2/posting.php
r316 r324 754 754 } 755 755 756 $preview_message = str_replace("\n", '<br />', $preview_message);756 //$preview_message = str_replace("\n", '<br />', $preview_message); 757 757 758 758 $template->set_filenames(array( phpBB2/search.php
r317 r324 66 66 67 67 $sort_dir = request_var('sort_dir', ''); 68 $sort_dir = ( $sort_dir == ' DESC' ? 'desc' : 'asc' );68 $sort_dir = ( $sort_dir == 'ASC' ? 'ASC' : 'DESC' ); 69 69 70 70 $search_time = request_var('search_time', 0); … … 1309 1309 1310 1310 $template->assign_vars(array( 1311 'PAGINATION' => generate_pagination($ base_url, $total_match_count, $per_page, $start),1311 'PAGINATION' => generate_pagination($root_path . $base_url, $total_match_count, $per_page, $start), 1312 1312 'PAGE_NUMBER' => sprintf($lang['page_of'], ( floor( $start / $per_page ) + 1 ), ceil( $total_match_count / $per_page )), 1313 1314 'L_LAST_POST' => $lang['last_post'], 1315 // Topic search MOD 1316 'L_JUMP_TO_POST' => $lang['jump_to_post'], 1317 // End Topic search MOD 1318 1319 'L_GOTO_PAGE' => $lang['goto_page']) 1320 ); 1313 )); 1321 1314 return; 1322 1315 } … … 1437 1430 1438 1431 $template->assign_vars(array( 1439 'L_SEARCH_QUERY' => $lang['search_query'],1440 'L_SEARCH_OPTIONS' => $lang['search_options'],1441 'L_SEARCH_KEYWORDS' => $lang['search_keywords'],1442 'L_SEARCH_KEYWORDS_EXPLAIN' => $lang['search_keywords_explain'],1443 'L_SEARCH_AUTHOR' => $lang['search_author'],1444 'L_SEARCH_AUTHOR_EXPLAIN' => $lang['search_author_explain'],1445 1432 'L_SEARCH_ANY_TERMS' => $lang['search_for_any'], 1446 1433 'L_SEARCH_ALL_TERMS' => $lang['search_for_all'], 1447 1434 'L_SEARCH_MESSAGE_ONLY' => $lang['search_msg_only'], 1448 1435 'L_SEARCH_MESSAGE_TITLE' => $lang['search_title_msg'], 1449 'L_CATEGORY' => $lang['category'],1450 'L_RETURN_FIRST' => $lang['return_first'],1451 1436 'L_CHARACTERS' => $lang['characters_posts'], 1452 'L_SORT_BY' => $lang['sort_by'],1453 'L_SORT_ASCENDING' => $lang['sort_ascending'],1454 'L_SORT_DESCENDING' => $lang['sort_descending'],1455 'L_SEARCH_PREVIOUS' => $lang['search_previous'],1456 'L_DISPLAY_RESULTS' => $lang['display_results'],1457 'L_FORUM' => $lang['forum'],1458 'L_TOPICS' => $lang['topics'],1459 'L_POSTS' => $lang['posts'],1460 1437 1461 1438 //'S_SEARCH_ACTION' => append_sid("search.$phpEx?mode=results"), phpBB2/viewforum.php
r313 r324 593 593 594 594 $template->assign_vars(array( 595 'PAGINATION' => generate_pagination( "phpbb2.php?page=viewforum&" . POST_FORUM_URL . "=$forum_id&topicdays=$topic_days", $topics_count, $config['topics_per_page'], $start),595 'PAGINATION' => generate_pagination($root_path . "phpbb2.php?page=viewforum&" . POST_FORUM_URL . "=$forum_id&topicdays=$topic_days", $topics_count, $config['topics_per_page'], $start), 596 596 'PAGE_NUMBER' => sprintf($lang['page_of'], ( floor( $start / $config['topics_per_page'] ) + 1 ), ceil( $topics_count / $config['topics_per_page'] )), 597 597 )); … … 771 771 $userdata['user_lastmark'] = (isset($tracking_topics['l'])) ? (int) (base_convert($tracking_topics['l'], 36, 10) + $config['onlinesince']) : 0; 772 772 } 773 $forum_tracking_info[$subforum_id] = (isset($tracking_topics['f'][$subforum_id])) ? (int) (base_convert($tracking_topics['f'][$ forum_id], 36, 10) + $config['onlinesince']) : $userdata['user_lastmark'];773 $forum_tracking_info[$subforum_id] = (isset($tracking_topics['f'][$subforum_id])) ? (int) (base_convert($tracking_topics['f'][$subforum_id], 36, 10) + $config['onlinesince']) : $userdata['user_lastmark']; 774 774 } 775 775 phpBB2/viewtopic.php
r318 r324 93 93 if ( $view == 'newest' ) 94 94 { 95 $sql = 'SELECT forum_id FROM ' . TOPICS_TABLE . ' WHERE topic_id = ' . $topic_id; 96 $result = $db->sql_query($sql); 97 if ( !$row = $db->sql_fetchrow($result) ) { 98 trigger_error('topic_post_not_exist'); 99 } 95 100 // Get topic tracking info 96 $topic_tracking_info = get_complete_topic_tracking($ forum_id, $topic_id);101 $topic_tracking_info = get_complete_topic_tracking($row['forum_id'], $topic_id); 97 102 98 103 $topic_last_read = (isset($topic_tracking_info[$topic_id])) ? $topic_tracking_info[$topic_id] : $userdata['session_time']; … … 752 757 } 753 758 754 $pagination = generate_pagination( "phpbb2.php?page=viewtopic&" . POST_TOPIC_URL . "=$topic_id&" . $pagination_printertopic . "postdays=$postdays&postorder=$postorder&" . $pagination_highlight . $pagination_finish_rel, $total_replies, $pagination_ppp, $start);759 $pagination = generate_pagination($root_path . "phpbb2.php?page=viewtopic&" . POST_TOPIC_URL . "=$topic_id&" . $pagination_printertopic . "postdays=$postdays&postorder=$postorder&" . $pagination_highlight . $pagination_finish_rel, $total_replies, $pagination_ppp, $start); 755 760 if($pagination != '' && $pagination_printertopic) { 756 761 $pagination .= " <a href=\"" . append_sid($root_path . "phpbb2.php?page=viewtopic&" . POST_TOPIC_URL . "=$topic_id&" . $pagination_printertopic . "postdays=$postdays&postorder=$postorder&". $pagination_highlight. "start=0&finish_rel=-10000") . "\" title=\"" . $lang['printertopic_cancel_pagination_desc'] . "\">" . $lang['printertopic_all_pages'] . "</a>"; rss.php
r316 r324 23 23 } 24 24 } 25 if( !empty($message)) {25 if( $message ) { 26 26 header ('Content-Type: text/plain'); 27 echo $message;27 echo $message; 28 28 } 29 29 gc(); … … 192 192 $template->display('rss_tpl'); 193 193 194 if (!empty($cache)) { 195 $cache->unload(); 196 } 197 if (!empty($db)) { 198 $db->sql_close(); 199 } 194 gc(); 200 195 } 201 196 ?> templates/admin/admin_voting_body.tpl
r83 r324 1 <script type="text/javascript"> 2 Object.size = function(obj) { 3 var size = 0, key; 4 for (key in obj) { 5 if (obj.hasOwnProperty(key)) size++; 6 } 7 return size; 8 }; 9 function show_poll_results ( poll_id ) { 10 $.ajax({ 11 url: TRACKER_URL + 'admin/admin_voting.php?mode=show_poll_results', 12 type: 'POST', 13 cache: true, 14 data: ({sid: SID, poll_id: poll_id, no_page_header: 1}), 15 dataType: 'json', 16 success: function(data){ 17 var results = data.results; 18 var html = ''; 19 if ( Object.size(results) ) { 20 $('#poll_answers_' + poll_id).toggle(); 21 22 html += '<table border="0" width="100%">'; 23 var i = 0; 24 var row; 25 for ( var key in results ) { 26 row = ( i % 2 ) ? 'row1' : 'row3'; 27 html += '<tr><td class="'+row+'" width="250">' + key +' (' + results[key][0].result + ')</td><td class="'+row+'">' + results[key][0].users + '</td></tr>'; 28 29 ++i; 30 } 31 32 html += '</table>'; 33 } 34 $('#poll_answers_' + poll_id).html(html); 35 } 36 }); 37 } 38 </script> 39 1 40 <h1>{L_ADMIN_VOTE_TITLE}</h1> 2 41 <p>{L_ADMIN_VOTE_EXPLAIN}</p> 3 42 <!-- BEGIN viewresult --> 4 43 <a href="{S_CREATE_POLL_LINK}"><h2 align="center">{L_CREATE_NEW_POLL}</h2></a> 5 <script type="text/javascript">6 function show_hide(id) {7 var show_hide_text = document.getElementById('k' + id);8 var show_hide_pic = document.getElementById('pic' + id);9 10 if (show_hide_text.style.display == 'none') {11 show_hide_text.style.display = 'block';12 show_hide_pic.src = '../pic/minus.gif';13 }14 else {15 show_hide_text.style.display = 'none';16 show_hide_pic.src = '../pic/plus.gif';17 }18 }19 </script>20 44 <form method="post" name="vote_list" action="{S_MODE_ACTION}"> 21 45 <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> … … 39 63 <td class="{viewresult.votes.COLOR}" align="center"><span class="gensmall">{viewresult.votes.VOTE_ID}</span></td> 40 64 <td class="{viewresult.votes.COLOR}"><span class="genmed"> 41 <a href="javascript: void(0);" onclick="javascript: show_hide('a{viewresult.votes.VOTE_ID}')"><img src="../pic/plus.gif" id="pica{viewresult.votes.VOTE_ID}" alt="{L_SHOW_HIDE}" /></a>65 <a href="javascript:;" onclick="show_poll_results({viewresult.votes.VOTE_ID})"><img src="../pic/plus.gif" id="pica{viewresult.votes.VOTE_ID}" alt="{L_SHOW_HIDE}" /></a> 42 66 <!-- IF viewresult.votes.LINK --><a href="{viewresult.votes.LINK}"><!-- ENDIF -->{viewresult.votes.DESCRIPTION}<!-- IF viewresult.votes.LINK --></a><!-- ENDIF --></span><br /> 43 67 </td> … … 48 72 <tr> 49 73 <td class="row2" colspan="6"> 50 <div id="ka{viewresult.votes.VOTE_ID}" style="display:none;"> 51 <table cellpadding="5" cellspacing="1" border="0"> 52 <!-- BEGIN detail --> 53 <tr> 54 <td class="row1">{viewresult.votes.detail.OPTION} ({viewresult.votes.detail.RESULT})</td> 55 <td class="row3"><!-- IF viewresult.votes.detail.USER --><span class="gensmall">{viewresult.votes.detail.USER}</span><!-- ENDIF --></td> 56 </tr> 57 <!-- END detail --> 58 </table> 59 </div> 74 <div id="poll_answers_{viewresult.votes.VOTE_ID}" style="display:none;"></div> 60 75 </td> 61 76 </tr> templates/admin/user_edit_body.tpl
r316 r324 282 282 </tr> 283 283 <tr> 284 <td class="row1"><span class="gen">{L_ADD_BONUS}</span><br />{L_ADD_BONUS_EXPLAIN}</td> 285 <td class="row2"> 286 <input type="text" name="bonus" value="" maxlength="30" /> {BONUS} 287 </tr> 288 <tr> 284 289 <td class="row1"><span class="gen">{L_TITLE}</span></td> 285 290 <td class="row2"> templates/bithdtv/bithdtv.cfg
r280 r324 158 158 159 159 $images['printer'] = "$current_template_images/printer.gif"; 160 161 $config['rating_pic_width'] = 20; 160 162 ?> templates/bithdtv/bithdtv.css
r318 r324 1030 1030 text-decoration:underline; 1031 1031 } 1032 .zip-icon { 1033 background: url(images/torrent_icons.png) no-repeat scroll 0 -32px; 1034 } 1035 .magnet-icon { 1036 background: url(images/torrent_icons.png) no-repeat scroll 0 0; 1037 } 1038 .icon-32 { 1039 width:32px; 1040 height:32px; 1041 } 1042 /* styles for the star rater */ 1043 .star-rating{ 1044 list-style:none; 1045 margin: 5px 10px 5px 0; 1046 padding:0px; 1047 width: 100px; 1048 height: 20px; 1049 position: relative; 1050 overflow:hidden; 1051 background: url(images/ratings.png) top left repeat-x; 1052 float:left; 1053 } 1054 .star-rating li{ 1055 padding:0px; 1056 margin:0px; 1057 width:20px; 1058 height:20px; 1059 float: left; 1060 } 1061 .star-rating li a{ 1062 display:block; 1063 width:20px; 1064 height: 20px; 1065 line-height:20px; 1066 text-decoration: none; 1067 text-indent: -9000px; 1068 z-index: 20; 1069 position: absolute; 1070 padding: 0px; 1071 overflow:hidden; 1072 } 1073 .star-rating li a:hover{ 1074 background: url(images/ratings.png) left bottom; 1075 z-index: 2; 1076 left: 0px; 1077 border:none; 1078 } 1079 .star-rating a.one-star{ 1080 left: 0px; 1081 } 1082 .star-rating a.one-star:hover{ 1083 width:20px; 1084 } 1085 .star-rating a.two-stars{ 1086 left:20px; 1087 } 1088 .star-rating a.two-stars:hover{ 1089 width: 40px; 1090 } 1091 .star-rating a.three-stars{ 1092 left: 40px; 1093 } 1094 .star-rating a.three-stars:hover{ 1095 width: 60px; 1096 } 1097 .star-rating a.four-stars{ 1098 left: 60px; 1099 } 1100 .star-rating a.four-stars:hover{ 1101 width: 80px; 1102 } 1103 .star-rating a.five-stars{ 1104 left: 80px; 1105 } 1106 .star-rating a.five-stars:hover{ 1107 width: 100px; 1108 } 1109 .star-rating li.current-rating{ 1110 background: url(images/ratings.png) left center; 1111 position: absolute; 1112 height: 20px; 1113 display: block; 1114 text-indent: -9000px; 1115 z-index: 1; 1116 } 1117 1118 .all-ratings { 1119 width: 100px; 1120 height: 20px; 1121 overflow:hidden; 1122 background: url(images/ratings.png) top left repeat-x; 1123 text-align:left; 1124 display:inline-block; 1125 } 1126 .all-ratings span { 1127 background: url(images/ratings.png) left center; 1128 height: 20px; 1129 display:inline-block; 1130 text-indent: -9000px; 1131 z-index: 1; 1132 } 1133 #rating-answer { 1134 display:inline-block; 1135 position:relative; 1136 top:10px; 1137 } templates/bithdtv/browse.html
r313 r324 31 31 <tr> 32 32 <td> 33 <!-- BEGIN tags_ cloud-->33 <!-- BEGIN tags_row --> 34 34 35 <a href="{tags_ cloud.U_TAG}" style="font-size:{tags_cloud.TAG_SIZE}px;">{tags_cloud.TAG_NAME}</a>35 <a href="{tags_row.U_TAG}" style="font-size:{tags_row.TAG_SIZE}px;">{tags_row.TAG_NAME}</a> 36 36 37 <!-- END tags_ cloud-->37 <!-- END tags_row --> 38 38 39 39 </td> templates/bithdtv/details.html
r316 r324 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> 13 12 <td class="detail" valign="top" align="left"><a href="{U_DOWNLOAD}"><img src="{TEMPLATE_PATH}/images/arrowdown.gif" border="0" alt="{L_DOWNLOAD}" title="{L_DOWNLOAD}" /> {TORRENT_FILENAME}</a> 13 14 <!-- IF U_DOWNLOAD_AS_GZIP --> 15 16 <a href="{U_DOWNLOAD_AS_GZIP}"><img src="{ROOT_PATH}pic/blank.gif" class="zip-icon icon-32" /></a> 17 18 <!-- ENDIF --> 19 20 <a href="{U_MAGNET}"><img src="{ROOT_PATH}pic/blank.gif" class="magnet-icon icon-32" /></a> 21 14 22 <!-- IF S_USER_LOGGED_IN --> 15 23 … … 56 64 <td class="detail" valign="top" align="left">{SIZE}</td> 57 65 </tr> 58 <tr> 59 <td class="detail" valign="top" align="right">{L_RATING}</td> 60 <td class="detail" valign="top" align="left"><span id="rating_message">{RATING} 61 <!-- BEGIN switch_rating_form --> 62 <select name="rating" id="rating_select"> 63 <option value="0">({L_ADD_RATING})</option> 64 {switch_rating_form.RATING_OPTIONS} 65 </select> 66 <input type="button" value="{L_VOTE}!" onclick="rating('{ID}', document.getElementById('rating_select').value );return false;" id="rating_button" /> 67 <!-- END switch_rating_form --></span> 68 </td> 69 </tr> 66 <tr> 67 <td class="detail" valign="top" align="right">{L_RATING}</td> 68 <td class="detail"> 69 <ul class="star-rating"> 70 <li class="current-rating" style="width:{RATING_PIC_WIDTH}px">{RATING}</li> 71 <!-- IF not RATING_VOTED --> 72 <li><a href="javascript:;" onclick="add_rating({ID}, 1)" title="{L_RATING} 1 / 5" class="one-star">1</a></li> 73 <li><a href="javascript:;" onclick="add_rating({ID}, 2)" title="{L_RATING} 2 / 5" class="two-stars">2</a></li> 74 <li><a href="javascript:;" onclick="add_rating({ID}, 3)" title="{L_RATING} 3 / 5" class="three-stars">3</a></li> 75 <li><a href="javascript:;" onclick="add_rating({ID}, 4)" title="{L_RATING} 4 / 5" class="four-stars">4</a></li> 76 <li><a href="javascript:;" onclick="add_rating({ID}, 5)" title="{L_RATING} 5 / 5" class="five-stars">5</a></li> 77 <!-- ENDIF --> 78 </ul> 79 </td> 80 </tr> 70 81 <tr> 71 82 <td class="detail" valign="top" align="right">{L_ADDED}</td> … … 130 141 <!-- END switch_sos_section --> 131 142 132 <tr>133 <td class="detail" valign="top" align="right">{L_THANKS_USERS}</td>134 <td class="detail" valign="top" align="left"><input type="button" id="thanks_button" value="{L_THANKS}" onclick="thanks('{ID}', 0);return false;" />135 <a href="javascript:;" onclick="view_details_ext('thanks', '{ID}', 'details');" id="thanks_href">[{L_SEE_FULL_LIST}]</a><div id="thanks_row"></div></td>136 </tr>137 138 143 </table> 139 144 templates/bithdtv/details_edit.html
r311 r324 33 33 <tr> 34 34 <td><label for="hidden">{L_HIDDEN}</label></td> 35 <td><input type="checkbox" name="hidden" id="hidden" {switch_hidden.HIDDEN_CHECKED} /></td>35 <td><input type="checkbox" name="hidden" id="hidden" {switch_hidden.HIDDEN_CHECKED} value="1" /></td> 36 36 </tr> 37 37 <!-- END switch_hidden --> templates/bithdtv/overall_header.html
r313 r324 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 2 <html> 3 3 <head> … … 90 90 <table cellpadding="4" cellspacing="1" border="0" width="852"> 91 91 <tr> 92 <td >92 <td align="left"> 93 93 {CURRENT_USER_NAME}<!-- IF CURRENT_USER_RANK_NAME --> [{CURRENT_USER_RANK_NAME}]<!-- ENDIF -->, {L_REPUTATION}: {CURRENT_USER_POINTS} 94 94 [<a href="{U_LOGOUT}">{L_LOGOUT}</a>]<br /> templates/bithdtv/tags_view_form.html
r313 r324 8 8 <span id="tag_{tags_row.TAG_NUM}"> 9 9 10 <!-- IF S_USER_LOGGED_IN -->10 <!-- IF S_USER_LOGGED_IN && ALLOW_ADD_TAGS --> 11 11 12 12 [<a href="javascript:;" onclick="update_tag('{tags_row.ENC_TAG_NAME}', '{TAG_TYPE}', '{ID}', 'down')">-</a>] … … 16 16 <a href="{tags_row.U_TAG}" style="font-size:{tags_row.TAG_SIZE}px;font-weight:bold;">{tags_row.TAG_NAME}</a> 17 17 18 <!-- IF S_USER_LOGGED_IN -->18 <!-- IF S_USER_LOGGED_IN && ALLOW_ADD_TAGS --> 19 19 20 20 [<a href="javascript:;" onclick="update_tag('{tags_row.ENC_TAG_NAME}', '{TAG_TYPE}', '{ID}', 'up')">+</a>] templates/bithdtv/top_peers_body.html
r299 r324 16 16 17 17 <tr<!-- IF peers_table.HIGHLIGHT --> class="row2"<!-- ENDIF -->> 18 <td><a href="{peers_table.U_USERDETAILS}">{peers_table.USERNAME}</a></td> 19 <td><a href="{peers_table.U_DETAILS}">{peers_table.DISPNAME}</a></td> 20 <td>{peers_table.UPSPEED}</td> 21 <td>{peers_table.DOWNSPEED}</td> 22 18 <td class="detail"><a href="{peers_table.U_USERDETAILS}">{peers_table.USERNAME}</a></td> 19 <td class="detail"><a href="{peers_table.U_DETAILS}">{peers_table.DISPNAME}</a></td> 20 <td class="detail">{peers_table.UPSPEED}</td> 21 <td class="detail">{peers_table.DOWNSPEED}</td> 23 22 </tr> 24 23 templates/bithdtv/top_ten_body.html
r299 r324 3 3 <!-- BEGIN topten_row --> 4 4 5 <div style="float:left; width:33%;"><h1>{topten_row.TITLE}</h1>5 <div style="float:left;margin-right:10px;"><h1>{topten_row.TITLE}</h1> 6 6 7 7 <ul style="list-style:none"> templates/bithdtv/top_users_body.html
r299 r324 18 18 19 19 <tr<!-- IF users_table.HIGHLIGHT --> class="row2"<!-- ENDIF -->> 20 <td ><a href="{users_table.U_USERDETAILS}">{users_table.USERNAME}</a></td>21 <td >{users_table.UPLOADED}</td>22 <td >{users_table.DOWNLOADED}</td>23 <td >{users_table.RATIO}</td>24 <td >{users_table.TOTAL_SEED_TIME}</td>25 <td >{users_table.REPUTATION}</td>20 <td class="detail"><a href="{users_table.U_USERDETAILS}">{users_table.USERNAME}</a></td> 21 <td class="detail">{users_table.UPLOADED}</td> 22 <td class="detail">{users_table.DOWNLOADED}</td> 23 <td class="detail">{users_table.RATIO}</td> 24 <td class="detail">{users_table.TOTAL_SEED_TIME}</td> 25 <td class="detail">{users_table.REPUTATION}</td> 26 26 27 27 </tr> templates/bithdtv/ucp_friends_body.html
r308 r324 7 7 </tr> 8 8 <!-- BEGIN friends_list_row --> 9 <tr valign=" bottom">9 <tr valign="top"> 10 10 <!-- BEGIN users_col --> 11 <td align="center" width="140" class="detail"> 12 <img src="{friends_list_row.users_col.FRIEND_AVATAR}" alt="" onmouseover="return overlib('{friends_list_row.users_col.FRIEND_TITLE}<br /> {L_LAST_ACCESS}: {friends_list_row.users_col.FRIEND_LAST_ACCESS_DATE} ({friends_list_row.users_col.FRIEND_LAST_ACCESS_AGO})<br />{L_GENDER}: {friends_list_row.users_col.FRIEND_GENDER}<br />{L_AGE}: {friends_list_row.users_col.FRIEND_AGE}');" onmouseout="return nd();" /><br /> 13 <a href="{friends_list_row.users_col.U_DELETE_FRIEND}"><img src="{ROOT_PATH}pic/warned2.gif" alt="" /></a> <a href="{friends_list_row.users_col.U_USERDETAILS}">{friends_list_row.users_col.FRIEND_USERNAME}</a> <a href="{friends_list_row.users_col.U_SENDPM}"><img src="{IMG_PM_BUTTON}" alt="" /></a> 11 <td align="center" width="100" class="detail"> 12 {friends_list_row.users_col.FRIEND_USERNAME} 13 <img src="{friends_list_row.users_col.FRIEND_AVATAR}" alt="" onmouseover="return overlib('{L_LAST_ACCESS}: {friends_list_row.users_col.FRIEND_LAST_ACCESS_DATE} ({friends_list_row.users_col.FRIEND_LAST_ACCESS_AGO})<br />{L_GENDER}: {friends_list_row.users_col.FRIEND_GENDER}<br />{L_AGE}: {friends_list_row.users_col.FRIEND_AGE}');" onmouseout="return nd();" /><br /> 14 </td> 15 <td> 16 <br /> 17 <a href="{friends_list_row.users_col.U_DELETE_FRIEND}"><img src="{ROOT_PATH}pic/warned2.gif" alt="" /></a><br /><br /> 18 <a href="{friends_list_row.users_col.U_SENDPM}"><img src="{IMG_PM_BUTTON}" alt="" /></a><br /><br /> 19 <img src="{friends_list_row.users_col.ONLINE_PIC}" alt="{friends_list_row.users_col.ONLINE_TEXT}" title="{friends_list_row.users_col.ONLINE_TEXT}" /> 14 20 </td> 15 21 <!-- END users_col --> templates/bithdtv/userdetails.html
r308 r324 33 33 <!-- IF WARN_PANEL --> 34 34 <br><hr><b>{L_WARNINGS}:</b> {WARN_PANEL} 35 <!-- ENDIF -->36 <!-- IF CLIENT -->37 <br><hr><b>{L_CLIENT}:</b> {CLIENT}<!-- IF CONNECTABLE_PORT --> <b>{L_PORT}:</b> {CONNECTABLE_PORT}<!-- ENDIF -->38 <!-- ENDIF -->39 <!-- IF RATING -->40 <br><hr><b>{L_RATING}:</b> {L_RATING_DESCR} {RATING}41 <!-- ENDIF -->42 <!-- IF THANKS -->43 <br><hr><b>{L_THANKS}:</b> {THANKS}44 35 <!-- ENDIF --> 45 36 … … 123 114 124 115 <!-- INCLUDE overall_footer.html --> 125 templates/main/browse.html
r313 r324 41 41 <fieldset id="tag_cloud"> 42 42 43 <!-- BEGIN tags_ cloud-->43 <!-- BEGIN tags_row --> 44 44 45 <a href="{tags_ cloud.U_TAG}" style="font-size:{tags_cloud.TAG_SIZE}px;">{tags_cloud.TAG_NAME}</a>45 <a href="{tags_row.U_TAG}" style="font-size:{tags_row.TAG_SIZE}px;">{tags_row.TAG_NAME}</a> 46 46 47 <!-- END tags_ cloud-->47 <!-- END tags_row --> 48 48 49 49 templates/main/comments_table.html
r313 r324 88 88 <!-- IF S_USER_IS_MOD && S_C_FORM_ACTION --> 89 89 90 <p align="right" style="width:80%">90 <p align="right"> 91 91 <a href="javascript:;" onclick="check(document.comments_form.elements);">{L_SELECT_ALL}</a> 92 92 <br /> templates/main/details.html
r305 r324 7 7 <!-- IF MESSAGE1 --><h1>{MESSAGE1}</h1><!-- ENDIF --> 8 8 <!-- IF MESSAGE2 --><p>{MESSAGE2}</p><!-- ENDIF --> 9 <table class="border" width="80%"> 10 <caption>{NAME} <!-- IF FREE_ICON --><img src="{FREE_ICON}" alt="{L_FREE}" title="{L_FREE}" /><!-- ENDIF --></caption> 9 10 <table class="border torrent_details"> 11 <caption style="margin-top:0;"><h2 style="margin-top:0;">{L_DOWNLOAD} "{NAME}"<!-- IF FREE_ICON --> <img src="{FREE_ICON}" alt="{L_FREE}" title="{L_FREE}" /><!-- ENDIF --></h2></caption> 12 13 <!-- IF not S_USER_LOGGED_IN --> 14 11 15 <tr> 12 <td>{L_DOWNLOAD}</td> 13 <td><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> 16 <td width="100"><h1>{L_DOWNLOAD}</h1></td> 17 <td> 18 <h1><a href="{U_DOWNLOAD}">{TORRENT_FILENAME}</a> 19 20 <!-- IF U_DOWNLOAD_AS_GZIP --> 21 22 <a href="{U_DOWNLOAD_AS_GZIP}"><img src="{ROOT_PATH}pic/blank.gif" class="zip-icon icon-32" /></a> 23 24 <!-- ENDIF --> 25 26 <a href="{U_MAGNET}"><img src="{ROOT_PATH}pic/blank.gif" class="magnet-icon icon-32" /></a></h1> 27 14 28 <!-- IF S_USER_LOGGED_IN --> 15 29 … … 22 36 </td> 23 37 </tr> 38 24 39 <tr> 25 40 <td width="100">{L_INFO_HASH}</td> … … 56 71 <tr> 57 72 <td>{L_RATING}</td> 58 <td valign="top"><span id="rating_message">{RATING} 59 <!-- BEGIN switch_rating_form --> 60 <select name="rating" id="rating_select"> 61 <option value="0">({L_ADD_RATING})</option> 62 {switch_rating_form.RATING_OPTIONS} 63 </select> 64 <input type="button" value="{L_VOTE}!" onclick="rating('{ID}', document.getElementById('rating_select').value );return false;" id="rating_button" /> 65 <!-- END switch_rating_form --></span> 73 <td> 74 <ul class="star-rating"> 75 <li class="current-rating" style="width:{RATING_PIC_WIDTH}px">{RATING}</li> 76 <!-- IF not RATING_VOTED --> 77 <li><a href="javascript:;" onclick="add_rating({ID}, 1)" title="{L_RATING} 1 / 5" class="one-star">1</a></li> 78 <li><a href="javascript:;" onclick="add_rating({ID}, 2)" title="{L_RATING} 2 / 5" class="two-stars">2</a></li> 79 <li><a href="javascript:;" onclick="add_rating({ID}, 3)" title="{L_RATING} 3 / 5" class="three-stars">3</a></li> 80 <li><a href="javascript:;" onclick="add_rating({ID}, 4)" title="{L_RATING} 4 / 5" class="four-stars">4</a></li> 81 <li><a href="javascript:;" onclick="add_rating({ID}, 5)" title="{L_RATING} 5 / 5" class="five-stars">5</a></li> 82 <!-- ENDIF --> 83 </ul> 66 84 </td> 67 85 </tr> … … 96 114 <!-- END switch_hidden_section --> 97 115 116 <!-- IF S_USER_LOGGED_IN --> 117 98 118 <tr> 99 119 <td>{L_UPLOADED}</td> … … 111 131 <tr> 112 132 <td valign="top"><a name="filelist" id="filelist"></a>{L_FILELIST}<br /> 113 <a href="javascript: void(0);" onclick="view_details_ext('filelist', '{ID}', 'details');" id="filelist_href">[<!-- IF FILELIST_TPL -->{L_HIDE_LIST}<!-- ELSE -->{L_SEE_FULL_LIST}<!-- ENDIF -->]</a></td>133 <a href="javascript:;" onclick="view_details_ext('filelist', '{ID}', 'details');" id="filelist_href">[<!-- IF FILELIST_TPL -->{L_HIDE_LIST}<!-- ELSE -->{L_SEE_FULL_LIST}<!-- ENDIF -->]</a></td> 114 134 <td valign="top">{NUM_FILES}<div id="filelist_row">{FILELIST_TPL}</div></td> 115 135 </tr> 116 117 <!-- IF S_USER_LOGGED_IN -->118 136 119 137 <tr> … … 141 159 </table> 142 160 143 <br /> 144 145 <table class="border" width="80%"> 161 <table class="border torrent_details"> 162 <caption>{L_TAGS}</caption> 146 163 <tr> 147 <td width="100">{L_TAGS}</td>148 164 <td id="details_tags"><!-- INCLUDE tags_view_form.html --></td> 149 165 </tr> templates/main/details_edit.html
r311 r324 33 33 <tr> 34 34 <td><label for="hidden">{L_HIDDEN}</label></td> 35 <td><input type="checkbox" name="hidden" id="hidden" {switch_hidden.HIDDEN_CHECKED} /></td>35 <td><input type="checkbox" name="hidden" id="hidden" {switch_hidden.HIDDEN_CHECKED} value="1" /></td> 36 36 </tr> 37 37 <!-- END switch_hidden --> templates/main/forum/confirm_body.tpl
r83 r324 16 16 </table> 17 17 18 <br clear="all"/>18 <br /> 19 19 20 20 <!-- INCLUDE overall_footer.html --> templates/main/forum/error_body.tpl
r83 r324 17 17 </table> 18 18 19 <br clear="all"/>19 <br /> 20 20 21 21 <!-- INCLUDE overall_footer.html --> templates/main/forum/groupcp_pending_info.tpl
r83 r324 1 1 <!-- INCLUDE overall_header.html --> 2 2 3 <br clear="all"/>3 <br /> 4 4 5 5 <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> templates/main/forum/groupcp_user_body.tpl
r83 r324 74 74 </table> 75 75 76 <br clear="all"/>76 <br /> 77 77 78 78 <table width="100%" cellspacing="2" border="0" align="center"> templates/main/forum/index_body.tpl
r269 r324 79 79 </table> 80 80 81 <br clear="all"/>81 <br /> 82 82 83 83 <table cellspacing="3" border="0" align="center" cellpadding="0"> templates/main/forum/message_body.tpl
r83 r324 26 26 </table> 27 27 28 <br clear="all"/>28 <br /> 29 29 30 30 <!-- INCLUDE overall_footer.html --> templates/main/forum/modcp_viewip.tpl
r259 r324 57 57 </table> 58 58 59 <br clear="all"/>59 <br /> 60 60 61 61 <!-- INCLUDE overall_footer.html --> templates/main/forum/posting_preview.tpl
r269 r324 20 20 </table> 21 21 22 <br clear="all"/>22 <br /> templates/main/forum/viewtopic_poll_ballot.tpl
r83 r324 1 1 <tr> 2 <td class="row2" colspan="2" align="center"><br clear="all"/><form method="POST" action="{S_POLL_ACTION}"><table cellspacing="0" cellpadding="4" border="0">2 <td class="row2" colspan="2" align="center"><br /><form method="POST" action="{S_POLL_ACTION}"><table cellspacing="0" cellpadding="4" border="0"> 3 3 <tr> 4 4 <td align="center"><span class="gen"><b>{POLL_QUESTION}</b></span></td> … … 20 20 </tr> 21 21 <tr> 22 22 23 23 <td align="center"><span class="gensmall"><b><a href="{U_VIEW_RESULTS}" class="gensmall">{L_VIEW_RESULTS}</a></b></span></td> 24 24 </tr> templates/main/forum/viewtopic_poll_result.tpl
r89 r324 1 <tr> 2 <td class="row2" colspan="2" align="center"><br clear="all"/>1 <tr> 2 <td class="row2" colspan="2" align="center"><br /> 3 3 <table cellspacing="0" cellpadding="2" border="0" align="center"> 4 <tr> 4 <tr> 5 5 <td colspan="4" align="center"><span class="gen"><b>{POLL_QUESTION}</b></span></td> 6 6 </tr> 7 <tr> 8 <td> 7 <tr> 8 <td> 9 9 <table cellspacing="0" cellpadding="1" border="0" width="100%"> 10 10 <!-- BEGIN poll_option --> 11 <tr> 11 <tr> 12 12 <td align="left"><span class="gensmall">{poll_option.POLL_OPTION_CAPTION}</span></td> 13 <td> 13 <td> 14 14 <table cellspacing="0" cellpadding="0" align="left"> 15 <tr> 15 <tr> 16 16 <td><img src="{TEMPLATE_PATH}/images/vote_lcap.gif" width="4" alt="" height="12" /></td> 17 17 <td><img src="{poll_option.POLL_OPTION_IMG}" width="{poll_option.POLL_OPTION_IMG_WIDTH}" height="12" alt="{poll_option.POLL_OPTION_PERCENT}" /></td> … … 27 27 </td> 28 28 </tr> 29 <tr> 29 <tr> 30 30 <td colspan="4" align="center"><span class="gen"><b>{L_TOTAL_VOTES} : {TOTAL_VOTES}</b></span></td> 31 31 </tr> 32 32 </table> 33 <br clear="all" />34 33 </td> 35 34 </tr> templates/main/index_body.html
r310 r324 105 105 <a href="{releases_row.U_CATEGORY}"><img src="{releases_row.CATEGORY_IMAGE}" align="right" alt="{releases_row.CATEGORY_NAME}" /></a> 106 106 {releases_row.DESCRIPTION} 107 <div style="clear: both"></div> 107 108 108 <p align="right">{releases_row.IMDB_LINK} [<a href="{releases_row.U_DETAILS}">{L_DETAILS}</a>]{releases_row.FORUM_LINK}</p> 109 109 </div> 110 <hr /> 110 111 111 </div> 112 112 templates/main/main.cfg
r293 r324 101 101 $images['icon_newest_reply'] = "$current_template_images/icon_newest_reply.gif"; 102 102 103 $images['forum_new_posts'] = "$current_template_images/newsn.gif"; 104 $images['checkcomm_icon'] = "$current_template_images/new_comments.gif"; 105 103 106 $images['forum'] = "$current_template_images/folder_big.gif"; 104 107 $images['forum_new'] = "$current_template_images/folder_new_big.gif"; … … 162 165 163 166 $images['printer'] = "$current_template_images/printer.gif"; 167 168 $config['rating_pic_width'] = 20; 164 169 ?> templates/main/main.css
r318 r324 97 97 98 98 #main-half { 99 float:left; 100 width:67%; 101 min-width:600px; 99 margin:0 170px; 100 102 101 } 103 102 104 103 #main-full { 105 float:left; 106 width:84%; 107 min-width:750px; 104 margin-left:170px; 108 105 } 109 106 110 107 #menu-right-block { 111 108 float:right; 112 width:15%; 113 min-width:160px; 109 width:160px; 114 110 } 115 111 116 112 #menu-block { 117 113 float:left; 118 width:15%; 119 min-width:150px; 114 width:160px; 120 115 } 121 116 … … 190 185 #tabs-control { 191 186 line-height:normal; 192 min-width:570px; 193 width:90%; 194 margin:0 0 -5px -12px; 187 height:18px; 195 188 } 196 189 … … 274 267 background-color:#ECECEC; 275 268 border:solid 1px #A9B8C2; 276 min-width:570px;277 width:90%;278 269 margin:4px 0; 279 270 padding:2px 0 0; … … 296 287 border:1px solid #000; 297 288 background:none; 298 margin-bottom: 10px;289 margin-bottom:20px; 299 290 text-align:left; 300 291 background-color:#EFEFEF; 301 292 min-width:600px; 302 width:80%;303 293 padding:5px; 304 294 } … … 308 298 text-decoration:none; 309 299 line-height:120%; 310 margin-top:25px;311 300 min-width:600px; 312 width:80%;313 301 text-align:left; 314 302 } … … 324 312 text-align:left; 325 313 margin-bottom:20px; 314 padding-bottom:10px; 315 overflow: hidden; 316 width: 100%; 317 border-bottom: 1px solid #000000; 326 318 } 327 319 … … 333 325 .description img.pic { 334 326 width:120px; 327 margin-left:-125px; 335 328 float:left; 336 margin-left:-125px;337 329 } 338 330 … … 342 334 } 343 335 344 .description img {345 float:right;346 margin:0;347 }348 349 336 .description p { 350 z-index:3;351 margin:8px 0 0; 337 margin:8px 0 10px 0; 338 352 339 } 353 340 … … 536 523 } 537 524 525 .torrent_details { 526 width:100%; 527 } 528 529 .torrent_details th { 530 padding-left:0; 531 padding-right:0; 532 } 533 538 534 table.textbbcode { 539 535 border:none; … … 569 565 border:none; 570 566 position:relative; 571 margin: 15px 0;567 margin:0 0 15px 0; 572 568 padding:10px; 573 569 } … … 660 656 cursor:text; 661 657 padding:2px; 658 resize: none; 662 659 } 663 660 … … 896 893 } 897 894 898 .clearfix:after,#tabs:after, #tabs-control:after,.row:after,#content:after,fieldset dl:after,#page-body:after {895 .clearfix:after,#tabs:after,.row:after,#content:after,fieldset dl:after,#page-body:after { 899 896 content:"."; 900 897 display:block; … … 904 901 } 905 902 906 .clearfix,#tabs, #tabs-control,.row,#content,fieldset dl,#page-body {903 .clearfix,#tabs,.row,#content,fieldset dl,#page-body { 907 904 height:1%; 908 905 } … … 913 910 914 911 .spacer_open2 { 915 width:80%;916 912 text-align:left; 917 913 } … … 1473 1469 #daddy-shoutbox { 1474 1470 float:left; 1475 width: 100%;1471 width:99%; 1476 1472 background:#EFEFEF; 1477 1473 font-size:1.1em; … … 1590 1586 } 1591 1587 1592 .row2,.border .subtables .row2 {1588 .row2,.border .subtables .row2, .private { 1593 1589 background-color:#E6E9ED; 1594 1590 } … … 1659 1655 text-decoration:underline; 1660 1656 } 1657 1658 .zip-icon { 1659 background: url(images/torrent_icons.png) no-repeat scroll 0 -32px; 1660 } 1661 .magnet-icon { 1662 background: url(images/torrent_icons.png) no-repeat scroll 0 0; 1663 } 1664 .icon-32 { 1665 width:32px; 1666 height:32px; 1667 } 1668 1669 /* styles for the star rater */ 1670 .star-rating{ 1671 list-style:none; 1672 margin: 5px 10px 5px 0; 1673 padding:0px; 1674 width: 100px; 1675 height: 20px; 1676 position: relative; 1677 overflow:hidden; 1678 background: url(images/ratings.png) top left repeat-x; 1679 float:left; 1680 } 1681 .star-rating li{ 1682 padding:0px; 1683 margin:0px; 1684 width:20px; 1685 height:20px; 1686 float: left; 1687 } 1688 .star-rating li a{ 1689 display:block; 1690 width:20px; 1691 height: 20px; 1692 line-height:20px; 1693 text-decoration: none; 1694 text-indent: -9000px; 1695 z-index: 20; 1696 position: absolute; 1697 padding: 0px; 1698 overflow:hidden; 1699 } 1700 .star-rating li a:hover{ 1701 background: url(images/ratings.png) left bottom; 1702 z-index: 2; 1703 left: 0px; 1704 border:none; 1705 } 1706 .star-rating a.one-star{ 1707 left: 0px; 1708 } 1709 .star-rating a.one-star:hover{ 1710 width:20px; 1711 } 1712 .star-rating a.two-stars{ 1713 left:20px; 1714 } 1715 .star-rating a.two-stars:hover{ 1716 width: 40px; 1717 } 1718 .star-rating a.three-stars{ 1719 left: 40px; 1720 } 1721 .star-rating a.three-stars:hover{ 1722 width: 60px; 1723 } 1724 .star-rating a.four-stars{ 1725 left: 60px; 1726 } 1727 .star-rating a.four-stars:hover{ 1728 width: 80px; 1729 } 1730 .star-rating a.five-stars{ 1731 left: 80px; 1732 } 1733 .star-rating a.five-stars:hover{ 1734 width: 100px; 1735 } 1736 .star-rating li.current-rating{ 1737 background: url(images/ratings.png) left center; 1738 position: absolute; 1739 height: 20px; 1740 display: block; 1741 text-indent: -9000px; 1742 z-index: 1; 1743 } 1744 1745 .all-ratings { 1746 width: 100px; 1747 height: 20px; 1748 overflow:hidden; 1749 background: url(images/ratings.png) top left repeat-x; 1750 text-align:left; 1751 display:inline-block; 1752 } 1753 .all-ratings span { 1754 background: url(images/ratings.png) left center; 1755 height: 20px; 1756 display:inline-block; 1757 text-indent: -9000px; 1758 z-index: 1; 1759 } 1760 #rating-answer { 1761 display:inline-block; 1762 position:relative; 1763 top:10px; 1764 } templates/main/overall_footer.html
r173 r324 1 1 </div> 2 <!-- BEGIN right_menu --> 3 <div id="menu-right-block" align="right"> 4 <div id="menu-right"> 5 <ul> 6 <li class="header">{L_NEW_AT_FORUM}</li> 7 <!-- BEGIN new_at_forum --> 8 <li><a href="{right_menu.new_at_forum.U_TOPIC}"><span>{right_menu.new_at_forum.TOPIC_TITLE}</span></a></li> 9 <!-- END new_at_forum --> 10 <li class="header">{L_ACTIVE_TORRENTS}</li> 11 <!-- BEGIN active_torrents --> 12 <li><a href="{right_menu.active_torrents.U_TORRENT}"><span>{right_menu.active_torrents.TORRENT_NAME}</span></a></li> 13 <!-- END active_torrents --> 14 <li class="header">{L_POPULAR_TORRENTS}</li> 15 <!-- BEGIN popular_torrents --> 16 <li><a href="{right_menu.popular_torrents.U_TORRENT}"><span>{right_menu.popular_torrents.TORRENT_NAME}</span></a></li> 17 <!-- END popular_torrents --> 18 </ul> 19 </div> 20 </div> 21 <!-- END right_menu --> 2 22 3 </div> 23 4 <span class="corners-bottom"><span> </span></span> templates/main/overall_header.html
r313 r324 36 36 <img alt="{L_UPLOADED}" title="{L_UPLOADED}" src="{ROOT_PATH}pic/arrowup.gif" /> {CURRENT_USER_UPED} <img alt="{L_DOWNLOADED}" title="{L_DOWNLOADED}" src="{ROOT_PATH}pic/arrowdown.gif" /> {CURRENT_USER_DOWNED} {CURRENT_USER_WARN_PANEL}</span> 37 37 <span class="right">{S_CURRENT_TIME}<br /> 38 <a href="{U_MESSAGES_INBOX}"><img src="{INBOX_PM_PIC}" height="14" alt="{PM_TITLE}" /></a> {L_INBOX} 39 <a href="{U_MESSAGES_SENTBOX}"> <img src="{SENTBOX_PIC}" height="14" alt="{L_SENTBOX}" /></a> {L_SENTBOX} 40 <a href="{U_MY_FRIENDS}"><img src="{BUDDYLIST_PIC}" height="14" alt="{L_BUDDYLIST}" /></a></span> 38 <a href="{U_MESSAGES_INBOX}"><img src="{INBOX_PM_PIC}" title="{PM_TITLE}" alt="{PM_TITLE}" /></a> {L_INBOX} 39 <a href="{U_MESSAGES_SENTBOX}"> <img src="{SENTBOX_PIC}" title="{L_SENTBOX}" alt="{L_SENTBOX}" /></a> {L_SENTBOX} 40 <a href="{U_MY_FRIENDS}"><img src="{BUDDYLIST_PIC}" title="{L_BUDDYLIST}" alt="{L_BUDDYLIST}" /></a> 41 <a href="{U_MY_CHECKCOMM}"><img src="{TEMPLATE_IMAGE_CHECKCOMM_ICON}" title="{L_CHECKCOMM}" alt="{L_CHECKCOMM}" /></a> 42 <a href="{U_NEW_FORUM_POSTS}"><img src="{TEMPLATE_IMAGE_FORUM_NEW_POSTS}" title="{L_NEW_POSTS}" alt="{L_NEW_POSTS}" /></a></span> 41 43 </div> 42 44 … … 52 54 <ul> 53 55 <li<!-- IF CURRENT_PAGE == U_INDEX --> id="activetab"<!-- ENDIF -->><a href="{U_INDEX}"><span>{L_INDEX}</span></a></li> 54 <li<!-- IF CURRENT_PAGE == U_BROWSE --> id="activetab"<!-- ENDIF -->><a href="{U_BROWSE}"><span>{L_ BROWSE}</span></a></li>56 <li<!-- IF CURRENT_PAGE == U_BROWSE --> id="activetab"<!-- ENDIF -->><a href="{U_BROWSE}"><span>{L_TORRENTS}</span></a></li> 55 57 56 58 <!-- BEGIN switch_non_uploader_view --> … … 73 75 <!-- ENDIF --> 74 76 77 <li<!-- IF CURRENT_PAGE == U_CHAT --> id="activetab"<!-- ENDIF -->><a href="{U_CHAT}"><span>{L_CHAT}</span></a></li> 75 78 <li<!-- IF CURRENT_PAGE == U_FORUM --> id="activetab"<!-- ENDIF -->><a href="{U_FORUM}"><span>{L_FORUMS}</span></a></li> 76 79 <li<!-- IF CURRENT_PAGE == U_RULES --> id="activetab"<!-- ENDIF -->><a href="{U_RULES}"><span>{L_RULES}</span></a></li> … … 83 86 <!-- ENDIF --> 84 87 85 < li<!-- IF CURRENT_PAGE == U_STAFF --> id="activetab"<!-- ENDIF -->><a href="{U_STAFF}"><span>{L_STAFF}</span></a></li>88 <!--<li<!-- IF CURRENT_PAGE == U_STAFF --> id="activetab"<!-- ENDIF -->><a href="{U_STAFF}"><span>{L_STAFF}</span></a></li>--> 86 89 </ul> 87 90 </div> … … 90 93 <span class="corners-top"><span> </span></span> 91 94 <div id="content"> 95 96 92 97 <div id="menu-block" align="left"> 93 98 <div id="menu"> 94 99 <ul> 95 96 100 <!-- IF S_USER_LOGGED_IN --> 97 101 … … 163 167 <li<!-- IF CURRENT_PAGE == U_REPORTS --> id="activemenu"<!-- ENDIF -->><a href="{U_REPORTS}"><!-- IF REPORTS_NUM > 0 --><span style="color:red;"><b>{L_REPORTS} ({REPORTS_NUM})</b></span><!-- ELSE --><span>{L_REPORTS}</span><!-- ENDIF --></a></li> 164 168 <li<!-- IF CURRENT_PAGE == U_USERSEARCH --> id="activemenu"<!-- ENDIF -->><a href="{U_USERSEARCH}"><span>{L_USER_SEARCH}</span></a></li> 169 <li<!-- IF CURRENT_PAGE == U_NEW_SITE_COMMENTS --> id="activemenu"<!-- ENDIF -->><a href="{U_NEW_SITE_COMMENTS}"><span>{L_NEW_COMMENTS}</span></a></li> 165 170 166 171 <!-- ENDIF --> … … 180 185 </div> 181 186 </div> 187 188 <!-- BEGIN right_menu --> 189 <div id="menu-right-block" align="right"> 190 <div id="menu-right"> 191 <ul> 192 193 194 <li class="header">{L_NEW_AT_FORUM}</li> 195 <!-- BEGIN new_at_forum --> 196 <li><a href="{right_menu.new_at_forum.U_TOPIC}"><span>{right_menu.new_at_forum.TOPIC_TITLE}</span></a></li> 197 <!-- END new_at_forum --> 198 <li class="header" style="font-size:0.9em">{L_POPULAR_AT_FORUM}</li> 199 <!-- BEGIN pop_at_forum --> 200 <li><a href="{right_menu.pop_at_forum.U_TOPIC}"><span>{right_menu.pop_at_forum.TOPIC_TITLE}</span></a></li> 201 <!-- END pop_at_forum --> 202 <li class="header">{L_ACTIVE_TORRENTS}</li> 203 <!-- BEGIN active_torrents --> 204 <li><a href="{right_menu.active_torrents.U_TORRENT}"><span>{right_menu.active_torrents.TORRENT_NAME}</span></a></li> 205 <!-- END active_torrents --> 206 <li class="header">{L_POPULAR_TORRENTS}</li> 207 <!-- BEGIN popular_torrents --> 208 <li><a href="{right_menu.popular_torrents.U_TORRENT}"><span>{right_menu.popular_torrents.TORRENT_NAME}</span></a></li> 209 <!-- END popular_torrents --> 210 </ul> 211 </div> 212 </div> 213 <!-- END right_menu --> 182 214 183 215 <div id="<!-- IF RIGHT_MENU -->main-half<!-- ELSE -->main-full<!-- ENDIF -->" align="center"> templates/main/tags_view_form.html
r313 r324 8 8 <span id="tag_{tags_row.TAG_NUM}"> 9 9 10 <!-- IF S_USER_LOGGED_IN -->10 <!-- IF S_USER_LOGGED_IN && ALLOW_ADD_TAGS --> 11 11 12 12 [<a href="javascript:;" onclick="update_tag('{tags_row.ENC_TAG_NAME}', '{TAG_TYPE}', '{ID}', 'down')">-</a>] … … 16 16 <a href="{tags_row.U_TAG}" style="font-size:{tags_row.TAG_SIZE}px;font-weight:bold;">{tags_row.TAG_NAME}</a> 17 17 18 <!-- IF S_USER_LOGGED_IN -->18 <!-- IF S_USER_LOGGED_IN && ALLOW_ADD_TAGS --> 19 19 20 20 [<a href="javascript:;" onclick="update_tag('{tags_row.ENC_TAG_NAME}', '{TAG_TYPE}', '{ID}', 'up')">+</a>] templates/main/top_ten_body.html
r299 r324 3 3 <!-- BEGIN topten_row --> 4 4 5 <div style=" float:left;width:33%;"><h1>{topten_row.TITLE}</h1>5 <div style="display:inline-block;margin-right:20px;vertical-align:top;"><h1>{topten_row.TITLE}</h1> 6 6 7 7 <ul style="list-style:none"> … … 18 18 <!-- END topten_row --> 19 19 20 <br clear="both"/>20 <br /><br /> 21 21 22 22 <form action="{S_FORM_ACTION}"> templates/main/torrents_table.html
r313 r324 45 45 <!-- ENDIF --> 46 46 47 <tr >47 <tr class="<!-- IF torrents_table.TORRENT_BANNED -->banned<!-- ENDIF --><!-- IF torrents_table.TORRENT_HIDDEN --> hidden<!-- ENDIF -->"> 48 48 <td align="center"> 49 49 <a href="{torrents_table.U_DOWNLOAD}"><img src="{TEMPLATE_PATH}/images/download.gif" alt="{L_DOWNLOAD}" title="{L_DOWNLOAD}" /></a><br /><br /> … … 51 51 </td> 52 52 53 <td {torrents_table.HIDDEN_COLOR}><a href="{torrents_table.U_CATEGORY}">53 <td><a href="{torrents_table.U_CATEGORY}"> 54 54 55 55 <!-- IF torrents_table.CAT_PIC --> … … 61 61 </a></td> 62 62 63 <td {torrents_table.HIDDEN_COLOR}align="left">63 <td align="left"> 64 64 65 65 <!-- IF not torrents_table.MODERATED --> … … 82 82 83 83 </td> 84 <td {torrents_table.HIDDEN_COLOR}align="center">84 <td align="center"> 85 85 <!-- IF S_USER_LOGGED_IN --><a href="{torrents_table.U_DETAILS_FILELIST}"><!-- ENDIF --><b>{torrents_table.NUMFILES}</b><!-- IF S_USER_LOGGED_IN --></a><!-- ENDIF --> 86 86 </td> 87 <td {torrents_table.HIDDEN_COLOR}align="center">87 <td align="center"> 88 88 89 89 <!-- IF torrents_table.TORRENT_COMMENTS --> … … 95 95 96 96 </td> 97 <td {torrents_table.HIDDEN_COLOR}align="center">{torrents_table.RATING}</td>97 <td align="center">{torrents_table.RATING}</td> 98 98 99 99 <!-- IF L_TTL --> 100 <td {torrents_table.HIDDEN_COLOR}align="center">{torrents_table.TTL}</td>100 <td align="center">{torrents_table.TTL}</td> 101 101 <!-- ENDIF --> 102 102 103 103 <!-- IF L_WAIT --> 104 <td {torrents_table.HIDDEN_COLOR}align="center">{torrents_table.WAITTIME}</td>104 <td align="center">{torrents_table.WAITTIME}</td> 105 105 <!-- ENDIF --> 106 106 107 <td {torrents_table.HIDDEN_COLOR}align="center">{torrents_table.SIZE}</td>108 <td {torrents_table.HIDDEN_COLOR}align="center">107 <td align="center">{torrents_table.SIZE}</td> 108 <td align="center"> 109 109 110 110 <!-- IF torrents_table.TORRENT_COMPLETED --> … … 116 116 117 117 </td> 118 <td {torrents_table.HIDDEN_COLOR}align="center">118 <td align="center"> 119 119 120 120 <!-- IF torrents_table.TORRENT_SEEDERS --> … … 135 135 136 136 <!-- IF S_USER_LOGGED_IN --> 137 <td {torrents_table.HIDDEN_COLOR}align="center">{torrents_table.USERNAME}</td>137 <td align="center">{torrents_table.USERNAME}</td> 138 138 <!-- ENDIF --> 139 139 140 140 <!-- IF torrents_table.BOOKMARK_ID --> 141 <td {torrents_table.HIDDEN_COLOR}align="center"><input type="checkbox" name="delbookmark[]" value="{torrents_table.BOOKMARK_ID}" id="bookmark_{torrents_table.ID}" /></td>141 <td align="center"><input type="checkbox" name="delbookmark[]" value="{torrents_table.BOOKMARK_ID}" id="bookmark_{torrents_table.ID}" /></td> 142 142 <!-- ENDIF --> 143 143 144 144 <!-- IF CAN_MODERATE --> 145 <td {torrents_table.HIDDEN_COLOR}align="center"><input type="checkbox" name="torrent_id[]" value="{torrents_table.ID}" id="torrent_id_{torrents_table.ID}" /></td>145 <td align="center"><input type="checkbox" name="torrent_id[]" value="{torrents_table.ID}" id="torrent_id_{torrents_table.ID}" /></td> 146 146 <!-- ENDIF --> 147 147 templates/main/ucp_friends_body.html
r308 r324 5 5 <caption>{L_FRIENDS_LIST}</caption> 6 6 <!-- BEGIN friends_list_row --> 7 <tr valign=" bottom">8 <!-- BEGIN users_col -->9 <td align=" left" width="25%">10 <img src="{friends_list_row.users_col.FRIEND_AVATAR}" alt="" onmouseover="return overlib('{friends_list_row.users_col.FRIEND_TITLE}<br /> {L_LAST_ACCESS}: {friends_list_row.users_col.FRIEND_LAST_ACCESS_DATE} ({friends_list_row.users_col.FRIEND_LAST_ACCESS_AGO})<br />{L_GENDER}: {friends_list_row.users_col.FRIEND_GENDER}<br />{L_AGE}: {friends_list_row.users_col.FRIEND_AGE}');" onmouseout="return nd();" /><br />11 < a href="{friends_list_row.users_col.U_DELETE_FRIEND}"><img src="{ROOT_PATH}pic/warned2.gif" alt="" /></a> <a href="{friends_list_row.users_col.U_USERDETAILS}">{friends_list_row.users_col.FRIEND_USERNAME}</a> <a href="{friends_list_row.users_col.U_SENDPM}"><img src="{IMG_PM_BUTTON}" alt="" /></a>7 <tr valign="top"> 8 <!-- BEGIN users_col --> 9 <td align="center" width="100"> 10 {friends_list_row.users_col.FRIEND_USERNAME} 11 <img src="{friends_list_row.users_col.FRIEND_AVATAR}" alt="" onmouseover="return overlib('{L_LAST_ACCESS}: {friends_list_row.users_col.FRIEND_LAST_ACCESS_DATE} ({friends_list_row.users_col.FRIEND_LAST_ACCESS_AGO})<br />{L_GENDER}: {friends_list_row.users_col.FRIEND_GENDER}<br />{L_AGE}: {friends_list_row.users_col.FRIEND_AGE}');" onmouseout="return nd();" /><br /> 12 12 </td> 13 <!-- END users_col --> 13 <td> 14 <br /> 15 <a href="{friends_list_row.users_col.U_DELETE_FRIEND}"><img src="{ROOT_PATH}pic/warned2.gif" alt="" /></a><br /><br /> 16 <a href="{friends_list_row.users_col.U_SENDPM}"><img src="{IMG_PM_BUTTON}" alt="" /></a><br /><br /> 17 <img src="{friends_list_row.users_col.ONLINE_PIC}" alt="{friends_list_row.users_col.ONLINE_TEXT}" title="{friends_list_row.users_col.ONLINE_TEXT}" /> 18 </td> 19 <!-- END users_col --> 14 20 </tr> 15 21 <!-- END friends_list_row --> templates/main/upload_body.html
r269 r324 5 5 <script type="text/javascript" src="{ROOT_PATH}js/jquery.autocomplete.js"></script> 6 6 7 <div id="preview_box" style="width: 700px;">7 <div id="preview_box"> 8 8 <!-- BEGIN uploading_preview --> 9 <table width="700" class="border">9 <table class="border torrent_details"> 10 10 <caption>{uploading_preview.NAME}</caption> 11 11 <tr> … … 23 23 <p>{S_ANNOUNCE_ADDRESS}</p> 24 24 <!-- ENDIF --> 25 <table width="700" class="border">25 <table class="border torrent_details"> 26 26 <!-- IF TYPE == 'main' --> 27 27 <tr> 28 <td valign="top" align="right">{L_TORRENT}</td>28 <td width="100" valign="top" align="right">{L_TORRENT}</td> 29 29 <td valign="top" align=left><input type="file" name="file" size="80"></td> 30 30 </tr> … … 44 44 <tr> 45 45 <td valign="top" align="right">{L_DESCRIPTION}</td> 46 <td valign="top" align=left><textarea name="descr" cols="100" rows="30">{DESCRIPTION}</textarea></td>46 <td valign="top" align=left><textarea name="descr" style="width:99%;height:400px">{DESCRIPTION}</textarea></td> 47 47 </tr> 48 48 <tr> templates/reflection/browse.html
r313 r324 25 25 <fieldset id="tag_cloud" class="catNamesBlock"> 26 26 27 <!-- BEGIN tags_ cloud-->27 <!-- BEGIN tags_row --> 28 28 29 <a href="{tags_ cloud.U_TAG}" style="font-size:{tags_cloud.TAG_SIZE}px;">{tags_cloud.TAG_NAME}</a>29 <a href="{tags_row.U_TAG}" style="font-size:{tags_row.TAG_SIZE}px;">{tags_row.TAG_NAME}</a> 30 30 31 <!-- END tags_ cloud-->31 <!-- END tags_row --> 32 32 33 33 </fieldset> templates/reflection/details.html
r316 r324 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>14 <h1><a href="{U_DOWNLOAD}">{TORRENT_FILENAME}</a> 15 15 16 <!-- IF U_DOWNLOAD_AS_GZIP --> 17 18 <a href="{U_DOWNLOAD_AS_GZIP}"><img src="{ROOT_PATH}pic/blank.gif" class="zip-icon icon-32" /></a> 19 20 <!-- ENDIF --> 21 22 <a href="{U_MAGNET}"><img src="{ROOT_PATH}pic/blank.gif" class="magnet-icon icon-32" /></a> 23 </h1> 16 24 <!-- IF S_USER_LOGGED_IN --> 17 25 … … 55 63 56 64 <div class="torrentViewLeft">{L_RATING}</div> 57 <div class="torrentViewRight"><span id="rating_message">{RATING} 58 <!-- BEGIN switch_rating_form --> 59 <select name="rating" id="rating_select"> 60 <option value="0">({L_ADD_RATING})</option> 61 {switch_rating_form.RATING_OPTIONS} 62 </select> 63 <input type="button" value="{L_VOTE}!" onclick="rating('{ID}', document.getElementById('rating_select').value );return false;" id="rating_button" /> 64 <!-- END switch_rating_form --></span> 65 <div class="torrentViewRight"> 66 <ul class="star-rating"> 67 <li class="current-rating" style="width:{RATING_PIC_WIDTH}px">{RATING}</li> 68 <!-- IF not RATING_VOTED --> 69 <li><a href="javascript:;" onclick="add_rating({ID}, 1)" title="{L_RATING} 1 / 5" class="one-star">1</a></li> 70 <li><a href="javascript:;" onclick="add_rating({ID}, 2)" title="{L_RATING} 2 / 5" class="two-stars">2</a></li> 71 <li><a href="javascript:;" onclick="add_rating({ID}, 3)" title="{L_RATING} 3 / 5" class="three-stars">3</a></li> 72 <li><a href="javascript:;" onclick="add_rating({ID}, 4)" title="{L_RATING} 4 / 5" class="four-stars">4</a></li> 73 <li><a href="javascript:;" onclick="add_rating({ID}, 5)" title="{L_RATING} 5 / 5" class="five-stars">5</a></li> 74 <!-- ENDIF --> 75 </ul> 65 76 </div> 66 77 <br /><br /> 67 78 <div class="torrentViewLeft">{L_ADDED}</div> 68 79 <div class="torrentViewRight">{ADDED}</div> templates/reflection/details_edit.html
r311 r324 37 37 <div class="tableRow"> 38 38 <div class="leftCell" style="width:20%"><label for="hidden">{L_HIDDEN}</label></div> 39 <div class="rightCell"><input type="checkbox" name="hidden" id="hidden" {switch_hidden.HIDDEN_CHECKED} /></div>39 <div class="rightCell"><input type="checkbox" name="hidden" id="hidden" {switch_hidden.HIDDEN_CHECKED} value="1" /></div> 40 40 <div class="clear"> </div> 41 41 </div> templates/reflection/forum/viewtopic_body.tpl
r313 r324 69 69 <tr> 70 70 <td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}" id="{postrow.U_POST_ID}"></a><b><a href="javascript:;" onclick="javascript:ins('{postrow.POSTER_NAME}');">{postrow.POSTER_NAME_PARSED}</a></b></span> 71 <span class="<!-- IF postrow.USER_REPUTATION_LEVEL < 0 -->badUserResp<!-- ELSE -->goodUserResp<!-- ENDIF -->">{postrow.USER_REPUTATION_LEVEL}</span>72 71 <br /><span class="postdetails">{postrow.POSTER_RANK} 73 72 <br /> … … 167 166 168 167 <!-- INCLUDE overall_footer.html --> 169 templates/reflection/overall_header.html
r313 r324 56 56 57 57 <!-- Menu is displayed in reverse order from how you define it (caused by float: right) --> 58 <a href="{U_ STAFF}" class="lastMenuItem">{L_STAFF}</a>58 <a href="{U_CHAT}" class="lastMenuItem">{L_CHAT}</a> 59 59 <!-- IF S_USER_LOGGED_IN --> 60 60 <a href="{U_HELPDESC}">{L_HELPDESC}</a> … … 73 73 <a href="{U_UPLOAD}">{L_UPLOAD}</a> 74 74 <!-- END switch_uploader_view --> 75 <a href="{U_BROWSE}">{L_ BROWSE}</a>75 <a href="{U_BROWSE}">{L_TORRENTS}</a> 76 76 <a href="{U_INDEX}">{L_INDEX}</a> 77 77 … … 160 160 <a href="{U_REPORTS}"><!-- IF REPORTS_NUM > 0 --><span style="color:red;"><b>{L_REPORTS} ({REPORTS_NUM})</b></span><!-- ELSE -->{L_REPORTS}<!-- ENDIF --></a><br /> 161 161 <a href="{U_USERSEARCH}"><span>{L_USER_SEARCH}</span></a><br /> 162 <a href="{U_NEW_SITE_COMMENTS}"><span>{L_NEW_COMMENTS}</span></a><br /> 162 163 <!-- ENDIF --> 163 164 templates/reflection/reflection.cfg
r280 r324 160 160 161 161 $images['printer'] = "$current_template_images/printer.gif"; 162 163 $config['rating_pic_width'] = 20; 162 164 ?> templates/reflection/reflection.css
r318 r324 1210 1210 background-color:#BF5E26; 1211 1211 } 1212 .zip-icon { 1213 background: url(images/torrent_icons.png) no-repeat scroll 0 -32px; 1214 } 1215 .magnet-icon { 1216 background: url(images/torrent_icons.png) no-repeat scroll 0 0; 1217 } 1218 .icon-32 { 1219 width:32px; 1220 height:32px; 1221 } 1222 1223 /* styles for the star rater */ 1224 .star-rating{ 1225 list-style:none; 1226 margin: 5px 10px 5px 0; 1227 padding:0px; 1228 width: 100px; 1229 height: 20px; 1230 position: relative; 1231 overflow:hidden; 1232 background: url(images/ratings.png) top left repeat-x; 1233 float:left; 1234 } 1235 .star-rating li{ 1236 padding:0px; 1237 margin:0px; 1238 width:20px; 1239 height:20px; 1240 float: left; 1241 } 1242 .star-rating li a{ 1243 display:block; 1244 width:20px; 1245 height: 20px; 1246 line-height:20px; 1247 text-decoration: none; 1248 text-indent: -9000px; 1249 z-index: 20; 1250 position: absolute; 1251 padding: 0px; 1252 overflow:hidden; 1253 } 1254 .star-rating li a:hover{ 1255 background: url(images/ratings.png) left bottom; 1256 z-index: 2; 1257 left: 0px; 1258 border:none; 1259 } 1260 .star-rating a.one-star{ 1261 left: 0px; 1262 } 1263 .star-rating a.one-star:hover{ 1264 width:20px; 1265 } 1266 .star-rating a.two-stars{ 1267 left:20px; 1268 } 1269 .star-rating a.two-stars:hover{ 1270 width: 40px; 1271 } 1272 .star-rating a.three-stars{ 1273 left: 40px; 1274 } 1275 .star-rating a.three-stars:hover{ 1276 width: 60px; 1277 } 1278 .star-rating a.four-stars{ 1279 left: 60px; 1280 } 1281 .star-rating a.four-stars:hover{ 1282 width: 80px; 1283 } 1284 .star-rating a.five-stars{ 1285 left: 80px; 1286 } 1287 .star-rating a.five-stars:hover{ 1288 width: 100px; 1289 } 1290 .star-rating li.current-rating{ 1291 background: url(images/ratings.png) left center; 1292 position: absolute; 1293 height: 20px; 1294 display: block; 1295 text-indent: -9000px; 1296 z-index: 1; 1297 } 1298 1299 .all-ratings { 1300 width: 100px; 1301 height: 20px; 1302 overflow:hidden; 1303 background: url(images/ratings.png) top left repeat-x; 1304 text-align:left; 1305 display:inline-block; 1306 } 1307 .all-ratings span { 1308 background: url(images/ratings.png) left center; 1309 height: 20px; 1310 display:inline-block; 1311 text-indent: -9000px; 1312 z-index: 1; 1313 } 1314 #rating-answer { 1315 display:inline-block; 1316 position:relative; 1317 top:10px; 1318 float:left; 1319 } templates/reflection/tags_view_form.html
r313 r324 8 8 <span id="tag_{tags_row.TAG_NUM}"> 9 9 10 <!-- IF S_USER_LOGGED_IN -->10 <!-- IF S_USER_LOGGED_IN && ALLOW_ADD_TAGS --> 11 11 12 12 [<a href="javascript:;" onclick="update_tag('{tags_row.ENC_TAG_NAME}', '{TAG_TYPE}', '{ID}', 'down')">-</a>] … … 16 16 <a href="{tags_row.U_TAG}" style="font-size:{tags_row.TAG_SIZE}px;font-weight:bold;">{tags_row.TAG_NAME}</a> 17 17 18 <!-- IF S_USER_LOGGED_IN -->18 <!-- IF S_USER_LOGGED_IN && ALLOW_ADD_TAGS --> 19 19 20 20 [<a href="javascript:;" onclick="update_tag('{tags_row.ENC_TAG_NAME}', '{TAG_TYPE}', '{ID}', 'up')">+</a>] templates/reflection/top_ten_body.html
r299 r324 3 3 <!-- BEGIN topten_row --> 4 4 5 <div style="float:left; width:33%;"><h3>{topten_row.TITLE}</h3>5 <div style="float:left;padding:5px;"><h3>{topten_row.TITLE}</h3> 6 6 7 7 <ul> templates/reflection/torrents_table.html
r313 r324 33 33 <!-- ENDIF --> 34 34 35 <div class="torrentsBlock ">35 <div class="torrentsBlock<!-- IF torrents_table.TORRENT_BANNED --> banned<!-- ENDIF --><!-- IF torrents_table.TORRENT_HIDDEN --> hidden<!-- ENDIF -->"> 36 36 <div class="torrentsTitle"> 37 37 templates/reflection/ucp_friends_body.html
r308 r324 8 8 <!-- BEGIN users_col --> 9 9 <div class="leftCell" style="width:25%;"> 10 <img src="{friends_list_row.users_col.FRIEND_AVATAR}" alt="" onmouseover="return overlib('{friends_list_row.users_col.FRIEND_TITLE}<br /> {L_LAST_ACCESS}: {friends_list_row.users_col.FRIEND_LAST_ACCESS_DATE} ({friends_list_row.users_col.FRIEND_LAST_ACCESS_AGO})<br />{L_GENDER}: {friends_list_row.users_col.FRIEND_GENDER}<br />{L_AGE}: {friends_list_row.users_col.FRIEND_AGE}');" onmouseout="return nd();" /><br /> 11 <a href="{friends_list_row.users_col.U_DELETE_FRIEND}"><img src="{ROOT_PATH}pic/warned2.gif" alt="" /></a> <a href="{friends_list_row.users_col.U_USERDETAILS}">{friends_list_row.users_col.FRIEND_USERNAME}</a> <a href="{friends_list_row.users_col.U_SENDPM}"><img src="{IMG_PM_BUTTON}" alt="" /></a> 10 <div class="leftCell" style="width:40%;"> 11 {friends_list_row.users_col.FRIEND_USERNAME}<br /> 12 <img src="{friends_list_row.users_col.FRIEND_AVATAR}" alt="" onmouseover="return overlib('{L_LAST_ACCESS}: {friends_list_row.users_col.FRIEND_LAST_ACCESS_DATE} ({friends_list_row.users_col.FRIEND_LAST_ACCESS_AGO})<br />{L_GENDER}: {friends_list_row.users_col.FRIEND_GENDER}<br />{L_AGE}: {friends_list_row.users_col.FRIEND_AGE}');" onmouseout="return nd();" /><br /> 13 </div> 14 15 <div class="leftCell" style="width:5%;text-align:left;"> 16 <br /> 17 <a href="{friends_list_row.users_col.U_DELETE_FRIEND}"><img src="{ROOT_PATH}pic/warned2.gif" alt="" /></a><br /><br /> 18 <a href="{friends_list_row.users_col.U_SENDPM}"><img src="{IMG_PM_BUTTON}" alt="" /></a><br /><br /> 19 <img src="{friends_list_row.users_col.ONLINE_PIC}" alt="{friends_list_row.users_col.ONLINE_TEXT}" title="{friends_list_row.users_col.ONLINE_TEXT}" /> 20 </div> 12 21 </div> 13 22 <!-- END users_col --> 14 <div class="clear"> </div> 23 <div class="clear"> </div><br /> 15 24 <!-- END friends_list_row --> 16 25 </div> topten.php
r299 r324 48 48 'by_upspeed' => 'upspeed', 49 49 'by_downspeed' => 'downspeed', 50 ), 51 52 'forum' => array( 53 'by_popular_topics' => 'topic_replies', 54 'by_reputation_posts' => 'post_reputation', 50 55 ), 51 56 ); … … 100 105 101 106 switch ( $action ) { 107 case 'forum': 108 $order_field = ( isset($top_ten_types[$action][$do]) ? $top_ten_types[$action][$do] : 'topic_replies' ); 109 110 $sql = "SELECT f.* FROM " . FORUMS_TABLE . " f"; 111 $result = $db->sql_query($sql); 112 113 $forum_data = array(); 114 while( $row = $db->sql_fetchrow($result) ) { 115 $forum_data[] = $row; 116 } 117 118 $auth_forums = array(); 119 $is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_data); 120 121 foreach ( $is_auth_ary AS $forum_id => $forum_ary ) { 122 if ( $forum_ary['auth_view'] ) { 123 $auth_forums[] = $forum_id; 124 } 125 } 126 127 switch( $do ){ 128 default: 129 case 'topic_replies': 130 $sql = 'SELECT u.uid, u.name, u.name_append, u.uid, u.class, t.topic_replies, t.topic_title, t.topic_id 131 FROM ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u 132 WHERE u.uid = t.topic_poster AND ' . $db->sql_in_set('t.forum_id', $auth_forums) . ' 133 ' . ( $range ? ' AND t.topic_time > ' . ( time() - $range * 24 * 60 * 60 ) : '' ) . ' 134 ORDER BY ' . $order_field . ' ' . $sort; 135 $result = $db->sql_query_limit($sql, $limit); 136 137 while ( $row = $db->sql_fetchrow($result) ) { 138 139 $template->assign_block_vars('forum_row', array( 140 'USERNAME' => parse_username($row), 141 'TOPIC_REPLIES' => $row['topic_replies'], 142 'U_TOPIC' => append_sid($root_path . 'phpbb2.php?page=viewtopic&t=' . $row['topic_id']), 143 'TOPIC_TITLE' => $row['topic_title'], 144 145 'HIGHLIGHT' => $userdata['uid'] == $row['uid'], 146 )); 147 } 148 149 $body = 'top_forum_body.html'; 150 break; 151 152 case 'by_reputation_posts': 153 $sql = 'SELECT u.uid, u.name, u.name_append, u.uid, u.class, p.post_reputation, p.post_id, t.topic_title 154 FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u 155 WHERE p.topic_id = t.topic_id AND p.poster_id = u.uid AND ' . $db->sql_in_set('t.forum_id', $auth_forums) . ' 156 ' . ( $range ? ' AND p.post_created > ' . ( time() - $range * 24 * 60 * 60 ) : '' ) . ' 157 ORDER BY ' . $order_field . ' ' . $sort; 158 $result = $db->sql_query_limit($sql, $limit); 159 160 while ( $row = $db->sql_fetchrow($result) ) { 161 162 $template->assign_block_vars('forum_row', array( 163 'USERNAME' => parse_username($row), 164 'REPUTATION' => $row['post_reputation'], 165 'U_POST' => append_sid($root_path . 'phpbb2.php?page=viewtopic&p=' . $row['post_id'] . '#' . $row['post_id']), 166 'TOPIC_TITLE' => $row['topic_title'], 167 168 'HIGHLIGHT' => $userdata['uid'] == $row['uid'], 169 )); 170 } 171 172 $body = 'top_forum_topics_body.html'; 173 break; 174 } 175 176 break; 177 102 178 case 'users': 103 179 $order_field = ( isset($top_ten_types[$action][$do]) ? $top_ten_types[$action][$do] : 'uploaded' ); upload.php
r316 r324 217 217 /* start tags */ 218 218 219 $tags_name = request_var('tag_name', ''); 220 $tag_type = TYPE_TORRENT; 221 222 if ( strpos($tags_name, ',') !== false ) { 223 $tags_name = explode(',', $tags_name); 219 require_once($root_path . 'include/class.tags.php'); 220 221 if ( tags::return_allow_add_tag(TYPE_TORRENT, 0, $userdata['uid']) ) { 222 $tags_name = request_var('tag_name', ''); 223 $tag_type = TYPE_TORRENT; 224 225 tags::set_tag_cat_id($cat_id); 226 tags::set_tag_owner($userdata['uid']); 227 tags::set_fast_add_mode(); 228 tags::add_tag(TYPE_TORRENT, $id, $tags_name, 'up'); 224 229 } 225 else {226 $tags_name = array($tags_name);227 }228 229 foreach ( $tags_name AS $_null => $tag_name ) {230 $tag_name = trim($tag_name);231 $tag_name = preg_replace('/[\.,:\^]/', '', $tag_name);232 $tag_length = utf_strlen($tag_name);233 234 if ( !$tag_name ) {235 continue;236 }237 238 if ( $config['tags_max_length'] && $tag_length > $config['tags_max_length'] ) {239 continue;240 }241 242 if ( $config['tags_min_length'] && $tag_length < $config['tags_min_length'] ) {243 continue;244 }245 246 $sql = 'INSERT INTO ' . TAGS_TABLE . ' VALUES (LOWER(\'' . $db->sql_escape($tag_name) . '\'), ' . $tag_type . ', ' . $id . ', 1)';247 $db->sql_query($sql);248 249 $sql = 'INSERT INTO ' . TAGS_USERS_TABLE . ' VALUES (' . $userdata['uid'] . ', ' . $id . ', ' . $tag_type . ', LOWER(\'' . $db->sql_escape($tag_name) . '\'))';250 $db->sql_query($sql);251 }252 253 230 /* end tags */ 254 231 usersearch.php
r317 r324 81 81 $agents = array(); 82 82 while ( $row = $db->sql_fetchrow($result) ) { 83 $ c= getagent($row['useragent'], $row['peer_id']);84 if ( !isset($agents[$ c]) ) {85 $agents[$ c] = $row['useragent'];83 $agent = getagent($row['useragent'], $row['peer_id']); 84 if ( !isset($agents[$agent]) ) { 85 $agents[$agent] = $row['useragent']; 86 86 } 87 87 }
