Changeset 324

Show
Ignore:
Timestamp:
12/07/10 22:45:36 (1 year ago)
Author:
Nafania
Message:

Много мелких изменений. Если используется xbtt, то надо обязательно скачать новую версию на форуме.
Добавлен файл cron.php - если есть возможность, то пускайте cron таски через него. Особенно если используете массовую рассылку почты.

Files:

Legend:

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

    r294 r324  
    9797                $template_file = file_get_contents($root_path . 'templates/upload_templates/' . $cat_id . '.html'); 
    9898 
    99                 //preg_match_all('/<tr(.*?)>(.*?)<\/tr>/si', $template_file, $tr_content); 
    10099                preg_match_all('/<!-- IF(.*?)>(.*?)<!-- ENDIF -->/si', $template_file, $tr_content); 
    101100 
     
    462461 
    463462                                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; 
    465464                                        $result = $db->sql_query($sql); 
    466465                                        $ids = array(); 
    467466                                        while ( $row = $db->sql_fetchrow($result) ) { 
    468                                                 $ids[] = $row['fid']; 
     467                                                $ids[$row['info_hash']] = $row['fid']; 
    469468                                        } 
    470469                                        deletetorrent($ids); 
  • admin/admin_mass_email.php

    r317 r324  
    4444@set_time_limit(0); 
    4545@ignore_user_abort(true); 
     46@ini_set('memory_limit', -1); 
    4647 
    4748$message = ''; 
     
    7475        $group_id = ( isset($_POST[POST_GROUPS_URL]) ? intval($_POST[POST_GROUPS_URL]) : 0 ); 
    7576 
    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, name FROM " . 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; 
    7778        $result = $db->sql_query($sql); 
    7879 
     
    8283 
    8384                // 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; 
    8586                $email_list = array(); 
    8687 
     
    9899 
    99100                        $email_list[$j][$i]['email']    = $row['email']; 
    100                         $email_list[$j][$i]['name']             = $row['name']; 
    101101                        $i++; 
    102102                } 
     
    112112                for ($i = 0, $size = sizeof($email_list); $i < $size; $i++) 
    113113                { 
     114                        $send_to = false; 
    114115                        for ($j = 0, $list_size = sizeof($email_list[$i]); $j < $list_size; $j++) 
    115116                        { 
    116117                                $email_row = $email_list[$i][$j]; 
    117118 
    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                                } 
    119126                        } 
    120  
     127                        if ( $send_to ) { 
     128                                $messenger->to($config['sitemail']); 
     129                        } 
    121130                        $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  
    128131                        $messenger->subject($subject); 
    129132                        $messenger->set_mail_priority($priority); 
     
    133136                                'MESSAGE' => $message 
    134137                        )); 
    135  
    136                         if (!($messenger->send(NOTIFY_EMAIL))) 
    137                         { 
    138                                 $error = true; 
    139                         } 
     138                        unset($email_list[$i]); 
     139 
     140                        $messenger->send(NOTIFY_EMAIL); 
    140141 
    141142                } 
    142                 unset($email_list); 
    143143 
    144144                $messenger->save_queue(); 
  • admin/admin_users.php

    r319 r324  
    116116                                'year' => 0, 
    117117                                'month' => 0, 
    118                                 'day' => 0 
     118                                'day' => 0, 
     119                                'bonus' => 0 
    119120                        ); 
    120121 
     
    265266                                $updateset[] = 'uploaded = uploaded + ' . $add_upload * 1024 * 1024 * 1024; 
    266267                                $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']); 
    267273                        } 
    268274 
     
    420426                        $user_status = $this_userdata['enabled']; 
    421427                        $invites = intval($this_userdata['invites']); 
     428                        $bonus = number_format( $config['my_bonus_points'] * ( $this_userdata['total_seed_time'] / 3600 ), 2 ); 
    422429 
    423430 
     
    426433                        $s_hidden_fields .= '<input type="hidden" name="add_upload_reason" value="" />'; 
    427434                        //$s_hidden_fields .= '<input type="hidden" name="signature" value="' . str_replace("\"", "&quot;", $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="" />' : '' ); 
    430438 
    431439                        $cats = $cache->obtain_cats(); 
     
    563571 
    564572                                '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                        )); 
    567577 
    568578                        $template->display('body'); 
  • admin/admin_voting.php

    r269 r324  
    3737include($root_path . 'languages/lang_' . $config['default_lang'] . '/lang_admin_voting.' . $phpEx); 
    3838 
    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 
    5741if ( $mode == 'delete' ) { 
    5842        $vote_id = ( isset($_GET['vote_id']) ? intval($_GET['vote_id']) : 0 ); 
     
    8165                trigger_error('Invalid poll id'); 
    8266        } 
     67} 
     68 
     69if ( $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))); 
    83101} 
    84102 
     
    354372        )); 
    355373 
    356         // Assign Username array 
    357         $sql = "SELECT DISTINCT u.uid, u.name AS username, u.class, u.warneduntil, u.enabled, u.donor, u.parked 
    358                 FROM " . USERS_TABLE . " AS u , " . VOTE_USERS_TABLE . " AS vv 
    359                 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 array 
    369         $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 results 
    386         $sql = "SELECT vote_id, vote_user_id, vote_cast 
    387                 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  
    400374 
    401375        $sql ="SELECT * 
     
    459433                ); 
    460434 
    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  
    480435        } 
    481436 
     
    491446        { 
    492447                $total_polls = $total['total']; 
    493                 $pagination = generate_pagination("admin_voting.$phpEx?mode=$sort_field&amp;order=$sort_order", $total_polls, $config['posts_per_page'], $start). '&nbsp;'; 
     448                $pagination = generate_pagination($admin_path . "admin_voting.$phpEx?mode=$sort_field&amp;order=$sort_order", $total_polls, $config['posts_per_page'], $start). '&nbsp;'; 
    494449        } 
    495450 
  • admin/pagestart.php

    r294 r324  
    3636$userdata = session_pagestart($user_ip); 
    3737init_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) ); 
    3940 
    4041$current_page = extract_current_page(); 
     
    5556} 
    5657 
    57 if ( !isset($no_page_header)
     58if ( !$no_page_header
    5859{ 
    5960        // Not including the pageheader can be neccesarry if META tags are 
  • ajax.php

    r317 r324  
    88loggedinorreturn(); 
    99 
    10 if (!$_SERVER['HTTP_REFERER']) { 
     10if (empty($_SERVER['HTTP_REFERER'])) { 
    1111        redirect( append_sid($root_path)); 
    1212} 
     
    146146 
    147147        case 'rating': 
    148                 $id = request_var('id', 0); 
     148                $id = request_var('torrent_id', 0); 
    149149                $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; 
    155158                $result = $db->sql_query($sql); 
    156159                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)))); 
    201195        break; 
    202196 
     
    256250 
    257251        case 'update_tag': 
     252                require_once($root_path . 'include/class.tags.php'); 
     253 
    258254                $name = request_var('tag_name', ''); 
    259255                $tag_type = request_var('tag_type', TYPE_TORRENT); 
    260256                $id = request_var('id', 0); 
    261257                $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&amp;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); 
    397260 
    398261                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 ) { 
    431269                                $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&amp;search=' . $enc_tag_name), 
    439                                         'U_TAG_USERS' => append_sid($root_path . 'modtask.php?action=tags&amp;do=view_users&amp;tag_name=' . $enc_tag_name . '&amp;tag_type=' . TYPE_TORRENT . '&amp;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&amp;search=' . $tag_ary['enc_tag_name']), 
     277                                        'U_TAG_USERS' => append_sid($root_path . 'modtask.php?action=tags&amp;do=view_users&amp;tag_name=' . $tag_ary['enc_tag_name'] . '&amp;tag_type=' . $tag_type . '&amp;tag_for_id=' . $id), 
    440278                                )); 
    441279                        } 
    442280 
    443281                        $template->assign_vars(array( 
    444                                 'TAG_TYPE' => TYPE_TORRENT
     282                                'TAG_TYPE' => $tag_type
    445283                                'ID' => $id, 
    446                                 'ALLOW_ADD_TAGS' => $allow_add_tags
     284                                'ALLOW_ADD_TAGS' => tags::return_allow_add_tag($tag_type, $id)
    447285                        )); 
    448286 
     
    453291                        $tpl = $template->assign_display('template', 'TEMPLATE_FILE'); 
    454292 
    455                         return $_RESULT = array( 'message' => '', 'tpl' => $tpl ); 
     293                        gc(json_encode(array('message' => '', 'tpl' => $tpl))); 
    456294                } 
    457295        break; 
     
    473311                        $result = $db->sql_query($sql); 
    474312 
     313                        header('Content-type: text/html; charset=UTF-8'); 
    475314                        while ( $row = $db->sql_fetchrow($result) ) { 
    476315                                echo $row['tag_name'] . "\n"; 
    477316                        } 
     317                        gc(); 
    478318                } 
    479319        break; 
  • announce.php

    r300 r324  
    3131 
    3232if ( defined('USE_XBTT') ) { 
    33         $get = ''; 
    34         foreach($_GET AS $key => $val ) { 
    35                 $get .= ( $get ? '&amp;' : '' ) . $key . '=' . $val; 
    36         } 
    3733        benc_resp_raw('Please redownload torrent from tracker'); 
    3834} 
  • bookmarks.php

    r317 r324  
    8686                case '3': $column = 't.comments'; break; 
    8787                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'; 
    9191                break; 
    9292                case '5': $column = 't.ctime'; break; 
  • browse.php

    r317 r324  
    99        $where = ''; 
    1010        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; 
    1318                } 
    1419        } 
     
    6772                case '4': 
    6873                        $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'; 
    7176                break; 
    7277                case '5': $column = 't.ctime'; break; 
     
    191196} 
    192197 
    193 if ( defined('USE_XBTT') ) { 
    194         $wherea['t.flags'][] = ' <> 1'; 
    195 } 
    196  
    197198if ( sizeof($wherecatina) && sizeof($wherecatina) != sizeof($cats) ) { 
    198199        $new_wherecatina = array(); 
     
    226227 
    227228        $sql = 'SELECT * FROM ' . CATEGORIES_TABLE . ' ORDER BY cat_parent_id, name'; 
    228         $result = $db->sql_query($sql, 30 * 60); 
     229        $result = $db->sql_query($sql, 3600); 
    229230 
    230231        while( $row = $db->sql_fetchrow($result) ){ 
     
    351352                             $add_where[] = 'tg.tag_type = ' . TYPE_TORRENT; 
    352353                             $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 
    354356                     break; 
    355357 
     
    414416 
    415417//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&amp;search=' . $enc_tag_name), 
    456                 )); 
    457         } 
    458 
    459  
     418require_once($root_path . 'include/class.tags.php'); 
     419$tags = tags::tag_cloud_for_cat($wherecatina); 
     420$show_tags_cloud = sizeof($tags); 
     421 
     422foreach ( $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&amp;search=' . $tag_ary['enc_tag_name']), 
     427        )); 
     428
    460429//end tags 
     430 
    461431$where = _build_where($wherea); 
    462432 
  • comment.php

    r321 r324  
    470470                        $sql = 'DELETE FROM ' . COMMENTS_TABLE . ' WHERE ' . $db->sql_in_set('comment_id', $comm_ary); 
    471471                        $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); 
    472481                } 
    473482 
  • details.php

    r322 r324  
    387387        require ($root_path . 'include/bbcode/bbcode.lib.php'); 
    388388        require ($root_path . 'include/functions_post.php'); 
     389        require_once($root_path . 'include/class.tags.php'); 
    389390 
    390391        $view = request_var('view', ''); 
     
    399400                        t.completed, t.numfiles, t.category, t.hidden, t.free, t.comments, t.moderated, u.name AS username, u.class, u.privacy 
    400401                        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
    402403        $result = $db->sql_query( $sql ); 
    403404 
     
    454455                        } 
    455456 
    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_options 
    490                                         )); 
    491                                 } 
    492                         } 
    493  
    494457                        $tzoffset = ( $userdata['session_logged_in'] ? $userdata['tzoffset'] : $config['board_timezone'] ); 
    495458 
     
    508471                        $description = censor_text($description); 
    509472 
     473                        $page_description = split_string(strip_tags(str_replace(array('<br /><br />', '<br />'), array('<br />', ' '), $description)), 400, false); 
    510474 
    511475                        if ( $highlight ) { 
     
    515479                        $cat_name = '<a href="' . append_sid($root_path . 'browse.php?cat=' . $cats[$row['category']]['cat_id']) . '">' . $cats[$row['category']]['cat_name'] . '</a>'; 
    516480 
    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); 
    535489                        $info_hash = preg_replace_callback('/./s', create_function('$matches','return sprintf(\'%02x\', ord($matches[0]));'), str_pad($row['info_hash'], 20)); 
    536490 
     
    561515                                'LAST_ACTIVITY' => $last_activity, 
    562516                                'SIZE' => mksize( $row['size'] ) . ' (' . number_format( $row['size'] ) . ' ' . $lang['bytes'] . ')', 
    563                                 'RATING' => $rating_message, 
    564517                                'ADDED' => create_date($row['ctime']), 
    565518                                'VIEWS' => $row['views'], 
     
    576529 
    577530                                '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, 
    579536 
    580537                        )); 
     
    608565 
    609566                        /* 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&amp;search=' . $tag_ary['enc_tag_name']), 
     581                                        'U_TAG_USERS' => append_sid($root_path . 'modtask.php?action=tags&amp;do=view_users&amp;tag_name=' . $tag_ary['enc_tag_name'] . '&amp;tag_type=' . TYPE_TORRENT . '&amp;tag_for_id=' . $id), 
    619582                                )); 
    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&amp;search=' . $enc_tag_name), 
    654  
    655                                                 'U_TAG_USERS' => append_sid($root_path . 'modtask.php?action=tags&amp;do=view_users&amp;tag_name=' . $enc_tag_name . '&amp;tag_type=' . TYPE_TORRENT . '&amp;tag_for_id=' . $id), 
    656                                         )); 
    657                                 } 
    658                         } 
    659                         else { 
    660                                 $template->assign_vars(array( 
    661                                         'TAGS' => $lang['no_tags'] 
    662                                 )); 
    663583                        } 
    664584                        /* end tags */ 
     585 
    665586 
    666587                        $include_header = false; 
  • include/acp/config/xbt_settings.php

    r308 r324  
    7171                $str .= 'mysql_table_prefix = ' . $table_prefix . "\n"; 
    7272                $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; 
    7479                $str .= '</textarea>'; 
    7580 
  • include/bbcode/Xbb/Tags/A.php

    r313 r324  
    2727 
    2828        function get_html($tree = null) { 
     29                global $root_path; 
     30 
    2931                $this -> autolinks = false; 
    3032                $text = ''; 
     
    4951                } 
    5052 
     53                if ( !$href = $this -> checkUrl($href) ) { 
     54                        return '[url]' . parent::get_html($this -> tree) . '[/url]'; 
     55                } 
     56 
    5157                if (strpos($href, $this->base_url) !== false && strpos($href, 'sid=') !== false) { 
    5258                        $href = preg_replace('/(&amp;|\?)sid=[0-9a-f]{32}&amp;/', '\1', $href); 
     
    5460                        $href = preg_replace("/(&amp;|\?)sid=[0-9a-f]{32}\n/", '', $href); 
    5561                } 
    56                 else { 
     62                elseif ( strpos($href, $this->base_url) === false ) { 
     63                        $href = $root_path . 'redir.php?url=' . $href; 
    5764                        $attr .= ' target="_blank"'; 
    58                 } 
    59  
    60                 if ( !$href = $this -> checkUrl($href) ) { 
    61                         return '[url]' . parent::get_html($this -> tree) . '[/url]'; 
    6265                } 
    6366 
  • include/bbcode/Xbb/Tags/Img.php

    r317 r324  
    2727    function get_html($tree = null) { 
    2828        $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 
    4142        $src = ''; 
    4243        foreach ($this -> tree as $text) { 
    43             if ('text' == $text['type']) { $src .= $text['str']; } 
     44            if ('text' == $text['type']) { 
     45                $src .= $text['str']; 
     46                } 
    4447        } 
    4548        if ( !$c_src = $this -> checkUrl($src) ) { 
  • include/bbcode/bbcode.lib.php

    r302 r324  
    10151015 
    10161016    function parse_url ( &$text ) { 
     1017        global $root_path; 
     1018 
    10171019            if (!$this -> autolinks) { 
    10181020                    return; 
     
    10251027                } 
    10261028                $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); 
    10291031        } 
    10301032 
     
    11821184        $url = htmlentities($url, ENT_QUOTES); 
    11831185        $url = str_replace('&amp;', '&', $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); 
    11861188        $url = str_replace('(', '&#'.ord('(').';', $url); 
    11871189        $url = str_replace(')', '&#'.ord(')').';', $url); 
  • include/bbcode/config/parser.config.php

    r317 r324  
    3737    ), 
    3838    '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>'", 
    4141        '<a href="mailto:$0">$0</a>', 
    4242    ), 
  • include/class.bencode.php

    r315 r324  
    315315         */ 
    316316        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 ); 
    318318        } 
    319319 
  • include/class.cleanup_types.php

    r311 r324  
    1616                } 
    1717 
    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 )
    1919                $db->sql_query($sql); 
    2020 
     
    243243                if ( $config['ttl'] > 0 ) { 
    244244                        $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'; 
    246246                        $result = $db->sql_query($sql); 
    247247                        if ( $row = $db->sql_fetchrow($result) ) { 
     
    249249                                do { 
    250250                                        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']; 
    252252                        } 
    253253                        while ( $row = $db->sql_fetchrow($result) ); 
     
    258258                elseif ( $config['alternate_ttl'] > 0 ) { 
    259259                        $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'; 
    261261                        $result = $db->sql_query($sql); 
    262262                        if ( $row = $db->sql_fetchrow($result) ) { 
     
    264264                        do { 
    265265                                        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']; 
    267267                        } 
    268268                        while ( $row = $db->sql_fetchrow($result) ); 
     
    664664                global $root_path; 
    665665 
     666                include_once($root_path . 'include/functions_messenger.php'); 
     667 
    666668                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; 
    673679        } 
    674680 
  • include/class.seo.php

    r313 r324  
    33* 
    44* @package Ultimate SEO URL phpBB SEO 
    5 * @version $id: seo_class.php - 35345 06-03-2009 16:28:22 - 0.6.0 dcz $ 
    6 * @copyright (c) 2006 - 2009 www.phpbb-seo.com 
    7 * @license http://www.opensource.org/licenses/rpl.php RPL Public License 
     5* @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 
    88* 
    99*/ 
    1010/** 
    11 * SEO Class 
     11* phpBB_SEO Class 
    1212* www.phpBB-SEO.com 
    1313* @package Ultimate SEO URL phpBB SEO 
     
    1515 
    1616class seo { 
    17         var     $version = '0.6.0'; 
     17        var     $version = '0.6.4'; 
    1818        var     $modrtype = 2; // We set it to mixed as a default value 
    1919        var     $seo_path = array(); 
     
    135135        function seo() { 
    136136                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'); 
    137140                // Nothing should be edited here, please do your custom settings in the 
    138141                // seo/includes/seo_modules.php instead to make your updates easier. 
     
    172175                $this->seo_path['script'] = $script_path; 
    173176                $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                } 
    174189                // Load settings from phpbb_seo/includes/seo_modules.php 
    175190                if ($this->check_cache()) { 
     
    370385                } 
    371386                // 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 
    373389                        $this->seo_path['urlR'] = $this->seo_path['root_url']; 
    374390                        $this->file_hbase['index'] = $this->seo_path['url']; 
    375391                        $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; 
    376395                } 
    377396                $this->seo_ext['index'] = empty($this->seo_static['index']) ? '' : ( empty($this->seo_ext['index']) ? '.html' : $this->seo_ext['index']); 
     
    572591                static $replace = array('%26', '%2F', '%23', '%2b'); 
    573592                return rawurlencode(str_replace( $find, $replace, htmlspecialchars_decode(str_replace('&amp;amp;', '%26', rawurldecode($url))))); 
    574                 return $url; 
    575593        } 
    576594        /** 
     
    609627                } 
    610628                // Sid ? 
    611                 if ($session_id) { 
     629                if ($session_id === false && !empty($_SID)) { 
     630                        $qs .= ($qs ? $amp_delim : '') . "sid=$_SID"; 
     631                } else if ($session_id) { 
    612632                        $qs .= ($qs ? $amp_delim : '') . "sid=$session_id"; 
    613                 } elseif (!empty($_SID)) { 
    614                         $qs .= ($qs ? $amp_delim : '') . "sid=$_SID"; 
    615633                } 
    616634                // Build vanilla URL 
     
    632650                $this->filename = trim(str_replace(".php", '', $this->file)); 
    633651                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; 
    634654                        return ($this->seo_cache[$url] = $url); 
    635655                } 
    636                 // parse_str is here bypassed because it uses magic quotes 
    637                 // parse_str(str_replace('&amp;', '&', $qs), $this->get_vars); 
    638                 // Won't deal with arrays, same as append_sid 
    639                 $pairs = explode('&', str_replace('&amp;', '&', $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('&amp;', '&', $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); 
    646660                } 
    647661                if (empty($userdata['session_logged_in'])) { 
     
    661675                } 
    662676        } 
    663  
    664677        /** 
    665678        * URL rewritting for viewtopic.php 
     
    11311144                $params = array(); 
    11321145                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); 
    11351152                        } 
    11361153                } 
     
    12721289                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); 
    12731290        } 
     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        } 
    12741298        // --> Add on Functions <-- 
    12751299        // --> Gen stats 
  • include/constants.php

    r316 r324  
    163163define('SIMPATY_CUSTOM', 0); 
    164164 
     165define('XBTT_HASH_CHANGED', 8); 
    165166define('XBTT_TORRENT_MODIFIED', 9); 
    166167 
     
    228229define('VOTE_USERS_TABLE',       'vote_voters'); 
    229230define('CHAT_MESSAGES_TABLE',           'chat_messages'); 
     231define('XBT_DELETED_HASHES',            'xbt_deleted_hashes'); 
    230232 
    231233?> 
  • include/db/dbal.php

    r280 r324  
    588588        function sql_error($sql = '') 
    589589        { 
    590                 global $userdata, $config
     590                global $config, $userdata
    591591 
    592592                // Set var to retrieve errored status 
  • include/details/delete.php

    r246 r324  
    77$pm_ary = array(); 
    88 
    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_reputation 
     9$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 
    1010                FROM ' . TORRENTS_TABLE . ' t, ' . USERS_TABLE . ' u 
    1111                WHERE t.fid = ' . $id . ' 
     
    3939 
    4040} 
    41 $delete_arr = array( $id )
    42 deletetorrent( $delete_arr ); 
     41$delete_arr[$row['info_hash']] = $id
     42deletetorrent($delete_arr); 
    4343 
    4444$cache->destroy( 'sql', INDEXRELEASES_TABLE ); 
  • include/details/download.php

    r318 r324  
    99$type = request_var('type', ''); 
    1010 
    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; 
    1512$result = $db->sql_query( $sql ); 
    1613if ( !$row = $db->sql_fetchrow( $result ) ) { 
     
    1815} 
    1916 
    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'] : '' ); 
     21if ( strpos($ref, generate_base_url()) === false ) { 
     22        redirect(append_sid($root_path . 'details.php?id=' . $id)); 
     23
     24 
     25if ( $row['hidden'] && ( !$userdata['hiddentorrents'] && $userdata['class'] < UC_MODERATOR ) ) { 
     26        trigger_error( $lang['access_denied'] ); 
    2427} 
    2528 
     
    4952        header( 'Content-transfer-encoding: binary' ); 
    5053        header( 'Content-length: ' . strlen( $comp_data ) ); 
    51         echo( $comp_data ); 
     54        echo($comp_data); 
    5255} 
    5356else { 
    5457        $torrent->send($row['filename']); 
    5558} 
     59gc(); 
    5660?> 
  • include/details/edit.php

    r307 r324  
    66                FROM ' . TORRENTS_TABLE . ' t, ' . USERS_TABLE . ' u 
    77                WHERE u.uid = t.owner 
    8                 AND fid = ' . $id . ( defined( 'USE_XBTT' ) ? ' AND t.flags <> 1' : '' )
     8                AND fid = ' . $id
    99$result = $db->sql_query($sql); 
    1010if ( !$row = $db->sql_fetchrow($result) ) { 
     
    7070                $updateset['free'] = request_var('free', 0); 
    7171 
    72                 $moderated = ( isset( $_POST['moderated'] ) ? 1 : 0 ); 
     72                $moderated = request_var('moderated', 0); 
    7373                $updateset['moderated'] = $moderated; 
    7474 
    75                 $updateset['disable_comments'] = ( isset( $_POST['disable_comments'] ) ? 1 : 0 ); 
     75                $updateset['disable_comments'] = request_var('disable_comments', 0); 
    7676 
    7777                if ( !$row['moderated'] && $moderated ) { 
     
    8484 
    8585        if ( $userdata['hiddentorrents'] || $userdata['class'] >= UC_MODERATOR ) { 
    86                 $hidden = ( isset( $_POST['hidden'] ) ? 1 : 0 ); 
     86                $hidden = request_var('hidden', 0); 
    8787                $updateset['hidden'] = $hidden; 
    8888        } 
     
    112112                        $updateset['leechers'] = 0; 
    113113                        $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                        } 
    114122                } 
    115123 
     
    120128 
    121129        $changes_does = array( 
    122                 'seeders' => array( 
    123                         'send_changes_to_xbtt' => true
     130                'info_hash' => array( 
     131                        'send_changes_to_xbtt' => XBTT_HASH_CHANGED
    124132                ), 
    125133                'free' => array( 
    126                         'send_changes_to_xbtt' => true
     134                        'send_changes_to_xbtt' => XBTT_TORRENT_MODIFIED
    127135                ), 
    128136                'hidden' => array( 
    129                         'send_changes_to_xbtt' => true
     137                        'send_changes_to_xbtt' => XBTT_TORRENT_MODIFIED
    130138                ), 
    131139        ); 
     
    134142 
    135143        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  
    141144                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 
    142151                        $write_log_msg[] = $lang['log_tor_edited_' . $key]; 
    143152                } 
     
    149158 
    150159        $sql = 'UPDATE ' . TORRENTS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $updateset) . ' WHERE fid = ' . $id; 
     160        $db->sql_query($sql); 
     161 
    151162        $db->sql_query($sql); 
    152163        $cache->destroy('sql', INDEXRELEASES_TABLE); 
  • include/functions.php

    r321 r324  
    241241 
    242242                case E_USER_ERROR: 
    243                         if (!empty($cache)) 
    244                         { 
    245                                 $cache->unload(); 
    246                         } 
    247                         if (!empty($db)) { 
    248                                 $db->sql_close(); 
    249                         } 
    250243                        echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'; 
    251244                        echo '<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">'; 
     
    279272                        echo '</html>'; 
    280273 
    281                         exit
     274                        gc()
    282275                break; 
    283276 
     
    464457                        $user_rank = ( isset($ranks[$data['user_rank_id']]['rank_name']) ? $ranks[$data['user_rank_id']]['rank_name'] : '' ); 
    465458 
    466                         $ret_string .= '&nbsp;<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'] . '&amp;action=card') . '\', \'\', \'width=420,height=230,resizable=yes,scrollbars=yes,status=yes\')">' . $rep_level . '</a></span>'; 
     459                        $ret_string .= '&nbsp;<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'] . '&amp;action=card') . '\', \'\', \'width=500,height=230,resizable=yes,scrollbars=yes,status=yes\')">' . $rep_level . '</a></span>'; 
    467460                } 
    468461        } 
     
    570563 
    571564        if ( !$db->sql_query($sql) ) { 
    572                 trigger_error($text); 
     565                trigger_error($text, E_USER_ERROR); 
    573566        } 
    574567        $db->sql_return_on_error(false); 
     
    765758} 
    766759 
    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" />'; 
     760function 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">&nbsp;</span>'; 
     778                } 
     779                else { 
     780                        return 0; 
     781                } 
     782        } 
    776783} 
    777784 
     
    970977} 
    971978 
    972 function split_string ($string, $length) { 
     979function split_string ($string, $length, $hellip = true) { 
    973980        if ( utf_strlen($string) <= $length ) { 
    974981                return $string; 
     
    977984                $line = ''; 
    978985                $length = $length - 3; 
    979                 $words = preg_split("/[\s,]+/u", $string, -1); 
     986                $words = preg_split("/[\s]+/u", $string, 0,  PREG_SPLIT_DELIM_CAPTURE); 
    980987                for($i = 0; $i < sizeof($words); $i++) { 
    981988                        if ( utf_strlen($line . $words[$i] . ' ') < $length){ 
     
    983990                        } 
    984991                } 
    985                 return substr($line, 0, -1) . '&hellip;'
     992                return substr($line, 0, -1) . (  $hellip ? '&hellip;' : '...' )
    986993        } 
    987994} 
     
    10551062        global $db, $cache, $config, $root_path, $lang; 
    10561063 
    1057         if (!$return) 
     1064        /*if (!$return) 
    10581065        { 
    10591066                if (!empty($cache)) { 
     
    10631070                        $db->sql_close(); 
    10641071                } 
    1065         } 
     1072        }*/ 
    10661073        $current_page = extract_current_page(); 
    10671074 
     
    13331340        global $userdata, $config, $template, $lang, $db, $images, $root_path, $theme, $cache, $seo; 
    13341341        global $bb_code; 
     1342        global $page_description; 
    13351343        static $ranks; 
    13361344 
     
    13561364 
    13571365        $keywords = $title; 
    1358         $page_description = str_replace( $find, '', $title); 
     1366        $page_description = ( empty($page_description) ? str_replace( $find, '', $title) : $page_description ); 
    13591367        $title = ( !$title ? $config['sitename'] : $config['sitename'] . ' :: ' . $title); 
    13601368        $title = implode(' :: ', array_reverse(explode(' :: ', $title))); 
     
    15531561                'U_USERSEARCH' => append_sid($root_path . 'usersearch.php'), 
    15541562                '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&amp;search_id=newposts'), 
     1565                'U_NEW_SITE_COMMENTS' => append_sid($root_path . 'modtask.php?action=new_comments'), 
    15561566        )); 
    15571567 
  • include/functions_delete.php

    r316 r324  
    88        if ( $count = sizeof($arr_ids) ) { 
    99                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); 
    1721          $sql = 'DELETE FROM ' . SNATCHED_TABLE . ' WHERE torrentid IN (' . $ids . ')'; 
    1822          $db->sql_query($sql); 
     
    4145          $sql = 'DELETE FROM ' . CHEATERS_TABLE . ' WHERE torrentid IN (' . $ids . ')'; 
    4246          $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; 
    4650                $db->sql_query($sql); 
    4751 
     
    104108                $db->sql_query($sql); 
    105109                $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) . ')'; 
    106112                $db->sql_query($sql); 
    107113                $sql = 'UPDATE ' . COMMENTS_TABLE . ' SET comment_user = ' . ANONYMOUS . ' WHERE comment_user IN (' . implode(',', $arr_ids) . ')'; 
  • include/functions_messenger.php

    r293 r324  
    6666                $this->addresses['to'][$pos]['email'] = trim($address); 
    6767 
    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                        } 
    7678                } 
    7779        } 
     
    8991                $pos = isset($this->addresses['cc']) ? sizeof($this->addresses['cc']) : 0; 
    9092                $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                } 
    9296        } 
    9397 
     
    104108                $pos = isset($this->addresses['bcc']) ? sizeof($this->addresses['bcc']) : 0; 
    105109                $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                } 
    107113        } 
    108114 
     
    120126                $pos = isset($this->addresses['im']) ? sizeof($this->addresses['im']) : 0; 
    121127                $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                } 
    123131        } 
    124132 
     
    417425                        foreach ($address_ary as $which_ary) 
    418426                        { 
    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']); 
    420428                        } 
    421429                } 
     
    547555        * constructor 
    548556        */ 
    549         function queue(
     557        function queue( $cache_file = ''
    550558        { 
    551559                global $root_path; 
    552560 
     561                if ( $cache_file ) { 
     562                        $this->cache_file = $cache_file; 
     563                } 
     564                else { 
     565                        $this->cache_file = "{$root_path}cache/queue.php"; 
     566                } 
     567 
    553568                $this->data = array(); 
    554                 $this->cache_file = "{$root_path}cache/queue.php"; 
    555569 
    556570                // Determine EOL character (\n for UNIX, \r\n for Windows and \r for Mac) 
     
    596610                } 
    597611 
    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); 
    602615 
    603616                $fp = @fopen($this->cache_file . '.lock', 'wb'); 
     
    620633 
    621634                        // 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                        }*/ 
    626639 
    627640                        switch ($object) 
     
    753766                } 
    754767 
     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 
    755776                if (file_exists($this->cache_file)) 
    756777                { 
     
    837858                foreach ($addresses['to'] as $which_ary) 
    838859                { 
    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']) . '>'; 
    840861                        $mail_rcpt['to'][] = '<' . trim($which_ary['email']) . '>'; 
    841862                } 
     
    854875                foreach ($addresses['cc'] as $which_ary) 
    855876                { 
    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']) . '>'; 
    857878                        $mail_rcpt['cc'][] = '<' . trim($which_ary['email']) . '>'; 
    858879                } 
  • include/functions_post.php

    r321 r324  
    3636 
    3737                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'] ) ) { 
    4242                                $show_comment_user = false; 
    4343                        } 
     
    367367                        } 
    368368                        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'] ) ) { 
    370370                                        $show_comment_user = false; 
    371371                                } 
  • include/functions_search.php

    r318 r324  
    9494                                } 
    9595 
    96                                 $match_word = str_replace('*', '%', $split_search[$i]); 
    9796                                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; 
    9998                                } 
    10099                                else { 
     100                                        $match_word = str_replace('*', '%', $split_search[$i]); 
    101101                                        $search = $where_search . ' LIKE \'%' . $db->sql_escape($match_word) . '%\'' . $add_where; 
    102102                                } 
  • include/functions_torrenttable.php

    r318 r324  
    125125                $dispname = ( $highlight ? highlight_text($search, $dispname) : $dispname ); 
    126126 
    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']); 
    134128 
    135129                if ( isset($config['ttl']) && ($config['ttl'] > 0) ) { 
  • include/modtask/mass_torrent_actions.php

    r307 r324  
    2626$cats = $cache->obtain_cats(); 
    2727 
    28 $sql = 'SELECT t.fid, t.name, t.owner, t.category, u.name AS username, u.language, u.email, u.notifs, u.language, u.class 
     28$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 
    2929                FROM ' . TORRENTS_TABLE . ' t, ' . USERS_TABLE . ' u 
    3030                WHERE t.fid IN (' . $ids . ') 
     
    110110                                write_log( sprintf( $lang['log_torrent_deleted_by_user'], $ary['fid'] , $ary['name'], $userdata['name'], $reason ) ); 
    111111 
    112                                 $delete_arr[] = $ary['fid']; 
     112                                $delete_arr[$ary['info_hash']] = $ary['fid']; 
    113113 
    114114                        } 
  • include/modtask/new_comments.php

    r317 r324  
    3333                        $title = ( $row['title'] ? get_user_class_name($row['class']) . '<br />' . $row['title'] : get_user_class_name($row['class']) ); 
    3434                        $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 
    3737                       $user_sig = ( isset($row['user_sig']) && $row['user_sig'] != '' && $config['allow_sig'] ) ? $row['user_sig'] : ''; 
    3838                       if ( $user_sig ) { 
     
    7676                        else 
    7777                        { 
    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']; 
    8080                        } 
    8181 
     
    101101                while ( $row = $db->sql_fetchrow($result) ); 
    102102 
    103                stdhead(); 
     103        stdhead($lang['new_comments']); 
    104104                $template->set_filenames(array( 
    105105                'body' => 'modtask_newcomments.html' 
  • include/sessions.php

    r320 r324  
    531531                $default_lang = $config['default_lang']; 
    532532                $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                 }*/ 
    563533        } 
    564534 
     
    599569        } 
    600570 
    601         //$config['default_lang'] = $default_lang; 
    602  
    603571        include($root_path . 'languages/lang_' . $default_lang . '/lang_main.php'); 
    604572        include($root_path . 'languages/lang_' . $default_lang . '/lang_js.php'); 
    605  
    606         //$lang = array_merge($lang, $lang_js); 
    607573 
    608574        if ( defined('IN_PHPBB') ) 
     
    12301196        } 
    12311197 
    1232         if ( !$points || !sizeof($user_ary) ) { 
     1198        if ( !sizeof($user_ary) ) { 
    12331199                return; 
    12341200        } 
     
    12361202        if ( !$state ) { 
    12371203                $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; 
    12381235        } 
    12391236 
     
    12721269                } 
    12731270 
    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; 
    12771277} 
    12781278 
     
    14701470                                                $messenger->template($email_template, $user_lang); 
    14711471 
    1472                                                 $messenger->to($email, $email); 
     1472                                                $messenger->to($email); 
    14731473 
    14741474                                                $messenger->assign_vars(array( 
  • include/ucp/checkcomm.php

    r318 r324  
    218218                                        if ( $comment_data ) { 
    219219                                                $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 
    220224 
    221225                                                if ( $comment_data['uid'] <> ANONYMOUS ) { 
  • include/ucp/friends.php

    r266 r324  
    5454); 
    5555 
    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.birthday 
     56$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 
    5757        FROM ' . FRIENDS_TABLE . ' f, ' . USERS_TABLE . ' u 
    5858        WHERE userid=' . $userdata['uid'] . ' 
     
    6363$row = 0; 
    6464$col = 0; 
     65$dt = time() - $config['online_time']; 
    6566 
    6667if ( $friend = $db->sql_fetchrow($result) ) { 
     
    7374                $title = ($friend['title'] ? $friend['title'] : get_user_class_name($friend['class']) ); 
    7475                $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']); 
    7777                $gender = ( !$friend['gender'] ?'<img src="' . $images['male'] . '" alt="' . $lang['gender_male'] . '" />':'<img src="' . $images['female'] . '" alt="' . $lang['gender_female'] . '" />'); 
    7878                $age = get_age($friend['birthday']); 
     79 
    7980                $template->assign_block_vars('friends_list_row.users_col', array( 
    80                         'U_DELETE_FRIEND' => append_sid('my.php?type=friends&amp;id=' . $friend['user_id'] . '&amp;action=del_friend&amp;fr_type=1&amp;targetid=' . $friend['id']), 
    81                         'U_USERDETAILS' => append_sid('userdetails.php?id=' . $friend['user_id']), 
    82                         'U_SENDPM' => append_sid('message.php?action=send&amp;receiver=' . $friend['user_id']), 
    83                         'FRIEND_AVATAR'=> $avatar_prefix . $avatar, 
     81                        'U_DELETE_FRIEND' => append_sid('my.php?type=friends&amp;id=' . $friend['uid'] . '&amp;action=del_friend&amp;fr_type=1&amp;targetid=' . $friend['id']), 
     82                        'U_SENDPM' => append_sid('message.php?action=send&amp;receiver=' . $friend['uid']), 
     83                        'FRIEND_AVATAR'=>  $avatar, 
    8484                        '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), 
    8887                        'FRIEND_LAST_ACCESS_DATE' => $last_access, 
    8988                        'FRIEND_LAST_ACCESS_AGO' => get_elapsed_time($friend['user_session_time']), 
    9089                        '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']) ) 
    9293                )); 
    9394                if ( $col == $users_split_row ) { 
  • include/ucp/get_userbar.php

    r307 r324  
    33$template->assign_vars(array( 
    44        'TRACKER_URL' => generate_base_url(), 
    5         'CURUSER_USERNAME' => urldecode($userdata['name']), 
     5        'CURUSER_USERNAME' => rawurlencode($userdata['name']), 
    66        'L_LANGUAGE_CHARSET' => 'utf-8' 
    77)); 
  • include/ucp/simpaty.php

    r317 r324  
    1616        $result = $db->sql_query_limit($sql, $limit, $offset); 
    1717 
    18         $template->assign_vars(array( 
    19                 'PAGERBOTTOM' => $pagerbottom, 
    20         )); 
    2118        $i = 0; 
    22         $page = request_var('page', 0); 
    23         $page = ( !$page ? ceil($count / $per_page) : $page ); 
     19        $page = request_var('page', 1); 
    2420 
    2521        while ( $row = $db->sql_fetchrow($result) ) { 
     
    3834                } 
    3935 
     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 
    4040                $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']), 
    4242                        'TOUSERID' => $row['touserid'], 
    4343                        'RESPECT_ID' => $row['id'], 
    44                         'NUMBER' => $i + ( 50 * ( $page - 1 ) ), 
     44                        'NUMBER' => $i + ( $per_page * ( $page - 1 ) ), 
    4545                        'TYPE' => $row['simpaty'], 
    4646                        'FROM_USERID' => $row['fromuserid'], 
     
    5151                )); 
    5252        } 
     53 
     54        $template->assign_vars(array( 
     55                'PAGERBOTTOM' => $pagerbottom, 
     56        )); 
    5357} 
    5458 
  • include/userdetails/view_snatched.php

    r313 r324  
    7777                        array( 'uploaded_torrents_tpl' => 'userdetails_uploaded_torrents.html' 
    7878                )); 
    79                 $sql = 'SELECT t.fid, t.name, t.seeders, t.leechers, t.category, t.ctime, t.free, t.ratingsum, t.numratings, s.uploaded 
     79                $sql = 'SELECT t.fid, t.name, t.seeders, t.leechers, t.category, t.ctime, t.free, s.uploaded 
    8080                                        FROM ' . TORRENTS_TABLE . ' t LEFT JOIN ' . SNATCHED_TABLE . ' s ON ( t.fid = s.torrentid AND t.owner = s.userid ) 
    8181                                        WHERE t.owner = ' . $id . ' 
  • js/ajax_common.js

    r318 r324  
    5050} 
    5151 
    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 }); 
     52function 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        }); 
    6875} 
    6976 
     
    289296 
    290297function 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        }); 
    305313} 
    306314 
  • js/chat.js

    r320 r324  
    110110                                        if ( windowFocus == false && new_msg ) { 
    111111                                                document.title = L_JS_CHAT_NEW_MESSAGES; 
     112                                                play_sound('js/new_message.wav') 
    112113                                        } 
    113114                                } 
     
    265266                        } 
    266267                }); 
     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'); 
    267275        } 
    268276 
  • 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     1The following is an email sent to you by an administrator of "{SITENAME}": 
    102 
    113{MESSAGE} 
     4 
     5{EMAIL_SIG} 
  • languages/lang_english/lang_admin.php

    r303 r324  
    933933        'add_upload_js_reason' => 'Please enter the reason for adding upload', 
    934934        'add_upload_js_failed' => 'You haven\'t entered the reason', 
     935 
     936        'add_bonus' => 'Add bonus', 
     937        'add_bonus_explain' => 'Enter bonus points', 
    935938 
    936939        'gd_library_not_enabled' => 'GD library is not installed or enabled. Captcha function isn\'t working without enabled GD', 
     
    11261129 
    11271130 
    1128         'seo_settings' => '��� SEO', 
     1131        'seo_settings' => '��������� SEO', 
    11291132        'seo_cache_file_title'  => 'Cache file status', 
    11301133        'seo_cache_status'      => 'The cache folder configured is : <b>%s</b>', 
  • languages/lang_english/lang_forum.php

    r299 r324  
    4242        'forum' =>  'Forum', 
    4343        'category' =>  'Category', 
    44         'topic' =>  'Topic', 
    45         'topics' =>  'Topics', 
    46         'replies' =>  'Replies', 
    4744        'views' =>  'Views', 
    4845        'post' =>  'Post', 
  • languages/lang_english/lang_main.php

    r318 r324  
    425425        'succefully_uploaded_descr' => 'Now you can seed. <b>Attention</b> torrent will be invisible, until any seeders are avalaible!', 
    426426        'succefully_edited' => 'Successfully edited!', 
    427         'rating_added' => 'Rating added!', 
     427        'rating_added' => 'Ваш рейтинг %d добавлен. Спасибо за голос. Всего добавлено %d голосов (для отображения нужно %d).', 
     428        'total_rating' => 'Текущий рейтинг - %d. Всего добавлено %d голосов (для отображения нужно %d)', 
    428429        'thanks_added' => 'Thanks added!', 
    429430        'owner_cant_thanks' => 'You can\'t Thank yourself for torrents', 
     
    436437        'last_seeder' => 'Last seeder', 
    437438        '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 &quot;%d - %s&quot;)', 
    446         'add_rating' => 'add rating', 
    447439        'views' => 'Views', 
    448440        'hits' => 'Hits', 
     
    492484        'are_you_sure' => 'Are you sure you want to delete this comment? Click <a href="%s">here</a> if you are.', 
    493485        '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.', 
    495486        'category_only_for_registered_users' => 'Viewing of this category is restricted to registred users.', 
    496487        'download_as_gzip_archive' => 'Download as gzip archive', 
     
    731722        'bonus' => 'Bonus', 
    732723        'warnings' => 'Warnings', 
    733         'rating_descr' => 'Average torrent rating', 
    734724        'thanks_times' => 'Said Thanks %d times', 
    735725        'respects' => 'Respects', 
     
    12551245        'top_ten_by_upspeed' => 'По скорости загрузки', 
    12561246        'top_ten_by_downspeed' => 'По скорости скачивания', 
     1247        'top_ten_by_popular_topics' => 'По популярным темам', 
     1248        'top_ten_by_reputation_posts' => 'По полезным сообщениям', 
     1249        'top_ten_forum' => 'Топ по форуму', 
    12571250        'show_by' => 'Выводить по', 
    12581251        'for' => 'за', 
     
    13031296                'view_only_new_checkcomm' => 'Смотреть только новые сообщения', 
    13041297 
     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 
    13051317        'translated_by' => 'Translation to english made by %s', 
    13061318)); 
  • languages/lang_english/lang_modcomment_log.php

    r307 r324  
    4545        'modcomment_nickname_changed' => 'nickname changed from &quot;%s&quot; to &quot;%s&quot;', 
    4646 
     47        'modcomment_add_bonus_text' => '%s - Добавлено %d бонуса пользователем \'%s\'', 
     48 
    4749)); 
    4850?> 
  • languages/lang_russian/email/admin_send_email.txt

    r221 r324  
    1  
    2 Это письмо отправлено вам администратором сайта "{SITENAME}". Если это сообщение является спамом, содержит оскорбления или прочие неприятные вам комментарии, пожалуйста свяжитесь с вебмастером по адресу: 
    3  
    4 {BOARD_EMAIL} 
    5  
    6 Включите данное сообщение целиком (особенно заголовки). 
    7  
    8 Отправленное вам сообщение: 
    9 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     1Это письмо отправлено вам администратором сайта "{SITENAME}": 
    102 
    113{MESSAGE} 
     4 
     5{EMAIL_SIG} 
  • languages/lang_russian/lang_admin.php

    r303 r324  
    914914                  'add_upload_js_reason' => 'Пожалуйста, введите причину, по которой вы начисляете аплоад', 
    915915                  'add_upload_js_failed' => 'Вы не ввели причину, по которой вы начисляете аплоад', 
     916 
     917                'add_bonus' => 'Добавить бонус', 
     918                'add_bonus_explain' => 'Введите количество очков бонуса для добавления', 
    916919 
    917920                  'gd_library_not_enabled' => 'У вас не установлена или не подключена библиотека GD. Функции captcha не работаю без бибилиотеки GD', 
  • languages/lang_russian/lang_forum.php

    r299 r324  
    4747        'forum' =>  'Форум', 
    4848        'category' =>  'Категория', 
    49         'topic' =>  'Тема', 
    50         'topics' =>  'Темы', 
    51         'replies' =>  'Ответов', 
    5249        'views' =>  'Просмотров', 
    5350        'post' =>  'Сообщение',        // ??? 
  • languages/lang_russian/lang_main.php

    r318 r324  
    138138        'new_pms' => '(%d новых)', //т.е. например 5 новых (сообщений имеется ввиду) 
    139139        'warns' => 'Предупреждения', 
    140         'browse' => 'Торренты', 
     140        'browse' => 'Скачать торренты', 
     141        'torrents' => 'Торренты', 
    141142        'upload' => 'Загрузить', 
    142143        'signup' => 'Регистрация', 
     
    255256        'active_torrents' => 'Активные торренты', 
    256257        'popular_torrents' => 'Популярные торренты', 
    257         'disclaimer' => 'Все используемые аудиовизуальные материалы, ссылки на которые размещены на сайте, являются собственностью их изготовителя (владельца прав) и охраняются Законом РФ &quot;Об авторском праве и смежных правах&quot;, а также международными правовыми конвенциями. 
     258'disclaimer' => 'Все используемые аудиовизуальные материалы, ссылки на которые размещены на сайте, являются собственностью их изготовителя (владельца прав) и охраняются Законом РФ &quot;Об авторском праве и смежных правах&quot;, а также международными правовыми конвенциями. 
    258259Вы можете использовать эти материалы только в том в случае, если использование производится с ознакомительными целями. Эти материалы предназначены только для ознакомления - для прочих целей Вы должны купить лицензионную запись. 
    259 Используемый формат кодирования аудиовизуальных материалов не может заменить качество оригинальных лицензионных записей. Eсли Вы оставляете у себя в каком-либо виде эти аудиовизуальные материалы, но не приобретаете соответствующую лицензионную запись - Вы нарушаете законы об Интеллектуальной собственности и Авторском праве, что может повлечь за собой преследование в соответствии с действующим законодательством. 
    260 Администрация этого сайта не несет никакой ответственности за действия пользователей.', 
     260Администрация этого сайта не несет никакой ответственности за действия пользователей. 
     261На сервере хранятся только <strong>торрент</strong> файлы. Это значит, что мы не храним никаких нелегальных материалов. 
     262<strong>Торрент</strong> (BitTorrent) — пиринговый (от пользователя к пользователю) сетевой протокол для кооперативного обмена файлами через Интернет. 
     263Файлы передаются частями, каждый <strong>торрент</strong>-клиент, получая эти части, в то же время отдаёт (закачивает) их другим клиентам и информация о передаче файлов недоступна на этом сайте.', 
    261264 
    262265//постинг 
     
    432435        'succefully_uploaded_descr' => 'Теперь вы можете сидировать. <b>Внимание</b> торрента не будет видно пока вы это не сделаете!', 
    433436        'succefully_edited' => 'Успешно изменено!', 
    434         'rating_added' => 'Рейтинг добавлен!', 
    435437        'thanks_added' => 'Спасибо добавлено!', 
     438        'rating_added' => 'Ваш рейтинг %d добавлен. Спасибо за голос. Всего добавлено %d голосов (для отображения нужно %d).', 
     439        'total_rating' => 'Текущий рейтинг - %d. Всего добавлено %d голосов (для отображения нужно %d)', 
    436440        'owner_cant_thanks' => 'Вы не можете ставить Спасибо на своем торренте', 
    437441        'sos_sended' => 'Запрос о помощи послан!', 
     
    443447        'last_seeder' => 'Посл. сидер', 
    444448        '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' => ' (вы голосовали за этот торрент как &quot;%d - %s&quot;)', 
    453         'add_rating' => 'добавить рейтинг', 
    454449        'views' => 'Просмотров', 
    455450        'hits' => 'Хитов', 
     
    738733        'bonus' => 'Бонус', 
    739734        'warnings' => 'Предупреждения', 
    740         'rating_descr' => 'Средний рейтинг за торренты', 
    741         'thanks_times' => 'Сказали спасибо %d раз', 
    742735        'respects' => 'Респекты', 
    743736        'avatar' => 'Аватар', 
     
    12771270        'top_ten_by_upspeed' => 'По скорости загрузки', 
    12781271        'top_ten_by_downspeed' => 'По скорости скачивания', 
     1272                'top_ten_by_popular_topics' => 'По популярным темам', 
     1273                'top_ten_by_reputation_posts' => 'По полезным сообщениям', 
     1274                'top_ten_forum' => 'Топ по форуму', 
    12791275        'show_by' => 'Выводить по', 
    12801276        'for' => 'за', 
     
    13251321                'view_only_new_checkcomm' => 'Смотреть только новые сообщения', 
    13261322 
     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 
    13271336        'translated_by' => 'На русский язык перевел %s', 
    13281337)); 
  • languages/lang_russian/lang_modcomment_log.php

    r307 r324  
    4545        'modcomment_nickname_changed' => 'изменен ник с &quot;%s&quot; на &quot;%s&quot;', 
    4646 
     47        'modcomment_add_bonus_text' => '%s - Добавлено %d бонуса пользователем \'%s\'', 
     48 
    4749)); 
    4850?> 
  • phpBB2/groupcp.php

    r307 r324  
    877877        $template->assign_vars(array( 
    878878                //'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), 
    880880                'PAGE_NUMBER' => sprintf($lang['page_of'], ( floor( $start / $config['topics_per_page'] ) + 1 ), $current_page )) 
    881881        ); 
  • phpBB2/includes/functions.php

    r313 r324  
    265265                for($i = 1; $i < $init_page_max + 1; $i++) 
    266266                { 
    267                         $page_string .= ( $i == $on_page ) ? $i : '<a href="' . append_sid($root_path . $base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>'; 
     267                        $page_string .= ( $i == $on_page ) ? $i : '<a href="' . append_sid($base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>'; 
    268268                        if ( $i <  $init_page_max ) 
    269269                        { 
     
    283283                                for($i = $init_page_min - 1; $i < $init_page_max + 2; $i++) 
    284284                                { 
    285                                         $page_string .= ($i == $on_page) ? $i : '<a href="' . append_sid($root_path . $base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>'; 
     285                                        $page_string .= ($i == $on_page) ? $i : '<a href="' . append_sid($base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>'; 
    286286                                        if ( $i <  $init_page_max + 1 ) 
    287287                                        { 
     
    299299                        for($i = $total_pages - 2; $i < $total_pages + 1; $i++) 
    300300                        { 
    301                                 $page_string .= ( $i == $on_page ) ? $i  : '<a href="' . append_sid($root_path . $base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>'; 
     301                                $page_string .= ( $i == $on_page ) ? $i  : '<a href="' . append_sid($base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>'; 
    302302                                if( $i <  $total_pages ) 
    303303                                { 
     
    311311                for($i = 1; $i < $total_pages + 1; $i++) 
    312312                { 
    313                         $page_string .= ( $i == $on_page ) ? $i : '<a href="' . append_sid($root_path . $base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>'; 
     313                        $page_string .= ( $i == $on_page ) ? $i : '<a href="' . append_sid($base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>'; 
    314314                        if ( $i <  $total_pages ) 
    315315                        { 
     
    323323                if ( $on_page > 1 ) 
    324324                { 
    325                         $page_string = ' <a href="' . append_sid($root_path . $base_url . "&amp;start=" . ( ( $on_page - 2 ) * $per_page ) ) . '">' . $lang['previous'] . '</a>&nbsp;&nbsp;' . $page_string; 
     325                        $page_string = ' <a href="' . append_sid($base_url . "&amp;start=" . ( ( $on_page - 2 ) * $per_page ) ) . '">' . $lang['previous'] . '</a>&nbsp;&nbsp;' . $page_string; 
    326326                } 
    327327 
    328328                if ( $on_page < $total_pages ) 
    329329                { 
    330                         $page_string .= '&nbsp;&nbsp;<a href="' . append_sid($root_path . $base_url . "&amp;start=" . ( $on_page * $per_page ) ) . '">' . $lang['next'] . '</a>'; 
     330                        $page_string .= '&nbsp;&nbsp;<a href="' . append_sid($base_url . "&amp;start=" . ( $on_page * $per_page ) ) . '">' . $lang['next'] . '</a>'; 
    331331                } 
    332332 
  • phpBB2/modcp.php

    r316 r324  
    14861486                $template->assign_vars(array( 
    14871487                        //'PAGINATION' => generate_pagination("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;sid=" . $userdata['session_id'], $forum_topics, $config['topics_per_page'], $start), 
    1488                         'PAGINATION' => generate_pagination("phpbb2.php?page=modcp&" . POST_FORUM_URL . "=$forum_id&amp;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&amp;sid=" . $userdata['session_id'], $forum_topics, $config['topics_per_page'], $start), 
    14891489                        'PAGE_NUMBER' => sprintf($lang['page_of'], ( floor( $start / $config['topics_per_page'] ) + 1 ), ceil( $forum_topics / $config['topics_per_page'] )), 
    14901490                        'L_GOTO_PAGE' => $lang['goto_page']) 
  • phpBB2/posting.php

    r316 r324  
    754754                } 
    755755 
    756                 $preview_message = str_replace("\n", '<br />', $preview_message); 
     756                //$preview_message = str_replace("\n", '<br />', $preview_message); 
    757757 
    758758                $template->set_filenames(array( 
  • phpBB2/search.php

    r317 r324  
    6666 
    6767$sort_dir = request_var('sort_dir', ''); 
    68 $sort_dir = ( $sort_dir == 'DESC' ? 'desc' : 'asc' ); 
     68$sort_dir = ( $sort_dir == 'ASC' ? 'ASC' : 'DESC' ); 
    6969 
    7070$search_time = request_var('search_time', 0); 
     
    13091309 
    13101310                $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), 
    13121312                        '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                )); 
    13211314                return; 
    13221315        } 
     
    14371430 
    14381431$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'], 
    14451432        'L_SEARCH_ANY_TERMS' => $lang['search_for_any'], 
    14461433        'L_SEARCH_ALL_TERMS' => $lang['search_for_all'], 
    14471434        'L_SEARCH_MESSAGE_ONLY' => $lang['search_msg_only'], 
    14481435        'L_SEARCH_MESSAGE_TITLE' => $lang['search_title_msg'], 
    1449         'L_CATEGORY' => $lang['category'], 
    1450         'L_RETURN_FIRST' => $lang['return_first'], 
    14511436        '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'], 
    14601437 
    14611438        //'S_SEARCH_ACTION' => append_sid("search.$phpEx?mode=results"), 
  • phpBB2/viewforum.php

    r313 r324  
    593593 
    594594        $template->assign_vars(array( 
    595                 'PAGINATION' => generate_pagination("phpbb2.php?page=viewforum&amp;" . POST_FORUM_URL . "=$forum_id&amp;topicdays=$topic_days", $topics_count, $config['topics_per_page'], $start), 
     595                'PAGINATION' => generate_pagination($root_path . "phpbb2.php?page=viewforum&amp;" . POST_FORUM_URL . "=$forum_id&amp;topicdays=$topic_days", $topics_count, $config['topics_per_page'], $start), 
    596596                'PAGE_NUMBER' => sprintf($lang['page_of'], ( floor( $start / $config['topics_per_page'] ) + 1 ), ceil( $topics_count / $config['topics_per_page'] )), 
    597597        )); 
     
    771771                                        $userdata['user_lastmark'] = (isset($tracking_topics['l'])) ? (int) (base_convert($tracking_topics['l'], 36, 10) + $config['onlinesince']) : 0; 
    772772                                } 
    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']; 
    774774                        } 
    775775 
  • phpBB2/viewtopic.php

    r318 r324  
    9393        if ( $view == 'newest' ) 
    9494        { 
     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                } 
    95100                // 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); 
    97102 
    98103                $topic_last_read = (isset($topic_tracking_info[$topic_id])) ? $topic_tracking_info[$topic_id] : $userdata['session_time']; 
     
    752757} 
    753758 
    754 $pagination = generate_pagination("phpbb2.php?page=viewtopic&amp;" . POST_TOPIC_URL . "=$topic_id&amp;" . $pagination_printertopic . "postdays=$postdays&amp;postorder=$postorder&amp;" . $pagination_highlight . $pagination_finish_rel, $total_replies, $pagination_ppp, $start); 
     759$pagination = generate_pagination($root_path . "phpbb2.php?page=viewtopic&amp;" . POST_TOPIC_URL . "=$topic_id&amp;" . $pagination_printertopic . "postdays=$postdays&amp;postorder=$postorder&amp;" . $pagination_highlight . $pagination_finish_rel, $total_replies, $pagination_ppp, $start); 
    755760if($pagination != '' && $pagination_printertopic) { 
    756761        $pagination .= " &nbsp;<a href=\"" . append_sid($root_path . "phpbb2.php?page=viewtopic&amp;" . POST_TOPIC_URL . "=$topic_id&amp;" . $pagination_printertopic . "postdays=$postdays&amp;postorder=$postorder&amp;". $pagination_highlight. "start=0&amp;finish_rel=-10000") . "\" title=\"" . $lang['printertopic_cancel_pagination_desc'] . "\">" . $lang['printertopic_all_pages'] . "</a>"; 
  • rss.php

    r316 r324  
    2323                } 
    2424     } 
    25      if( !empty($message) ) { 
     25     if( $message ) { 
    2626             header ('Content-Type: text/plain'); 
    27           echo $message; 
     27               echo $message; 
    2828     } 
    2929     gc(); 
     
    192192        $template->display('rss_tpl'); 
    193193 
    194         if (!empty($cache)) { 
    195                 $cache->unload(); 
    196         } 
    197         if (!empty($db)) { 
    198                 $db->sql_close(); 
    199         } 
     194        gc(); 
    200195} 
    201196?> 
  • templates/admin/admin_voting_body.tpl

    r83 r324  
     1<script type="text/javascript"> 
     2Object.size = function(obj) { 
     3    var size = 0, key; 
     4    for (key in obj) { 
     5        if (obj.hasOwnProperty(key)) size++; 
     6    } 
     7    return size; 
     8}; 
     9function 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 
    140<h1>{L_ADMIN_VOTE_TITLE}</h1> 
    241<p>{L_ADMIN_VOTE_EXPLAIN}</p> 
    342<!-- BEGIN viewresult --> 
    443<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> 
    2044<form method="post" name="vote_list" action="{S_MODE_ACTION}"> 
    2145  <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> 
     
    3963                <td class="{viewresult.votes.COLOR}" align="center"><span class="gensmall">{viewresult.votes.VOTE_ID}</span></td> 
    4064                <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> 
    4266                        <!-- IF viewresult.votes.LINK --><a href="{viewresult.votes.LINK}"><!-- ENDIF -->{viewresult.votes.DESCRIPTION}<!-- IF viewresult.votes.LINK --></a><!-- ENDIF --></span><br /> 
    4367                </td> 
     
    4872        <tr> 
    4973                <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> 
    6075        </td> 
    6176        </tr> 
  • templates/admin/user_edit_body.tpl

    r316 r324  
    282282        </tr> 
    283283        <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> 
    284289          <td class="row1"><span class="gen">{L_TITLE}</span></td> 
    285290          <td class="row2"> 
  • templates/bithdtv/bithdtv.cfg

    r280 r324  
    158158 
    159159$images['printer'] = "$current_template_images/printer.gif"; 
     160 
     161$config['rating_pic_width'] = 20; 
    160162?> 
  • templates/bithdtv/bithdtv.css

    r318 r324  
    10301030text-decoration:underline; 
    10311031} 
     1032.zip-icon { 
     1033background: url(images/torrent_icons.png) no-repeat scroll 0 -32px; 
     1034} 
     1035.magnet-icon { 
     1036background: url(images/torrent_icons.png) no-repeat scroll 0 0; 
     1037} 
     1038.icon-32 { 
     1039width:32px; 
     1040height: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  
    3131        <tr> 
    3232                <td> 
    33                 <!-- BEGIN tags_cloud --> 
     33                <!-- BEGIN tags_row --> 
    3434 
    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> 
    3636 
    37                 <!-- END tags_cloud --> 
     37                <!-- END tags_row --> 
    3838 
    3939                </td> 
  • templates/bithdtv/details.html

    r316 r324  
    1010        <tr> 
    1111                <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('&lt;a href=&quot;{U_DOWNLOAD_AS_GZIP}&quot;&gt;{L_DOWNLOAD_AS_GZIP_ARCHIVE}&lt;/a&gt;', 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 
    1422                <!-- IF S_USER_LOGGED_IN --> 
    1523 
     
    5664        <td class="detail" valign="top" align="left">{SIZE}</td> 
    5765        </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> 
    7081        <tr> 
    7182                <td class="detail" valign="top" align="right">{L_ADDED}</td> 
     
    130141        <!-- END switch_sos_section --> 
    131142 
    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  
    138143</table> 
    139144 
  • templates/bithdtv/details_edit.html

    r311 r324  
    3333  <tr> 
    3434    <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> 
    3636  </tr> 
    3737  <!-- 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"> 
    22<html> 
    33<head> 
     
    9090                                <table cellpadding="4" cellspacing="1" border="0" width="852"> 
    9191                                        <tr> 
    92                                                 <td
     92                                                <td align="left"
    9393                                                {CURRENT_USER_NAME}<!-- IF CURRENT_USER_RANK_NAME --> [{CURRENT_USER_RANK_NAME}]<!-- ENDIF -->, {L_REPUTATION}: {CURRENT_USER_POINTS} 
    9494                                                [<a href="{U_LOGOUT}">{L_LOGOUT}</a>]<br /> 
  • templates/bithdtv/tags_view_form.html

    r313 r324  
    88<span id="tag_{tags_row.TAG_NUM}"> 
    99 
    10         <!-- IF S_USER_LOGGED_IN --> 
     10        <!-- IF S_USER_LOGGED_IN && ALLOW_ADD_TAGS --> 
    1111 
    1212        [<a href="javascript:;" onclick="update_tag('{tags_row.ENC_TAG_NAME}', '{TAG_TYPE}', '{ID}', 'down')">-</a>] 
     
    1616        <a href="{tags_row.U_TAG}" style="font-size:{tags_row.TAG_SIZE}px;font-weight:bold;">{tags_row.TAG_NAME}</a> 
    1717 
    18         <!-- IF S_USER_LOGGED_IN --> 
     18        <!-- IF S_USER_LOGGED_IN && ALLOW_ADD_TAGS --> 
    1919 
    2020        [<a href="javascript:;" onclick="update_tag('{tags_row.ENC_TAG_NAME}', '{TAG_TYPE}', '{ID}', 'up')">+</a>] 
  • templates/bithdtv/top_peers_body.html

    r299 r324  
    1616 
    1717                <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> 
    2322                </tr> 
    2423 
  • templates/bithdtv/top_ten_body.html

    r299 r324  
    33<!-- BEGIN topten_row --> 
    44 
    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> 
    66 
    77        <ul style="list-style:none"> 
  • templates/bithdtv/top_users_body.html

    r299 r324  
    1818 
    1919                <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> 
    2626 
    2727                </tr> 
  • templates/bithdtv/ucp_friends_body.html

    r308 r324  
    77        </tr> 
    88        <!-- BEGIN friends_list_row --> 
    9         <tr valign="bottom"> 
     9        <tr valign="top"> 
    1010        <!-- 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>&nbsp;<a href="{friends_list_row.users_col.U_USERDETAILS}">{friends_list_row.users_col.FRIEND_USERNAME}</a>&nbsp;<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}" /> 
    1420                </td> 
    1521        <!-- END users_col --> 
  • templates/bithdtv/userdetails.html

    r308 r324  
    3333                <!-- IF WARN_PANEL --> 
    3434                <br><hr><b>{L_WARNINGS}:</b>&nbsp; {WARN_PANEL} 
    35                 <!-- ENDIF --> 
    36                 <!-- IF CLIENT --> 
    37                 <br><hr><b>{L_CLIENT}:</b>&nbsp; {CLIENT}<!-- IF CONNECTABLE_PORT --> <b>{L_PORT}:</b>&nbsp; {CONNECTABLE_PORT}<!-- ENDIF --> 
    38                 <!-- ENDIF --> 
    39                 <!-- IF RATING --> 
    40                 <br><hr><b>{L_RATING}:</b>&nbsp; {L_RATING_DESCR} {RATING} 
    41                 <!-- ENDIF --> 
    42                 <!-- IF THANKS --> 
    43                 <br><hr><b>{L_THANKS}:</b>&nbsp; {THANKS} 
    4435                <!-- ENDIF --> 
    4536 
     
    123114 
    124115<!-- INCLUDE overall_footer.html --> 
    125  
  • templates/main/browse.html

    r313 r324  
    4141<fieldset id="tag_cloud"> 
    4242 
    43                 <!-- BEGIN tags_cloud --> 
     43                <!-- BEGIN tags_row --> 
    4444 
    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> 
    4646 
    47                 <!-- END tags_cloud --> 
     47                <!-- END tags_row --> 
    4848 
    4949 
  • templates/main/comments_table.html

    r313 r324  
    8888<!-- IF S_USER_IS_MOD && S_C_FORM_ACTION --> 
    8989 
    90 <p align="right" style="width:80%"
     90<p align="right"
    9191<a href="javascript:;" onclick="check(document.comments_form.elements);">{L_SELECT_ALL}</a> 
    9292<br /> 
  • templates/main/details.html

    r305 r324  
    77<!-- IF MESSAGE1 --><h1>{MESSAGE1}</h1><!-- ENDIF --> 
    88<!-- 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} &quot;{NAME}&quot;<!-- 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 
    1115  <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('&lt;a href=&quot;{U_DOWNLOAD_AS_GZIP}&quot;&gt;{L_DOWNLOAD_AS_GZIP_ARCHIVE}&lt;/a&gt;', 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 
    1428<!-- IF S_USER_LOGGED_IN --> 
    1529 
     
    2236    </td> 
    2337  </tr> 
     38 
    2439  <tr> 
    2540    <td width="100">{L_INFO_HASH}</td> 
     
    5671  <tr> 
    5772    <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> 
    6684    </td> 
    6785  </tr> 
     
    96114  <!-- END switch_hidden_section --> 
    97115 
     116  <!-- IF S_USER_LOGGED_IN --> 
     117 
    98118  <tr> 
    99119    <td>{L_UPLOADED}</td> 
     
    111131  <tr> 
    112132    <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> 
    114134    <td valign="top">{NUM_FILES}<div id="filelist_row">{FILELIST_TPL}</div></td> 
    115135  </tr> 
    116  
    117   <!-- IF S_USER_LOGGED_IN --> 
    118136 
    119137  <tr> 
     
    141159</table> 
    142160 
    143 <br /> 
    144  
    145 <table class="border" width="80%"> 
     161<table class="border torrent_details"> 
     162<caption>{L_TAGS}</caption> 
    146163  <tr> 
    147     <td width="100">{L_TAGS}</td> 
    148164    <td id="details_tags"><!-- INCLUDE tags_view_form.html --></td> 
    149165  </tr> 
  • templates/main/details_edit.html

    r311 r324  
    3333  <tr> 
    3434    <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> 
    3636  </tr> 
    3737  <!-- END switch_hidden --> 
  • templates/main/forum/confirm_body.tpl

    r83 r324  
    1616</table> 
    1717 
    18 <br clear="all" /> 
     18<br /> 
    1919 
    2020<!-- INCLUDE overall_footer.html --> 
  • templates/main/forum/error_body.tpl

    r83 r324  
    1717</table> 
    1818 
    19 <br clear="all" /> 
     19<br /> 
    2020 
    2121<!-- INCLUDE overall_footer.html --> 
  • templates/main/forum/groupcp_pending_info.tpl

    r83 r324  
    11<!-- INCLUDE overall_header.html --> 
    22 
    3 <br clear="all" /> 
     3<br /> 
    44 
    55<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> 
  • templates/main/forum/groupcp_user_body.tpl

    r83 r324  
    7474</table> 
    7575 
    76 <br clear="all" /> 
     76<br /> 
    7777 
    7878<table width="100%" cellspacing="2" border="0" align="center"> 
  • templates/main/forum/index_body.tpl

    r269 r324  
    7979</table> 
    8080 
    81 <br clear="all" /> 
     81<br /> 
    8282 
    8383<table cellspacing="3" border="0" align="center" cellpadding="0"> 
  • templates/main/forum/message_body.tpl

    r83 r324  
    2626</table> 
    2727 
    28 <br clear="all" /> 
     28<br /> 
    2929 
    3030<!-- INCLUDE overall_footer.html --> 
  • templates/main/forum/modcp_viewip.tpl

    r259 r324  
    5757</table> 
    5858 
    59 <br clear="all" /> 
     59<br /> 
    6060 
    6161<!-- INCLUDE overall_footer.html --> 
  • templates/main/forum/posting_preview.tpl

    r269 r324  
    2020</table> 
    2121 
    22 <br clear="all" /> 
     22<br /> 
  • templates/main/forum/viewtopic_poll_ballot.tpl

    r83 r324  
    11                        <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"> 
    33                                        <tr> 
    44                                                <td align="center"><span class="gen"><b>{POLL_QUESTION}</b></span></td> 
     
    2020                                        </tr> 
    2121                                        <tr> 
    22                                                  
     22 
    2323                  <td align="center"><span class="gensmall"><b><a href="{U_VIEW_RESULTS}" class="gensmall">{L_VIEW_RESULTS}</a></b></span></td> 
    2424                                        </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 /> 
    33        <table cellspacing="0" cellpadding="2" border="0" align="center"> 
    4           <tr>  
     4          <tr> 
    55                <td colspan="4" align="center"><span class="gen"><b>{POLL_QUESTION}</b></span></td> 
    66          </tr> 
    7           <tr>  
    8                 <td>  
     7          <tr> 
     8                <td> 
    99                  <table cellspacing="0" cellpadding="1" border="0" width="100%"> 
    1010                        <!-- BEGIN poll_option --> 
    11                         <tr>  
     11                        <tr> 
    1212                          <td align="left"><span class="gensmall">{poll_option.POLL_OPTION_CAPTION}</span></td> 
    13                           <td>  
     13                          <td> 
    1414                                <table cellspacing="0" cellpadding="0" align="left"> 
    15                                   <tr>  
     15                                  <tr> 
    1616                                        <td><img src="{TEMPLATE_PATH}/images/vote_lcap.gif" width="4" alt="" height="12" /></td> 
    1717                                        <td><img src="{poll_option.POLL_OPTION_IMG}" width="{poll_option.POLL_OPTION_IMG_WIDTH}" height="12" alt="{poll_option.POLL_OPTION_PERCENT}" /></td> 
     
    2727                </td> 
    2828          </tr> 
    29           <tr>  
     29          <tr> 
    3030                <td colspan="4" align="center"><span class="gen"><b>{L_TOTAL_VOTES} : {TOTAL_VOTES}</b></span></td> 
    3131          </tr> 
    3232        </table> 
    33         <br clear="all" /> 
    3433  </td> 
    3534</tr> 
  • templates/main/index_body.html

    r310 r324  
    105105                        <a href="{releases_row.U_CATEGORY}"><img src="{releases_row.CATEGORY_IMAGE}" align="right" alt="{releases_row.CATEGORY_NAME}" /></a> 
    106106                        {releases_row.DESCRIPTION} 
    107                         <div style="clear: both"></div> 
     107 
    108108                        <p align="right">{releases_row.IMDB_LINK} [<a href="{releases_row.U_DETAILS}">{L_DETAILS}</a>]{releases_row.FORUM_LINK}</p> 
    109109                </div> 
    110                 <hr /> 
     110 
    111111        </div> 
    112112 
  • templates/main/main.cfg

    r293 r324  
    101101$images['icon_newest_reply'] = "$current_template_images/icon_newest_reply.gif"; 
    102102 
     103$images['forum_new_posts'] = "$current_template_images/newsn.gif"; 
     104$images['checkcomm_icon'] = "$current_template_images/new_comments.gif"; 
     105 
    103106$images['forum'] = "$current_template_images/folder_big.gif"; 
    104107$images['forum_new'] = "$current_template_images/folder_new_big.gif"; 
     
    162165 
    163166$images['printer'] = "$current_template_images/printer.gif"; 
     167 
     168$config['rating_pic_width'] = 20; 
    164169?> 
  • templates/main/main.css

    r318 r324  
    9797 
    9898#main-half { 
    99 float:left; 
    100 width:67%; 
    101 min-width:600px; 
     99margin:0 170px; 
     100 
    102101} 
    103102 
    104103#main-full { 
    105 float:left; 
    106 width:84%; 
    107 min-width:750px; 
     104margin-left:170px; 
    108105} 
    109106 
    110107#menu-right-block { 
    111108float:right; 
    112 width:15%; 
    113 min-width:160px; 
     109width:160px; 
    114110} 
    115111 
    116112#menu-block { 
    117113float:left; 
    118 width:15%; 
    119 min-width:150px; 
     114width:160px; 
    120115} 
    121116 
     
    190185#tabs-control { 
    191186line-height:normal; 
    192 min-width:570px; 
    193 width:90%; 
    194 margin:0 0 -5px -12px; 
     187height:18px; 
    195188} 
    196189 
     
    274267background-color:#ECECEC; 
    275268border:solid 1px #A9B8C2; 
    276 min-width:570px; 
    277 width:90%; 
    278269margin:4px 0; 
    279270padding:2px 0 0; 
     
    296287border:1px solid #000; 
    297288background:none; 
    298 margin-bottom:10px; 
     289margin-bottom:20px; 
    299290text-align:left; 
    300291background-color:#EFEFEF; 
    301292min-width:600px; 
    302 width:80%; 
    303293padding:5px; 
    304294} 
     
    308298text-decoration:none; 
    309299line-height:120%; 
    310 margin-top:25px; 
    311300min-width:600px; 
    312 width:80%; 
    313301text-align:left; 
    314302} 
     
    324312text-align:left; 
    325313margin-bottom:20px; 
     314padding-bottom:10px; 
     315overflow: hidden; 
     316width: 100%; 
     317border-bottom: 1px solid #000000; 
    326318} 
    327319 
     
    333325.description img.pic { 
    334326width:120px; 
     327margin-left:-125px; 
    335328float:left; 
    336 margin-left:-125px; 
    337329} 
    338330 
     
    342334} 
    343335 
    344 .description img { 
    345 float:right; 
    346 margin:0; 
    347 } 
    348  
    349336.description p { 
    350 z-index:3
    351 margin:8px 0 0; 
     337margin:8px 0 10px 0
     338 
    352339} 
    353340 
     
    536523} 
    537524 
     525.torrent_details { 
     526width:100%; 
     527} 
     528 
     529.torrent_details th { 
     530padding-left:0; 
     531padding-right:0; 
     532} 
     533 
    538534table.textbbcode { 
    539535border:none; 
     
    569565border:none; 
    570566position:relative; 
    571 margin:15px 0; 
     567margin:0 0 15px 0; 
    572568padding:10px; 
    573569} 
     
    660656cursor:text; 
    661657padding:2px; 
     658resize: none; 
    662659} 
    663660 
     
    896893} 
    897894 
    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 { 
    899896content:"."; 
    900897display:block; 
     
    904901} 
    905902 
    906 .clearfix,#tabs,#tabs-control,.row,#content,fieldset dl,#page-body { 
     903.clearfix,#tabs,.row,#content,fieldset dl,#page-body { 
    907904height:1%; 
    908905} 
     
    913910 
    914911.spacer_open2 { 
    915 width:80%; 
    916912text-align:left; 
    917913} 
     
    14731469#daddy-shoutbox { 
    14741470float:left; 
    1475 width:100%; 
     1471width:99%; 
    14761472background:#EFEFEF; 
    14771473font-size:1.1em; 
     
    15901586} 
    15911587 
    1592 .row2,.border .subtables .row2
     1588.row2,.border .subtables .row2, .private
    15931589background-color:#E6E9ED; 
    15941590} 
     
    16591655text-decoration:underline; 
    16601656} 
     1657 
     1658.zip-icon { 
     1659background: url(images/torrent_icons.png) no-repeat scroll 0 -32px; 
     1660} 
     1661.magnet-icon { 
     1662background: url(images/torrent_icons.png) no-repeat scroll 0 0; 
     1663} 
     1664.icon-32 { 
     1665width:32px; 
     1666height: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  
    11                                        </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 
    223                                </div> 
    234                                <span class="corners-bottom"><span>&nbsp;</span></span> 
  • templates/main/overall_header.html

    r313 r324  
    3636                <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> 
    3737                <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> 
    4143        </div> 
    4244 
     
    5254                        <ul> 
    5355                                <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> 
    5557 
    5658                                <!-- BEGIN switch_non_uploader_view --> 
     
    7375                                <!-- ENDIF --> 
    7476 
     77                                <li<!-- IF CURRENT_PAGE == U_CHAT --> id="activetab"<!-- ENDIF -->><a href="{U_CHAT}"><span>{L_CHAT}</span></a></li> 
    7578                                <li<!-- IF CURRENT_PAGE == U_FORUM --> id="activetab"<!-- ENDIF -->><a href="{U_FORUM}"><span>{L_FORUMS}</span></a></li> 
    7679                                <li<!-- IF CURRENT_PAGE == U_RULES --> id="activetab"<!-- ENDIF -->><a href="{U_RULES}"><span>{L_RULES}</span></a></li> 
     
    8386                                <!-- ENDIF --> 
    8487 
    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>--
    8689                        </ul> 
    8790                </div> 
     
    9093                        <span class="corners-top"><span>&nbsp;</span></span> 
    9194                        <div id="content"> 
     95 
     96 
    9297                                <div id="menu-block" align="left"> 
    9398                                        <div id="menu"> 
    9499                                                <ul> 
    95  
    96100                                                        <!-- IF S_USER_LOGGED_IN --> 
    97101 
     
    163167                                                        <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> 
    164168                                                        <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> 
    165170 
    166171                                                        <!-- ENDIF --> 
     
    180185                                        </div> 
    181186                                </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 --> 
    182214 
    183215                                <div id="<!-- IF RIGHT_MENU -->main-half<!-- ELSE -->main-full<!-- ENDIF -->" align="center"> 
  • templates/main/tags_view_form.html

    r313 r324  
    88<span id="tag_{tags_row.TAG_NUM}"> 
    99 
    10         <!-- IF S_USER_LOGGED_IN --> 
     10        <!-- IF S_USER_LOGGED_IN && ALLOW_ADD_TAGS --> 
    1111 
    1212        [<a href="javascript:;" onclick="update_tag('{tags_row.ENC_TAG_NAME}', '{TAG_TYPE}', '{ID}', 'down')">-</a>] 
     
    1616        <a href="{tags_row.U_TAG}" style="font-size:{tags_row.TAG_SIZE}px;font-weight:bold;">{tags_row.TAG_NAME}</a> 
    1717 
    18         <!-- IF S_USER_LOGGED_IN --> 
     18        <!-- IF S_USER_LOGGED_IN && ALLOW_ADD_TAGS --> 
    1919 
    2020        [<a href="javascript:;" onclick="update_tag('{tags_row.ENC_TAG_NAME}', '{TAG_TYPE}', '{ID}', 'up')">+</a>] 
  • templates/main/top_ten_body.html

    r299 r324  
    33<!-- BEGIN topten_row --> 
    44 
    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> 
    66 
    77        <ul style="list-style:none"> 
     
    1818<!-- END topten_row --> 
    1919 
    20 <br clear="both" /> 
     20<br /><br /> 
    2121 
    2222<form action="{S_FORM_ACTION}"> 
  • templates/main/torrents_table.html

    r313 r324  
    4545                <!-- ENDIF --> 
    4646 
    47                 <tr
     47                <tr class="<!-- IF torrents_table.TORRENT_BANNED -->banned<!-- ENDIF --><!-- IF torrents_table.TORRENT_HIDDEN --> hidden<!-- ENDIF -->"
    4848                        <td align="center"> 
    4949                        <a href="{torrents_table.U_DOWNLOAD}"><img src="{TEMPLATE_PATH}/images/download.gif" alt="{L_DOWNLOAD}" title="{L_DOWNLOAD}" /></a><br /><br /> 
     
    5151                        </td> 
    5252 
    53                         <td {torrents_table.HIDDEN_COLOR}><a href="{torrents_table.U_CATEGORY}"> 
     53                        <td><a href="{torrents_table.U_CATEGORY}"> 
    5454 
    5555                        <!-- IF torrents_table.CAT_PIC --> 
     
    6161                        </a></td> 
    6262 
    63                         <td {torrents_table.HIDDEN_COLOR}align="left"> 
     63                        <td align="left"> 
    6464 
    6565                                <!-- IF not torrents_table.MODERATED  --> 
     
    8282 
    8383                        </td> 
    84                         <td {torrents_table.HIDDEN_COLOR}align="center"> 
     84                        <td align="center"> 
    8585                        <!-- 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 --> 
    8686                        </td> 
    87                         <td {torrents_table.HIDDEN_COLOR}align="center"> 
     87                        <td align="center"> 
    8888 
    8989                        <!-- IF torrents_table.TORRENT_COMMENTS --> 
     
    9595 
    9696                        </td> 
    97                         <td {torrents_table.HIDDEN_COLOR}align="center">{torrents_table.RATING}</td> 
     97                        <td align="center">{torrents_table.RATING}</td> 
    9898 
    9999                        <!-- IF L_TTL --> 
    100                         <td {torrents_table.HIDDEN_COLOR}align="center">{torrents_table.TTL}</td> 
     100                        <td align="center">{torrents_table.TTL}</td> 
    101101                        <!-- ENDIF --> 
    102102 
    103103                        <!-- IF L_WAIT --> 
    104                         <td {torrents_table.HIDDEN_COLOR}align="center">{torrents_table.WAITTIME}</td> 
     104                        <td align="center">{torrents_table.WAITTIME}</td> 
    105105                        <!-- ENDIF --> 
    106106 
    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"> 
    109109 
    110110                        <!-- IF torrents_table.TORRENT_COMPLETED --> 
     
    116116 
    117117                        </td> 
    118                         <td {torrents_table.HIDDEN_COLOR}align="center"> 
     118                        <td align="center"> 
    119119 
    120120                        <!-- IF torrents_table.TORRENT_SEEDERS --> 
     
    135135 
    136136                        <!-- 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> 
    138138                        <!-- ENDIF --> 
    139139 
    140140                        <!-- 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> 
    142142                        <!-- ENDIF --> 
    143143 
    144144                        <!-- 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> 
    146146                        <!-- ENDIF --> 
    147147 
  • templates/main/ucp_friends_body.html

    r308 r324  
    55        <caption>{L_FRIENDS_LIST}</caption> 
    66        <!-- 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>&nbsp;<a href="{friends_list_row.users_col.U_USERDETAILS}">{friends_list_row.users_col.FRIEND_USERNAME}</a>&nbsp;<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 /
    1212                </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 --> 
    1420        </tr> 
    1521        <!-- END friends_list_row --> 
  • templates/main/upload_body.html

    r269 r324  
    55<script type="text/javascript" src="{ROOT_PATH}js/jquery.autocomplete.js"></script> 
    66 
    7 <div id="preview_box" style="width: 700px;"
     7<div id="preview_box"
    88<!-- BEGIN uploading_preview --> 
    9 <table width="700" class="border"> 
     9<table class="border torrent_details"> 
    1010  <caption>{uploading_preview.NAME}</caption> 
    1111  <tr> 
     
    2323<p>{S_ANNOUNCE_ADDRESS}</p> 
    2424<!-- ENDIF --> 
    25 <table width="700" class="border"> 
     25<table class="border torrent_details"> 
    2626<!-- IF TYPE == 'main' --> 
    2727  <tr> 
    28     <td valign="top" align="right">{L_TORRENT}</td> 
     28    <td width="100" valign="top" align="right">{L_TORRENT}</td> 
    2929    <td valign="top" align=left><input type="file" name="file" size="80"></td> 
    3030  </tr> 
     
    4444  <tr> 
    4545    <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> 
    4747  </tr> 
    4848  <tr> 
  • templates/reflection/browse.html

    r313 r324  
    2525<fieldset id="tag_cloud" class="catNamesBlock"> 
    2626 
    27                 <!-- BEGIN tags_cloud --> 
     27                <!-- BEGIN tags_row --> 
    2828 
    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> 
    3030 
    31                 <!-- END tags_cloud --> 
     31                <!-- END tags_row --> 
    3232 
    3333</fieldset> 
  • templates/reflection/details.html

    r316 r324  
    1212<div class="torrentViewLeft">{L_DOWNLOAD}</div> 
    1313<div class="torrentViewRight"> 
    14     <a href="{U_DOWNLOAD}" onclick="alert('{L_DOWNLOAD_WARNING}'); return true;"<!-- IF U_DOWNLOAD_AS_GZIP --> onmouseover="return overlib('&lt;a href=&quot;{U_DOWNLOAD_AS_GZIP}&quot;&gt;{L_DOWNLOAD_AS_GZIP_ARCHIVE}&lt;/a&gt;', STICKY, MOUSEOFF);" onmouseout="return nd();"<!-- ENDIF -->>{TORRENT_FILENAME}</a> 
     14    <h1><a href="{U_DOWNLOAD}">{TORRENT_FILENAME}</a> 
    1515 
     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> 
    1624        <!-- IF S_USER_LOGGED_IN --> 
    1725 
     
    5563 
    5664<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> 
    6576</div> 
    66  
     77<br /><br /> 
    6778<div class="torrentViewLeft">{L_ADDED}</div> 
    6879<div class="torrentViewRight">{ADDED}</div> 
  • templates/reflection/details_edit.html

    r311 r324  
    3737        <div class="tableRow"> 
    3838                <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> 
    4040                <div class="clear">&nbsp;</div> 
    4141        </div> 
  • templates/reflection/forum/viewtopic_body.tpl

    r313 r324  
    6969        <tr> 
    7070                <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> 
    7271                <br /><span class="postdetails">{postrow.POSTER_RANK} 
    7372                <br /> 
     
    167166 
    168167<!-- INCLUDE overall_footer.html --> 
    169  
  • templates/reflection/overall_header.html

    r313 r324  
    5656 
    5757                <!-- 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> 
    5959                <!-- IF S_USER_LOGGED_IN --> 
    6060                <a href="{U_HELPDESC}">{L_HELPDESC}</a> 
     
    7373                <a href="{U_UPLOAD}">{L_UPLOAD}</a> 
    7474                <!-- END switch_uploader_view --> 
    75                 <a href="{U_BROWSE}">{L_BROWSE}</a> 
     75                <a href="{U_BROWSE}">{L_TORRENTS}</a> 
    7676                <a href="{U_INDEX}">{L_INDEX}</a> 
    7777 
     
    160160                                <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 /> 
    161161                                <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 /> 
    162163                                <!-- ENDIF --> 
    163164 
  • templates/reflection/reflection.cfg

    r280 r324  
    160160 
    161161$images['printer'] = "$current_template_images/printer.gif"; 
     162 
     163$config['rating_pic_width'] = 20; 
    162164?> 
  • templates/reflection/reflection.css

    r318 r324  
    12101210background-color:#BF5E26; 
    12111211} 
     1212.zip-icon { 
     1213background: url(images/torrent_icons.png) no-repeat scroll 0 -32px; 
     1214} 
     1215.magnet-icon { 
     1216background: url(images/torrent_icons.png) no-repeat scroll 0 0; 
     1217} 
     1218.icon-32 { 
     1219width:32px; 
     1220height: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  
    88<span id="tag_{tags_row.TAG_NUM}"> 
    99 
    10         <!-- IF S_USER_LOGGED_IN --> 
     10        <!-- IF S_USER_LOGGED_IN && ALLOW_ADD_TAGS --> 
    1111 
    1212        [<a href="javascript:;" onclick="update_tag('{tags_row.ENC_TAG_NAME}', '{TAG_TYPE}', '{ID}', 'down')">-</a>] 
     
    1616        <a href="{tags_row.U_TAG}" style="font-size:{tags_row.TAG_SIZE}px;font-weight:bold;">{tags_row.TAG_NAME}</a> 
    1717 
    18         <!-- IF S_USER_LOGGED_IN --> 
     18        <!-- IF S_USER_LOGGED_IN && ALLOW_ADD_TAGS --> 
    1919 
    2020        [<a href="javascript:;" onclick="update_tag('{tags_row.ENC_TAG_NAME}', '{TAG_TYPE}', '{ID}', 'up')">+</a>] 
  • templates/reflection/top_ten_body.html

    r299 r324  
    33<!-- BEGIN topten_row --> 
    44 
    5 <div style="float:left;width:33%;"><h3>{topten_row.TITLE}</h3> 
     5<div style="float:left;padding:5px;"><h3>{topten_row.TITLE}</h3> 
    66 
    77        <ul> 
  • templates/reflection/torrents_table.html

    r313 r324  
    3333<!-- ENDIF --> 
    3434 
    35 <div class="torrentsBlock"> 
     35<div class="torrentsBlock<!-- IF torrents_table.TORRENT_BANNED --> banned<!-- ENDIF --><!-- IF torrents_table.TORRENT_HIDDEN --> hidden<!-- ENDIF -->"> 
    3636        <div class="torrentsTitle"> 
    3737 
  • templates/reflection/ucp_friends_body.html

    r308 r324  
    88                        <!-- BEGIN users_col --> 
    99                        <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>&nbsp;<a href="{friends_list_row.users_col.U_USERDETAILS}">{friends_list_row.users_col.FRIEND_USERNAME}</a>&nbsp;<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> 
    1221                        </div> 
    1322                        <!-- END users_col --> 
    14                         <div class="clear">&nbsp;</div> 
     23                        <div class="clear">&nbsp;</div><br /> 
    1524                <!-- END friends_list_row --> 
    1625        </div> 
  • topten.php

    r299 r324  
    4848                'by_upspeed' => 'upspeed', 
    4949                'by_downspeed' => 'downspeed', 
     50        ), 
     51 
     52        'forum' => array( 
     53                'by_popular_topics' => 'topic_replies', 
     54                'by_reputation_posts' => 'post_reputation', 
    5055        ), 
    5156); 
     
    100105 
    101106switch ( $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&amp;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&amp;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 
    102178        case 'users': 
    103179                $order_field = ( isset($top_ten_types[$action][$do]) ? $top_ten_types[$action][$do] : 'uploaded' ); 
  • upload.php

    r316 r324  
    217217                /* start tags */ 
    218218 
    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'); 
    224229                } 
    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  
    253230                /* end tags */ 
    254231 
  • usersearch.php

    r317 r324  
    8181$agents = array(); 
    8282while ( $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']; 
    8686        } 
    8787}