Changeset 189

Show
Ignore:
Timestamp:
12/27/08 13:20:57 (3 years ago)
Author:
Nafania
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • admin/index.php

    r184 r189  
    265265 
    266266        $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 
    268270        if ($torrents_dir = @opendir($torrent_dir)) 
    269271        { 
  • docleanup.php

    r184 r189  
    7373                $torrents[$row['fid']] = 1; 
    7474        } 
    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) ) { 
    7778                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) ) { 
    7980                                if ( !preg_match('/^(\d+)\.torrent$/', $file, $matches) ) { 
    8081                                        $delete_files[] = $file; 
     
    9192        if ( sizeof($delete_files) ) { 
    9293                for ( $i = 0; $i < sizeof($delete_files); ++$i ) { 
    93                         @unlink($config['torrent_dir'] . '/' . $delete_files[$i]); 
     94                        @unlink($torrent_dir . '/' . $delete_files[$i]); 
    9495                        write_log('docleanup - ' . $delete_files[$i] . ' file deleted - not present in torrents table', LOG_VIEW_SYSOP); 
    9596                } 
  • include/details/download.php

    r184 r189  
    2323} 
    2424 
    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'; 
    2727if ( !is_file( $fn ) || !is_readable( $fn ) ) { 
    2828        trigger_error( $lang['error_reading_torrent_file'] ); 
  • include/details/edit.php

    r185 r189  
    7979                list( $tmpname, $infohash, $fname, $totallen, $filelist, $dname, $dict ) = check_torrent( $_FILES['file'] ); 
    8080 
    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' ) ) { 
    8485                                $updateset[] = 'filename = ' . "'" . $db->sql_escape( $fname ) . "'"; 
    8586                                $updateset[] = 'size = ' . "'" . $db->sql_escape( $totallen ) . "'"; 
     
    107108                        } 
    108109                } 
    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 ) ) { 
    110111                        trigger_error( $lang['dir_not_exist_or_not_writable'] ); 
    111112                } 
  • include/functions_delete.php

    r184 r189  
    33        global $config, $db, $root_path; 
    44 
    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'); 
    66        $ids = implode(',', $arr_ids) ; 
    77 
     
    4343 
    4444          foreach ( $arr_ids AS $_null => $id ) { 
    45                   @unlink($config['torrent_dir'] . '/' . $id . '.torrent'); 
     45                  @unlink($torrent_dir . '/' . $id . '.torrent'); 
    4646                  @unlink($root_path . 'cache/png/torrent_nfo_' . $id . '.png'); 
    4747          } 
  • include/global.php

    r184 r189  
    953953                $length = $length - 3; 
    954954                $words = preg_split("/[\s,]+/", $string, -1); 
    955                 for($i=0; $i < sizeof($words); $i++) { 
     955                for($i = 0; $i < sizeof($words); $i++) { 
    956956                        if ( $mb_ch && mb_strlen($line . $words[$i] . ' ', $lang['language_charset']) < $length){ 
    957957                                $line .= $words[$i] . ' '; 
  • phpBB2/includes/functions_post.php

    r184 r189  
    3939        // Clean up the message 
    4040        // 
    41         $message = trim($message); 
    4241 
    4342        if ($html_on) 
     
    6261                $message = str_replace('&quot;', '\&quot;', $message); 
    6362        } 
    64         else 
    65        
    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        //
    6867 
    6968        if($bbcode_on && $bbcode_uid != '') 
     
    149148        $separator = str_replace("'", "''", $separator); 
    150149 
    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); 
    152151        $message = prepare_message($message, $last_html, $last_bbcode, $last_smilies, $last_bbcode_uid); 
    153152 
     
    206205        if (!empty($subject)) 
    207206        { 
    208                 $subject = htmlspecialchars(trim($subject)); 
     207                $subject = trim($subject); 
    209208        } 
    210209        else if ($mode == 'newtopic' || ($mode == 'editpost' && $post_data['first_post'])) 
     
    241240                if (!empty($poll_title)) 
    242241                { 
    243                         $poll_title = htmlspecialchars(trim($poll_title)); 
     242                        $poll_title = trim($poll_title); 
    244243                } 
    245244 
     
    252251                                if (!empty($option_text)) 
    253252                                { 
    254                                         $temp_option_text[intval($option_id)] = htmlspecialchars($option_text)
     253                                        $temp_option_text[intval($option_id)] = $option_text
    255254                                } 
    256255                        } 
     
    385384                        if (!empty($option_text)) 
    386385                        { 
    387                                 $option_text = str_replace("\'", "''", htmlspecialchars($option_text)); 
     386                                $option_text = str_replace("\'", "''", $option_text); 
    388387                                $poll_result = ($mode == "editpost" && isset($old_poll_result[$option_id])) ? $old_poll_result[$option_id] : 0; 
    389388 
     
    519518        global $config, $lang, $db, $root_path, $phpEx; 
    520519        global $userdata, $user_ip; 
     520 
     521        $forum_update_sql = ''; 
    521522 
    522523        if ($mode != 'poll_delete') 
  • phpBB2/posting.php

    r184 r189  
    3636// 
    3737$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 
     39foreach ( $params AS $var => $param ) { 
     40        $$var = request_var($param, ''); 
    4841} 
    4942 
    5043$confirm = isset($_POST['confirm']) ? true : false; 
    51 $sid = (isset($_POST['sid'])) ? $_POST['sid'] : 0
     44$sid = request_var('sid', '')
    5245 
    5346$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 
     48foreach ( $params AS $var => $param ) { 
     49        $$var = request_var($param, 0); 
    6450} 
    6551 
     
    7056// Set topic type 
    7157// 
    72 $topic_type = ( isset($_POST['topictype']) ) ? intval($_POST['topictype']) : POST_NORMAL
     58$topic_type = request_var('topictype', POST_NORMAL)
    7359$topic_type = ( in_array($topic_type, array(POST_NORMAL, POST_STICKY, POST_ANNOUNCE)) ) ? $topic_type : POST_NORMAL; 
    74 $post_data['topic_type'] = POST_NORMAL; 
    7560 
    7661// 
     
    220205                } 
    221206 
    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"; 
    225213 
    226214                $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 . " 
     
    236224                return; 
    237225} 
    238  
    239 if ( ($result = $db->sql_query($sql)) && ($post_info = $db->sql_fetchrow($result)) ) 
     226$result = $db->sql_query($sql); 
     227 
     228if ( $post_info = $db->sql_fetchrow($result) ) 
    240229{ 
    241230        $db->sql_freeresult($result); 
     
    400389else 
    401390{ 
    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']; 
    403392} 
    404393 
     
    409398else 
    410399{ 
    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']; 
    412401} 
    413402 
     
    418407else 
    419408{ 
    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']; 
    421410} 
    422411 
    423412if ( ($submit || $refresh) && $is_auth['auth_read']) 
    424413{ 
    425         $notify_user = ( !empty($_POST['notify']) ) ? TRUE : 0; 
     414        $notify_user = ( isset($_POST['notify']) ) ? true : 0; 
    426415} 
    427416else 
     
    443432        } 
    444433} 
    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 
    446439 
    447440// -------------------- 
     
    469462                'MESSAGE_TEXT' => $l_confirm, 
    470463 
    471                 'L_YES' => $lang['yes'], 
    472                 'L_NO' => $lang['no'], 
    473  
    474464                //'S_CONFIRM_ACTION' => append_sid("posting.$phpEx"), 
    475465                'S_CONFIRM_ACTION' => append_sid("phpbb2.php?page=posting"), 
     
    488478        // Vote in a poll 
    489479        // 
    490         if ( !empty($_POST['vote_id']) ) 
     480        if ( isset($_POST['vote_id']) ) 
    491481        { 
    492482                $vote_option_id = intval($_POST['vote_id']); 
     
    566556                case 'newtopic': 
    567557                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 
    575566                        $time2merge = intval($config['time_to_merge']) * 3600; 
    576567 
     
    663654if( $refresh || isset($_POST['del_poll_option']) || $error_msg != '' ) 
    664655{ 
    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 => '' ) ); 
    672663        $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', ''); 
    691679        } 
    692680 
     
    823811                $subject = ( $post_data['first_post'] ) ? $post_info['topic_title'] : $post_info['post_subject']; 
    824812                $message = $post_info['post_text']; 
     813                $username = ''; 
    825814 
    826815                if ( $mode == 'editpost' ) 
     
    858847                if ( $mode == 'quote' ) 
    859848                { 
    860                         $msg_date =  create_date($config['default_dateformat'], $postrow['post_time'], $config['board_timezone']); 
     849                        $msg_date =  create_date($config['default_dateformat'], $post_info['post_time'], $config['board_timezone']); 
    861850 
    862851                        // Use trim to get rid of spaces placed there by MS-SQL 2000 
  • phpBB2/search.php

    r184 r189  
    13021302                        'PAGE_NUMBER' => sprintf($lang['page_of'], ( floor( $start / $per_page ) + 1 ), ceil( $total_match_count / $per_page )), 
    13031303 
    1304                         'L_LASTPOST' => $lang['last_post'], 
     1304                        'L_LAST_POST' => $lang['last_post'], 
    13051305                        // Topic search MOD 
    13061306                        'L_JUMP_TO_POST' => $lang['jump_to_post'], 
  • phpBB2/viewforum.php

    r184 r189  
    425425        'FOLDER_ANNOUNCE_NEW_IMG' => $images['folder_announce_new'], 
    426426 
    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'], 
    432427        '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'], 
    447428        'L_SEARCH_IN_FORUM' => $lang['search_in_forum'], 
    448429 
  • phpBB2/viewtopic.php

    r187 r189  
    7171 
    7272// 
     73// Start session management 
     74// 
     75$userdata = session_pagestart($user_ip); 
     76init_userprefs($userdata); 
     77// 
     78// End session management 
     79// 
     80 
     81// 
    7382// Find topic id if user requested a newer 
    7483// or older topic 
     
    7988        { 
    8089                        $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'] . " 
    8693                                 ORDER BY p.post_time ASC 
    8794                              LIMIT 1"; 
     
    152159 
    153160$forum_id = intval($forum_topic_data['forum_id']); 
    154  
    155 // 
    156 // Start session management 
    157 // 
    158 $userdata = session_pagestart($user_ip, $forum_id); 
    159 init_userprefs($userdata); 
    160 // 
    161 // End session management 
    162 // 
    163161 
    164162if(!file_exists(@phpbb_realpath($root_path . 'languages/lang_' . $config['default_lang'] . '/lang_printertopic.'.$phpEx))) 
  • templates/bithdtv/forum/viewforum_body.tpl

    r87 r189  
    107107                                <td>{L_NO_NEW_POSTS}</td> 
    108108                                <td>&nbsp;&nbsp;</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> 
    110110                                <td>{L_POST_ANNOUNCEMENT}</td> 
    111111                        </tr> 
     
    117117                                <td>{L_NO_NEW_POSTS_HOT}</td> 
    118118                                <td>&nbsp;&nbsp;</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> 
    120120                                <td>{L_POST_STICKY}</td> 
    121121                        </tr> 
  • templates/main/browse.html

    r147 r189  
    88        <tr valign="top"> 
    99                <!-- 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 
    1116                        <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}"> 
    1217                        <!-- BEGIN subcats_row --> 
  • templates/main/forum/viewforum_body.tpl

    r83 r189  
    107107                                <td>{L_NO_NEW_POSTS}</td> 
    108108                                <td>&nbsp;&nbsp;</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> 
    110110                                <td>{L_POST_ANNOUNCEMENT}</td> 
    111111                        </tr> 
     
    117117                                <td>{L_NO_NEW_POSTS_HOT}</td> 
    118118                                <td>&nbsp;&nbsp;</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> 
    120120                                <td>{L_POST_STICKY}</td> 
    121121                        </tr> 
  • templates/main/main.css

    r165 r189  
    8888        padding: 0 10px 0 10px; 
    8989        min-width: 960px; 
    90         max-width: 1280px; 
    9190        margin: auto; 
    9291} 
     
    296295        border: solid 1px  #A9B8C2; 
    297296        min-width: 570px; 
    298         max-width: 750px; 
    299297        width:90%; 
    300298} 
     
    316314        font-family: Verdana, Arial, Helvetica, sans-serif; 
    317315        font-size: 1.1em; 
    318 border: 1px solid #000000; 
     316       border: 1px solid #000000; 
    319317        background: none; 
    320318        margin-bottom: 10px; 
    321319        text-align:left; 
    322320        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; 
    327328        text-decoration: none; 
    328329        line-height: 120%; 
    329330        margin-top: 25px; 
    330         width:600px; 
    331         text-align:left;} 
     331        min-width:600px; 
     332        width:80%; 
     333        text-align:left; 
     334
    332335ul.news { 
    333336text-align:left; 
  • templates/main/ucp_body.html

    r147 r189  
    3434                                <tr valign="top"> 
    3535                                <!-- 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} />&nbsp;<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} />&nbsp;<strong>{main_part.cats_row.cats_col.CAT_NAME}</strong
    3737                                                <!-- 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} />&nbsp;{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} />&nbsp;{cats_row.cats_col.subcats_row.CAT_NAME}</span> 
    3939                                                <!-- END subcats_row --> 
    4040                                        </td> 
  • templates/main/ucp_checkcomm_body.html

    r148 r189  
    77<!-- ELSE --> 
    88 
    9 <table
     9<table width="100%" cellpadding="0" cellspacing="0"
    1010        <col class="col1" /><col class="col1" /><col class="col1" /> 
    1111        <thead> 
  • templates/reflection/forum/modcp_body.tpl

    r83 r189  
    2020          <th nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th> 
    2121          <th width="8%" nowrap="nowrap">&nbsp;{L_REPLIES}&nbsp;</th> 
    22           <th width="17%" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th> 
     22          <th width="17%" nowrap="nowrap">&nbsp;{L_LAST_POST}&nbsp;</th> 
    2323          <th width="5%" class="thRight" nowrap="nowrap">&nbsp;{L_SELECT}&nbsp;</th> 
    2424        </tr> 
  • templates/reflection/forum/search_results_topics.tpl

    r83 r189  
    2121        <th class="thTop" nowrap="nowrap">&nbsp;{L_REPLIES}&nbsp;</th> 
    2222        <th class="thTop" nowrap="nowrap">&nbsp;{L_VIEWS}&nbsp;</th> 
    23         <th class="thCornerR" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th> 
     23        <th class="thCornerR" nowrap="nowrap">&nbsp;{L_LAST_POST}&nbsp;</th> 
    2424  </tr> 
    2525  <!-- BEGIN searchresults --> 
  • templates/reflection/forum/viewforum_body.tpl

    r83 r189  
    107107                                <td class="gensmall">{L_NO_NEW_POSTS}</td> 
    108108                                <td>&nbsp;&nbsp;</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> 
    111111                        </tr> 
    112112                        <tr> 
     
    117117                                <td class="gensmall">{L_NO_NEW_POSTS_HOT}</td> 
    118118                                <td>&nbsp;&nbsp;</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> 
    121121                        </tr> 
    122122                        <tr> 
  • upload.php

    r184 r189  
    173173 
    174174                $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 ) { 
    177179 
    178180                        $sql = 'INSERT INTO ' . COMMENTS_NOTIFY_TABLE . ' (checkcomm_userid, checkcomm_for_id, checkcomm_type) VALUES (' . $userdata['uid'] . ', ' . $id . ', ' . COMMENT_TYPE_TORRENT . ')'; 
     
    187189                        //private tracker start 
    188190                        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') ) { 
    190192                         @fwrite($fp, benc($dict), strlen(benc($dict))); 
    191193                         fclose($fp); 
     
    201203                        $sql = 'DELETE FROM ' . TORRENTS_TABLE . ' WHERE fid = ' . $id; 
    202204                        $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) ) { 
    204206                                trigger_error($lang['dir_not_exist_or_not_writable']); 
    205207                        }