Changeset 85

Show
Ignore:
Timestamp:
10/09/08 21:34:47 (4 years ago)
Author:
Nafania
Message:

--

Files:

Legend:

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

    r4 r85  
    1414if( !empty($setmodules) ) 
    1515{ 
    16         $modes = array( 
    17                 'settings' => 'general_settings', 
    18                 'autoclean_settings' => 'autoclean_settings', 
    19                 'user_torrent_seed_download_limits_settings' => 'user_torrent_seed_download_limits_settings', 
    20                 'bonus_settings' => 'bonus_settings', 
    21                 'autowarn_settings' => 'autowarn_settings', 
    22                 'invite_settings' => 'invite_settings' 
    23         ); 
    24         $file = basename(__FILE__); 
    25         $module['general']['configuration'] = $file; 
    26 //      $module['general']['configuration']['submodules'] = $modes; 
    27      return; 
     16        $file = basename(__FILE__); 
     17        $module['general']['configuration'] = $file; 
     18        return; 
    2819} 
    2920 
     
    4536    } 
    4637 
    47     return (int) $val; 
     38    return intval($val); 
     39
     40 
     41function parse_float ( $val ) { 
     42        $val = str_replace(',', '.', $val); 
     43        $val = floatval($val); 
     44        return $val; 
    4845} 
    4946 
     
    5552require('./pagestart.' . $phpEx); 
    5653include($tracker_root_path . 'include/functions_selects.'.$phpEx); 
    57 include($tracker_root_path . 'include/functions_admin.'.$phpEx); 
    58 include($tracker_root_path . 'include/functions_check.'.$phpEx); 
    5954include($tracker_root_path . 'languages/lang_' . $config['default_lang'] . '/lang_merge.' . $phpEx); 
    6055 
    61 $mode = request_var('mode', 'settings'); 
    62 $submit = (isset($_POST['submit'])) ? true : false; 
    63  
    64 if ( isset($_REQUEST['config']) ) { 
    65         if ( is_array($_REQUEST['config']) ) { 
    66                 foreach ( $_REQUEST['config'] AS $key => $val ) { 
    67                         if ( is_array($val) ) { 
    68                                 foreach ( $val AS $_key => $_val ) { 
    69                                         $result = ( isset($_REQUEST['config'][$key][$_key]) ? trim(htmlspecialchars($_REQUEST['config'][$key][$_key])) : '' ); 
    70                                         $result = (STRIP) ? stripslashes($result) : $result; 
    71                                         $cfg_array[$key][$_key] = $result; 
     56// 
     57// Pull all config data 
     58// 
     59$sql = 'SELECT * FROM ' . CONFIG_TABLE; 
     60$result = $db->sql_query($sql); 
     61 
     62while( $row = $db->sql_fetchrow($result) ) { 
     63        $config_name = $row['name']; 
     64        $config_value = $row['value']; 
     65 
     66        $default_config[$config_name] = ( isset($_POST['submit']) ? request_var($config_name, '') : $config_value ); 
     67 
     68     $new[$config_name] = ( isset($_POST[$config_name]) ) ? request_var($config_name, '') : $default_config[$config_name]; 
     69 
     70     switch ( $config_name ) { 
     71             case 'default_language_charset': 
     72                     $new['default_language_charset'] = strtolower($new['default_language_charset']); 
     73             break; 
     74 
     75             case 'cookie_name': 
     76                     $new['cookie_name'] = str_replace('.', '_', $new['cookie_name']); 
     77             break; 
     78 
     79             case 'server_name': 
     80                     $new['server_name'] = str_replace('http://', '', $new['server_name']); 
     81             break; 
     82 
     83             case 'avatar_path': 
     84                     $new['avatar_path'] = trim($new['avatar_path']); 
     85                     if (strstr($new['avatar_path'], "\0") || !is_dir($tracker_root_path . $new['avatar_path']) || !is_writable($tracker_root_path . $new['avatar_path'])) { 
     86                             $new['avatar_path'] = $default_config['avatar_path']; 
     87                     } 
     88             break; 
     89 
     90             case 'autowarn_settings': 
     91             case 'allow_autowarn': 
     92                        if ( isset($_POST['submit']) ) { 
     93                                $autowarn_days = request_var('autowarn_days', array(''=>'')); 
     94                                $autowarn_gigs = request_var('autowarn_gigs', array(''=>'')); 
     95                                $autowarn_ratio = request_var('autowarn_ratio', array(''=>'')); 
     96                                if ( sizeof($autowarn_days) ) { 
     97                                        $new_autowarn_settings = array(); 
     98 
     99                                        for ( $i = 0; $i < sizeof($autowarn_days); ++$i ) { 
     100                                                if ( $autowarn_gigs[$i] && $autowarn_ratio[$i] ) { 
     101                                                        $new_autowarn_settings[] = intval($autowarn_days[$i]) . '-' . intval($autowarn_gigs[$i]) . '-' . parse_float($autowarn_ratio[$i]); 
     102                                                } 
     103 
     104                                        } 
    72105                                } 
    73                         } 
    74                         else { 
    75                                 $result = ( isset($_REQUEST['config'][$key]) ? trim(htmlspecialchars($_REQUEST['config'][$key])) : '' ); 
    76                                 $cfg_array[$key] = (STRIP) ? stripslashes($result) : $result; 
    77                         } 
    78                 } 
    79         } 
    80         else { 
    81                 $cfg_array[$key] = request_var('config', array( ''=>'') ); 
    82         } 
    83 
    84 else { 
    85         $cfg_array = $config; 
    86 
    87 //$cfg_array = (isset($_REQUEST['config'])) ? request_var('config', array( '' => array(''=>'')) ) : $config; 
    88  
    89 switch ($mode) 
    90 
    91         case 'settings': 
    92                 $display_vars = array( 
    93                         'title' => 'general_settings', 
    94                         'vars'  => array( 
    95                         'legend1'                               => 'general_settings', 
    96                         'sitename'                              => array('lang' => 'site_name',                         'validate' => 'string', 'type' => 'text:40:255', 'explain' => false), 
    97                         'site_desc'                             => array('lang' => 'site_desc',                         'validate' => 'string', 'type' => 'text:40:255', 'explain' => false), 
    98                         'site_keywords'                 => array('lang' => 'site_keywords',                             'validate' => 'string', 'type' => 'text:40:255', 'explain' => false), 
    99                         'default_language_charset'      => array('lang' => 'site_charset',                              'validate' => 'string', 'type' => 'text:40:255', 'explain' => false), 
    100  
    101                         'siteonline'                    => array('lang' => 'siteonline',                        'validate' => 'bool',   'type' => 'radio:yes_no', 'explain' => true), 
    102  
    103                         'default_lang'                  => array('lang' => 'default_language',          'validate' => 'lang',   'type' => 'select', 'function' => 'language_select', 'params' => array('{CONFIG_VALUE}', 'config[default_lang]'), 'explain' => false), 
    104                         'default_dateformat'    => array('lang' => 'date_format',       'validate' => 'string', 'type' => 'text:40:255', 'explain' => true), 
    105                         'board_timezone'                => array('lang' => 'system_timezone',           'validate' => 'string', 'type' => 'select', 'function' => 'tz_select', 'params' => array('{CONFIG_VALUE}', 'config[board_timezone]'), 'explain' => false), 
    106                         'board_dst'                             => array('lang' => 'dst',                       'validate' => 'bool',   'type' => 'radio:yes_no', 'explain' => false), 
    107                         'default_style'         => array('lang' => 'default_style',                     'validate' => 'style',  'type' => 'select', 'function' => 'style_select', 'params' => array('{CONFIG_VALUE}', 'config[default_style]'), 'explain' => false), 
    108                         'override_user_style'   => array('lang' => 'override_style',            'validate' => 'bool',   'type' => 'radio:yes_no', 'explain' => true), 
    109  
    110                         'max_torrent_size'      => array('lang' => 'max_torrent_size',                          'validate' => 'int',    'type' => 'text:20:255', 'explain' => true), 
    111                         'announce_interval'     => array('lang' => 'announce_interval',                         'validate' => 'int',    'type' => 'text:20:255', 'explain' => true), 
    112                         'min_announce_interval' => array('lang' => 'min_announce_interval',             'validate' => 'int',    'type' => 'text:20:255', 'explain' => true), 
    113                         'signup_timeout'        => array('lang' => 'signup_timeout',                            'validate' => 'int',    'type' => 'text:20:255', 'explain' => true), 
    114  
    115                         'minvotes'      => array('lang' => 'minvotes',                          'validate' => 'int',    'type' => 'text:20:255', 'explain' => true), 
    116                         'ttl'   => array('lang' => 'ttl',                               'validate' => 'int',    'type' => 'text:20:255', 'explain' => true), 
    117                         'alternate_ttl' => array('lang' => 'alternate_ttl',                             'validate' => 'int',    'type' => 'text:20:255', 'explain' => true), 
    118                         'maxusers'      => array('lang' => 'maxusers',                          'validate' => 'int',    'type' => 'text:20:255', 'explain' => true), 
    119                         'torrent_dir'   => array('lang' => 'torrent_dir',                               'validate' => 'script_path',    'type' => 'text:50:255', 'explain' => true), 
    120                         'allow_clons'   => array('lang' => 'allow_clons',                               'validate' => 'bool',   'type' => 'radio:yes_no', 'explain' => true), 
    121  
    122                         'demote_uploader_days'  => array('lang' => 'demote_uploaders',          'validate' => 'int',    'type' => 'text:20:255', 'explain' => true), 
    123                         'uploadapp_promote_text'        => array('lang' => 'uploadapp_promote_text',            'validate' => 'text',   'type' => 'textarea:7:50', 'explain' => true), 
    124                         'enable_confirm'        => array('lang' => 'visual_confirm',                            'validate' => 'bool',   'type' => 'radio:yes_no', 'explain' => true), 
    125                         'allow_autologin'       => array('lang' => 'allow_autologin',                           'validate' => 'bool',   'type' => 'radio:yes_no', 'explain' => true), 
    126                         'max_autologin_time'    => array('lang' => 'autologin_time',            'validate' => 'int',    'type' => 'text:20:255', 'explain' => true), 
    127                         'max_login_attempts'    => array('lang' => 'max_login_attempts',                'validate' => 'int',    'type' => 'text:20:255', 'explain' => true), 
    128                         'login_reset_time'      => array('lang' => 'login_reset_time',          'validate' => 'int',    'type' => 'text:20:255', 'explain' => true), 
    129  
    130                         'board_email_form'      => array('lang' => 'board_email_form',          'validate' => 'bool',   'type' => 'radio:yes:no', 'explain' => true), 
    131                         'flood_interval'        => array('lang' => 'flood_interval',            'validate' => 'int',    'type' => 'text:20:255', 'explain' => true), 
    132                         'search_flood_interval' => array('lang' => 'search_flood_interval',             'validate' => 'int',    'type' => 'text:20:255', 'explain' => true), 
    133  
    134                         'topics_per_page'       => array('lang' => 'topics_per_page',           'validate' => 'int',    'type' => 'text:20:255', 'explain' => false), 
    135                         'posts_per_page'        => array('lang' => 'posts_per_page',            'validate' => 'int',    'type' => 'text:20:255', 'explain' => false), 
    136                         'hot_threshold' => array('lang' => 'hot_threshold',             'validate' => 'int',    'type' => 'text:20:255', 'explain' => false), 
    137  
    138                         'online_time'   => array('lang' => 'online_time',               'validate' => 'int',    'type' => 'text:20:255', 'explain' => true), 
    139  
    140                         'gzip_compress' => array('lang' => 'gzip_compress',             'validate' => 'bool',   'type' => 'radio:yes:no', 'explain' => false), 
    141                         'prune_enable'  => array('lang' => 'enable_prune',              'validate' => 'bool',   'type' => 'radio:yes:no', 'explain' => false), 
    142  
    143                         'time_to_merge' => array('lang' => 'merge_time_limit',          'validate' => 'int',    'type' => 'text:20:255', 'explain' => true), 
    144                         'merge_flood_interval'  => array('lang' => 'merge_flood_interval',              'validate' => 'int',    'type' => 'text:20:255', 'explain' => true), 
    145  
    146                         'min_class_allow_upload'        => array('lang' => 'min_class_allow_upload',    'validate' => 'class',  'type' => 'select', 'function' => 'user_class_select', 'params' => array('{CONFIG_VALUE}', 'config[min_class_allow_upload]'), 'explain' => true), 
    147                         'default_type_moderated_torrents'       => array('lang' => 'default_type_moderated_torrents',   'validate' => 'int',    'type' => 'select', 'function' => 'default_type_moderated_torrents_select', 'params' => array('{CONFIG_VALUE}', 'config[default_type_moderated_torrents]'), 'explain' => true), 
    148  
    149                         'waittime'      => array('lang' => 'allow_waittime',            'validate' => 'bool',   'type' => 'radio:yes:no', 'explain' => false), 
    150  
    151  
    152 //email settings 
    153                         'legend2'                               => 'email_settings', 
    154                         'email_enable'                  => array('lang' => 'email_enable',                              'validate' => 'bool',   'type' => 'radio:yes_no', 'explain' => false), 
    155                         'email_function_name'   => array('lang' => 'email_function_name',               'validate' => 'string', 'type' => 'text:40:255', 'explain' => true), 
    156                         'sitemail'                      => array('lang' => 'admin_email',                               'validate' => 'string', 'type' => 'text:40:255', 'explain' => false), 
    157                         'email_package_size'    => array('lang' => 'email_package_size',                'validate' => 'string', 'type' => 'text:10:255', 'explain' => true), 
    158                         'smtp_delivery'         => array('lang' => 'use_smtp',                          'validate' => 'bool',   'type' => 'radio:yes_no', 'explain' => true), 
    159  
    160                         'smtp_host'                     => array('lang' => 'smtp_server',                               'validate' => 'string', 'type' => 'text:40:255', 'explain' => false), 
    161                         'smtp_port'                     => array('lang' => 'smtp_port',                         'validate' => 'string', 'type' => 'text:40:255', 'explain' => false), 
    162                         'smtp_username'         => array('lang' => 'smtp_username',                     'validate' => 'string', 'type' => 'text:40:255', 'explain' => true), 
    163                         'smtp_password'         => array('lang' => 'smtp_password',                     'validate' => 'string', 'type' => 'password:40:255', 'explain' => true), 
    164  
    165                         'board_email_sig'               => array('lang' => 'email_sig',         'validate' => 'string', 'type' => 'textarea:5:40', 'explain' => true), 
    166  
    167                         'legend3'                               => 'server_url_settings', 
    168                         'force_server_vars'             => array('lang' => 'force_server_vars',                 'validate' => 'bool',   'type' => 'radio:yes_no', 'explain' => true), 
    169                         'server_protocol'                       => array('lang' => 'server_protocol',           'validate' => 'string', 'type' => 'text:40:255', 'explain' => true), 
    170                         'server_name'                   => array('lang' => 'server_name',               'validate' => 'string', 'type' => 'text:40:255', 'explain' => true), 
    171                         'server_port'                   => array('lang' => 'server_port',               'validate' => 'int',    'type' => 'text:5:5', 'explain' => true), 
    172                         'script_path'                   => array('lang' => 'path_to_tracker',           'validate' => 'rpath',  'type' => 'text:40:255', 'explain' => true), 
    173  
    174                         'legend4'                               => 'avatar_settings', 
    175                         'allow_avatar_remote'   => array('lang' => 'allow_remote',              'validate' => 'bool',   'type' => 'radio:yes_no', 'explain' => true), 
    176                         'allow_avatar_upload'   => array('lang' => 'allow_upload',              'validate' => 'bool',   'type' => 'radio:yes_no', 'explain' => false), 
    177                         'avatar_filesize'               => array('lang' => 'max_filesize',              'validate' => 'int:0',  'type' => 'text:40:255', 'explain' => false, 'append' => ' ' . $lang['bytes']), 
    178                         'avatar_max'            => array('lang' => 'max_avatar_size',   'validate' => 'int:0',  'type' => 'dimension:3:4', 'explain' => true), 
    179                         'avatar_max'            => array('lang' => 'max_avatar_size',   'validate' => 'int:0',  'type' => 'dimension:3:4', 'explain' => true), 
    180                         'avatar_path'           => array('lang' => 'avatar_storage_path',       'validate' => 'rpath',  'type' => 'text:40:255', 'explain' => false), 
    181  
    182                         'legend5'                       => 'cookie_settings', 
    183                         'cookie_domain' => array('lang' => 'cookie_domain',     'validate' => 'string', 'type' => 'text:40:255', 'explain' => false), 
    184                         'cookie_name'           => array('lang' => 'cookie_name',       'validate' => 'string', 'type' => 'text:40:255', 'explain' => false), 
    185                         'cookie_path'           => array('lang' => 'cookie_path',       'validate' => 'string', 'type' => 'text:40:255', 'explain' => false), 
    186                         'cookie_secure' => array('lang' => 'cookie_secure',             'validate' => 'bool',   'type' => 'radio:enabled_disabled', 'explain' => true), 
    187                         'session_length'        => array('lang' => 'session_length',    'validate' => 'string', 'type' => 'text:40:255', 'explain' => false), 
    188  
    189                         'legend6'                       => 'disable_privmsg', 
    190                         'privmsg_disable'       => array('lang' => 'disable_privmsg',           'validate' => 'bool',   'type' => 'radio:enabled_disabled', 'explain' => false), 
    191                         'max_inbox_privmsgs'    => array('lang' => 'inbox_limits',      'validate' => 'int',    'type' => 'text:40:255', 'explain' => false), 
    192                         'max_sentbox_privmsgs'  => array('lang' => 'sentbox_limits',    'validate' => 'int',    'type' => 'text:40:255', 'explain' => false), 
    193  
    194                         'legend7'                       => 'abilities_settings', 
    195                         'max_poll_options'      => array('lang' => 'max_poll_options',  'validate' => 'int',    'type' => 'text:40:255', 'explain' => false), 
    196                         'allow_html'    => array('lang' => 'allow_html',                'validate' => 'bool',   'type' => 'radio:yes_no', 'explain' => false), 
    197                         'allow_html_tags'       => array('lang' => 'allowed_tags',      'validate' => 'string', 'type' => 'text:40:255', 'explain' => true), 
    198                         'allow_bbcode'  => array('lang' => 'allow_bbcode',              'validate' => 'bool',   'type' => 'radio:yes_no', 'explain' => false), 
    199                         'allow_smilies' => array('lang' => 'allow_smilies',             'validate' => 'bool',   'type' => 'radio:yes_no', 'explain' => false), 
    200                         'smilies_path'  => array('lang' => 'smilies_path',      'validate' => 'rpath',  'type' => 'text:40:255', 'explain' => true), 
    201                         'allow_sig'     => array('lang' => 'allow_sig',         'validate' => 'bool',   'type' => 'radio:yes_no', 'explain' => false), 
    202                         'max_sig_chars' => array('lang' => 'max_sig_length',    'validate' => 'int',    'type' => 'text:40:255', 'explain' => true), 
    203  
    204                         'legend8'                       => 'promotion_demotion_settings', 
    205                         'promote_to_power_megs_limit'   => array('lang' => 'promote_to_power_megs_limit',       'validate' => 'int',    'type' => 'text:40:255', 'explain' => true), 
    206                         'promote_to_power_min_ratio'    => array('lang' => 'promote_to_power_min_ratio',        'validate' => 'float',  'type' => 'text:40:255', 'explain' => true), 
    207                         'promote_to_power_reg_date_ago' => array('lang' => 'promote_to_power_reg_date_ago',     'validate' => 'int',    'type' => 'text:40:255', 'explain' => true), 
    208                         'promote_to_power_demote_ratio' => array('lang' => 'promote_to_power_demote_ratio',     'validate' => 'float',  'type' => 'text:40:255', 'explain' => true), 
    209  
    210                         'legend9'                       => 'delete_inactive_users_settings', 
    211                         'inactive_users_del_days'       => array('lang' => 'inactive_users_del_days',   'validate' => 'int',    'type' => 'text:40:255', 'explain' => true), 
    212                         'inactive_users_parked_del_days'        => array('lang' => 'inactive_users_parked_del_days',    'validate' => 'int',    'type' => 'text:40:255', 'explain' => true), 
    213                         'inactive_users_del_min_class'  => array('lang' => 'inactive_users_del_min_class',      'validate' => 'class',  'type' => 'select', 'function' => 'user_class_select', 'params' => array('{CONFIG_VALUE}', 'inactive_users_del_min_class'), 'explain' => true), 
    214  
    215  
    216                 )); 
    217  
    218         break; 
    219  
    220         case 'autoclean_settings': 
    221                 $display_vars = array( 
    222                         'title' => 'autoclean_settings', 
    223                         'vars'  => array( 
    224                                 'legend1'                       => 'autoclean_settings:autoclean_settings_explain', 
    225                         ) 
    226                 ); 
    227  
    228                 $autoclean_ary = array(); 
    229  
    230                 @require_once ($tracker_root_path . 'include/class.cleanup_types.php'); 
    231                 $cleanup_types = new cleanup_types(); 
    232                 $class_methods = get_class_methods(get_class($cleanup_types)); 
    233                 foreach ( $class_methods AS $class_name ) { 
    234                         if ( $class_name == '_receive_invites' ) { 
    235                                 continue; 
    236                         } 
    237                         $autoclean_ary = array_merge($autoclean_ary, array( 
    238                                 'autoclean_interval' . $class_name      => array('lang' => 'autoclean_interval' . $class_name,  'validate' => 'int',    'type' => 'text:40:255', 'explain' => true), 
    239                         )); 
    240                 } 
    241  
    242                 $display_vars['vars'] = array_merge($display_vars['vars'], $autoclean_ary); 
    243         break; 
    244  
    245         case 'user_torrent_seed_download_limits_settings': 
    246  
    247                 $display_vars = array( 
    248                         'title' => 'user_torrent_seed_download_limits_settings', 
    249                         'vars'  => array( 
    250                                 'legend1'                       => 'user_torrent_seed_download_limits_settings:user_torrent_seed_limits_settings_explain', 
    251                                 'max_torrent_allow_seed'        => array('lang' => 'max_seed_torrents_limit',   'validate' => 'int',    'type' => 'text:10:10', 'explain' => false), 
    252  
    253                                 'legend2'                       => 'user_torrent_seed_download_limits_settings:user_torrent_download_limits_settings_explain', 
    254  
    255                         ) 
    256  
    257                 ); 
    258  
    259                 $user_limit_ary_torrents = array(); 
    260  
    261                 $user_limit_ary_torrents = array_merge($user_limit_ary_torrents, array( 
    262                         'user_limit_ary_torrents[W]' => array('lang' => 'warned',       'validate' => false,    'type' => 'text_ary:2:5', 'explain' => false, 'db_store' => 'array'), 
    263                 )); 
    264                 $user_limit_ary_torrents = array_merge($user_limit_ary_torrents, array( 
    265                         'user_limit_ary_torrents[D]' => array('lang' => 'donor',        'validate' => false,    'type' => 'text_ary:2:5', 'explain' => false, 'db_store' => 'array'), 
    266                 )); 
    267  
    268                 $i = 0; 
    269                 while ( get_user_class_name($i) !== '' ) { 
    270  
    271                         $user_limit_ary_torrents = array_merge($user_limit_ary_torrents, array( 
    272                                 'user_limit_ary_torrents[' . $i . ']' => array('lang' => get_user_class_name($i),       'validate' => false,    'type' => 'text_ary:2:5', 'explain' => false, 'db_store' => 'array'), 
    273                         )); 
    274                         ++$i; 
    275                 } 
    276  
    277                 $display_vars['vars'] = array_merge($display_vars['vars'], $user_limit_ary_torrents); 
    278  
    279                 $user_limit_ary_torrents = array('legend3'                      => 'user_torrent_download_allow_settings:user_torrent_download_allow_settings_explain' ); 
    280  
    281                 $user_limit_ary_torrents = array_merge($user_limit_ary_torrents, array( 
    282                         'user_limit_ary_allow_download[W]' => array('lang' => 'warned', 'validate' => false,    'type' => 'radio_ary:yes_no', 'explain' => false, 'db_store' => 'array'), 
    283                 )); 
    284                 $user_limit_ary_torrents = array_merge($user_limit_ary_torrents, array( 
    285                         'user_limit_ary_allow_download[D]' => array('lang' => 'donor',  'validate' => false,    'type' => 'radio_ary:yes_no', 'explain' => false, 'db_store' => 'array'), 
    286                 )); 
    287  
    288                 $i = 0; 
    289                 while ( get_user_class_name($i) !== '' ) { 
    290  
    291                         $user_limit_ary_torrents = array_merge($user_limit_ary_torrents, array( 
    292                                 'user_limit_ary_allow_download[' . $i . ']' => array('lang' => get_user_class_name($i), 'validate' => false,    'type' => 'radio_ary:yes_no', 'explain' => false, 'db_store' => 'array'), 
    293                         )); 
    294                         ++$i; 
    295                 } 
    296  
    297                 $display_vars['vars'] = array_merge($display_vars['vars'], $user_limit_ary_torrents); 
    298         break; 
    299  
    300         case 'bonus_settings': 
    301                 $display_vars = array( 
    302                         'title' => 'bonus_settings', 
    303                         'vars'  => array( 
    304                                 'legend1'                       => 'bonus_settings:bonus_settings_explain', 
    305                                 'allow_my_bonus'        => array('lang' => 'allow_my_bonus',    'validate' => 'bool',   'type' => 'radio:yes_no', 'explain' => true), 
    306                                 'my_bonus_points'       => array('lang' => 'my_bonus_points',   'validate' => 'float',  'type' => 'text:5:20', 'explain' => true), 
    307                                 'my_bonus_title_length' => array('lang' => 'my_bonus_title_length',     'validate' => 'text',   'type' => 'text:5:20', 'explain' => true), 
    308                                 'my_bonus_settings'     => array('lang' => 'my_bonus_table',    'validate' => false, 'type' => 'custom', 'function' => 'my_bonus_table', 'params' => array(), 'explain' => true, 'append' => '<a href="javascript:void(0);" onclick="javascript:insert_my_bonus_input(\'insert\');" title="' . $lang['add_inputs'] . '"><img src="../pic/plus.gif" alt="' . $lang['add_inputs'] . '" /></a>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="javascript:insert_my_bonus_input(\'delete\');" title="' . $lang['delete_inputs'] . '" id="my_bonus_href_delete"><img src="../pic/minus.gif" alt="' . $lang['delete_inputs'] . '" /></a><br /><div id="my_bonus_table_inputs"></div><input type="hidden" name="config[my_bonus_settings]" value="" />', 'db_store' => 'array'), 
    309  
    310                         ) 
    311  
    312                 ); 
    313         break; 
    314  
    315         case 'autowarn_settings': 
    316                 $display_vars = array( 
    317                         'title' => 'autowarn_settings', 
    318                         'vars'  => array( 
    319                                 'legend1'                       => 'autowarn_settings:autowarn_settings_explain', 
    320                                 'allow_autowarn'        => array('lang' => 'enable_autowarn_system',    'validate' => 'bool',   'type' => 'radio:yes_no', 'explain' => true), 
    321                                 'autowarn_min_added'    => array('lang' => 'autowarn_min_added',        'validate' => 'int',    'type' => 'text:5:20', 'explain' => true), 
    322                                 'autowarn_settings'     => array('lang' => 'autowarn_table',    'validate' => false, 'type' => 'custom', 'function' => 'autowarn_table', 'params' => array(), 'explain' => true, 'append' => '<a href="javascript:void(0);" onclick="javascript:insert_auto_warn_input(\'insert\');" title="' . $lang['add_inputs'] . '"><img src="../pic/plus.gif" alt="' . $lang['add_inputs'] . '" /></a>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="javascript:insert_auto_warn_input(\'delete\');" title="' . $lang['delete_inputs'] . '" id="autowarn_href_delete"><img src="../pic/minus.gif" alt="' . $lang['delete_inputs'] . '" /></a><br /><div id="autowarn_table_inputs"></div><input type="hidden" name="config[autowarn_settings]" value="" />', 'db_store' => 'array'), 
    323  
    324  
    325                         ) 
    326  
    327                 ); 
    328         break; 
    329  
    330         case 'invite_settings': 
    331                 $users_class_string = ''; 
    332                 $i = 0; 
    333                 while ( get_user_class_name($i) !== '' ) { 
    334                         $users_class_string .= ( $users_class_string ? ', ' : '' ) . get_user_class_name($i); 
    335                         ++$i; 
    336           } 
    337                 $display_vars = array( 
    338                         'title' => 'invite_settings', 
    339                         'vars'  => array( 
    340                                 'legend1'                       => 'invite_settings:invite_settings', 
    341                                 'allow_invite'  => array('lang' => 'enable_invite_system',      'validate' => 'bool',   'type' => 'radio:yes_no', 'explain' => true), 
    342                                 'number_invites'        => array('lang' => 'number_invites',    'validate' => 'text',   'type' => 'text:50:255', 'explain' => true, 'explain_sprintf' => array($users_class_string, get_user_class_name(0), get_user_class_name(1), get_user_class_name(2)) ), 
    343                                 'autoclean_interval_receive_invites'    => array('lang' => 'days_to_receive_invites',   'validate' => 'int',    'type' => 'text:5:20', 'explain' => true), 
    344  
    345  
    346                         ) 
    347  
    348                 ); 
    349         break; 
    350 
    351  
    352  
    353 $error = array(); 
    354 validate_config_vars($display_vars['vars'], $cfg_array, $error); 
    355 // Do not write values if there is an error 
    356 if (sizeof($error)) 
    357 
    358         $submit = false; 
    359 
    360 $prev_config_name = ''; 
    361 // We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to... 
    362 foreach ($display_vars['vars'] as $config_name => $null) 
    363 
    364         //it's an array config value 
    365         $config_name_replaced = $config_name; 
    366         if ( strpos($config_name, '[') !== false ) { 
    367                 $config_name_replaced = preg_replace('/\[(.*?)\]/', '', $config_name); 
    368  
    369                 preg_match('/\[(.*?)\]/', $config_name, $matches); 
    370  
    371                 if ( $config_name_replaced == $prev_config_name ) { 
    372                         $new_config[$config_name_replaced][$matches[1]] = ( isset($cfg_array[$config_name_replaced][$matches[1]]) ? $cfg_array[$config_name_replaced][$matches[1]] : '' ); 
    373                 } 
    374         } 
    375  
    376         if ( $config_name_replaced == $prev_config_name ) { 
    377                 continue; 
    378         } 
    379  
    380         $prev_config_name = $config_name_replaced; 
    381  
    382         if (!isset($cfg_array[$config_name_replaced]) || strpos($config_name_replaced, 'legend') !== false) 
    383         { 
    384                 continue; 
    385         } 
    386  
    387         $new_config[$config_name_replaced] = $config_value = $cfg_array[$config_name_replaced]; 
    388  
    389         switch ( $config_name_replaced ) { 
    390                 case 'email_function_name': 
    391                         $new_config['email_function_name'] = trim(str_replace(array('(', ')'), array('', ''), $new_config['email_function_name'])); 
    392                         $new_config['email_function_name'] = (empty($new_config['email_function_name']) || !function_exists($new_config['email_function_name'])) ? 'mail' : $new_config['email_function_name']; 
    393                         $config_value = $new_config['email_function_name']; 
    394                 break; 
    395  
    396                 case 'autoclean_interval_receive_invites': 
    397                         if( $submit ) { 
    398                                 $new_config['autoclean_interval_receive_invites'] = $new_config['autoclean_interval_receive_invites'] * 24 * 60; 
    399                                 $config_value = $new_config['autoclean_interval_receive_invites']; 
    400                         } 
    401                         else { 
    402                                 $config['autoclean_interval_receive_invites'] = $new_config['autoclean_interval_receive_invites'] / 24 / 60; 
    403                         } 
    404                 break; 
    405  
    406              case 'user_limit_ary_allow_download': 
    407                         if( $submit ) { 
    408                                 foreach ( $new_config['user_limit_ary_allow_download'] AS $user_class => $can_leech ) { 
    409                                         $can_leech = ( $can_leech ? 1 : 0 ); 
    410                                         if ( $user_class == 'W' ) { 
    411                                                 $sql = 'UPDATE ' . USERS_TABLE . ' SET can_leech = ' . $can_leech . ' WHERE warneduntil <> 0'; 
    412                                                 $db->sql_query($sql); 
    413                                         } 
    414                                         elseif ( $user_class == 'D' ) { 
    415                                                 $sql = 'UPDATE ' . USERS_TABLE . ' SET can_leech = ' . $can_leech . ' WHERE donor = 1'; 
    416                                                 $db->sql_query($sql); 
    417                                         } 
    418                                         else { 
    419                                                 $user_class = (int) $user_class; 
    420                                                 $sql = 'UPDATE ' . USERS_TABLE . ' SET can_leech = ' . $can_leech . ' WHERE class = ' . $user_class; 
    421                                                 $db->sql_query($sql); 
    422                                         } 
    423                                         $new_config['user_limit_ary_allow_download'][$user_class] = $can_leech; 
     106 
     107                                if ( !(sizeof($new_autowarn_settings)) ) { 
     108                                        $new['allow_autowarn'] = 0; 
     109                                        $new['autowarn_settings'] = ''; 
    424110                                } 
    425                              $new_config['user_limit_ary_allow_download'] = serialize($new_config['user_limit_ary_allow_download']); 
    426  
    427                              $config_value = $new_config['user_limit_ary_allow_download']; 
    428                         } 
    429              break; 
    430  
    431              case 'user_limit_ary_torrents': 
    432                         if( $submit ) { 
    433                                 foreach ( $new_config['user_limit_ary_torrents'] AS $user_class => $limit ) { 
    434                                         $limit = (int) $limit; 
    435                                         if ( $user_class == 'W' ) { 
    436                                                 $sql = 'UPDATE ' . USERS_TABLE . ' SET torrents_limit = ' . $limit . ' WHERE warneduntil <> 0'; 
    437                                                 $db->sql_query($sql); 
    438                                         } 
    439                                         elseif ( $user_class == 'D' ) { 
    440                                                 $sql = 'UPDATE ' . USERS_TABLE . ' SET torrents_limit = ' . $limit . ' WHERE donor = 1'; 
    441                                                 $db->sql_query($sql); 
    442                                         } 
    443                                         else { 
    444                                                 $user_class = (int) $user_class; 
    445                                                 $sql = 'UPDATE ' . USERS_TABLE . ' SET torrents_limit = ' . $limit . ' WHERE class = ' . $user_class; 
    446                                                 $db->sql_query($sql); 
    447                                         } 
    448                                         $new_config['user_limit_ary_torrents'][$user_class] = $limit; 
     111                                else { 
     112                                        $new['autowarn_settings'] = implode(',', $new_autowarn_settings); 
    449113                                } 
    450                              $new_config['user_limit_ary_torrents'] = serialize($new_config['user_limit_ary_torrents']); 
    451  
    452                              $config_value = $new_config['user_limit_ary_torrents']; 
    453                         } 
    454              break; 
    455  
    456                 case 'my_bonus_settings': 
    457                         if( $submit ) { 
     114                        } 
     115             break; 
     116 
     117             case 'my_bonus_settings': 
     118             case 'allow_my_bonus': 
     119                        if ( isset($_POST['submit']) ) { 
    458120                                $new_my_bonus_settings = array(); 
    459121 
    460122                                $my_bonus_table_points = request_var('my_bonus_table_points', array(''=>'')); 
    461123                                $my_bonus_gigs = request_var('my_bonus_gigs', array(''=>'')); 
    462  
    463                                 if ( $count = sizeof($my_bonus_table_points) ) { 
    464                                         for ( $i = 0; $i < $count; ++$i ) { 
     124                                $autowarn_ratio = request_var('autowarn_ratio', array(''=>'')); 
     125 
     126                                if ( sizeof($my_bonus_table_points) ) { 
     127                                        for ( $i = 0; $i < sizeof($my_bonus_table_points); ++$i ) { 
    465128                                                if ( !$my_bonus_gigs[$i] && !$my_bonus_table_points[$i] ) { 
    466129                                                        unset($my_bonus_gigs[$i]); 
     
    468131                                                } 
    469132                                                elseif ( !$my_bonus_gigs[$i] && $my_bonus_table_points[$i] ) { 
    470                                                         $new_my_bonus_settings[intval($my_bonus_table_points[$i])] = (float) $my_bonus_gigs[$i]
     133                                                        $new_my_bonus_settings[intval($my_bonus_table_points[$i])] = parse_float($my_bonus_gigs[$i])
    471134                                                        break; 
    472135                                                } 
    473136                                                else { 
    474                                                         $new_my_bonus_settings[intval($my_bonus_table_points[$i])] = (float) $my_bonus_gigs[$i]
     137                                                        $new_my_bonus_settings[intval($my_bonus_table_points[$i])] = parse_float($my_bonus_gigs[$i])
    475138                                                } 
    476139                                        } 
    477140                                        ksort($new_my_bonus_settings); 
    478                                         $config_value = serialize($new_my_bonus_settings); 
     141                                        $new['my_bonus_settings'] = serialize($new_my_bonus_settings); 
    479142                                } 
    480143                                if ( !sizeof($new_my_bonus_settings) ) { 
    481                                         $config_value = ''; 
     144                                        $new['my_bonus_settings'] = ''; 
     145                                        $new['allow_my_bonus'] = 0; 
    482146                                } 
    483                         } 
    484              break; 
    485  
    486              case 'autowarn_settings': 
    487                         if( $submit ) { 
    488                                 $autowarn_days = request_var('autowarn_days', array(''=>'')); 
    489                                 $autowarn_gigs = request_var('autowarn_gigs', array(''=>'')); 
    490                                 $autowarn_ratio = request_var('autowarn_ratio', array(''=>'')); 
    491                                 if ( $count = sizeof($autowarn_days) ) { 
    492                                         $new_autowarn_settings = array(); 
    493  
    494                                         for ( $i = 0; $i < $count; ++$i ) { 
    495                                                 if ( $autowarn_gigs[$i] && $autowarn_ratio[$i] ) { 
    496                                                         $new_autowarn_settings[] = (int) $autowarn_days[$i] . '-' . (int) $autowarn_gigs[$i] . '-' . (float) $autowarn_ratio[$i]; 
    497                                                 } 
    498  
    499                                         } 
    500                                 } 
    501  
    502                                 if ( !(sizeof($new_autowarn_settings)) ) { 
    503                                         $config_value = ''; 
    504                                 } 
    505                                 else { 
    506                                         $config_value = implode(';', $new_autowarn_settings); 
    507                                 } 
    508                         } 
    509              break; 
    510  
    511              default: 
    512                      $config_value = $new_config[$config_name_replaced]; 
    513              break; 
     147 
     148                        } 
     149             break; 
     150 
     151             case 'my_bonus_points': 
     152                        $new['my_bonus_points'] = parse_float($new['my_bonus_points']); 
     153             break; 
     154 
     155             case 'allow_my_bonus': 
     156                     if ( $new['allow_my_bonus'] == 1 && defined('USE_XBTT') ) { 
     157                             $new['allow_my_bonus'] = 0; 
     158                     } 
     159             break; 
     160 
     161             case 'my_bonus_title_length': 
     162                     $new['my_bonus_title_length'] = intval($new['my_bonus_title_length']); 
     163             break; 
     164 
     165             case 'enable_confirm': 
     166                        if ( $new['enable_confirm'] && !function_exists('gd_info') ) { 
     167                                $message = $lang['gd_library_not_enabled'] . "<br /><br />" . sprintf($lang['click_return_config'], "<a href=\"" . append_sid("admin_board.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); 
     168 
     169                        trigger_error($message); 
     170                        } 
     171             break; 
     172 
     173             case 'max_torrent_size': 
     174                     $post_max_size = ( ini_get('post_max_size') ? return_bytes(ini_get('post_max_size')) : 0 ); 
     175                     $new['max_torrent_size'] = ( $post_max_size ? min($post_max_size, $new['max_torrent_size']) : $new['max_torrent_size'] ); 
     176             break; 
     177 
     178             case 'autoclean_interval_receive_invites': 
     179                        if( isset($_POST['submit']) ) { 
     180                             $new['autoclean_interval_receive_invites'] = $new['autoclean_interval_receive_invites'] * 24 * 60; 
     181                        } 
     182             break; 
     183 
     184             case 'promote_to_power_min_ratio': 
     185                     $new['promote_to_power_min_ratio'] = parse_float($new['promote_to_power_min_ratio']); 
     186             break; 
     187 
     188             case 'promote_to_power_demote_ratio': 
     189                     $new['promote_to_power_demote_ratio'] = parse_float($new['promote_to_power_demote_ratio']); 
     190             break; 
     191 
     192             case 'user_limit_ary_torrents': 
     193                     //$new['user_limit_ary_torrents'] = unserialize($new['user_limit_ary_torrents']); 
     194                        if( isset($_POST['submit']) ) { 
     195                             $new['user_limit_ary_torrents'] = serialize($new['user_limit_ary_torrents']); 
     196                        } 
     197             break; 
     198 
     199             case 'user_limit_ary_allow_download': 
     200                     //$new['user_limit_ary_allow_download'] = unserialize($new['user_limit_ary_allow_download']); 
     201                        if( isset($_POST['submit']) ) { 
     202                             $new['user_limit_ary_allow_download'] = serialize($new['user_limit_ary_allow_download']); 
     203                        } 
     204             break; 
     205     } 
     206 
     207     if( isset($_POST['submit']) ) { 
     208          set_config($config_name, $new[$config_name]); 
     209     } 
     210
     211 
     212if( isset($_POST['submit']) ) { 
     213     $message = $lang['config_updated'] . "<br /><br />" . sprintf($lang['click_return_config'], "<a href=\"" . append_sid("admin_board.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); 
     214 
     215     trigger_error($message); 
     216     return; 
     217
     218 
     219$style_select = style_select($new['default_style'], 'default_style', "templates"); 
     220$lang_select = language_select($new['default_lang'], 'default_lang', "languages"); 
     221$timezone_select = tz_select($new['board_timezone'], 'board_timezone'); 
     222// [start] DST 
     223$dst_yes = ( $new['board_dst'] ) ? "checked=\"checked\"" : ""; 
     224$dst_no = ( !$new['board_dst'] ) ? "checked=\"checked\"" : ""; 
     225// [end] DST 
     226 
     227$disable_board_yes = ( !$new['siteonline'] ) ? "checked=\"checked\"" : ""; 
     228$disable_board_no = ( $new['siteonline'] ) ? "checked=\"checked\"" : ""; 
     229 
     230$cookie_secure_yes = ( $new['cookie_secure'] ) ? "checked=\"checked\"" : ""; 
     231$cookie_secure_no = ( !$new['cookie_secure'] ) ? "checked=\"checked\"" : ""; 
     232 
     233$html_tags = $new['allow_html_tags']; 
     234 
     235$override_user_style_yes = ( $new['override_user_style'] ) ? "checked=\"checked\"" : ""; 
     236$override_user_style_no = ( !$new['override_user_style'] ) ? "checked=\"checked\"" : ""; 
     237 
     238$html_yes = ( $new['allow_html'] ) ? "checked=\"checked\"" : ""; 
     239$html_no = ( !$new['allow_html'] ) ? "checked=\"checked\"" : ""; 
     240 
     241$bbcode_yes = ( $new['allow_bbcode'] ) ? "checked=\"checked\"" : ""; 
     242$bbcode_no = ( !$new['allow_bbcode'] ) ? "checked=\"checked\"" : ""; 
     243 
     244$allow_autologin_yes = ($new['allow_autologin']) ? 'checked="checked"' : ''; 
     245$allow_autologin_no = (!$new['allow_autologin']) ? 'checked="checked"' : ''; 
     246 
     247$board_email_form_yes = ( $new['board_email_form'] ) ? "checked=\"checked\"" : ""; 
     248$board_email_form_no = ( !$new['board_email_form'] ) ? "checked=\"checked\"" : ""; 
     249 
     250$gzip_yes = ( $new['gzip_compress'] ) ? "checked=\"checked\"" : ""; 
     251$gzip_no = ( !$new['gzip_compress'] ) ? "checked=\"checked\"" : ""; 
     252 
     253$allow_invite_yes = ( $new['allow_invite'] ) ? "checked=\"checked\"" : ""; 
     254$allow_invite_no = ( !$new['allow_invite'] ) ? "checked=\"checked\"" : ""; 
     255 
     256$allow_autowarn_system_yes = ( $new['allow_autowarn'] ) ? "checked=\"checked\"" : ""; 
     257$allow_autowarn_system_no = ( !$new['allow_autowarn'] ) ? "checked=\"checked\"" : ""; 
     258 
     259$privmsg_on = ( !$new['privmsg_disable'] ) ? "checked=\"checked\"" : ""; 
     260$privmsg_off = ( $new['privmsg_disable'] ) ? "checked=\"checked\"" : ""; 
     261 
     262$prune_yes = ( $new['prune_enable'] ) ? "checked=\"checked\"" : ""; 
     263$prune_no = ( !$new['prune_enable'] ) ? "checked=\"checked\"" : ""; 
     264 
     265$smile_yes = ( $new['allow_smilies'] ) ? "checked=\"checked\"" : ""; 
     266$smile_no = ( !$new['allow_smilies'] ) ? "checked=\"checked\"" : ""; 
     267 
     268$sig_no_images = ( $new['allow_sig'] == 2 ) ? "checked=\"checked\"" : ""; 
     269$sig_yes = ( $new['allow_sig'] == 1) ? "checked=\"checked\"" : ""; 
     270$sig_no = ( !$new['allow_sig'] ) ? "checked=\"checked\"" : ""; 
     271 
     272$namechange_yes = ( $new['allow_namechange'] ) ? "checked=\"checked\"" : ""; 
     273$namechange_no = ( !$new['allow_namechange'] ) ? "checked=\"checked\"" : ""; 
     274 
     275$avatars_local_yes = ( $new['allow_avatar_local'] ) ? "checked=\"checked\"" : ""; 
     276$avatars_local_no = ( !$new['allow_avatar_local'] ) ? "checked=\"checked\"" : ""; 
     277$avatars_remote_yes = ( $new['allow_avatar_remote'] ) ? "checked=\"checked\"" : ""; 
     278$avatars_remote_no = ( !$new['allow_avatar_remote'] ) ? "checked=\"checked\"" : ""; 
     279$avatars_upload_yes = ( $new['allow_avatar_upload'] ) ? "checked=\"checked\"" : ""; 
     280$avatars_upload_no = ( !$new['allow_avatar_upload'] ) ? "checked=\"checked\"" : ""; 
     281 
     282$smtp_yes = ( $new['smtp_delivery'] ) ? "checked=\"checked\"" : ""; 
     283$smtp_no = ( !$new['smtp_delivery'] ) ? "checked=\"checked\"" : ""; 
     284 
     285$email_enable_yes = ( $new['email_enable'] ) ? "checked=\"checked\"" : ""; 
     286$email_enable_no = ( !$new['email_enable'] ) ? "checked=\"checked\"" : ""; 
     287 
     288$waittime_yes = ( $new['waittime'] ) ? "checked=\"checked\"" : ""; 
     289$waittime_no = ( !$new['waittime'] ) ? "checked=\"checked\"" : ""; 
     290 
     291$allow_clons_yes = ( $new['allow_clons'] ) ? "checked=\"checked\"" : ""; 
     292$allow_clons_no = ( !$new['allow_clons'] ) ? "checked=\"checked\"" : ""; 
     293 
     294$force_server_vars_yes =  ( $new['force_server_vars'] ) ? "checked=\"checked\"" : ""; 
     295$force_server_vars_no =  ( !$new['force_server_vars'] ) ? "checked=\"checked\"" : ""; 
     296 
     297$auto_warn_table_inputs = ''; 
     298$auto_warn_table_arr = array(); 
     299 
     300if ( $new['autowarn_settings'] ) { 
     301        $auto_warn_table_arr = explode(',', $new['autowarn_settings']); 
     302
     303 
     304$auto_warn_inputs_count = 0; 
     305 
     306if ( sizeof($auto_warn_table_arr) ) { 
     307 
     308        for ( $i = 0; $i < sizeof($auto_warn_table_arr); ++$i ) { 
     309 
     310                $auto_warn_table_arr2 = explode('-', $auto_warn_table_arr[$i]); 
     311 
     312                for ( $n = 0; $n < sizeof($auto_warn_table_arr2); ++$n ) { 
     313                        if ( $n % 2 ) { 
     314                                $auto_warn_table_inputs .= '<input type="text" name="autowarn_gigs[]" size="3" maxlength="3" value="' . intval($auto_warn_table_arr2[$n]) . '" /> '; 
     315                        } 
     316                        elseif ( $n % 3 ) { 
     317                                $auto_warn_table_inputs .= '<input type="text" name="autowarn_ratio[]" size="4" maxlength="4" value="' . doubleval($auto_warn_table_arr2[$n]) . '" /><br /></span>'; 
     318                        } 
     319                        else { 
     320                                $auto_warn_table_inputs .= '<span id="autowarn_inputs_' . $i . '"><input type="text" name="autowarn_days[]" size="3" maxlength="3" value="' . intval($auto_warn_table_arr2[$n]) . '" /> '; 
     321                        } 
     322                } 
     323 
    514324        } 
    515  
    516         if ($submit) 
    517         { 
    518                 set_config($config_name_replaced, $config_value); 
     325        $auto_warn_inputs_count = ( $i - 1 ); 
     326
     327else { 
     328        $auto_warn_table_inputs .= '<span id="autowarn_inputs_0"><input type="text" name="autowarn_days[]" size="3" maxlength="3" /> '; 
     329        $auto_warn_table_inputs .= '<input type="text" name="autowarn_gigs[]" size="3" maxlength="3" /> '; 
     330        $auto_warn_table_inputs .= '<input type="text" name="autowarn_ratio[]" size="4" maxlength="4" /><br /></span>'; 
     331
     332 
     333$min_class_allow_upload = '<select name="min_class_allow_upload">'; 
     334$min_class_allow_upload .= '<option value="-1"' . ( $i == '-1' ? ' selected="selected"' : '' )  . '>' . $lang['all'] . '</option>'; 
     335$users_class_string = array(); 
     336for ($i = 0;;++$i) { 
     337        if ( $c = get_user_class_name($i) ) { 
     338                $users_class_string[] = $c; 
     339                $min_class_allow_upload .= '<option value="' . $i . '"' . ( $i == $new['min_class_allow_upload'] ? ' selected="selected"' : '' )  . '>' . $c . '</option>'; 
     340        } 
     341        else { 
     342                break; 
     343        } 
     344
     345$min_class_allow_upload .= '</select>'; 
     346$users_class_string = implode(', ', $users_class_string); 
     347 
     348$allow_my_bonus_yes = ( $new['allow_my_bonus'] ) ? "checked=\"checked\"" : ""; 
     349$allow_my_bonus_no = ( !$new['allow_my_bonus'] ) ? "checked=\"checked\"" : ""; 
     350 
     351$my_bonus_settings = unserialize($new['my_bonus_settings']); 
     352$my_bonus_table_inputs = ''; 
     353$my_bonus_inputs_count = 0; 
     354if ( is_array($my_bonus_settings) && sizeof($my_bonus_settings) ) { 
     355        $i = 0; 
     356        foreach ( $my_bonus_settings AS $points => $gigs ) { 
     357                $my_bonus_table_inputs .= '<span id="my_bonus_inputs_' . $i . '">'; 
     358                $my_bonus_table_inputs .= '<input type="text" name="my_bonus_gigs[]" size="3" maxlength="3" value="' . doubleval($gigs) . '" /> '; 
     359                $my_bonus_table_inputs .= '<input type="text" name="my_bonus_table_points[]" size="3" maxlength="4" value="' . intval($points) . '" /><br /></span>'; 
     360                ++$i; 
    519361        } 
    520 
    521  
    522 $title = ( isset($lang[$display_vars['title']]) ? $lang[$display_vars['title']] : $display_vars['title'] ); 
    523 $title_explain = ( isset($lang[$display_vars['title'] . '_explain']) ? $lang[$display_vars['title'] . '_explain'] : $display_vars['title'] . '_explain' ); 
    524 $s_form_action = 'admin_board.' . $phpEx . ( $mode ? '?mode=' . $mode : '' ); 
    525  
    526 $template->assign_vars(array( 
    527         'L_TITLE'                       => $title, 
    528         'L_TITLE_EXPLAIN'       => $title_explain, 
    529  
    530         'S_ERROR'                       => (sizeof($error)) ? true : false, 
    531         'ERROR_MSG'                     => implode('<br />', $error), 
    532  
    533         'U_ACTION'                      => append_sid($s_form_action),) 
    534 ); 
    535  
    536 if ( $submit ) { 
    537         $ret_url = 'admin_board.' . $phpEx . ( $mode ? '?mode=' . $mode : '' ); 
    538  
    539      $message = $lang['config_updated'] . "<br /><br />" . sprintf($lang['click_return_config'], "<a href=\"" . append_sid($ret_url) . "\">", "</a>") . "<br /><br />" . sprintf($lang['click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); 
    540  
    541      trigger_error($message); 
    542 
    543  
    544 // Output relevant page 
    545 foreach ($display_vars['vars'] as $config_key => $vars) 
    546 
    547  
    548  
    549         if (!is_array($vars) && strpos($config_key, 'legend') === false) 
    550         { 
    551                 continue; 
    552         } 
    553  
    554         if (strpos($config_key, 'legend') !== false) 
    555         { 
    556                 $type = explode(':', $vars); 
    557                 $legend = ( isset($type[0]) ? $type[0] : '' ); 
    558                 $legend_explain = ( isset($type[1]) ? $type[1] : '' ); 
    559  
    560                 $template->assign_block_vars('options', array( 
    561                         'S_LEGEND'              => true, 
    562                         'LEGEND'                => (isset($lang[$legend])) ? $lang[$legend] : $legend, 
    563                         'LEGEND_EXPLAIN'                => (isset($lang[$legend_explain])) ? $lang[$legend_explain] : '' ) 
    564                 ); 
    565  
    566                 continue; 
    567         } 
    568  
    569         $type = explode(':', $vars['type']); 
    570         $db_store = ( isset($vars['db_store']) ? $vars['db_store']: '' ); 
    571  
    572         $l_explain = ''; 
    573         if ($vars['explain'] && isset($vars['lang_explain'])) 
    574         { 
    575                 $l_explain = (isset($lang[$vars['lang_explain']])) ? $lang[$vars['lang_explain']] : $vars['lang_explain']; 
    576         } 
    577         else if ($vars['explain']) 
    578         { 
    579                 $l_explain = (isset($lang[$vars['lang'] . '_explain'])) ? $lang[$vars['lang'] . '_explain'] : ''; 
    580         } 
    581  
    582         if ( isset($vars['explain_sprintf']) ) { 
    583                 $args = array($l_explain); 
    584                 $args = array_merge($args, $vars['explain_sprintf']); 
    585                 $l_explain = call_user_func_array('sprintf', $args); 
    586         } 
    587  
    588         $config_key_replaced = $config_key; 
    589         if ( strpos($config_key, '[') !== false ) { 
    590                 $config_key_replaced = preg_replace('/\[(.*?)\]/', '', $config_key); 
    591         } 
    592  
    593         if ( $db_store == 'array' ) { 
    594              if ( !is_array($config[$config_key_replaced]) ) { 
    595                      $ary_val = @unserialize($config[$config_key_replaced]); 
    596                      if ( is_array($ary_val) ) { 
    597                                 switch ( $config_key_replaced ) { 
    598                                         case 'user_limit_ary_allow_download': 
    599                                      case 'user_limit_ary_torrents': 
    600                                              foreach ( $ary_val AS $_key => $_val ) { 
    601                                                      $config[$config_key_replaced . '[' . $_key . ']'] = $_val; 
    602                                              } 
    603                                      break; 
    604  
    605                                      default: 
    606                                              $config[$config_key_replaced] = $ary_val; 
    607                                      break; 
    608                                 } 
    609                         } 
    610 /*                      else { 
    611                                 switch ( $config_key_replaced ) { 
    612                                         case 'autowarn_settings': 
    613                                                 $ary = explode(';', $config['autowarn_settings']); 
    614                                                 if ( $count = sizeof($ary) ) { 
    615                                                 } 
    616                                         break; 
    617                                 } 
    618                                 echo $config_key_replaced; 
    619                         } 
    620 */ 
    621                 } 
    622         } 
    623  
    624         $content = build_cfg_template($type, $config_key, $config, $config_key, $vars); 
    625  
    626         if (empty($content)) 
    627         { 
    628                 continue; 
    629         } 
    630  
    631         $template->assign_block_vars('options', array( 
    632                 'KEY'                   => $config_key, 
    633                 'TITLE'                 => (isset($lang[$vars['lang']])) ? $lang[$vars['lang']] : $vars['lang'], 
    634                 'S_EXPLAIN'             => $vars['explain'], 
    635                 'TITLE_EXPLAIN' => $l_explain, 
    636                 'CONTENT'               => $content, 
    637         )); 
    638  
    639         unset($display_vars['vars'][$config_key]); 
    640 
    641  
    642 function default_type_moderated_torrents_select ( $selected = 0, $select_name ) { 
    643         global $lang; 
    644  
    645         $ary = array( MODERATED_ALL_TORRENTS => $lang['all_torrents'], MODERATED_ONLY_NON_UPLOADERS_TORRENTS => $lang['only_non_uploaders'], MODERATED_NO_ONE_TORRENTS => $lang['no_one_torrents'] ); 
    646         $default_type_moderated_torrents = '<select name="' . $select_name . '">'; 
    647         foreach ( $ary AS $_key => $_val ) { 
    648                 $default_type_moderated_torrents .= '<option value="' . $_key . '"' . ( $selected == $_key ? ' selected="selected"' : '' )  . '>' . $_val . '</option>'; 
    649         } 
    650         $default_type_moderated_torrents .= '</select>'; 
    651  
    652         return $default_type_moderated_torrents; 
    653 
    654  
    655 function my_bonus_table () { 
    656         global $config, $template; 
    657  
    658         $my_bonus_settings = $config['my_bonus_settings']; 
    659         $my_bonus_table_inputs = ''; 
    660         $my_bonus_inputs_count = 0; 
    661         if ( is_array($my_bonus_settings) && sizeof($my_bonus_settings) ) { 
    662                 $i = 0; 
    663                 foreach ( $my_bonus_settings AS $points => $gigs ) { 
    664                         $my_bonus_table_inputs .= '<span id="my_bonus_inputs_' . $i . '">'; 
    665                         $my_bonus_table_inputs .= '<input type="text" name="my_bonus_gigs[]" size="3" maxlength="3" value="' . doubleval($gigs) . '" /> '; 
    666                         $my_bonus_table_inputs .= '<input type="text" name="my_bonus_table_points[]" size="3" maxlength="4" value="' . intval($points) . '" /><br /></span>'; 
    667                         ++$i; 
    668                 } 
    669                 $my_bonus_inputs_count = ( $i - 1 ); 
    670         } 
    671         else { 
    672                 $my_bonus_table_inputs .= '<span id="my_bonus_inputs_0">'; 
    673                 $my_bonus_table_inputs .= '<input type="text" name="my_bonus_gigs[]" size="3" maxlength="3" /> '; 
    674                 $my_bonus_table_inputs .= '<input type="text" name="my_bonus_table_points[]" size="4" maxlength="3" /><br /></span>'; 
    675         } 
    676  
    677         $template->assign_vars( array( 
    678                 'MY_BONUS_INPUTS_COUNT' => $my_bonus_inputs_count 
    679         )); 
    680  
    681         return $my_bonus_table_inputs; 
    682 
    683  
    684 function autowarn_table () { 
    685         global $config, $template; 
    686  
    687         $auto_warn_table_inputs = ''; 
    688         $auto_warn_table_arr = array(); 
    689  
    690         if ( $config['autowarn_settings'] ) { 
    691                 $auto_warn_table_arr = explode(';', $config['autowarn_settings']); 
    692         } 
    693  
    694         $auto_warn_inputs_count = 0; 
    695  
    696         if ( $count = sizeof($auto_warn_table_arr) ) { 
    697  
    698                 for ( $i = 0; $i < $count; ++$i ) { 
    699                         list($length, $limit, $minratio) = explode('-', $auto_warn_table_arr[$i]); 
    700                         $auto_warn_table_inputs .= '<span id="autowarn_inputs_' . $i . '"><input type="text" name="autowarn_days[]" size="3" maxlength="3" value="' . (int) $length . '" /> '; 
    701                         $auto_warn_table_inputs .= '<input type="text" name="autowarn_gigs[]" size="3" maxlength="3" value="' . (int) $limit . '" /> '; 
    702                         $auto_warn_table_inputs .= '<input type="text" name="autowarn_ratio[]" size="4" maxlength="4" value="' . (float) $minratio . '" /><br /></span>' . "\n"; 
    703                 } 
    704                 $auto_warn_inputs_count = ( $i - 1 ); 
    705  
    706                 $template->assign_vars( array( 
    707                         'AUTOWARN_INPUTS_COUNT' => $auto_warn_inputs_count 
    708                 )); 
    709         } 
    710         else { 
    711                 $auto_warn_table_inputs .= '<span id="autowarn_inputs_0"><input type="text" name="autowarn_days[]" size="3" maxlength="3" /> '; 
    712                 $auto_warn_table_inputs .= '<input type="text" name="autowarn_gigs[]" size="3" maxlength="3" /> '; 
    713                 $auto_warn_table_inputs .= '<input type="text" name="autowarn_ratio[]" size="4" maxlength="4" /><br /></span>'; 
    714         } 
    715  
    716         return $auto_warn_table_inputs; 
    717 
    718  
    719  
    720 //      'S_NUMBER_INVITES_EXPLAIN' => sprintf($lang['number_invites_explain'], $users_class_string, get_user_class_name(0), get_user_class_name(1), get_user_class_name(2) ), 
     362        $my_bonus_inputs_count = ( $i - 1 ); 
     363
     364else { 
     365        $my_bonus_table_inputs .= '<span id="my_bonus_inputs_0">'; 
     366        $my_bonus_table_inputs .= '<input type="text" name="my_bonus_gigs[]" size="3" maxlength="3" /> '; 
     367        $my_bonus_table_inputs .= '<input type="text" name="my_bonus_table_points[]" size="4" maxlength="3" /><br /></span>'; 
     368
     369 
     370$default_type_moderated_torrents = '<select name="default_type_moderated_torrents">'; 
     371$default_type_moderated_torrents .= '<option value="' . MODERATED_ALL_TORRENTS . '"' . ( $new['default_type_moderated_torrents'] == MODERATED_ALL_TORRENTS ? ' selected="selected"' : '' )  . '>' . $lang['all_torrents'] . '</option>'; 
     372$default_type_moderated_torrents .= '<option value="' . MODERATED_ONLY_NON_UPLOADERS_TORRENTS . '"' . ( $new['default_type_moderated_torrents'] == MODERATED_ONLY_NON_UPLOADERS_TORRENTS ? ' selected="selected"' : '' )  . '>' . $lang['only_non_uploaders'] . '</option>'; 
     373$default_type_moderated_torrents .= '<option value="' . MODERATED_NO_ONE_TORRENTS . '"' . ( $new['default_type_moderated_torrents'] == MODERATED_NO_ONE_TORRENTS ? ' selected="selected"' : '' )  . '>' . $lang['no_one_torrents'] . '</option>'; 
     374$default_type_moderated_torrents .= '</select>'; 
    721375 
    722376$template->set_filenames(array( 
     
    724378); 
    725379 
     380// 
     381// Escape any quotes in the site description for proper display in the text 
     382// box on the admin page 
     383// 
     384$new['site_desc'] = str_replace('"', '&quot;', $new['site_desc']); 
     385$new['sitename'] = str_replace('"', '&quot;', strip_tags($new['sitename'])); 
     386 
     387@require_once ($tracker_root_path . 'include/class.cleanup_types.php'); 
     388 
     389$cleanup_types = new cleanup_types(); 
     390$class_methods = get_class_methods(get_class($cleanup_types)); 
     391 
     392foreach ( $class_methods AS $class_name ) { 
     393        if ( $class_name == '_receive_invites' ) { 
     394                continue; 
     395        } 
     396        $template->assign_block_vars('autoclean_settings_row', array( 
     397                'SETTING_NAME' => 'autoclean_interval' . $class_name, 
     398                'SETTING_VALUE' => $new['autoclean_interval' . $class_name], 
     399                'LANG' => ( isset($lang['autoclean_interval' . $class_name]) ? $lang['autoclean_interval' . $class_name] : '{L_' . strtoupper('autoclean_interval' . $class_name) . '}' ), 
     400                'LANG_EXPLAIN' => ( isset($lang['autoclean_interval' . $class_name . '_explain']) ? $lang['autoclean_interval' . $class_name . '_explain'] : '{L_' . strtoupper('autoclean_interval' . $class_name) . '_EXPLAIN}' ), 
     401        )); 
     402} 
     403 
     404$inactive_users_del_min_class_select = user_class_select($config['inactive_users_del_min_class'], 'inactive_users_del_min_class'); 
     405 
     406$user_limit_ary_torrents = unserialize($new['user_limit_ary_torrents']); 
     407$user_limit_ary_allow_download = unserialize($new['user_limit_ary_allow_download']); 
     408$i = 0; 
     409while ( get_user_class_name($i) !== '' ) { 
     410        $template->assign_block_vars('user_limits_row', array( 
     411                'CLASS_ID' => $i, 
     412                'CLASS_INPUT_VALUE' => ( isset($user_limit_ary_torrents[$i]) ? intval($user_limit_ary_torrents[$i]) : 0 ), 
     413                'CLASS_NAME' => get_user_class_name($i), 
     414                'CHECKED' => ( isset($user_limit_ary_allow_download[$i]) && !empty($user_limit_ary_allow_download[$i]) ? ' checked="checked"' : '' ) 
     415        )); 
     416        ++$i; 
     417} 
     418 
     419$template->assign_vars(array( 
     420        'S_CONFIG_ACTION' => append_sid('admin_board.' . $phpEx), 
     421        'MAX_LOGIN_ATTEMPTS' => $new['max_login_attempts'], 
     422        'LOGIN_RESET_TIME' => $new['login_reset_time'], 
     423        // Start add - Online/Offline/Hidden Mod 
     424        'ONLINE_TIME' => $new['online_time'], 
     425        // End add - Online/Offline/Hidden Mod 
     426        'SERVER_NAME' => $new['server_name'], 
     427        'SCRIPT_PATH' => $new['script_path'], 
     428        'SERVER_PORT' => $new['server_port'], 
     429        'SERVER_PROTOCOL' => $new['server_protocol'], 
     430        'FORCE_SERVER_VARS_YES' => $force_server_vars_yes, 
     431        'FORCE_SERVER_VARS_NO' => $force_server_vars_no, 
     432        'SITENAME' => $new['sitename'], 
     433        'SITE_CHARSET' => $new['default_language_charset'], 
     434        'MAX_TORRENT_SIZE' => $new['max_torrent_size'], 
     435        'ANNOUNCE_INTERVAL' => $new['announce_interval'], 
     436        'MIN_ANNOUNCE_INTERVAL' => $new['min_announce_interval'], 
     437        'SIGNUP_TIMEOUT' => $new['signup_timeout'], 
     438        'MINVOTES' => $new['minvotes'], 
     439        'TTL' => $new['ttl'], 
     440        'ALTERNATE_TTL' => $new['alternate_ttl'], 
     441        'MAXUSERS' => $new['maxusers'], 
     442        'TORRENT_DIR' => $new['torrent_dir'], 
     443        'WAITTIME_YES' => $waittime_yes, 
     444        'WAITTIME_NO' => $waittime_no, 
     445        'SITE_DESCRIPTION' => $new['site_desc'], 
     446        'S_DISABLE_BOARD_YES' => $disable_board_yes, 
     447        'S_DISABLE_BOARD_NO' => $disable_board_no, 
     448        'CONFIRM_ENABLE' => ($new['enable_confirm']) ? 'checked="checked"' : '', 
     449        'CONFIRM_DISABLE' => (!$new['enable_confirm']) ? 'checked="checked"' : '', 
     450        'ALLOW_AUTOLOGIN_YES' => $allow_autologin_yes, 
     451        'ALLOW_AUTOLOGIN_NO' => $allow_autologin_no, 
     452        'AUTOLOGIN_TIME' => (int) $new['max_autologin_time'], 
     453        'BOARD_EMAIL_FORM_ENABLE' => $board_email_form_yes, 
     454        'BOARD_EMAIL_FORM_DISABLE' => $board_email_form_no, 
     455        'MAX_POLL_OPTIONS' => $new['max_poll_options'], 
     456        'FLOOD_INTERVAL' => $new['flood_interval'], 
     457        'SEARCH_FLOOD_INTERVAL' => $new['search_flood_interval'], 
     458        'TOPICS_PER_PAGE' => $new['topics_per_page'], 
     459        'POSTS_PER_PAGE' => $new['posts_per_page'], 
     460        'HOT_TOPIC' => $new['hot_threshold'], 
     461        'STYLE_SELECT' => $style_select, 
     462        'OVERRIDE_STYLE_YES' => $override_user_style_yes, 
     463        'OVERRIDE_STYLE_NO' => $override_user_style_no, 
     464        'LANG_SELECT' => $lang_select, 
     465        'DEFAULT_DATEFORMAT' => $new['default_dateformat'], 
     466        'TIMEZONE_SELECT' => $timezone_select, 
     467        // [start] DST 
     468        'DST_YES' => $dst_yes, 
     469        'DST_NO' => $dst_no, 
     470        // [end] DST 
     471        'ALLOW_INVITE_YES' => $allow_invite_yes, 
     472        'ALLOW_INVITE_NO' => $allow_invite_no, 
     473        'INVITES_PERIOD' => ( $new['autoclean_interval_receive_invites'] ? $new['autoclean_interval_receive_invites'] / ( 24 * 60 ) : 0 ), 
     474        'S_NUMBER_INVITES_EXPLAIN' => sprintf($lang['number_invites_explain'], $users_class_string, get_user_class_name(0), get_user_class_name(1), get_user_class_name(2) ), 
     475        'NUMBER_INVITES' => $new['number_invites'], 
     476        'INVITES_TABLE_STYLE' => ( !$new['allow_invite'] ? ' style="display: none;"' : '' ), 
     477        'ENABLE_AUTOWARN_SYSTEM_YES' => $allow_autowarn_system_yes, 
     478        'ENABLE_AUTOWARN_SYSTEM_NO' => $allow_autowarn_system_no, 
     479        'AUTOWARN_MIN_ADDED' => $new['autowarn_min_added'], 
     480        'AUTOWARN_TABLE_STYLE' => ( !$new['allow_autowarn'] ? ' style="display: none;"' : '' ), 
     481        'AUTOWARN_TABLE_INPUTS' => $auto_warn_table_inputs, 
     482        'AUTOWARN_INPUTS_COUNT' => $auto_warn_inputs_count, 
     483        'ALLOW_CLONS_YES' => $allow_clons_yes, 
     484        'ALLOW_CLONS_NO' => $allow_clons_no, 
     485        'DEMOTE_UPLOADERS_DAYS' => $new['demote_uploader_days'], 
     486        'ALLOW_MY_BONUS_YES' => $allow_my_bonus_yes, 
     487        'ALLOW_MY_BONUS_NO' => $allow_my_bonus_no, 
     488        'MY_BONUS_POINTS' => $new['my_bonus_points'], 
     489        'MY_BONUS_TABLE_STYLE' => ( !$new['allow_my_bonus'] ? ' style="display: none;"' : '' ), 
     490        'MY_BONUS_TABLE_INPUTS' => $my_bonus_table_inputs, 
     491        'MY_BONUS_INPUTS_COUNT' => $my_bonus_inputs_count, 
     492        'MY_BONUS_TITLE_LENGTH' => $new['my_bonus_title_length'], 
     493        'UPLOAPP_PROMOTE_TEXT' => $new['uploadapp_promote_text'], 
     494        'S_PRIVMSG_ENABLED' => $privmsg_on, 
     495        'S_PRIVMSG_DISABLED' => $privmsg_off, 
     496        'INBOX_LIMIT' => $new['max_inbox_privmsgs'], 
     497        'SENTBOX_LIMIT' => $new['max_sentbox_privmsgs'], 
     498        'SAVEBOX_LIMIT' => $new['max_savebox_privmsgs'], 
     499        'COOKIE_DOMAIN' => $new['cookie_domain'], 
     500        'COOKIE_NAME' => $new['cookie_name'], 
     501        'COOKIE_PATH' => $new['cookie_path'], 
     502        'SESSION_LENGTH' => $new['session_length'], 
     503        'S_COOKIE_SECURE_ENABLED' => $cookie_secure_yes, 
     504        'S_COOKIE_SECURE_DISABLED' => $cookie_secure_no, 
     505        'GZIP_YES' => $gzip_yes, 
     506        'GZIP_NO' => $gzip_no, 
     507        'PRUNE_YES' => $prune_yes, 
     508        'PRUNE_NO' => $prune_no, 
     509        'HTML_TAGS' => $html_tags, 
     510        'HTML_YES' => $html_yes, 
     511        'HTML_NO' => $html_no, 
     512        'BBCODE_YES' => $bbcode_yes, 
     513        'BBCODE_NO' => $bbcode_no, 
     514        'SMILE_YES' => $smile_yes, 
     515        'SMILE_NO' => $smile_no, 
     516        'SIG_YES' => $sig_yes, 
     517        'SIG_NO' => $sig_no, 
     518        'SIG_NO_IMAGES' => $sig_no_images, 
     519        'SIG_SIZE' => $new['max_sig_chars'], 
     520        'NAMECHANGE_YES' => $namechange_yes, 
     521        'NAMECHANGE_NO' => $namechange_no, 
     522        'PROMOTE_TO_POWER_MEGS_LIMIT' => $new['promote_to_power_megs_limit'], 
     523        'PROMOTE_TO_POWER_MIN_RATIO' => $new['promote_to_power_min_ratio'], 
     524        'PROMOTE_TO_POWER_REG_DATE_AGO' => $new['promote_to_power_reg_date_ago'], 
     525        'PROMOTE_TO_POWER_DEMOTE_RATIO' => $new['promote_to_power_demote_ratio'], 
     526        'INACTIVE_USERS_DEL_DAYS' => $new['inactive_users_del_days'], 
     527        'INACTIVE_USERS_PARKED_DEL_DAYS' => $new['inactive_users_parked_del_days'], 
     528        'INACTIVE_USERS_DEL_MIN_CLASS_SELECT' => $inactive_users_del_min_class_select, 
     529        'AVATARS_LOCAL_YES' => $avatars_local_yes, 
     530        'AVATARS_LOCAL_NO' => $avatars_local_no, 
     531        'AVATARS_REMOTE_YES' => $avatars_remote_yes, 
     532        'AVATARS_REMOTE_NO' => $avatars_remote_no, 
     533        'AVATARS_UPLOAD_YES' => $avatars_upload_yes, 
     534        'AVATARS_UPLOAD_NO' => $avatars_upload_no, 
     535        'AVATAR_FILESIZE' => $new['avatar_filesize'], 
     536        'AVATAR_MAX_HEIGHT' => $new['avatar_max_height'], 
     537        'AVATAR_MAX_WIDTH' => $new['avatar_max_width'], 
     538        'AVATAR_PATH' => $new['avatar_path'], 
     539        'AVATAR_GALLERY_PATH' => $new['avatar_gallery_path'], 
     540        'SMILIES_PATH' => $new['smilies_path'], 
     541        'EMAIL_FROM' => $new['sitemail'], 
     542        'EMAIL_SIG' => $new['board_email_sig'], 
     543        'SMTP_YES' => $smtp_yes, 
     544        'SMTP_NO' => $smtp_no, 
     545        'EMAIL_ENABLE_YES' => $email_enable_yes, 
     546        'EMAIL_ENABLE_NO' => $email_enable_no, 
     547        'EMAIL_PACKAGE_SIZE' => $new['email_package_size'], 
     548        'SMTP_HOST' => $new['smtp_host'], 
     549        'SMTP_PORT' => $new['smtp_port'], 
     550        'SMTP_USERNAME' => $new['smtp_username'], 
     551        'SMTP_PASSWORD' => $new['smtp_password'], 
     552        'TIME_TO_MERGE' => $new['time_to_merge'], 
     553        'MERGE_FLOOD_INTERVAL' => $new['merge_flood_interval'], 
     554           'USER_LIMITS_VALUE_DONOR' => ( isset($user_limit_ary_torrents['D']) ? intval($user_limit_ary_torrents['D']) : 0 ), 
     555           'USER_LIMITS_VALUE_WARNED' => ( isset($user_limit_ary_torrents['W']) ? intval($user_limit_ary_torrents['W']) : 0 ), 
     556           'USER_LIMITS_CHECKED_WARNED' => ( isset($user_limit_ary_allow_download['W']) && !empty($user_limit_ary_allow_download['W']) ? ' checked="checked"' : '' ), 
     557           'SEED_TORRENTS_LIMIT_VALUE' => $new['max_torrent_allow_seed'], 
     558           'S_MIN_CLASS_ALLOW_UPLOAD_SELECT' => $min_class_allow_upload, 
     559           'S_DEFAULT_TYPE_MODERATED_TORRENTS_SELECT' => $default_type_moderated_torrents       ) 
     560); 
     561 
    726562$template->display('body'); 
    727563 
  • admin/admin_mass_email.php

    r4 r85  
    2222if( !empty($setmodules) ) 
    2323{ 
    24        $filename = basename(__FILE__); 
    25        $module['general']['mass_email'] = $filename; 
    26  
    27        return; 
     24        $filename = basename(__FILE__); 
     25        $module['general']['mass_email'] = $filename; 
     26 
     27        return; 
    2828} 
    2929 
     
    131131                     $messenger->assign_vars(array( 
    132132                                'BOARD_EMAIL' => $config['sitemail'], 
    133                                'MESSAGE' => $message 
    134                        )); 
     133                       'MESSAGE' => $message) 
     134                  ); 
    135135 
    136136                        if (!($messenger->send(NOTIFY_EMAIL))) 
     
    144144                $messenger->save_queue(); 
    145145 
     146                /*$messenger = new messenger($use_queue); 
     147 
     148                $messenger->from($config['sitemail']); 
     149                $messenger->replyto($config['sitemail']); 
     150                $messenger->headers('X-AntiAbuse: Tracker servername - ' . $config['server_name']); 
     151                $messenger->headers('X-AntiAbuse: User_id - ' . $userdata['uid']); 
     152                $messenger->headers('X-AntiAbuse: Username - ' . $userdata['name']); 
     153          $messenger->headers('X-AntiAbuse: User IP - ' . $user_ip); 
     154          $messenger->subject($subject); 
     155          $messenger->set_mail_priority($priority); 
     156 
     157                do { 
     158                        $messenger->bcc($row['email'], $row['name']); 
     159                        $messenger->to($row['email'], $row['name']); 
     160          } 
     161          while ( $row = $db->sql_fetchrow($result) ); 
     162 
     163          $db->sql_freeresult($result); 
     164 
     165                $messenger->template('admin_send_email'); 
     166             $messenger->assign_vars(array( 
     167                        'BOARD_EMAIL' => $config['sitemail'], 
     168               'MESSAGE' => $message) 
     169          ); 
     170          $messenger->send(NOTIFY_EMAIL); 
     171          $messenger->reset(); 
     172          if ( $use_queue ) { 
     173                     $messenger->save_queue(); 
     174          }*/ 
    146175 
    147176                trigger_error($lang['email_sent'] . '<br /><br />' . sprintf($lang['click_return_admin_index'],  '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>')); 
     
    151180                $message = ( $group_id != -1 ) ? $lang['group_not_exist'] : $lang['no_such_user']; 
    152181 
    153                $error = true; 
    154                $error_msg .= ( !empty($error_msg) ) ? '<br />' . $message : $message; 
     182          $error = true; 
     183          $error_msg .= ( !empty($error_msg) ) ? '<br />' . $message : $message; 
    155184     } 
    156185} 
     
    158187if ( $error ) 
    159188{ 
    160         $template->set_filenames(array( 
    161                 'reg_header' => '../admin/error_body.tpl' 
    162         )); 
    163  
    164         $template->assign_vars(array( 
    165                 'ERROR_MESSAGE' => $error_msg) 
    166         ); 
    167         $tpl = $template->assign_display('reg_header'); 
    168  
    169         $template->assign_vars(array( 
    170                 'ERROR_BOX' => $tpl 
    171         )); 
     189        $template->set_filenames(array( 
     190                'reg_header' => '../admin/error_body.tpl') 
     191        ); 
     192        $template->assign_vars(array( 
     193                'ERROR_MESSAGE' => $error_msg) 
     194        ); 
     195        $tpl = $template->assign_display('reg_header'); 
     196                $template->assign_vars(array( 
     197                        'ERROR_BOX' => $tpl) 
     198                ); 
    172199} 
    173200 
     
    177204 
    178205$sql = "SELECT group_id, group_name 
    179        FROM ".GROUPS_TABLE . " 
    180        WHERE group_single_user <> 1"; 
     206        FROM ".GROUPS_TABLE . " 
     207        WHERE group_single_user <> 1"; 
    181208$result = $db->sql_query($sql); 
    182209 
     
    184211if ( $row = $db->sql_fetchrow($result) ) 
    185212{ 
    186        do 
    187        
    188                $select_list .= '<option value = "' . $row['group_id'] . '">' . $row['group_name'] . '</option>'; 
    189        
    190        while ( $row = $db->sql_fetchrow($result) ); 
     213        do 
     214       
     215                $select_list .= '<option value = "' . $row['group_id'] . '">' . $row['group_name'] . '</option>'; 
     216       
     217        while ( $row = $db->sql_fetchrow($result) ); 
    191218} 
    192219$select_list .= '</select>'; 
     
    203230 
    204231$template->set_filenames(array( 
    205        'body' => '../admin/user_email_body.tpl') 
     232        'body' => '../admin/user_email_body.tpl') 
    206233); 
    207234 
    208235$template->assign_vars(array( 
    209        'MESSAGE' => $message, 
    210        'SUBJECT' => $subject, 
    211  
    212        'L_EMAIL_TITLE' => $lang['email'], 
    213        'L_EMAIL_EXPLAIN' => $lang['mass_email_explain'], 
    214        'L_EMAIL_SUBJECT' => $lang['subject'], 
    215        'L_EMAIL_MSG' => $lang['message'], 
    216  
    217        'S_USER_ACTION' => append_sid('admin_mass_email.'.$phpEx), 
    218        'S_GROUP_SELECT' => $select_list, 
    219         'S_PRIORITY_OPTIONS' => $priority_options ) 
     236        'MESSAGE' => $message, 
     237        'SUBJECT' => $subject, 
     238 
     239        'L_EMAIL_TITLE' => $lang['email'], 
     240        'L_EMAIL_EXPLAIN' => $lang['mass_email_explain'], 
     241        'L_EMAIL_SUBJECT' => $lang['subject'], 
     242        'L_EMAIL_MSG' => $lang['message'], 
     243 
     244        'S_USER_ACTION' => append_sid('admin_mass_email.'.$phpEx), 
     245        'S_GROUP_SELECT' => $select_list, 
     246           'S_PRIORITY_OPTIONS' => $priority_options ) 
    220247); 
    221248 
  • db_updater.php

    r17 r85  
    8686} 
    8787if ( $base_version == 0 && $rlz_version == 3 && $version < 4 ) { 
    88         set_config('site_keywords', '��������, �������, ��-�� tbdevsz'); 
     88        set_config('site_keywords', '��������, �������, ��-�� streamzone'); 
    8989        set_config('autoclean_interval_delete_old_sessions', '10'); 
    9090        set_config('autoclean_last_run_delete_old_sessions', '0', true); 
    91  
    9291        $db->sql_query("ALTER TABLE " . PEERS_TABLE . " DROP INDEX `peer_id`"); 
    9392        $db->sql_query("ALTER TABLE " . PEERS_TABLE . " CHANGE `peer_id` `peer_id` BLOB NOT NULL"); 
    9493        $db->sql_query("CREATE INDEX peer_id ON " . PEERS_TABLE . " (peer_id(20))"); 
    9594 
    96         $db->sql_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE name = \'board_disable\''); 
    97         $db->sql_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE name = \'config_id\''); 
    98         $db->sql_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE name = \'coppa_fax\''); 
    99         $db->sql_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE name = \'coppa_mail\''); 
    100         $db->sql_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE name = \'lastcleantime\''); 
    101         $db->sql_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE name = \'lastcleantime_additional\''); 
    102  
    103         $db->sql_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE name = \'allow_theme_create\''); 
    104         $db->sql_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE name = \'board_startdate\''); 
    105         $db->sql_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE name = \'peerlimit\''); 
    106         $db->sql_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE name = \'require_activation\''); 
    107         $db->sql_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE name = \'board_email\''); 
    108         $db->sql_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE name = \'allow_namechange\''); 
    109  
    110         set_config('autowarn_settings', str_replace(',', ';', $config['autowarn_settings'])); 
    111         set_config('email_function_name', 'mail'); 
    11295        set_config('version', '0.3.4'); 
    11396 
  • include/class.cache.php

    r59 r85  
    584584} 
    585585 
    586 if ( class_exists('Memcache') ) { 
    587         require_once($root_path . 'class.memcached.php'); 
    588         $cache = new memcached('127.0.0.1', 11211); 
    589 } 
    590  
    591586?> 
  • include/class.cleanup_types.php

    r61 r85  
    296296                        return true; 
    297297                } 
    298                 $auto_warn_table_arr = @explode(';', $config['autowarn_settings']); 
     298                $auto_warn_table_arr = @explode(',', $config['autowarn_settings']); 
    299299                if ( !is_array($auto_warn_table_arr) ) { 
    300                         set_config('allow_autowarn', 0); 
    301300                        return true; 
    302301                } 
  • include/functions_admin.php

    r66 r85  
    194194} 
    195195 
    196 /** 
    197 * Build select field options in acp pages 
    198 */ 
    199 function build_select($option_ary, $option_default = false) 
    200 { 
    201         global $user; 
    202  
    203         $html = ''; 
    204         foreach ($option_ary as $value => $title) 
    205         { 
    206                 $selected = ($option_default !== false && $value == $option_default) ? ' selected="selected"' : ''; 
    207                 $html .= '<option value="' . $value . '"' . $selected . '>' . $lang[$title] . '</option>'; 
    208         } 
    209  
    210         return $html; 
    211 } 
    212  
    213 /** 
    214 * Build radio fields in acp pages 
    215 */ 
    216 function h_radio($name, &$input_ary, $input_default = false, $id = false, $key = false) 
    217 { 
    218         global $lang; 
    219  
    220         $html = ''; 
    221         $id_assigned = false; 
    222         foreach ($input_ary as $value => $title) 
    223         { 
    224                 $selected = ($input_default !== false && $value == $input_default) ? ' checked="checked"' : ''; 
    225                 $html .= '<label><input type="radio" name="' . $name . '"' . (($id && !$id_assigned) ? ' id="' . $id . '"' : '') . ' value="' . $value . '"' . $selected . (($key) ? ' accesskey="' . $key . '"' : '') . ' class="radio" /> ' . $lang[$title] . '</label>'; 
    226                 $id_assigned = true; 
    227         } 
    228  
    229         return $html; 
    230 } 
    231  
    232 /** 
    233 * Build configuration template for acp configuration pages 
    234 */ 
    235 function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars) 
    236 { 
    237         global $lang; 
    238  
    239         $tpl = ''; 
    240         $name = 'config[' . $config_key . ']'; 
    241  
    242         switch ($tpl_type[0]) 
    243         { 
    244                 case 'text': 
    245                 case 'password': 
    246                         $size = (int) $tpl_type[1]; 
    247                         $maxlength = (int) $tpl_type[2]; 
    248  
    249                         $tpl = '<input id="' . $key . '" type="' . $tpl_type[0] . '"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="' . $name . '" value="' . $new[$config_key] . '" />'; 
    250                 break; 
    251  
    252                 case 'text_ary': 
    253                         $size = (int) $tpl_type[1]; 
    254                         $maxlength = (int) $tpl_type[2]; 
    255                         preg_match('/\[(.*?)\]/', $config_key, $matches); 
    256                         $name = 'config[' . preg_replace('/\[(.*?)\]/', '', $config_key) . '][' . $matches[1] . ']'; 
    257                         $new[$config_key] = ( isset($new[$config_key]) ? $new[$config_key] : '' ); 
    258  
    259                         $tpl = '<input id="' . $key . '" type="text"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="' . $name . '" value="' . $new[$config_key] . '" />'; 
    260                 break; 
    261  
    262                 case 'dimension': 
    263                         $size = (int) $tpl_type[1]; 
    264                         $maxlength = (int) $tpl_type[2]; 
    265  
    266                         $tpl = '<input id="' . $key . '" type="text"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="config[' . $config_key . '_width]" value="' . $new[$config_key . '_width'] . '" /> x <input type="text"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="config[' . $config_key . '_height]" value="' . $new[$config_key . '_height'] . '" />'; 
    267                 break; 
    268  
    269                 case 'textarea': 
    270                         $rows = (int) $tpl_type[1]; 
    271                         $cols = (int) $tpl_type[2]; 
    272  
    273                         $tpl = '<textarea id="' . $key . '" name="' . $name . '" rows="' . $rows . '" cols="' . $cols . '">' . $new[$config_key] . '</textarea>'; 
    274                 break; 
    275  
    276                 case 'radio': 
    277                         $key_yes        = ( $new[$config_key]) ? ' checked="checked"' : ''; 
    278                         $key_no = ( !$new[$config_key]) ? ' checked="checked"' : ''; 
    279  
    280                         $tpl_type_cond = explode('_', $tpl_type[1]); 
    281                         $type_no = ($tpl_type_cond[0] == 'disabled' || $tpl_type_cond[0] == 'enabled') ? false : true; 
    282  
    283                         $tpl_no = '<label><input type="radio" name="' . $name . '" value="0"' . $key_no . ' class="radio" /> ' . (($type_no) ? $lang['no'] : $lang['disabled']) . '</label>'; 
    284                         $tpl_yes = '<label><input type="radio" id="' . $key . '" name="' . $name . '" value="1"' . $key_yes . ' class="radio" /> ' . (($type_no) ? $lang['yes'] : $lang['enabled']) . '</label>'; 
    285  
    286                         $tpl = ($tpl_type_cond[0] == 'yes' || $tpl_type_cond[0] == 'enabled') ? $tpl_yes . $tpl_no : $tpl_no . $tpl_yes; 
    287                 break; 
    288  
    289                 case 'radio_ary': 
    290                         $key_yes        = ( isset($new[$config_key]) && $new[$config_key]) ? ' checked="checked"' : ''; 
    291                         $key_no = ( isset($new[$config_key]) && !$new[$config_key]) ? ' checked="checked"' : ''; 
    292  
    293                         preg_match('/\[(.*?)\]/', $config_key, $matches); 
    294                         $name = 'config[' . preg_replace('/\[(.*?)\]/', '', $config_key) . '][' . $matches[1] . ']'; 
    295  
    296                         $tpl_type_cond = explode('_', $tpl_type[1]); 
    297                         $type_no = ($tpl_type_cond[0] == 'disabled' || $tpl_type_cond[0] == 'enabled') ? false : true; 
    298  
    299                         $tpl_no = '<label><input type="radio" name="' . $name . '" value="0"' . $key_no . ' class="radio" /> ' . (($type_no) ? $lang['no'] : $lang['disabled']) . '</label>'; 
    300                         $tpl_yes = '<label><input type="radio" id="' . $key . '" name="' . $name . '" value="1"' . $key_yes . ' class="radio" /> ' . (($type_no) ? $lang['yes'] : $lang['enabled']) . '</label>'; 
    301  
    302                         $tpl = ($tpl_type_cond[0] == 'yes' || $tpl_type_cond[0] == 'enabled') ? $tpl_yes . $tpl_no : $tpl_no . $tpl_yes; 
    303                 break; 
    304  
    305                 case 'select': 
    306                 case 'custom': 
    307  
    308                         $return = ''; 
    309  
    310                         if (isset($vars['method'])) 
    311                         { 
    312                                 $call = array($vars['method']); 
    313                         } 
    314                         else if (isset($vars['function'])) 
    315                         { 
    316                                 $call = $vars['function']; 
    317                         } 
    318                         else 
    319                         { 
    320                                 break; 
    321                         } 
    322  
    323                         if (isset($vars['params'])) 
    324                         { 
    325                                 $args = array(); 
    326                                 foreach ($vars['params'] as $value) 
    327                                 { 
    328                                         switch ($value) 
    329                                         { 
    330                                                 case '{CONFIG_VALUE}': 
    331                                                         $value = $new[$config_key]; 
    332                                                 break; 
    333  
    334                                                 case '{KEY}': 
    335                                                         $value = $key; 
    336                                                 break; 
    337                                         } 
    338  
    339                                         $args[] = $value; 
    340                                 } 
    341                         } 
    342                         else 
    343                         { 
    344                                 $args = array($new[$config_key], $key); 
    345                         } 
    346  
    347                         $return = call_user_func_array($call, $args); 
    348  
    349                         if ($tpl_type[0] == 'select') 
    350                         { 
    351                                 $tpl = $return; 
    352                         } 
    353                         else 
    354                         { 
    355                                 $tpl = $return; 
    356                         } 
    357  
    358                 break; 
    359  
    360                 default: 
    361                 break; 
    362         } 
    363  
    364         if (isset($vars['append'])) 
    365         { 
    366                 $tpl .= $vars['append']; 
    367         } 
    368  
    369         return $tpl; 
    370 } 
    371  
    372 /** 
    373 * Going through a config array and validate values, writing errors to $error. The validation method  accepts parameters separated by ':' for string and int. 
    374 * The first parameter defines the type to be used, the second the lower bound and the third the upper bound. Only the type is required. 
    375 */ 
    376 function validate_config_vars($config_vars, &$cfg_array, &$error) 
    377 { 
    378         global $tracker_root_path, $lang; 
    379         $type   = 0; 
    380         $min    = 1; 
    381         $max    = 2; 
    382  
    383         foreach ($config_vars as $config_name => $config_definition) 
    384         { 
    385                 if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false) 
    386                 { 
    387                         continue; 
    388                 } 
    389  
    390                 if (!isset($config_definition['validate'])) 
    391                 { 
    392                         continue; 
    393                 } 
    394  
    395                 $validator = explode(':', $config_definition['validate']); 
    396  
    397                 // Validate a bit. ;) (0 = type, 1 = min, 2= max) 
    398                 switch ($validator[$type]) 
    399                 { 
    400                         case 'string': 
    401                                 $length = strlen($cfg_array[$config_name]); 
    402  
    403                                 // the column is a VARCHAR 
    404                                 $validator[$max] = (isset($validator[$max])) ? min(255, $validator[$max]) : 255; 
    405  
    406                                 if (isset($validator[$min]) && $length < $validator[$min]) 
    407                                 { 
    408                                         $error[] = sprintf($lang['setting_too_short'], $lang[$config_definition['lang']], $validator[$min]); 
    409                                 } 
    410                                 else if (isset($validator[$max]) && $length > $validator[2]) 
    411                                 { 
    412                                         $error[] = sprintf($lang['setting_too_long'], $lang[$config_definition['lang']], $validator[$max]); 
    413                                 } 
    414                         break; 
    415  
    416                         case 'bool': 
    417                                 $cfg_array[$config_name] = ($cfg_array[$config_name]) ? 1 : 0; 
    418                         break; 
    419  
    420                         case 'int': 
    421                                 $cfg_array[$config_name] = (int) $cfg_array[$config_name]; 
    422  
    423                                 if (isset($validator[$min]) && $cfg_array[$config_name] < $validator[$min]) 
    424                                 { 
    425                                         $error[] = sprintf($lang['setting_too_low'], $lang[$config_definition['lang']], $validator[$min]); 
    426                                 } 
    427                                 else if (isset($validator[$max]) && $cfg_array[$config_name] > $validator[$max]) 
    428                                 { 
    429                                         $error[] = sprintf($lang['setting_too_big'], $lang[$config_definition['lang']], $validator[$max]); 
    430                                 } 
    431                         break; 
    432  
    433                         case 'float': 
    434                                 $cfg_array[$config_name] = str_replace(',', '.', $cfg_array[$config_name]); 
    435                                 $cfg_array[$config_name] = (float) $cfg_array[$config_name]; 
    436  
    437                                 if (isset($validator[$min]) && $cfg_array[$config_name] < $validator[$min]) 
    438                                 { 
    439                                         $error[] = sprintf($lang['setting_too_low'], $lang[$config_definition['lang']], $validator[$min]); 
    440                                 } 
    441                                 else if (isset($validator[$max]) && $cfg_array[$config_name] > $validator[$max]) 
    442                                 { 
    443                                         $error[] = sprintf($lang['setting_too_big'], $lang[$config_definition['lang']], $validator[$max]); 
    444                                 } 
    445                         break; 
    446  
    447                         // Absolute path 
    448                         case 'script_path': 
    449                                 if (!$cfg_array[$config_name]) 
    450                                 { 
    451                                         break; 
    452                                 } 
    453  
    454                                 $destination = str_replace('\\', '/', $cfg_array[$config_name]); 
    455  
    456                                 if ($destination !== '/') 
    457                                 { 
    458                                         // Adjust destination path (no trailing slash) 
    459                                         if (substr($destination, -1, 1) == '/') 
    460                                         { 
    461                                                 $destination = substr($destination, 0, -1); 
    462                                         } 
    463  
    464                                         $destination = str_replace(array('../', './'), '', $destination); 
    465  
    466                                         if ($destination[0] != '/') 
    467                                         { 
    468                                                 $destination = '/' . $destination; 
    469                                         } 
    470                                 } 
    471  
    472                                 $cfg_array[$config_name] = trim($destination); 
    473  
    474                         break; 
    475  
    476                         case 'lang': 
    477                                 if (!$cfg_array[$config_name]) 
    478                                 { 
    479                                         break; 
    480                                 } 
    481  
    482                                 $cfg_array[$config_name] = basename($cfg_array[$config_name]); 
    483  
    484                                 if ( !check_language($cfg_array[$config_name]) ) 
    485                                 { 
    486                                         $error[] = $lang['wrong_data_lang']; 
    487                                 } 
    488                         break; 
    489  
    490                         case 'style': 
    491                                 if (!$cfg_array[$config_name]) 
    492                                 { 
    493                                         break; 
    494                                 } 
    495  
    496                                 if ( !check_style_id($cfg_array[$config_name]) ) 
    497                                 { 
    498                                         $error[] = $lang['wrong_data_style']; 
    499                                 } 
    500                         break; 
    501  
    502                         case 'class': 
    503                                 if (!$cfg_array[$config_name]) 
    504                                 { 
    505                                         break; 
    506                                 } 
    507  
    508                                 if ( !check_user_class($cfg_array[$config_name]) ) 
    509                                 { 
    510                                         $error[] = $lang['wrong_data_class']; 
    511                                 } 
    512                         break; 
    513  
    514                         // Relative path (appended $tracker_root_path) 
    515                         case 'rpath': 
    516                         case 'rwpath': 
    517                                 if (!$cfg_array[$config_name]) 
    518                                 { 
    519                                         break; 
    520                                 } 
    521  
    522                                 $destination = $cfg_array[$config_name]; 
    523  
    524                                 // Adjust destination path (no trailing slash) 
    525                                 if (substr($destination, -1, 1) == '/' || substr($destination, -1, 1) == '\\') 
    526                                 { 
    527                                         $destination = substr($destination, 0, -1); 
    528                                 } 
    529  
    530                                 $destination = str_replace(array('../', '..\\', './', '.\\'), '', $destination); 
    531                                 if ($destination && ($destination[0] == '/' || $destination[0] == "\\")) 
    532                                 { 
    533                                         $destination = ''; 
    534                                 } 
    535  
    536                                 $cfg_array[$config_name] = trim($destination); 
    537  
    538                         // Path being relative (still prefixed by tracker_root_path), but with the ability to escape the root dir... 
    539                         case 'path': 
    540                         case 'wpath': 
    541  
    542                                 if (!$cfg_array[$config_name]) 
    543                                 { 
    544                                         break; 
    545                                 } 
    546  
    547                                 $cfg_array[$config_name] = trim($cfg_array[$config_name]); 
    548  
    549                                 // Make sure no NUL byte is present... 
    550                                 if (strpos($cfg_array[$config_name], "\0") !== false || strpos($cfg_array[$config_name], '%00') !== false) 
    551                                 { 
    552                                         $cfg_array[$config_name] = ''; 
    553                                         break; 
    554                                 } 
    555  
    556                                 if (!file_exists($tracker_root_path . $cfg_array[$config_name])) 
    557                                 { 
    558                                         $error[] = sprintf($lang['directory_doesnt_exists'], $cfg_array[$config_name]); 
    559                                 } 
    560  
    561                                 if (file_exists($tracker_root_path . $cfg_array[$config_name]) && !is_dir($tracker_root_path . $cfg_array[$config_name])) 
    562                                 { 
    563                                         $error[] = sprintf($lang['directory_not_dir'], $cfg_array[$config_name]); 
    564                                 } 
    565  
    566                                 // Check if the path is writable 
    567                                 if ($config_definition['validate'] == 'wpath' || $config_definition['validate'] == 'rwpath') 
    568                                 { 
    569                                         if (file_exists($tracker_root_path . $cfg_array[$config_name]) && !@is_writable($tracker_root_path . $cfg_array[$config_name])) 
    570                                         { 
    571                                                 $error[] = sprintf($lang['directory_not_writable'], $cfg_array[$config_name]); 
    572                                         } 
    573                                 } 
    574  
    575                         break; 
    576                 } 
    577         } 
    578  
    579         return; 
    580 } 
    581  
    582 /** 
    583 * Checks whatever or not a variable is OK for use in the Database 
    584 * param mixed $value_ary An array of the form array(array('lang' => ..., 'value' => ..., 'column_type' =>))' 
    585 * param mixed $error The error array 
    586 */ 
    587 function validate_range($value_ary, &$error) 
    588 { 
    589         global $lang; 
    590  
    591         $column_types = array( 
    592                 'BOOL'  => array('php_type' => 'int',           'min' => 0,                             'max' => 1), 
    593                 'USINT' => array('php_type' => 'int',           'min' => 0,                             'max' => 65535), 
    594                 'UINT'  => array('php_type' => 'int',           'min' => 0,                             'max' => (int) 0x7fffffff), 
    595                 'INT'   => array('php_type' => 'int',           'min' => (int) 0x80000000,      'max' => (int) 0x7fffffff), 
    596                 'TINT'  => array('php_type' => 'int',           'min' => -128,                          'max' => 127), 
    597  
    598                 'VCHAR' => array('php_type' => 'string',        'min' => 0,                             'max' => 255), 
    599         ); 
    600         foreach ($value_ary as $value) 
    601         { 
    602                 $column = explode(':', $value['column_type']); 
    603                 $max = $min = 0; 
    604                 $type = 0; 
    605                 if (!isset($column_types[$column[0]])) 
    606                 { 
    607                         continue; 
    608                 } 
    609                 else 
    610                 { 
    611                         $type = $column_types[$column[0]]; 
    612                 } 
    613  
    614                 switch ($type['php_type']) 
    615                 { 
    616                         case 'string' : 
    617                                 $max = (isset($column[1])) ? min($column[1],$type['max']) : $type['max']; 
    618                                 if (strlen($value['value']) > $max) 
    619                                 { 
    620                                         $error[] = sprintf($lang['SETTING_TOO_LONG'], $lang[$value['lang']], $max); 
    621                                 } 
    622                         break; 
    623  
    624                         case 'int': 
    625                                 $min = (isset($column[1])) ? max($column[1],$type['min']) : $type['min']; 
    626                                 $max = (isset($column[2])) ? min($column[2],$type['max']) : $type['max']; 
    627                                 if ($value['value'] < $min) 
    628                                 { 
    629                                         $error[] = sprintf($lang['SETTING_TOO_LOW'], $lang[$value['lang']], $min); 
    630                                 } 
    631                                 else if ($value['value'] > $max) 
    632                                 { 
    633                                         $error[] = sprintf($lang['SETTING_TOO_BIG'], $lang[$value['lang']], $max); 
    634                                 } 
    635                         break; 
    636                 } 
    637         } 
    638 } 
    639  
    640196?> 
  • include/overall_footer.php

    r76 r85  
    140140 
    141141                if ( !defined('IN_ERROR_HANDLER')  && !defined('IN_CLEANUP') ) { 
    142                         //@include_once($tracker_root_path . 'include/class.cleanup.php'); 
    143                         //$cleanup = new cleanup(); 
     142                        @include_once($tracker_root_path . 'include/class.cleanup.php'); 
     143                        $cleanup = new cleanup(); 
    144144                } 
    145145 
  • include/secrets.php

    r79 r85  
    33$db_host = 'localhost'; 
    44$db_port = 3306; 
    5 $db_user = ''; 
     5$db_user = 'root'; 
    66$db_pass = ''; 
    7 $db_name = ''; 
     7$db_name = 'bt'; 
    88$db_persistency = false; 
    99 
  • include/sessions.php

    r78 r85  
    657657     if ( !($row = $db->sql_fetchrow($result)) ) { 
    658658                $db->sql_freeresult($result); 
    659  
    660                 if ( $style != $config['default_style'] ) { 
     659          if ( $style != $config['default_style'] ) { 
    661660                        $sql = 'SELECT * FROM ' . THEMES_TABLE . ' WHERE themes_id = ' . $config['default_style']; 
    662                        $result = $db->sql_query($sql, 31536000); 
     661               $result = $db->sql_query($sql, 31536000); 
    663662 
    664663                        if ( $row = $db->sql_fetchrow($result) ) { 
     
    666665                                $sql = 'UPDATE ' . USERS_TABLE . ' 
    667666                                                SET user_style = ' . $config['default_style'] . ' 
    668                                                WHERE user_style = ' . $style; 
    669                                $db->sql_query($sql); 
    670                     } 
     667                              WHERE user_style = ' . $style; 
     668                    $db->sql_query($sql); 
     669               } 
    671670                        else { 
    672671                                trigger_error("Could not get theme data for themes_id [$style]", E_USER_ERROR); 
    673                     } 
    674                
     672               } 
     673         
    675674                else { 
    676675                        trigger_error("Could not get theme data for themes_id [$style]", E_USER_ERROR); 
    677                
    678                return; 
    679        
     676         
     677          return; 
     678     
    680679        $db->sql_freeresult($result); 
    681680     $template_name = $row['style_name']; 
     
    692691                if ( !defined('TEMPLATE_CONFIG') ) { 
    693692                        trigger_error("Could not open $template_name template config file"); 
    694                
     693         
    695694 
    696695                $img_lang = ( file_exists($template_path . '/images/lang_' . $userdata['language']) ) ? $userdata['language'] : $config['default_lang']; 
    697                foreach ( $images AS $key => $value ) { 
     696          foreach ( $images AS $key => $value ) { 
    698697                        if ( !is_array($value) ) { 
    699698                                $images[$key] = str_replace('{LANG}', 'lang_' . $img_lang, $value); 
    700                      } 
    701                 } 
    702                 $userdata['template_path'] = $template_path; 
    703         //      $userdata['theme_bitfield'] = $row['bbcode_bitfield']; 
    704  
    705                 $template->assign_vars(array( 
    706                         'TEMPLATE_PATH' => $template_path 
    707                 )); 
    708         } 
     699               } 
     700          } 
     701          $userdata['template_path'] = $tracker_root_path . 'templates/' . $row['template_name']; 
     702//        $userdata['theme_bitfield'] = $row['bbcode_bitfield']; 
     703     } 
    709704        else { 
    710705                trigger_error("Could not initialize template [$style]"); 
  • include/ucp/bonus.php

    r54 r85  
    5454} 
    5555else { 
    56         $my_bonus_settings = unserialize($config['my_bonus_settings']); 
    57         if ( !sizeof($my_bonus_settings) ) { 
    58                 set_config('allow_my_bonus', 0); 
    59         } 
    6056 
    6157        if ( !$config['allow_my_bonus'] || defined('USE_XBTT') ) { 
     
    6965                'BONUS_VIEW' => number_format($bonus, 1) 
    7066        )); 
     67 
     68        $my_bonus_settings = unserialize($config['my_bonus_settings']); 
    7169 
    7270        if ( is_array($my_bonus_settings) && sizeof($my_bonus_settings) ) { 
  • languages/lang_english/lang_admin.php

    r9 r85  
    315315        'avatar_gallery_path' =>  'Avatar Gallery Path', 
    316316        'avatar_gallery_path_explain' =>  'Path under your TB Dev SZ root dir for pre-loaded images, e.g. pic/avatars/gallery', 
     317 
     318        'coppa_settings' =>  'COPPA Settings', 
     319        'coppa_fax' =>  'COPPA Fax Number', 
     320        'coppa_mail' =>  'COPPA Mailing Address', 
     321        'coppa_mail_explain' =>  'This is the mailing address to which parents will send COPPA registration forms', 
    317322 
    318323        'email_settings' =>  'Email Settings', 
     
    10281033        'user_torrent_seed_limits_settings_explain' => 'Here you can setup seeded torrents limit. This value limits all classes.', 
    10291034        'max_seed_torrents_limit' => 'Maximum seeded torrents amount', 
    1030         'user_torrent_download_limits_settings_explain' => 'Here you can setup limits for parallel dowloaded torrents for every user class, and for several types of accounts.', 
    1031  
    1032         'user_torrent_download_allow_settings' => 'Here you can deny/allow download torrents for users', 
    1033         'user_torrent_download_allow_settings_explain' => 'Set value to Yes if you want to allow download of for No if you disallow download', 
     1035        'user_torrent_download_limits_settings_explain' => 'Here you can setup limits for parallel dowloaded torrents for every user class, and for several types of accounts. And, you can also deny/allow download, using checkbox right to the input field for torrents amount.', 
     1036        'allow_download_torrents' => 'Can download torrents?', 
    10341037 
    10351038        'all_torrents' => 'All torrents', 
    10361039        'only_non_uploaders' => 'Only for class bellow "Uploader"', 
    1037         'no_one_torrents' => 'No one torrents', 
    1038  
    1039         'site_keywords' => 'Site keywords (for meta header)', 
    1040         'email_function_name' => 'Name of function for send mail (usualy mail)', 
    1041  
    1042         'setting_too_low'               => 'The entered value for the setting �%1$s� is too low. The minimal allowed value is %2$d.', 
    1043         'setting_too_big'               => 'The entered value for the setting �%1$s� is too big. The maximal allowed value is %2$d.', 
    1044         'setting_too_long'              => 'The entered value for the setting �%1$s� is too long. The maximal allowed length is %2$d.', 
    1045         'setting_too_short'             => 'The entered value for the setting �%1$s� is not long enough. The minimal allowed length is %2$d.', 
    1046  
    1047         'wrong_data_lang' => 'Invalid language selected', 
    1048         'wrong_data_style' => 'Invalid style selected', 
    1049         'wrong_data_class' => 'Invalid class selected', 
    1050         'directory_doesnt_exists' => 'Directory �%1$s� doesn\'t exists', 
    1051         'directory_not_dir' => 'Directory �%1$s� is not directory', 
    1052         'directory_not_writable' => 'Directory �%1$s� is not writable', 
    1053  
    1054         'imediatly_send' => 'Imediatly send', 
    1055         'priority' => 'Priority', 
    1056  
    1057         'min_class_allow_upload' => 'Minimal class for users, which can upload torrents', 
    1058         'default_type_moderated_torrents' => 'Which torrents mark as not moderated?', 
     1040        'no_one_torrents' => 'No one torrents' 
    10591041 
    10601042)); 
  • languages/lang_russian/email/admin_send_email.txt

    r9 r85  
    11 
    22������� � �������{SITENAME}". ��������� �� �� ����� ����� � ����������� ������� 
    3  
    43{BOARD_EMAIL} 
    54 
  • languages/lang_russian/email/topic_notify.txt

    r9 r85  
    22 
    33���� 
    4  
    54� ������ ��, ��� ���{TOPIC_TITLE}" ���SITENAME}. ��� ����� ������ ��� ����. � �� ���������������� ���� ����������� �: 
    65 
     
    87 
    98����� ���� ����� �� ���"��� �� ������������ ������ 
    10  
    119{U_STOP_WATCHING_TOPIC} 
    1210 
  • languages/lang_russian/lang_admin.php

    r9 r85  
    296296        'avatar_gallery_path' =>  '�� ������, 
    297297        'avatar_gallery_path_explain' =>  '���� ���� � �������� �� ���c/avatars/gallery', 
     298 
     299        'coppa_settings' =>  'COPPA Settings', 
     300        'coppa_fax' =>  'COPPA Fax Number', 
     301        'coppa_mail' =>  'COPPA Mailing Address', 
     302        'coppa_mail_explain' =>  'This is the mailing address where parents will send COPPA registration forms', 
    298303 
    299304        'email_settings' =>  '��� e-mail', 
     
    755760 
    756761// Start add - Online/Offline/Hidden Mod 
    757         'online_time' =>  '�� � �� ���', 
    758         'online_time_explain' =>  '������ ���� �� ������������ ���, ����� ��� (�������� ��0 ��', 
     762        'online_time' =>  'Online status time', 
     763        'online_time_explain' =>  'Number of seconds a user must be displayed online (do not use lower value than 60).', 
    759764        'online_setting' =>  'Online Status Setting', 
    760765        'online_color' =>  'Online text color', 
     
    10091014        'user_torrent_seed_limits_settings_explain' => '�� ��� ���������������� ��������� ��', 
    10101015        'max_seed_torrents_limit' => '����������� �����, 
    1011         'user_torrent_download_limits_settings_explain' => '�� ��� ������� ���� ���� ������� ��������� ����������, 
    1012  
    1013         'user_torrent_download_allow_settings' => '�� ��� ��� ������ ����� ���', 
    1014         'user_torrent_download_allow_settings_explain' => '������������ ������ ����� �� ���', 
     1016        'user_torrent_download_limits_settings_explain' => '�� ��� ������� ���� ���� ������� ��������� ������������, ��� ��� ���������, ��� �� ����� ��� �����', 
     1017        'allow_download_torrents' => '�� �� ��� 
    10151018 
    10161019        'all_torrents' => '�����        'only_non_uploaders' => '�����������', 
    10171020        'no_one_torrents' => '������ 
    1018         'site_keywords' => '��������� meta ���)', 
    1019         'email_function_name' => '�� ��������mail)', 
    1020  
    1021         'setting_too_low'               => '������������%1$s� �� ��. ���� ���  %2$d.', 
    1022         'setting_too_big'               => '������������%1$s� �� ����������  %2$d.', 
    1023         'setting_too_long'              => '������������%1$s� �� ���������-  %2$d.', 
    1024         'setting_too_short'             => '������������%1$s� �� ��� ���� �� - %2$d.', 
    1025  
    1026         'wrong_data_lang' => '����� ��', 
    1027         'wrong_data_style' => '����� ��'wrong_data_class' => '����� �� 
    1028         'directory_doesnt_exists' => '���� �%1$s� ����, 
    1029         'directory_not_dir' => '���� �%1$s� ����� ����, 
    1030         'directory_not_writable' => '���� �%1$s� ��� � ��', 
    1031  
    1032         'imediatly_send' => '���� ��� 
    1033         'priority' => '���� 
    1034  
    1035         'min_class_allow_upload' => '���� ������, ����������    'default_type_moderated_torrents' => '�� ���������� 
    1036  
    10371021)); 
    10381022?> 
  • modtask.php

    r29 r85  
    224224elseif ( $action == 'new_comments' ) { 
    225225        $sql = 'SELECT COUNT(c.id) AS count FROM ' . COMMENTS_TABLE . ' c 
    226                         WHERE c.added > ' . $userdata['user_lastvisit'] . ' AND c.user <> ' . $userdata['uid'] . ' ORDER BY c.added DESC'; 
     226                LEFT JOIN ' . TORRENTS_TABLE . ' t ON c.torrent = t.fid 
     227                LEFT JOIN ' . REQUESTS_TABLE . ' r ON c.request = r.id 
     228                LEFT JOIN ' . OFFERS_TABLE . ' o ON c.offer = o.id, 
     229                ' . USERS_TABLE . ' u 
     230                WHERE c.added > ' . $userdata['user_lastvisit'] . ' AND c.user <> ' . $userdata['uid'] . ' AND c.user = u.uid ORDER BY c.added DESC'; 
    227231        $result = $db->sql_query($sql); 
    228232        $count = ( $row = $db->sql_fetchrow($result) ) ? $row['count'] : 0; 
  • recover.php

    r33 r85  
    99 
    1010if ( isset($_POST['submit']) ) { 
    11         $email = htmlspecialchars(trim($_POST['email'])); 
    12         if (!$email || !preg_match('/^[a-z0-9&\'\.\-_\+]+@[a-z0-9\-]+\.([a-z0-9\-]+\.)*?[a-z]+$/is', $email) ) { 
     11       $email = request_var('email', ''); 
     12     if (!$email || !preg_match('/^[a-z0-9&\'\.\-_\+]+@[a-z0-9\-]+\.([a-z0-9\-]+\.)*?[a-z]+$/is', $email) ) { 
    1313                trigger_error($lang['email_invalid']); 
    14         
    15         $sql = 'SELECT uid, pass, name FROM ' . USERS_TABLE . ' WHERE email=' . "'" . $db->sql_escape($email) . "'"; 
    16         $result = $db->sql_query_limit($sql, 1); 
    17         if ( !($row = $db->sql_fetchrow($result)) ) { 
    18                 trigger_error(sprintf($lang['email_adress_not_found'], $email)); 
    19         
    20         $sec = mksecret(); 
    21         $sql = 'UPDATE ' . USERS_TABLE . ' SET editsecret=' . "'" . $db->sql_escape($sec) . "'" . ' WHERE uid=' . $row['uid']; 
    22         $db->sql_query($sql); 
    23         $hash = md5($sec . $email . $row['pass'] . $sec); 
     14     
     15     $sql = 'SELECT uid, pass, name FROM ' . USERS_TABLE . ' WHERE email=' . "'" . $db->sql_escape($email) . "'"; 
     16     $result = $db->sql_query_limit($sql, 1); 
     17     if ( !($row = $db->sql_fetchrow($result)) ) { 
     18               trigger_error(sprintf($lang['email_adress_not_found'], $email)); 
     19     
     20     $sec = mksecret(); 
     21     $sql = 'UPDATE ' . USERS_TABLE . ' SET editsecret=' . "'" . $db->sql_escape($sec) . "'" . ' WHERE uid=' . $row['uid']; 
     22     $db->sql_query($sql); 
     23     $hash = md5($sec . $email . $row['pass'] . $sec); 
    2424 
    25         include_once($tracker_root_path . 'include/functions_messenger.php'); 
    26         $messenger = new messenger(false); 
    27         $messenger->template('recover_password_step_1', $config['default_lang']); 
    28         $messenger->replyto($email); 
    29         $messenger->to($email, $row['name']); 
     25     include_once($tracker_root_path . 'include/functions_messenger.php'); 
     26     $messenger = new messenger(false); 
     27     $messenger->template('recover_password_step_1', $config['default_lang']); 
     28     $messenger->replyto($email); 
     29     $messenger->to($email, $row['name']); 
    3030 
    31         $messenger->assign_vars(array( 
    32                 'EMAIL' => $email, 
    33                 'IP' => $_SERVER['REMOTE_ADDR']
    34                 'U_LINK' => generate_tracker_url() . '/recover.php?id=' . $row['uid'] . '&secret=' . $hash ) 
    35         ); 
    36         $messenger->send(NOTIFY_EMAIL); 
    37         $messenger->reset(); 
     31     $messenger->assign_vars(array( 
     32            'EMAIL' => $email, 
     33          'IP' => $user_ip
     34          'U_LINK' => generate_tracker_url() . '/recover.php?id=' . $row['uid'] . '&secret=' . $hash ) 
     35     ); 
     36     $messenger->send(NOTIFY_EMAIL); 
     37     $messenger->reset(); 
    3838 
    39         trigger_error(sprintf($lang['email_sended'], $email)); 
     39     trigger_error(sprintf($lang['email_sended'], $email)); 
    4040} 
    4141elseif(isset($_GET['id'])) { 
    42         $id = intval($_GET['id']); 
    43         $hash = htmlspecialchars(trim($_GET['secret'])); 
     42       $id = request_var('id', 0); 
     43       $hash = request_var('secret', ''); 
    4444 
    45         if (!$id) { 
    46                 trigger_error(sprintf($lang['invalid_id'], $id)); 
    47         } 
     45     $sql = 'SELECT name, email, pass, editsecret FROM ' . USERS_TABLE . ' WHERE uid = ' . $id . ' AND uid <> ' . ANONYMOUS; 
     46     $result = $db->sql_query($sql); 
     47     if ( !($row = $db->sql_fetchrow($result)) ) { 
     48             trigger_error(sprintf($lang['invalid_id'], $id)); 
     49     } 
    4850 
    49         $sql = 'SELECT name, email, pass, editsecret FROM ' . USERS_TABLE . ' WHERE uid = ' . $id; 
    50         $result = $db->sql_query($sql); 
    51         if ( !($row = $db->sql_fetchrow($result)) ) { 
    52                 trigger_error(sprintf($lang['invalid_id'], $id)); 
    53         } 
    54  
    55         $email = $row['email']; 
    56         if ( $hash != md5($row['editsecret'] . $email . $row['pass'] . $row['editsecret']) ) { 
    57                 trigger_error($lang['passwords_not_the_same']); 
    58         } 
     51     $email = $row['email']; 
     52     if ( $hash != md5($row['editsecret'] . $email . $row['pass'] . $row['editsecret']) ) { 
     53             trigger_error($lang['passwords_not_the_same']); 
     54     } 
    5955 
    6056        $newpassword = mksecret(10); 
  • signup.php

    r41 r85  
    251251 
    252252elseif ( isset($_GET['type']) || isset($_GET['secret']) ) { 
    253  
    254         $type = ( isset($_GET['type']) ? $_GET['type'] : '' ); 
    255      $email = ( isset($_GET['email']) ? $_GET['email'] : '' ); 
    256      $id = ( isset($_GET['id']) ? intval($_GET['id']) : 0 ); 
    257      $md5 = ( isset($_GET['secret']) ? htmlspecialchars(trim($_GET['secret'])) : 0 ); 
     253        $type = request_var('type', ''); 
     254        $email = request_var('email', ''); 
     255        $id = request_var('id', 0); 
     256        $md5 = request_var('secret', ''); 
    258257 
    259258        if ( $type == 'signup' && isset($email) ) { 
  • templates/admin/board_config_body.tpl

    r83 r85  
    11<script type="text/javascript"> 
    2 var c=<!-- IF AUTOWARN_INPUTS_COUNT -->{AUTOWARN_INPUTS_COUNT}<!-- ELSE -->0<!-- ENDIF -->
    3 var c_my_bonus=<!-- IF MY_BONUS_INPUTS_COUNT -->{MY_BONUS_INPUTS_COUNT}<!-- ELSE -->0<!-- ENDIF -->
     2var c={AUTOWARN_INPUTS_COUNT}
     3var c_my_bonus={MY_BONUS_INPUTS_COUNT}
    44function insert_auto_warn_input(act) { 
    55        if ( act == 'insert' ) { 
     
    4141} 
    4242</script> 
    43 <h1>{L_TITLE}</h1> 
     43<h1>{L_GENERAL_CONFIG}</h1> 
    4444 
    45 <p>{L_TITLE_EXPLAIN}</p> 
     45<p>{L_CONFIG_EXPLAIN}</p> 
    4646 
    47 <!-- IF S_ERROR --> 
    48 <table class="forumline" width="100%" cellspacing="1" cellpadding="4" border="0"> 
    49         <tr> 
    50                 <td><table width="100%" cellspacing="0" cellpadding="1" border="0"> 
    51                         <tr> 
    52                                 <td>&nbsp;</td> 
    53                         </tr> 
    54                         <tr> 
    55                                 <td align="center"><span class="gen">{ERROR_MSG}</span></td> 
    56                         </tr> 
    57                         <tr> 
    58                                 <td>&nbsp;</td> 
    59                         </tr> 
    60                 </table></td> 
    61         </tr> 
    62 </table> 
     47<form action="{S_CONFIG_ACTION}" method="post"><table width="99%" cellpadding="4" cellspacing="1" border="0" align="center" class="forumline"> 
     48        <tr> 
     49          <th class="thHead" colspan="2">{L_GENERAL_SETTINGS}</th> 
     50        </tr> 
     51        <tr> 
     52                <td class="row1">{L_SITE_NAME}</td> 
     53                <td class="row2"><input class="post" type="text" size="25" maxlength="100" name="sitename" value="{SITENAME}" /></td> 
     54        </tr> 
     55        <tr> 
     56                <td class="row1">{L_SITE_DESC}</td> 
     57                <td class="row2"><input class="post" type="text" size="40" maxlength="255" name="site_desc" value="{SITE_DESCRIPTION}" /></td> 
     58        </tr> 
     59        <tr> 
     60                <td class="row1">{L_SITE_CHARSET}</td> 
     61                <td class="row2"><input class="post" type="text" size="40" maxlength="255" name="default_language_charset" value="{SITE_CHARSET}" /></td> 
     62        </tr> 
     63        <tr> 
     64                <td class="row1">{L_TRACKER_DISABLE}<br /><span class="gensmall">{L_TRACKER_DISABLE_EXPLAIN}</span></td> 
     65                <td class="row2"><input type="radio" name="siteonline" value="0" {S_DISABLE_BOARD_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="siteonline" value="1" {S_DISABLE_BOARD_NO} /> {L_NO}</td> 
     66        </tr> 
     67        <tr> 
     68                <td class="row1">{L_MAX_TORRENT_SIZE}<br /><span class="gensmall">{L_MAX_TORRENT_SIZE_EXPLAIN}</span></td> 
     69                <td class="row2"><input class="post" type="text" size="40" maxlength="255" name="max_torrent_size" value="{MAX_TORRENT_SIZE}" /></td> 
     70        </tr> 
     71        <tr> 
     72                <td class="row1">{L_ANNOUNCE_INTERVAL}<br /><span class="gensmall">{L_ANNOUNCE_INTERVAL_EXPLAIN}</span></td> 
     73                <td class="row2"><input class="post" type="text" size="10" maxlength="10" name="announce_interval" value="{ANNOUNCE_INTERVAL}" /></td> 
     74        </tr> 
     75        <tr> 
     76                <td class="row1">{L_MIN_ANNOUNCE_INTERVAL}<br /><span class="gensmall">{L_MIN_ANNOUNCE_INTERVAL_EXPLAIN}</span></td> 
     77                <td class="row2"><input class="post" type="text" size="10" maxlength="10" name="min_announce_interval" value="{MIN_ANNOUNCE_INTERVAL}" /></td> 
     78        </tr> 
     79        <tr> 
     80                <td class="row1">{L_SIGNUP_TIMEOUT}<br /><span class="gensmall">{L_SIGNUP_TIMEOUT_EXPLAIN}</span></td> 
     81                <td class="row2"><input class="post" type="text" size="10" maxlength="10" name="signup_timeout" value="{SIGNUP_TIMEOUT}" /></td> 
     82        </tr> 
     83        <tr> 
     84                <td class="row1">{L_MINVOTES}<br /><span class="gensmall">{L_MINVOTES_EXPLAIN}</span></td> 
     85                <td class="row2"><input class="post" type="text" size="10" maxlength="10" name="minvotes" value="{MINVOTES}" /></td> 
     86        </tr> 
     87        <tr> 
     88                <td class="row1">{L_TTL}<br /><span class="gensmall">{L_TTL_EXPLAIN}</span></td> 
     89                <td class="row2"><input class="post" type="text" size="10" maxlength="10" name="ttl" value="{TTL}" /></td> 
     90        </tr> 
     91        <tr> 
     92                <td class="row1">{L_ALTERNATE_TTL}<br /><span class="gensmall">{L_ALTERNATE_TTL_EXPLAIN}</span></td> 
     93                <td class="row2"><input class="post" type="text" size="10" maxlength="10" name="alternate_ttl" value="{ALTERNATE_TTL}" /></td> 
     94        </tr> 
     95        <tr> 
     96                <td class="row1">{L_MAXUSERS}<br /><span class="gensmall">{L_MAXUSERS_EXPLAIN}</span></td> 
     97                <td class="row2"><input class="post" type="text" size="10" maxlength="10" name="maxusers" value="{MAXUSERS}" /></td> 
     98        </tr> 
     99        <tr> 
     100                <td class="row1">{L_TORRENT_DIR}<br /><span class="gensmall">{L_TORRENT_DIR_EXPLAIN}</span></td> 
     101                <td class="row2"><input class="post" type="text" size="40" maxlength="255" name="torrent_dir" value="{TORRENT_DIR}" /></td> 
     102        </tr> 
     103        <tr> 
     104                <td class="row1">{L_ALLOW_WAITTIME}<br /><span class="gensmall">{L_WAITTIME_EXPLAIN}</span></td> 
     105                <td class="row2"><input type="radio" name="waittime" value="1" {WAITTIME_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="waittime" value="0" {WAITTIME_NO} /> {L_NO}</td> 
     106        </tr> 
     107        <tr> 
     108                <td class="row1">{L_ENABLE_INVITE_SYSTEM}</td> 
     109                <td class="row2"><input type="radio" name="allow_invite" value="1" {ALLOW_INVITE_YES} onclick="document.getElementById('days_to_receive_invites').style.display='';document.getElementById('number_invites').style.display='';" /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_invite" value="0" {ALLOW_INVITE_NO} onclick="document.getElementById('days_to_receive_invites').style.display='none';document.getElementById('number_invites').style.display='none';" /> {L_NO}</td> 
     110        </tr> 
     111        <tr id="number_invites"{INVITES_TABLE_STYLE}> 
     112                <td class="row1">{L_NUMBER_INVITES}<br /><span class="gensmall">{S_NUMBER_INVITES_EXPLAIN}</span></td> 
     113                <td class="row2"><input class="post" type="text" size="30" maxlength="30" name="number_invites" value="{NUMBER_INVITES}" /></td> 
     114        </tr> 
     115        <tr id="days_to_receive_invites"{INVITES_TABLE_STYLE}> 
     116                <td class="row1">{L_DAYS_TO_RECEIVE_INVITES}<br /><span class="gensmall">{L_DAYS_TO_RECEIVE_INVITES_EXPLAIN}</span></td> 
     117                <td class="row2"><input class="post" type="text" size="10" maxlength="10" name="autoclean_interval_receive_invites" value="{INVITES_PERIOD}" /></td> 
     118        </tr> 
     119        <tr> 
     120                <td class="row1">{L_ENABLE_AUTOWARN_SYSTEM}<br /><span class="gensmall">{L_ENABLE_AUTOWARN_SYSTEM_EXPLAIN}</span></td> 
     121                <td class="row2"><input type="radio" name="allow_autowarn" value="1" {ENABLE_AUTOWARN_SYSTEM_YES} onclick="document.getElementById('autowarn_table').style.display='';document.getElementById('autowarn_min_added').style.display='';" /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_autowarn" value="0" {ENABLE_AUTOWARN_SYSTEM_NO} onclick="document.getElementById('autowarn_table').style.display='none;';document.getElementById('autowarn_min_added').style.display='none;';" /> {L_NO}</td> 
     122        </tr> 
     123         <tr id="autowarn_min_added"{AUTOWARN_TABLE_STYLE}> 
     124                <td class="row1">{L_AUTOWARN_MIN_ADDED}<br /><span class="gensmall">{L_AUTOWARN_MIN_ADDED_EXPLAIN}</span></td> 
     125                <td class="row2"><input type="text" size="3" maxlength="3" name="autowarn_min_added" value="{AUTOWARN_MIN_ADDED}" /></td> 
     126        </tr> 
     127        <tr id="autowarn_table"{AUTOWARN_TABLE_STYLE}> 
     128                <td class="row1" valign="top">{L_AUTOWARN_TABLE}<br /><span class="gensmall">{L_AUTOWARN_TABLE_EXPLAIN}</span></td> 
     129                <td class="row2" valign="top"><a href="javascript:void(0);" onclick="javascript:insert_auto_warn_input('insert');" title="{L_ADD_INPUTS}"><img src="../pic/plus.gif" alt="{L_ADD_INPUTS}" /></a>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="javascript:insert_auto_warn_input('delete');" title="{L_DELETE_INPUTS}" id="autowarn_href_delete"><img src="../pic/minus.gif" alt="{L_DELETE_INPUTS}" /></a><br />{AUTOWARN_TABLE_INPUTS}<div id="autowarn_table_inputs"></div></td> 
     130        </tr> 
     131         <tr> 
     132                <td class="row1">{L_ALLOW_CLONS}<br /><span class="gensmall">{L_ALLOW_CLONS_EXPLAIN}</span></td> 
     133                <td class="row2"><input type="radio" name="allow_clons" value="1" {ALLOW_CLONS_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_clons" value="0" {ALLOW_CLONS_NO} /> {L_NO}</td> 
     134        </tr> 
     135         <tr> 
     136                <td class="row1">{L_DEMOTE_UPLOADERS}<br /><span class="gensmall">{L_DEMOTE_UPLOADERS_EXPLAIN}</span></td> 
     137                <td class="row2"><input name="demote_uploader_days" size="3" maxlength="3" value="{DEMOTE_UPLOADERS_DAYS}" /></td> 
     138        </tr> 
     139        <tr> 
     140                <td class="row1">{L_ALLOW_MY_BONUS}<br /><span class="gensmall">{L_ALLOW_MY_BONUS_EXPLAIN}</span></td> 
     141                <td class="row2"><input type="radio" name="allow_my_bonus" value="1" {ALLOW_MY_BONUS_YES} onclick="document.getElementById('my_bonus_points').style.display=''; document.getElementById('my_bonus_table').style.display=''; document.getElementById('my_bonus_title').style.display='';" /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_my_bonus" value="0" {ALLOW_MY_BONUS_NO} onclick="document.getElementById('my_bonus_points').style.display='none'; document.getElementById('my_bonus_table').style.display='none'; document.getElementById('my_bonus_title').style.display='none';" /> {L_NO}</td> 
     142        </tr> 
     143         <tr id="my_bonus_points"{MY_BONUS_TABLE_STYLE}> 
     144                <td class="row1">{L_MY_BONUS_POINTS}<br /><span class="gensmall">{L_MY_BONUS_POINTS_EXPLAIN}</span></td> 
     145                <td class="row2"><input type="text" size="3" maxlength="3" name="my_bonus_points" value="{MY_BONUS_POINTS}" /></td> 
     146        </tr> 
     147        <tr id="my_bonus_table"{MY_BONUS_TABLE_STYLE}> 
     148                <td class="row1">{L_MY_BONUS_TABLE}<br /><span class="gensmall">{L_MY_BONUS_TABLE_EXPLAIN}</span></td> 
     149                <td class="row2" valign="top"><a href="javascript:void(0);" onclick="javascript:insert_my_bonus_input('insert');" title="{L_ADD_INPUTS}"><img src="../pic/plus.gif" alt="{L_ADD_INPUTS}" /></a>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="javascript:insert_my_bonus_input('delete');" title="{L_DELETE_INPUTS}" id="my_bonus_href_delete"><img src="../pic/minus.gif" alt="{L_DELETE_INPUTS}" /></a><br />{MY_BONUS_TABLE_INPUTS}<div id="my_bonus_table_inputs"></div></td> 
     150        </tr> 
     151        <tr id="my_bonus_title"{MY_BONUS_TABLE_STYLE}> 
     152                <td class="row1">{L_MY_BONUS_TITLE_LENGTH}<br /><span class="gensmall">{L_MY_BONUS_TITLE_LENGTH_EXPLAIN}</span></td> 
     153                <td class="row2"><input type="text" name="my_bonus_title_length" value="{MY_BONUS_TITLE_LENGTH}" size="4" maxlength="3" /></td> 
     154        </tr> 
     155        <tr> 
     156                <td class="row1">{L_UPLOADAPP_PROMOTE_TEXT}<br /><span class="gensmall">{L_UPLOADAPP_PROMOTE_TEXT_EXPLAIN}</span></td> 
     157                <td class="row2"><textarea name="uploadapp_promote_text" rows="6" cols="35" onkeypress="return imposeMaxLength(this, 255);" >{UPLOAPP_PROMOTE_TEXT}</textarea></td> 
     158        </tr> 
     159        <tr> 
     160                <td class="row1">{L_MIN_CLASS_ALLOW_UPLOAD}<br /><span class="gensmall">{L_MIN_CLASS_ALLOW_UPLOAD_EXPLAIN}</span></td> 
     161                <td class="row2">{S_MIN_CLASS_ALLOW_UPLOAD_SELECT}</td> 
     162           </tr> 
     163        <tr> 
     164                <td class="row1">{L_DEFAULT_TYPE_MODERATED_TORRENTS}<br /><span class="gensmall">{L_DEFAULT_TYPE_MODERATED_TORRENTS_EXPLAIN}</span></td> 
     165                <td class="row2">{S_DEFAULT_TYPE_MODERATED_TORRENTS_SELECT}</td> 
     166           </tr> 
     167        <tr> 
     168                <td class="row1">{L_VISUAL_CONFIRM}<br /><span class="gensmall">{L_VISUAL_CONFIRM_EXPLAIN}</span></td> 
     169                <td class="row2"><input type="radio" name="enable_confirm" value="1" {CONFIRM_ENABLE} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="enable_confirm" value="0" {CONFIRM_DISABLE} /> {L_NO}</td> 
     170        </tr> 
     171         <tr> 
     172                <td class="row1">{L_ALLOW_AUTOLOGIN}<br /><span class="gensmall">{L_ALLOW_AUTOLOGIN_EXPLAIN}</span></td> 
     173                <td class="row2"><input type="radio" name="allow_autologin" value="1" {ALLOW_AUTOLOGIN_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_autologin" value="0" {ALLOW_AUTOLOGIN_NO} /> {L_NO}</td> 
     174        </tr> 
     175        <tr> 
     176                <td class="row1">{L_AUTOLOGIN_TIME} <br /><span class="gensmall">{L_AUTOLOGIN_TIME_EXPLAIN}</span></td> 
     177                <td class="row2"><input class="post" type="text" size="3" maxlength="4" name="max_autologin_time" value="{AUTOLOGIN_TIME}" /></td> 
     178        </tr> 
     179        <tr> 
     180                <td class="row1">{L_BOARD_EMAIL_FORM}<br /><span class="gensmall">{L_BOARD_EMAIL_FORM_EXPLAIN}</span></td> 
     181                <td class="row2"><input type="radio" name="board_email_form" value="1" {BOARD_EMAIL_FORM_ENABLE} /> {L_ENABLED}&nbsp;&nbsp;<input type="radio" name="board_email_form" value="0" {BOARD_EMAIL_FORM_DISABLE} /> {L_DISABLED}</td> 
     182        </tr> 
     183        <tr> 
     184                <td class="row1">{L_FLOOD_INTERVAL} <br /><span class="gensmall">{L_FLOOD_INTERVAL_EXPLAIN}</span></td> 
     185                <td class="row2"><input class="post" type="text" size="3" maxlength="4" name="flood_interval" value="{FLOOD_INTERVAL}" /></td> 
     186                </tr> 
     187        <tr> 
     188                <td class="row1">{L_SEARCH_FLOOD_INTERVAL} <br /><span class="gensmall">{L_SEARCH_FLOOD_INTERVAL_EXPLAIN}</span></td> 
     189                <td class="row2"><input class="post" type="text" size="3" maxlength="4" name="search_flood_interval" value="{SEARCH_FLOOD_INTERVAL}" /></td> 
     190        </tr> 
     191        <tr> 
     192                <td class="row1">{L_MAX_LOGIN_ATTEMPTS}<br /><span class="gensmall">{L_MAX_LOGIN_ATTEMPTS_EXPLAIN}</span></td> 
     193                <td class="row2"><input class="post" type="text" size="3" maxlength="4" name="max_login_attempts" value="{MAX_LOGIN_ATTEMPTS}" /></td> 
     194        </tr> 
     195        <tr> 
     196                <td class="row1">{L_LOGIN_RESET_TIME}<br /><span class="gensmall">{L_LOGIN_RESET_TIME_EXPLAIN}</span></td> 
     197                <td class="row2"><input class="post" type="text" size="3" maxlength="4" name="login_reset_time" value="{LOGIN_RESET_TIME}" /></td> 
     198        </tr> 
     199        <tr> 
     200                <td class="row1">{L_TOPICS_PER_PAGE}</td> 
     201                <td class="row2"><input class="post" type="text" name="topics_per_page" size="3" maxlength="4" value="{TOPICS_PER_PAGE}" /></td> 
     202        </tr> 
     203        <tr> 
     204                <td class="row1">{L_POSTS_PER_PAGE}</td> 
     205                <td class="row2"><input class="post" type="text" name="posts_per_page" size="3" maxlength="4" value="{POSTS_PER_PAGE}" /></td> 
     206        </tr> 
     207        <tr> 
     208                <td class="row1">{L_HOT_THRESHOLD}</td> 
     209                <td class="row2"><input class="post" type="text" name="hot_threshold" size="3" maxlength="4" value="{HOT_TOPIC}" /></td> 
     210        </tr> 
     211        <tr> 
     212                <td class="row1">{L_DEFAULT_STYLE}</td> 
     213                <td class="row2">{STYLE_SELECT}</td> 
     214        </tr> 
     215        <tr> 
     216                <td class="row1">{L_OVERRIDE_STYLE}<br /><span class="gensmall">{L_OVERRIDE_STYLE_EXPLAIN}</span></td> 
     217                <td class="row2"><input type="radio" name="override_user_style" value="1" {OVERRIDE_STYLE_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="override_user_style" value="0" {OVERRIDE_STYLE_NO} /> {L_NO}</td> 
     218        </tr> 
     219        <tr> 
     220                <td class="row1">{L_DEFAULT_LANGUAGE}</td> 
     221                <td class="row2">{LANG_SELECT}</td> 
     222        </tr> 
     223        <tr> 
     224                <td class="row1">{L_DATE_FORMAT}<br /><span class="gensmall">{L_DATE_FORMAT_EXPLAIN}</span></td> 
     225                <td class="row2"><input class="post" type="text" name="default_dateformat" value="{DEFAULT_DATEFORMAT}" /></td> 
     226        </tr> 
     227        <tr> 
     228                <td class="row1">{L_SYSTEM_TIMEZONE}</td> 
     229                <td class="row2">{TIMEZONE_SELECT}</td> 
     230        </tr> 
     231        <!-- [start] DST //--> 
     232        <tr> 
     233                <td class="row1">{L_DST}</td> 
     234                <td class="row2"><input type="radio" name="board_dst" value="1" {DST_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="board_dst" value="0" {DST_NO} /> {L_NO}</td> 
     235        </tr> 
     236        <!-- [end] DST //--> 
     237                <tr> 
     238                <td class="row1">{L_ONLINE_TIME} <br /><span class="gensmall">{L_ONLINE_TIME_EXPLAIN}</span></td> 
     239                <td class="row2"><input class="post" type="text" size="3" maxlength="4" name="online_time" value="{ONLINE_TIME}" /></td> 
     240        </tr> 
     241        <tr> 
     242                <td class="row1">{L_ENABLE_GZIP}</td> 
     243                <td class="row2"><input type="radio" name="gzip_compress" value="1" {GZIP_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="gzip_compress" value="0" {GZIP_NO} /> {L_NO}</td> 
     244        </tr> 
     245        <tr> 
     246                <td class="row1">{L_ENABLE_PRUNE}</td> 
     247                <td class="row2"><input type="radio" name="prune_enable" value="1" {PRUNE_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="prune_enable" value="0" {PRUNE_NO} /> {L_NO}</td> 
     248        </tr> 
     249        <tr> 
     250                <td class="row1">{L_MERGE_TIME_LIMIT}<br /><span class="gensmall">{L_MERGE_TIME_LIMIT_EXPLAIN}</span></td> 
     251                <td class="row2"><input class="post" type="text" size="5" maxlength="8" name="time_to_merge" value="{TIME_TO_MERGE}" /></td> 
     252        </tr> 
     253        <tr> 
     254                <td class="row1">{L_MERGE_FLOOD_INTERVAL}<br /><span class="gensmall">{L_MERGE_FLOOD_INTERVAL_EXPLAIN}</span></td> 
     255                <td class="row2"><input class="post" type="text" size="5" maxlength="8" name="merge_flood_interval" value="{MERGE_FLOOD_INTERVAL}" /></td> 
     256        </tr> 
     257        <tr> 
     258          <th class="thHead" colspan="2">{L_PROMOTION_DEMOTION_SETTINGS}</th> 
     259        </tr> 
     260        <tr> 
     261                <td class="row1">{L_PROMOTE_TO_POWER_MEGS_LIMIT}<br /><span class="gensmall">{L_PROMOTE_TO_POWER_MEGS_LIMIT_EXPLAIN}</span></td> 
     262                <td class="row2"><input class="post" type="text" size="10" maxlength="10" name="promote_to_power_megs_limit" value="{PROMOTE_TO_POWER_MEGS_LIMIT}" /></td> 
     263        </tr> 
     264        <tr> 
     265                <td class="row1">{L_PROMOTE_TO_POWER_MIN_RATIO}<br /><span class="gensmall">{L_PROMOTE_TO_POWER_MIN_RATIO_EXPLAIN}</span></td> 
     266                <td class="row2"><input class="post" type="text" size="10" maxlength="10" name="promote_to_power_min_ratio" value="{PROMOTE_TO_POWER_MIN_RATIO}" /></td> 
     267        </tr> 
     268        <tr> 
     269                <td class="row1">{L_PROMOTE_TO_POWER_REG_DATE_AGO}<br /><span class="gensmall">{L_PROMOTE_TO_POWER_REG_DATE_AGO_EXPLAIN}</span></td> 
     270                <td class="row2"><input class="post" type="text" size="10" maxlength="10" name="promote_to_power_reg_date_ago" value="{PROMOTE_TO_POWER_REG_DATE_AGO}" /></td> 
     271        </tr> 
     272        <tr> 
     273                <td class="row1">{L_PROMOTE_TO_POWER_DEMOTE_RATIO}<br /><span class="gensmall">{L_PROMOTE_TO_POWER_DEMOTE_RATIO_EXPLAIN}</span></td> 
     274                <td class="row2"><input class="post" type="text" size="10" maxlength="10" name="promote_to_power_demote_ratio" value="{PROMOTE_TO_POWER_DEMOTE_RATIO}" /></td> 
     275        </tr> 
     276        <tr> 
     277          <th class="thHead" colspan="2">{L_DELETE_INACTIVE_USERS_SETTINGS}</th> 
     278        </tr> 
     279        <tr> 
     280                <td class="row1">{L_INACTIVE_USERS_DEL_DAYS}<br /><span class="gensmall">{L_INACTIVE_USERS_DEL_DAYS_EXPLAIN}</span></td> 
     281                <td class="row2"><input class="post" type="text" size="10" maxlength="10" name="inactive_users_del_days" value="{INACTIVE_USERS_DEL_DAYS}" /></td> 
     282        </tr> 
     283        <tr> 
     284                <td class="row1">{L_INACTIVE_USERS_PARKED_DEL_DAYS}<br /><span class="gensmall">{L_INACTIVE_USERS_PARKED_DEL_DAYS_EXPLAIN}</span></td> 
     285                <td class="row2"><input class="post" type="text" size="10" maxlength="10" name="inactive_users_parked_del_days" value="{INACTIVE_USERS_PARKED_DEL_DAYS}" /></td> 
     286        </tr> 
     287        <tr> 
     288                <td class="row1">{L_INACTIVE_USERS_DEL_MIN_CLASS}<br /><span class="gensmall">{L_INACTIVE_USERS_DEL_MIN_CLASS_EXPLAIN}</span></td> 
     289                <td class="row2">{INACTIVE_USERS_DEL_MIN_CLASS_SELECT}</td> 
     290        </tr> 
     291        <tr> 
     292          <th class="thHead" colspan="2">{L_AUTOCLEAN_SETTINGS}</th> 
     293        </tr> 
     294     <tr> 
     295             <td class="row2" colspan="2"><span class="gensmall">{L_AUTOCLEAN_SETTINGS_EXPLAIN}</span></td> 
     296     </tr> 
     297     <!-- BEGIN autoclean_settings_row --> 
     298        <tr> 
     299                <td class="row1">{autoclean_settings_row.LANG}<br /><span class="gensmall">{autoclean_settings_row.LANG_EXPLAIN}</span></td> 
     300                <td class="row2"><input type="text" id="{autoclean_settings_row.SETTING_NAME}" name="{autoclean_settings_row.SETTING_NAME}" value="{autoclean_settings_row.SETTING_VALUE}" maxlength="10" size="6" /></td> 
     301        </tr> 
     302     <!-- END autoclean_settings_row --> 
     303        <tr> 
     304          <th class="thHead" colspan="2">{L_SERVER_URL_SETTINGS}</th> 
     305        </tr> 
     306        <tr> 
     307                <td class="row1">{L_FORCE_SERVER_VARS}<br /><span class="gensmall">{L_FORCE_SERVER_VARS_EXPLAIN}</span></td> 
     308                <td class="row2"><input type="radio" id="force_server_vars" name="force_server_vars" value="1"{FORCE_SERVER_VARS_YES} /> {L_YES} <input type="radio" name="force_server_vars" value="0"{FORCE_SERVER_VARS_NO} /> {L_NO}</td> 
     309        </tr> 
     310        <tr> 
     311                <td class="row1">{L_SERVER_PROTOCOL}<br /><span class="gensmall">{L_SERVER_PROTOCOL_EXPLAIN}</span></td> 
     312                <td class="row2"><input class="post" type="text" size="10" maxlength="10" name="server_protocol" value="{SERVER_PROTOCOL}" /></td> 
     313        </tr> 
     314     <tr> 
     315          <td class="row1">{L_SERVER_NAME}<br /><span class="gensmall">{L_SERVER_NAME_EXPLAIN}</span></td> 
     316          <td class="row2"><input class="post" type="text" maxlength="255" size="40" name="server_name" value="{SERVER_NAME}" /></td> 
     317     </tr> 
     318     <tr> 
     319          <td class="row1">{L_SERVER_PORT}<br /><span class="gensmall">{L_SERVER_PORT_EXPLAIN}</span></td> 
     320          <td class="row2"><input class="post" type="text" maxlength="5" size="5" name="server_port" value="{SERVER_PORT}" /></td> 
     321     </tr> 
     322     <tr> 
     323          <td class="row1">{L_PATH_TO_TRACKER}<br /><span class="gensmall">{L_PATH_TO_TRACKER_EXPLAIN}</span></td> 
     324          <td class="row2"><input class="post" type="text" maxlength="255" name="script_path" value="{SCRIPT_PATH}" /></td> 
     325     </tr> 
     326     <tr> 
     327             <th class="thHead" colspan="2">{L_USER_TORRENT_SEED_DOWNLOAD_LIMITS_SETTINGS}</th> 
     328        </tr> 
     329        <tr> 
     330                <td class="row2" colspan="2"><span class="gensmall">{L_USER_TORRENT_SEED_LIMITS_SETTINGS_EXPLAIN}</span></td> 
     331        </tr> 
     332             <tr> 
     333                     <td class="row1">{L_MAX_SEED_TORRENTS_LIMIT}</td> 
     334                     <td class="row2"><input name="max_torrent_allow_seed" type="text" value="{SEED_TORRENTS_LIMIT_VALUE}" size="10" maxlength="10" /></td> 
     335                </tr> 
     336        <tr> 
     337                <td class="row2" colspan="2"><span class="gensmall">{L_USER_TORRENT_DOWNLOAD_LIMITS_SETTINGS_EXPLAIN}</span></td> 
     338        </tr> 
     339             <tr> 
     340                     <td class="row1">{L_DONOR}</td> 
     341                     <td class="row2"><input name="user_limit_ary_torrents[D]" type="text" value="{USER_LIMITS_VALUE_DONOR}" size="10" maxlength="10" /></td> 
     342                </tr> 
     343             <tr> 
     344                     <td class="row1">{L_WARNED}</td> 
     345                     <td class="row2"><input name="user_limit_ary_torrents[W]" type="text" value="{USER_LIMITS_VALUE_WARNED}" size="10" maxlength="10" /> 
     346                        <input type="checkbox" name="user_limit_ary_allow_download[W]" value="1"{USER_LIMITS_CHECKED_WARNED} /></td> 
     347                </tr> 
     348             <!-- BEGIN user_limits_row --> 
     349             <tr> 
     350                     <td class="row1">{user_limits_row.CLASS_NAME}</td> 
     351                     <td class="row2"><input name="user_limit_ary_torrents[{user_limits_row.CLASS_ID}]" type="text" value="{user_limits_row.CLASS_INPUT_VALUE}" size="10" maxlength="10" /> 
     352                        <span title="{L_ALLOW_DOWNLOAD_TORRENTS}"><input type="checkbox" name="user_limit_ary_allow_download[{user_limits_row.CLASS_ID}]" value="1"{user_limits_row.CHECKED} /></span></td> 
     353                </tr> 
     354             <!-- END user_limits_row --> 
     355        <tr> 
     356          <th class="thHead" colspan="2">{L_AVATAR_SETTINGS}</th> 
     357        </tr> 
     358        <tr> 
     359                <td class="row1">{L_ALLOW_REMOTE} <br /><span class="gensmall">{L_ALLOW_REMOTE_EXPLAIN}</span></td> 
     360                <td class="row2"><input type="radio" name="allow_avatar_remote" value="1" {AVATARS_REMOTE_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_avatar_remote" value="0" {AVATARS_REMOTE_NO} /> {L_NO}</td> 
     361        </tr> 
     362        <tr> 
     363                <td class="row1">{L_ALLOW_UPLOAD}</td> 
     364                <td class="row2"><input type="radio" name="allow_avatar_upload" value="1" {AVATARS_UPLOAD_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_avatar_upload" value="0" {AVATARS_UPLOAD_NO} /> {L_NO}</td> 
     365        </tr> 
     366        <tr> 
     367                <td class="row1">{L_MAX_FILESIZE}<br /></td> 
     368                <td class="row2"><input class="post" type="text" size="10" maxlength="10" name="avatar_filesize" value="{AVATAR_FILESIZE}" /> {L_BYTES}</td> 
     369        </tr> 
     370        <tr> 
     371                <td class="row1">{L_MAX_AVATAR_SIZE} <br /> 
     372                        <span class="gensmall">{L_MAX_AVATAR_SIZE_EXPLAIN}</span> 
     373                </td> 
     374                <td class="row2"><input class="post" type="text" size="3" maxlength="4" name="avatar_max_height" value="{AVATAR_MAX_HEIGHT}" /> x <input class="post" type="text" size="3" maxlength="4" name="avatar_max_width" value="{AVATAR_MAX_WIDTH}" /></td> 
     375        </tr> 
     376        <tr> 
     377                <td class="row1">{L_AVATAR_STORAGE_PATH} <br /><span class="gensmall">{L_AVATAR_STORAGE_PATH_EXPLAIN}</span></td> 
     378                <td class="row2"><input class="post" type="text" size="20" maxlength="255" name="avatar_path" value="{AVATAR_PATH}" /></td> 
     379        </tr> 
     380        <tr> 
     381                <th class="thHead" colspan="2">{L_COOKIE_SETTINGS}</th> 
     382        </tr> 
     383        <tr> 
     384                <td class="row2" colspan="2"><span class="gensmall">{L_COOKIE_SETTINGS_EXPLAIN}</span></td> 
     385        </tr> 
     386        <tr> 
     387                <td class="row1">{L_COOKIE_DOMAIN}</td> 
     388                <td class="row2"><input class="post" type="text" maxlength="255" name="cookie_domain" value="{COOKIE_DOMAIN}" /></td> 
     389        </tr> 
     390        <tr> 
     391                <td class="row1">{L_COOKIE_NAME}</td> 
     392                <td class="row2"><input class="post" type="text" maxlength="16" name="cookie_name" value="{COOKIE_NAME}" /></td> 
     393        </tr> 
     394        <tr> 
     395                <td class="row1">{L_COOKIE_PATH}</td> 
     396                <td class="row2"><input class="post" type="text" maxlength="255" name="cookie_path" value="{COOKIE_PATH}" /></td> 
     397        </tr> 
     398        <tr> 
     399                <td class="row1">{L_COOKIE_SECURE}<br /><span class="gensmall">{L_COOKIE_SECURE_EXPLAIN}</span></td> 
     400                <td class="row2"><input type="radio" name="cookie_secure" value="0" {S_COOKIE_SECURE_DISABLED} />{L_DISABLED}&nbsp; &nbsp;<input type="radio" name="cookie_secure" value="1" {S_COOKIE_SECURE_ENABLED} />{L_ENABLED}</td> 
     401        </tr> 
     402        <tr> 
     403                <td class="row1">{L_SESSION_LENGTH}</td> 
     404                <td class="row2"><input class="post" type="text" maxlength="5" size="5" name="session_length" value="{SESSION_LENGTH}" /></td> 
     405        </tr> 
     406        <tr> 
     407                <th class="thHead" colspan="2">{L_DISABLE_PRIVMSG}</th> 
     408        </tr> 
     409        <tr> 
     410                <td class="row1">{L_DISABLE_PRIVMSG}</td> 
     411                <td class="row2"><input type="radio" name="privmsg_disable" value="0" {S_PRIVMSG_ENABLED} />{L_ENABLED}&nbsp; &nbsp;<input type="radio" name="privmsg_disable" value="1" {S_PRIVMSG_DISABLED} />{L_DISABLED}</td> 
     412        </tr> 
     413        <tr> 
     414                <td class="row1">{L_INBOX_LIMITS}</td> 
     415                <td class="row2"><input class="post" type="text" maxlength="4" size="4" name="max_inbox_privmsgs" value="{INBOX_LIMIT}" /></td> 
     416        </tr> 
     417        <tr> 
     418                <td class="row1">{L_SENTBOX_LIMITS}</td> 
     419                <td class="row2"><input class="post" type="text" maxlength="4" size="4" name="max_sentbox_privmsgs" value="{SENTBOX_LIMIT}" /></td> 
     420        </tr> 
    63421 
    64 <!-- ENDIF --> 
    65  
    66 <form id="acp_board" method="post" action="{U_ACTION}"> 
    67  
    68 <table width="95%" cellpadding="4" cellspacing="1" border="0" align="center" class="forumline"> 
    69 <!-- BEGIN options --> 
    70         <!-- IF options.S_LEGEND --> 
    71                 <!-- IF not options.S_FIRST_ROW --> 
    72                         </table> 
    73                         <table width="99%" cellpadding="4" cellspacing="1" border="0" align="center" class="forumline"> 
    74                 <!-- ENDIF --> 
    75                         <caption>{options.LEGEND}</caption> 
    76  
    77                         <!-- IF options.LEGEND_EXPLAIN --> 
    78                         <tr> 
    79                                 <td class="row2" colspan="2"><span class="gensmall">{options.LEGEND_EXPLAIN}</span></td> 
    80                      </tr> 
    81                      <!-- ENDIF --> 
    82         <!-- ELSE --> 
    83  
    84                 <tr> 
    85                         <td class="row1" width="60%"><label for="{options.KEY}">{options.TITLE}:</label><!-- IF options.S_EXPLAIN --><br /><span class="gensmall">{options.TITLE_EXPLAIN}</span><!-- ENDIF --></td> 
    86                         <td class="row2" width="40%">{options.CONTENT}</td> 
    87                 </tr> 
    88  
    89         <!-- ENDIF --> 
    90 <!-- END options --> 
    91         <tr> 
    92         <td class="catBottom" colspan="2" align="center"> 
    93                 <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp; 
    94                 <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" /> 
    95         </td> 
    96         </tr> 
    97 </table> 
    98 </form> 
     422        <tr> 
     423          <th class="thHead" colspan="2">{L_ABILITIES_SETTINGS}</th> 
     424        </tr> 
     425        <tr> 
     426                <td class="row1">{L_MAX_POLL_OPTIONS}</td> 
     427                <td class="row2"><input class="post" type="text" name="max_poll_options" size="4" maxlength="4" value="{MAX_POLL_OPTIONS}" /></td> 
     428        </tr> 
     429        <tr> 
     430                <td class="row1">{L_ALLOW_HTML}</td> 
     431                <td class="row2"><input type="radio" name="allow_html" value="1" {HTML_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_html" value="0" {HTML_NO} /> {L_NO}</td> 
     432        </tr> 
     433        <tr> 
     434                <td class="row1">{L_ALLOWED_TAGS}<br /><span class="gensmall">{L_ALLOWED_TAGS_EXPLAIN}</span></td> 
     435                <td class="row2"><input class="post" type="text" size="30" maxlength="255" name="allow_html_tags" value="{HTML_TAGS}" /></td> 
     436        </tr> 
     437        <tr> 
     438                <td class="row1">{L_ALLOW_BBCODE}</td> 
     439                <td class="row2"><input type="radio" name="allow_bbcode" value="1" {BBCODE_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_bbcode" value="0" {BBCODE_NO} /> {L_NO}</td> 
     440        </tr> 
     441        <tr> 
     442                <td class="row1">{L_ALLOW_SMILIES}</td> 
     443                <td class="row2"><input type="radio" name="allow_smilies" value="1" {SMILE_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_smilies" value="0" {SMILE_NO} /> {L_NO}</td> 
     444        </tr> 
     445        <tr> 
     446                <td class="row1">{L_SMILIES_PATH} <br /><span class="gensmall">{L_SMILIES_PATH_EXPLAIN}</span></td> 
     447                <td class="row2"><input class="post" type="text" size="20" maxlength="255" name="smilies_path" value="{SMILIES_PATH}" /></td> 
     448        </tr> 
     449        <tr> 
     450                <td class="row1">{L_ALLOW_SIG}</td> 
     451                <td class="row2"><input type="radio" name="allow_sig" value="1" {SIG_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_sig" value="0" {SIG_NO} /> {L_NO}&nbsp;&nbsp;<input type="radio" name="allow_sig" value="2" {SIG_NO_IMAGES} /> {L_ALLOW_SIG_NO_IMAGES}</td> 
     452        </tr> 
     453        <tr> 
     454                <td class="row1">{L_MAX_SIG_LENGTH}<br /><span class="gensmall">{L_MAX_SIG_LENGTH_EXPLAIN}</span></td> 
     455                <td class="row2"><input class="post" type="text" size="5" maxlength="4" name="max_sig_chars" value="{SIG_SIZE}" /></td> 
     456        </tr> 
     457        <tr> 
     458                <td class="row1">{L_ALLOW_NAME_CHANGE}</td> 
     459                <td class="row2"><input type="radio" name="allow_namechange" value="1" {NAMECHANGE_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_namechange" value="0" {NAMECHANGE_NO} /> {L_NO}</td> 
     460        </tr> 
     461        <tr> 
     462          <th class="thHead" colspan="2">{L_EMAIL_SETTINGS}</th> 
     463        </tr> 
     464        <tr> 
     465                <td class="row1">{L_EMAIL_ENABLE}<br /><span class="gensmall">{L_EMAIL_ENABLE_EXPLAIN}</span></td> 
     466                <td class="row2"><input type="radio" name="email_enable" value="1" {EMAIL_ENABLE_YES} /> {L_YES} <input type="radio" name="email_enable" value="0" {EMAIL_ENABLE_NO} /> {L_NO}</td> 
     467        </tr> 
     468        <tr> 
     469                <td class="row1">{L_ADMIN_EMAIL}</td> 
     470                <td class="row2"><input class="post" type="text" size="25" maxlength="100" name="sitemail" value="{EMAIL_FROM}" /></td> 
     471        </tr> 
     472        <tr> 
     473                <td class="row1">{L_EMAIL_SIG}<br /><span class="gensmall">{L_EMAIL_SIG_EXPLAIN}</span></td> 
     474                <td class="row2"><textarea name="board_email_sig" rows="5" cols="30">{EMAIL_SIG}</textarea></td> 
     475        </tr> 
     476        <tr> 
     477                <td class="row1">{L_EMAIL_PACKAGE_SIZE}<br /><span class="gensmall">{L_EMAIL_PACKAGE_SIZE_EXPLAIN}</span></td> 
     478                <td class="row2"><input type="text" name="email_package_size" value="{EMAIL_PACKAGE_SIZE}" size="4" maxlength="10" /></td> 
     479        </tr> 
     480        <tr> 
     481                <td class="row1">{L_USE_SMTP}<br /><span class="gensmall">{L_USE_SMTP_EXPLAIN}</span></td> 
     482                <td class="row2"><input type="radio" name="smtp_delivery" value="1" {SMTP_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="smtp_delivery" value="0" {SMTP_NO} /> {L_NO}</td> 
     483        </tr> 
     484        <tr> 
     485                <td class="row1">{L_SMTP_SERVER}</td> 
     486                <td class="row2"><input class="post" type="text" name="smtp_host" value="{SMTP_HOST}" size="25" maxlength="50" /></td> 
     487        </tr> 
     488        <tr> 
     489                <td class="row1">{L_SMTP_PORT}</td> 
     490                <td class="row2"><input class="post" type="text" name="smtp_port" value="{SMTP_PORT}" size="25" maxlength="5" /></td> 
     491        </tr> 
     492        <tr> 
     493                <td class="row1">{L_SMTP_USERNAME}<br /><span class="gensmall">{L_SMTP_USERNAME_EXPLAIN}</span></td> 
     494                <td class="row2"><input class="post" type="text" name="smtp_username" value="{SMTP_USERNAME}" size="25" maxlength="255" /></td> 
     495        </tr> 
     496        <tr> 
     497                <td class="row1">{L_SMTP_PASSWORD}<br /><span class="gensmall">{L_SMTP_PASSWORD_EXPLAIN}</span></td> 
     498                <td class="row2"><input class="post" type="password" name="smtp_password" value="{SMTP_PASSWORD}" size="25" maxlength="255" /></td> 
     499        </tr> 
     500        <tr> 
     501                <td class="catBottom" colspan="2" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{L_SUBMIT}" class="mainoption" />&nbsp;&nbsp;<input type="reset" value="{L_RESET}" class="liteoption" /> 
     502                </td> 
     503        </tr> 
     504</table></form> 
    99505 
    100506<br clear="all" /> 
  • templates/admin/index_navigate.tpl

    r83 r85  
    88    <li class="header">{catrow.ADMIN_CATEGORY}</li> 
    99    <!-- BEGIN modulerow --> 
    10     <li><a href="{catrow.modulerow.U_ADMIN_MODULE}" target="main" class="genmed"<!-- IF ACTIVE --> style="background-color:#FFFFFF;"<!-- ENDIF -->><span>{catrow.modulerow.ADMIN_MODULE}</span></a></li> 
     10    <li><a href="{catrow.modulerow.U_ADMIN_MODULE}" target="main" class="genmed"><span>{catrow.modulerow.ADMIN_MODULE}</span></a></li> 
    1111    <!-- END modulerow --> 
    1212    <!-- END catrow --> 
  • templates/main/forum/index_body.tpl

    r83 r85  
    6262  </tr> 
    6363  <tr> 
    64  <td class="row1" align="center" valign="middle" rowspan="2"><img src="{TEMPLATE_PATH}/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td> 
     64 <td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/main/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td> 
    6565 <td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />{TOTAL_USERS}</span> 
    6666 </td> 
     
    8383<table cellspacing="3" border="0" align="center" cellpadding="0"> 
    8484  <tr> 
    85         <td width="20" align="center"><img src="{TEMPLATE_PATH}/images/folder_new_big.gif" alt="{L_NEW_POSTS}"/></td> 
     85        <td width="20" align="center"><img src="templates/main/images/folder_new_big.gif" alt="{L_NEW_POSTS}"/></td> 
    8686        <td><span class="gensmall">{L_NEW_POSTS}</span></td> 
    8787        <td>&nbsp;&nbsp;</td> 
    88         <td width="20" align="center"><img src="{TEMPLATE_PATH}/images/folder_big.gif" alt="{L_NO_NEW_POSTS}" /></td> 
     88        <td width="20" align="center"><img src="templates/main/images/folder_big.gif" alt="{L_NO_NEW_POSTS}" /></td> 
    8989        <td><span class="gensmall">{L_NO_NEW_POSTS}</span></td> 
    9090        <td>&nbsp;&nbsp;</td> 
    91         <td width="20" align="center"><img src="{TEMPLATE_PATH}/images/folder_locked_big.gif" alt="{L_FORUM_IS_LOCKED}" /></td> 
     91        <td width="20" align="center"><img src="templates/main/images/folder_locked_big.gif" alt="{L_FORUM_IS_LOCKED}" /></td> 
    9292        <td><span class="gensmall">{L_FORUM_IS_LOCKED}</span></td> 
    9393  </tr> 
  • templates/main/forum/modcp_delete_posts.tpl

    r83 r85  
    3131                <table width="100%" cellspacing="0" cellpadding="3" border="0"> 
    3232                  <tr> 
    33                         <td valign="middle" class="{postrow.ROW_CLASS}" align="left"><img src="{TEMPLATE_PATH}/images/icon_minipost.gif" alt="{L_POST}"><span class="postdetails">{L_POSTED}: 
     33                        <td valign="middle" class="{postrow.ROW_CLASS}" align="left"><img src="templates/main/images/icon_minipost.gif" alt="{L_POST}"><span class="postdetails">{L_POSTED}: 
    3434                          {postrow.POST_DATE}&nbsp;&nbsp;&nbsp;&nbsp;{L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td> 
    3535                  </tr> 
     
    4444        </tr> 
    4545        <tr> 
    46           <td colspan="3" height="1" class="row3"><img src="{TEMPLATE_PATH}/images/spacer.gif" width="1" height="1" alt="."></td> 
     46          <td colspan="3" height="1" class="row3"><img src="templates/main/images/spacer.gif" width="1" height="1" alt="."></td> 
    4747        </tr> 
    4848        <!-- END postrow --> 
  • templates/main/forum/modcp_split.tpl

    r83 r85  
    5252                <table width="100%" cellspacing="0" cellpadding="3" border="0"> 
    5353                  <tr> 
    54                         <td valign="middle" class="{postrow.ROW_CLASS}" align="left"><img src="{TEMPLATE_PATH}/images/icon_minipost.gif" alt="{L_POST}"><span class="postdetails">{L_POSTED}: 
     54                        <td valign="middle" class="{postrow.ROW_CLASS}" align="left"><img src="templates/main/images/icon_minipost.gif" alt="{L_POST}"><span class="postdetails">{L_POSTED}: 
    5555                          {postrow.POST_DATE}&nbsp;&nbsp;&nbsp;&nbsp;{L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td> 
    5656                  </tr> 
     
    6565        </tr> 
    6666        <tr> 
    67           <td colspan="3" height="1" class="row3"><img src="{TEMPLATE_PATH}/images/spacer.gif" width="1" height="1" alt="."></td> 
     67          <td colspan="3" height="1" class="row3"><img src="templates/main/images/spacer.gif" width="1" height="1" alt="."></td> 
    6868        </tr> 
    6969        <!-- END postrow --> 
  • templates/main/forum/posting_preview.tpl

    r83 r85  
    44        </tr> 
    55        <tr>  
    6                 <td class="row1" align="left"><img src="{TEMPLATE_PATH}/images/icon_minipost.gif" alt="{L_POST}" /><span class="postdetails">{L_POSTED}: {POST_DATE} &nbsp;&nbsp;&nbsp; {L_POST_SUBJECT}: {POST_SUBJECT}</span></td> 
     6                <td class="row1" align="left"><img src="templates/main/images/icon_minipost.gif" alt="{L_POST}" /><span class="postdetails">{L_POSTED}: {POST_DATE} &nbsp;&nbsp;&nbsp; {L_POST_SUBJECT}: {POST_SUBJECT}</span></td> 
    77        </tr> 
    88        <tr>  
     
    1616        </tr> 
    1717        <tr>  
    18                 <td class="spaceRow" height="1"><img src="{TEMPLATE_PATH}/images/spacer.gif" width="1" height="1" /></td> 
     18                <td class="spaceRow" height="1"><img src="templates/main/images/spacer.gif" width="1" height="1" /></td> 
    1919        </tr> 
    2020</table> 
  • templates/main/forum/posting_topic_review.tpl

    r83 r85  
    3030        </tr> 
    3131        <tr> 
    32                 <td colspan="2" height="1" class="spaceRow"><img src="{TEMPLATE_PATH}/images/spacer.gif" alt="" width="1" height="1" /></td> 
     32                <td colspan="2" height="1" class="spaceRow"><img src="templates/main/images/spacer.gif" alt="" width="1" height="1" /></td> 
    3333        </tr> 
    3434         <!-- END postrow --> 
  • templates/main/forum/search_results_posts.tpl

    r83 r85  
    2020  <!-- BEGIN searchresults --> 
    2121  <tr> 
    22         <td class="catHead" colspan="2" height="28" align="left"><span class="topictitle"><img src="{TEMPLATE_PATH}/images/folder.gif" align="absmiddle">&nbsp; {L_TOPIC}:&nbsp;<a href="{searchresults.U_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a></span></td> 
     22        <td class="catHead" colspan="2" height="28" align="left"><span class="topictitle"><img src="templates/main/images/folder.gif" align="absmiddle">&nbsp; {L_TOPIC}:&nbsp;<a href="{searchresults.U_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a></span></td> 
    2323  </tr> 
    2424  <tr> 
  • templates/main/forum/simple_header.tpl

    r83 r85  
    44<meta http-equiv="Content-Style-Type" content="text/css" /> 
    55<meta http-equiv="imagetoolbar" content="no" /> 
    6 <link href="{TRACKER_URL}/{TEMPLATE_PATH}/main.css" rel="stylesheet" type="text/css" media="screen" /> 
     6<link href="{TRACKER_URL}/templates/main/main.css" rel="stylesheet" type="text/css" media="screen" /> 
    77</head> 
    88<body bgcolor="#E5E5E5" text="#000000" link="#006699" vlink="#5493B4"> 
  • templates/main/forum/viewonline_body.tpl

    r83 r85  
    2323  <!-- END reg_user_row --> 
    2424  <tr> 
    25         <td colspan="3" height="1" class="row3"><img src="{TEMPLATE_PATH}/images/spacer.gif" width="1" height="1" alt="."></td> 
     25        <td colspan="3" height="1" class="row3"><img src="templates/main/images/spacer.gif" width="1" height="1" alt="."></td> 
    2626  </tr> 
    2727  <tr> 
  • templates/main/forum/viewtopic_body.tpl

    r83 r85  
    9393        </tr> 
    9494        <tr> 
    95                 <td class="spaceRow" colspan="2" height="1"><img src="{TEMPLATE_PATH}/images/spacer.gif" alt="" width="1" height="1" /></td> 
     95                <td class="spaceRow" colspan="2" height="1"><img src="templates/main/images/spacer.gif" alt="" width="1" height="1" /></td> 
    9696        </tr> 
    9797        <!-- END postrow --> 
     
    102102                <td class="catBottom" colspan="2" height="28"><table cellspacing="0" cellpadding="0" border="0"> 
    103103                        <tr> 
    104                                 <td align="center" style="background-image: url({TEMPLATE_PATH}/images/cellpic1.gif); height: 20px; border:none;"> 
     104                                <td align="center" style="background-image: url(templates/main/images/cellpic1.gif); height: 20px; border:none;"> 
    105105                                <form method="post" action="{S_POST_DAYS_ACTION}"><span class="gensmall">{L_DISPLAY_POSTS}: {S_SELECT_POST_DAYS}&nbsp;{S_SELECT_POST_ORDER}&nbsp;</span><input type="submit" value="{L_GO}" class="liteoption" name="submit" /> 
    106106                                                        </form> 
  • templates/main/forum/viewtopic_poll_result.tpl

    r83 r85  
    1414                                <table cellspacing="0" cellpadding="0" align="left"> 
    1515                                  <tr>  
    16                                         <td><img src="{TEMPLATE_PATH}/images/vote_lcap.gif" width="4" alt="" height="12" /></td> 
     16                                        <td><img src="templates/main/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> 
    18                                         <td><img src="{TEMPLATE_PATH}/images/vote_rcap.gif" width="4" alt="" height="12" /></td> 
     18                                        <td><img src="templates/main/images/vote_rcap.gif" width="4" alt="" height="12" /></td> 
    1919                                  </tr> 
    2020                                </table> 
  • templates/main/message_viewmailbox.html

    r83 r85  
    4444      <tr> 
    4545        <td colspan="2" align="left"> 
    46           <img src="{TEMPLATE_PATH}/images/pn_inboxnew.gif" alt="{L_NEW_UNREAD_PM}" title="{L_NEW_UNREAD_PM}" /> {L_NEW_UNREAD_PM}<br /> 
    47           <img src="{TEMPLATE_PATH}/images/pn_inbox.gif" alt="{L_OLD_READ_PM}" title="{L_OLD_READ_PM}" /> {L_OLD_READ_PM} 
     46          <img src="templates/main/images/pn_inboxnew.gif" alt="{L_NEW_UNREAD_PM}" title="{L_NEW_UNREAD_PM}" /> {L_NEW_UNREAD_PM}<br /> 
     47          <img src="templates/main/images/pn_inbox.gif" alt="{L_OLD_READ_PM}" title="{L_OLD_READ_PM}" /> {L_OLD_READ_PM} 
    4848        </td> 
    4949        <td colspan="3" align="right"><input type="hidden" name="action" value="moveordel" /><input type="hidden" name="box" value="{MAILBOX}" /> 
  • templates/main/overall_header.html

    r83 r85  
    1010<meta http-equiv="imagetoolbar" content="no" /> 
    1111<title>{PAGE_TITLE}</title> 
    12 <link href="{TRACKER_URL}/{TEMPLATE_PATH}/main.css" rel="stylesheet" type="text/css" media="screen" /> 
     12<link href="{TRACKER_URL}/templates/main/main.css" rel="stylesheet" type="text/css" media="screen" /> 
    1313<script type="text/javascript" src="{TRACKER_URL}/js/functions.js"></script> 
    1414<script type="text/javascript"> 
  • templates/main/simple_header.html

    r83 r85  
    66<meta http-equiv="Content-Type" content="text/html; charset={L_LANGUAGE_CHARSET}" /> 
    77<title>{TITLE}</title> 
    8 <link href="{TEMPLATE_PATH}/main.css" rel="stylesheet" type="text/css" media="screen" /> 
     8<link href="templates/main/main.css" rel="stylesheet" type="text/css" media="screen" /> 
    99</head> 
    1010<body> 
  • templates/reflection/forum/index_body.tpl

    r83 r85  
    6262  </tr> 
    6363  <tr> 
    64         <td class="row1" align="center" valign="middle" rowspan="2"><img src="{TEMPLATE_PATH}/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td> 
     64        <td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/reflection/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td> 
    6565        <td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />{TOTAL_USERS}<br />{NEWEST_USER}</span> 
    6666        </td> 
     
    8383<table cellspacing="3" border="0" align="center" cellpadding="0"> 
    8484  <tr> 
    85         <td width="20" align="center"><img src="{TEMPLATE_PATH}/images/folder_new.gif" alt="{L_NEW_POSTS}"/></td> 
     85        <td width="20" align="center"><img src="templates/reflection/images/folder_new.gif" alt="{L_NEW_POSTS}"/></td> 
    8686        <td><span class="gensmall">{L_NEW_POSTS}</span></td> 
    8787        <td>&nbsp;&nbsp;</td> 
    88         <td width="20" align="center"><img src="{TEMPLATE_PATH}/images/folder.gif" alt="{L_NO_NEW_POSTS}" /></td> 
     88        <td width="20" align="center"><img src="templates/reflection/images/folder.gif" alt="{L_NO_NEW_POSTS}" /></td> 
    8989        <td><span class="gensmall">{L_NO_NEW_POSTS}</span></td> 
    9090        <td>&nbsp;&nbsp;</td> 
    91         <td width="20" align="center"><img src="{TEMPLATE_PATH}/images/folder_lock.gif" alt="{L_FORUM_LOCKED}" /></td> 
     91        <td width="20" align="center"><img src="templates/reflection/images/folder_lock.gif" alt="{L_FORUM_LOCKED}" /></td> 
    9292        <td><span class="gensmall">{L_FORUM_IS_LOCKED}</span></td> 
    9393  </tr> 
  • templates/reflection/forum/modcp_delete_posts.tpl

    r83 r85  
    3131                <table width="100%" cellspacing="0" cellpadding="3" border="0"> 
    3232                  <tr> 
    33                         <td valign="middle" class="{postrow.ROW_CLASS}" align="left"><img src="{TEMPLATE_PATH}/images/icon_minipost.gif" alt="{L_POST}"><span class="postdetails">{L_POSTED}: 
     33                        <td valign="middle" class="{postrow.ROW_CLASS}" align="left"><img src="templates/reflection/images/icon_minipost.gif" alt="{L_POST}"><span class="postdetails">{L_POSTED}: 
    3434                          {postrow.POST_DATE}&nbsp;&nbsp;&nbsp;&nbsp;{L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td> 
    3535                  </tr> 
     
    4444        </tr> 
    4545        <tr> 
    46           <td colspan="3" height="1" class="row3"><img src="{TEMPLATE_PATH}/images/spacer.gif" width="1" height="1" alt="."></td> 
     46          <td colspan="3" height="1" class="row3"><img src="templates/reflection/images/spacer.gif" width="1" height="1" alt="."></td> 
    4747        </tr> 
    4848        <!-- END postrow --> 
  • templates/reflection/forum/modcp_split.tpl

    r83 r85  
    5252                <table width="100%" cellspacing="0" cellpadding="3" border="0"> 
    5353                  <tr>  
    54                         <td valign="middle"><img src="{TEMPLATE_PATH}/images/icon_minipost.gif" alt="{L_POST}"><span class="postdetails">{L_POSTED}:  
     54                        <td valign="middle"><img src="templates/reflection/images/icon_minipost.gif" alt="{L_POST}"><span class="postdetails">{L_POSTED}:  
    5555                          {postrow.POST_DATE}&nbsp;&nbsp;&nbsp;&nbsp;{L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td> 
    5656                  </tr> 
     
    6565        </tr> 
    6666        <tr>  
    67           <td colspan="3" height="1" class="row3"><img src="{TEMPLATE_PATH}/images/spacer.gif" width="1" height="1" alt="."></td> 
     67          <td colspan="3" height="1" class="row3"><img src="templates/reflection/images/spacer.gif" width="1" height="1" alt="."></td> 
    6868        </tr> 
    6969        <!-- END postrow --> 
  • templates/reflection/forum/posting_preview.tpl

    r83 r85  
    55        </tr> 
    66        <tr>  
    7                 <td class="row1"><img src="{TEMPLATE_PATH}/images/icon_minipost.gif" alt="{L_POST}" /><span class="postdetails">{L_POSTED}: {POST_DATE} &nbsp;&nbsp;&nbsp; {L_POST_SUBJECT}: {POST_SUBJECT}</span></td> 
     7                <td class="row1"><img src="templates/reflection/images/icon_minipost.gif" alt="{L_POST}" /><span class="postdetails">{L_POSTED}: {POST_DATE} &nbsp;&nbsp;&nbsp; {L_POST_SUBJECT}: {POST_SUBJECT}</span></td> 
    88        </tr> 
    99        <tr>  
     
    1717        </tr> 
    1818        <tr>  
    19                 <td class="spaceRow" height="1"><img src="{TEMPLATE_PATH}/images/spacer.gif" width="1" height="1" /></td> 
     19                <td class="spaceRow" height="1"><img src="templates/reflection/images/spacer.gif" width="1" height="1" /></td> 
    2020        </tr> 
    2121</table> 
  • templates/reflection/forum/posting_topic_review.tpl

    r83 r85  
    3030        </tr> 
    3131        <tr> 
    32                 <td colspan="2" height="1" class="spaceRow"><img src="{TEMPLATE_PATH}/images/spacer.gif" alt="" width="1" height="1" /></td> 
     32                <td colspan="2" height="1" class="spaceRow"><img src="templates/reflection/images/spacer.gif" alt="" width="1" height="1" /></td> 
    3333        </tr> 
    3434         <!-- END postrow --> 
  • templates/reflection/forum/search_results_posts.tpl

    r83 r85  
    2020  <!-- BEGIN searchresults --> 
    2121  <tr>  
    22         <td class="catHead" colspan="2" height="28"><span class="topictitle"><img src="{TEMPLATE_PATH}/images/folder.gif" align="absmiddle">&nbsp; {L_TOPIC}:&nbsp;<a href="{searchresults.U_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a></span></td> 
     22        <td class="catHead" colspan="2" height="28"><span class="topictitle"><img src="templates/reflection/images/folder.gif" align="absmiddle">&nbsp; {L_TOPIC}:&nbsp;<a href="{searchresults.U_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a></span></td> 
    2323  </tr> 
    2424  <tr>  
  • templates/reflection/forum/simple_header.tpl

    r83 r85  
    44<meta http-equiv="Content-Style-Type" content="text/css" /> 
    55<meta http-equiv="imagetoolbar" content="no" /> 
    6 <link href="{TRACKER_URL}/{TEMPLATE_PATH}/main.css" rel="stylesheet" type="text/css" media="screen" /> 
     6<link href="{TRACKER_URL}/templates/reflection/main.css" rel="stylesheet" type="text/css" media="screen" /> 
    77</head> 
    88<body bgcolor="#E5E5E5" text="#000000" link="#006699" vlink="#5493B4"> 
  • templates/reflection/forum/viewtopic_body.tpl

    r83 r85  
    9898        </tr> 
    9999        <tr> 
    100                 <td class="spaceRow" colspan="2" height="1"><img src="{TEMPLATE_PATH}/images/spacer.gif" alt="" width="1" height="1" /></td> 
     100                <td class="spaceRow" colspan="2" height="1"><img src="templates/reflection/images/spacer.gif" alt="" width="1" height="1" /></td> 
    101101        </tr> 
    102102        <!-- END postrow --> 
  • templates/reflection/forum/viewtopic_poll_result.tpl

    r83 r85  
    1515                                <table cellspacing="0" cellpadding="0" border="0"> 
    1616                                  <tr>  
    17                                         <td><img src="{TEMPLATE_PATH}/images/vote_lcap.gif" width="4" alt="" height="12" /></td> 
     17                                        <td><img src="templates/reflection/images/vote_lcap.gif" width="4" alt="" height="12" /></td> 
    1818                                        <td><img src="{poll_option.POLL_OPTION_IMG}" width="{poll_option.POLL_OPTION_IMG_WIDTH}" height="12" alt="{poll_option.POLL_OPTION_PERCENT}" /></td> 
    19                                         <td><img src="{TEMPLATE_PATH}/images/vote_rcap.gif" width="4" alt="" height="12" /></td> 
     19                                        <td><img src="templates/reflection/images/vote_rcap.gif" width="4" alt="" height="12" /></td> 
    2020                                  </tr> 
    2121                                </table> 
  • templates/reflection/message_viewmailbox.html

    r83 r85  
    4444        <div class="tableRow"> 
    4545                <div class="leftCellHeader" style="width:40%"> 
    46           <img src="{TEMPLATE_PATH}/images/pn_inboxnew.gif" alt="{L_NEW_UNREAD_PM}" title="{L_NEW_UNREAD_PM}" /> {L_NEW_UNREAD_PM}<br /> 
    47           <img src="{TEMPLATE_PATH}/images/pn_inbox.gif" alt="{L_OLD_READ_PM}" title="{L_OLD_READ_PM}" /> {L_OLD_READ_PM} 
     46          <img src="templates/reflection/images/pn_inboxnew.gif" alt="{L_NEW_UNREAD_PM}" title="{L_NEW_UNREAD_PM}" /> {L_NEW_UNREAD_PM}<br /> 
     47          <img src="templates/reflection/images/pn_inbox.gif" alt="{L_OLD_READ_PM}" title="{L_OLD_READ_PM}" /> {L_OLD_READ_PM} 
    4848          </div> 
    4949                <div class="rightCellHeader" style="width:60%"><input type="hidden" name="action" value="moveordel" /><input type="hidden" name="box" value="{MAILBOX}" /> 
  • templates/reflection/overall_footer.html

    r83 r85  
    22                        </div> 
    33                        <!-- Creates bottom left rounded corner --> 
    4                         <img src="{TRACKER_URL}/{TEMPLATE_PATH}/images/corner_sub_bl.gif" alt="bottom corner" class="vBottom"/> 
     4                        <img src="{TRACKER_URL}/templates/reflection/images/corner_sub_bl.gif" alt="bottom corner" class="vBottom"/> 
    55                </div> 
    66        </div> 
  • templates/reflection/overall_header.html

    r83 r85  
    2424  <title>{PAGE_TITLE}</title> 
    2525 
    26   <link rel="stylesheet" type="text/css" href="{TRACKER_URL}/{TEMPLATE_PATH}/reflection.css" media="screen, tv, projection" /> 
     26  <link rel="stylesheet" type="text/css" href="{TRACKER_URL}/templates/reflection/reflection.css" media="screen, tv, projection" /> 
    2727 
    2828<script type="text/javascript" src="{TRACKER_URL}/js/functions.js"></script> 
     
    4646 
    4747                <!-- top rounded corner --> 
    48                 <img src="{TRACKER_URL}/{TEMPLATE_PATH}/images/corner_tl.gif" alt="" style="float:left;" /> 
     48                <img src="{TRACKER_URL}/templates/reflection/images/corner_tl.gif" alt="" style="float:left;" /> 
    4949 
    5050                <!-- Site title and subTitle --> 
     
    195195 
    196196                                <!-- Creates the rounded corner on the bottom of the left menu --> 
    197                                 <div class="bottomCorner"><img src="{TRACKER_URL}/{TEMPLATE_PATH}/images/corner_sub_br.gif" alt="bottom corner" class="vBottom"/></div> 
     197                                <div class="bottomCorner"><img src="{TRACKER_URL}/templates/reflection/images/corner_sub_br.gif" alt="bottom corner" class="vBottom"/></div> 
    198198                        </div> 
    199199                </div> 
  • templates/reflection/simple_header.html

    r83 r85  
    2525  <title>{PAGE_TITLE}</title> 
    2626 
    27   <link rel="stylesheet" type="text/css" href="{TRACKER_URL}/{TEMPLATE_PATH}/reflection.css" media="screen, tv, projection" /> 
     27  <link rel="stylesheet" type="text/css" href="{TRACKER_URL}/templates/reflection/reflection.css" media="screen, tv, projection" /> 
    2828 
    2929</head>