Changeset 1121
- Timestamp:
- 03/29/10 15:37:29 (2 years ago)
- Location:
- trunk
- Files:
-
- 36 edited
-
scripts/db-backup-delete (modified) (1 diff)
-
smf/Packages/installed.list (modified) (1 diff)
-
smf/Settings.php (modified) (1 diff)
-
smf/Sources/BoardIndex.php (modified) (2 diffs)
-
smf/Sources/Display.php (modified) (4 diffs)
-
smf/Sources/Load.php (modified) (3 diffs)
-
smf/Sources/ManageAttachments.php (modified) (4 diffs)
-
smf/Sources/ManageCalendar.php (modified) (2 diffs)
-
smf/Sources/ManageMembers.php (modified) (3 diffs)
-
smf/Sources/ManagePermissions.php (modified) (3 diffs)
-
smf/Sources/ManagePosts.php (modified) (1 diff)
-
smf/Sources/ManageSearch.php (modified) (1 diff)
-
smf/Sources/ManageSmileys.php (modified) (15 diffs)
-
smf/Sources/Modlog.php (modified) (5 diffs)
-
smf/Sources/PackageGet.php (modified) (3 diffs)
-
smf/Sources/Packages.php (modified) (3 diffs)
-
smf/Sources/Poll.php (modified) (3 diffs)
-
smf/Sources/Post.php (modified) (5 diffs)
-
smf/Sources/Profile.php (modified) (3 diffs)
-
smf/Sources/Search.php (modified) (3 diffs)
-
smf/Sources/SplitTopics.php (modified) (2 diffs)
-
smf/Sources/Subs-Auth.php (modified) (4 diffs)
-
smf/Sources/Subs-Boards.php (modified) (2 diffs)
-
smf/Sources/Subs-Graphics.php (modified) (2 diffs)
-
smf/Sources/Subs.php (modified) (15 diffs)
-
smf/Sources/Themes.php (modified) (2 diffs)
-
smf/Themes/default/Admin.template.php (modified) (1 diff)
-
smf/Themes/default/ManageSearch.template.php (modified) (1 diff)
-
smf/Themes/default/Packages.template.php (modified) (2 diffs)
-
smf/Themes/default/Post.template.php (modified) (1 diff)
-
smf/Themes/default/Search.template.php (modified) (5 diffs)
-
smf/Themes/default/SplitTopics.template.php (modified) (2 diffs)
-
smf/Themes/default/index.template.php (modified) (1 diff)
-
smf/index.php (modified) (2 diffs)
-
www/views/header.php (modified) (1 diff)
-
www/views/job_detail.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/scripts/db-backup-delete
r1113 r1121 13 13 14 14 // Important: Set the first date when the script will be run. 15 define('START', mktime(0, 0, 0, 3, 19, 2010));15 define('START', mktime(0, 0, 0, 3, 21, 2010)); 16 16 17 17 -
trunk/smf/Packages/installed.list
r1048 r1121 1 Visual Verification Options|^|VisualVerificationOptions_0-5-2.tar.gz|^|motokochan:visualverificationoptions|^|0.5.2 -
trunk/smf/Settings.php
r852 r1121 15 15 // Webmaster email (e-mail where it sends reports in case shit) 16 16 // Also serves as address to send emails from 17 $webmaster_email = ' strat.cristian@gmail.com';17 $webmaster_email = 'no-reply@infoarena.ro'; 18 18 19 19 // Decent defaults below (edit only if you get bored) -
trunk/smf/Sources/BoardIndex.php
r852 r1121 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1 *8 * Software Version: SMF 1.1.11 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 * Copyright 2006 by:Simple Machines LLC (http://www.simplemachines.org) *10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * 11 11 * 2001-2006 by: Lewis Media (http://www.lewismedia.com) * 12 12 * Support, News, Updates at: http://www.simplemachines.org * … … 96 96 'is_collapsed' => isset($row_board['canCollapse']) && $row_board['canCollapse'] == 1 && $row_board['isCollapsed'] > 0, 97 97 'can_collapse' => isset($row_board['canCollapse']) && $row_board['canCollapse'] == 1, 98 'collapse_href' => isset($row_board['canCollapse']) ? $scripturl . '?action=collapse;c=' . $row_board['ID_CAT'] . ';sa=' . ($row_board['isCollapsed'] > 0 ? 'expand' : 'collapse ;'). '#' . $row_board['ID_CAT'] : '',98 'collapse_href' => isset($row_board['canCollapse']) ? $scripturl . '?action=collapse;c=' . $row_board['ID_CAT'] . ';sa=' . ($row_board['isCollapsed'] > 0 ? 'expand' : 'collapse') . ';sesc=' . $context['session_id'] . '#' . $row_board['ID_CAT'] : '', 99 99 'collapse_image' => isset($row_board['canCollapse']) ? '<img src="' . $settings['images_url'] . '/' . ($row_board['isCollapsed'] > 0 ? 'expand.gif" alt="+"' : 'collapse.gif" alt="-"') . ' border="0" />' : '', 100 100 'href' => $scripturl . '#' . $row_board['ID_CAT'], -
trunk/smf/Sources/Display.php
r1048 r1121 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1. 9*8 * Software Version: SMF 1.1.11 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * … … 929 929 function Download() 930 930 { 931 global $txt, $modSettings, $db_prefix, $user_info, $scripturl, $context, $sourcedir ;931 global $txt, $modSettings, $db_prefix, $user_info, $scripturl, $context, $sourcedir, $topic; 932 932 933 933 $context['no_last_modified'] = true; … … 952 952 else 953 953 { 954 // This checks only the current board for $board/$topic's permissions. 954 955 isAllowedTo('view_attachments'); 955 956 956 957 // Make sure this attachment is on this board. 958 // NOTE: We must verify that $topic is the attachment's topic, or else the permission check above is broken. 957 959 $request = db_query(" 958 960 SELECT a.filename, a.ID_ATTACH, a.attachmentType, a.file_hash … … 961 963 AND $user_info[query_see_board] 962 964 AND m.ID_MSG = a.ID_MSG 965 AND m.ID_TOPIC = $topic 963 966 AND a.ID_ATTACH = $_REQUEST[attach] 964 967 LIMIT 1", __FILE__, __LINE__); -
trunk/smf/Sources/Load.php
r1048 r1121 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1. 9*8 * Software Version: SMF 1.1.11 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * … … 1366 1366 $context['browser']['needs_size_fix'] = ($context['browser']['is_ie5'] || $context['browser']['is_ie5.5'] || $context['browser']['is_ie4'] || $context['browser']['is_opera6']) && strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') === false; 1367 1367 1368 // 1.1.x doesn't detect IE8, so render as IE7. 1369 $context['html_headers'] .= '<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />'; 1370 1368 1371 // This isn't meant to be reliable, it's just meant to catch most bots to prevent PHPSESSID from showing up. 1369 1372 $ci_user_agent = strtolower($_SERVER['HTTP_USER_AGENT']); … … 1914 1917 { 1915 1918 global $sc; 1919 global $HTTP_SESSION_VARS, $modSettings, $boardurl; 1916 1920 1917 1921 // Most of this was commented for [infoarena] integration. -
trunk/smf/Sources/ManageAttachments.php
r1048 r1121 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1.1 0*8 * Software Version: SMF 1.1.11 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * … … 339 339 'downloads' => $row['downloads'], 340 340 'href' => $row['attachmentType'] == 1 ? $modSettings['custom_avatar_url'] . '/' . $row['filename'] : ($scripturl . '?action=dlattach;' . ($context['browse_type'] == 'avatars' ? 'type=avatar;' : 'topic=' . $row['ID_TOPIC'] . '.0;') . 'id=' . $row['ID_ATTACH']), 341 'link' => '<a href="' . ($row['attachmentType'] == 1 ? $modSettings['custom_avatar_url'] . '/' . $row['filename'] : ($scripturl . '?action=dlattach;' . ($context['browse_type'] == 'avatars' ? 'type=avatar;' : 'topic=' . $row['ID_TOPIC'] . '.0;') . 'id=' . $row['ID_ATTACH'])) . '"' . (empty($row['width']) || empty($row['height']) ? '' : ' onclick="return reqWin(this.href + \'' . ($ modSettings['custom_avatar_url']? '' : ';image') . '\', ' . ($row['width'] + 20) . ', ' . ($row['height'] + 20) . ', true);"') . '>' . htmlspecialchars($row['filename']) . '</a>'341 'link' => '<a href="' . ($row['attachmentType'] == 1 ? $modSettings['custom_avatar_url'] . '/' . $row['filename'] : ($scripturl . '?action=dlattach;' . ($context['browse_type'] == 'avatars' ? 'type=avatar;' : 'topic=' . $row['ID_TOPIC'] . '.0;') . 'id=' . $row['ID_ATTACH'])) . '"' . (empty($row['width']) || empty($row['height']) ? '' : ' onclick="return reqWin(this.href + \'' . ($row['attachmentType'] == 1 ? '' : ';image') . '\', ' . ($row['width'] + 20) . ', ' . ($row['height'] + 20) . ', true);"') . '>' . htmlspecialchars($row['filename']) . '</a>' 342 342 ), 343 343 'topic' => $row['ID_TOPIC'], … … 562 562 SELECT 563 563 a.filename, a.file_hash, a.attachmentType, a.ID_ATTACH, a.ID_MEMBER" . ($query_type == 'messages' ? ', m.ID_MSG' : ', a.ID_MSG') . ", 564 IFNULL(thumb.ID_ATTACH, 0) AS ID_THUMB, thumb.filename AS thumb_filename, thumb_parent.ID_ATTACH AS ID_PARENT 564 IFNULL(thumb.ID_ATTACH, 0) AS ID_THUMB, thumb.filename AS thumb_filename, thumb_parent.ID_ATTACH AS ID_PARENT, 565 thumb.file_hash as thumb_file_hash 565 566 FROM ({$db_prefix}attachments AS a" .($query_type == 'members' ? ", {$db_prefix}members AS mem" : ($query_type == 'messages' ? ", {$db_prefix}messages AS m" : '')) . ") 566 567 LEFT JOIN {$db_prefix}attachments AS thumb ON (thumb.ID_ATTACH = a.ID_THUMB) … … 586 587 if (!empty($row['ID_THUMB']) && $autoThumbRemoval) 587 588 { 588 $thumb_filename = getAttachmentFilename($row['thumb_filename'], $row['ID_THUMB'], false, $row[' file_hash']);589 $thumb_filename = getAttachmentFilename($row['thumb_filename'], $row['ID_THUMB'], false, $row['thumb_file_hash']); 589 590 @unlink($thumb_filename); 590 591 $attach[] = $row['ID_THUMB']; -
trunk/smf/Sources/ManageCalendar.php
r852 r1121 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1 *8 * Software Version: SMF 1.1.11 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 * Copyright 2006 by:Simple Machines LLC (http://www.simplemachines.org) *10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * 11 11 * 2001-2006 by: Lewis Media (http://www.lewismedia.com) * 12 12 * Support, News, Updates at: http://www.simplemachines.org * … … 144 144 $context['sub_template'] = 'edit_holiday'; 145 145 $context['admin_tabs']['tabs']['holidays']['is_selected'] = true; 146 147 // Cast this for safety... 148 if (isset($_REQUEST['holiday'])) 149 $_REQUEST['holiday'] = (int) $_REQUEST['holiday']; 146 150 147 151 // Submitting? -
trunk/smf/Sources/ManageMembers.php
r1048 r1121 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1. 6*8 * Software Version: SMF 1.1.11 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 * Copyright 2006 by:Simple Machines LLC (http://www.simplemachines.org) *10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * 11 11 * 2001-2006 by: Lewis Media (http://www.lewismedia.com) * 12 12 * Support, News, Updates at: http://www.simplemachines.org * … … 202 202 } 203 203 204 // Build a search for a specific group or post group. 205 if ($context['sub_action'] === 'query') 206 { 207 if (isset($_GET['group'])) 208 $_POST['membergroups'] = array( 209 array((int) $_GET['group']), 210 array((int) $_GET['group']), 211 ); 212 elseif (isset($_GET['pgroup'])) 213 $_POST['postgroups'] = array((int) $_GET['pgroup']); 214 } 215 216 if ($context['sub_action'] == 'query' && !empty($_REQUEST['params']) && empty($_POST)) 217 { 218 $search_params = base64_decode(stripslashes($_REQUEST['params'])); 219 $_POST += addslashes__recursive(@unserialize($search_params)); 220 } 221 204 222 // Check input after a member search has been submitted. 205 if ($context['sub_action'] == 'query' && empty($_REQUEST['params']))223 if ($context['sub_action'] == 'query') 206 224 { 207 225 // Retrieving the membergroups and postgroups. … … 399 417 $where = empty($query_parts) ? '1' : implode(' 400 418 AND ', $query_parts); 401 } 402 // If the query information was already packed in the URL, decode it.403 // !!! Change this.404 else if ($context['sub_action'] == 'query')405 $ where = base64_decode(strtr($_REQUEST['params'], array(' ' => '+')));419 420 $search_params = base64_encode(serialize(stripslashes__recursive($_POST))); 421 } 422 else 423 $search_params = null; 406 424 407 425 // Construct the additional URL part with the query info in it. 408 $context['params_url'] = $context['sub_action'] == 'query' ? ';sa=query;params=' . base64_encode($where): '';426 $context['params_url'] = $context['sub_action'] == 'query' ? ';sa=query;params=' . $search_params : ''; 409 427 410 428 // Get the title and sub template ready.. -
trunk/smf/Sources/ManagePermissions.php
r1017 r1121 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1. 5*8 * Software Version: SMF 1.1.11 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 * Copyright 2006-200 7by: Simple Machines LLC (http://www.simplemachines.org) *10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * 11 11 * 2001-2006 by: Lewis Media (http://www.lewismedia.com) * 12 12 * Support, News, Updates at: http://www.simplemachines.org * … … 190 190 'allow_modify' => true, 191 191 'can_search' => true, 192 'href' => $scripturl . '?action=viewmembers;sa=query; params=' . base64_encode('ID_GROUP = 0'),192 'href' => $scripturl . '?action=viewmembers;sa=query;group=0', 193 193 'is_post_group' => false, 194 194 'color' => '', … … 221 221 'allow_modify' => $row['ID_GROUP'] > 1, 222 222 'can_search' => $row['ID_GROUP'] != 3, 223 'href' => $scripturl . '?action=viewmembers;sa=query ;params=' . base64_encode($row['minPosts'] == -1 ? "ID_GROUP = $row[ID_GROUP] OR FIND_IN_SET($row[ID_GROUP], additionalGroups)" : "ID_POST_GROUP = $row[ID_GROUP]"),223 'href' => $scripturl . '?action=viewmembers;sa=query' . ($row['minPosts'] == -1 ? ';group=' . (int) $row['ID_GROUP'] : ';pgroup=' . (int) $row['ID_GROUP']), 224 224 'is_post_group' => $row['minPosts'] != -1, 225 225 'color' => empty($row['onlineColor']) ? '' : $row['onlineColor'], -
trunk/smf/Sources/ManagePosts.php
r1017 r1121 276 276 'enableEmbeddedFlash' => empty($_POST['enableEmbeddedFlash']) ? '0' : '1', 277 277 'enableSpellChecking' => empty($_POST['enableSpellChecking']) ? '0' : '1', 278 279 'visual_verification_guest_post' => empty($_POST['visual_verification_guest_post']) ? '0' : '1',280 278 'max_messageLength' => empty($_POST['max_messageLength']) ? '0' : (int) $_POST['max_messageLength'], 281 279 'fixLongWords' => empty($_POST['fixLongWords']) ? '0' : (int) $_POST['fixLongWords'], -
trunk/smf/Sources/ManageSearch.php
r1017 r1121 144 144 updateSettings(array( 145 145 'simpleSearch' => isset($_POST['simpleSearch']) ? '1' : '0', 146 147 'visual_verification_guest_search' => isset($_POST['visual_verification_guest_search']) ? '1' : '0',148 146 'search_results_per_page' => (int) $_POST['search_results_per_page'], 149 147 'search_max_results' => (int) $_POST['search_max_results'], -
trunk/smf/Sources/ManageSmileys.php
r852 r1121 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1.1 *8 * Software Version: SMF 1.1.11 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 * Copyright 2006 by:Simple Machines LLC (http://www.simplemachines.org) *10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * 11 11 * 2001-2006 by: Lewis Media (http://www.lewismedia.com) * 12 12 * Support, News, Updates at: http://www.simplemachines.org * … … 175 175 $context['smiley_sets'][$i] = array( 176 176 'id' => $i, 177 'path' => $set,178 'name' => $set_names[$i],177 'path' => htmlspecialchars($set), 178 'name' => htmlspecialchars($set_names[$i]), 179 179 'selected' => $set == $modSettings['smiley_sets_default'] 180 180 ); … … 267 267 $context['smiley_sets'][$i] = array( 268 268 'id' => $i, 269 'path' => $set,270 'name' => $set_names[$i],269 'path' => htmlspecialchars($set), 270 'name' => htmlspecialchars($set_names[$i]), 271 271 'selected' => $set == $modSettings['smiley_sets_default'] 272 272 ); … … 280 280 // Sanity check - then import. 281 281 if (isset($context['smiley_sets'][$_GET['set']])) 282 ImportSmileys( $context['smiley_sets'][$_GET['set']]['path']);282 ImportSmileys(un_htmlspecialchars($context['smiley_sets'][$_GET['set']]['path'])); 283 283 284 284 // Force the process to continue. … … 362 362 $context['smiley_sets'][$i] = array( 363 363 'id' => $i, 364 'path' => $set,365 'name' => $set_names[$i],364 'path' => htmlspecialchars($set), 365 'name' => htmlspecialchars($set_names[$i]), 366 366 'selected' => $set == $modSettings['smiley_sets_default'] 367 367 ); … … 399 399 foreach ($context['smiley_sets'] as $set) 400 400 { 401 if (!is_writable($context['smileys_dir'] . '/' . $set['path']))401 if (!is_writable($context['smileys_dir'] . '/' . un_htmlspecialchars($set['path']))) 402 402 $writeErrors[] = $set['path']; 403 403 } … … 429 429 $i = 0; 430 430 // Keep going until we find a set the file doesn't exist in. (or maybe it exists in all of them?) 431 while (isset($context['smiley_sets'][$i]) && file_exists($context['smileys_dir'] . '/' . $context['smiley_sets'][$i]['path']. '/' . $destName))431 while (isset($context['smiley_sets'][$i]) && file_exists($context['smileys_dir'] . '/' . un_htmlspecialchars($context['smiley_sets'][$i]['path']) . '/' . $destName)) 432 432 $i++; 433 433 … … 435 435 if (isset($context['smiley_sets'][$i]['path'])) 436 436 { 437 $smileyLocation = $context['smileys_dir'] . '/' . $context['smiley_sets'][$i]['path']. '/' . $destName;437 $smileyLocation = $context['smileys_dir'] . '/' . un_htmlspecialchars($context['smiley_sets'][$i]['path']) . '/' . $destName; 438 438 move_uploaded_file($_FILES['uploadSmiley']['tmp_name'], $smileyLocation); 439 439 @chmod($smileyLocation, 0644); … … 442 442 for ($n = count($context['smiley_sets']); $i < $n; $i++) 443 443 { 444 $currentPath = $context['smileys_dir'] . '/' . $context['smiley_sets'][$i]['path']. '/' . $destName;444 $currentPath = $context['smileys_dir'] . '/' . un_htmlspecialchars($context['smiley_sets'][$i]['path']) . '/' . $destName; 445 445 446 446 // The file is already there! Don't overwrite it! … … 473 473 foreach ($context['smiley_sets'] as $i => $set) 474 474 { 475 $set['name'] = un_htmlspecialchars($set['name']); 476 $set['path'] = un_htmlspecialchars($set['path']); 477 475 478 if (!isset($_FILES['individual_' . $set['name']]['name']) || $_FILES['individual_' . $set['name']]['name'] == '') 476 479 continue; … … 547 550 foreach ($context['smiley_sets'] as $smiley_set) 548 551 { 549 if (!file_exists($context['smileys_dir'] . '/' . $smiley_set['path']))552 if (!file_exists($context['smileys_dir'] . '/' . un_htmlspecialchars($smiley_set['path']))) 550 553 continue; 551 554 552 $dir = dir($context['smileys_dir'] . '/' . $smiley_set['path']);555 $dir = dir($context['smileys_dir'] . '/' . un_htmlspecialchars($smiley_set['path'])); 553 556 while ($entry = $dir->read()) 554 557 { … … 665 668 $context['smiley_sets'][$i] = array( 666 669 'id' => $i, 667 'path' => $set,668 'name' => $set_names[$i],670 'path' => htmlspecialchars($set), 671 'name' => htmlspecialchars($set_names[$i]), 669 672 'selected' => $set == $modSettings['smiley_sets_default'] 670 673 ); … … 706 709 { 707 710 foreach ($context['smileys'] as $smiley_id => $smiley) 708 if (!file_exists($modSettings['smileys_dir'] . '/' . $smiley_set['path']. '/' . $smiley['filename']))711 if (!file_exists($modSettings['smileys_dir'] . '/' . un_htmlspecialchars($smiley_set['path']) . '/' . $smiley['filename'])) 709 712 $context['smileys'][$smiley_id]['sets_not_found'][] = $smiley_set['path']; 710 713 } … … 724 727 $context['smiley_sets'][$i] = array( 725 728 'id' => $i, 726 'path' => $set,727 'name' => $set_names[$i],729 'path' => htmlspecialchars($set), 730 'name' => htmlspecialchars($set_names[$i]), 728 731 'selected' => $set == $modSettings['smiley_sets_default'] 729 732 ); … … 737 740 foreach ($context['smiley_sets'] as $smiley_set) 738 741 { 739 if (!file_exists($context['smileys_dir'] . '/' . $smiley_set['path']))742 if (!file_exists($context['smileys_dir'] . '/' . un_htmlspecialchars($smiley_set['path']))) 740 743 continue; 741 744 742 $dir = dir($context['smileys_dir'] . '/' . $smiley_set['path']);745 $dir = dir($context['smileys_dir'] . '/' . un_htmlspecialchars($smiley_set['path'])); 743 746 while ($entry = $dir->read()) 744 747 { -
trunk/smf/Sources/Modlog.php
r852 r1121 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1 *8 * Software Version: SMF 1.1.11 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 * Copyright 2006 by:Simple Machines LLC (http://www.simplemachines.org) *10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * 11 11 * 2001-2006 by: Lewis Media (http://www.lewismedia.com) * 12 12 * Support, News, Updates at: http://www.simplemachines.org * … … 93 93 } 94 94 95 // If we have no search, a broken search, or a new search - then create a new array. 95 // This array houses all the valid search types. 96 $searchTypes = array( 97 'action' => array('sql' => 'lm.action', 'label' => $txt['modlog_action']), 98 'member' => array('sql' => 'mem.realName', 'label' => $txt['modlog_member']), 99 'group' => array('sql' => 'mg.groupName', 'label' => $txt['modlog_position']), 100 'ip' => array('sql' => 'lm.ip', 'label' => $txt['modlog_ip']) 101 ); 102 96 103 if (!isset($search_params['string']) || (!empty($_REQUEST['search']) && $search_params['string'] != $_REQUEST['search'])) 97 { 98 // This array houses all the valid search types. 99 $searchTypes = array( 100 'action' => array('sql' => 'lm.action', 'label' => $txt['modlog_action']), 101 'member' => array('sql' => 'mem.realName', 'label' => $txt['modlog_member']), 102 'group' => array('sql' => 'mg.groupName', 'label' => $txt['modlog_position']), 103 'ip' => array('sql' => 'lm.ip', 'label' => $txt['modlog_ip']) 104 ); 105 106 $search_params = array( 107 'string' => empty($_REQUEST['search']) ? '' : $_REQUEST['search'], 108 'type' => isset($_REQUEST['search_type']) && isset($searchTypes[$_REQUEST['search_type']]) ? $_REQUEST['search_type'] : isset($searchTypes[$context['order']]) ? $context['order'] : 'member', 109 'type_sql' => isset($_REQUEST['search_type']) && isset($searchTypes[$_REQUEST['search_type']]) ? $searchTypes[$_REQUEST['search_type']]['sql'] : isset($searchTypes[$context['order']]) ? $context['columns'][$context['order']]['sql'] : 'mem.realName', 110 'type_label' => isset($_REQUEST['search_type']) && isset($searchTypes[$_REQUEST['search_type']]) ? $searchTypes[$_REQUEST['search_type']]['label'] : isset($searchTypes[$context['order']]) ? $context['columns'][$context['order']]['label'] : $txt['modlog_member'], 111 ); 112 } 104 $search_params_string = empty($_REQUEST['search']) ? '' : $_REQUEST['search']; 105 else 106 $search_params_string = $search_params['string']; 107 108 if (isset($_REQUEST['search_type']) || empty($search_params['type']) || !isset($searchTypes[$search_params['type']])) 109 $search_params_type = isset($_REQUEST['search_type']) && isset($searchTypes[$_REQUEST['search_type']]) ? $_REQUEST['search_type'] : (isset($searchTypes[$context['order']]) ? $context['order'] : 'member'); 110 else 111 $search_params_type = $search_params['type']; 112 113 $search_params_column = $searchTypes[$search_params_type]['sql']; 114 $search_params = array( 115 'string' => $search_params_string, 116 'type' => $search_params_type, 117 ); 113 118 114 119 // Setup the search context. … … 117 122 'string' => stripslashes($search_params['string']), 118 123 'type' => $search_params['type'], 119 'label' => $search _params['type_label']124 'label' => $searchTypes[$search_params_type]['label'], 120 125 ); 121 126 … … 168 173 LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = lm.ID_MEMBER) 169 174 LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP))" . (!empty($search_params['string']) ? " 170 WHERE INSTR($search_params [type_sql], '$search_params[string]')" : ''), __FILE__, __LINE__);175 WHERE INSTR($search_params_column, '$search_params[string]')" : ''), __FILE__, __LINE__); 171 176 list ($context['entry_count']) = mysql_fetch_row($result); 172 177 mysql_free_result($result); … … 184 189 LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = lm.ID_MEMBER) 185 190 LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP))" . (!empty($search_params['string']) ? " 186 WHERE INSTR($search_params [type_sql], '$search_params[string]')" : '') . "191 WHERE INSTR($search_params_column, '$search_params[string]')" : '') . " 187 192 ORDER BY $orderType" . (isset($_REQUEST['d']) ? '' : ' DESC') . " 188 193 LIMIT $context[start], $displaypage", __FILE__, __LINE__); -
trunk/smf/Sources/PackageGet.php
r1048 r1121 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1. 9*8 * Software Version: SMF 1.1.11 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * … … 140 140 { 141 141 $context['servers'][] = array( 142 'name' => $row['name'],143 'url' => $row['url'],142 'name' => htmlspecialchars($row['name']), 143 'url' => htmlspecialchars($row['url']), 144 144 'id' => $row['ID_SERVER'], 145 145 ); … … 689 689 global $db_prefix; 690 690 691 checkSession('get'); 692 691 693 db_query(" 692 694 DELETE FROM {$db_prefix}package_servers -
trunk/smf/Sources/Packages.php
r1048 r1121 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1.1 0*8 * Software Version: SMF 1.1.11 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * … … 732 732 if (!isset($_GET['package']) || $_GET['package'] == 'index.php' || $_GET['package'] == 'installed.list') 733 733 redirectexit('action=packages;sa=browse'); 734 $_GET['package'] = preg_replace('~[\.]+~', '.', strtr($_GET['package'], '/', '_'));734 $_GET['package'] = preg_replace('~[\.]+~', '.', strtr($_GET['package'], array('/' => '_', '\\' => '_'))); 735 735 736 736 // Can't delete what's not there. 737 if (file_exists($boarddir . '/Packages/' . $_GET['package']) )737 if (file_exists($boarddir . '/Packages/' . $_GET['package']) && (substr($_GET['package'], -4) == '.zip' || substr($_GET['package'], -4) == '.tgz' || substr($_GET['package'], -7) == '.tar.gz' || is_dir($boarddir . '/Packages/' . $_GET['package'])) && $_GET['package'] != 'backups' && substr($_GET['package'], 0, 1) != '.') 738 738 { 739 739 packageRequireFTP($scripturl . '?action=packages;sa=remove;package=' . $_GET['package'], array($boarddir . '/Packages/' . $_GET['package'])); … … 910 910 if (isset($_POST['submit'])) 911 911 { 912 checkSession('post'); 913 912 914 updateSettings(array( 913 915 'package_server' => $_POST['pack_server'], -
trunk/smf/Sources/Poll.php
r852 r1121 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1 *8 * Software Version: SMF 1.1.11 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 * Copyright 2006 by:Simple Machines LLC (http://www.simplemachines.org) *10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * 11 11 * 2001-2006 by: Lewis Media (http://www.lewismedia.com) * 12 12 * Support, News, Updates at: http://www.simplemachines.org * … … 116 116 elseif (!empty($row['changeVote'])) 117 117 { 118 checkSession('request'); 118 119 $pollOptions = array(); 119 120 … … 697 698 fatal_lang_error(1, false); 698 699 700 checkSession('get'); 701 699 702 // Check permissions. 700 703 if (!allowedTo('poll_remove_any')) -
trunk/smf/Sources/Post.php
r1048 r1121 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1.1 0*8 * Software Version: SMF 1.1.11 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * … … 106 106 // Posting an event? 107 107 $context['make_event'] = isset($_REQUEST['calendar']); 108 109 // Generate a visual verification code to make sure the user is no bot.110 $context['visual_verification'] = (empty($modSettings['disable_visual_verification']) || $modSettings['disable_visual_verification'] != 1) && ($user_info['is_guest'] && $modSettings['visual_verification_guest_post']);111 if ($context['visual_verification'])112 {113 loadLanguage('Login');114 115 $context['use_graphic_library'] = in_array('gd', get_loaded_extensions());116 $context['verificiation_image_href'] = $scripturl . '?action=verificationcode;rand=' . md5(rand());117 118 // Only generate a new code if one hasn't been set yet119 if (!isset($_SESSION['visual_verification_code']))120 {121 // Skip I, J, L, O and Q.122 $character_range = array_merge(range('A', 'H'), array('K', 'M', 'N', 'P'), range('R', 'Z'));123 124 // Generate a new code.125 $_SESSION['visual_verification_code'] = '';126 for ($i = 0; $i < 5; $i++)127 $_SESSION['visual_verification_code'] .= $character_range[array_rand($character_range)];128 }129 }130 131 108 132 109 // You must be posting to *some* board. … … 637 614 continue; 638 615 $context['current_attachments'][] = array( 639 'name' => $row['filename'],616 'name' => htmlspecialchars($row['filename']), 640 617 'id' => $row['ID_ATTACH'] 641 618 ); … … 729 706 if ($attachment['filesize'] >= 0 && !empty($modSettings['attachmentEnable'])) 730 707 $context['current_attachments'][] = array( 731 'name' => $attachment['filename'],708 'name' => htmlspecialchars($attachment['filename']), 732 709 'id' => $attachment['ID_ATTACH'] 733 710 ); … … 1415 1392 $_POST['email'] = addslashes($user_info['email']); 1416 1393 } 1417 1418 // Check whether the visual verification code was entered correctly.1419 if ((empty($modSettings['disable_visual_verification']) || $modSettings['disable_visual_verification'] != 1) && ($user_info['is_guest'] && $modSettings['visual_verification_guest_post']))1420 {1421 if ((empty($_REQUEST['visual_verification_code']) || strtoupper($_REQUEST['visual_verification_code']) !== $_SESSION['visual_verification_code']))1422 {1423 $_SESSION['visual_errors'] = isset($_SESSION['visual_errors']) ? $_SESSION['visual_errors'] + 1 : 1;1424 if ($_SESSION['visual_errors'] > 3 && isset($_SESSION['visual_verification_code']))1425 unset($_SESSION['visual_verification_code']);1426 1427 $post_errors[] = 'visual_verification_failed';1428 }1429 }1430 1431 1394 1432 1395 // Any mistakes? -
trunk/smf/Sources/Profile.php
r1048 r1121 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1.1 0*8 * Software Version: SMF 1.1.11 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * … … 562 562 if (strlen(trim($_POST['websiteUrl'])) > 0 && strpos($_POST['websiteUrl'], '://') === false) 563 563 $_POST['websiteUrl'] = 'http://' . $_POST['websiteUrl']; 564 if (strlen($_POST['websiteUrl']) < 8 )564 if (strlen($_POST['websiteUrl']) < 8 || (substr($_POST['websiteUrl'], 0, 7) !== 'http://' && substr($_POST['websiteUrl'], 0, 8) !== 'https://')) 565 565 $_POST['websiteUrl'] = ''; 566 566 } … … 2491 2491 { 2492 2492 $context['smiley_sets'][$i] = array( 2493 'id' => $set,2494 'name' => $set_names[$i],2493 'id' => htmlspecialchars($set), 2494 'name' => htmlspecialchars($set_names[$i]), 2495 2495 'selected' => $set == $context['member']['smiley_set']['id'] 2496 2496 ); 2497 2497 2498 2498 if ($context['smiley_sets'][$i]['selected']) 2499 $context['member']['smiley_set']['name'] = $set_names[$i];2499 $context['member']['smiley_set']['name'] = htmlspecialchars($set_names[$i]); 2500 2500 } 2501 2501 -
trunk/smf/Sources/Search.php
r1017 r1121 67 67 loadTemplate('Search'); 68 68 69 // Generate a visual verification code to make sure the user is no bot.70 $context['visual_verification'] = (empty($modSettings['disable_visual_verification']) || $modSettings['disable_visual_verification'] != 1) && ($user_info['is_guest'] && $modSettings['visual_verification_guest_search']);71 if ($context['visual_verification'])72 {73 loadLanguage('Login');74 75 $context['use_graphic_library'] = in_array('gd', get_loaded_extensions());76 $context['verificiation_image_href'] = $scripturl . '?action=verificationcode;rand=' . md5(rand());77 78 // Only generate a new code if one hasn't been set yet79 if (!isset($_SESSION['visual_verification_code']))80 {81 // Skip I, J, L, O and Q.82 $character_range = array_merge(range('A', 'H'), array('K', 'M', 'N', 'P'), range('R', 'Z'));83 84 // Generate a new code.85 $_SESSION['visual_verification_code'] = '';86 for ($i = 0; $i < 5; $i++)87 $_SESSION['visual_verification_code'] .= $character_range[array_rand($character_range)];88 }89 }90 91 92 69 // Check the user's permissions. 93 70 isAllowedTo('search_posts'); … … 293 270 isAllowedTo('search_posts'); 294 271 295 // Check whether the visual verification code was entered correctly.296 // We don't want to require it for extra pages though.297 if ((empty($modSettings['disable_visual_verification']) || $modSettings['disable_visual_verification'] != 1) && ($user_info['is_guest'] && $modSettings['visual_verification_guest_search']) && ($_REQUEST['start'] < 2))298 {299 if ((empty($_REQUEST['visual_verification_code']) || strtoupper($_REQUEST['visual_verification_code']) !== $_SESSION['visual_verification_code']))300 {301 $_SESSION['visual_errors'] = isset($_SESSION['visual_errors']) ? $_SESSION['visual_errors'] + 1 : 1;302 if ($_SESSION['visual_errors'] > 3 && isset($_SESSION['visual_verification_code']))303 unset($_SESSION['visual_verification_code']);304 305 fatal_lang_error('visual_verification_failed', false);306 }307 }308 309 310 272 require_once($sourcedir . '/Display.php'); 311 273 … … 370 332 371 333 // Maximum age of messages. Default to infinite (9999 days: param not set). 372 373 // Generate a visual verification code to make sure the user is no bot.374 // Used if the search form is shown on the page (for when there are no results)375 $context['visual_verification'] = (empty($modSettings['disable_visual_verification']) || $modSettings['disable_visual_verification'] != 1) && ($user_info['is_guest'] && $modSettings['visual_verification_guest_search']);376 if ($context['visual_verification'])377 {378 loadLanguage('Login');379 380 $context['use_graphic_library'] = in_array('gd', get_loaded_extensions());381 $context['verificiation_image_href'] = $scripturl . '?action=verificationcode;rand=' . md5(rand());382 383 // Only generate a new code if one hasn't been set yet384 if (!isset($_SESSION['visual_verification_code']))385 {386 // Skip I, J, L, O and Q.387 $character_range = array_merge(range('A', 'H'), array('K', 'M', 'N', 'P'), range('R', 'Z'));388 389 // Generate a new code.390 $_SESSION['visual_verification_code'] = '';391 for ($i = 0; $i < 5; $i++)392 $_SESSION['visual_verification_code'] .= $character_range[array_rand($character_range)];393 }394 }395 396 334 if (!empty($search_params['maxage']) || (!empty($_REQUEST['maxage']) && $_REQUEST['maxage'] != 9999)) 397 335 $search_params['maxage'] = !empty($search_params['maxage']) ? (int) $search_params['maxage'] : (int) $_REQUEST['maxage']; -
trunk/smf/Sources/SplitTopics.php
r1048 r1121 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1. 6*8 * Software Version: SMF 1.1.11 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 * Copyright 2006-200 7by: Simple Machines LLC (http://www.simplemachines.org) *10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * 11 11 * 2001-2006 by: Lewis Media (http://www.lewismedia.com) * 12 12 * Support, News, Updates at: http://www.simplemachines.org * … … 730 730 loadTemplate('SplitTopics'); 731 731 } 732 checkSession('request'); 732 733 733 734 // Handle URLs from MergeIndex. -
trunk/smf/Sources/Subs-Auth.php
r1048 r1121 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1.1 0*8 * Software Version: SMF 1.1.11 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * … … 278 278 // Only if it's not already in the $scripturl! 279 279 if (!isset($temp[$k])) 280 $context['get_data'] .= $k . '=' . $v. ';';280 $context['get_data'] .= urlencode($k) . '=' . urlencode($v) . ';'; 281 281 // If it changed, put it out there, but with an ampersand. 282 282 elseif ($temp[$k] != $_GET[$k]) 283 $context['get_data'] .= $k . '=' . $v. '&';283 $context['get_data'] .= urlencode($k) . '=' . urlencode($v) . '&'; 284 284 } 285 285 } … … 288 288 // Add up all the data from $_GET into get_data. 289 289 foreach ($_GET as $k => $v) 290 $context['get_data'] .= $k . '=' . $v. ';';290 $context['get_data'] .= urlencode($k) . '=' . urlencode($v) . ';'; 291 291 } 292 292 … … 326 326 if (!is_array($v)) 327 327 return ' 328 <input type="hidden" name="' . $k. '" value="' . strtr(stripslashes($v), array('"' => '"', '<' => '<', '>' => '>')) . '" />';328 <input type="hidden" name="' . htmlspecialchars($k) . '" value="' . strtr(stripslashes($v), array('"' => '"', '<' => '<', '>' => '>')) . '" />'; 329 329 else 330 330 { -
trunk/smf/Sources/Subs-Boards.php
r1017 r1121 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1. 5*8 * Software Version: SMF 1.1.11 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 * Copyright 2006 by:Simple Machines LLC (http://www.simplemachines.org) *10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * 11 11 * 2001-2006 by: Lewis Media (http://www.lewismedia.com) * 12 12 * Support, News, Updates at: http://www.simplemachines.org * … … 400 400 { 401 401 global $ID_MEMBER, $db_prefix, $sourcedir; 402 403 checkSession('request'); 402 404 403 405 $_REQUEST['c'] = (int) $_REQUEST['c']; -
trunk/smf/Sources/Subs-Graphics.php
r1048 r1121 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1. 9*8 * Software Version: SMF 1.1.11 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * … … 265 265 266 266 // Ask for more memory: we need it for this, and it'll only happen once! 267 @ini_set('memory_limit', ' 48M');267 @ini_set('memory_limit', '90M'); 268 268 269 269 $success = false; -
trunk/smf/Sources/Subs.php
r1048 r1121 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1. 9*8 * Software Version: SMF 1.1.11 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * … … 1235 1235 'type' => 'unparsed_content', 1236 1236 'content' => '<a href="$1" target="_blank">$1</a>', 1237 'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'), 1237 'validate' => create_function('&$tag, &$data, $disabled', ' 1238 $data = strtr($data, array(\'<br />\' => \'\')); 1239 if (strpos($data, \'ftp://\') !== 0 && strpos($data, \'ftps://\') !== 0) 1240 $data = \'ftp://\' . $data; 1241 '), 1238 1242 ), 1239 1243 array( … … 1242 1246 'before' => '<a href="$1" target="_blank">', 1243 1247 'after' => '</a>', 1248 'validate' => create_function('&$tag, &$data, $disabled', ' 1249 if (strpos($data, \'ftp://\') !== 0 && strpos($data, \'ftps://\') !== 0) 1250 $data = \'ftp://\' . $data; 1251 '), 1244 1252 'disallow_children' => array('email', 'ftp', 'url', 'iurl'), 1245 1253 'disabled_after' => ' ($1)', … … 1259 1267 'validate' => create_function('&$tag, &$data, $disabled', ' 1260 1268 if (isset($disabled[\'url\'])) 1261 $tag[\'content\'] = \'$1\';'), 1269 $tag[\'content\'] = \'$1\'; 1270 elseif (strpos($data[0], \'http://\') !== 0 && strpos($data[0], \'https://\') !== 0) 1271 $data[0] = \'http://\' . $data[0]; 1272 '), 1262 1273 'disabled_content' => '<a href="$1" target="_blank">$1</a>', 1263 1274 ), … … 1296 1307 ), 1297 1308 'content' => '<img src="$1" alt="{alt}"{width}{height} border="0" />', 1298 'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'), 1309 'validate' => create_function('&$tag, &$data, $disabled', ' 1310 $data = strtr($data, array(\'<br />\' => \'\')); 1311 if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0) 1312 $data = \'http://\' . $data; 1313 '), 1299 1314 'disabled_content' => '($1)', 1300 1315 ), … … 1303 1318 'type' => 'unparsed_content', 1304 1319 'content' => '<img src="$1" alt="" border="0" />', 1305 'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'), 1320 'validate' => create_function('&$tag, &$data, $disabled', ' 1321 $data = strtr($data, array(\'<br />\' => \'\')); 1322 if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0) 1323 $data = \'http://\' . $data; 1324 '), 1306 1325 'disabled_content' => '($1)', 1307 1326 ), … … 1315 1334 'type' => 'unparsed_content', 1316 1335 'content' => '<a href="$1">$1</a>', 1317 'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'), 1336 'validate' => create_function('&$tag, &$data, $disabled', ' 1337 $data = strtr($data, array(\'<br />\' => \'\')); 1338 if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0) 1339 $data = \'http://\' . $data; 1340 '), 1318 1341 ), 1319 1342 array( … … 1324 1347 'validate' => create_function('&$tag, &$data, $disabled', ' 1325 1348 if (substr($data, 0, 1) == \'#\') 1326 $data = \'#post_\' . substr($data, 1);'), 1349 $data = \'#post_\' . substr($data, 1); 1350 elseif (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0) 1351 $data = \'http://\' . $data; 1352 '), 1327 1353 'disallow_children' => array('email', 'ftp', 'url', 'iurl'), 1328 1354 'disabled_after' => ' ($1)', … … 1577 1603 'type' => 'unparsed_content', 1578 1604 'content' => '<a href="$1" target="_blank">$1</a>', 1579 'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'), 1605 'validate' => create_function('&$tag, &$data, $disabled', ' 1606 $data = strtr($data, array(\'<br />\' => \'\')); 1607 if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0) 1608 $data = \'http://\' . $data; 1609 '), 1580 1610 ), 1581 1611 array( … … 1584 1614 'before' => '<a href="$1" target="_blank">', 1585 1615 'after' => '</a>', 1616 'validate' => create_function('&$tag, &$data, $disabled', ' 1617 if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0) 1618 $data = \'http://\' . $data; 1619 '), 1586 1620 'disallow_children' => array('email', 'ftp', 'url', 'iurl'), 1587 1621 'disabled_after' => ' ($1)', … … 1719 1753 if (!empty($modSettings['enablePostHTML']) && strpos($data, '<') !== false) 1720 1754 { 1721 $data = preg_replace('~<a\s+href=( ?:")?((?:http://|ftp://|https://|ftps://|mailto:).+?)(?:")?>~i', '[url=$1]', $data);1755 $data = preg_replace('~<a\s+href=((?:")?)((?:https?://|ftps?://|mailto:)\S+?)\\1>~i', '[url=$2]', $data); 1722 1756 $data = preg_replace('~</a>~i', '[/url]', $data); 1723 1757 … … 1739 1773 1740 1774 // Do <img ... /> - with security... action= -> action-. 1741 preg_match_all('~<img\s+src=( ?:")?((?:http://|ftp://|https://|ftps://).+?)(?:")?(?:\s+alt=(?:")?(.*?)(?:")?)?(?:\s?/)?>~i', $data, $matches, PREG_PATTERN_ORDER);1775 preg_match_all('~<img\s+src=((?:")?)((?:https?://|ftps?://)\S+?)\\1(?:\s+alt=(".*?"|\S*?))?(?:\s?/)?>~i', $data, $matches, PREG_PATTERN_ORDER); 1742 1776 if (!empty($matches[0])) 1743 1777 { 1744 1778 $replaces = array(); 1745 foreach ($matches[ 1] as $match => $imgtag)1779 foreach ($matches[2] as $match => $imgtag) 1746 1780 { 1747 // No alt? 1748 if (!isset($matches[2][$match])) 1749 $matches[2][$match] = ''; 1781 $alt = empty($matches[3][$match]) ? '' : ' alt=' . preg_replace('~^"|"$~', '', $matches[3][$match]); 1750 1782 1751 1783 // Remove action= from the URL - no funny business, now. … … 1771 1803 1772 1804 // Set the new image tag. 1773 $replaces[$matches[0][$match]] = ' <img src="' . $imgtag . '" width="' . $width . '" height="' . $height . '" alt="' . $matches[2][$match] . '" border="0" />';1805 $replaces[$matches[0][$match]] = '[img width=' . $width . ' height=' . $height . $alt . ']' . $imgtag . '[/img]'; 1774 1806 } 1775 1807 else 1776 $replaces[$matches[0][$match]] = ' <img src="' . $imgtag . '" alt="' . $matches[2][$match] . '" border="0" />';1808 $replaces[$matches[0][$match]] = '[img' . $alt . ']' . $imgtag . '[/img]'; 1777 1809 } 1778 1810 … … 1806 1838 // Switch out quotes really quick because they can cause problems. 1807 1839 $data = strtr($data, array(''' => '\'', ' ' => $context['utf8'] ? "\xC2\xA0" : "\xA0", '"' => '>">', '"' => '<"<', '<' => '<lt<')); 1808 $data = preg_replace(array('~(?<=[\s>\.(;\'"]|^)((?:http|https|ftp|ftps)://[\w\-_%@:|]+(?:\.[\w\-_%]+)*(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#+:\'\\\\]*|[\(\{][\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i', '~(?<=[\s>(\'<]|^)(www(?:\.[\w\-_]+)+(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#+:\'\\\\]*|[\(\{][\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i'), array('[url]$1[/url]', '[url=http://$1]$1[/url]'), $data); 1840 1841 // Only do this if the preg survives. 1842 if (is_string($result = preg_replace(array( 1843 '~(?<=[\s>\.(;\'"]|^)((?:http|https|ftp|ftps)://[\w\-_%@:|]+(?:\.[\w\-_%]+)*(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i', 1844 '~(?<=[\s>(\'<]|^)(www(?:\.[\w\-_]+)+(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i' 1845 ), array( 1846 '[url]$1[/url]', 1847 '[url=http://$1]$1[/url]' 1848 ), $data))) 1849 $data = $result; 1850 1809 1851 $data = strtr($data, array('\'' => ''', $context['utf8'] ? "\xC2\xA0" : "\xA0" => ' ', '>">' => '"', '<"<' => '"', '<lt<' => '<')); 1810 1852 } … … 2437 2479 $smileyfromcache[] = '/(?<=[>:\?\.\s' . $non_breaking_space . '[\]()*\\\;]|^)(' . preg_quote($smileysfrom[$i], '/') . '|' . preg_quote(htmlspecialchars($smileysfrom[$i], ENT_QUOTES), '/') . ')(?=[^[:alpha:]0-9]|$)/' . ($context['utf8'] ? 'u' : ''); 2438 2480 // Escape a bunch of smiley-related characters in the description so it doesn't get a double dose :P. 2439 $smileytocache[] = '<img src="' . $modSettings['smileys_url'] . '/' . $user_info['smiley_set'] . '/' . $smileysto[$i]. '" alt="' . strtr(htmlspecialchars($smileysdescs[$i]), array(':' => ':', '(' => '(', ')' => ')', '$' => '$', '[' => '[')) . '" border="0" />';2481 $smileytocache[] = '<img src="' . htmlspecialchars($modSettings['smileys_url'] . '/' . $user_info['smiley_set'] . '/' . $smileysto[$i]) . '" alt="' . strtr(htmlspecialchars($smileysdescs[$i]), array(':' => ':', '(' => '(', ')' => ')', '$' => '$', '[' => '[')) . '" border="0" />'; 2440 2482 } 2441 2483 } -
trunk/smf/Sources/Themes.php
r1048 r1121 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1. 7*8 * Software Version: SMF 1.1.11 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 * Copyright 2006-200 7by: Simple Machines LLC (http://www.simplemachines.org) *10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * 11 11 * 2001-2006 by: Lewis Media (http://www.lewismedia.com) * 12 12 * Support, News, Updates at: http://www.simplemachines.org * … … 678 678 ); 679 679 foreach ($sets as $i => $set) 680 $context['smiley_sets'][$set] = $set_names[$i];680 $context['smiley_sets'][$set] = htmlspecialchars($set_names[$i]); 681 681 682 682 $old_id = $settings['theme_id']; -
trunk/smf/Themes/default/Admin.template.php
r1017 r1121 891 891 <td valign="top"> 892 892 <input type="checkbox" name="enableSpellChecking" id="enableSpellChecking_check"', empty($modSettings['enableSpellChecking']) ? '' : ' checked="checked"', ' class="check" /> 893 </td>894 895 </tr><tr class="windowbg2">896 <th width="50%" align="right">897 <label for="visual_verification_guest_post_check">', $txt['visual_verification_guest_post'], '</label>:898 </th>899 <td valign="top">900 <input type="checkbox" name="visual_verification_guest_post" id="visual_verification_guest_post_check"', empty($modSettings['visual_verification_guest_post']) ? '' : ' checked="checked"', ' class="check" />901 893 </td> 902 894 </tr><tr class="windowbg2"> -
trunk/smf/Themes/default/ManageSearch.template.php
r1017 r1121 29 29 <th width="50%" align="right"><label for="simpleSearch_check">', $txt['simpleSearch'], '</label> (<a href="', $scripturl, '?action=helpadmin;help=simpleSearch" onclick="return reqWin(this.href);">?</a>):</th> 30 30 <td><input type="checkbox" name="simpleSearch" id="simpleSearch_check"', empty($modSettings['simpleSearch']) ? '' : ' checked="checked"', ' class="check" /></td> 31 </tr><tr class="windowbg2">32 33 <th align="right"><label for="visual_verification_guest_search_check">', $txt['visual_verification_guest_search'], ':</label></th>34 <td><input type="checkbox" name="visual_verification_guest_search" id="visual_verification_guest_search_check"', empty($modSettings['visual_verification_guest_search']) ? '' : ' checked="checked"', ' class="check" /></td>35 31 </tr><tr class="windowbg2"> 36 32 <th align="right"><label for="search_results_per_page_input">', $txt['search_results_per_page'], ':</label></th> -
trunk/smf/Themes/default/Packages.template.php
r1048 r1121 1 1 <?php 2 // Version: 1.1. 8; Packages2 // Version: 1.1.11; Packages 3 3 4 4 function template_main() … … 711 711 </td> 712 712 <td> 713 <a href="' . $scripturl . '?action=packageget;sa=remove;server=' . $server['id'] . ' ">[ ' . $txt['smf138'] . ' ]</a>713 <a href="' . $scripturl . '?action=packageget;sa=remove;server=' . $server['id'] . ';sesc=', $context['session_id'], '">[ ' . $txt['smf138'] . ' ]</a> 714 714 </td> 715 715 </tr>'; -
trunk/smf/Themes/default/Post.template.php
r1017 r1121 519 519 </td> 520 520 </tr>'; 521 522 if ($context['visual_verification'])523 {524 echo '525 <tr align="right" valign="top">526 <td style="font-weight: bold;', isset($context['post_error']['visual_verification_failed']) ? 'color: red;' : '', '">527 528 <script language="JavaScript" type="text/javascript"><!-- // -->529 function refreshImages()530 {531 // Make sure we are using a new rand code.532 var new_url = new String("', $context['verificiation_image_href'], '");533 new_url = new_url.substr(0, new_url.indexOf("rand=") + 5);534 535 // Quick and dirty way of converting decimal to hex536 var hexstr = "0123456789abcdef";537 for(var i=0; i < 32; i++)538 new_url = new_url + hexstr.substr(Math.floor(Math.random() * 16), 1);';539 540 if ($context['use_graphic_library'])541 echo '542 document.getElementById("verificiation_image").src = new_url;';543 else544 echo '545 document.getElementById("verificiation_image_1").src = new_url + ";letter=1";546 document.getElementById("verificiation_image_2").src = new_url + ";letter=2";547 document.getElementById("verificiation_image_3").src = new_url + ";letter=3";548 document.getElementById("verificiation_image_4").src = new_url + ";letter=4";549 document.getElementById("verificiation_image_5").src = new_url + ";letter=5";';550 echo '551 }552 // ]]></script>553 554 ', $txt['visual_verification_label'], ':555 <div class="smalltext">', $txt['visual_verification_description'], '</div>556 </td>557 <td align="left" valign="top">';558 if ($context['use_graphic_library'])559 echo '560 <img src="', $context['verificiation_image_href'], '" alt="', $txt['visual_verification_description'], '" id="verificiation_image" /><br />';561 else562 echo '563 <img src="', $context['verificiation_image_href'], ';letter=1" alt="', $txt['visual_verification_description'], '" id="verificiation_image_1" />564 <img src="', $context['verificiation_image_href'], ';letter=2" alt="', $txt['visual_verification_description'], '" id="verificiation_image_2" />565 <img src="', $context['verificiation_image_href'], ';letter=3" alt="', $txt['visual_verification_description'], '" id="verificiation_image_3" />566 <img src="', $context['verificiation_image_href'], ';letter=4" alt="', $txt['visual_verification_description'], '" id="verificiation_image_4" />567 <img src="', $context['verificiation_image_href'], ';letter=5" alt="', $txt['visual_verification_description'], '" id="verificiation_image_5" />';568 echo '569 <input type="text" name="visual_verification_code" size="30" tabindex="', $context['tabindex']++, '" />570 <div class="smalltext">571 <a href="', $context['verificiation_image_href'], ';sound" onclick="return reqWin(this.href, 400, 120);">', $txt['visual_verification_sound'], '</a> | <a href="', $scripturl, '" onclick="refreshImages(); return false;">', $txt['visual_verification_request_new'], '</a>572 </div>573 </td>574 </tr>';575 }576 577 521 578 522 // If the admin has enabled the hiding of the additional options - show a link and image for it. -
trunk/smf/Themes/default/Search.template.php
r1017 r1121 55 55 <td class="windowbg">'; 56 56 57 if ($context['visual_verification'])58 {59 echo '60 <script language="JavaScript" type="text/javascript"><!-- // -->61 function refreshImages()62 {63 // Make sure we are using a new rand code.64 var new_url = new String("', $context['verificiation_image_href'], '");65 new_url = new_url.substr(0, new_url.indexOf("rand=") + 5);66 67 // Quick and dirty way of converting decimal to hex68 var hexstr = "0123456789abcdef";69 for(var i=0; i < 32; i++)70 new_url = new_url + hexstr.substr(Math.floor(Math.random() * 16), 1);';71 72 if ($context['use_graphic_library'])73 echo '74 document.getElementById("verificiation_image").src = new_url;';75 else76 echo '77 document.getElementById("verificiation_image_1").src = new_url + ";letter=1";78 document.getElementById("verificiation_image_2").src = new_url + ";letter=2";79 document.getElementById("verificiation_image_3").src = new_url + ";letter=3";80 document.getElementById("verificiation_image_4").src = new_url + ";letter=4";81 document.getElementById("verificiation_image_5").src = new_url + ";letter=5";';82 echo '83 }84 // ]]></script>';85 }86 87 88 57 if ($context['simple_search']) 89 58 { … … 100 69 <td></td> 101 70 </tr>'; 102 103 if ($context['visual_verification'])104 {105 echo '106 <tr>107 <td>108 <div style="font-weight: bold;">109 ', $txt['visual_verification_label'], ':110 <div class="smalltext">', $txt['visual_verification_description'], '</div>111 </div>112 <div>';113 if ($context['use_graphic_library'])114 echo '115 <img src="', $context['verificiation_image_href'], '" alt="', $txt['visual_verification_description'], '" id="verificiation_image" /><br />';116 else117 echo '118 <img src="', $context['verificiation_image_href'], ';letter=1" alt="', $txt['visual_verification_description'], '" id="verificiation_image_1" />119 <img src="', $context['verificiation_image_href'], ';letter=2" alt="', $txt['visual_verification_description'], '" id="verificiation_image_2" />120 <img src="', $context['verificiation_image_href'], ';letter=3" alt="', $txt['visual_verification_description'], '" id="verificiation_image_3" />121 <img src="', $context['verificiation_image_href'], ';letter=4" alt="', $txt['visual_verification_description'], '" id="verificiation_image_4" />122 <img src="', $context['verificiation_image_href'], ';letter=5" alt="', $txt['visual_verification_description'], '" id="verificiation_image_5" />';123 echo '124 <input type="text" name="visual_verification_code" size="30" tabindex="', $context['tabindex']++, '" />125 <div class="smalltext">126 <a href="', $context['verificiation_image_href'], ';sound" onclick="return reqWin(this.href, 400, 120);">', $txt['visual_verification_sound'], '</a> | <a href="', $scripturl, '" onclick="refreshImages(); return false;">', $txt['visual_verification_request_new'], '</a>127 </div>128 </div>129 </td>130 </tr>';131 }132 133 134 71 echo ' 135 72 </table><br /><br /> … … 220 157 <td></td> 221 158 </tr> 222 ';223 224 if ($context['visual_verification'])225 {226 echo '227 <tr>228 <td style="padding-top: 2ex;">229 <div style="font-weight: bold;">230 ', $txt['visual_verification_label'], ':231 <div class="smalltext">', $txt['visual_verification_description'], '</div>232 </div>233 <div>';234 if ($context['use_graphic_library'])235 echo '236 <img src="', $context['verificiation_image_href'], '" alt="', $txt['visual_verification_description'], '" id="verificiation_image" /><br />';237 else238 echo '239 <img src="', $context['verificiation_image_href'], ';letter=1" alt="', $txt['visual_verification_description'], '" id="verificiation_image_1" />240 <img src="', $context['verificiation_image_href'], ';letter=2" alt="', $txt['visual_verification_description'], '" id="verificiation_image_2" />241 <img src="', $context['verificiation_image_href'], ';letter=3" alt="', $txt['visual_verification_description'], '" id="verificiation_image_3" />242 <img src="', $context['verificiation_image_href'], ';letter=4" alt="', $txt['visual_verification_description'], '" id="verificiation_image_4" />243 <img src="', $context['verificiation_image_href'], ';letter=5" alt="', $txt['visual_verification_description'], '" id="verificiation_image_5" />';244 echo '245 <input type="text" name="visual_verification_code" size="30" tabindex="', $context['tabindex']++, '" />246 <div class="smalltext">247 <a href="', $context['verificiation_image_href'], ';sound" onclick="return reqWin(this.href, 400, 120);">', $txt['visual_verification_sound'], '</a> | <a href="', $scripturl, '" onclick="refreshImages(); return false;">', $txt['visual_verification_request_new'], '</a>248 </div>249 </div>250 </td>251 </tr>';252 }253 254 echo '255 256 159 </table><br />'; 257 160 … … 318 221 if (isset($context['did_you_mean']) || empty($context['topics'])) 319 222 { 320 321 if ($context['visual_verification'])322 {323 echo '324 <script language="JavaScript" type="text/javascript"><!-- // -->325 function refreshImages()326 {327 // Make sure we are using a new rand code.328 var new_url = new String("', $context['verificiation_image_href'], '");329 new_url = new_url.substr(0, new_url.indexOf("rand=") + 5);330 331 // Quick and dirty way of converting decimal to hex332 var hexstr = "0123456789abcdef";333 for(var i=0; i < 32; i++)334 new_url = new_url + hexstr.substr(Math.floor(Math.random() * 16), 1);';335 336 if ($context['use_graphic_library'])337 echo '338 document.getElementById("verificiation_image").src = new_url;';339 else340 echo '341 document.getElementById("verificiation_image_1").src = new_url + ";letter=1";342 document.getElementById("verificiation_image_2").src = new_url + ";letter=2";343 document.getElementById("verificiation_image_3").src = new_url + ";letter=3";344 document.getElementById("verificiation_image_4").src = new_url + ";letter=4";345 document.getElementById("verificiation_image_5").src = new_url + ";letter=5";';346 echo '347 }348 // ]]></script>';349 }350 223 echo ' 351 224 <div class="tborder"> … … 367 240 <input type="text" name="search"', !empty($context['search_params']['search']) ? ' value="' . $context['search_params']['search'] . '"' : '', ' size="40" /> 368 241 <input type="submit" name="submit" value="', $txt['search_adjust_submit'], '" /> 369 370 ';371 372 if ($context['visual_verification'])373 {374 echo '<br /><br />375 <b>', $txt['visual_verification_label'], ':</b><br />376 <div class="smalltext">', $txt['visual_verification_description'], '</div>';377 378 if ($context['use_graphic_library'])379 echo '380 <img src="', $context['verificiation_image_href'], '" alt="', $txt['visual_verification_description'], '" id="verificiation_image" /><br />';381 else382 echo '383 <img src="', $context['verificiation_image_href'], ';letter=1" alt="', $txt['visual_verification_description'], '" id="verificiation_image_1" />384 <img src="', $context['verificiation_image_href'], ';letter=2" alt="', $txt['visual_verification_description'], '" id="verificiation_image_2" />385 <img src="', $context['verificiation_image_href'], ';letter=3" alt="', $txt['visual_verification_description'], '" id="verificiation_image_3" />386 <img src="', $context['verificiation_image_href'], ';letter=4" alt="', $txt['visual_verification_description'], '" id="verificiation_image_4" />387 <img src="', $context['verificiation_image_href'], ';letter=5" alt="', $txt['visual_verification_description'], '" id="verificiation_image_5" />';388 echo '389 <input type="text" name="visual_verification_code" size="30" tabindex="', $context['tabindex']++, '" />390 <div class="smalltext">391 <a href="', $context['verificiation_image_href'], ';sound" onclick="return reqWin(this.href, 400, 120);">', $txt['visual_verification_sound'], '</a> | <a href="', $scripturl, '" onclick="refreshImages(); return false;">', $txt['visual_verification_request_new'], '</a>392 </div><br />';393 }394 395 echo '396 242 397 243 <input type="hidden" name="searchtype" value="', !empty($context['search_params']['searchtype']) ? $context['search_params']['searchtype'] : 0, '" /> -
trunk/smf/Themes/default/SplitTopics.template.php
r852 r1121 1 1 <?php 2 // Version: 1.1 ; SplitTopics2 // Version: 1.1.11; SplitTopics 3 3 4 4 function template_ask() … … 399 399 <input type="submit" value="' . $txt['smf252'] . '" /> 400 400 <input type="hidden" name="sa" value="execute" /> 401 <input type="hidden" name="sc" value="', $context['session_id'], '" /> 401 402 </td> 402 403 </tr> -
trunk/smf/Themes/default/index.template.php
r1017 r1121 129 129 $options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']); 130 130 } 131 132 echo '<script type="text/javascript" src="http://summify.com/client/v1/249f00c6/client.js"></script>'; 131 133 132 134 // Output any remaining HTML headers. (from mods, maybe?) -
trunk/smf/index.php
r1048 r1121 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1.1 0*8 * Software Version: SMF 1.1.11 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * … … 35 35 */ 36 36 37 $forum_version = 'SMF 1.1.1 0';37 $forum_version = 'SMF 1.1.11'; 38 38 39 39 // Get everything started up... -
trunk/www/views/header.php
r1119 r1121 69 69 <script type="text/javascript" src="<?= html_escape(url_static('js/tags.js')) ?>"></script> 70 70 <script type="text/javascript" src="<?= html_escape(url_static('js/roundtimer.js')) ?>"></script> 71 72 <script type="text/javascript" src="http://summify.com/client/v1/249f00c6/client.js"></script> 71 73 72 74 <script type="text/javascript">Sh_Init("<?= html_escape(url_static('swf/clipboard.swf')) ?>")</script> -
trunk/www/views/job_detail.php
r997 r1121 88 88 } 89 89 echo '<td class="number">'.$test['test_number'].'</td>'; 90 echo '<td class="number">'.$test['exec_time'].'ms</td>'; 91 echo '<td class="number">'.$test['mem_used'].'kb</td>'; 90 if ($test["grader_message"] == "Time limit exceeded.") { 91 echo '<td class="number">Depăşit</td>'; 92 } else { 93 echo '<td class="number">'.$test['exec_time'].'ms</td>'; 94 } 95 if ($test["grader_message"] == "Memory limit exceeded.") { 96 echo '<td class="number">Depăşit</td>'; 97 } else { 98 echo '<td class="number">'.$test['mem_used'].'kb</td>'; 99 } 92 100 echo '<td>'.html_escape($test['grader_message']).'</td>'; 93 101 echo '<td class="number">'.$test['points'].'</td>';
Note: See TracChangeset
for help on using the changeset viewer.
![[infoarena] development](/chrome/site/logo.png)