Changeset 280
- Timestamp:
- 11/30/09 11:03:09 (2 years ago)
- Files:
-
- admin/admin_categories.php (modified) (1 diff)
- announce.php (modified) (14 diffs)
- bookmarks.php (modified) (1 diff)
- browse.php (modified) (7 diffs)
- cheaters.php (modified) (1 diff)
- comment.php (modified) (3 diffs)
- db_updater.php (modified) (1 diff)
- details.php (modified) (8 diffs)
- faq.php (modified) (3 diffs)
- helpdesk.php (modified) (1 diff)
- include/bbcode/bbcode.lib.php (modified) (4 diffs)
- include/bbcode/config/parser.config.php (modified) (2 diffs)
- include/constants.php (modified) (1 diff)
- include/db/dbal.php (modified) (2 diffs)
- include/details/edit.php (modified) (5 diffs)
- include/details/viewnfo.php (modified) (1 diff)
- include/functions.php (modified) (11 diffs)
- include/functions_messenger.php (modified) (12 diffs)
- include/functions_post.php (modified) (6 diffs)
- include/functions_torrenttable.php (modified) (5 diffs)
- include/functions_utf.php (modified) (1 diff)
- include/modtask/edituser.php (modified) (1 diff)
- include/modtask/mass_torrent_actions.php (modified) (2 diffs)
- include/modtask/tags.php (modified) (2 diffs)
- include/sessions.php (modified) (3 diffs)
- include/ucp/checkcomm.php (modified) (1 diff)
- index.php (modified) (3 diffs)
- js/ajax_common.js (modified) (1 diff)
- languages/lang_english/lang_js.php (modified) (1 diff)
- languages/lang_english/lang_main.php (modified) (5 diffs)
- languages/lang_english/lang_modcomment_log.php (modified) (1 diff)
- languages/lang_russian/lang_faq.php (modified) (2 diffs)
- languages/lang_russian/lang_js.php (modified) (1 diff)
- languages/lang_russian/lang_main.php (modified) (5 diffs)
- languages/lang_russian/lang_modcomment_log.php (modified) (1 diff)
- log.php (modified) (2 diffs)
- offers.php (modified) (2 diffs)
- phpBB2/groupcp.php (modified) (5 diffs)
- phpBB2/includes/functions_post.php (modified) (2 diffs)
- phpBB2/index.php (modified) (4 diffs)
- phpBB2/modcp.php (modified) (6 diffs)
- phpBB2/posting.php (modified) (1 diff)
- phpBB2/search.php (modified) (1 diff)
- phpBB2/viewforum.php (modified) (10 diffs)
- phpBB2/viewtopic.php (modified) (5 diffs)
- reports.php (modified) (2 diffs)
- requests.php (modified) (2 diffs)
- rss.php (modified) (2 diffs)
- simpaty.php (modified) (1 diff)
- sql.sql (modified) (6 diffs)
- templates/bithdtv/bithdtv.cfg (modified) (1 diff)
- templates/bithdtv/details.html (modified) (1 diff)
- templates/bithdtv/details_edit.html (modified) (1 diff)
- templates/bithdtv/images/freedownload.gif (deleted)
- templates/bithdtv/overall_header.html (modified) (1 diff)
- templates/bithdtv/simple_header.html (modified) (1 diff)
- templates/bithdtv/torrents_table.html (modified) (1 diff)
- templates/bithdtv/userdetails.html (modified) (1 diff)
- templates/bithdtv/userdetails_completed_torrents.html (modified) (1 diff)
- templates/bithdtv/userdetails_helped_torrents.html (modified) (1 diff)
- templates/bithdtv/userdetails_seeding_leeching_torrents.html (modified) (1 diff)
- templates/bithdtv/userdetails_uploaded_torrents.html (modified) (1 diff)
- templates/bithdtv/useredit_panel.html (added)
- templates/main/details.html (modified) (1 diff)
- templates/main/details_edit.html (modified) (1 diff)
- templates/main/faq.html (modified) (1 diff)
- templates/main/images/freedownload.gif (deleted)
- templates/main/main.cfg (modified) (1 diff)
- templates/main/overall_header.html (modified) (1 diff)
- templates/main/simple_header.html (modified) (1 diff)
- templates/main/torrents_table.html (modified) (1 diff)
- templates/main/userdetails.html (modified) (1 diff)
- templates/main/userdetails_completed_torrents.html (modified) (1 diff)
- templates/main/userdetails_helped_torrents.html (modified) (1 diff)
- templates/main/userdetails_seeding_leeching_torrents.html (modified) (1 diff)
- templates/main/userdetails_uploaded_torrents.html (modified) (1 diff)
- templates/main/useredit_panel.html (added)
- templates/reflection/details.html (modified) (1 diff)
- templates/reflection/details_edit.html (modified) (1 diff)
- templates/reflection/images/freedownload.gif (deleted)
- templates/reflection/overall_header.html (modified) (1 diff)
- templates/reflection/reflection.cfg (modified) (1 diff)
- templates/reflection/simple_header.html (modified) (1 diff)
- templates/reflection/torrents_table.html (modified) (1 diff)
- templates/reflection/userdetails.html (modified) (1 diff)
- templates/reflection/userdetails_completed_torrents.html (modified) (1 diff)
- templates/reflection/userdetails_helped_torrents.html (modified) (1 diff)
- templates/reflection/userdetails_seeding_leeching_torrents.html (modified) (1 diff)
- templates/reflection/userdetails_uploaded_torrents.html (modified) (1 diff)
- templates/reflection/useredit_panel.html (added)
- topten.php (modified) (2 diffs)
- upload.php (modified) (2 diffs)
- userdetails.php (modified) (16 diffs)
- usersearch.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
admin/admin_categories.php
r269 r280 515 515 $hidden_fields = '<input type="hidden" name="action" value="delete" /><input type="hidden" name="id" value="' . $cat_id . '" />'; 516 516 517 $cat_select = '<select name="category" id="category">'; 518 519 $sql = 'SELECT * FROM ' . CATEGORIES_TABLE . ' WHERE id <> ' . $cat_id . ' AND cat_parent_id = 0 ORDER BY name'; 520 $result = $db->sql_query($sql); 521 522 while( $row = $db->sql_fetchrow($result) ){ 523 $parent_cat_id = ( $row['cat_parent_id'] ? $row['cat_parent_id'] : $row['id'] ); 524 $_cats[$parent_cat_id][$row['id']] = $row['name']; 525 } 526 527 foreach ( $_cats AS $_cat_id => $_ary ) { 528 $main_option = '<option value="%d">%s</option>' . "\n"; 529 $main_cat_name = reset($_ary); 530 unset($_ary[$_cat_id]); 531 if ( $count = sizeof($_ary) ) { 532 $cat_select .= sprintf($main_option, $_cat_id, $main_cat_name); 533 $value = ''; 534 foreach( $_ary AS $_key => $_value ) { 535 $cat_select .= '<option value="' . $_key . '"> --> ' . $_value . '</option>' . "\n"; 536 } 537 } 538 else { 539 $cat_select .= sprintf($main_option, $_cat_id, $main_cat_name); 540 } 541 } 542 $cat_select .= '</select>'; 517 $cat_select = categories_select('-', 'category', true, true); 543 518 544 519 $cat_parent_name = ( isset($cats[$cats[$cat_id]['cat_parent']]['cat_name']) ? $cats[$cats[$cat_id]['cat_parent']]['cat_name'] . ' -> ' : '' ); announce.php
r274 r280 10 10 11 11 $updateset = $events_ary = array(); 12 $current_time = time(); 13 $completedat = 0; 12 14 13 15 //start receive and check main data from peer … … 160 162 $peer_ip = pack('C*', $peer_ip[0], $peer_ip[1], $peer_ip[2], $peer_ip[3]); 161 163 $peer_port = pack('n*', intval($row['port'])); 162 $time = intval(( time()% 7680) / 60);164 $time = intval(($current_time % 7680) / 60); 163 165 if( !$left ) { 164 166 $time += 128; … … 189 191 if ( !isset($self) ) { 190 192 $sql = 'SELECT ' . $fields . ' FROM ' . PEERS_TABLE . ' WHERE ' . $selfwhere; 191 if( ! ($result = $db->sql_query($sql)) ) {193 if( !$result = $db->sql_query($sql) ) { 192 194 err('peer select error'); 193 195 } … … 199 201 200 202 if ( in_array('completed', $events_ary) ) { 201 $sql = 'UPDATE ' . SNATCHED_TABLE . ' SET completedat = ' . time() . ' WHERE torrentid = ' . $torrentdata['fid'] . ' AND userid = ' . $userdata['uid']; 202 if( !($db->sql_query($sql)) ) { 203 err('Snatched compl error'); 204 } 203 $completedat = $current_time; 205 204 $updateset[] = 'completed = completed + 1'; 206 205 } … … 244 243 if ( $config['waittime'] && $left && $userdata['class'] < UC_VIP ) { 245 244 $gigs = $userdata['uploaded'] / (1024*1024*1024); 246 $elapsed = floor(( time()- $torrentdata['ctime']) / 3600);245 $elapsed = floor(($current_time - $torrentdata['ctime']) / 3600); 247 246 $ratio = (($userdata['downloaded'] > 0) ? ($userdata['uploaded'] / $userdata['downloaded']) : 1); 248 247 if ($ratio < 0.5 || $gigs < 5) { … … 279 278 //end can leech check 280 279 281 //start connect to port to know connectable user or not282 $connectable = 0;283 if ( $sockres = @fsockopen($user_ip, $port, $errno, $errstr, 5) ) {284 $connectable = 1;285 @fclose($sockres);286 }287 //end connect to port to know connectable user or not288 289 280 //start insert data into peers table 290 281 $sql = 'INSERT INTO ' . PEERS_TABLE . ' ' . $db->sql_build_array('INSERT', array( 291 'connectable' => $connectable,292 282 'fid' => $torrentdata['fid'], 293 283 'peer_id' => $peer_id, … … 297 287 'downloaded' => $downloaded, 298 288 '`left`' => $left, 299 'started' => time(),300 'mtime' => time(),289 'started' => $current_time, 290 'mtime' => $current_time, 301 291 'uid' => $userdata['uid'], 302 292 'useragent' => $agent )); … … 322 312 323 313 $sql = 'INSERT INTO ' . SNATCHED_TABLE . ' ' . $db->sql_build_array('INSERT', array( 324 'torrentid' => $torrentdata['fid'], 325 'userid' => $userdata['uid'], 326 'uploaded' => $uploaded, 327 'downloaded' => $downloaded, 328 'port' => $port, 329 'last_action' => time(), 330 'connectable' => $connectable)) . 314 'torrentid' => $torrentdata['fid'], 315 'userid' => $userdata['uid'], 316 'uploaded' => $uploaded, 317 'downloaded' => $downloaded, 318 'port' => $port, 319 'last_action' => $current_time, 320 'completedat' => $completedat, 321 )) . 331 322 ' ON DUPLICATE KEY UPDATE 332 323 last_action = VALUES(last_action), 333 324 port = VALUES(port), 334 connectable = VALUES(connectable),335 325 uploaded = uploaded + VALUES(uploaded), 336 downloaded = downloaded + VALUES(downloaded)'; 326 downloaded = downloaded + VALUES(downloaded), 327 completedat = if(values(completedat) = 0, completedat, ' . $current_time . ')'; 337 328 if ( !$db->sql_query($sql) ) { 338 329 $error = $db->sql_error(); … … 345 336 //start user already in peers table, it's first connect. let's update data 346 337 else { 347 $upthis = max(0, $uploaded - $self['uploaded']); 348 $downthis = max(0, $downloaded - $self['downloaded']); 349 350 if ( ($upthis > 0 || $downthis > 0 ) && $userdata['class'] != UC_VIP) { 351 $sql = 'UPDATE' . $sql_priority . ' ' . USERS_TABLE . ' SET uploaded = uploaded + ' . $upthis . ( !$torrentdata['free'] ?' , downloaded = downloaded + ' . $downthis : ''). ' WHERE uid = ' . $userdata['uid']; 352 if( !($db->sql_query($sql)) ) { 338 $user_uploaded = $upthis = max(0, $uploaded - $self['uploaded']); 339 $user_downloaded = $downthis = max(0, $downloaded - $self['downloaded']); 340 $current_total_time = 0; 341 if ( $torrentdata['free'] ) { 342 switch ( $torrentdata['free'] ) { 343 case 1: 344 $user_downloaded = 0; 345 break; 346 case 2: 347 $user_downloaded = round($user_downloaded * 0.50); 348 break; 349 case 4: 350 $user_downloaded = round($user_downloaded * 0.75); 351 break; 352 } 353 } 354 355 if ( $userdata['class'] == UC_VIP ) { 356 $user_uploaded = 0; 357 $user_downloaded = 0; 358 } 359 360 if ( !$left && $self['mtime'] < $current_time ) { 361 $sql = 'SELECT COUNT(*) AS count FROM ' . PEERS_TABLE . ' WHERE `left` = 0 AND uid = ' . $userdata['uid']; 362 $result = $db->sql_query($sql); 363 $count = ( $row = $db->sql_fetchrow($result) ) ? $row['count'] : 0; 364 if ( $count ) { 365 $current_total_time = round( ( ( $current_time - $self['mtime'] ) / $count ) ); 366 } 367 } 368 369 if ( $user_uploaded > 0 || $user_downloaded > 0 || $current_total_time > 0 ) { 370 $sql = 'UPDATE' . $sql_priority . ' ' . USERS_TABLE . ' SET 371 uploaded = uploaded + ' . $user_uploaded . ', 372 downloaded = downloaded + ' . $user_downloaded . ', 373 total_seed_time = total_seed_time + ' . $current_total_time . ' 374 WHERE uid = ' . $userdata['uid']; 375 if( !$db->sql_query($sql) ) { 353 376 err('Up/Down Stats Error'); 354 377 } 355 378 // Initial sanity check xMB/s for 1 second 356 if( $upthis > 2097152 && $self['mtime'] < time()) {379 if( $upthis > 2097152 && $self['mtime'] < $current_time ) { 357 380 //Work out time difference 358 $endtime = time();381 $endtime = $current_time; 359 382 $starttime = $self['mtime']; 360 383 $diff = ($endtime - $starttime); … … 365 388 if ($userdata['class'] < UC_MODERATOR) { 366 389 $sql = 'INSERT INTO ' . CHEATERS_TABLE . ' ' . $db->sql_build_array('INSERT', array( 367 'added' => time(),390 'added' => $current_time, 368 391 'userid' => $userdata['uid'], 369 392 'rate' => $rate, … … 383 406 } 384 407 385 $upd_sql = ( $upthis ? 'uploaded = uploaded + ' . $upthis . ',' : '' );408 $upd_sql = ( $upthis ? 'uploaded = uploaded + ' . $upthis . ',' : '' ); 386 409 $upd_sql .= ( $downthis ? 'downloaded = downloaded + ' . $downthis . ',' : '' ); 387 410 $upd_sql .= ( $port <> $self['port'] ? 'port = ' . $port . ',' : '' ); 388 $sql = 'UPDATE' . $sql_priority . ' ' . SNATCHED_TABLE . ' SET ' . $upd_sql . ' last_action = ' . time() . ' WHERE torrentid = ' . $torrentdata['fid'] . ' AND userid = ' . $userdata['uid']; 389 390 if( !($db->sql_query($sql)) ) { 411 $upd_sql .= ( $completedat ? 'completedat = ' . $completedat . ',' : '' ); 412 $sql = 'UPDATE' . $sql_priority . ' ' . SNATCHED_TABLE . ' SET ' . $upd_sql . ' last_action = ' . $current_time . ' WHERE torrentid = ' . $torrentdata['fid'] . ' AND userid = ' . $userdata['uid']; 413 414 if( !$db->sql_query($sql) ) { 391 415 err('Update snatched error'); 392 }393 394 if ( !$left && $self['mtime'] < time() ) {395 $sql = 'SELECT COUNT(*) AS count FROM ' . PEERS_TABLE . ' WHERE `left` = 0 AND uid = ' . $userdata['uid'];396 $result = $db->sql_query($sql);397 $count = ( $row = $db->sql_fetchrow($result) ) ? intval($row['count']) : 0;398 $db->sql_freeresult($result);399 if ( $count ) {400 $current_total_time = round( ( ( time() - $self['mtime'] ) / $count ) );401 $sql = 'UPDATE ' . USERS_TABLE . ' SET total_seed_time = total_seed_time + ' . $current_total_time . ' WHERE uid = ' . $userdata['uid'];402 if( !($db->sql_query($sql)) ) {403 err('Total seedtime error');404 }405 }406 416 } 407 417 … … 422 432 } 423 433 else { 424 $secs = time()- $self['mtime'];434 $secs = $current_time - $self['mtime']; 425 435 $uprate = ( $secs ? round($upthis / $secs) : 0 ); //we calculate upl speed for last session 426 436 $downrate = ( $left ? ( $secs ? round($downthis / $secs) : 0 ) : 0 ); //we calculate down speed for last session … … 433 443 'port' => $port, 434 444 '`left`' => $left, 435 'mtime' => time())) .445 'mtime' => $current_time )) . 436 446 ' WHERE ' . $selfwhere; 437 447 … … 451 461 452 462 if ( !$left ) { 453 $updateset[] = 'mtime = ' . time();463 $updateset[] = 'mtime = ' . $current_time; 454 464 } 455 465 bookmarks.php
r269 r280 26 26 $cat_parent_id = ( isset($cats[$cats[$cat_id]['cat_parent']]['cat_id']) ? $cats[$cats[$cat_id]['cat_parent']]['cat_id'] : 0 ); 27 27 28 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 29 if ( $cat_parent_id ) { 30 $seo->set_url($cats[$cat_parent_id]['cat_name'], $cat_parent_id, $seo->seo_static['browse']); 31 $seo->set_parent($cat_id, $seo->seo_static['browse'], $cat_parent_id, $seo->seo_static['browse']); 32 } 33 $seo->set_url($cats[$cat_id]['cat_name'], $cat_id, $seo->seo_static['browse']); 34 $seo->set_parent($tor_id, $seo->seo_static['details'], $cat_id, $seo->seo_static['browse']); 35 $seo->set_url(censor_text($row['name']), $tor_id, $seo->seo_static['details']); 36 // www.phpBB-SEO.com SEO TOOLKIT END 28 37 29 38 $url = 'details.php?id=' . $tor_id; browse.php
r274 r280 5 5 require ($root_path . 'include/functions_selects.php'); 6 6 require ($root_path . 'include/functions_search.php'); 7 8 if ( empty($_REQUEST['cat']) && !empty($_REQUEST['uri']) ) { 9 $seo->get_id_from_uri($session_cid); 10 if ($session_cid == 0) { 11 header('HTTP/1.1 404 Not Found'); 12 } else { 13 $_REQUEST['cat'] = (int) $session_cid; 14 } 15 } 7 16 8 17 $userdata = session_pagestart($user_ip); … … 126 135 break; 127 136 137 case 9: 138 $addparam[] = 'incldead=3'; 139 $wherea[] = 't.free = 2'; 140 $wherea[] = 't.visible = 1'; 141 break; 142 143 case 10: 144 $addparam[] = 'incldead=3'; 145 $wherea[] = 't.free = 4'; 146 $wherea[] = 't.visible = 1'; 147 break; 148 128 149 default: 129 150 //$wherea[] = 't.visible = 1'; … … 132 153 133 154 if ( !$all ) { 134 if ( !$_GET && $userdata['notifs']) {155 if ( !$_GET && strpos($userdata['notifs'], '[cat') !== false ) { 135 156 $all = true; 136 157 foreach ( $cats AS $cat_id => $cat_ary ) { … … 230 251 $catdropdown .= '<option value="' . $cat_id . '"' . ( $category == $cat_id ? ' selected="selected"' : '' ) . '>' . $cat_ary[$cat_id]['name'] . '</option>'; 231 252 253 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 254 $seo->set_url($cat_ary[$cat_id]['name'], $cat_id, $seo->seo_static['browse']); 255 // www.phpBB-SEO.com SEO TOOLKIT END 256 if ( $category == $cat_id ) { 257 $current_cat_name = $cat_ary[$cat_id]['name']; 258 } 259 232 260 $template->assign_block_vars('cats_row.cats_col', array( 233 261 'U_CAT' => append_sid($root_path . 'browse.php?cat=' . $cat_id), … … 255 283 $catdropdown .= '<option value="' . $key . '"' . ( $category == $key ? ' selected="selected"' : '' ) . '> --> ' . $sub_ary['name'] . '</option>'; 256 284 285 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 286 $seo->set_parent($key, $seo->seo_static['browse'], $cat_id, $seo->seo_static['browse']); 287 $seo->set_url($sub_ary['name'], $key, $seo->seo_static['browse']); 288 // www.phpBB-SEO.com SEO TOOLKIT END 289 if ( $category == $key ) { 290 $current_cat_name = $parent_cat_name . ' --> ' . $sub_ary['name']; 291 } 292 257 293 $template->assign_block_vars('cats_row.cats_col.subcats_row', array( 258 294 'U_CAT' => append_sid($root_path . 'browse.php?cat=' . $key), … … 410 446 2 => $lang['only_dead'], 411 447 3 => $lang['free'], 448 9 => $lang['free_silver'], 449 10 => $lang['free_bronze'], 412 450 4 => $lang['without_seed'] 413 451 ); … … 500 538 } 501 539 else { 502 $page_title = $lang['browse'] . ( $current_cat_name ? ' "' . $current_cat_name . '"' : '' ) . ( isset($_GET['page']) ? ' ' . $lang['page'] . ' ' . (int) $_GET['page']: '' );540 $page_title = $lang['browse'] . ( $current_cat_name ? ' "' . $current_cat_name . '"' : '' ) . ( $page ? ' ' . $lang['page'] . ' ' . $page : '' ); 503 541 stdhead($page_title, false); 504 542 } cheaters.php
r266 r280 225 225 list($torrent_id, $torrent_name) = explode('|', $torrent_id); 226 226 227 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 228 $seo->set_url(censor_text($torrent_name), $torrent_id, $seo->seo_static['details']); 229 // www.phpBB-SEO.com SEO TOOLKIT END 230 227 231 $template->assign_block_vars('cheat_users_row.torrents_row', array( 228 232 'U_TORRENT' => append_sid($root_path . 'details.php?id=' . $torrent_id), comment.php
r277 r280 177 177 $tpl = textbbcode($text); 178 178 $template->assign_vars(array('TEXTBBCODE' => $tpl)); 179 180 switch ( $type ) { 181 case TYPE_TORRENT: 182 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 183 $seo->set_url(censor_text($arr['name']), $id, $seo->seo_static['details']); 184 // www.phpBB-SEO.com SEO TOOLKIT END 185 break; 186 } 179 187 180 188 $template->assign_vars(array( … … 365 373 $db->sql_query($sql); 366 374 375 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 376 $seo->set_url($arr['name'], $arr['comment_for_id'], $seo->seo_static[$filename]); 377 // www.phpBB-SEO.com SEO TOOLKIT END 378 367 379 redirect( append_sid($root_path . $filename . '.php?id=' . $arr['comment_for_id'])); 368 380 break; … … 449 461 switch ( $row['comment_type'] ) { 450 462 case TYPE_TORRENT: 451 452 redirect( append_sid($root_path . 'details.php?id=' . $row['comment_for_id'] . '&view=comments&page=' . $page) . '#comm' . $id);463 $sql = 'SELECT name, fid AS id, category FROM ' . TORRENTS_TABLE . ' WHERE fid = ' . $row['comment_for_id']; 464 $filename = 'details'; 453 465 break; 454 466 455 467 case TYPE_REQUEST: 456 redirect( append_sid('requests.php?id=' . $row['comment_for_id'] . '&page=' . $page . '&viewcomm=' . $id) . '#comm' . $id); 468 $sql = 'SELECT request AS name, id, cat AS category FROM ' . REQUESTS_TABLE . ' WHERE id = ' . $row['comment_for_id']; 469 $filename = 'requests'; 457 470 break; 458 471 459 472 case TYPE_OFFER: 460 redirect( append_sid('offers.php?id=' . $row['comment_for_id'] . '&page=' . $page . '&viewcomm=' . $id) . '#comm' . $id); 473 $sql = 'SELECT name, id, category FROM ' . OFFERS_TABLE . ' WHERE id = ' . $row['comment_for_id']; 474 $filename = 'offers'; 461 475 break; 462 476 463 477 case TYPE_NEWS: 464 redirect( append_sid('news.php?id=' . $row['comment_for_id'] . '&page=' . $page . '&viewcomm=' . $id) . '#comm' . $id); 478 $sql = 'SELECT title AS name, NULL AS category, id FROM ' . NEWS_TABLE . ' WHERE id = ' . $row['comment_for_id']; 479 $filename = 'news'; 465 480 break; 466 467 default: 468 trigger_error('invalid_type'); 469 break; 470 } 481 } 482 $result = $db->sql_query($sql); 483 $redirect_row = $db->sql_fetchrow($result); 484 $cats = $cache->obtain_cats(); 485 486 if ( isset($cats[$cats[$redirect_row['category']]['cat_parent']]['cat_name']) ) { 487 $cat_parent = $cats[$cats[$redirect_row['category']]['cat_parent']]; 488 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 489 $seo->set_url($cat_parent['cat_name'], $cat_parent['cat_id'], $seo->seo_static['browse']); 490 $seo->set_parent($cats[$redirect_row['category']]['cat_id'], $seo->seo_static['browse'], $cat_parent['cat_id'], $seo->seo_static['browse']); 491 // www.phpBB-SEO.com SEO TOOLKIT END 492 } 493 494 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 495 $seo->set_url($cats[$redirect_row['category']]['cat_name'], $cats[$redirect_row['category']]['cat_id'], $seo->seo_static['browse']); 496 $seo->set_parent($redirect_row['id'], $seo->seo_static['details'], $cats[$redirect_row['category']]['cat_id'], $seo->seo_static['browse']); 497 $seo->set_url(censor_text($redirect_row['name']), $redirect_row['id'], $seo->seo_static['details']); 498 // www.phpBB-SEO.com SEO TOOLKIT END 499 500 redirect(append_sid($root_path . $filename . '.php?id=' . $row['comment_for_id'] . '&page=' . $page . '&viewcomm=' . $id) . '#comm' . $id); 471 501 } 472 502 else { db_updater.php
r269 r280 434 434 $db->sql_query('ALTER TABLE ' . FILES_TABLE . ' DROP id'); 435 435 436 $db->sql_query('ALTER TABLE ' . TORRENTS_TABLE . ' CHANGE flags flags TINYINT( 1 ) NOT NULL DEFAULT \'0\''); 437 $db->sql_query('ALTER TABLE ' . TORRENTS_TABLE . ' ADD INDEX (flags)'); 438 $db->sql_query('ALTER TABLE ' . TORRENTS_TABLE . ' DROP INDEX added'); 439 $db->sql_query('ALTER TABLE ' . SNATCHED_TABLE . ' DROP connectable'); 440 436 441 437 442 $message .= 'Database updated sucefully. Now you must delete this file!'; details.php
r277 r280 12 12 { 13 13 global $userdata, $template, $lang, $theme, $root_path; 14 global $seo; 14 15 15 16 $count = sizeof( $arr ); … … 56 57 } 57 58 else { 59 60 // www.phpBB-SEO.com SEO TOOLKIT START 61 $seo->set_user_url($arr[$i]['name'], $arr[$i]['uid']); 62 // www.phpBB-SEO.com SEO TOOLKIT END 63 58 64 $u_userdetails = append_sid($root_path . 'userdetails.php?id=' . $arr[$i]['uid']); 59 65 $username_color = get_user_class_color( $arr[$i]['class'], $arr[$i]['name'] ); 60 66 $username = $arr[$i]['name']; 61 if ( defined('USE_XBTT') ) { 62 $connectable = $arr[$i]['port']; 63 } 64 else { 65 $connectable = '<span style="color:' . ( $arr[$i]['connectable'] ? 'green' : 'red' ) . ';">' . $arr[$i]['port'] . '</span>'; 66 } 67 $connectable = $arr[$i]['port']; 67 68 $connected = mkprettytime( $now - $arr[$i]['started'] ); 68 69 $client = getagent( $arr[$i]['useragent'], $arr[$i]['peer_id'] ); … … 275 276 } 276 277 278 // www.phpBB-SEO.com SEO TOOLKIT START 279 $seo->set_user_url($row['name'], $row['userid']); 280 // www.phpBB-SEO.com SEO TOOLKIT END 281 277 282 $template->assign_block_vars( 'snatchedlist_row', array( 278 283 'USERID' => $row['userid'], … … 316 321 $thanksby .= ( $thanks_userid ? ', ' : '' ); 317 322 $thanks_userid = $subrow['userid']; 323 // www.phpBB-SEO.com SEO TOOLKIT START 324 $seo->set_user_url($subrow['name'], $thanks_userid); 325 // www.phpBB-SEO.com SEO TOOLKIT END 318 326 $thanksby .= '<a href="' . append_sid($root_path . 'userdetails.php?id=' . $thanks_userid) . '">' . $subrow['name'] . '</a>'; 319 327 } … … 387 395 $cat_parent = $cats[$cats[$row['category']]['cat_parent']]; 388 396 397 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 398 $seo->set_url($cat_parent['cat_name'], $cat_parent['cat_id'], $seo->seo_static['browse']); 399 $seo->set_parent($cats[$row['category']]['cat_id'], $seo->seo_static['browse'], $cat_parent['cat_id'], $seo->seo_static['browse']); 400 // www.phpBB-SEO.com SEO TOOLKIT END 401 389 402 $cat_parent_name = '<a href="' . append_sid($root_path . 'browse.php?cat=' . $cat_parent['cat_id']) . '">' . $cat_parent['cat_name'] . '</a> -> '; 390 403 } … … 392 405 $cat_parent_name = ''; 393 406 } 407 408 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 409 $seo->set_url($cats[$row['category']]['cat_name'], $cats[$row['category']]['cat_id'], $seo->seo_static['browse']); 410 $seo->set_parent($id, $seo->seo_static['details'], $cats[$row['category']]['cat_id'], $seo->seo_static['browse']); 411 $seo->set_url($torrent_name, $id, $seo->seo_static['details']); 412 $seo->set_user_url($row['username'], $row['owner']); 413 414 if ( preg_match('/details\.php\?id=([0-9]+)/', $_SERVER['REQUEST_URI']) ) { 415 header('HTTP/1.1 301 Moved Permanently'); 416 redirect(append_sid($root_path . 'details.php?id=' . $id)); 417 } 418 // www.phpBB-SEO.com SEO TOOLKIT END 394 419 395 420 if ( $view <> 'comments' ) { … … 481 506 'SPACER' => ' ', 482 507 'NAME' => $torrent_name, 483 'FREE_DOWNLOAD' => $row['free'], 484 'IMG_FREE' => $images['freedownload'], 508 'FREE_ICON' => get_free_icon($row['free']), 485 509 'TORRENT_FILENAME' => htmlspecialchars( $row['filename'] ), 486 510 'INFO_HASH' => preg_replace_callback('/./s', create_function('$matches','return sprintf(\'%02x\', ord($matches[0]));'), str_pad($row['info_hash'], 20) ), … … 567 591 $size = round($config['min_tag_size'] + (($tag_count - $min_qty) * $step)); 568 592 593 $enc_tag_name = undo_htmlspecialchars($tag_name); 594 $enc_tag_name = urlencode($enc_tag_name); 595 569 596 $template->assign_block_vars('tags_row', array( 570 597 'TAG_NAME' => $tag_name, 571 598 'TAG_SIZE' => $size, 572 599 573 'U_TAG' => append_sid($root_path . 'browse.php?search_in=3&search=' . $ tag_name),574 575 'U_TAG_USERS' => append_sid($root_path . 'modtask.php?action=tags&do=view_users&tag_name=' . $ tag_name . '&tag_type=' . TYPE_TORRENT . '&tag_for_id=' . $id),600 'U_TAG' => append_sid($root_path . 'browse.php?search_in=3&search=' . $enc_tag_name), 601 602 'U_TAG_USERS' => append_sid($root_path . 'modtask.php?action=tags&do=view_users&tag_name=' . $enc_tag_name . '&tag_type=' . TYPE_TORRENT . '&tag_for_id=' . $id), 576 603 )); 577 604 } faq.php
r245 r280 8 8 //tiny function to get sysop link for faq 9 9 function get_sysop_link ( $type ) { 10 global $db ;10 global $db, $seo, $root_path; 11 11 12 12 $sql = 'SELECT uid, name FROM ' . USERS_TABLE . ' WHERE class = ' . UC_SYSOP . ' LIMIT 1'; … … 24 24 25 25 case 3: 26 return '<a href="' . append_sid('userdetails.php?id=' . $row['uid']) . '">' . $row['name'] . '</a>'; 26 $seo->set_user_url($row['name'], $row['uid']); 27 return '<a href="' . append_sid($root_path . 'userdetails.php?id=' . $row['uid']) . '">' . $row['name'] . '</a>'; 27 28 break; 28 29 } … … 61 62 { 62 63 if ( !empty($faq[$i][0]) ) { 63 if( $faq[$i][0] != '--' ) 64 { 65 $faq_block[$j][$counter]['id'] = $counter_2; 66 $faq_block[$j][$counter]['question'] = $faq[$i][0]; 67 $faq_block[$j][$counter]['answer'] = $faq[$i][1]; 64 if( $faq[$i][0] != '--' ) { 65 $faq_block[$j][$counter]['id'] = $counter_2; 66 $faq_block[$j][$counter]['question'] = $faq[$i][0]; 67 $faq_block[$j][$counter]['answer'] = $faq[$i][1]; 68 68 69 $counter++; 70 $counter_2++; 71 } 72 else 73 { 74 $j = ( $counter != 0 ) ? $j + 1 : 0; 69 $counter++; 70 $counter_2++; 71 } 72 else { 73 $j = ( $counter != 0 ) ? $j + 1 : 0; 75 74 76 $faq_block_titles[$j] = $faq[$i][1];75 $faq_block_titles[$j] = $faq[$i][1]; 77 76 78 $counter = 0;79 }80 }77 $counter = 0; 78 } 79 } 81 80 } 82 81 83 82 for($i = 0; $i < sizeof($faq_block); $i++) { 84 if( sizeof($faq_block[$i]) ) { 85 $template->assign_block_vars('faq_block', array( 86 'BLOCK_TITLE' => $faq_block_titles[$i]) 87 ); 88 for($j = 0; $j < count($faq_block[$i]); $j++) { 89 $template->assign_block_vars('faq_block.faq_row', array( 90 'ID' => $faq_block[$i][$j]['id'], 91 'QUESTION' => $faq_block[$i][$j]['question']) 92 ); 93 } 94 } 83 if( sizeof($faq_block[$i]) ) { 84 $template->assign_block_vars('faq_block', array( 85 'BLOCK_TITLE' => $faq_block_titles[$i] 86 )); 87 88 for($j = 0; $j < count($faq_block[$i]); $j++) { 89 $template->assign_block_vars('faq_block.faq_row', array( 90 'ID' => $faq_block[$i][$j]['id'], 91 'QUESTION' => $faq_block[$i][$j]['question'] 92 )); 93 } 94 } 95 95 } 96 96 97 97 98 98 for($i = 0; $i < sizeof($faq_block); $i++) { 99 if( sizeof($faq_block[$i]) ) { 100 $template->assign_block_vars('answers_block', array( 101 'BLOCK_TITLE' => $faq_block_titles[$i]) 102 ); 103 for($j = 0; $j < count($faq_block[$i]); $j++) { 104 $template->assign_block_vars('answers_block.answers_row', array( 105 'ID' => $faq_block[$i][$j]['id'], 106 'QUESTION' => $faq_block[$i][$j]['question'], 107 'ANSWER' => $faq_block[$i][$j]['answer']) 108 ); 109 } 110 } 99 if( sizeof($faq_block[$i]) ) { 100 $template->assign_block_vars('answers_block', array( 101 'BLOCK_TITLE' => $faq_block_titles[$i] 102 )); 103 104 for( $j = 0; $j < count($faq_block[$i]); $j++ ) { 105 $template->assign_block_vars('answers_block.answers_row', array( 106 'ID' => $faq_block[$i][$j]['id'], 107 'QUESTION' => $faq_block[$i][$j]['question'], 108 'ANSWER' => $faq_block[$i][$j]['answer'] 109 )); 110 } 111 } 111 112 } 112 113 helpdesk.php
r266 r280 40 40 $answers_options = ''; 41 41 foreach ( $lang['helpdesc_standart_answers'] AS $title => $answer ) { 42 $answers_options .= '<option value="' . sprintf($answer, generate_base_url()). '">' . $title . '</option>';42 $answers_options .= '<option value="' . $answer . '">' . $title . '</option>'; 43 43 } 44 44 include/bbcode/bbcode.lib.php
r269 r280 107 107 */ 108 108 public $behaviour = 'div'; 109 110 public $base_url = ''; 109 111 /* 110 112 Текущая дирректория. … … 141 143 global $template_path, $lang, $bb_tpl; 142 144 145 $this->base_url = generate_base_url() . '/'; 146 143 147 $this->_current_path = dirname(__FILE__) . DIRECTORY_SEPARATOR; 144 148 include $this->_current_path . 'config' . DIRECTORY_SEPARATOR . 'parser.config.php'; 145 149 include $this->_current_path . 'config' . DIRECTORY_SEPARATOR . 'tags.php'; 146 150 147 if (!defined('BB_TPL_READY')) 148 { 149 $tpl = @file_get_contents($template_path . '/bbcode.html'); 150 151 // replace \ with \\ and then ' with \'. 152 $tpl = str_replace('\\', '\\\\', $tpl); 153 $tpl = str_replace('\'', '\\\'', $tpl); 154 155 // strip newlines. 156 $tpl = str_replace("\n", '', $tpl); 157 158 // Turn template blocks into PHP assignment statements for the values of $bb_tpls.. 159 $tpl = preg_replace('#<!-- BEGIN (.*?) -->(.*?)<!-- END (.*?) -->#', "\n" . '$bb_tpl[\'\\1\'] = \'\\2\';', $tpl); 160 161 $bb_tpl = array(); 162 163 eval($tpl); 164 165 foreach ( $bb_tpl AS $key => $val ) { 166 $bb_tpl[$key] = preg_replace('#\{L_([a-z0-9\-_]*)\}#ise', "isset(\$lang[strtolower('\\1')]) ? \$lang[strtolower('\\1')] : ucfirst(strtolower(str_replace('_', ' ', '\\1')))", $bb_tpl[$key]); 151 if (!defined('BB_TPL_READY')) 152 { 153 $tpl = @file_get_contents($template_path . '/bbcode.html'); 154 155 // replace \ with \\ and then ' with \'. 156 $tpl = str_replace('\\', '\\\\', $tpl); 157 $tpl = str_replace('\'', '\\\'', $tpl); 158 159 // strip newlines. 160 $tpl = str_replace("\n", '', $tpl); 161 162 // Turn template blocks into PHP assignment statements for the values of $bb_tpls.. 163 $tpl = preg_replace('#<!-- BEGIN (.*?) -->(.*?)<!-- END (.*?) -->#', "\n" . '$bb_tpl[\'\\1\'] = \'\\2\';', $tpl); 164 165 $bb_tpl = array(); 166 167 eval($tpl); 168 169 foreach ( $bb_tpl AS $key => $val ) { 170 $bb_tpl[$key] = preg_replace('#\{L_([a-z0-9\-_]*)\}#ise', "isset(\$lang[strtolower('\\1')]) ? \$lang[strtolower('\\1')] : ucfirst(strtolower(str_replace('_', ' ', '\\1')))", $bb_tpl[$key]); 171 } 172 173 define('BB_TPL_READY', true); 167 174 } 168 169 define('BB_TPL_READY', true);170 }171 175 172 176 $this->bb_tpl = $bb_tpl; … … 1016 1020 return; 1017 1021 } 1018 if (strpos($text, generate_base_url()) !== false && strpos($text, 'sid=') !== false)1022 if (strpos($text, $this->base_url) !== false && strpos($text, 'sid=') !== false) 1019 1023 { 1020 1024 $text = preg_replace('/(&|\?)sid=[0-9a-f]{32}&/', '\1', $text); … … 1022 1026 $text = preg_replace("/(&|\?)sid=[0-9a-f]{32}\n/", '', $text); 1023 1027 } 1024 1025 1028 $search = $this -> preg_autolinks['pattern']; 1026 $replace = $this -> preg_autolinks['replacement']; 1027 $text = preg_replace($search, $replace, $text); 1029 //$replace = $this -> preg_autolinks['replacement']; 1030 // this feature parses base url 1031 $text = preg_replace_callback( 1032 $search, 1033 array($this,'_parse_url'), 1034 $text 1035 ); 1036 } 1037 1038 function _parse_url( $matches ) { 1039 if ( !empty($matches[2]) ) { 1040 return '<a href="http://' . $matches[2] . '" target="_blank">' . str_replace($this->base_url, '', 'http://' . $matches[2]) . '</a>'; 1041 } 1042 else { 1043 return '<a href="' . $matches[0] . '" target="_blank">' . str_replace($this->base_url, '', $matches[0]) . '</a>'; 1044 } 1028 1045 } 1029 1046 include/bbcode/config/parser.config.php
r269 r280 34 34 "'[\w]+[\w\-\.]+@[\w\-\.]+\.[\w]+'si", 35 35 ), 36 'replacement' => array( 37 '<a href="$0" target="_blank">$0</a>', 38 '$1<a href="http://$2" target="_blank">$2</a>', 39 '<a href="mailto:$0">$0</a>', 40 ), 36 41 37 'highlight' => array( 42 38 '<span class="bb_autolink">$0</span>', … … 47 43 48 44 // Формируем набор смайликов 49 /*$path = substr($this->_current_path, strlen($_SERVER['DOCUMENT_ROOT'])); 45 46 /* 47 $path = substr($this->_current_path, strlen($_SERVER['DOCUMENT_ROOT'])); 50 48 $path = str_replace('\\', '/', $path) . 'images/smiles/'; 51 49 $pak = file($this->_current_path . 'images/smiles/Set_Smiles_YarNET.pak'); include/constants.php
r269 r280 158 158 define('SIMPATY_THANKS_TO_UPLOAD', 9); 159 159 define('SIMPATY_CUSTOM', 0); 160 161 define('XBTT_TORRENT_MODIFIED', 9); 160 162 161 163 // Table names include/db/dbal.php
r246 r280 672 672 function sql_report($mode, $query = '') 673 673 { 674 global $cache, $starttime, $lang ;674 global $cache, $starttime, $lang, $root_path; 675 675 676 676 if (empty($_REQUEST['explain'])) … … 712 712 <div id="wrap"> 713 713 <div id="page-header"> 714 <a href="' . append_sid($ previous_page) . '">Return to previous page</a>714 <a href="' . append_sid($root_path . $previous_page) . '">Return to previous page</a> 715 715 </div> 716 716 <div id="page-body"> include/details/edit.php
r269 r280 20 20 $cat_parent_id = ( isset($cats[$cats[$cat_id]['cat_parent']]['cat_id']) ? $cats[$cats[$cat_id]['cat_parent']]['cat_id'] : 0 ); 21 21 22 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 23 if ( $cat_parent_id ) { 24 $seo->set_url($cats[$cat_parent_id]['cat_name'], $cat_parent_id, $seo->seo_static['browse']); 25 $seo->set_parent($cat_id, $seo->seo_static['browse'], $cat_parent_id, $seo->seo_static['browse']); 26 } 27 28 $seo->set_url($cats[$cat_id]['cat_name'], $cat_id, $seo->seo_static['browse']); 29 30 $seo->set_parent($id, $seo->seo_static['details'], $cat_id, $seo->seo_static['browse']); 31 // www.phpBB-SEO.com SEO TOOLKIT END 22 32 23 33 if ( isset($_POST['submit']) ) { 24 loggedinorreturn();25 34 require_once ($root_path . 'languages/lang_' . $config['default_lang'] . '/lang_modcomment_log.php'); 26 35 require_once ($root_path . 'include/functions_check.php'); … … 76 85 77 86 if ( $userdata['class'] >= UC_MODERATOR ) { 78 $free = ( isset( $_POST['free'] ) ? 1 : 0);87 $free = request_var('free', 0); 79 88 $updateset[] = 'free = ' . $free; 80 89 … … 110 119 $updateset[] = 'info_hash = ' . "'" . $db->sql_escape( $infohash ) . "'"; 111 120 112 $sql = 'DELETE FROM ' . FILES_TABLE . ' WHERE torrent = ' . $id;113 $db->sql_query( $sql );114 121 foreach ( $filelist as $file ) { 115 122 $sql = 'INSERT INTO ' . FILES_TABLE . ' (torrent, filename, size) VALUES (' . $id . ', ' . "'" . $db->sql_escape( $file[0] ) . "'" . ', ' . $file[1] . ')'; … … 127 134 @rename($torrent_dir . DIRECTORY_SEPARATOR . $filename . '.torrent', $torrent_dir . DIRECTORY_SEPARATOR . $id . '.torrent'); 128 135 } 136 137 if ( defined('USE_XBTT') ) { 138 $updateset[] = 'flags = ' . XBTT_TORRENT_MODIFIED; 139 } 140 129 141 $sql = 'UPDATE ' . TORRENTS_TABLE . ' SET ' . implode( ',', $updateset ) . ' WHERE fid = ' . $id; 130 $db->sql_query( $sql);131 $cache->destroy( 'sql', INDEXRELEASES_TABLE);142 $db->sql_query($sql); 143 $cache->destroy('sql', INDEXRELEASES_TABLE); 132 144 133 145 write_log( sprintf( $lang['log_torrent_edited'], $id, $name, $userdata['uid'], $userdata['name']) ); 134 146 147 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 148 $seo->set_url(censor_text($name), $id, $seo->seo_static['details']); 149 // www.phpBB-SEO.com SEO TOOLKIT END 135 150 136 151 redirect( append_sid($root_path . 'details.php?id=' . $id . '&edited=1') ); … … 162 177 } 163 178 if ( $userdata['class'] >= UC_MODERATOR ) { 179 180 $free_select = '<select name="free" id="free">'; 181 $free_select .= '<option value="0">' . $lang['none'] . '</option>'; 182 $free_select .= '<option value="1"' . ( $row['free'] == 1 ? ' selected="selected"' : '' ) . '>' . $lang['free'] . '</option>'; 183 $free_select .= '<option value="2"' . ( $row['free'] == 2 ? ' selected="selected"' : '' ) . '>' . $lang['free_silver'] . '</option>'; 184 $free_select .= '<option value="4"' . ( $row['free'] == 4 ? ' selected="selected"' : '' ) . '>' . $lang['free_bronze'] . '</option>'; 185 $free_select .= '</select>'; 186 164 187 $template->assign_block_vars( 'switch_mod_section', array( 165 'FREE_CHECKED' => ( $row['free'] ? ' checked="checked"' : '' ),166 'DISABLE_COMMENTS_CHECKED' => ( $row['disable_comments'] ? ' checked="checked"' : '' ),167 'MODERATED_CHECKED' => ( $row['moderated'] ? ' checked="checked"' : '' ),188 'FREE_SELECT' => $free_select, 189 'DISABLE_COMMENTS_CHECKED' => ( $row['disable_comments'] ? ' checked="checked"' : '' ), 190 'MODERATED_CHECKED' => ( $row['moderated'] ? ' checked="checked"' : '' ), 168 191 )); 169 192 } include/details/viewnfo.php
r255 r280 48 48 $torrent_name = censor_text($row['name']); 49 49 50 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 51 $seo->seo_url['details'][$id] = $seo->set_url($torrent_name, $id, $seo->seo_static['details']); 52 // www.phpBB-SEO.com SEO TOOLKIT END 53 50 54 $template->assign_vars( array( 'NFO_FOR' => sprintf( $lang['view_nfo_for'], $torrent_name), 51 55 'NAME' => $row['name'], include/functions.php
r279 r280 690 690 } 691 691 692 function get_free_icon ( $free ) { 693 global $images; 694 695 switch ( $free ) { 696 //1 = 100% free 697 case 1: 698 return $images['free_download_gold']; 699 break; 700 //2 = 50% free 701 case 2: 702 return $images['free_download_silver']; 703 break; 704 //4 = 25% free 705 case 4: 706 return $images['free_download_bronze']; 707 break; 708 default: 709 return ''; 710 break; 711 } 712 } 713 692 714 function parked() { 693 715 global $userdata, $lang; … … 1187 1209 1188 1210 function send_pm ( $pm_ary ) { 1189 global $config, $db, $root_path, $lang ;1211 global $config, $db, $root_path, $lang, $seo; 1190 1212 1191 1213 if ( !sizeof($pm_ary) ) { … … 1199 1221 $receiver_ary = array(); 1200 1222 $count_ary = array(); 1223 $base_url = generate_base_url(); 1201 1224 1202 1225 foreach ( $pm_ary AS $_null => $ary ) { … … 1264 1287 $messenger->to($ary['email'], $ary['name']); 1265 1288 1289 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 1290 //if ( $config['mod_rewrite_enabled'] ) { 1291 // $u_link = append_sid($root_path . 'message.php' . ( $ary['count'] > $config['max_inbox_privmsgs'] ? '' : '?action=viewmessage&id=' . $ary['message_id'])); 1292 // $u_link = $seo->drop_sid($u_link); 1293 //} 1294 // www.phpBB-SEO.com SEO TOOLKIT END 1295 //else { 1296 $u_link = $base_url . '/message.php' . ( $ary['count'] > $config['max_inbox_privmsgs'] ? '' : '?action=viewmessage&id=' . $ary['message_id']); 1297 //} 1298 1266 1299 $messenger->assign_vars(array( 1267 1300 'BOARD_EMAIL' => $config['sitemail'], 1268 1301 'USERNAME' => html_entity_decode($ary['sender_name']), 1269 'U_LINK' => generate_base_url() . '/message.php' . ( $ary['count'] > $config['max_inbox_privmsgs'] ? '' : '?action=viewmessage&id=' . $ary['message_id'] )1302 'U_LINK' => $u_link 1270 1303 )); 1271 1304 $messenger->send(NOTIFY_EMAIL); … … 1301 1334 $keywords = preg_split('/([\W])/u', $keywords, -1, PREG_SPLIT_NO_EMPTY); 1302 1335 $keywords = $config['site_keywords'] . ', ' . implode(', ', $keywords); 1336 1337 1338 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 1339 global $seo; 1340 $template->assign_vars( array( 1341 'TRACKER_FULL_URL' => $seo->seo_path['url'], 1342 'SEO_BASE_HREF' => $seo->seo_opt['seo_base_href'], 1343 )); 1344 $seo->set_user_url($userdata['name'], $userdata['uid']); 1345 // www.phpBB-SEO.com SEO TOOLKIT END 1303 1346 1304 1347 //start active users … … 1346 1389 1347 1390 $online_users['visible_online']++; 1391 1392 // www.phpBB-SEO.com SEO TOOLKIT START 1393 $seo->set_user_url($row['name'], $row['uid']); 1394 // www.phpBB-SEO.com SEO TOOLKIT END 1395 1348 1396 $user_online_link = '<a href="' . append_sid($root_path . 'userdetails.php?id=' . $row['uid']) . '">' . get_user_class_color($row['class'], $row['name']) . '</a>' . get_user_icons($row); 1349 1397 $online_userlist .= ( $online_userlist != '' ) ? ', ' . $user_online_link : $user_online_link; … … 1644 1692 function stdfoot() { 1645 1693 global $userdata, $lang, $template, $starttime, $theme, $db, $do_gzip_compress, $config, $cache, $root_path, $user_ip; 1694 global $seo; 1646 1695 1647 1696 // Server Load START … … 1699 1748 if ( $row = $db->sql_fetchrow($result) ) { 1700 1749 do { 1750 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 1751 $seo->set_url($row['forum_name'], $row['forum_id'], $seo->seo_static['forum']); 1752 $seo->set_url($row['topic_title'], $row['topic_id'], $seo->seo_static['topic'], $seo->seo_url['forum'][$row['forum_id']]); 1753 // www.phpBB-SEO.com SEO TOOLKIT END 1754 1701 1755 $row['topic_title'] = split_string($row['topic_title'], 54); 1702 1756 1703 1757 $template->assign_block_vars('right_menu.new_at_forum', array( 1704 'U_TOPIC' => append_sid($root_path . 'phpbb2.php?page=viewtopic& t=' . $row['topic_id'] . '&p=' . $row['topic_last_post_id']) . '#' . $row['topic_last_post_id'],1758 'U_TOPIC' => append_sid($root_path . 'phpbb2.php?page=viewtopic&f=' . $row['forum_id'] . '&t=' . $row['topic_id'] . '&p=' . $row['topic_last_post_id']) . '#' . $row['topic_last_post_id'], 1705 1759 'TOPIC_TITLE' => $row['topic_title'] 1706 1760 )); … … 1710 1764 } 1711 1765 1712 $sql = 'SELECT t.fid, t.name 1713 FROM ' . TORRENTS_TABLE . ' t, ' . CATEGORIES_TABLE . ' c 1766 $sql = 'SELECT t.fid, t.name, c.name AS cat_name, c.id AS cat_id, c2.name AS cat_parent_name, c2.id AS cat_parent_id 1767 FROM ' . TORRENTS_TABLE . ' t, ' . CATEGORIES_TABLE . ' c LEFT JOIN ' . CATEGORIES_TABLE . ' c2 ON ( c.cat_parent_id = c2.id ) 1714 1768 WHERE t.category = c.id AND t.banned = 0 AND t.leechers > 0 ' . ( !$userdata['session_logged_in'] ? ' AND c.anonymous_view = 1' : '' ) . ' 1715 1769 ORDER BY t.seeders + t.leechers DESC LIMIT 5'; … … 1718 1772 do { 1719 1773 $torrent_name = censor_text($row['name']); 1774 $cat_parent = ( isset($row['cat_parent_id']) ? $row['cat_parent_id'] : 0 ); 1775 1776 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 1777 $seo->set_url($row['cat_name'], $row['cat_id'], $seo->seo_static['browse']); 1778 $parent = $seo->seo_url['browse'][$row['cat_id']]; 1779 if ( $cat_parent ) { 1780 $seo->set_url($row['cat_parent_name'], $cat_parent, $seo->seo_static['browse']); 1781 $parent .= $seo->seo_url['browse'][$cat_parent]; 1782 } 1783 $seo->set_url($torrent_name, $row['fid'], $seo->seo_static['details'], $parent); 1784 // www.phpBB-SEO.com SEO TOOLKIT END 1785 1720 1786 $template->assign_block_vars('right_menu.active_torrents', array( 1721 'U_TORRENT' => append_sid($root_path . 'details.php?id=' . $row['fid']),1722 'TORRENT_NAME' => split_string($torrent_name, 54))1723 );1787 'U_TORRENT' => append_sid($root_path . 'details.php?id=' . $row['fid']), 1788 'TORRENT_NAME' => split_string($torrent_name, 54) 1789 )); 1724 1790 } 1725 1791 while ( $row = $db->sql_fetchrow($result) ); 1726 1792 } 1727 1793 1728 $sql = 'SELECT t.fid, t.name 1729 FROM ' . TORRENTS_TABLE . ' t, ' . CATEGORIES_TABLE . ' c 1794 $sql = 'SELECT t.fid, t.name, c.name AS cat_name, c.id AS cat_id, c2.name AS cat_parent_name, c2.id AS cat_parent_id 1795 FROM ' . TORRENTS_TABLE . ' t, ' . CATEGORIES_TABLE . ' c LEFT JOIN ' . CATEGORIES_TABLE . ' c2 ON ( c.cat_parent_id = c2.id ) 1730 1796 WHERE t.category = c.id AND t.banned = 0 AND t.leechers > 0 ' . ( !$userdata['session_logged_in'] ? ' AND c.anonymous_view = 1' : '' ) . ' 1731 1797 ORDER BY completed DESC LIMIT 5'; … … 1734 1800 do { 1735 1801 $torrent_name = censor_text($row['name']); 1802 $cat_parent = ( isset($row['cat_parent_id']) ? $row['cat_parent_id'] : 0 ); 1803 1804 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 1805 $seo->set_url($row['cat_name'], $row['cat_id'], $seo->seo_static['browse']); 1806 $parent = $seo->seo_url['browse'][$row['cat_id']]; 1807 if ( $cat_parent ) { 1808 $seo->set_url($row['cat_parent_name'], $cat_parent, $seo->seo_static['browse']); 1809 $parent .= $seo->seo_url['browse'][$cat_parent]; 1810 } 1811 $seo->set_url($torrent_name, $row['fid'], $seo->seo_static['details'], $parent); 1812 // www.phpBB-SEO.com SEO TOOLKIT END 1813 1736 1814 $template->assign_block_vars('right_menu.popular_torrents', array( 1737 'U_TORRENT' => append_sid($root_path . 'details.php?id=' . $row['fid']),1738 'TORRENT_NAME' => split_string($torrent_name, 54))1739 );1815 'U_TORRENT' => append_sid($root_path . 'details.php?id=' . $row['fid']), 1816 'TORRENT_NAME' => split_string($torrent_name, 54) 1817 )); 1740 1818 } 1741 1819 while ( $row = $db->sql_fetchrow($result) ); include/functions_messenger.php
r222 r280 15 15 class messenger 16 16 { 17 var $vars, $msg, $extra_headers, $replyto, $from, $subject , $encoding;17 var $vars, $msg, $extra_headers, $replyto, $from, $subject; 18 18 var $addresses = array(); 19 19 … … 39 39 { 40 40 $this->addresses = $this->extra_headers = array(); 41 $this->vars = $this->msg = $this->replyto = $this->from = $this->encoding ='';41 $this->vars = $this->msg = $this->replyto = $this->from = ''; 42 42 $this->mail_priority = MAIL_NORMAL_PRIORITY; 43 43 } … … 219 219 else 220 220 { 221 $this->subject = (($this->subject != '') ? $this->subject : $lang['no_subject']); 222 } 223 224 if (preg_match('#^(Charset:(.*?))$#m', $this->msg, $match)) 225 { 226 $this->encoding = (trim($match[2]) != '') ? trim($match[2]) : trim($lang['language_charset']); 227 $drop_header .= '[\r\n]*?' . preg_quote($match[1], '#'); 228 } 229 else 230 { 231 $this->encoding = 'utf-8'; 221 $this->subject = (($this->subject != '') ? $this->subject : 'No subject'); 232 222 } 233 223 … … 328 318 $headers[] = 'Message-ID: <' . md5(uniqid(time())) . '@' . $config['server_name'] . '>'; 329 319 $headers[] = 'Date: ' . gmdate('D, d M Y H:i:s T', time()); 330 $headers[] = 'Content-Type: text/plain; charset= ' . $this->encoding; // format=flowed320 $headers[] = 'Content-Type: text/plain; charset=utf-8'; // format=flowed 331 321 $headers[] = 'Content-Transfer-Encoding: 8bit'; // 7bit 332 322 … … 391 381 foreach ($address_ary as $which_ary) 392 382 { 393 $$type .= (($$type != '') ? ', ' : '') . (($which_ary['name'] != '') ? '"' . mail_encode($which_ary['name'] , $this->encoding) . '" <' . $which_ary['email'] . '>' : $which_ary['email']);383 $$type .= (($$type != '') ? ', ' : '') . (($which_ary['name'] != '') ? '"' . mail_encode($which_ary['name']) . '" <' . $which_ary['email'] . '>' : $which_ary['email']); 394 384 } 395 385 } … … 406 396 if ($config['smtp_delivery']) 407 397 { 408 $result = smtpmail($this->addresses, mail_encode($this->subject , $this->encoding), $this->msg, $err_msg, $this->encoding, $headers);398 $result = smtpmail($this->addresses, mail_encode($this->subject), $this->msg, $err_msg, $headers); 409 399 } 410 400 else 411 401 { 412 402 ob_start(); 413 $result = @mail($mail_to, mail_encode($this->subject , $this->encoding), implode("\n", preg_split("/\r?\n/", $this->msg)), $headers);403 $result = @mail($mail_to, mail_encode($this->subject), implode("\n", preg_split("/\r?\n/", $this->msg)), $headers); 414 404 $err_msg = ob_get_clean(); 415 405 } … … 428 418 'subject' => $this->subject, 429 419 'msg' => $this->msg, 430 'encoding' => $this->encoding,431 420 'headers' => $headers) 432 421 ); … … 648 637 if ($config['smtp_delivery']) 649 638 { 650 $result = smtpmail($addresses, mail_encode($subject , $encoding), $msg, $err_msg, $encoding, $headers);639 $result = smtpmail($addresses, mail_encode($subject), $msg, $err_msg, $headers); 651 640 } 652 641 else 653 642 { 654 643 ob_start(); 655 $result = @mail($to, mail_encode($subject , $encoding), implode("\n", preg_split("/\r?\n/", $msg)), $headers);644 $result = @mail($to, mail_encode($subject), implode("\n", preg_split("/\r?\n/", $msg)), $headers); 656 645 $err_msg = ob_get_clean(); 657 646 } … … 758 747 * Replacement or substitute for PHP's mail command 759 748 */ 760 function smtpmail($addresses, $subject, $message, &$err_msg, $ encoding, $headers = '')749 function smtpmail($addresses, $subject, $message, &$err_msg, $headers = '') 761 750 { 762 751 global $config; … … 813 802 foreach ($addresses['to'] as $which_ary) 814 803 { 815 $mail_to[] = ($which_ary['name'] != '') ? mail_encode(trim($which_ary['name']) , $encoding) . ' <' . trim($which_ary['email']) . '>' : '<' . trim($which_ary['email']) . '>';804 $mail_to[] = ($which_ary['name'] != '') ? mail_encode(trim($which_ary['name'])) . ' <' . trim($which_ary['email']) . '>' : '<' . trim($which_ary['email']) . '>'; 816 805 $mail_rcpt['to'][] = '<' . trim($which_ary['email']) . '>'; 817 806 } … … 830 819 foreach ($addresses['cc'] as $which_ary) 831 820 { 832 $mail_cc[] = ($which_ary['name'] != '') ? mail_encode(trim($which_ary['name']) , $encoding) . ' <' . trim($which_ary['email']) . '>' : '<' . trim($which_ary['email']) . '>';821 $mail_cc[] = ($which_ary['name'] != '') ? mail_encode(trim($which_ary['name'])) . ' <' . trim($which_ary['email']) . '>' : '<' . trim($which_ary['email']) . '>'; 833 822 $mail_rcpt['cc'][] = '<' . trim($which_ary['email']) . '>'; 834 823 } … … 1391 1380 * scenario IMO 1392 1381 */ 1393 function mail_encode ($str, $header_encoding = '') { 1394 if ( $header_encoding == '' ) { 1395 return $str; 1396 } 1397 $x = 0; 1398 $x += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches); 1399 if ($x == 0) { 1400 return ($str); 1401 } 1402 1403 $maxlen = 75 - 7 - strlen($header_encoding); 1404 // Try to select the encoding which should produce the shortest output 1405 if (strlen($str) / 3 < $x) { 1406 $encoding = 'B'; 1407 $encoded = base64_encode($str); 1408 $maxlen -= $maxlen % 4; 1409 $encoded = trim(chunk_split($encoded, $maxlen, "\n")); 1410 } 1411 else { 1412 $encoding = 'Q'; 1413 $encoded = preg_replace("[\r\n]", '', $str); 1414 $encoded = preg_replace('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/e', "'='.sprintf('%02X', ord('\\1'))", $encoded); 1415 $encoded = str_replace(' ', "_", $encoded); 1416 } 1417 $encoded = preg_replace('/^(.*)$/m', '=?' . $header_encoding . "?$encoding?\\1?=", $encoded); 1418 $encoded = trim(str_replace("\n", '', $encoded)); 1419 1420 return $encoded; 1382 function mail_encode ($str) { 1383 // define start delimimter, end delimiter and spacer 1384 $start = "=?UTF-8?B?"; 1385 $end = "?="; 1386 $spacer = $end . ' ' . $start; 1387 $split_length = 64; 1388 1389 $encoded_str = base64_encode($str); 1390 1391 // If encoded string meets the limits, we just return with the correct data. 1392 if (strlen($encoded_str) <= $split_length) 1393 { 1394 return $start . $encoded_str . $end; 1395 } 1396 1397 // If there is only ASCII data, we just return what we want, correctly splitting the lines. 1398 if (strlen($str) === utf_strlen($str)) 1399 { 1400 return $start . implode($spacer, str_split($encoded_str, $split_length)) . $end; 1401 } 1402 1403 // UTF-8 data, compose encoded lines 1404 $array = utf_str_split($str); 1405 $str = ''; 1406 1407 while (sizeof($array)) 1408 { 1409 $text = ''; 1410 1411 while (sizeof($array) && intval((strlen($text . $array[0]) + 2) / 3) << 2 <= $split_length) 1412 { 1413 $text .= array_shift($array); 1414 } 1415 1416 $str .= $start . base64_encode($text) . $end . ' '; 1417 } 1418 1419 return substr($str, 0, -1); 1421 1420 } 1422 1421 include/functions_post.php
r277 r280 4 4 global $tor_comment_last_read, $req_comment_last_read, $off_comment_last_read; 5 5 global $bb_code; 6 global $seo; 6 7 static $ranks; 7 8 … … 145 146 if ( $row['comment_editedby'] ) { 146 147 if ( $row['edited_by_username'] ) { 148 // www.phpBB-SEO.com SEO TOOLKIT START 149 $seo->set_user_url($row['edited_by_username'], $row['comment_editedby']); 150 // www.phpBB-SEO.com SEO TOOLKIT END 151 147 152 $u_edited_by = append_sid($root_path . 'userdetails.php?id=' . $row['comment_editedby']); 148 153 $edited_by_username = $row['edited_by_username']; … … 200 205 } 201 206 207 // www.phpBB-SEO.com SEO TOOLKIT START 208 $seo->set_user_url($username, $row['comment_user']); 209 // www.phpBB-SEO.com SEO TOOLKIT END 210 202 211 $comments[] = array( 203 212 'U_USERDETAILS' => append_sid($root_path . 'userdetails.php?id=' . $row['comment_user']), … … 265 274 $userslist .= ( $userslist ? ', ' : '' ); 266 275 276 // www.phpBB-SEO.com SEO TOOLKIT START 277 $seo->set_user_url($users['name'], $users['uid']); 278 // www.phpBB-SEO.com SEO TOOLKIT END 279 267 280 $userslist .= '<a href="' . append_sid($root_path . 'userdetails.php?id=' . $users['uid']) . '"><span class="' . ( $users['simpaty'] ? 'usergoodResp' : 'userbadResp' ) . '">' . $users['name'] . '</span></a>'; 268 281 } … … 321 334 global $userdata, $lang, $template, $config, $images, $db, $cache, $root_path; 322 335 global $bb_code; 336 global $seo; 323 337 static $ranks; 324 338 … … 376 390 $text = $bb_code->get_html(); 377 391 392 // www.phpBB-SEO.com SEO TOOLKIT START 393 $seo->set_user_url($row['edited_by_username'], $row['comment_editedby']); 394 $seo->set_user_url($username, $row['user']); 395 // www.phpBB-SEO.com SEO TOOLKIT END 378 396 379 397 $edited_by_link = ( $row['edited_by_username'] ? '<a href="' . append_sid($root_path . 'userdetails.php?id=' . $row['comment_editedby']) . '"><b>' . $row['edited_by_username'] . '</b></a>' : '<i>' . $lang['unknown'] . '</i>'); include/functions_torrenttable.php
r269 r280 19 19 function torrenttable($ary, $bookmarks = false) { 20 20 global $userdata, $lang, $config, $template, $images, $cats, $theme, $root_path; 21 global $seo; 21 22 // sorting by MarkoStamcar 22 23 … … 107 108 } 108 109 109 $torrent_actions = array('free', ' unfree', 'move', 'ban', 'unban', 'hide', 'unhide', 'moderate', 'unmoderate', 'delete', 'disable_comments', 'enable_comments');110 $torrent_actions = array('free', 'free_silver', 'free_bronze', 'unfree', 'move', 'ban', 'unban', 'hide', 'unhide', 'moderate', 'unmoderate', 'delete', 'disable_comments', 'enable_comments'); 110 111 $torrent_action_options = ''; 111 112 foreach ( $torrent_actions AS $_null => $action ) { … … 123 124 'TORRENT_ACTION_OPTIONS' => $torrent_action_options, 124 125 125 'IMAGE_FREE_DOWNLOAD' => $images['freedownload'],126 127 126 'THEME_HIDDEN_TORRENT_COLOR' => $theme['hidden_torrent_color'], 128 127 )); … … 144 143 $dispname = censor_text($dispname); 145 144 $hidden_color = ( $ary[$i]['hidden'] ? 'bgcolor="#' . $theme['hidden_torrent_color'] . '" ':''); 145 146 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 147 if ( $cat_parent_id ) { 148 $seo->set_url($cats[$cat_parent_id]['cat_name'], $cat_parent_id, $seo->seo_static['browse']); 149 $seo->set_parent($cat_id, $seo->seo_static['browse'], $cat_parent_id, $seo->seo_static['browse']); 150 } 151 152 $seo->set_url($cats[$cat_id]['cat_name'], $cat_id, $seo->seo_static['browse']); 153 154 $seo->set_parent($id, $seo->seo_static['details'], $cat_id, $seo->seo_static['browse']); 155 156 $seo->set_url($dispname, $id, $seo->seo_static['details']); 157 $seo->set_user_url($ary[$i]['username'], $ary[$i]['owner']); 158 // www.phpBB-SEO.com SEO TOOLKIT END 146 159 147 160 $dispname = ( $highlight ? highlight_text($search, $dispname) : $dispname ); … … 220 233 'MODERATED' => $moderated, 221 234 'HIDDEN_COLOR' => $hidden_color, 222 'TORRENT_FREE ' => $ary[$i]['free'],235 'TORRENT_FREE_ICON' => get_free_icon($ary[$i]['free']), 223 236 'TORRENT_HIDDEN' => $ary[$i]['hidden'], 224 237 'TORRENT_COMMENTS' => $ary[$i]['comments'], include/functions_utf.php
r225 r280 497 497 } 498 498 } 499 500 /** 501 * UTF-8 aware alternative to str_split 502 * Convert a string to an array 503 * 504 * @author Harry Fuecks 505 * @param string $str UTF-8 encoded 506 * @param int $split_len number to characters to split string by 507 * @return array characters in string reverses 508 */ 509 function utf_str_split($str, $split_len = 1) 510 { 511 if (!is_int($split_len) || $split_len < 1) 512 { 513 return false; 514 } 515 516 $len = utf_strlen($str); 517 if ($len <= $split_len) 518 { 519 return array($str); 520 } 521 522 preg_match_all('/.{' . $split_len . '}|[^\x00]{1,' . $split_len . '}$/us', $str, $ar); 523 return $ar[0]; 524 } 499 525 ?> include/modtask/edituser.php
r248 r280 1 1 <?php 2 2 3 $updateset = array(); 4 $modcomment = array(); 5 $pm_ary = array(); 6 $user_limit_ary_torrents = unserialize($config['user_limit_ary_torrents']); 7 $user_limit_ary_allow_download = unserialize($config['user_limit_ary_allow_download']); 8 3 require_once ($root_path . 'include/functions_selects.php'); 4 require_once ($root_path . 'include/bbcode/bbcode.lib.php'); 5 require_once ($root_path . 'include/functions_check.php'); 6 7 $do = request_var('do', ''); 9 8 $userid = request_var('userid', 0); 10 $avatar = request_var('avatar', ''); 11 $class = request_var('class', ''); 12 $download = request_var('download', ''); 13 $upload = request_var('upload', ''); 14 $warned = request_var('warned', 0); 15 $warnlength = request_var('warnlength', 0); 16 $warnpm = request_var('warnpm', ''); 17 $enabled = request_var('enabled', 0); 18 $hiddentorrents = request_var('hiddentorrents', 0); 19 $autodemote = request_var('autodemote', 0); 20 21 $sql = 'SELECT u.*, s.* 22 FROM ' . USERS_TABLE . ' u LEFT JOIN ' . SESSIONS_TABLE . ' s ON ( u.uid = s.session_user_id ) 23 WHERE u.uid = ' . $userid; 24 $result = $db->sql_query($sql); 25 if ( !($this_userdata = $db->sql_fetchrow($result)) ) { 26 trigger_error(sprintf($lang['invalid_id'], $userid)); 9 10 switch ( $do ) { 11 case 'edit': 12 $updateset = array(); 13 $modcomment = array(); 14 $pm_ary = array(); 15 $pms = array(); 16 $change_set = array(); 17 $user_limit_ary_torrents = unserialize($config['user_limit_ary_torrents']); 18 $user_limit_ary_allow_download = unserialize($config['user_limit_ary_allow_download']); 19 20 $sql = 'SELECT u.*, s.* 21 FROM ' . USERS_TABLE . ' u LEFT JOIN ' . SESSIONS_TABLE . ' s ON ( u.uid = s.session_user_id ) 22 WHERE u.uid = ' . $userid; 23 $result = $db->sql_query($sql); 24 if ( !$this_userdata = $db->sql_fetchrow($result) ) { 25 trigger_error(sprintf($lang['invalid_id'], $userid)); 26 } 27 28 require_once ($root_path . 'languages/lang_' . $this_userdata['language'] . '/lang_pms.php'); 29 30 $user = request_var('user', array( '' => '' ) ); 31 32 if ( $user['avatar'] != $this_userdata['avatar'] ) { 33 if ( $user['avatar'] ) { 34 $avatar_prefix = ( ( strpos($this_userdata['avatar'], 'user_avatar_' . $this_userdata['uid']) === false && strpos($user['avatar'], '/') !== false ) ? '' : generate_base_url() . '/' . $config['avatar_path'] . '/' ); 35 if ( $error = check_remote_avatar($avatar_prefix . $user['avatar']) ) { 36 trigger_error($error); 37 } 38 $updateset[] = "avatar = '" . $db->sql_escape($user['avatar']) . "'"; 39 } 40 else { 41 $updateset[] = "avatar = ''"; 42 } 43 44 $change_set['avatar'] = true; 45 } 46 47 if ( $user['class'] != $this_userdata['class'] && $user['class'] !== '' ) { 48 49 if ( !check_user_class($user['class']) ) { 50 trigger_error(sprintf($lang['invalid_id'], $user['class'])); 51 } 52 if ( $user['class'] >= $userdata['class'] ) { 53 trigger_error($lang['access_denied']); 54 } 55 56 if ( $user['class'] == UC_PEASANT ) { 57 $updateset[] = 'can_leech = ' . $can_leech = ( isset($user_limit_ary_allow_download[UC_PEASANT]) ? 1 : 0 ); 58 } 59 else { 60 $updateset[] = 'torrents_limit = ' . $user_limit_ary_torrents[$user['class']]; 61 } 62 $updateset[] = 'class = ' . $user['class']; 63 //$modcomment[] = sprintf($lang['modcomment_demoted_promoted_to_class'], 't' . time(), ($class > $this_userdata['class'] ? $lang['promote'] : $lang['demote'] ), get_user_class_name($class), $userdata['name'] ); 64 65 $pms['class']['msg'] = sprintf($lang['pm_class_changed_body'], ($user['class'] > $this_userdata['class'] ? $lang['promoted'] : $lang['demoted']), get_user_class_name($user['class']), $userdata['name'] ); 66 $pms['class']['subject'] = sprintf($lang['pm_class_changed_subject'], ($user['class'] > $this_userdata['class'] ? $lang['promote'] : $lang['demote'] ) ); 67 68 switch ( $user['class'] ) { 69 case UC_SYSOP: 70 case UC_ADMINISTRATOR: 71 $updateset[] = 'user_level = ' . ADMIN; 72 break; 73 74 case UC_MODERATOR: 75 $updateset[] = 'user_level = ' . MOD; 76 break; 77 78 default: 79 $updateset[] = 'user_level = ' . USER; 80 break; 81 } 82 83 $change_set['class'] = get_user_class_name($user['class']); 84 } 85 86 if ( $user['upload'] != $this_userdata['upload'] || $user['download'] != $this_userdata['download'] ) { 87 if ( !check_internet_speed($user['upload']) || !check_internet_speed($user['download']) ) { 88 trigger_error($lang['speed_invalid']); 89 } 90 else { 91 $updateset[] = 'download = ' . $user['download']; 92 $updateset[] = 'upload = ' . $user['upload']; 93 } 94 95 $change_set['internet_speed'] = $user['upload'] . ' ' . $user['download']; 96 } 97 98 if ( !$this_userdata['warneduntil'] && $user['warnlength'] ) { 99 $warneduntil = time() + $user['warnlength'] * 604800; 100 $dur = ( $user['warnlength'] * 7 ); 101 102 $user['enabled'] = ( $this_userdata['warn'] >= $config['max_warn_for_user'] ? 0 : $user['enabled'] ); 103 104 if ( $user['enabled'] ) { 105 106 $pms['warned']['msg'] = sprintf($lang['pm_warn_received_body'], $dur, $userdata['name'], $user['comment']); 107 $pms['warned']['subject'] = $lang['pm_warn_received_subject']; 108 109 $updateset[] = 'warneduntil = ' . $warneduntil; 110 $updateset[] = 'warn = warn + 1'; 111 $updateset[] = 'torrents_limit = ' . $user_limit_ary_torrents['W']; 112 113 $change_set['warned'] = $user['warnlength'] . ' ' . $lang['week']; 114 } 115 } 116 elseif ( $this_userdata['warneduntil'] && !$user['warned'] ) { 117 118 $pms['warned']['msg'] = sprintf($lang['pm_warn_deleted_body'], $userdata['name']); 119 $pms['warned']['subject'] = $lang['pm_warn_deleted_subject']; 120 121 $updateset[] = 'warneduntil = 0'; 122 $updateset[] = 'torrents_limit = ' . $user_limit_ary_torrents[$this_userdata['class']]; 123 //$modcomment[] = sprintf($lang['modcomment_warn_deleted'], 't' . time(), $userdata['name']); 124 125 $change_set['warned'] = $lang['no']; 126 } 127 128 if ( $user['enabled'] != $this_userdata['enabled'] ) { 129 //$modcomment[] = sprintf($lang['modcomment_account_enabled_disabled'], 't' . time(), ( $enabled ? $lang['enabled'] : $lang['disabled'] ), $userdata['name'] ); 130 if ( !$user['enabled'] ) { 131 session_reset_keys($this_userdata['uid'], $this_userdata['ip']); 132 } 133 134 $updateset[] = 'enabled = ' . $user['enabled']; 135 136 $change_set['enabled'] = ( $user['enabled'] ? $lang['yes'] : $lang['no'] ); 137 } 138 139 if ( !empty($user['resetpasskey']) ) { 140 $torrent_pass = md5($this_userdata['name'] . time() . $this_userdata['pass']); 141 $updateset[] = 'torrent_pass=\'' . $db->sql_escape($torrent_pass) . '\''; 142 143 $change_set['passkey'] = true; 144 } 145 146 if ( $user['hiddentorrents'] != $this_userdata['hiddentorrents'] ) { 147 $updateset[] = 'hiddentorrents = ' . $user['hiddentorrents'] ; 148 149 $change_set['see_hidden_torrents'] = ( $user['hiddentorrents'] ? $lang['yes'] : $lang['no'] ); 150 } 151 152 if ( $user['autodemote'] != $this_userdata['autodemote'] ) { 153 $updateset[] = 'autodemote = ' . $user['autodemote']; 154 155 $change_set['may_be_autodemoted'] = ( $user['autodemote'] ? $lang['yes'] : $lang['no'] ); 156 } 157 158 if ( sizeof($change_set) && empty($user['comment']) ) { 159 trigger_error('post_something'); 160 } 161 elseif ( !sizeof($change_set) && !empty($user['comment']) ) { 162 $modcomment[] = $lang['posted'] . ': "' . $user['comment'] . '"'; 163 } 164 165 $changes = array( 166 'warned' => array( 167 'send_pm' => true, 168 'send_mail' => false 169 ), 170 171 'enabled' => array( 172 'send_pm' => false, 173 'send_mail' => true 174 ), 175 176 'class' => array( 177 'send_pm' => true, 178 'send_mail' => false 179 ), 180 181 'may_be_autodemoted' => array( 182 'send_pm' => false, 183 'send_mail' => false 184 ), 185 186 'see_hidden_torrents' => array( 187 'send_pm' => false, 188 'send_mail' => false 189 ), 190 191 'passkey' => array( 192 'send_pm' => false, 193 'send_mail' => false 194 ), 195 196 'internet_speed' => array( 197 'send_pm' => false, 198 'send_mail' => false 199 ), 200 201 'avatar' => array( 202 'send_pm' => false, 203 'send_mail' => false 204 ), 205 ); 206 207 $send_mail = false; 208 $mail_txt = array(); 209 210 foreach ( $changes AS $key => $val ) { 211 if ( isset($change_set[$key]) ) { 212 213 if ( $val['send_pm'] ) { 214 echo $key; 215 216 $pm_ary[] = array( 217 'sender' => 0, 218 'receiver' => $userid, 219 'msg' => $pms[$key]['msg'], 220 'subject' => $pms[$key]['subject'], 221 222 'name' => $this_userdata['name'], 223 'email' => $this_userdata['email'], 224 'notifs' => $this_userdata['notifs'], 225 'language' => $this_userdata['language'], 226 'class' => $this_userdata['class'] 227 ); 228 } 229 230 if ( $val['send_mail'] ) { 231 $send_mail = true; 232 $mail_txt[] = $lang[$key] . ': ' . $change_set[$key]; 233 } 234 235 $modcomment[] = sprintf($lang['modcomment_user_state_changed'], $lang[$key], $change_set[$key]); 236 237 } 238 } 239 240 send_pm($pm_ary); 241 242 if ( $send_mail ) { 243 require_once($root_path . 'include/functions_messenger.php'); 244 $messenger = new messenger(false); 245 $messenger->template('account_status_changed', $this_userdata['language']); 246 $messenger->replyto($this_userdata['email']); 247 $messenger->to($this_userdata['email'], $this_userdata['name']); 248 $messenger->assign_vars(array( 249 'USERNAME' => html_entity_decode($this_userdata['name']), 250 'MESSAGE' => implode("\n", $mail_txt), 251 'MOD_NAME' => $userdata['name'], 252 'REASON' => $user['comment'], 253 )); 254 $messenger->send(NOTIFY_EMAIL); 255 } 256 257 if ( sizeof($modcomment) ) { 258 $modcomment = 't' . time() . ' ' . $userdata['name'] . ' ' . implode('; ', $modcomment); 259 if ( sizeof($change_set) ) { 260 $modcomment .= ' ' . $lang['reason'] . ': "' . $user['comment'] . '"'; 261 } 262 $modcomment = $this_userdata['modcomment'] . ( $this_userdata['modcomment'] ? "\n" : '' ) . $modcomment; 263 $updateset[] = 'modcomment = \'' . $db->sql_escape($modcomment) . '\''; 264 } 265 266 if ( sizeof($updateset) ) { 267 $sql = 'UPDATE ' . USERS_TABLE . ' SET ' . implode(', ', $updateset) . ' WHERE uid = ' . $userid; 268 $db->sql_query($sql); 269 270 if ( !empty($change_set['class']) ) { 271 $sql = 'UPDATE ' . USER_GROUP_TABLE . ' SET group_id = ' . $phpbb_class[$user['class']] . ' WHERE user_id = ' . $userid . ' AND group_id IN (' . implode(', ', $phpbb_class) . ')'; 272 $db->sql_query($sql); 273 } 274 } 275 276 if ( isset($change_set['warned']) ) { 277 if ( $user['warnlength'] ) { 278 update_reputation($this_userdata, SIMPATY_WARN, 1); 279 } 280 else { 281 update_reputation($this_userdata, SIMPATY_WARN, 0); 282 } 283 } 284 285 $seo->set_user_url($this_userdata['name'], $userid); 286 redirect( append_sid($root_path . 'userdetails.php?id=' . $userid)); 287 break; 288 289 default: 290 if ( $userdata['class'] >= UC_MODERATOR && $user['class'] < $userdata['class'] ) { 291 292 $maxclass = ( $userdata['class'] == UC_MODERATOR ? UC_POWER_USER : $userdata['class'] - 1 ); 293 $class_select = ( $user['class'] > UC_POWER_USER && $userdata['class'] == UC_MODERATOR ? '' : user_class_select($user['class'], 'user[class]', $maxclass) ); 294 $uploadspeed = generate_internet_speed($user['upload'], 'user[upload]'); 295 $downloadspeed = generate_internet_speed($user['download'], 'user[download]'); 296 297 $modcomment = $user['modcomment']; 298 299 if ( $user['warneduntil'] ) { 300 $warneduntil = create_date($user['warneduntil']); 301 $warneduntil = sprintf($lang['warned_until'], $warneduntil); 302 $warnedago = sprintf($lang['warned_ago'], mkprettytime($user['warneduntil'] - time())); 303 304 $warn_input = ''; 305 } 306 else { 307 $warneduntil = 0; 308 $warnedago = 0; 309 310 $warn_ary = array( 311 0 => $lang['choose'], 312 1 => sprintf($lang['warn_week'], 1), 313 2 => sprintf($lang['warn_week'], 2), 314 4 => sprintf($lang['warn_week'], 4), 315 8 => sprintf($lang['warn_week'], 8), 316 ); 317 $warn_input = '<select name="user[warnlength]">' . "\n"; 318 foreach ( $warn_ary AS $key => $val ) { 319 $warn_input .= '<option value="' . $key . '">' . $val . '</option>' . "\n"; 320 } 321 $warn_input .= '</select>' . "\n"; 322 } 323 324 $modcomment = $user['modcomment']; 325 $modcomment = implode("\n", array_reverse(explode("\n", $modcomment))); 326 $modcomment = preg_replace('/t([0-9]{10})/e', "'[b]' . create_date('\\1') . '[/b]'", $modcomment); 327 $bb_code = new bbcode($modcomment); 328 $modcomment = $bb_code->get_html(); 329 330 $template->assign_vars(array( 331 'SHOW_EDIT_PANEL' => true, 332 333 'S_EDIT_FORM_ACTION' => append_sid($root_path . 'modtask.php?action=edituser&do=edit'), 334 'UPLOAD_SPEED_SELECT' => $uploadspeed, 335 'DOWNLOAD_SPEED_SELECT' => $downloadspeed, 336 'MODCOMMENT' => $modcomment, 337 'WARNED' => $warneduntil, 338 'WARNEDUNTIL' => $warneduntil, 339 'WARNEDAGO' => $warnedago, 340 'WARN_SELECT' => $warn_input, 341 'CLASS_SELECT' => $class_select, 342 'AVATAR_URL' => $user['avatar'], 343 'ENABLED_INPUT' => '<input name="user[enabled]" value="1" type="radio"' . ($enabled ? ' checked="checked"' : '') . ' /> ' . $lang['yes'] . ' <input name="user[enabled]" value="0" type="radio"' . (!$enabled ? ' checked="checked"' : '') . ' /> ' . $lang['no'], 344 'HIDDEN_TORRENTS_INPUT' => '<input name="user[hiddentorrents]" type="radio"' . ($user['hiddentorrents'] ? ' checked="checked"':'') . ' value="1" /> ' . $lang['yes'] . ' <input name="user[hiddentorrents]" value="0" type="radio"' . (!$user['hiddentorrents'] ? ' checked="checked"' : '') . ' /> ' . $lang['no'], 345 'AUTODEMOTE_INPUT' => '<input type="radio" name="user[autodemote]" value="1"' . ( $user['autodemote'] ? ' checked="checked"' : '') . ' /> ' . $lang['yes'] . ' <input type="radio" name="user[autodemote]" value="0" ' . ( !$user['autodemote'] ? ' checked="checked"' : '') . ' /> ' . $lang['no'] 346 )); 347 } 348 break; 27 349 } 28 350 29 if ( $avatar && $avatar != $this_userdata['avatar'] ) {30 $avatar_prefix = ( ( strpos($row['avatar'], 'user_avatar_' . $this_userdata['uid']) === false && strpos($avatar, '/') !== false ) ? '' : generate_base_url() . '/' . $config['avatar_path'] . '/' );31 if ( $error = check_remote_avatar($avatar_prefix . $avatar) ) {32 trigger_error($error);33 }34 $updateset[] = "avatar = '" . $db->sql_escape($avatar) . "'";35 }36 elseif ( !$avatar ) {37 $updateset[] = "avatar = ''";38 }39 40 if ( $class !== '' ) {41 if (!check_user_class($class)) {42 trigger_error(sprintf($lang['invalid_id'], $userid));43 }44 if ( $class >= $userdata['class'] ) {45 trigger_error($lang['access_denied']);46 }47 if ( $this_userdata['class'] != $class ) {48 require_once ($root_path . 'languages/lang_' . $this_userdata['language'] . '/lang_pms.php');49 50 if ( $class == UC_PEASANT ) {51 $updateset[] = 'can_leech = ' . $can_leech = ( isset($user_limit_ary_allow_download[UC_PEASANT]) ? 1 : 0 );52 }53 else {54 $updateset[] = 'torrents_limit = ' . $user_limit_ary_torrents[$class];55 }56 $updateset[] = 'class = ' . $class;57 $modcomment[] = sprintf($lang['modcomment_demoted_promoted_to_class'], 't' . time(), ($class > $this_userdata['class'] ? $lang['promote'] : $lang['demote'] ), get_user_class_name($class), $userdata['name'] );58 59 $pm_ary[] = array(60 'sender' => 0,61 'receiver' => $userid,62 'msg' => sprintf($lang['pm_class_changed_body'], ($class > $this_userdata['class'] ? $lang['promoted'] : $lang['demoted']), get_user_class_name($class), $userdata['name'] ),63 'subject' => sprintf($lang['pm_class_changed_subject'], ($class > $this_userdata['class'] ? $lang['promote'] : $lang['demote'] ) ),64 65 'name' => $this_userdata['name'],66 'email' => $this_userdata['email'],67 'notifs' => $this_userdata['notifs'],68 'language' => $this_userdata['language'],69 'class' => $this_userdata['class']70 );71 72 send_pm($pm_ary);73 74 switch ( $class ) {75 case UC_SYSOP:76 case UC_ADMINISTRATOR:77 $updateset[] = 'user_level = ' . ADMIN;78 break;79 80 case UC_MODERATOR:81 $updateset[] = 'user_level = ' . MOD;82 break;83 84 default:85 $updateset[] = 'user_level = ' . USER;86 break;87 }88 89 $sql = 'UPDATE ' . USERS_TABLE . ' SET user_unread_pms = user_unread_pms + 1 WHERE uid = ' . $userid;90 $db->sql_query($sql);91 92 $sql = 'UPDATE ' . USER_GROUP_TABLE . ' SET group_id = ' . $phpbb_class[$class] . ' WHERE user_id = ' . $userid . ' AND group_id IN (' . implode(', ', $phpbb_class) . ')';93 $db->sql_query($sql);94 }95 }96 97 if ( !check_internet_speed($upload) || !check_internet_speed($download) ) {98 trigger_error($lang['speed_invalid']);99 }100 else {101 $updateset[] = 'download = ' . $download;102 $updateset[] = 'upload = ' . $upload;103 }104 105 if ( !$warned && !$warnlength && $this_userdata['warneduntil'] ) {106 require_once ($root_path . 'languages/lang_' . $this_userdata['language'] . '/lang_pms.php');107 108 $pm_ary[] = array(109 'sender' => 0,110 'receiver' => $userid,111 'msg' => sprintf($lang['pm_warn_deleted_body'], $userdata['name']),112 'subject' => $lang['pm_warn_deleted_subject'],113 114 'name' => $this_userdata['name'],115 'email' => $this_userdata['email'],116 'notifs' => $this_userdata['notifs'],117 'language' => $this_userdata['language'],118 'class' => $this_userdata['class']119 );120 send_pm($pm_ary);121 122 $updateset[] = 'warneduntil = 0';123 $updateset[] = 'torrents_limit = ' . $user_limit_ary_torrents[$this_userdata['class']];124 $modcomment[] = sprintf($lang['modcomment_warn_deleted'], 't' . time(), $userdata['name']);125 126 update_reputation($this_userdata, SIMPATY_WARN, 0);127 }128 129 elseif ( $warnlength ) {130 require_once ($root_path . 'languages/lang_' . $this_userdata['language'] . '/lang_pms.php');131 132 if ( !$warnpm ) {133 trigger_error($lang['please_enter_reason_for_warn']);134 }135 $warneduntil = time() + ($warnlength * 604800);136 $dur = ( $warnlength * 7 );137 138 $pm_ary[] = array(139 'sender' => 0,140 'receiver' => $userid,141 'msg' => sprintf($lang['pm_warn_received_body'], $dur, $userdata['name'], $warnpm),142 'subject' => $lang['pm_warn_received_subject'],143 144 'name' => $this_userdata['name'],145 'email' => $this_userdata['email'],146 'notifs' => $this_userdata['notifs'],147 'language' => $this_userdata['language'],148 'class' => $this_userdata['class']149 );150 send_pm($pm_ary);151 152 $updateset[] = 'warneduntil = ' . $warneduntil;153 $updateset[] = 'warn = warn + 1';154 $updateset[] = 'torrents_limit = ' . $user_limit_ary_torrents['W'];155 $modcomment[] = sprintf($lang['modcomment_warn_added'], 't' . time() , $dur, $userdata['name'], $warnpm);156 $ban = ( $this_userdata['warn'] >= $config['max_warn_for_user'] ? 1 : 0 );157 158 update_reputation($this_userdata, SIMPATY_WARN, 1);159 }160 161 if ( $enabled != $this_userdata['enabled'] ) {162 $modcomment[] = sprintf($lang['modcomment_account_enabled_disabled'], 't' . time(), ( $enabled ? $lang['enabled'] : $lang['disabled'] ), $userdata['name'] );163 if ( !$enabled ) {164 session_reset_keys($this_userdata['uid'], $this_userdata['ip']);165 }166 }167 168 $updateset[] = ( isset($ban) && $ban ? 'enabled = 0' : 'enabled = ' . $enabled);169 170 if ( isset($_POST['resetpasskey']) ) {171 $torrent_pass = md5($this_userdata['name'] . time() . $this_userdata['pass']);172 $updateset[] = "torrent_pass='" . $torrent_pass . "'";173 }174 175 $updateset[] = 'hiddentorrents = ' . $hiddentorrents ;176 $updateset[] = 'autodemote = ' . $autodemote;177 178 if ( isset($modcomment) && sizeof($modcomment) ) {179 $current_modcomment = explode("\n", $this_userdata['modcomment']);180 if ( sizeof($current_modcomment) ) {181 $modcomment = array_merge($current_modcomment, $modcomment);182 }183 184 //now we try to delete some empty values from modcomment, they can creates by cleanup185 $new_modcomment = array();186 foreach( $modcomment AS $val ) {187 if (!empty($val)) {188 $new_modcomment[] = trim($val);189 }190 }191 $updateset[] = 'modcomment = ' . "'" . $db->sql_escape(implode("\n", $new_modcomment)) . "'" ;192 }193 194 $sql = 'UPDATE ' . USERS_TABLE . ' SET ' . implode(', ', $updateset) . ' WHERE uid = ' . $userid;195 $db->sql_query($sql);196 redirect( append_sid('userdetails.php?id=' . $userid));197 198 351 ?> include/modtask/mass_torrent_actions.php
r269 r280 39 39 $cat = ( isset($cats[$cats[$torrents_row['category']]['cat_parent']]) ? $cats[$cats[$torrents_row['category']]['cat_parent']] : 0 ); 40 40 41 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 42 $seo->set_url($cat['cat_name'], $cat['cat_id'], $seo->seo_static['browse']); 43 $seo->set_url($cats[$torrents_row['category']]['cat_name'], $torrents_row['category'], $seo->seo_static['browse']); 44 $seo->set_url(censor_text($torrents_row['name']), $torrents_row['fid'], $seo->seo_static['details']); 45 // www.phpBB-SEO.com SEO TOOLKIT END 46 41 47 $cat_name_display = ( $cat ? '<a href="' . append_sid($root_path . 'browse.php?cat=' . $cat['cat_id']) . '">' . $cat['cat_name'] . '</a> -> <a href="' . append_sid('browse.php?cat=' . $torrents_row['category']) . '">' . $cats[$torrents_row['category']]['cat_name'] . '</a>' : '' ); 42 48 … … 162 168 break; 163 169 170 case 'free_silver': 171 case 'free_bronze': 172 $edit_val = ( $do == 'free_silver' ? 2 : 4 ); 173 $field = 'free'; 174 $sub_do = 'mass'; 175 break; 176 164 177 case 'ban': 165 178 case 'unban': include/modtask/tags.php
r272 r280 32 32 if ( $row = $db->sql_fetchrow($result) ) { 33 33 do { 34 // www.phpBB-SEO.com SEO TOOLKIT START 35 $seo->set_user_url($row['name'], $row['uid']); 36 // www.phpBB-SEO.com SEO TOOLKIT END 34 37 35 38 $icons = get_user_icons($row); … … 44 47 } 45 48 else { 46 trigger_error( 'invalid_id');49 trigger_error(sprintf($lang['invalid_id'], $tag_for_id)); 47 50 } 48 51 include/sessions.php
r279 r280 518 518 { 519 519 global $config, $theme, $images; 520 global $template, $lang, $lang_js, $phpEx, $root_path, $db ;520 global $template, $lang, $lang_js, $phpEx, $root_path, $db, $seo; 521 521 522 522 if ( $userdata['uid'] != ANONYMOUS ) … … 685 685 foreach ( $images AS $key => $value ) { 686 686 if ( !is_array($value) ) { 687 $images[$key] = str_replace('{LANG}', 'lang_' . $img_lang, $value); 687 $value = str_replace('{LANG}', 'lang_' . $img_lang, $value); 688 $images[$key] = $value; 689 690 $template->assign_vars(array( 691 'TEMPLATE_IMAGE_' . strtoupper($key) => $value 692 )); 688 693 } 689 694 } … … 951 956 { 952 957 global $SID, $_EXTRA_URL; 958 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 959 // We bypass the hook function here, the same effect as a standalone hook, which we want, but faster ;-) 960 global $seo; 961 if (!empty($seo->seo_opt['url_rewrite'])) { 962 return $seo->url_rewrite($url, $params, $is_amp, $session_id); 963 } else 964 // www.phpBB-SEO.com SEO TOOLKIT END 953 965 954 966 // Assign sid if session id is not specified include/ucp/checkcomm.php
r269 r280 65 65 66 66 $cat_id = $row[$table . '_category']; 67 68 if ( isset($cats[$cats[$cat_id]['cat_parent']]['cat_name']) ) { 69 $cat_parent = $cats[$cats[$cat_id]['cat_parent']]; 70 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 71 $seo->set_url($cat_parent['cat_name'], $cat_parent['cat_id'], $seo->seo_static['browse']); 72 $seo->set_parent($cats[$cat_id]['cat_id'], $seo->seo_static['browse'], $cat_parent['cat_id'], $seo->seo_static['browse']); 73 // www.phpBB-SEO.com SEO TOOLKIT END 74 } 75 76 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 77 $seo->set_url($cats[$cat_id]['cat_name'], $cats[$cat_id]['cat_id'], $seo->seo_static['browse']); 78 $seo->set_parent($row['checkcomm_for_id'], $seo->seo_static[$filename], $cats[$cat_id]['cat_id'], $seo->seo_static['browse']); 79 $seo->set_url($row[$table . '_name'], $row['checkcomm_for_id'], $seo->seo_static[$filename]); 80 // www.phpBB-SEO.com SEO TOOLKIT END 81 67 82 if ( $row['uid'] <> ANONYMOUS ) { 68 83 $u_last_poster = append_sid('userdetails.php?id=' . $row['uid']); index.php
r274 r280 12 12 $result = $db->sql_query_limit($sql, 1, 0, 20 * 60); 13 13 if ($row = $db->sql_fetchrow($result)) { 14 15 // www.phpBB-SEO.com SEO TOOLKIT START 16 $seo->set_user_url($row['name'], $row['uid']); 17 // www.phpBB-SEO.com SEO TOOLKIT END 14 18 15 19 $latestuser = ( $userdata['session_logged_in'] ? '<a href="' . append_sid($root_path . 'userdetails.php?id=' . $row['uid']) . '"><b>' . $row['name'] . '</b></a>' : '<b>' . $row['name'] . '</b>' ); … … 27 31 if ( $birthday_arr = $db->sql_fetchrow($result) ) { 28 32 do { 33 // www.phpBB-SEO.com SEO TOOLKIT START 34 $seo->set_user_url($birthday_arr['name'], $birthday_arr['uid']); 35 // www.phpBB-SEO.com SEO TOOLKIT END 29 36 30 37 $age = get_age($birthday_arr['birthday']); … … 295 302 $cat_parent_id = ( isset($cats[$cats[$cat_id]['cat_parent']]['cat_id']) ? $cats[$cats[$cat_id]['cat_parent']]['cat_id'] : 0 ); 296 303 304 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 305 if ( $cat_parent_id ) { 306 $seo->set_url($cats[$cat_parent_id]['cat_name'], $cat_parent_id, $seo->seo_static['browse']); 307 $seo->set_parent($cat_id, $seo->seo_static['browse'], $cat_parent_id, $seo->seo_static['browse']); 308 } 309 $seo->set_url($cats[$cat_id]['cat_name'], $cat_id, $seo->seo_static['browse']); 310 $seo->set_parent($row['torrent_id'], $seo->seo_static['details'], $cat_id, $seo->seo_static['browse']); 311 312 $seo->set_url($row['torrent_name'], $row['torrent_id'], $seo->seo_static['details']); 313 // www.phpBB-SEO.com SEO TOOLKIT END 297 314 298 315 $description = censor_text($row['description']); js/ajax_common.js
r269 r280 33 33 34 34 function sos(torrent_id) { 35 if ( confirm( sos_confirm) ) {35 if ( confirm(L_JS_SOS_CONFIRM) ) { 36 36 document.getElementById('sos_button').disabled = true; 37 37 languages/lang_english/lang_js.php
r269 r280 10 10 'js_marked' => 'Отметили', 11 11 'js_are_you_sure_delete_tag' => 'Вы уверены, что хотите удалить тег', 12 'js_sos_confirm' => 'Are you sure, that you want to send SOS? Query can be sent only once per torrent. False query can be a reason for warning', 12 13 ); 13 14 languages/lang_english/lang_main.php
r274 r280 200 200 'search_explain' => 'You can use "AND" to define the words that will be in the search results, "OR" to define words which may be in the results, "NOT" to define words that shouldn\'t be on the results page.', 201 201 'search_flood_error' => 'Site\'s Administrator enables flood control in search. Please wait %d seconds.', 202 'free' => 'Free',203 202 'only_hidden' => 'Only hidden', 204 203 'only_banned' => 'Only banned', … … 405 404 'moderated' => 'Moderated', 406 405 'free' => 'Free download', 406 'free_silver' => 'Free download (silver)', 407 'free_bronze' => 'Free download (bronze)', 407 408 'free_description' => 'Free download (counting only upload)', 408 409 'disable_comments' => 'Disable comments', … … 476 477 'report_descr' => 'Click <a href="%s"><b>here</b></a> to report broken rules in this torrent.', 477 478 'sos' => 'SOS', 478 'sos_confirm' => 'Are you sure, that you want to send SOS? Query can be sent only once per torrent. False query can be a reason for warning',479 479 'sos_descr' => 'Click this button to write all who have downloaded this torrent, request to supply the upload', 480 480 'thanks' => 'Thanks', … … 594 594 'bad' => 'bad', 595 595 'helpdesc_standart_answers' => array( 596 'Read FAQ (RTFM)' => 'Read [url= %s/faq.php][b]FAQ[/b][/url], answer can be located somewhere inside...',597 'Use search on forum' => 'Use [url= %s/phpbb2.php?page=search][b]search[/b][/url] on forum please.',596 'Read FAQ (RTFM)' => 'Read [url=' . $seo->drop_sid(append_sid($root_path . 'faq.php')) . '][b]FAQ[/b][/url], answer can be located somewhere inside...', 597 'Use search on forum' => 'Use [url=' . $seo->drop_sid(append_sid($root_path . 'phpbb2.php?page=search')) . '][b]search[/b][/url] on forum please.', 598 598 'LMAO' => 'Die! Even my granny knows how to do this!' 599 599 ), … … 1191 1191 1192 1192 'torrent_action_free' => 'Free', 1193 'torrent_action_free_silver' => 'Free (silver)', 1194 'torrent_action_free_bronze' => 'Free (bronze)', 1193 1195 'torrent_action_unfree' => 'Unfree', 1194 1196 'torrent_action_move' => 'Move', languages/lang_english/lang_modcomment_log.php
r279 r280 31 31 'modcomment_changed_points_to_warn' => '%s - changed %s bonus points for delete one warn', 32 32 'modcomment_changed_points_to_reputation' => '%s - changed %s bonus points for %s reputation', 33 'modcomment_user_state_changed' => 'changed status "%s", new value: "%s"', 33 34 34 35 )); languages/lang_russian/lang_faq.php
r245 r280 103 103 1 => 'Сначала необходимо подобрать картинку, соответствующую <a href="' . append_sid('rules.php') . '">правилам</a>. После этого необходимо найти сайт, например, <a href="http://photobucket.com/">Photobucket</a> или <a href="http://uploadit.org/">Upload-It!</a>, где вы сможете разместить свою картинку. 104 104 Адрес URL, который вам выдадут при размещении файла, вы должны поместить в поле Аватар в <a href="' . append_sid('my.php') . '">своем профиле</a>.<br /> 105 Пожалуйста, не делайте посты в форуме только лишь для того, чтобы протестировать аватар. Если всё сделано правильно, вы увидите аватар на вашей ' . ( $userdata['session_logged_in'] ? '<a href="' . append_sid( 'userdetails.php?id=' . $userdata['uid']) . '">' : '' ) . 'личной странице' . ( $userdata['session_logged_in'] ? '</a>' : '' ),105 Пожалуйста, не делайте посты в форуме только лишь для того, чтобы протестировать аватар. Если всё сделано правильно, вы увидите аватар на вашей ' . ( $userdata['session_logged_in'] ? '<a href="' . append_sid($root_path . 'userdetails.php?id=' . $userdata['uid']) . '">' : '' ) . 'личной странице' . ( $userdata['session_logged_in'] ? '</a>' : '' ), 106 106 ), 107 107 array( … … 112 112 ), 113 113 array( 114 0 => 'А что это за значок <img src="' . $images['free download'] . '" alt="" /> около торрента в списке?',114 0 => 'А что это за значок <img src="' . $images['free_download_gold'] . '" alt="" /> около торрента в списке?', 115 115 1 => 'Такой значок присваивается "бесплатным" торрентам. Это означает, что при его скачивании у вас будет считаться только количество отданной информации. Все скаченные на этом торренте данные не будут учтены в глобальной статистике.' 116 ), 117 array( 118 0 => 'А что это за значок <img src="' . $images['free_download_silver'] . '" alt="" /> около торрента в списке?', 119 1 => 'Такой значок присваивается "бесплатным серебрянным" торрентам. Это означает, что при его скачивании у вас будет считаться только 50% от количества скачанной информации.' 120 ), 121 array( 122 0 => 'А что это за значок <img src="' . $images['free_download_bronze'] . '" alt="" /> около торрента в списке?', 123 1 => 'Такой значок присваивается "бесплатным бронзовым" торрентам. Это означает, что при его скачивании у вас будет считаться только 75% от количества скачанной информации.' 116 124 ), 117 125 array( languages/lang_russian/lang_js.php
r269 r280 10 10 'js_marked' => 'Отметили', 11 11 'js_are_you_sure_delete_tag' => 'Вы уверены, что хотите удалить тег', 12 'js_sos_confirm' => 'Вы уверены, что хотите послать запрос о помощи? Учтите, что запрос можно послать лишь один раз для одного торрента. Ложный вызов может быть причиной для предупреждения', 12 13 ); 13 14 languages/lang_russian/lang_main.php
r274 r280 208 208 'search_explain' => 'Вы можете использовать AND чтобы определить слова, которые должны быть в результатах, OR для слов, которые могут быть в результатах, и NOT для слов, которых в результатах быть не должно. Используйте * в качестве шаблона для частичного совпадения.', 209 209 'search_flood_error' => 'Администратор этого сайта включил флуд-контроль в поиске. Пожалуйста подождите %d секунд.', 210 'free' => 'Бесплатные',211 210 'only_hidden' => 'Только скрытые торренты', 212 211 'only_banned' => 'Только забаненные торренты', … … 414 413 'moderated' => 'Проверен', 415 414 'free' => 'Свободное скачивание', 415 'free_silver' => 'Свободное скачивание (серебро)', 416 'free_bronze' => 'Свободное скачивание (бронза)', 416 417 'free_description' => 'Свободное скачивание (считается только аплоад)', 417 418 'disable_comments' => 'Отключить комментирование', … … 485 486 'report_descr' => 'Кликните <a href="%s"><b>здесь</b></a> чтобы сообщить персоналу о нарушении правил в этом торренте', 486 487 'sos' => 'SOS', 487 'sos_confirm' => 'Вы уверены, что хотите послать запрос о помощи? Учтите, что запрос можно послать лишь один раз для одного торрента. Ложный вызов может быть причиной для предупреждения',488 488 'sos_descr' => 'Нажмите эту кнопку, чтобы написать всем скачавшим этот торрент просьбу поддержать раздачу', 489 489 'thanks' => 'Спасибо', … … 603 603 'bad' => 'плохо', 604 604 'helpdesc_standart_answers' => array( 605 'Прочтите FAQ' => 'Сначала прочтите [url= %s/faq.php][b]FAQ[/b][/url], там есть ответ на ваш вопрос!',606 'Воспользуйтесь поиском по форуму' => 'Воспользуйтесь [url= %s/phpbb2.php?page=search][b]поиском[/b][/url] на форуме пожалуйста.',605 'Прочтите FAQ' => 'Сначала прочтите [url=' . $seo->drop_sid(append_sid($root_path . 'faq.php')) . '][b]FAQ[/b][/url], там есть ответ на ваш вопрос!', 606 'Воспользуйтесь поиском по форуму' => 'Воспользуйтесь [url=' . $seo->drop_sid(append_sid($root_path . 'phpbb2.php?page=search')) . '][b]поиском[/b][/url] на форуме пожалуйста.', 607 607 'Умри ламер' => 'Умри ламер! Такие вещи знает даже моя бабушка!' 608 608 ), … … 1201 1201 1202 1202 'torrent_action_free' => 'Свободное скачивание', 1203 'torrent_action_free_silver' => 'Свободное скачивание (серебро)', 1204 'torrent_action_free_bronze' => 'Свободное скачивание (бронза)', 1203 1205 'torrent_action_unfree' => 'Снять свободное скачивание', 1204 1206 'torrent_action_move' => 'Переместить', languages/lang_russian/lang_modcomment_log.php
r279 r280 31 31 'modcomment_changed_points_to_warn' => '%s - обменено %s очков сидирования на снятие одного предупреждения', 32 32 'modcomment_changed_points_to_reputation' => '%s - обменено %s очков сидирования на %s репутации', 33 'modcomment_user_state_changed' => 'изменил статус "%s", новое значение: "%s"', 33 34 34 35 )); log.php
r272 r280 187 187 $cat_id = $tor_ary[$id]['category']; 188 188 $cat_parent_id = ( isset($cats[$cats[$cat_id]['cat_parent']]['cat_id']) ? $cats[$cats[$cat_id]['cat_parent']]['cat_id'] : 0 ); 189 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 190 if ( $cat_parent_id ) { 191 $seo->set_url($cats[$cat_parent_id]['cat_name'], $cat_parent_id, $seo->seo_static['browse']); 192 $seo->set_parent($cat_id, $seo->seo_static['browse'], $cat_parent_id, $seo->seo_static['browse']); 193 } 194 195 $seo->set_url($cats[$cat_id]['cat_name'], $cat_id, $seo->seo_static['browse']); 196 197 $seo->set_parent($id, $seo->seo_static['details'], $cat_id, $seo->seo_static['browse']); 198 199 $seo->set_url($tor_ary[$id]['name'], $id, $seo->seo_static['details']); 200 // www.phpBB-SEO.com SEO TOOLKIT END 189 201 190 202 $text = preg_replace('/<!--S-->TORRENT_' . $id . '_(.*?)<!--E-->/', '<a href="' . append_sid($root_path . 'details.php?id=' . $id) . '">' . $tor_ary[$id]['name'] . '</a>', $text); … … 202 214 } 203 215 else { 216 // www.phpBB-SEO.com SEO TOOLKIT START 217 $seo->set_user_url($user_ary[$id]['name'], $id); 218 // www.phpBB-SEO.com SEO TOOLKIT END 204 219 205 220 $text = preg_replace('/<!--S-->USER_' . $id . '_(.*?)<!--E-->/', '<a href="' . append_sid($root_path . 'userdetails.php?id=' . $id) . '">' . $user_ary[$id]['name'] . '</a>', $text); offers.php
r269 r280 174 174 $cat_id = $row['category']; 175 175 $cat_parent_id = ( isset($cats[$cats[$cat_id]['cat_parent']]['cat_id']) ? $cats[$cats[$cat_id]['cat_parent']]['cat_id'] : 0 ); 176 177 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 178 if ( $cat_parent_id ) { 179 $seo->set_url($cats[$cat_parent_id]['cat_name'], $cat_parent_id, $seo->seo_static['browse']); 180 $seo->set_parent($cat_id, $seo->seo_static['browse'], $cat_parent_id, $seo->seo_static['browse']); 181 } 182 183 $seo->set_url($cats[$cat_id]['cat_name'], $cat_id, $seo->seo_static['browse']); 184 185 $seo->set_parent($filled_torrent_id, $seo->seo_static['details'], $cat_id, $seo->seo_static['browse']); 186 187 $seo->set_url($torrent_name, $filled_torrent_id, $seo->seo_static['details']); 188 189 $seo->set_user_url($userdata['name'], $userdata['uid']); 190 // www.phpBB-SEO.com SEO TOOLKIT END 191 176 192 if ( $config['mod_rewrite_enabled'] ) { 177 $u_offer = append_sid($root_path . 'offers.php?id=' . $id, false, true, ''); 178 $u_userdetails = append_sid($root_path . 'userdetails.php?id=' . $userdata['uid'], false, true, ''); 179 $u_details = append_sid($root_path . 'details.php?id=' . $filled_torrent_id, false, true, ''); 193 $u_offer = append_sid($root_path . 'offers.php?id=' . $id); 194 $u_offer = $seo->drop_sid($u_offer); 195 $u_userdetails = append_sid($root_path . 'userdetails.php?id=' . $userdata['uid']); 196 $u_userdetails = $seo->drop_sid($u_userdetails); 197 $u_details = append_sid($root_path . 'details.php?id=' . $filled_torrent_id); 198 $u_details = $seo->drop_sid($u_details); 180 199 } 181 200 else { … … 533 552 if ( $count ) { 534 553 while ( $row = $db->sql_fetchrow($result) ) { 554 555 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 556 if ( $row['filled'] ) { 557 $cat_id = $row['t_category']; 558 $cat_parent_id = ( isset($cats[$cats[$cat_id]['cat_parent']]['cat_id']) ? $cats[$cats[$cat_id]['cat_parent']]['cat_id'] : 0 ); 559 560 if ( $cat_parent_id ) { 561 $seo->set_url($cats[$cat_parent_id]['cat_name'], $cat_parent_id, $seo->seo_static['browse']); 562 $seo->set_parent($cat_id, $seo->seo_static['browse'], $cat_parent_id, $seo->seo_static['browse']); 563 } 564 565 $seo->set_url($cats[$cat_id]['cat_name'], $cat_id, $seo->seo_static['browse']); 566 567 $seo->set_parent($row['filled'], $seo->seo_static['details'], $cat_id, $seo->seo_static['browse']); 568 569 $seo->set_url($row['torrent_name'], $row['filled'], $seo->seo_static['details']); 570 } 571 $seo->set_user_url($row['username'], $row['userid']); 572 // www.phpBB-SEO.com SEO TOOLKIT END 573 535 574 $addedby_username = ( $row['userid'] ? get_user_class_color($row['class'], $row['username']) : '<i>' . $lang['unknown'] . '</i>' ); 536 575 $filled = ( $row['filled'] ? append_sid($root_path . 'details.php?id=' . $row['filled']) : ''); phpBB2/groupcp.php
r269 r280 33 33 function generate_user_info(&$row, $date_format, $group_mod, &$from, &$posts, &$joined, &$poster_avatar, &$profile_img, &$profile, &$search_img, &$search, &$pm_img, &$pm, &$email_img, &$email, &$www_img, &$www, &$icq_status_img, &$icq_img, &$icq, &$aim_img, &$aim, &$msn_img, &$msn, &$yim_img, &$yim, &$userdata, &$online_status_img, &$online_status) 34 34 { 35 global $lang, $images, $config, $phpEx, $online_color, $offline_color, $hidden_color; 35 global $lang, $images, $config, $phpEx, $online_color, $offline_color, $hidden_color, $root_path; 36 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 37 global $seo; 38 // www.phpBB-SEO.com SEO TOOLKIT END 36 39 37 40 $from = ( !empty($row['user_from']) ) ? $row['user_from'] : ' '; … … 57 60 $email = ' '; 58 61 } 62 63 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 64 $seo->set_user_url($row['username'], $row['uid']); 65 // www.phpBB-SEO.com SEO TOOLKIT END 59 66 60 67 $temp_url = append_sid($root_path . "userdetails.php?id=" . $row['uid']); … … 738 745 739 746 $s_hidden_fields .= ''; 747 748 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 749 $seo->set_user_url($username, $user_id); 750 // www.phpBB-SEO.com SEO TOOLKIT END 740 751 741 752 $template->assign_vars(array( … … 799 810 $user_id = $group_members[$i]['uid']; 800 811 812 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 813 $seo->set_user_url($username, $user_id); 814 // www.phpBB-SEO.com SEO TOOLKIT END 815 801 816 generate_user_info($group_members[$i], $config['default_dateformat'], $is_moderator, $from, $posts, $joined, $poster_avatar, $profile_img, $profile, $search_img, $search, $pm_img, $pm, $email_img, $email, $www_img, $www, $icq_status_img, $icq_img, $icq, $aim_img, $aim, $msn_img, $msn, $yim_img, $yim, $userdata, $online_status_img, $online_status); 802 817 … … 897 912 $user_select = '<input type="checkbox" name="member[]" value="' . $user_id . '">'; 898 913 914 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 915 $seo->set_user_url($username, $user_id); 916 // www.phpBB-SEO.com SEO TOOLKIT END 917 899 918 $template->assign_block_vars('pending_members_row', array( 900 919 'ROW_CLASS' => $row_class, phpBB2/includes/functions_post.php
r274 r280 586 586 global $config, $lang, $db, $root_path, $phpEx, $cache; 587 587 global $userdata, $user_ip; 588 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 589 global $seo; 590 // www.phpBB-SEO.com SEO TOOLKIT END 588 591 589 592 $current_time = time(); … … 636 639 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 637 640 if ( $config['mod_rewrite_enabled'] ) { 641 $seo->set_url(htmlspecialchars_decode($topic_title), $topic_id, $seo->seo_static['topic']); 638 642 639 643 $u_topic = append_sid($root_path . "phpbb2.php?page=viewtopic&" . POST_POST_URL . "=$post_id#$post_id", false, false); 644 $u_topic = $seo->drop_sid($u_topic); 640 645 641 646 $u_stop_watching_topic = append_sid($root_path . "phpbb2.php?page=viewtopic&" . POST_TOPIC_URL . "=$topic_id&unwatch=topic", false, false); 647 $u_stop_watching_topic = $seo->drop_sid($u_stop_watching_topic); 642 648 } 643 649 // www.phpBB-SEO.com SEO TOOLKIT END phpBB2/index.php
r269 r280 226 226 while( $row = $db->sql_fetchrow($result) ) 227 227 { 228 // www.phpBB-SEO.com SEO TOOLKIT START 229 $seo->set_user_url($row['username'], $row['uid']); 230 // www.phpBB-SEO.com SEO TOOLKIT END 228 231 $forum_moderators[$row['forum_id']][] = '<a href="' . append_sid($root_path . "userdetails.php?id=" . $row['uid']) . '">' . $row['username'] . '</a>'; 229 232 } … … 291 294 $cat_id = $category_rows[$i]['cat_id']; 292 295 296 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 297 $seo->set_url($category_rows[$i]['cat_title'], $cat_id, $seo->seo_static['forum_cat']); 298 // www.phpBB-SEO.com SEO TOOLKIT END 293 299 294 300 // … … 394 400 $topics = $forum_data[$j]['forum_topics']; 395 401 402 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 403 $seo->set_url($forum_data[$j]['forum_name'], $forum_data[$j]['forum_id'], $seo->seo_static['forum']); 404 $seo->set_parent($forum_data[$j]['topic_id'], $seo->seo_static['topic'], $forum_data[$j]['forum_id'], $seo->seo_static['forum']); 405 $seo->set_url($forum_data[$j]['topic_title'], $forum_data[$j]['topic_id'], $seo->seo_static['topic']); 406 // www.phpBB-SEO.com SEO TOOLKIT END 396 407 397 408 if ( $forum_data[$j]['forum_last_post_id'] ) … … 541 552 } 542 553 554 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 555 $seo->set_parent($forum_data['forum_name'], $seo->seo_static['forum'], $forum_data['forum_parent'], $seo->seo_static['forum']); 556 $seo->set_url($forum_data['forum_name'], $forum_data['forum_id'], $seo->seo_static['forum']); 557 // www.phpBB-SEO.com SEO TOOLKIT END 558 543 559 // Append new entry 544 560 $data[] = array( phpBB2/modcp.php
r269 r280 168 168 return; 169 169 } 170 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 171 $seo->set_url($forum_name, $forum_id, $seo->seo_static['forum']); 172 // www.phpBB-SEO.com SEO TOOLKIT END 170 173 171 174 // … … 823 826 sync('forum', $forum_id); 824 827 828 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 829 $seo->set_url($destination_forum_name, $destination_forum_id, $seo->seo_static['forum']); 830 $seo->set_parent($destination_topic_id, $seo->seo_static['topic'], $destination_forum_id, $seo->seo_static['forum']); 831 $seo->set_url($destination_topic_title, $destination_topic_id, $seo->seo_static['topic']); 832 // www.phpBB-SEO.com SEO TOOLKIT END 833 825 834 $url = append_sid($root_path . "phpbb2.php?page=viewtopic&" . POST_TOPIC_URL . "=$destination_topic_id", false, true, $userdata['session_id']); 826 835 … … 902 911 sync('forum', $new_forum_id); 903 912 sync('forum', $forum_id); 913 914 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 915 $seo->set_parent($topic_id, $seo->seo_static['topic'], $forum_id, $seo->seo_static['forum']); 916 $seo->set_url($post_subject, $topic_id, $seo->seo_static['topic']); 917 // www.phpBB-SEO.com SEO TOOLKIT END 904 918 905 919 $url = append_sid($root_path . "phpbb2.php?page=viewtopic&" . POST_TOPIC_URL . "=$topic_id", false, true, $userdata['session_id']); … … 936 950 if( $all_forums[$i]['forum_id'] == $parent_id ) 937 951 { 952 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 953 //$seo->set_parent($topic_id, $seo->seo_static['topic'], $forum_id, $seo->seo_static['forum']); 954 $seo->set_url($all_forums[$i]['forum_name'], $all_forums[$i]['forum_id'], $seo->seo_static['forum']); 955 // www.phpBB-SEO.com SEO TOOLKIT END 956 938 957 $template->assign_vars(array( 939 958 'PARENT_FORUM' => 1, … … 958 977 if( $postrow = $db->sql_fetchrow($result) ) 959 978 { 979 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 980 $seo->set_url($forum_name, $forum_id, $seo->seo_static['forum']); 981 // www.phpBB-SEO.com SEO TOOLKIT END 960 982 961 983 $template->assign_vars(array( … … 1081 1103 sync('topic', $topic_id); 1082 1104 sync('forum', $forum_id); 1105 1106 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 1107 $seo->set_url($forum_name, $forum_id, $seo->seo_static['forum']); 1108 // www.phpBB-SEO.com SEO TOOLKIT END 1083 1109 1084 1110 $url = append_sid($root_path . "phpbb2.php?page=viewtopic&" . POST_TOPIC_URL . "=$topic_id", false, true, $userdata['session_id']); phpBB2/posting.php
r269 r280 233 233 $forum_id = $post_info['forum_id']; 234 234 $forum_name = $post_info['forum_name']; 235 236 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 237 $seo->set_url($post_info['topic_title'], $post_info['topic_id'], $seo->seo_static['topic']); 238 $seo->set_url($forum_name, $forum_id, $seo->seo_static['forum']); 239 // www.phpBB-SEO.com SEO TOOLKIT END 235 240 236 241 $is_auth = auth(AUTH_ALL, $forum_id, $userdata, $post_info); phpBB2/search.php
r269 r280 871 871 $forum_id = $searchset[$i]['forum_id']; 872 872 $topic_id = $searchset[$i]['topic_id']; 873 874 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 875 $seo->set_url($searchset[$i]['forum_name'], $forum_id, $seo->seo_static['forum']); 876 $seo->set_parent($topic_id, $seo->seo_static['topic'], $forum_id, $seo->seo_static['forum']); 877 $seo->set_url($topic_title, $topic_id, $seo->seo_static['topic']); 878 879 if ( $show_results != 'posts' ) { 880 881 $seo->set_user_url($searchset[$i]['username'], $searchset[$i]['uid']); 882 $seo->set_user_url($searchset[$i]['user2'], $searchset[$i]['id2']); 883 } 884 // www.phpBB-SEO.com SEO TOOLKIT END 885 873 886 //$forum_url = append_sid("viewforum.$phpEx?" . POST_FORUM_URL . '=' . $searchset[$i]['forum_id']); 874 887 $forum_url = append_sid($root_path . "phpbb2.php?page=viewforum&" . POST_FORUM_URL . '=' . $searchset[$i]['forum_id']); phpBB2/viewforum.php
r269 r280 87 87 } 88 88 89 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 90 $seo->set_url($forum_row['forum_name'], $forum_id, $seo->seo_static['forum']); 91 92 if ( isset($_POST[POST_FORUM_URL]) ) { 93 redirect(append_sid($root_path . 'phpbb2.php?page=viewforum&f=' . $forum_id)); 94 } 95 // www.phpBB-SEO.com SEO TOOLKIT END 96 89 97 // 90 98 // Start session management … … 234 242 while( $row = $db->sql_fetchrow($result) ) 235 243 { 244 // www.phpBB-SEO.com SEO TOOLKIT START 245 $seo->set_user_url($row['username'], $row['uid']); 246 // www.phpBB-SEO.com SEO TOOLKIT END 236 247 $moderators[] = '<a href="' . append_sid($root_path . 'userdetails.php?id=' . $row['uid']) . '">' . get_user_class_color($row['class'], $row['username']) . '</a>'; 237 248 } … … 407 418 // End Simple Subforums MOD 408 419 420 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 421 $seo->set_url($cat_title, $cat_id, $seo->seo_static['forum_cat']); 422 // www.phpBB-SEO.com SEO TOOLKIT END 423 409 424 $template->assign_vars(array( 410 425 'FORUM_ID' => $forum_id, … … 443 458 if( $all_forums[$i]['forum_id'] == $parent_id ) 444 459 { 460 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 461 $seo->set_url($all_forums[$i]['forum_name'], $all_forums[$i]['forum_id'], $seo->seo_static['forum']); 462 // www.phpBB-SEO.com SEO TOOLKIT END 445 463 $template->assign_vars(array( 446 464 'PARENT_FORUM' => 1, … … 489 507 490 508 $topic_title = censor_text($topic_rowset[$i]['topic_title']); 509 510 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 511 $seo->set_parent($topic_id, $seo->seo_static['topic'], $forum_id, $seo->seo_static['forum']); 512 $seo->set_url($topic_title, $topic_id, $seo->seo_static['topic'], $seo->seo_url['forum'][$forum_id]); 513 // www.phpBB-SEO.com SEO TOOLKIT END 491 514 492 515 $replies = $topic_rowset[$i]['topic_replies']; … … 655 678 $view_topic_url = append_sid($root_path . "phpbb2.php?page=viewtopic&" . POST_TOPIC_URL . "=$topic_id"); 656 679 680 // www.phpBB-SEO.com SEO TOOLKIT START 681 $seo->set_user_url($topic_rowset[$i]['username'], $topic_rowset[$i]['uid']); 682 $seo->set_user_url($topic_rowset[$i]['user2'], $topic_rowset[$i]['id2']); 683 // www.phpBB-SEO.com SEO TOOLKIT END 684 657 685 $topic_author = ($topic_rowset[$i]['uid'] == ANONYMOUS ) ? (($topic_rowset[$i]['post_username'] != '' ) ? $topic_rowset[$i]['post_username'] : $lang['guest'] ) : '<a href="' . append_sid($root_path . 'userdetails.php?id=' . $topic_rowset[$i]['uid']) . '">' . get_user_class_color($topic_rowset[$i]['class1'],$topic_rowset[$i]['username']) . '</a>'; 658 686 … … 789 817 if( $total_forums ) 790 818 { 819 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 820 $seo->set_url($forum_row['forum_name'],$forum_id, $seo->seo_static['forum']); 821 // www.phpBB-SEO.com SEO TOOLKIT END 791 822 $template->assign_var('HAS_SUBFORUMS', 1); 792 823 $template->assign_block_vars('catrow', array( … … 834 865 while( $row = $db->sql_fetchrow($result) ) 835 866 { 867 // www.phpBB-SEO.com SEO TOOLKIT START 868 $seo->set_user_url($row['username'], $row['uid']); 869 // www.phpBB-SEO.com SEO TOOLKIT END 836 870 $subforum_moderators[$row['forum_id']][] = '<a href="' . append_sid($root_path . 'userdetails.php?id=' . $row['uid']) . '">' . $row['username'] . '</a>'; 837 871 } … … 923 957 $last_post = $last_post_time . '<br />'; 924 958 959 // www.phpBB-SEO.com SEO TOOLKIT START 960 $seo->set_user_url($subforum_data[$j]['username'], $subforum_data[$j]['uid']); 961 // www.phpBB-SEO.com SEO TOOLKIT END 962 925 963 $last_post .= ( $subforum_data[$j]['uid'] == ANONYMOUS ) ? ( ($subforum_data[$j]['post_username'] != '' ) ? $subforum_data[$j]['post_username'] . ' ' : $lang['guest'] . ' ' ) : '<a href="' . append_sid($root_path . 'userdetails.php?id=' . $subforum_data[$j]['uid']) . '">' . $subforum_data[$j]['username'] . '</a> '; 926 964 … … 945 983 $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2']; 946 984 $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2']; 985 986 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 987 $seo->set_url($subforum_data[$j]['forum_name'],$subforum_id, $seo->seo_static['forum']); 988 // www.phpBB-SEO.com SEO TOOLKIT END 947 989 948 990 $template->assign_block_vars('catrow.forumrow', array( phpBB2/viewtopic.php
r274 r280 107 107 } 108 108 109 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 110 $seo->set_url('', $topic_id, $seo->seo_static['topic']); 111 // www.phpBB-SEO.com SEO TOOLKIT END 112 109 113 $post_id = $row['post_id']; 110 114 $url = append_sid($root_path . "phpbb2.php?page=viewtopic&" . POST_TOPIC_URL . "=$topic_id&" . POST_POST_URL . "=$post_id#$post_id"); … … 214 218 $cat_id = intval($cat_data['cat_id']); 215 219 $cat_title = $cat_data['cat_title']; 220 221 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 222 $seo->set_url($forum_name, $forum_id, $seo->seo_static['forum']); 223 $seo->set_url($cat_title, $cat_id, $seo->seo_static['forum_cat']); 224 $seo->set_parent($topic_id, $seo->seo_static['topic'], $forum_id, $seo->seo_static['forum']); 225 $seo->set_url($topic_title, $topic_id, $seo->seo_static['topic']); 226 // www.phpBB-SEO.com SEO TOOLKIT END 227 216 228 217 229 // … … 585 597 if( $all_forums[$i]['forum_id'] == $parent_id ) 586 598 { 599 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 600 //$seo->set_parent($all_forums[$i]['forum_id'], $seo->seo_static['forum'], $forum_id, $seo->seo_static['forum']); 601 $seo->set_url($all_forums[$i]['forum_name'], $all_forums[$i]['forum_id'], $seo->seo_static['forum']); 602 // www.phpBB-SEO.com SEO TOOLKIT END 587 603 $template->assign_vars(array( 588 604 'PARENT_FORUM' => 1, … … 943 959 if ( $poster_id != ANONYMOUS ) 944 960 { 945 //$temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$poster_id"); 961 // www.phpBB-SEO.com SEO TOOLKIT START 962 $seo->set_user_url($postrow[$i]['username'], $postrow[$i]['uid']); 963 // www.phpBB-SEO.com SEO TOOLKIT END 964 946 965 $temp_url = append_sid($root_path . "userdetails.php?id=" . $postrow[$i]['uid']); 947 966 $profile_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['read_profile'] . '" title="' . $lang['read_profile'] . '" border="0" /></a>'; … … 1256 1275 foreach ( $userList_ary AS $_null => $users ) { 1257 1276 $userslist .= ( $userslist ? ', ' : '' ); 1277 1278 // www.phpBB-SEO.com SEO TOOLKIT START 1279 $seo->set_user_url($users['name'], $users['uid']); 1280 // www.phpBB-SEO.com SEO TOOLKIT END 1258 1281 1259 1282 $userslist .= '<a href="' . append_sid($root_path . 'userdetails.php?id=' . $users['uid']) . '"><span class="' . ( $users['simpaty'] ? 'usergoodResp' : 'userbadResp' ) . '">' . $users['name'] . '</span></a>'; reports.php
r258 r280 87 87 $name = $arr['torrent_name']; 88 88 $reason_type = $lang['torrent']; 89 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 90 if ( empty($seo->seo_url['details'][$arr['votedfor']]) ) { 91 $seo->seo_url['details'][$arr['votedfor']] = $seo->set_url(censor_text($arr['torrent_name']), $arr['votedfor'], $seo->seo_static['details']); 92 } 93 // www.phpBB-SEO.com SEO TOOLKIT END 89 94 break; 90 95 … … 165 170 } 166 171 172 switch ( $type ) { 173 case 2: 174 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 175 if ( empty($seo->seo_url['details'][$id]) ) { 176 $seo->seo_url['details'][$id] = $seo->set_url(censor_text($row['name']), $id, $seo->seo_static['details']); 177 } 178 // www.phpBB-SEO.com SEO TOOLKIT END 179 break; 180 } 181 167 182 $sql = 'SELECT id FROM ' . REPORTS_TABLE . ' WHERE addedby = ' . $userdata['uid'] . ' AND votedfor = ' . $id . ' AND type = ' . $type; 168 183 $result = $db->sql_query($sql); requests.php
r269 r280 179 179 $cat_id = $row['category']; 180 180 $cat_parent_id = ( isset($cats[$cats[$cat_id]['cat_parent']]['cat_id']) ? $cats[$cats[$cat_id]['cat_parent']]['cat_id'] : 0 ); 181 182 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 183 if ( $cat_parent_id ) { 184 $seo->set_url($cats[$cat_parent_id]['cat_name'], $cat_parent_id, $seo->seo_static['browse']); 185 $seo->set_parent($cat_id, $seo->seo_static['browse'], $cat_parent_id, $seo->seo_static['browse']); 186 } 187 188 $seo->set_url($cats[$cat_id]['cat_name'], $cat_id, $seo->seo_static['browse']); 189 190 $seo->set_parent($filled_torrent_id, $seo->seo_static['details'], $cat_id, $seo->seo_static['browse']); 191 192 $seo->set_url($torrent_name, $filled_torrent_id, $seo->seo_static['details']); 193 194 $seo->set_user_url($userdata['name'], $userdata['uid']); 195 // www.phpBB-SEO.com SEO TOOLKIT END 196 181 197 if ( $config['mod_rewrite_enabled'] ) { 182 $u_request = append_sid($root_path . 'requests.php?id=' . $id, false, true, ''); 183 $u_userdetails = append_sid($root_path . 'userdetails.php?id=' . $userdata['uid'], false, true, ''); 184 $u_details = append_sid($root_path . 'details.php?id=' . $filled_torrent_id, false, true, ''); 198 $u_request = append_sid($root_path . 'requests.php?id=' . $id); 199 $u_request = $seo->drop_sid($u_request); 200 $u_userdetails = append_sid($root_path . 'userdetails.php?id=' . $userdata['uid']); 201 $u_userdetails = $seo->drop_sid($u_userdetails); 202 $u_details = append_sid($root_path . 'details.php?id=' . $filled_torrent_id); 203 $u_details = $seo->drop_sid($u_details); 185 204 } 186 205 else { … … 545 564 $addedby_username = '<i>' . $lang['unknown'] . '</i>'; 546 565 } 566 567 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 568 if ( $row['filled'] ) { 569 $cat_id = $row['t_category']; 570 $cat_parent_id = ( isset($cats[$cats[$cat_id]['cat_parent']]['cat_id']) ? $cats[$cats[$cat_id]['cat_parent']]['cat_id'] : 0 ); 571 572 if ( $cat_parent_id ) { 573 $seo->set_url($cats[$cat_parent_id]['cat_name'], $cat_parent_id, $seo->seo_static['browse']); 574 $seo->set_parent($cat_id, $seo->seo_static['browse'], $cat_parent_id, $seo->seo_static['browse']); 575 } 576 577 $seo->set_url($cats[$cat_id]['cat_name'], $cat_id, $seo->seo_static['browse']); 578 579 $seo->set_parent($row['filled'], $seo->seo_static['details'], $cat_id, $seo->seo_static['browse']); 580 581 $seo->set_url($row['torrent_name'], $row['filled'], $seo->seo_static['details']); 582 583 $seo->set_user_url($row['filledby_username'], $row['filledby_id']); 584 } 585 $seo->set_user_url($row['name'], $row['userid']); 586 // www.phpBB-SEO.com SEO TOOLKIT END 547 587 548 588 $filled = ( $row['filled'] ? append_sid($root_path . 'details.php?id=' . $row['filled']) : '' ); rss.php
r274 r280 138 138 $id = $row['fid']; 139 139 140 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 141 if ( $cat_parent_id ) { 142 $seo->set_url($cats_arr[$cat_parent_id]['cat_name'], $cat_parent_id, $seo->seo_static['browse']); 143 $seo->set_parent($cat_id, $seo->seo_static['browse'], $cat_parent_id, $seo->seo_static['browse']); 144 } 145 146 $seo->set_url($cats_arr[$cat_id]['cat_name'], $cat_id, $seo->seo_static['browse']); 147 148 $seo->set_parent($id, $seo->seo_static['details'], $cat_id, $seo->seo_static['browse']); 149 150 $seo->set_url($row['torrent_name'], $id, $seo->seo_static['details']); 151 // www.phpBB-SEO.com SEO TOOLKIT END 152 140 153 $description = censor_text($row['descr']); 141 154 $bb_code->parse($description); … … 149 162 150 163 if ( $config['mod_rewrite_enabled'] ) { 151 $u_link = append_sid($root_path . $link, false, true, ''); 152 $u_reply = append_sid($root_path . 'comment.php?type=main&action=add&tid=' . $id, false, true, ''); 153 $u_category = append_sid($root_path . 'browse.php?cat=' . $cat_id, false, true, ''); 164 $u_link = append_sid($root_path . $link); 165 $u_link = $seo->drop_sid($u_link); 166 $u_reply = append_sid($root_path . 'comment.php?type=main&action=add&tid=' . $id); 167 $u_reply = $seo->drop_sid($u_reply); 168 $u_category = append_sid($root_path . 'browse.php?cat=' . $cat_id); 169 $u_category = $seo->drop_sid($u_category); 154 170 } 155 171 else { simpaty.php
r276 r280 115 115 $userslist .= ( $userslist ? ', ' : '' ); 116 116 117 // www.phpBB-SEO.com SEO TOOLKIT START 118 $seo->set_user_url($row['name'], $row['uid']); 119 // www.phpBB-SEO.com SEO TOOLKIT END 117 120 118 121 $userslist .= '<a href="' . append_sid($root_path . 'userdetails.php?id=' . $row['uid']) . '"><span class="' . ( $row['simpaty'] ? 'usergoodResp' : 'userbadResp' ) . '">' . $row['name'] . '</span></a>'; sql.sql
r279 r280 1164 1164 `started` int(11) default '0', 1165 1165 `mtime` int(11) default '0', 1166 `connectable` tinyint(1) default '0',1167 1166 `uid` int(10) unsigned default '0', 1168 1167 `useragent` varchar(60) default NULL, … … 1172 1171 `completed` int(11) default '0', 1173 1172 `active` tinyint(4) default '0', 1174 KEY `connectable` (`connectable`),1175 1173 KEY `userid` (`uid`), 1176 1174 KEY `fid_2` (`fid`), … … 1624 1622 `last_action` int(11) default '0', 1625 1623 `completedat` int(11) default '0', 1626 `connectable` tinyint(1) default '0',1627 1624 UNIQUE KEY `torrentid` (`torrentid`,`userid`), 1628 1625 KEY `userid` (`userid`), … … 1777 1774 `disable_comments` tinyint(1) default '0', 1778 1775 `ballance` bigint(20) default '0', 1779 `flags` int(11) default '0',1776 `flags` tinyint(1) default '0', 1780 1777 `moderated` tinyint(1) default '0', 1781 1778 PRIMARY KEY (`fid`), … … 1786 1783 KEY `times_completed` (`completed`), 1787 1784 KEY `numfiles` (`numfiles`), 1788 KEY `added` (`ctime`),1789 1785 KEY `comments` (`comments`), 1790 1786 KEY `category` (`category`), … … 1796 1792 KEY `free` (`free`), 1797 1793 KEY `disable_comments` (`disable_comments`), 1794 KEY `flags` (`flags`), 1798 1795 KEY `ctime` (`ctime`) 1799 1796 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; templates/bithdtv/bithdtv.cfg
r269 r280 29 29 $images['inboxnew'] = "$current_template_images/pn_inboxnew.gif"; 30 30 $images['sentbox'] = "$current_template_images/pn_sentbox.gif"; 31 $images['freedownload'] = "$current_template_images/freedownload.gif"; 31 $images['free_download_gold'] = "$current_template_images/free_download_gold.gif"; 32 $images['free_download_silver'] = "$current_template_images/free_download_silver.gif"; 33 $images['free_download_bronze'] = "$current_template_images/free_download_bronze.gif"; 32 34 $images['online'] = "$current_template_images/online.gif"; 33 35 $images['offline'] = "$current_template_images/offline.gif"; templates/bithdtv/details.html
r269 r280 7 7 <!-- IF MESSAGE2 --><p>{MESSAGE2}</p><!-- ENDIF --> 8 8 <table class=detail width=700 border=0 cellspacing=0 cellpadding=6> 9 <caption>{NAME}<!-- IF FREE_ DOWNLOAD --><img src="{IMG_FREE}" alt="{L_FREE}" /><!-- ENDIF --></caption>9 <caption>{NAME}<!-- IF FREE_ICON --><img src="{FREE_ICON}" alt="{L_FREE}" title="{L_FREE}" /><!-- ENDIF --></caption> 10 10 <tr> 11 11 <td class="detail" valign="top" align="right" width="100">{L_DOWNLOAD}</td> templates/bithdtv/details_edit.html
r259 r280 45 45 <tr> 46 46 <td><label for="free">{L_FREE}</label></td> 47 <td> <input type="checkbox" name="free" id="free" {switch_mod_section.FREE_CHECKED} value="1" /><span class="small">{L_FREE_DESCRIPTION}</span></td>47 <td>{switch_mod_section.FREE_SELECT}<span class="small">{L_FREE_DESCRIPTION}</span></td> 48 48 </tr> 49 49 <tr> templates/bithdtv/overall_header.html
r269 r280 2 2 <html> 3 3 <head> 4 {SEO_BASE_HREF} 4 5 <meta name="description" content="{PAGE_DESCRIPTION}" /> 5 6 <meta name="keywords" content="{KEYWORDS}" /> templates/bithdtv/simple_header.html
r252 r280 2 2 <html xmlns="http://www.w3.org/1999/xhtml" dir="{L_DIRECTION}"> 3 3 <head> 4 {SEO_BASE_HREF} 4 5 <meta http-equiv="Content-Style-Type" content="text/css" /> 5 6 <meta http-equiv="imagetoolbar" content="no" /> templates/bithdtv/torrents_table.html
r264 r280 57 57 <a href="{torrent_table.torrents_table.U_DETAILS}"><b>{torrent_table.torrents_table.DISPNAME}</b></a> 58 58 59 <!-- IF torrent_table.torrents_table.TORRENT_FREE -->60 <img src="{ IMAGE_FREE_DOWNLOAD}" alt="{L_FREE}" title="{L_FREE}" />59 <!-- IF torrent_table.torrents_table.TORRENT_FREE_ICON --> 60 <img src="{torrent_table.torrents_table.TORRENT_FREE_ICON}" alt="{L_FREE}" title="{L_FREE}" /> 61 61 <!-- ENDIF --> 62 62 templates/bithdtv/userdetails.html
r269 r280 120 120 </table> 121 121 122 <!-- BEGIN switch_modtask_section --> 123 <form method="post" action="{switch_modtask_section.S_FORM_ACTION}"> 124 <table class="detail" width="620"> 125 <caption>{L_EDIT_ACCOUNT}</caption> 126 <tr> 127 <td>{L_AVATAR}</td> 128 <td colspan="2"><input type="text" size="60" name="avatar" value="{switch_modtask_section.EDIT_AVATAR}" /></td> 129 </tr> 130 <!-- IF switch_modtask_section.CLASS_SELECT --> 131 <tr> 132 <td>{L_CLASS}</td> 133 <td colspan="2">{switch_modtask_section.CLASS_SELECT}</td> 134 </tr> 135 <!-- ENDIF --> 136 <tr> 137 <td>{L_INTERNET_SPEED}</td> 138 <td colspan="2"><img src="pic/speed_up.png" alt="" /> {switch_modtask_section.UPLOAD_SPEED_SELECT} <img src="pic/speed_down.png" alt="" /> {switch_modtask_section.DOWNLOAD_SPEED_SELECT}</td> 139 </tr> 140 <tr> 141 <td>{L_COMMENTS}</td> 142 <td colspan="2"><textarea cols="70" rows="5">{switch_modtask_section.MODCOMMENT}</textarea></td> 143 </tr> 144 <tr> 145 <td{switch_modtask_section.ROWSPAN}>{L_WARNED}</td> 146 <td width="20%">{switch_modtask_section.WARNED_INPUT} 147 <!-- IF switch_modtask_section.WARNED_UNTIL --> 148 <td>{switch_modtask_section.WARNED_UNTIL} ({switch_modtask_section.WARNED_AGO})</td> 149 </tr> 150 <!-- ELSE --> 151 <td>{L_WARN_AT} {switch_modtask_section.WARN_INPUT} {L_WARN_PM}:</td> 152 </tr> 153 <tr> 154 <td colspan="2"><input type="text" size=60 name="warnpm" /></td> 155 </tr> 156 <!-- ENDIF --> 157 <tr> 158 <td>{L_ENABLED}</td> 159 <td colspan="2">{switch_modtask_section.ENABLED_INPUT}</td> 160 </tr> 161 <tr> 162 <td>{L_PASSKEY}</td> 163 <td colspan="2"><input name="resetkey" value="1" type="checkbox" /> {L_CHANGE_PASSKEY}</td> 164 </tr> 165 <tr> 166 <td>{L_SEE_HIDDEN_TORRENTS}</td> 167 <td colspan="2">{switch_modtask_section.HIDDEN_TORRENTS_INPUT}</td> 168 </tr> 169 <tr> 170 <td>{L_MAY_BE_AUTODEMOTED}</td> 171 <td colspan="2">{switch_modtask_section.AUTODEMOTE_INPUT}</td> 172 </tr> 173 <tr> 174 <td colspan="3" align="center"><input type="submit" value="{L_DONE}" /></td> 175 </tr> 176 </table> 177 <input type="hidden" name="action" value="edituser" /> 178 <input type="hidden" name="userid" value="{ID}" /> 179 </form> 180 <!-- END switch_modtask_section --> 122 <!-- INCLUDE useredit_panel.html --> 181 123 182 124 <!-- INCLUDE overall_footer.html --> templates/bithdtv/userdetails_completed_torrents.html
r261 r280 11 11 <tr> 12 12 <td width="1" class="detail"><img src="pic/categories/{downloaded_torrents_row.CAT_PIC}" alt="{downloaded_torrents_row.CAT_NAME}" title="{downloaded_torrents_row.CAT_NAME}" /></td> 13 <td class="detail"><a href="{downloaded_torrents_row.U_DETAILS}">{downloaded_torrents_row.NAME}</a></td> 13 <td class="detail"><a href="{downloaded_torrents_row.U_DETAILS}">{downloaded_torrents_row.NAME}</a> 14 15 <!-- IF downloaded_torrents_row.FREE_ICON --> 16 17 <img src="{downloaded_torrents_row.FREE_ICON}" alt="{L_FREE}" title="{L_FREE}" /> 18 19 <!-- ENDIF --> 20 21 </td> 14 22 <td align="center" class="detail"><a href="{downloaded_torrents_row.U_PEERLIST}#seeders">{downloaded_torrents_row.SEEDERS}</a> | <a href="{downloaded_torrents_row.U_PEERLIST}#leechers">{downloaded_torrents_row.LEECHERS}</a></td> 15 23 <td align="center" class="detail">{downloaded_torrents_row.UPLOADED}</td> templates/bithdtv/userdetails_helped_torrents.html
r261 r280 10 10 <tr> 11 11 <td width="1" class="detail"><img src="pic/categories/{helped_torrents_row.CAT_PIC}" alt="{helped_torrents_row.CAT_NAME}" title="{helped_torrents_row.CAT_NAME}" /></td> 12 <td class="detail"><a href="{helped_torrents_row.U_DETAILS}">{helped_torrents_row.NAME}</a></td> 12 <td class="detail"><a href="{helped_torrents_row.U_DETAILS}">{helped_torrents_row.NAME}</a> 13 14 <!-- IF downloaded_torrents_row.FREE_ICON --> 15 16 <img src="{helped_torrents_row.FREE_ICON}" alt="{L_FREE}" title="{L_FREE}" /> 17 18 <!-- ENDIF --> 19 20 </td> 13 21 <td align="center" class="detail"><a href="{helped_torrents_row.U_PEERLIST}#seeders">{helped_torrents_row.SEEDERS}</a> | <a href="{helped_torrents_row.U_PEERLIST}#leechers">{helped_torrents_row.LEECHERS}</a></td> 14 22 <td class="detail">{helped_torrents_row.UPLOADED}</td> templates/bithdtv/userdetails_seeding_leeching_torrents.html
r261 r280 13 13 <tr> 14 14 <td width="1px" class="detail"><img src="pic/categories/{now_torrents_row_seeding_leeching.CAT_PIC}" alt="{now_torrents_row_seeding_leeching.CAT_NAME}" title="{now_torrents_row_seeding_leeching.CAT_NAME}" /></td> 15 <td class="detail"><a href="{now_torrents_row_seeding_leeching.U_DETAILS}">{now_torrents_row_seeding_leeching.NAME}</a></td> 15 <td class="detail"><a href="{now_torrents_row_seeding_leeching.U_DETAILS}">{now_torrents_row_seeding_leeching.NAME}</a> 16 17 <!-- IF downloaded_torrents_row.FREE_ICON --> 18 19 <img src="{now_torrents_row_seeding_leeching.FREE_ICON}" alt="{L_FREE}" title="{L_FREE}" /> 20 21 <!-- ENDIF --> 22 23 </td> 16 24 <!-- IF L_TTL --><td class="detail">{now_torrents_row_seeding_leeching.TTL}</td><!-- ENDIF --> 17 25 <td class="detail">{now_torrents_row_seeding_leeching.SIZE}</td> templates/bithdtv/userdetails_uploaded_torrents.html
r261 r280 10 10 <tr> 11 11 <td width="1" class="detail"><img src="pic/categories/{uploaded_torrents_row.CAT_PIC}" alt="{uploaded_torrents_row.CAT_NAME}" title="{uploaded_torrents_row.CAT_NAME}" /></td> 12 <td class="detail"><a href="{uploaded_torrents_row.U_DETAILS}">{uploaded_torrents_row.NAME}</a></td> 12 <td class="detail"><a href="{uploaded_torrents_row.U_DETAILS}">{uploaded_torrents_row.NAME}</a> 13 14 <!-- IF downloaded_torrents_row.FREE_ICON --> 15 16 <img src="{uploaded_torrents_row.FREE_ICON}" alt="{L_FREE}" title="{L_FREE}" /> 17 18 <!-- ENDIF --> 19 20 </td> 13 21 <td align="center" class="detail"><a href="{uploaded_torrents_row.U_PEERLIST}#seeders">{uploaded_torrents_row.SEEDERS}</a> | <a href="{uploaded_torrents_row.U_PEERLIST}#leechers">{uploaded_torrents_row.LEECHERS}</a></td> 14 22 <td width="70" align="center" class="detail">{uploaded_torrents_row.ADDED}</td> templates/main/details.html
r269 r280 8 8 <!-- IF MESSAGE2 --><p>{MESSAGE2}</p><!-- ENDIF --> 9 9 <table class="border" width="700"> 10 <caption>{NAME} <!-- IF FREE_ DOWNLOAD --><img src="{IMG_FREE}" alt="{L_FREE}" /><!-- ENDIF --></caption>10 <caption>{NAME} <!-- IF FREE_ICON --><img src="{FREE_ICON}" alt="{L_FREE}" title="{L_FREE}" /><!-- ENDIF --></caption> 11 11 <tr> 12 12 <td>{L_DOWNLOAD}</td> templates/main/details_edit.html
r259 r280 45 45 <tr> 46 46 <td><label for="free">{L_FREE}</label></td> 47 <td> <input type="checkbox" name="free" id="free" {switch_mod_section.FREE_CHECKED} value="1" /><span class="small">{L_FREE_DESCRIPTION}</span></td>47 <td>{switch_mod_section.FREE_SELECT}<span class="small">{L_FREE_DESCRIPTION}</span></td> 48 48 </tr> 49 49 <tr> templates/main/faq.html
r226 r280 2 2 3 3 <a name="top"></a><h1>{L_FAQ}</h1> 4 4 5 <!-- BEGIN faq_block --> 6 5 7 <div class="caption-index">{faq_block.BLOCK_TITLE}</div> 6 8 <div class="index-block"> 7 <ul class="news"> 8 <!-- BEGIN faq_row --> 9 <li><a href="#faq{faq_block.faq_row.ID}">{faq_block.faq_row.QUESTION}</a></li> 10 <!-- END faq_row --> 11 </ul> 9 <ul class="news"> 10 11 <!-- BEGIN faq_row --> 12 13 <li><a href="#faq{faq_block.faq_row.ID}">{faq_block.faq_row.QUESTION}</a></li> 14 15 <!-- END faq_row --> 16 17 </ul> 12 18 </div> 19 13 20 <!-- END faq_block --> 21 14 22 <br /> 23 15 24 <!-- BEGIN answers_block --> 25 16 26 <div class="caption-index">{answers_block.BLOCK_TITLE}</div> 17 27 <div class="index-block"> 18 <!-- BEGIN answers_row --> 19 <a href="#top"><img src="pic/arrowup.gif" alt="" /></a><a name="faq{answers_block.answers_row.ID}"></a> <b>{answers_block.answers_row.QUESTION}</b><br /> 20 {answers_block.answers_row.ANSWER}<br /><br /> 21 <!-- END answers_row --> 28 29 <!-- BEGIN answers_row --> 30 31 <a href="#top"><img src="pic/arrowup.gif" alt="" /></a><a name="faq{answers_block.answers_row.ID}"></a> <b>{answers_block.answers_row.QUESTION}</b><br /> 32 {answers_block.answers_row.ANSWER}<br /><br /> 33 34 <!-- END answers_row --> 35 22 36 </div> 37 23 38 <!-- END answers_block --> 24 39 templates/main/main.cfg
r269 r280 33 33 $images['inboxnew'] = "$current_template_images/pn_inboxnew.gif"; 34 34 $images['sentbox'] = "$current_template_images/pn_sentbox.gif"; 35 $images['freedownload'] = "$current_template_images/freedownload.gif"; 35 $images['free_download_gold'] = "$current_template_images/free_download_gold.gif"; 36 $images['free_download_silver'] = "$current_template_images/free_download_silver.gif"; 37 $images['free_download_bronze'] = "$current_template_images/free_download_bronze.gif"; 36 38 $images['online'] = "$current_template_images/online.gif"; 37 39 $images['offline'] = "$current_template_images/offline.gif"; templates/main/overall_header.html
r269 r280 2 2 <html xmlns="http://www.w3.org/1999/xhtml" dir="{L_DIRECTION}"> 3 3 <head> 4 {SEO_BASE_HREF} 4 5 <meta name="description" content="{PAGE_DESCRIPTION}" /> 5 6 <meta name="keywords" content="{KEYWORDS}" /> templates/main/simple_header.html
r89 r280 2 2 <html xmlns="http://www.w3.org/1999/xhtml" dir="{L_DIRECTION}"> 3 3 <head> 4 {SEO_BASE_HREF} 4 5 <meta http-equiv="Content-Style-Type" content="text/css" /> 5 6 <meta http-equiv="imagetoolbar" content="no" /> templates/main/torrents_table.html
r264 r280 59 59 <a href="{torrent_table.torrents_table.U_DETAILS}"><b>{torrent_table.torrents_table.DISPNAME}</b></a> 60 60 61 <!-- IF torrent_table.torrents_table.TORRENT_FREE -->62 <img src="{ IMAGE_FREE_DOWNLOAD}" alt="{L_FREE}" title="{L_FREE}" />61 <!-- IF torrent_table.torrents_table.TORRENT_FREE_ICON --> 62 <img src="{torrent_table.torrents_table.TORRENT_FREE_ICON}" alt="{L_FREE}" title="{L_FREE}" /> 63 63 <!-- ENDIF --> 64 64 templates/main/userdetails.html
r269 r280 214 214 </table> 215 215 216 <!-- BEGIN switch_modtask_section --> 217 <form method="post" action="{switch_modtask_section.S_FORM_ACTION}"> 218 <table class="border" width="620"> 219 <caption>{L_EDIT_ACCOUNT}</caption> 220 <tr> 221 <td>{L_AVATAR}</td> 222 <td colspan="2"><input type="text" size="60" name="avatar" value="{switch_modtask_section.EDIT_AVATAR}" /></td> 223 </tr> 224 <!-- IF switch_modtask_section.CLASS_SELECT --> 225 <tr> 226 <td>{L_CLASS}</td> 227 <td colspan="2">{switch_modtask_section.CLASS_SELECT}</td> 228 </tr> 229 <!-- ENDIF --> 230 <tr> 231 <td>{L_INTERNET_SPEED}</td> 232 <td colspan="2"><img src="pic/speed_up.png" alt="" /> {switch_modtask_section.UPLOAD_SPEED_SELECT} <img src="pic/speed_down.png" alt="" /> {switch_modtask_section.DOWNLOAD_SPEED_SELECT}</td> 233 </tr> 234 <tr> 235 <td>{L_COMMENTS}</td> 236 <td colspan="2"><textarea cols="70" rows="5">{switch_modtask_section.MODCOMMENT}</textarea></td> 237 </tr> 238 <tr> 239 <td{switch_modtask_section.ROWSPAN}>{L_WARNED}</td> 240 <td width="20%">{switch_modtask_section.WARNED_INPUT} 241 <!-- IF switch_modtask_section.WARNED_UNTIL --> 242 <td>{switch_modtask_section.WARNED_UNTIL} ({switch_modtask_section.WARNED_AGO})</td> 243 </tr> 244 <!-- ELSE --> 245 <td>{L_WARN_AT} {switch_modtask_section.WARN_INPUT} {L_WARN_PM}:</td> 246 </tr> 247 <tr> 248 <td colspan="2"><input type="text" size=60 name="warnpm" /></td> 249 </tr> 250 <!-- ENDIF --> 251 <tr> 252 <td>{L_ENABLED}</td> 253 <td colspan="2">{switch_modtask_section.ENABLED_INPUT}</td> 254 </tr> 255 <tr> 256 <td>{L_PASSKEY}</td> 257 <td colspan="2"><input name="resetkey" value="1" type="checkbox" /> {L_CHANGE_PASSKEY}</td> 258 </tr> 259 <tr> 260 <td>{L_SEE_HIDDEN_TORRENTS}</td> 261 <td colspan="2">{switch_modtask_section.HIDDEN_TORRENTS_INPUT}</td> 262 </tr> 263 <tr> 264 <td>{L_MAY_BE_AUTODEMOTED}</td> 265 <td colspan="2">{switch_modtask_section.AUTODEMOTE_INPUT}</td> 266 </tr> 267 <tr> 268 <td colspan="3" align="center"><input type="submit" value="{L_DONE}" /></td> 269 </tr> 270 </table> 271 <input type="hidden" name="action" value="edituser" /> 272 <input type="hidden" name="userid" value="{ID}" /> 273 </form> 274 <!-- END switch_modtask_section --> 216 <!-- INCLUDE useredit_panel.html --> 275 217 276 218 <!-- INCLUDE overall_footer.html --> templates/main/userdetails_completed_torrents.html
r261 r280 13 13 <tr> 14 14 <td width="1"><img src="pic/categories/{downloaded_torrents_row.CAT_PIC}" alt="{downloaded_torrents_row.CAT_NAME}" title="{downloaded_torrents_row.CAT_NAME}" /></td> 15 <td><a href="{downloaded_torrents_row.U_DETAILS}">{downloaded_torrents_row.NAME}</a></td> 15 <td><a href="{downloaded_torrents_row.U_DETAILS}">{downloaded_torrents_row.NAME}</a> 16 17 <!-- IF downloaded_torrents_row.FREE_ICON --> 18 19 <img src="{downloaded_torrents_row.FREE_ICON}" alt="{L_FREE}" title="{L_FREE}" /> 20 21 <!-- ENDIF --> 22 23 </td> 16 24 <td align="center"><a href="{downloaded_torrents_row.U_PEERLIST}#seeders">{downloaded_torrents_row.SEEDERS}</a> | <a href="{downloaded_torrents_row.U_PEERLIST}#leechers">{downloaded_torrents_row.LEECHERS}</a></td> 17 25 <td align="center">{downloaded_torrents_row.UPLOADED}</td> templates/main/userdetails_helped_torrents.html
r261 r280 13 13 <tr> 14 14 <td width="1"><img src="pic/categories/{helped_torrents_row.CAT_PIC}" alt="{helped_torrents_row.CAT_NAME}" title="{helped_torrents_row.CAT_NAME}" /></td> 15 <td><a href="{helped_torrents_row.U_DETAILS}">{helped_torrents_row.NAME}</a></td> 15 <td><a href="{helped_torrents_row.U_DETAILS}">{helped_torrents_row.NAME}</a> 16 17 <!-- IF downloaded_torrents_row.FREE_ICON --> 18 19 <img src="{helped_torrents_row.FREE_ICON}" alt="{L_FREE}" title="{L_FREE}" /> 20 21 <!-- ENDIF --> 22 23 </td> 16 24 <td align="center"><a href="{helped_torrents_row.U_PEERLIST}#seeders">{helped_torrents_row.SEEDERS}</a> | <a href="{helped_torrents_row.U_PEERLIST}#leechers">{helped_torrents_row.LEECHERS}</a></td> 17 25 <td>{helped_torrents_row.UPLOADED}</td> templates/main/userdetails_seeding_leeching_torrents.html
r261 r280 16 16 <tr> 17 17 <td width="1px"><img src="pic/categories/{now_torrents_row_seeding_leeching.CAT_PIC}" alt="{now_torrents_row_seeding_leeching.CAT_NAME}" title="{now_torrents_row_seeding_leeching.CAT_NAME}" /></td> 18 <td><a href="{now_torrents_row_seeding_leeching.U_DETAILS}">{now_torrents_row_seeding_leeching.NAME}</a></td> 18 <td><a href="{now_torrents_row_seeding_leeching.U_DETAILS}">{now_torrents_row_seeding_leeching.NAME}</a> 19 20 <!-- IF downloaded_torrents_row.FREE_ICON --> 21 22 <img src="{now_torrents_row_seeding_leeching.FREE_ICON}" alt="{L_FREE}" title="{L_FREE}" /> 23 24 <!-- ENDIF --> 25 26 </td> 19 27 <!-- IF L_TTL --><td>{now_torrents_row_seeding_leeching.TTL}</td><!-- ENDIF --> 20 28 <td>{now_torrents_row_seeding_leeching.SIZE}</td> templates/main/userdetails_uploaded_torrents.html
r261 r280 13 13 <tr> 14 14 <td width="1"><img src="pic/categories/{uploaded_torrents_row.CAT_PIC}" alt="{uploaded_torrents_row.CAT_NAME}" title="{uploaded_torrents_row.CAT_NAME}" /></td> 15 <td><a href="{uploaded_torrents_row.U_DETAILS}">{uploaded_torrents_row.NAME}</a></td> 15 <td><a href="{uploaded_torrents_row.U_DETAILS}">{uploaded_torrents_row.NAME}</a> 16 17 <!-- IF downloaded_torrents_row.FREE_ICON --> 18 19 <img src="{uploaded_torrents_row.FREE_ICON}" alt="{L_FREE}" title="{L_FREE}" /> 20 21 <!-- ENDIF --> 22 23 </td> 16 24 <td align="center"><a href="{uploaded_torrents_row.U_PEERLIST}#seeders">{uploaded_torrents_row.SEEDERS}</a> | <a href="{uploaded_torrents_row.U_PEERLIST}#leechers">{uploaded_torrents_row.LEECHERS}</a></td> 17 25 <td width="70" align="center">{uploaded_torrents_row.ADDED}</td> templates/reflection/details.html
r269 r280 7 7 <!-- IF MESSAGE1 --><h1>{MESSAGE1}</h1><!-- ENDIF --> 8 8 <!-- IF MESSAGE2 --><p>{MESSAGE2}</p><!-- ENDIF --> 9 <h1>{NAME} <!-- IF FREE_ DOWNLOAD --><img src="{IMG_FREE}" alt="{L_FREE}" /><!-- ENDIF --></h1>9 <h1>{NAME} <!-- IF FREE_ICON --><img src="{FREE_ICON}" alt="{L_FREE}" title="{L_FREE}" /><!-- ENDIF --></h1> 10 10 <div class="torrentViewDetails"> 11 11 templates/reflection/details_edit.html
r259 r280 51 51 <div class="tableRow"> 52 52 <div class="leftCell" style="width:20%"><label for="free">{L_FREE}</label></div> 53 <div class="rightCell"><span class="small">{L_FREE_DESCRIPTION}</span> <input type="checkbox" name="free" id="free" {switch_mod_section.FREE_CHECKED} value="1" /></div>53 <div class="rightCell"><span class="small">{L_FREE_DESCRIPTION}</span> {switch_mod_section.FREE_SELECT}</div> 54 54 <div class="clear"> </div> 55 55 </div> templates/reflection/overall_header.html
r269 r280 15 15 16 16 <head> 17 {SEO_BASE_HREF} 17 18 18 19 <meta http-equiv="content-type" content="application/xhtml+xml; charset={L_LANGUAGE_CHARSET}" /> templates/reflection/reflection.cfg
r269 r280 31 31 $images['inboxnew'] = "$current_template_images/pn_inboxnew.gif"; 32 32 $images['sentbox'] = "$current_template_images/pn_sentbox.gif"; 33 $images['freedownload'] = "$current_template_images/freedownload.gif"; 33 $images['free_download_gold'] = "$current_template_images/free_download_gold.gif"; 34 $images['free_download_silver'] = "$current_template_images/free_download_silver.gif"; 35 $images['free_download_bronze'] = "$current_template_images/free_download_bronze.gif"; 34 36 $images['online'] = "$current_template_images/online.gif"; 35 37 $images['offline'] = "$current_template_images/offline.gif"; templates/reflection/simple_header.html
r252 r280 15 15 16 16 <head> 17 {SEO_BASE_HREF} 17 18 18 19 <meta http-equiv="content-type" content="application/xhtml+xml; charset={L_LANGUAGE_CHARSET}" /> templates/reflection/torrents_table.html
r264 r280 43 43 <a href="{torrent_table.torrents_table.U_DETAILS}"><strong>{torrent_table.torrents_table.DISPNAME}</strong></a> 44 44 45 <!-- IF torrent_table.torrents_table.TORRENT_FREE -->46 <img src="{ IMAGE_FREE_DOWNLOAD}" alt="{L_FREE}" title="{L_FREE}" />45 <!-- IF torrent_table.torrents_table.TORRENT_FREE_ICON --> 46 <img src="{torrent_table.torrents_table.TORRENT_FREE_ICON}" alt="{L_FREE}" title="{L_FREE}" /> 47 47 <!-- ENDIF --> 48 48 templates/reflection/userdetails.html
r269 r280 232 232 </div> 233 233 234 <!-- BEGIN switch_modtask_section --> 235 <form method="post" action="{switch_modtask_section.S_FORM_ACTION}"> 236 <table class="border" width="620"> 237 <caption>{L_EDIT_ACCOUNT}</caption> 238 <tr> 239 <td>{L_AVATAR}</td> 240 <td colspan="2"><input type="text" size="60" name="avatar" value="{switch_modtask_section.EDIT_AVATAR}" /></td> 241 </tr> 242 <!-- IF switch_modtask_section.CLASS_SELECT --> 243 <tr> 244 <td>{L_CLASS}</td> 245 <td colspan="2">{switch_modtask_section.CLASS_SELECT}</td> 246 </tr> 247 <!-- ENDIF --> 248 <tr> 249 <td>{L_INTERNET_SPEED}</td> 250 <td colspan="2"><img src="pic/speed_up.png" alt="" /> {switch_modtask_section.UPLOAD_SPEED_SELECT} <img src="pic/speed_down.png" alt="" /> {switch_modtask_section.DOWNLOAD_SPEED_SELECT}</td> 251 </tr> 252 <tr> 253 <td>{L_COMMENTS}</td> 254 <td colspan="2"><textarea cols="70" rows="5">{switch_modtask_section.MODCOMMENT}</textarea></td> 255 </tr> 256 <tr> 257 <td{switch_modtask_section.ROWSPAN}>{L_WARNED}</td> 258 <td width="20%">{switch_modtask_section.WARNED_INPUT} 259 <!-- IF switch_modtask_section.WARNED_UNTIL --> 260 <td>{switch_modtask_section.WARNED_UNTIL} ({switch_modtask_section.WARNED_AGO})</td> 261 </tr> 262 <!-- ELSE --> 263 <td>{L_WARN_AT} {switch_modtask_section.WARN_INPUT} {L_WARN_PM}:</td> 264 </tr> 265 <tr> 266 <td colspan="2"><input type="text" size=60 name="warnpm" /></td> 267 </tr> 268 <!-- ENDIF --> 269 <tr> 270 <td>{L_ENABLED}</td> 271 <td colspan="2">{switch_modtask_section.ENABLED_INPUT}</td> 272 </tr> 273 <tr> 274 <td>{L_PASSKEY}</td> 275 <td colspan="2"><input name="resetkey" value="1" type="checkbox" /> {L_CHANGE_PASSKEY}</td> 276 </tr> 277 <tr> 278 <td>{L_SEE_HIDDEN_TORRENTS}</td> 279 <td colspan="2">{switch_modtask_section.HIDDEN_TORRENTS_INPUT}</td> 280 </tr> 281 <tr> 282 <td>{L_MAY_BE_AUTODEMOTED}</td> 283 <td colspan="2">{switch_modtask_section.AUTODEMOTE_INPUT}</td> 284 </tr> 285 <tr> 286 <td colspan="3" align="center"><input type="submit" value="{L_DONE}" /></td> 287 </tr> 288 </table> 289 <input type="hidden" name="action" value="edituser" /> 290 <input type="hidden" name="userid" value="{ID}" /> 291 </form> 292 <!-- END switch_modtask_section --> 234 <!-- INCLUDE useredit_panel.html --> 293 235 294 236 <!-- INCLUDE overall_footer.html --> templates/reflection/userdetails_completed_torrents.html
r261 r280 14 14 <div class="subtableRow"> 15 15 <div class="leftCell" style="width:10%"><img src="pic/categories/{downloaded_torrents_row.CAT_PIC}" alt="{downloaded_torrents_row.CAT_NAME}" title="{downloaded_torrents_row.CAT_NAME}" /></div> 16 <div class="middleCell" style="width:30%"><a href="{downloaded_torrents_row.U_DETAILS}">{downloaded_torrents_row.NAME}</a></div> 16 <div class="middleCell" style="width:30%"><a href="{downloaded_torrents_row.U_DETAILS}">{downloaded_torrents_row.NAME}</a> 17 18 <!-- IF downloaded_torrents_row.FREE_ICON --> 19 20 <img src="{downloaded_torrents_row.FREE_ICON}" alt="{L_FREE}" title="{L_FREE}" /> 21 22 <!-- ENDIF --> 23 24 </div> 17 25 <div class="middleCell" style="width:15%"><a href="{downloaded_torrents_row.U_PEERLIST}#seeders">{downloaded_torrents_row.SEEDERS}</a> | <a href="{downloaded_torrents_row.U_PEERLIST}#leechers">{downloaded_torrents_row.LEECHERS}</a></div> 18 26 <div class="middleCell" style="width:15%">{downloaded_torrents_row.UPLOADED}</div> templates/reflection/userdetails_helped_torrents.html
r261 r280 13 13 <div class="subtableRow"> 14 14 <div class="leftCell" style="width:10%"><img src="pic/categories/{helped_torrents_row.CAT_PIC}" alt="{helped_torrents_row.CAT_NAME}" title="{helped_torrents_row.CAT_NAME}" /></div> 15 <div class="middleCell" style="width:40%"><a href="{helped_torrents_row.U_DETAILS}">{helped_torrents_row.NAME}</a></div> 15 <div class="middleCell" style="width:40%"><a href="{helped_torrents_row.U_DETAILS}">{helped_torrents_row.NAME}</a> 16 17 <!-- IF downloaded_torrents_row.FREE_ICON --> 18 19 <img src="{helped_torrents_row.FREE_ICON}" alt="{L_FREE}" title="{L_FREE}" /> 20 21 <!-- ENDIF --> 22 23 </div> 16 24 <div class="middleCell" style="width:15%"><a href="{helped_torrents_row.U_PEERLIST}#seeders">{helped_torrents_row.SEEDERS}</a> | <a href="{helped_torrents_row.U_PEERLIST}#leechers">{helped_torrents_row.LEECHERS}</a></div> 17 25 <div class="middleCell" style="width:15%">{helped_torrents_row.UPLOADED}</div> templates/reflection/userdetails_seeding_leeching_torrents.html
r261 r280 16 16 <div class="subtableRow"> 17 17 <div class="leftCell" style="width:10%"><img src="pic/categories/{now_torrents_row_seeding_leeching.CAT_PIC}" alt="{now_torrents_row_seeding_leeching.CAT_NAME}" title="{now_torrents_row_seeding_leeching.CAT_NAME}" /></div> 18 <div class="middleCell" style="width:30%"><a href="{now_torrents_row_seeding_leeching.U_DETAILS}">{now_torrents_row_seeding_leeching.NAME}</a></div> 18 <div class="middleCell" style="width:30%"><a href="{now_torrents_row_seeding_leeching.U_DETAILS}">{now_torrents_row_seeding_leeching.NAME}</a> 19 20 <!-- IF downloaded_torrents_row.FREE_ICON --> 21 22 <img src="{now_torrents_row_seeding_leeching.FREE_ICON}" alt="{L_FREE}" title="{L_FREE}" /> 23 24 <!-- ENDIF --> 25 26 </div> 19 27 <!-- IF L_TTL --><div class="middleCell" style="width:10%">{now_torrents_row_seeding_leeching.TTL}</div><!-- ENDIF --> 20 28 <div class="middleCell" style="width:10%">{now_torrents_row_seeding_leeching.SIZE}</div> templates/reflection/userdetails_uploaded_torrents.html
r261 r280 12 12 <div class="subtableRow"> 13 13 <div class="leftCell" style="width:10%"><img src="pic/categories/{uploaded_torrents_row.CAT_PIC}" alt="{uploaded_torrents_row.CAT_NAME}" title="{uploaded_torrents_row.CAT_NAME}" /></div> 14 <div class="middleCell" style="width:50%"><a href="{uploaded_torrents_row.U_DETAILS}">{uploaded_torrents_row.NAME}</a></div> 14 <div class="middleCell" style="width:50%"><a href="{uploaded_torrents_row.U_DETAILS}">{uploaded_torrents_row.NAME}</a> 15 16 <!-- IF downloaded_torrents_row.FREE_ICON --> 17 18 <img src="{uploaded_torrents_row.FREE_ICON}" alt="{L_FREE}" title="{L_FREE}" /> 19 20 <!-- ENDIF --> 21 22 </div> 15 23 <div class="middleCell" style="width:10%"><a href="{uploaded_torrents_row.U_PEERLIST}#seeders">{uploaded_torrents_row.SEEDERS}</a> | <a href="{uploaded_torrents_row.U_PEERLIST}#leechers">{uploaded_torrents_row.LEECHERS}</a></div> 16 24 <div class="rightCell" style="width:20%">{uploaded_torrents_row.ADDED}</div> topten.php
r255 r280 99 99 function torrents_top($res, $frame_caption, $subtype) { 100 100 global $template, $db, $root_path; 101 global $seo; 101 102 102 103 $template->assign_block_vars('torrents_top', array( … … 110 111 $ratio = get_ratio($row['seeders'], $row['leechers']); 111 112 $ratio = '<span style="color: ' . get_ratio_color($ratio) . ';">' . $ratio . '</span>'; 113 114 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 115 if ( empty($seo->seo_url['details'][$row['fid']]) ) { 116 $seo->seo_url['details'][$row['fid']] = $seo->set_url(censor_text($row['name']), $row['fid'], $seo->seo_static['details']); 117 } 118 // www.phpBB-SEO.com SEO TOOLKIT END 119 112 120 $template->assign_block_vars('torrents_top.torrents_row', array( 113 121 'U_DETAILS' => append_sid($root_path . 'details.php?id=' . $row['fid']), upload.php
r274 r280 167 167 if ( $row = $db->sql_fetchrow($result) ) { 168 168 169 if ( isset($cats[$cats[$row['category']]['cat_parent']]['cat_name']) ) { 170 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 171 $seo->set_url($cat_parent['cat_name'], $cat_parent['cat_id'], $seo->seo_static['browse']); 172 $seo->set_parent($cats[$row['category']]['cat_id'], $seo->seo_static['browse'], $cat_parent['cat_id'], $seo->seo_static['browse']); 173 // www.phpBB-SEO.com SEO TOOLKIT END 174 } 175 176 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 177 $seo->set_url($cats[$row['category']]['cat_name'], $cats[$row['category']]['cat_id'], $seo->seo_static['browse']); 178 $seo->set_parent($row['fid'], $seo->seo_static['details'], $cats[$row['category']]['cat_id'], $seo->seo_static['browse']); 179 $seo->set_url(censor_text($row['name']), $row['fid'], $seo->seo_static['details']); 180 // www.phpBB-SEO.com SEO TOOLKIT END 169 181 @unlink($torrent_dir . DIRECTORY_SEPARATOR . $filename . '.torrent'); 170 182 $message = sprintf($lang['torrent_already_uploaded'], append_sid($root_path . 'details.php?id=' . $row['fid']), $row['name']); … … 248 260 } 249 261 262 if ( isset($cats[$cats[$cat_id]['cat_parent']]['cat_name']) ) { 263 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 264 $seo->set_url($cat_parent['cat_name'], $cat_parent['cat_id'], $seo->seo_static['browse']); 265 $seo->set_parent($cats[$cat_id]['cat_id'], $seo->seo_static['browse'], $cat_parent['cat_id'], $seo->seo_static['browse']); 266 // www.phpBB-SEO.com SEO TOOLKIT END 267 } 268 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 269 $seo->set_url($cats[$cat_id]['cat_name'], $cats[$row['category']]['cat_id'], $seo->seo_static['browse']); 270 $seo->set_parent($id, $seo->seo_static['details'], $cats[$cat_id]['cat_id'], $seo->seo_static['browse']); 271 $seo->set_url(censor_text($name), $id, $seo->seo_static['details']); 272 // www.phpBB-SEO.com SEO TOOLKIT END 273 250 274 redirect( append_sid($root_path . 'details.php?id=' . $id . '&uploaded=1')); 251 275 userdetails.php
r278 r280 12 12 { 13 13 global $config, $lang, $template, $db, $images, $user, $userdata, $cats, $root_path; 14 global $seo; 14 15 15 16 for ( $i = 0; $i < sizeof( $row ); ++$i ) { … … 31 32 $cat_parent_id = ( isset($cats[$cats[$cat_id]['cat_parent']]['cat_id']) ? $cats[$cats[$cat_id]['cat_parent']]['cat_id'] : 0 ); 32 33 34 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 35 if ( $cat_parent_id ) { 36 $seo->set_url($cats[$cat_parent_id]['cat_name'], $cat_parent_id, $seo->seo_static['browse']); 37 $seo->set_parent($cat_id, $seo->seo_static['browse'], $cat_parent_id, $seo->seo_static['browse']); 38 } 39 40 $seo->set_url($cats[$cat_id]['cat_name'], $cat_id, $seo->seo_static['browse']); 41 42 $seo->set_parent($row[$i]['fid'], $seo->seo_static['details'], $cat_id, $seo->seo_static['browse']); 43 44 $seo->set_url(censor_text($row[$i]['torrentname']), $row[$i]['fid'], $seo->seo_static['details']); 45 // www.phpBB-SEO.com SEO TOOLKIT END 33 46 34 47 $template->assign_block_vars( 'now_torrents_row_seeding_leeching', array( … … 38 51 'CAT_NAME' => $cats[$row[$i]['category']]['cat_name'], 39 52 'ID' => $row[$i]['torrent'], 40 'NAME' => $row[$i]['torrentname'] . ( $row[$i]['free'] ? '<img src="' . $images['freedownload'] . '" alt="" />' : '' ), 53 'NAME' => $row[$i]['torrentname'], 54 'FREE_ICON' => get_free_icon($row[$i]['free']), 41 55 'RATIO' => $ratio, 42 56 'RATIO_COLOR' => get_ratio_color( $ratio ), … … 103 117 $cat_parent_id = ( isset($cats[$cats[$cat_id]['cat_parent']]['cat_id']) ? $cats[$cats[$cat_id]['cat_parent']]['cat_id'] : 0 ); 104 118 119 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 120 if ( $cat_parent_id ) { 121 $seo->set_url($cats[$cat_parent_id]['cat_name'], $cat_parent_id, $seo->seo_static['browse']); 122 $seo->set_parent($cat_id, $seo->seo_static['browse'], $cat_parent_id, $seo->seo_static['browse']); 123 } 124 125 $seo->set_url($cats[$cat_id]['cat_name'], $cat_id, $seo->seo_static['browse']); 126 $seo->set_parent($row['fid'], $seo->seo_static['details'], $cat_id, $seo->seo_static['browse']); 127 $seo->set_url(censor_text($row['name']), $row['fid'], $seo->seo_static['details']); 128 // www.phpBB-SEO.com SEO TOOLKIT END 105 129 106 130 $template->assign_block_vars('uploaded_torrents_row', array( … … 110 134 'CAT_NAME' => $cats[$row['category']]['cat_name'], 111 135 'ID' => $row['fid'], 112 'NAME' => $row['name'] . ( $row['free'] ? '<img src="' . $images['freedownload'] . '" alt="" />' : '' ), 136 'NAME' => $row['name'], 137 'FREE_ICON' => get_free_icon($row['free']), 113 138 'SEEDERS' => $row['seeders'], 114 139 'LEECHERS' => $row['leechers'], … … 174 199 $cat_parent_id = ( isset($cats[$cats[$cat_id]['cat_parent']]['cat_id']) ? $cats[$cats[$cat_id]['cat_parent']]['cat_id'] : 0 ); 175 200 201 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 202 if ( $cat_parent_id ) { 203 $seo->set_url($cats[$cat_parent_id]['cat_name'], $cat_parent_id, $seo->seo_static['browse']); 204 $seo->set_parent($cat_id, $seo->seo_static['browse'], $cat_parent_id, $seo->seo_static['browse']); 205 } 206 207 $seo->set_url($cats[$cat_id]['cat_name'], $cat_id, $seo->seo_static['browse']); 208 $seo->set_parent($row['fid'], $seo->seo_static['details'], $cat_id, $seo->seo_static['browse']); 209 $seo->set_url(censor_text($row['name']), $row['fid'], $seo->seo_static['details']); 210 // www.phpBB-SEO.com SEO TOOLKIT END 211 176 212 $template->assign_block_vars( 'downloaded_torrents_row', array( 177 213 'U_DETAILS' => append_sid($root_path . 'details.php?id=' . $row['fid'] ), … … 182 218 'CAT_NAME' => $cats[$row['category']]['cat_name'], 183 219 'ID' => $row['fid'], 184 'NAME' => $row['name'] . ( $row['free'] ? '<img src="' . $images['freedownload'] . '" alt="" />' : '' ), 220 'NAME' => $row['name'], 221 'FREE_ICON' => get_free_icon($row['free']), 185 222 'SEEDERS' => $row['seeders'], 186 223 'LEECHERS' => $row['leechers'], … … 222 259 $cat_parent_id = ( isset($cats[$cats[$cat_id]['cat_parent']]['cat_id']) ? $cats[$cats[$cat_id]['cat_parent']]['cat_id'] : 0 ); 223 260 261 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 262 if ( $cat_parent_id ) { 263 $seo->set_url($cats[$cat_parent_id]['cat_name'], $cat_parent_id, $seo->seo_static['browse']); 264 $seo->set_parent($cat_id, $seo->seo_static['browse'], $cat_parent_id, $seo->seo_static['browse']); 265 } 266 267 $seo->set_url($cats[$cat_id]['cat_name'], $cat_id, $seo->seo_static['browse']); 268 $seo->set_parent($row['fid'], $seo->seo_static['details'], $cat_id, $seo->seo_static['browse']); 269 $seo->set_url(censor_text($row['name']), $row['fid'], $seo->seo_static['details']); 270 // www.phpBB-SEO.com SEO TOOLKIT END 271 224 272 $template->assign_block_vars( 'helped_torrents_row', array( 225 273 'U_DETAILS' => append_sid($root_path . 'details.php?id=' . $row['fid'] ), … … 230 278 'CAT_NAME' => $cats[$row['category']]['cat_name'], 231 279 'ID' => $row['fid'], 232 'NAME' => $row['name'] . ( $row['free'] ? '<img src="' . $images['freedownload'] . '" alt="" />' : '' ), 280 'NAME' => $row['name'], 281 'FREE_ICON' => get_free_icon($row['free']), 233 282 'SEEDERS' => $row['seeders'], 234 283 'LEECHERS' => $row['leechers'], … … 267 316 } 268 317 318 $seo->set_user_url($user['name'], $id); 319 269 320 if ( isset( $_GET['comments_history'] ) ) { 270 321 $from_is = COMMENTS_TABLE . ' c … … 282 333 $count = ( $row = $db->sql_fetchrow( $result ) ) ? $row['count'] : 0; 283 334 284 list( $pagertop, $pagerbottom, $limit ) = pager( $config['posts_per_page'], $count, 'userdetails.php?id=' . $id . '&comments_history=1&' ); 335 if ( $username ) { 336 $url = 'userdetails.php?id=' . $id . '&comments_history=1&'; 337 } 338 else { 339 $url = 'userdetails.php?un=' . $username . '&comments_history=1&'; 340 } 341 342 list( $pagertop, $pagerbottom, $limit ) = pager( $config['posts_per_page'], $count, $url ); 285 343 286 344 $subject = '<a href="' . append_sid($root_path . 'userdetails.php?id=' . $id) . '"><b>' . $user['name'] . '</b></a>' . get_user_icons( $user, true ); … … 314 372 $cat_id = $row['t_category']; 315 373 $cat_parent_id = ( isset($cats[$cats[$cat_id]['cat_parent']]['cat_id']) ? $cats[$cats[$cat_id]['cat_parent']]['cat_id'] : 0 ); 374 375 // www.phpBB-SEO.com SEO TOOLKIT BEGIN 376 if ( $cat_parent_id ) { 377 $seo->set_url($cats[$cat_parent_id]['cat_name'], $cat_parent_id, $seo->seo_static['browse']); 378 $seo->set_parent($cat_id, $seo->seo_static['browse'], $cat_parent_id, $seo->seo_static['browse']); 379 } 380 381 $seo->set_url($cats[$cat_id]['cat_name'], $cat_id, $seo->seo_static['browse']); 382 $seo->set_parent($row['comment_for_id'], $seo->seo_static['details'], $cat_id, $seo->seo_static['browse']); 383 $seo->set_url(censor_text($row['name']), $row['comment_for_id'], $seo->seo_static['details']); 384 // www.phpBB-SEO.com SEO TOOLKIT END 316 385 317 386 $name = $lang['torrent']; … … 378 447 $db->sql_freeresult(); 379 448 380 $sql = 'SELECT connectable,port, peer_id, useragent FROM ' . PEERS_TABLE . ' WHERE uid = ' . $id . ' ORDER BY mtime DESC LIMIT 1';449 $sql = 'SELECT port, peer_id, useragent FROM ' . PEERS_TABLE . ' WHERE uid = ' . $id . ' ORDER BY mtime DESC LIMIT 1'; 381 450 $result = $db->sql_query( $sql ); 382 451 $con_arr = $db->sql_fetchrow( $result ); … … 524 593 525 594 if ( $con_arr ) { 526 if ( defined('USE_XBTT') ) { 527 $connectable_port = $con_arr['port']; 528 } 529 else { 530 $connectable_port = '<span style="color:' . ( $con_arr['connectable'] ? 'green' : 'red' ) . ';">' . $con_arr['port'] . '</span>'; 531 } 595 $connectable_port = $con_arr['port']; 532 596 } 533 597 else { … … 582 646 'BIRTHDAY' => $user['birthday'], 583 647 'COMMENTS' => ( $user['comments_count'] ? '<a href="' . append_sid($root_path . 'userdetails.php?id=' . $id . '&comments_history=1' ) . '">' . $user['comments_count'] . '</a>' : 0 ), 584 'FORUM_POSTS' => ( $user['user_posts'] ? '<a href="' . append_sid( 'phpbb2.php?page=search&search_author=' . $user['name']) . '">' . $user['user_posts'] . '</a>' : 0 ),648 'FORUM_POSTS' => ( $user['user_posts'] ? '<a href="' . append_sid($root_path . 'phpbb2.php?page=search&search_author=' . $user['name']) . '">' . $user['user_posts'] . '</a>' : 0 ), 585 649 'USER_SIGNATURE' => censor_text( $user_sig ), 586 650 … … 617 681 } 618 682 619 if ($userdata['class'] >= UC_MODERATOR && $user['class'] < $userdata['class']) { 620 621 $maxclass = ( $userdata['class'] == UC_MODERATOR ? UC_POWER_USER : $userdata['class'] - 1 ); 622 $class_select = ( $user['class'] > UC_POWER_USER && $userdata['class'] == UC_MODERATOR? '' : user_class_select($user['class'], 'class', $maxclass) ); 623 $uploadspeed = generate_internet_speed($user['upload'], 'upload'); 624 $downloadspeed = generate_internet_speed($user['download'], 'download'); 625 626 $modcomment = $user['modcomment']; 627 $warned = ( $user['warneduntil'] ? 1 : 0); 628 $warneduntil = 0; 629 if ($warned) { 630 $warneduntil = $user['warneduntil']; 631 $warn_input = ''; 632 } 633 else { 634 $warn_input = '<select name="warnlength">' . "\n"; 635 $warn_input .= '<option value="0">(' . $lang['choose'] . ')</option>' . "\n"; 636 $warn_input .= '<option value="1">' . sprintf($lang['warn_week'], 1) . '</option>' . "\n"; 637 $warn_input .= '<option value="2">' . sprintf($lang['warn_week'], 2) . '</option>' . "\n"; 638 $warn_input .= '<option value="4">' . sprintf($lang['warn_week'], 4) . '</option>' . "\n"; 639 $warn_input .= '<option value="8">' . sprintf($lang['warn_week'], 8) . '</option>' . "\n"; 640 $warn_input .= '</select>' . "\n"; 641 } 642 $warneduntil = create_date($warneduntil); 643 $template->assign_block_vars('switch_modtask_section', array( 644 'S_FORM_ACTION' => append_sid('modtask.php'), 645 'UPLOAD_SPEED_SELECT' => $uploadspeed, 646 'DOWNLOAD_SPEED_SELECT' => $downloadspeed, 647 'MODCOMMENT' => preg_replace('/t([0-9]{10})/e', "create_date('\\1')", $user['modcomment']), 648 'ROWSPAN' => ( !$warned ? ' rowspan=2' : '' ), 649 'WARNED' => $warned, 650 'WARNED_INPUT' => $warned ? '<input name="warned" value="1" type="radio" checked="checked" /> ' . $lang['yes'] . ' <input name="warned" value="0" type="radio" />' . $lang['no'] : $lang['no'], 651 'WARNED_UNTIL' => $warned ? sprintf($lang['warned_until'], $warneduntil):'', 652 'WARNED_AGO' => $warned ? sprintf($lang['warned_ago'], mkprettytime($user['warneduntil'] - time())):'', 653 'WARN_INPUT' => $warn_input, 654 'CLASS_SELECT' => $class_select, 655 'EDIT_AVATAR' => $user['avatar'], 656 'ENABLED_INPUT' => '<input name="enabled" value="1" type="radio"' . ($enabled ? ' checked="checked"' : '') . ' /> ' . $lang['yes'] . ' <input name="enabled" value="0" type="radio"' . (!$enabled ? ' checked="checked"' : '') . ' /> ' . $lang['no'], 657 'HIDDEN_TORRENTS_INPUT' => '<input name="hiddentorrents" type="checkbox"' . ($user['hiddentorrents'] ? ' checked="checked"':'') . ' value="1" />', 658 'AUTODEMOTE_INPUT' => '<input type="radio" name="autodemote" value="1"' . ( $user['autodemote'] ? ' checked="checked"' : '') . ' /> ' . $lang['yes'] . ' <input type="radio" name="autodemote" value="0" ' . ( !$user['autodemote'] ? ' checked="checked"' : '') . ' /> ' . $lang['no']) 659 ); 660 } 661 662 stdhead(sprintf($lang['userdetails'], $user['name'])); 663 $template->set_filenames(array( 664 'body' => 'userdetails.html') 665 ); 666 stdfoot(); 683 require ($root_path . 'include/modtask/edituser.php'); 684 685 stdhead(sprintf($lang['userdetails'], $user['name'])); 686 $template->set_filenames(array( 687 'body' => 'userdetails.html' 688 )); 689 stdfoot(); 667 690 } 668 691 ?> usersearch.php
r261 r280 507 507 $warned = ( isset($_GET['w']) ? $_GET['w'] : 0 ); 508 508 if ( $warned != '--') { 509 $where_is[] = 'u.warneduntil ' . ( $warned ? ' <> 0' : ' =0' );509 $where_is[] = 'u.warneduntil ' . ( $warned == 2 ? ' = 0' : ' <> 0' ); 510 510 $q[] = "w=$warned"; 511 511 }
