Changeset 189
- Timestamp:
- 12/27/08 13:20:57 (3 years ago)
- Files:
-
- admin/index.php (modified) (1 diff)
- docleanup.php (modified) (2 diffs)
- include/details/download.php (modified) (1 diff)
- include/details/edit.php (modified) (2 diffs)
- include/functions_delete.php (modified) (2 diffs)
- include/global.php (modified) (1 diff)
- phpBB2/includes/functions_post.php (modified) (8 diffs)
- phpBB2/posting.php (modified) (14 diffs)
- phpBB2/search.php (modified) (1 diff)
- phpBB2/viewforum.php (modified) (1 diff)
- phpBB2/viewtopic.php (modified) (3 diffs)
- templates/bithdtv/forum/viewforum_body.tpl (modified) (2 diffs)
- templates/main/browse.html (modified) (1 diff)
- templates/main/forum/viewforum_body.tpl (modified) (2 diffs)
- templates/main/main.css (modified) (3 diffs)
- templates/main/ucp_body.html (modified) (1 diff)
- templates/main/ucp_checkcomm_body.html (modified) (1 diff)
- templates/reflection/forum/modcp_body.tpl (modified) (1 diff)
- templates/reflection/forum/search_results_topics.tpl (modified) (1 diff)
- templates/reflection/forum/viewforum_body.tpl (modified) (2 diffs)
- upload.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
admin/index.php
r184 r189 265 265 266 266 $torrents_dir_size = 0; 267 $torrent_dir = ( !empty($config['torrent_dir']) ? $config['torrent_dir'] : $root_path . 'torrents'); 267 268 $torrent_dir = $root_path . ( !empty($config['torrent_dir']) ? $config['torrent_dir'] : 'torrents'); 269 268 270 if ($torrents_dir = @opendir($torrent_dir)) 269 271 { docleanup.php
r184 r189 73 73 $torrents[$row['fid']] = 1; 74 74 } 75 $config['torrent_dir'] = ( !empty($config['torrent_dir']) ? $config['torrent_dir'] : $root_path . 'torrents'); 76 if ( $dp = opendir($config['torrent_dir'] . DIRECTORY_SEPARATOR) ) { 75 $torrent_dir = $root_path . ( !empty($config['torrent_dir']) ? $config['torrent_dir'] : 'torrents'); 76 77 if ( $dp = opendir($torrent_dir . DIRECTORY_SEPARATOR) ) { 77 78 while ( ( $file = readdir($dp) ) !== false ) { 78 if ( $file != '.' && $file != '..' && !is_dir($ config['torrent_dir']. DIRECTORY_SEPARATOR . $file) ) {79 if ( $file != '.' && $file != '..' && !is_dir($torrent_dir . DIRECTORY_SEPARATOR . $file) ) { 79 80 if ( !preg_match('/^(\d+)\.torrent$/', $file, $matches) ) { 80 81 $delete_files[] = $file; … … 91 92 if ( sizeof($delete_files) ) { 92 93 for ( $i = 0; $i < sizeof($delete_files); ++$i ) { 93 @unlink($ config['torrent_dir']. '/' . $delete_files[$i]);94 @unlink($torrent_dir . '/' . $delete_files[$i]); 94 95 write_log('docleanup - ' . $delete_files[$i] . ' file deleted - not present in torrents table', LOG_VIEW_SYSOP); 95 96 } include/details/download.php
r184 r189 23 23 } 24 24 25 $ config['torrent_dir'] = ( !empty( $config['torrent_dir'] ) ? $config['torrent_dir'] : $root_path . 'torrents');26 $fn = $ config['torrent_dir']. '/' . $id . '.torrent';25 $torrent_dir = $root_path . ( !empty($config['torrent_dir']) ? $config['torrent_dir'] : 'torrents'); 26 $fn = $torrent_dir . '/' . $id . '.torrent'; 27 27 if ( !is_file( $fn ) || !is_readable( $fn ) ) { 28 28 trigger_error( $lang['error_reading_torrent_file'] ); include/details/edit.php
r185 r189 79 79 list( $tmpname, $infohash, $fname, $totallen, $filelist, $dname, $dict ) = check_torrent( $_FILES['file'] ); 80 80 81 $config['torrent_dir'] = ( !empty($config['torrent_dir']) ? $config['torrent_dir'] : $root_path . 'torrents'); 82 if ( @move_uploaded_file( $tmpname, $config['torrent_dir'] . DIRECTORY_SEPARATOR . $id . '.torrent' ) !== false ) { 83 if ( $fp = @fopen( $config['torrent_dir'] . DIRECTORY_SEPARATOR . $id . '.torrent', 'w' ) ) { 81 $torrent_dir = $root_path . ( !empty($config['torrent_dir']) ? $config['torrent_dir'] : 'torrents'); 82 83 if ( @move_uploaded_file( $tmpname, $torrent_dir . DIRECTORY_SEPARATOR . $id . '.torrent' ) !== false ) { 84 if ( $fp = @fopen( $torrent_dir . DIRECTORY_SEPARATOR . $id . '.torrent', 'w' ) ) { 84 85 $updateset[] = 'filename = ' . "'" . $db->sql_escape( $fname ) . "'"; 85 86 $updateset[] = 'size = ' . "'" . $db->sql_escape( $totallen ) . "'"; … … 107 108 } 108 109 } 109 elseif ( !file_exists( $ config['torrent_dir'] ) || !is_writable( $config['torrent_dir']. DIRECTORY_SEPARATOR ) ) {110 elseif ( !file_exists( $torrent_dir ) || !is_writable( $torrent_dir . DIRECTORY_SEPARATOR ) ) { 110 111 trigger_error( $lang['dir_not_exist_or_not_writable'] ); 111 112 } include/functions_delete.php
r184 r189 3 3 global $config, $db, $root_path; 4 4 5 $ config['torrent_dir'] = ( !empty($config['torrent_dir']) ? $config['torrent_dir'] : $root_path .'torrents');5 $torrent_dir = $root_path . ( !empty($config['torrent_dir']) ? $config['torrent_dir'] : 'torrents'); 6 6 $ids = implode(',', $arr_ids) ; 7 7 … … 43 43 44 44 foreach ( $arr_ids AS $_null => $id ) { 45 @unlink($ config['torrent_dir']. '/' . $id . '.torrent');45 @unlink($torrent_dir . '/' . $id . '.torrent'); 46 46 @unlink($root_path . 'cache/png/torrent_nfo_' . $id . '.png'); 47 47 } include/global.php
r184 r189 953 953 $length = $length - 3; 954 954 $words = preg_split("/[\s,]+/", $string, -1); 955 for($i =0; $i < sizeof($words); $i++) {955 for($i = 0; $i < sizeof($words); $i++) { 956 956 if ( $mb_ch && mb_strlen($line . $words[$i] . ' ', $lang['language_charset']) < $length){ 957 957 $line .= $words[$i] . ' '; phpBB2/includes/functions_post.php
r184 r189 39 39 // Clean up the message 40 40 // 41 $message = trim($message);42 41 43 42 if ($html_on) … … 62 61 $message = str_replace('"', '\"', $message); 63 62 } 64 else65 {66 $message = preg_replace($html_entities_match, $html_entities_replace, $message);67 }63 //else 64 //{ 65 // $message = preg_replace($html_entities_match, $html_entities_replace, $message); 66 //} 68 67 69 68 if($bbcode_on && $bbcode_uid != '') … … 149 148 $separator = str_replace("'", "''", $separator); 150 149 151 $message = ($message != $last_message) ? $last_message. $separator . trim($message) : trim($message);150 $message = ($message != $last_message) ? htmlspecialchars($last_message) . $separator . trim($message) : trim($message); 152 151 $message = prepare_message($message, $last_html, $last_bbcode, $last_smilies, $last_bbcode_uid); 153 152 … … 206 205 if (!empty($subject)) 207 206 { 208 $subject = htmlspecialchars(trim($subject));207 $subject = trim($subject); 209 208 } 210 209 else if ($mode == 'newtopic' || ($mode == 'editpost' && $post_data['first_post'])) … … 241 240 if (!empty($poll_title)) 242 241 { 243 $poll_title = htmlspecialchars(trim($poll_title));242 $poll_title = trim($poll_title); 244 243 } 245 244 … … 252 251 if (!empty($option_text)) 253 252 { 254 $temp_option_text[intval($option_id)] = htmlspecialchars($option_text);253 $temp_option_text[intval($option_id)] = $option_text; 255 254 } 256 255 } … … 385 384 if (!empty($option_text)) 386 385 { 387 $option_text = str_replace("\'", "''", htmlspecialchars($option_text));386 $option_text = str_replace("\'", "''", $option_text); 388 387 $poll_result = ($mode == "editpost" && isset($old_poll_result[$option_id])) ? $old_poll_result[$option_id] : 0; 389 388 … … 519 518 global $config, $lang, $db, $root_path, $phpEx; 520 519 global $userdata, $user_ip; 520 521 $forum_update_sql = ''; 521 522 522 523 if ($mode != 'poll_delete') phpBB2/posting.php
r184 r189 36 36 // 37 37 $params = array('submit' => 'post', 'preview' => 'preview', 'delete' => 'delete', 'poll_delete' => 'poll_delete', 'poll_add' => 'add_poll_option', 'poll_edit' => 'edit_poll_option', 'mode' => 'mode'); 38 while( list($var, $param) = @each($params) ) 39 { 40 if ( !empty($_POST[$param]) || !empty($_GET[$param]) ) 41 { 42 $$var = ( !empty($_POST[$param]) ) ? htmlspecialchars($_POST[$param]) : htmlspecialchars($_GET[$param]); 43 } 44 else 45 { 46 $$var = ''; 47 } 38 39 foreach ( $params AS $var => $param ) { 40 $$var = request_var($param, ''); 48 41 } 49 42 50 43 $confirm = isset($_POST['confirm']) ? true : false; 51 $sid = (isset($_POST['sid'])) ? $_POST['sid'] : 0;44 $sid = request_var('sid', ''); 52 45 53 46 $params = array('forum_id' => POST_FORUM_URL, 'topic_id' => POST_TOPIC_URL, 'post_id' => POST_POST_URL); 54 while( list($var, $param) = @each($params) ) 55 { 56 if ( !empty($_POST[$param]) || !empty($_GET[$param]) ) 57 { 58 $$var = ( !empty($_POST[$param]) ) ? intval($_POST[$param]) : intval($_GET[$param]); 59 } 60 else 61 { 62 $$var = ''; 63 } 47 48 foreach ( $params AS $var => $param ) { 49 $$var = request_var($param, 0); 64 50 } 65 51 … … 70 56 // Set topic type 71 57 // 72 $topic_type = ( isset($_POST['topictype']) ) ? intval($_POST['topictype']) : POST_NORMAL;58 $topic_type = request_var('topictype', POST_NORMAL); 73 59 $topic_type = ( in_array($topic_type, array(POST_NORMAL, POST_STICKY, POST_ANNOUNCE)) ) ? $topic_type : POST_NORMAL; 74 $post_data['topic_type'] = POST_NORMAL;75 60 76 61 // … … 220 205 } 221 206 222 $select_sql = (!$submit) ? ', t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.name AS username, u.uid, u.user_sig, u.user_sig_bbcode_uid' : ''; 223 $from_sql = ( !$submit ) ? ", " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u" : ''; 224 $where_sql = ( !$submit ) ? "AND pt.post_id = p.post_id AND u.uid = p.poster_id" : ''; 207 //$select_sql = (!$submit) ? ', t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.name AS username, u.uid, u.user_sig, u.user_sig_bbcode_uid' : ''; 208 //$from_sql = ( !$submit ) ? ", " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u" : ''; 209 //$where_sql = ( !$submit ) ? "AND pt.post_id = p.post_id AND u.uid = p.poster_id" : ''; 210 $select_sql = ', t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, p.post_time, pt.post_subject, pt.post_text, pt.bbcode_uid, u.name AS username, u.uid, u.user_sig, u.user_sig_bbcode_uid'; 211 $from_sql = ", " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u"; 212 $where_sql = "AND pt.post_id = p.post_id AND u.uid = p.poster_id"; 225 213 226 214 $sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_first_post_id, t.topic_last_post_id, t.topic_vote, p.post_id, p.poster_id" . $select_sql . " … … 236 224 return; 237 225 } 238 239 if ( ($result = $db->sql_query($sql)) && ($post_info = $db->sql_fetchrow($result)) ) 226 $result = $db->sql_query($sql); 227 228 if ( $post_info = $db->sql_fetchrow($result) ) 240 229 { 241 230 $db->sql_freeresult($result); … … 400 389 else 401 390 { 402 $html_on = ( $submit || $refresh ) ? ( ( !empty($_POST['disable_html']) ) ? 0 : TRUE) : $userdata['user_allowhtml'];391 $html_on = ( $submit || $refresh ) ? ( ( isset($_POST['disable_html']) ) ? 0 : true ) : $userdata['user_allowhtml']; 403 392 } 404 393 … … 409 398 else 410 399 { 411 $bbcode_on = ( $submit || $refresh ) ? ( ( !empty($_POST['disable_bbcode']) ) ? 0 : TRUE) : $config['allow_bbcode'];400 $bbcode_on = ( $submit || $refresh ) ? ( ( isset($_POST['disable_bbcode']) ) ? 0 : true ) : $config['allow_bbcode']; 412 401 } 413 402 … … 418 407 else 419 408 { 420 $smilies_on = ( $submit || $refresh ) ? ( ( !empty($_POST['disable_smilies']) ) ? 0 : TRUE) : $config['allow_smilies'];409 $smilies_on = ( $submit || $refresh ) ? ( ( isset($_POST['disable_smilies']) ) ? 0 : true ) : $config['allow_smilies']; 421 410 } 422 411 423 412 if ( ($submit || $refresh) && $is_auth['auth_read']) 424 413 { 425 $notify_user = ( !empty($_POST['notify']) ) ? TRUE: 0;414 $notify_user = ( isset($_POST['notify']) ) ? true : 0; 426 415 } 427 416 else … … 443 432 } 444 433 } 445 $attach_sig = ( $submit || $refresh ) ? ( ( !empty($_POST['attach_sig']) ) ? TRUE : 0 ) : ( ( $userdata['uid'] == ANONYMOUS ) ? 0 : ( $userdata['user_sig'] != '' ? TRUE : 0 ) ); 434 $attach_sig = ( $submit || $refresh ) ? ( ( isset($_POST['attach_sig']) ) ? TRUE : 0 ) : ( ( $userdata['uid'] == ANONYMOUS ) ? 0 : ( $userdata['user_sig'] != '' ? TRUE : 0 ) ); 435 436 $merge = false; 437 438 446 439 447 440 // -------------------- … … 469 462 'MESSAGE_TEXT' => $l_confirm, 470 463 471 'L_YES' => $lang['yes'],472 'L_NO' => $lang['no'],473 474 464 //'S_CONFIRM_ACTION' => append_sid("posting.$phpEx"), 475 465 'S_CONFIRM_ACTION' => append_sid("phpbb2.php?page=posting"), … … 488 478 // Vote in a poll 489 479 // 490 if ( !empty($_POST['vote_id']) )480 if ( isset($_POST['vote_id']) ) 491 481 { 492 482 $vote_option_id = intval($_POST['vote_id']); … … 566 556 case 'newtopic': 567 557 case 'reply': 568 $username = ( !empty($_POST['username']) ) ? $_POST['username'] : ''; 569 $subject = ( !empty($_POST['subject']) ) ? trim($_POST['subject']) : ''; 570 $message = ( !empty($_POST['message']) ) ? $_POST['message'] : ''; 571 $poll_title = ( isset($_POST['poll_title']) && $is_auth['auth_pollcreate'] ) ? $_POST['poll_title'] : ''; 572 $poll_options = ( isset($_POST['poll_option_text']) && $is_auth['auth_pollcreate'] ) ? $_POST['poll_option_text'] : ''; 573 $poll_length = ( isset($_POST['poll_length']) && $is_auth['auth_pollcreate'] ) ? $_POST['poll_length'] : ''; 574 $merge = false; 558 $username = request_var('username', ''); 559 $subject = request_var('subject', ''); 560 $message = request_var('message', ''); 561 562 $poll_title = ( isset($_POST['poll_title']) && $is_auth['auth_pollcreate'] ) ? request_var('poll_title', '') : ''; 563 $poll_options = ( isset($_POST['poll_option_text']) && $is_auth['auth_pollcreate'] ) ? request_var('poll_option_text', array(0 => '') ) : ''; 564 $poll_length = ( isset($_POST['poll_length']) && $is_auth['auth_pollcreate'] ) ? request_var('poll_length', 0) : ''; 565 575 566 $time2merge = intval($config['time_to_merge']) * 3600; 576 567 … … 663 654 if( $refresh || isset($_POST['del_poll_option']) || $error_msg != '' ) 664 655 { 665 $username = ( !empty($_POST['username']) ) ? htmlspecialchars(trim($_POST['username'])) : '';666 $subject = ( !empty($_POST['subject']) ) ? htmlspecialchars(trim($_POST['subject'])) : '';667 $message = ( !empty($_POST['message']) ) ? htmlspecialchars(trim($_POST['message'])) : '';668 669 $poll_title = ( !empty($_POST['poll_title']) ) ? htmlspecialchars(trim($_POST['poll_title'])) : '';670 $poll_length = ( isset($_POST['poll_length']) ) ? max(0, intval($_POST['poll_length'])) : 0;671 656 $username = request_var('username', ''); 657 $subject = request_var('subject', ''); 658 $message = request_var('message', ''); 659 660 $poll_title = request_var('poll_title', ''); 661 $poll_length = request_var('poll_length', 0); 662 $poll_option_text = request_var('poll_option_text', array( 0 => '' ) ); 672 663 $poll_options = array(); 673 if ( !empty($_POST['poll_option_text']) ) 674 { 675 while( list($option_id, $option_text) = @each($_POST['poll_option_text']) ) 676 { 677 if( isset($_POST['del_poll_option'][$option_id]) ) 678 { 679 unset($poll_options[$option_id]); 680 } 681 else if ( !empty($option_text) ) 682 { 683 $poll_options[intval($option_id)] = htmlspecialchars(trim($option_text)); 684 } 685 } 686 } 687 688 if ( isset($poll_add) && !empty($_POST['add_poll_option_text']) ) 689 { 690 $poll_options[] = htmlspecialchars(trim($_POST['add_poll_option_text'])); 664 665 foreach ( $poll_option_text AS $option_id => $option_text ) { 666 if( isset($_POST['del_poll_option'][$option_id]) ) 667 { 668 unset($poll_option_text[$option_id]); 669 } 670 else if ( !empty($option_text) ) 671 { 672 $poll_options[$option_id] = $option_text; 673 } 674 } 675 676 if ( isset($poll_add) && isset($_POST['add_poll_option_text']) && !empty($_POST['add_poll_option_text']) ) 677 { 678 $poll_options[] = request_var('add_poll_option_text', ''); 691 679 } 692 680 … … 823 811 $subject = ( $post_data['first_post'] ) ? $post_info['topic_title'] : $post_info['post_subject']; 824 812 $message = $post_info['post_text']; 813 $username = ''; 825 814 826 815 if ( $mode == 'editpost' ) … … 858 847 if ( $mode == 'quote' ) 859 848 { 860 $msg_date = create_date($config['default_dateformat'], $post row['post_time'], $config['board_timezone']);849 $msg_date = create_date($config['default_dateformat'], $post_info['post_time'], $config['board_timezone']); 861 850 862 851 // Use trim to get rid of spaces placed there by MS-SQL 2000 phpBB2/search.php
r184 r189 1302 1302 'PAGE_NUMBER' => sprintf($lang['page_of'], ( floor( $start / $per_page ) + 1 ), ceil( $total_match_count / $per_page )), 1303 1303 1304 'L_LAST POST' => $lang['last_post'],1304 'L_LAST_POST' => $lang['last_post'], 1305 1305 // Topic search MOD 1306 1306 'L_JUMP_TO_POST' => $lang['jump_to_post'], phpBB2/viewforum.php
r184 r189 425 425 'FOLDER_ANNOUNCE_NEW_IMG' => $images['folder_announce_new'], 426 426 427 'L_TOPICS' => $lang['topics'],428 'L_REPLIES' => $lang['replies'],429 'L_VIEWS' => $lang['views'],430 'L_POSTS' => $lang['posts'],431 'L_LASTPOST' => $lang['last_post'],432 427 'L_MODERATOR' => $l_moderators, 433 'L_MARK_TOPICS_READ' => $lang['mark_all_topics'],434 'L_POST_NEW_TOPIC' => ( $forum_row['forum_status'] == FORUM_LOCKED ) ? $lang['forum_locked'] : $lang['post_new_topic'],435 'L_NO_NEW_POSTS' => $lang['no_new_posts'],436 'L_NEW_POSTS' => $lang['new_posts'],437 'L_NO_NEW_POSTS_LOCKED' => $lang['no_new_posts_locked'],438 'L_NEW_POSTS_LOCKED' => $lang['new_posts_locked'],439 'L_NO_NEW_POSTS_HOT' => $lang['no_new_posts_hot'],440 'L_NEW_POSTS_HOT' => $lang['new_posts_hot'],441 'L_ANNOUNCEMENT' => $lang['post_announcement'],442 'L_STICKY' => $lang['post_sticky'],443 'L_POSTED' => $lang['posted'],444 'L_JOINED' => $lang['joined'],445 'L_AUTHOR' => $lang['author'],446 'L_SEARCH' => $lang['search'],447 428 'L_SEARCH_IN_FORUM' => $lang['search_in_forum'], 448 429 phpBB2/viewtopic.php
r187 r189 71 71 72 72 // 73 // Start session management 74 // 75 $userdata = session_pagestart($user_ip); 76 init_userprefs($userdata); 77 // 78 // End session management 79 // 80 81 // 73 82 // Find topic id if user requested a newer 74 83 // or older topic … … 79 88 { 80 89 $sql = "SELECT p.post_id 81 FROM " . POSTS_TABLE . " p, " . SESSIONS_TABLE . " s, " . USERS_TABLE . " u 82 WHERE s.session_id = '" . $userdata['session_id'] . "' 83 AND u.uid = s.session_user_id 84 AND p.topic_id = $topic_id 85 AND p.post_time >= u.user_lastvisit 90 FROM " . POSTS_TABLE . " p 91 WHERE p.topic_id = $topic_id 92 AND p.post_time >= " . $userdata['user_lastvisit'] . " 86 93 ORDER BY p.post_time ASC 87 94 LIMIT 1"; … … 152 159 153 160 $forum_id = intval($forum_topic_data['forum_id']); 154 155 //156 // Start session management157 //158 $userdata = session_pagestart($user_ip, $forum_id);159 init_userprefs($userdata);160 //161 // End session management162 //163 161 164 162 if(!file_exists(@phpbb_realpath($root_path . 'languages/lang_' . $config['default_lang'] . '/lang_printertopic.'.$phpEx))) templates/bithdtv/forum/viewforum_body.tpl
r87 r189 107 107 <td>{L_NO_NEW_POSTS}</td> 108 108 <td> </td> 109 <td width="20" align="center"><img src="{FOLDER_ANNOUNCE_IMG}" alt="{L_ ANNOUNCEMENT}" width="18" height="18" /></td>109 <td width="20" align="center"><img src="{FOLDER_ANNOUNCE_IMG}" alt="{L_POST_ANNOUNCEMENT}" width="18" height="18" /></td> 110 110 <td>{L_POST_ANNOUNCEMENT}</td> 111 111 </tr> … … 117 117 <td>{L_NO_NEW_POSTS_HOT}</td> 118 118 <td> </td> 119 <td width="20" align="center"><img src="{FOLDER_STICKY_IMG}" alt="{L_ STICKY}" width="18" height="18" /></td>119 <td width="20" align="center"><img src="{FOLDER_STICKY_IMG}" alt="{L_POST_STICKY}" width="18" height="18" /></td> 120 120 <td>{L_POST_STICKY}</td> 121 121 </tr> templates/main/browse.html
r147 r189 8 8 <tr valign="top"> 9 9 <!-- BEGIN cats_col --> 10 <td align="left"><span class="nowrap"><input name="c{cats_row.cats_col.CAT_ID}" type="checkbox" value="1"{cats_row.cats_col.CHECKED} /> <a href="{cats_row.cats_col.U_CAT}"><strong>{cats_row.cats_col.CAT_NAME}</strong></a></span><!-- IF cats_row.cats_col.SHOW_SUBCATS --> <a href="javascript:void(0);" onclick="show_hide('{cats_row.cats_col.CAT_ID}');"><img src="{TRACKER_URL}/pic/<!-- IF cats_row.cats_col.OPEN_SUBCATS -->minus<!-- ELSE -->plus<!-- ENDIF -->.gif" id="pic{cats_row.cats_col.CAT_ID}" /></a><!-- ENDIF --> 10 <td align="left"><span class="nowrap"><input name="c{cats_row.cats_col.CAT_ID}" type="checkbox" value="1"{cats_row.cats_col.CHECKED} /> <a href="{cats_row.cats_col.U_CAT}"><strong>{cats_row.cats_col.CAT_NAME}</strong></a> 11 <!-- IF cats_row.cats_col.SHOW_SUBCATS --> 12 <a href="javascript:void(0);" onclick="show_hide('{cats_row.cats_col.CAT_ID}');"><img src="{TRACKER_URL}/pic/<!-- IF cats_row.cats_col.OPEN_SUBCATS -->minus<!-- ELSE -->plus<!-- ENDIF -->.gif" id="pic{cats_row.cats_col.CAT_ID}" /></a> 13 <!-- ENDIF --> 14 </span> 15 11 16 <div style="padding-left:10px;display:<!-- IF cats_row.cats_col.OPEN_SUBCATS -->block<!-- ELSE -->none<!-- ENDIF -->;" id="k{cats_row.cats_col.CAT_ID}"> 12 17 <!-- BEGIN subcats_row --> templates/main/forum/viewforum_body.tpl
r83 r189 107 107 <td>{L_NO_NEW_POSTS}</td> 108 108 <td> </td> 109 <td width="20" align="center"><img src="{FOLDER_ANNOUNCE_IMG}" alt="{L_ ANNOUNCEMENT}" width="19" height="18" /></td>109 <td width="20" align="center"><img src="{FOLDER_ANNOUNCE_IMG}" alt="{L_POST_ANNOUNCEMENT}" width="19" height="18" /></td> 110 110 <td>{L_POST_ANNOUNCEMENT}</td> 111 111 </tr> … … 117 117 <td>{L_NO_NEW_POSTS_HOT}</td> 118 118 <td> </td> 119 <td width="20" align="center"><img src="{FOLDER_STICKY_IMG}" alt="{L_ STICKY}" width="19" height="18" /></td>119 <td width="20" align="center"><img src="{FOLDER_STICKY_IMG}" alt="{L_POST_STICKY}" width="19" height="18" /></td> 120 120 <td>{L_POST_STICKY}</td> 121 121 </tr> templates/main/main.css
r165 r189 88 88 padding: 0 10px 0 10px; 89 89 min-width: 960px; 90 max-width: 1280px;91 90 margin: auto; 92 91 } … … 296 295 border: solid 1px #A9B8C2; 297 296 min-width: 570px; 298 max-width: 750px;299 297 width:90%; 300 298 } … … 316 314 font-family: Verdana, Arial, Helvetica, sans-serif; 317 315 font-size: 1.1em; 318 border: 1px solid #000000;316 border: 1px solid #000000; 319 317 background: none; 320 318 margin-bottom: 10px; 321 319 text-align:left; 322 320 background-color:#EFEFEF; 323 width:600px; 324 padding: 5px 5px 5px 5px;} 325 .caption-index{ 326 font: bold 1.2em Arial, Helvetica, sans-serif; 321 min-width:600px; 322 width:80%; 323 padding: 5px 5px 5px 5px; 324 } 325 326 .caption-index { 327 font: bold 1.2em Arial, Helvetica, sans-serif; 327 328 text-decoration: none; 328 329 line-height: 120%; 329 330 margin-top: 25px; 330 width:600px; 331 text-align:left;} 331 min-width:600px; 332 width:80%; 333 text-align:left; 334 } 332 335 ul.news { 333 336 text-align:left; templates/main/ucp_body.html
r147 r189 34 34 <tr valign="top"> 35 35 <!-- BEGIN cats_col --> 36 <td align="left">< span class="nowrap"><input name="cats[{main_part.cats_row.cats_col.CAT_ID}]" type="checkbox" value="yes"{main_part.cats_row.cats_col.CHECKED} /> <strong>{main_part.cats_row.cats_col.CAT_NAME}</strong></span>36 <td align="left"><input name="cats[{main_part.cats_row.cats_col.CAT_ID}]" type="checkbox" value="yes"{main_part.cats_row.cats_col.CHECKED} /> <strong>{main_part.cats_row.cats_col.CAT_NAME}</strong> 37 37 <!-- BEGIN subcats_row --> 38 <br /><span class="nowrap"style="padding-left:10px"><input name="cats[{cats_row.cats_col.subcats_row.CAT_ID}]" type="checkbox" value="yes"{cats_row.cats_col.subcats_row.CHECKED} /> {cats_row.cats_col.subcats_row.CAT_NAME}</span>38 <br /><span style="padding-left:10px"><input name="cats[{cats_row.cats_col.subcats_row.CAT_ID}]" type="checkbox" value="yes"{cats_row.cats_col.subcats_row.CHECKED} /> {cats_row.cats_col.subcats_row.CAT_NAME}</span> 39 39 <!-- END subcats_row --> 40 40 </td> templates/main/ucp_checkcomm_body.html
r148 r189 7 7 <!-- ELSE --> 8 8 9 <table >9 <table width="100%" cellpadding="0" cellspacing="0"> 10 10 <col class="col1" /><col class="col1" /><col class="col1" /> 11 11 <thead> templates/reflection/forum/modcp_body.tpl
r83 r189 20 20 <th nowrap="nowrap"> {L_TOPICS} </th> 21 21 <th width="8%" nowrap="nowrap"> {L_REPLIES} </th> 22 <th width="17%" nowrap="nowrap"> {L_LAST POST} </th>22 <th width="17%" nowrap="nowrap"> {L_LAST_POST} </th> 23 23 <th width="5%" class="thRight" nowrap="nowrap"> {L_SELECT} </th> 24 24 </tr> templates/reflection/forum/search_results_topics.tpl
r83 r189 21 21 <th class="thTop" nowrap="nowrap"> {L_REPLIES} </th> 22 22 <th class="thTop" nowrap="nowrap"> {L_VIEWS} </th> 23 <th class="thCornerR" nowrap="nowrap"> {L_LAST POST} </th>23 <th class="thCornerR" nowrap="nowrap"> {L_LAST_POST} </th> 24 24 </tr> 25 25 <!-- BEGIN searchresults --> templates/reflection/forum/viewforum_body.tpl
r83 r189 107 107 <td class="gensmall">{L_NO_NEW_POSTS}</td> 108 108 <td> </td> 109 <td width="20" align="center"><img src="{FOLDER_ANNOUNCE_IMG}" alt="{L_ ANNOUNCEMENT}" width="19" height="18" /></td>110 <td class="gensmall">{L_ ANNOUNCEMENT}</td>109 <td width="20" align="center"><img src="{FOLDER_ANNOUNCE_IMG}" alt="{L_POST_ANNOUNCEMENT}" width="19" height="18" /></td> 110 <td class="gensmall">{L_POST_ANNOUNCEMENT}</td> 111 111 </tr> 112 112 <tr> … … 117 117 <td class="gensmall">{L_NO_NEW_POSTS_HOT}</td> 118 118 <td> </td> 119 <td width="20" align="center"><img src="{FOLDER_STICKY_IMG}" alt="{L_ STICKY}" width="19" height="18" /></td>120 <td class="gensmall">{L_ STICKY}</td>119 <td width="20" align="center"><img src="{FOLDER_STICKY_IMG}" alt="{L_POST_STICKY}" width="19" height="18" /></td> 120 <td class="gensmall">{L_POST_STICKY}</td> 121 121 </tr> 122 122 <tr> upload.php
r184 r189 173 173 174 174 $id = $db->sql_nextid(); 175 $config['torrent_dir'] = ( !empty($config['torrent_dir']) ? $config['torrent_dir'] : $root_path . 'torrents'); 176 if ( @move_uploaded_file($tmpname, $config['torrent_dir'] . DIRECTORY_SEPARATOR . $id . '.torrent') !== false ) { 175 176 $torrent_dir = $root_path . ( !empty($config['torrent_dir']) ? $config['torrent_dir'] : 'torrents'); 177 178 if ( @move_uploaded_file($tmpname, $torrent_dir . DIRECTORY_SEPARATOR . $id . '.torrent') !== false ) { 177 179 178 180 $sql = 'INSERT INTO ' . COMMENTS_NOTIFY_TABLE . ' (checkcomm_userid, checkcomm_for_id, checkcomm_type) VALUES (' . $userdata['uid'] . ', ' . $id . ', ' . COMMENT_TYPE_TORRENT . ')'; … … 187 189 //private tracker start 188 190 if ( !$private ) { 189 if ( $fp = @fopen($ config['torrent_dir']. DIRECTORY_SEPARATOR . $id . '.torrent', 'w') ) {191 if ( $fp = @fopen($torrent_dir . DIRECTORY_SEPARATOR . $id . '.torrent', 'w') ) { 190 192 @fwrite($fp, benc($dict), strlen(benc($dict))); 191 193 fclose($fp); … … 201 203 $sql = 'DELETE FROM ' . TORRENTS_TABLE . ' WHERE fid = ' . $id; 202 204 $db->sql_query($sql); 203 if ( !file_exists($ config['torrent_dir']) || !is_writable($config['torrent_dir']. DIRECTORY_SEPARATOR) ) {205 if ( !file_exists($torrent_dir) || !is_writable($torrent_dir . DIRECTORY_SEPARATOR) ) { 204 206 trigger_error($lang['dir_not_exist_or_not_writable']); 205 207 }
