News:

Please note these forums are mostly a testing ground for my SMF work and I don't really use them otherwise.

Main Menu

Recent posts

#41
PasteBin / Paste-1313030839:v:use_geshi-1...
Last post by Guest - Aug 11, 2011, 02:47 AM
jeremy@Zeus:~$traceroute hogville.net
traceroute to hogville.net (66.219.27.66), 64 hops max, 52 byte packets
 1  10.0.0.1 (10.0.0.1)  1.334 ms  1.316 ms  0.759 ms
 2  50.35.192.1 (50.35.192.1)  34.587 ms  35.193 ms  33.256 ms
 3  50.34.0.29 (50.34.0.29)  33.403 ms  33.678 ms  34.426 ms
 4  ae0---0.car01.sttl.wa.frontiernet.net (74.42.149.105)  39.741 ms  40.832 ms  38.528 ms
 5  xe-0-2-0--0.cor02.sttl.wa.frontiernet.net (74.40.3.193)  39.813 ms  41.457 ms  40.266 ms
 6  ae1---0.cbr01.sttl.wa.frontiernet.net (74.40.5.126)  103.843 ms  40.095 ms  39.031 ms
 7  10gigabitethernet1-3.core1.sea1.he.net (206.81.80.40)  39.546 ms  38.576 ms  40.509 ms
 8  10gigabitethernet3-1.core1.den1.he.net (184.105.213.42)  71.499 ms  70.619 ms  71.472 ms
 9  10gigabitethernet1-1.core1.chi1.he.net (184.105.213.85)  99.230 ms  95.780 ms  92.856 ms
10  10gigabitethernet7-2.core1.nyc4.he.net (72.52.92.177)  113.195 ms  119.838 ms  111.595 ms
11  10gigabitethernet2-3.core1.ash1.he.net (72.52.92.86)  111.524 ms  113.699 ms  111.531 ms
12  netriplex-llc.gigabitethernet2-13.core1.atl1.he.net (209.51.164.10)  116.931 ms  112.177 ms  113.789 ms
13  te-1-5.rtr1.avl1.netriplex.com (67.23.161.153)  123.930 ms  121.854 ms  123.689 ms
14  te-5-5.rtr2.avl1.netriplex.com (67.23.161.254)  122.670 ms  128.128 ms  122.231 ms
15  * * *
16  * * *
17  * * *
18  * * *
#42
PasteBin / Paste-1312945493:v:use_geshi-0...
Last post by Guest - Aug 10, 2011, 03:04 AM
SQL looping query goes here.

// Let's make sure that the Game ID hasn't already been used:
if(!in_array($gameid, array($gameids))){
    show results here
}

// Push the $gameid into an array
$gameids[]=array($gameid);}

SQL loop ends here.
#43
PasteBin / Paste-1312115876:v:use_geshi-1...
Last post by Guest - Jul 31, 2011, 12:37 PM
#44
PasteBin / Paste-1312115770:v:use_geshi-1...
Last post by Guest - Jul 31, 2011, 12:36 PM
#45
PasteBin / Paste-1312115759:v:use_geshi-1...
Last post by Guest - Jul 31, 2011, 12:35 PM
#46
PasteBin / Paste-1310096064:v:use_geshi-1...
Last post by SleePy - Jul 08, 2011, 03:34 AM
dragonfly9_to_smf.sql:723:    if (substr($oldAttachmentDir, 0, 2) == '..')
eblah_to_smf.php:70:          if (empty($line) || substr($line, 0, 1) == '#')
eblah_to_smf.php:823:                elseif (substr(trim($parts[0]), 0, 8) == 'AllRead_' && isset($boards[substr(trim($parts[0]), 8)]))
phpnuke_to_smf.sql:902:    if (substr($oldAttachmentDir, 0, 2) == '..')
vbulletin35_to_smf.sql:309:       if (substr($row2['value'], 0, 2) == './')
vbulletin35_to_smf.sql:405:       if (substr($row2['value'], 0, 2) == './')
vbulletin36_to_smf.sql:449:       if (substr($row2['value'], 0, 2) == './')
vbulletin36_to_smf.sql:538:       if (substr($row2['value'], 0, 2) == './')
vbulletin37_to_smf.sql:459:       if (substr($row2['value'], 0, 2) == './')
vbulletin37_to_smf.sql:548:       if (substr($row2['value'], 0, 2) == './')
vbulletin3_to_smf.sql:308:       if (substr($row2['value'], 0, 2) == './')
vbulletin3_to_smf.sql:375:       if (substr($row2['value'], 0, 2) == './')
vbulletin40_to_smf.sql:461:       if (substr($row2['value'], 0, 2) == './')
vbulletin40_to_smf.sql:551:       if (substr($row2['value'], 0, 2) == './')
vbulletin41_to_smf.sql:463:       if (substr($row2['value'], 0, 2) == './')
vbulletin41_to_smf.sql:553:       if (substr($row2['value'], 0, 2) == './')
yabb21_to_smf.php:71:          if (empty($line) || substr($line, 0, 1) == '#')
yabb21_to_smf.php:84:          if (substr($yabb[$path], 0, 9) == '$boarddir')
yabb21_to_smf.php:91:          if (empty($line) || substr($line, 0, 1) == '#')
yabb22_to_smf.php:71:          if (empty($line) || substr($line, 0, 1) == '#')
yabb22_to_smf.php:84:          if (substr($yabb[$path], 0, 9) == '$boarddir')
yabb22_to_smf.php:91:          if (empty($line) || substr($line, 0, 1) == '#')
yabb2_to_smf.php:73:          if (empty($line) || substr($line, 0, 1) == '#')
yabb2_to_smf.php:88:          if (empty($line) || substr($line, 0, 1) == '#')
yabb_to_smf.php:68:          if (empty($line) || substr($line, 0, 1) == '#')
install.php:280:          if (substr($entry, 0, 8) == 'Install.' && substr($entry, -4) == '.php')
install.php:464:    elseif (@ini_get('session.save_path') == '/tmp' && substr(__FILE__, 1, 2) == ':\\')
install.php:562:    if ($failure && substr(__FILE__, 1, 2) == ':\\')
install.php:776:       if (!updateSettingsFile($vars) && substr(__FILE__, 1, 2) == ':\\')
install.php:936:       if (!updateSettingsFile($vars) && substr(__FILE__, 1, 2) == ':\\')
install.php:1028:       if (substr($key, 0, 8) == 'default_')
install.php:1135:       $localCookies = isset($matches[3]) && strlen($matches[3]) > 3 && (substr($matches[3], 0, 2) == '/~' || strpos(substr($matches[3], 1), '/') !== false);
install.php:1563:       if (substr($ftp_server, 0, 6) == 'ftp://')
install.php:1565:       elseif (substr($ftp_server, 0, 7) == 'ftps://')
install.php:1567:       if (substr($ftp_server, 0, 7) == 'http://')
install.php:1806:          if (substr($file, 0, 1) == '*' && substr($listing[$i], -(strlen($file) - 1)) == substr($file, 1))
install.php:1852:          elseif (substr($filesystem_path, 0, 9) == '/var/www/')
updateDatabase.php:100:    if (substr($old_version, 0, 3) == '1.0')
updateDatabase.php:102:    elseif (substr($old_version, 0, 3) == '1.1')
updateDatabase.php:104:    elseif (substr($old_version, 0, 3) == '2.0')
create_backup.php:811:       if (substr($ftp_server, 0, 6) == 'ftp://')
create_backup.php:813:       elseif (substr($ftp_server, 0, 7) == 'ftps://')
create_backup.php:815:       if (substr($ftp_server, 0, 7) == 'http://')
create_backup.php:1054:          if (substr($file, 0, 1) == '*' && substr($listing[$i], -(strlen($file) - 1)) == substr($file, 1))
create_backup.php:1100:          elseif (substr($filesystem_path, 0, 9) == '/var/www/')
repair.php:49:    if (substr(trim($string), 0, 6) == 'SELECT')
repair_settings.php:295:       if (substr($settingsArray[$i], 0, 1) == '$')
repair_settings.php:616:       if (substr($settingsArray[$i], 0, 1) == '$' && preg_match('~^[$]([a-zA-Z_]+)\s*=\s*(["\'])?(.*?)(?:\\2)?;~', $settingsArray[$i], $match) == 1)
restore_backup.php:529:       if (substr($data, 0, 2) == 'PK')
restore_backup.php:717:       elseif (substr(trim($settingsArray[$i]), -16) == '/install.php\');' && substr(trim($settingsArray[$i]), 0, 26) == 'header(\'Location: http://\'')
smf_api.php:737:          $themeData[$row['id_member']][$row['variable']] = substr($row['variable'], 0, 5) == 'show_' ? $row['value'] == '1' : $row['value'];
smfinfo.php:1752:    if (substr($forum_version, 0, 2) == '1.')
webinstall.php:582:    if (substr(__FILE__, 1, 2) == ':\\')
webinstall.php:1525:       if (substr($ftp_server, 0, 6) == 'ftp://')
webinstall.php:1527:       elseif (substr($ftp_server, 0, 7) == 'ftps://')
webinstall.php:1529:       if (substr($ftp_server, 0, 7) == 'http://')
webinstall.php:1774:          if (substr($file, 0, 1) == '*' && substr($listing[$i], -(strlen($file) - 1)) == substr($file, 1))
webinstall.php:1813:          elseif (substr($filesystem_path, 0, 9) == '/var/www/')
upgrade.php:230:          if (substr($ftp_server, 0, 6) == 'ftp://')
upgrade.php:232:          elseif (substr($ftp_server, 0, 7) == 'ftps://')
upgrade.php:234:          if (substr($ftp_server, 0, 7) == 'http://')
upgrade.php:473:             if (substr($file, 0, 1) == '*' && substr($listing[$i], -(strlen($file) - 1)) == substr($file, 1))
upgrade.php:519:             elseif (substr($filesystem_path, 0, 9) == '/var/www/')
upgrade.php:1305:    if (substr($boarddir, 0, 1) == '.')
upgrade.php:1308:    if (substr($sourcedir, 0, 1) == '.')
upgrade.php:1311:    if (empty($cachedir) || substr($cachedir, 0, 1) == '.')
upgrade.php:2106:       if (substr($settingsArray[$i], 0, 1) == '$')
upgrade.php:2580:       elseif ($mysql_errno == 1050 && substr(trim($string), 0, 12) == 'RENAME TABLE')
upgrade.php:3164:    if ($failure && substr(__FILE__, 1, 2) == ':\\')
upgrade.php:3231:             if (substr($ftp_root, -1) == '/' && ($upcontext['chmod']['path'] == '' || substr($upcontext['chmod']['path'], 0, 1) == '/'))
upgrade_1-0.sql:607: if (empty($modSettings['smfVersion']) || (substr($modSettings['smfVersion'], 0, 9) == '1.0 Beta ' && $modSettings['smfVersion'][9] <= 5))
upgrade_1-0.sql:1343:       if (substr($row['setting'], 0, 5) == 'match')
Admin.php:831:                'url' => (substr($item[1], 0, 4) == 'area' ? $scripturl . '?action=admin;' . $item[1] : $item[1]) . ';' . $context['session_var'] . '=' . $context['session_id'] . ((substr($item[1], 0, 4) == 'area' && $section == 'settings' ? '#' . $item[0][0] : '')),
Admin.php:831:                'url' => (substr($item[1], 0, 4) == 'area' ? $scripturl . '?action=admin;' . $item[1] : $item[1]) . ';' . $context['session_var'] . '=' . $context['session_id'] . ((substr($item[1], 0, 4) == 'area' && $section == 'settings' ? '#' . $item[0][0] : '')),
Admin.php:1098:                if (substr($k, 0, 2) == 'on')
Class-Package.php:141:          elseif (substr($el, 0, 1) == '@')
Class-Package.php:208:          elseif (substr($el, 0, 1) == '@')
Class-Package.php:509:          if (substr($k, 0, 1) == '@')
Class-Package.php:719:       if (substr($ftp_server, 0, 6) == 'ftp://')
Class-Package.php:721:       elseif (substr($ftp_server, 0, 7) == 'ftps://')
Class-Package.php:723:       if (substr($ftp_server, 0, 7) == 'http://')
Class-Package.php:826:       while ((strlen($this->last_message) < 4 || substr($this->last_message, 0, 1) == ' ' || substr($this->last_message, 3, 1) != ' ') && time() - $time < 5);
Class-Package.php:1011:          elseif (substr($filesystem_path, 0, 9) == '/var/www/')
DbPackages-mysql.php:537:          'table_name' => substr($table_name, 0, 1) == '`' ? $table_name : '`' . $table_name . '`',
DbPackages-mysql.php:604:          'table_name' => substr($table_name, 0, 1) == '`' ? $table_name : '`' . $table_name . '`',
Display.php:196:       if (substr($_REQUEST['start'], 0, 4) == 'from')
Display.php:226:       elseif (substr($_REQUEST['start'], 0, 3) == 'msg')
Help.php:89:    if (isset($_GET['help']) && substr($_GET['help'], 0, 14) == 'permissionhelp')
Load.php:1306:             $themeData[$row['id_member']][$row['variable']] = substr($row['variable'], 0, 5) == 'show_' ? $row['value'] == '1' : $row['value'];
Load.php:1715:       if (substr($template_name, 0, 5) == 'index' && !function_exists('template_button_strip'))
Load.php:2202:                   echo substr($data2[$line], 0, 2) == '</' ? preg_replace('~^</[^>]+>~', '', $data2[$line]) : $last_line . $data2[$line];
Logging.php:312:          $is_select = substr(trim($qq['q']), 0, 6) == 'SELECT' || preg_match('~^INSERT(?: IGNORE)? INTO \w+(?:\s+\([^)]+\))?\s+SELECT .+$~s', trim($qq['q'])) != 0;
ManageErrors.php:128:             'html' => htmlspecialchars((substr($row['url'], 0, 1) == '?' ? $scripturl : '') . $row['url']),
ManageErrors.php:209:          $context['filter']['value']['html'] = '\'' . strtr(htmlspecialchars((substr($filter['value']['sql'], 0, 1) == '?' ? $scripturl : '') . $filter['value']['sql']), array('\_' => '_')) . '\'';
ManageLanguages.php:293:          if (substr($dirname, 0, 6) == 'Themes' && preg_match('~Themes[\\/]([^\\/]+)[\\/]~', $dirname, $match))
ManageNews.php:70:    if (substr($_REQUEST['sa'], 0, 7) == 'mailing')
ManageSettings.php:1662:             'regex' => substr($row['mask'], 0, 5) == 'regex' ? substr($row['mask'], 5) : '',
Memberlist.php:478:          if (substr($field, 0, 5) == 'cust_' && isset($context['custom_search_fields'][$curField]))
Modlog.php:146:          if (substr($key, 0, 10) == 'modlog_ac_' && strpos($text, $search_params['string']) !== false)
PersonalMessage.php:2359:          if (substr($action, 0, 4) == 'add_')
PersonalMessage.php:2364:          elseif (substr($action, 0, 4) == 'rem_')
Profile-Modify.php:1223:             elseif (substr($row['mask'], 0, 5) == 'regex' && preg_match(substr($row['mask'], 5), $value) === 0)
Register.php:421:             elseif (substr($row['mask'], 0, 5) == 'regex' && preg_match(substr($row['mask'], 5), $value) === 0)
Reports.php:882:          if (substr($key, 0, 5) == '#sep#')
Reports.php:894:          if (substr($key, 0, 5) == '#sep#')
Subs-Admin.php:289:       if (substr(trim($settingsArray[$i]), 0, 2) == '?' . '>')
Subs-Attachment.php:381:          $is_not = substr($real_type, 0, 4) == 'not_';
Subs-Editor.php:840:             elseif (substr($href, 0, 7) == 'mailto:')
Subs-Graphics.php:193:    if ($fp_destination && substr($source, 0, 7) == 'http://')
Subs-Mail.php:429:       if (!$socket && (substr($modSettings['smtp_host'], 0, 5) == 'smtp.' || substr($modSettings['smtp_host'], 0, 11) == 'ssl://smtp.'))
Subs-Mail.php:429:       if (!$socket && (substr($modSettings['smtp_host'], 0, 5) == 'smtp.' || substr($modSettings['smtp_host'], 0, 11) == 'ssl://smtp.'))
Subs-Mail.php:449:       if (substr($modSettings['smtp_host'], 0, 4) == 'ssl:' && (empty($modSettings['smtp_port']) || $modSettings['smtp_port'] == 25))
Subs-Membergroups.php:748:    if (substr($sort, 0, 1) == '1' || strpos($sort, ', 1') !== false)
Subs-Package.php:167:    if (substr($gzfilename, 0, 7) == 'http://')
Subs-Package.php:207:       if (substr($data, 0, 2) == 'PK')
Subs-Package.php:778:             if (substr($ftp_root, -1) == '/' && ($_POST['ftp_path'] == '' || substr($_POST['ftp_path'], 0, 1) == '/'))
Subs-Package.php:1036:          if (substr($ftp_root, -1) == '/' && ($_POST['ftp_path'] == '' || substr($_POST['ftp_path'], 0, 1) == '/'))
Subs-Package.php:1208:       if (substr($actionType, 0, 4) == 'move' || substr($actionType, 0, 7) == 'require')
Subs-Package.php:1208:       if (substr($actionType, 0, 4) == 'move' || substr($actionType, 0, 7) == 'require')
Subs-Post.php:48:    while (substr($message, 0, 8) == '[/quote]')
Subs-Post.php:467:          if (substr($replace, 0, 1) == '/')
Subs-Post.php:469:          elseif (substr($replace, 0, 1) == '?')
Subs-Post.php:471:          elseif (substr($replace, 0, 1) == '#' && $embeddedUrl)
Subscriptions-PayPal.php:226:       if (substr($_POST['txn_type'], 0, 14) == 'subscr_payment')
Themes.php:1777:          if (substr($_GET['directory'], 0, 1) == '.')
Themes.php:1814:       if (substr($_REQUEST['filename'], 0, 1) == '.')
Themes.php:1926:          if (isset($file_data[$i + 1]) && substr($file_data[$i + 1], 0, 9) == 'function ')
Themes.php:1975:       if (substr($entry, 0, 1) == '.' || $entry == 'CVS')
ViewQuery.php:98:       $is_select_query = substr(trim($query_data['q']), 0, 6) == 'SELECT';
SSI.php:58: if (substr($sourcedir, 0, 1) == '.' && substr($sourcedir, 1, 1) != '.')
Admin.template.php:1221:                            <option value="regex"', substr($context['field']['mask'], 0, 5) == 'regex' ? ' selected="selected"' : '', '>', $txt['custom_edit_mask_regex'], '</option>
#47
PasteBin / Paste-1309922369:v:use_geshi-1...
Last post by SleePy - Jul 06, 2011, 03:19 AM
index.php:51: if (@version_compare(PHP_VERSION, '5.1') == -1)
index.php:85:    if (@ini_get('zlib.output_compression') == '1' || @ini_get('output_handler') === 'ob_gzhandler' || @version_compare(PHP_VERSION, '4.2.0') == -1)
convert.php:334:    if (@version_compare(PHP_VERSION, '5') == -1)
install.php:358:       if (@version_compare(PHP_VERSION, '5') == -1)
install.php:803:       if (@version_compare(PHP_VERSION, '5') == -1)
install.php:1258:    if (!function_exists('sha1') || @version_compare(PHP_VERSION, '5') == -1)
install.php:1465:       if (@version_compare(PHP_VERSION, '4.2.0') == -1)
smf_api.php:789:    if (@version_compare(PHP_VERSION, '4.2.0') == -1)
upgrade.php:795:    if (@version_compare(PHP_VERSION, '5') == -1)
QueryString.php:72:    if ((strpos(@ini_get('arg_separator.input'), ';') === false || @version_compare(PHP_VERSION, '4.2.0') == -1) && !empty($_SERVER['QUERY_STRING']))
Session.php:88:    if (@version_compare(PHP_VERSION, '4.2.0') == -1)
Subs.php:2548:    if (@version_compare(PHP_VERSION, '4.2.0') == -1)
Subs.php:3107:    if (@version_compare(PHP_VERSION, '4.2.0') == -1)
Subs.php:3539:    if (@version_compare(PHP_VERSION, '4.2.0') == -1)
SSI.php:65: if (@version_compare(PHP_VERSION, '5.1') == -1)
#48
PasteBin / Paste-1309742735:v:use_geshi-1...
Last post by SleePy - Jul 04, 2011, 01:25 AM
<?php
$other_path = '/home/svn/sm-smf/trunk/other';
$settings_path = '/home/smf/svn_files';

$php_open = '<' . '?' . 'php';
$php_close = '?' . '>';
require_once(dirname(__FILE__) . '/Settings.php');


// Is it cached?
if (file_exists($settings_path . '/upgrade_emulate_cache') && !empty($_REQUEST['data']))
   $contents = file_get_contents($settings_path . '/upgrade_emulate_cache');
else
{
   // Get.
   $contents = file_get_contents($other_path . '/upgrade.php');

   // Edit.
   $contents = strtr($contents, array(
      'dirname(__FILE__)' => '\'' . $other_path . '\'',
      'require_once($upgrade_path . \'/Settings.php\');' => 'require_once(\'' . $settings_path . '/Settings.php\');',
      'require_once(dirname(__FILE__) . \'/upgrade_1-0.sql\');' => 'require_once(\'' . $other_path . '/upgrade_1-0.sql\');',
      'require_once(dirname(__FILE__) . \'/upgrade_1-1.sql\');' => 'require_once(\'' . $other_path . '/upgrade_1-1.sql\');',
      'require_once(dirname(__FILE__) . \'/upgrade_2-0_mysql.sql\');' => 'require_once(\'' . $other_path . '/upgrade_2-0_mysql.sql\');',
      'require_once(dirname(__FILE__) . \'/upgrade_2-0_postgresql.sql\');' => 'require_once(\'' . $other_path . '/upgrade_2-0_postgresql.sql\');',
      'require_once(dirname(__FILE__) . \'/upgrade_2-0_sqlite.sql\');' => 'require_once(\'' . $other_path . '/upgrade_2-0_sqlite.sql\');',
      'dirname(__FILE__) . \'/upgrade_2-0_\' . $db_type . \'.sql\'' => '\'' . $other_path . '/upgrade_2-0_\' . $db_type . \'.sql\'',
      '$boarddir . \'/Settings' => '\'' . $settings_path . '/Settings',
   ));

   // Prepare.
   $contents = substr($contents, strlen($php_open), -strlen($php_close));

   file_put_contents($settings_path . '/upgrade_emulate_cache', $contents);
}

// Send.
eval($contents);

// done.
exit;
?>
#49
PasteBin / Paste-1309742686:v:use_geshi-1...
Last post by SleePy - Jul 04, 2011, 01:24 AM
<?php

// Get the contents man.
$contents = ob_get_contents();
ob_clean();

// The contents.
if ($boardurl != 'http://smf-svn.test')
   $contents = str_replace('http://smf-svn.test', $boardurl, $contents);

// Only do the Theme changer in certain cases.
if (!isset($_REQUEST['action']) || !in_array($_REQUEST['action'], array('xmlhttp', '.xml', 'viewsmfile', 'viewquery', 'verificationcode', 'suggest', 'smstats', 'quickmod', 'quickmod2', 'quotefast', 'openidreturn', 'jsoption', 'jsmodify', 'jseditor')))
   themechanger($contents);

echo $contents;

exit;


function themechanger(&$contents)
{
   global $smcFunc, $context, $user_info;

   if (empty($_SERVER['REQUEST_URL']))
      return;

   // Figure out our location easily.
   $location = preg_replace('~[;|?]theme=(\d+)~i', '', $_SERVER['REQUEST_URL']);
   if (strpos($location, '?') !== false)
      $location = $location . ';';
   else
      $location = $location . '?';

   // Is the current theme, wrong!
   if (isset($_REQUEST['theme']))
      $user_info['theme'] = (int) $_REQUEST['theme'];
   elseif (!empty($_SESSION['id_theme']))
      $user_info['theme'] = (int) $_SESSION['id_theme'];

   // Start.
   $thestring = '
<div id="svn_theme_changer" style="position: absolute; top:1em; left: 40em; color:red; z-index:999; display: none;">
   <form method="get" action="javascript://void;">
      <select name="theme" onchange="location=\''. $location . 'theme=\' + this.options[this.selectedIndex].value">';

   // Go database!
   $request = $smcFunc['db_query']('', '
      SELECT value, id_theme
      FROM {db_prefix}themes
         WHERE id_theme != {int:no_theme}
         AND id_member = {int:guest_id}
         AND variable = {string:theme_name}',
      array(
         'no_theme' => 0,
         'guest_id' => 0,
         'theme_name' => 'name',
   ));
   while ($row = $smcFunc['db_fetch_assoc']($request))
      $thestring .= '
         <option value="' . $row['id_theme'] . '"' . ($user_info['theme'] == $row['id_theme'] ? ' selected="selected"' : ''). '>' . $row['value'] . '</option>';

   $thestring .= '
      </select>
   </form>
</div>
<div style="position: absolute; top:0; left: 0; right: 0; color:red; z-index:999; dislay: none;">
<div id="svn_theme_changer_show" style="display: block; float: right;" ><a href="#1" onclick="document.getElementById(\'svn_theme_changer\').style.display = \'\'; document.getElementById(\'svn_theme_changer_show\').style.display = \'none\'; document.getElementById(\'svn_theme_changer_hide\').style.display = \'\';">expand</a></div>
<div id="svn_theme_changer_hide" style="display: none; float: right;"><a href="#2" onclick="document.getElementById(\'svn_theme_changer\').style.display = \'none\'; document.getElementById(\'svn_theme_changer_show\').style.display = \'\'; document.getElementById(\'svn_theme_changer_hide\').style.display = \'none\';">collapse</a></div></div>
<a style="float: right;" href="javascript:location=\'' . $_SERVER['REQUEST_URL'] . '&destory_session&secs=' . $context['session_id'] . '\'">[Destroy Session]</a>';

   // Display the few themes we have quickly.
   $contents = str_replace('<body>', '<body>' . $thestring, $contents);

   return $contents;
}
?>
#50
PasteBin / Paste-1309742599:v:use_geshi-1...
Last post by SleePy - Jul 04, 2011, 01:23 AM
<?php
$base_path = '/home/svn/sm-smf/trunk';
$settings_path = '/home/smf/svn_files';

$php_open = '<' . '?' . 'php';
$php_close = '?' . '>';

$revision = trim(str_replace('Revision: ', '', shell_exec('svn info /home/svn/sm-smf/trunk | grep "Revision"')));

require_once(dirname(__FILE__) . '/Settings.php');

// Get.
$contents = file_get_contents($base_path . '/index.php');

// Edit.
$contents = strtr($contents, array(
   'require_once(dirname(__FILE__) . \'/Settings.php\');' => 'require(\'' . $settings_path . '/Settings.php\');',
));

// WIP, needs fixing.
if (isset($_GET['destory_session']))
{
   $contents = file_get_contents($base_path . '/SSI.php');
   $contents = substr($contents, strlen($php_open), -strlen($php_close));
   eval($contents);

   require_once($sourcedir . '/Subs-Auth.php');
   setLoginCookie(-3600, 0);
   if (isset($_SESSION['login_' . $cookiename]))
      unset($_SESSION['login_' . $cookiename]);

   
   Header('location: ' . str_replace('session_destroy', '', $_SERVER['HTTP_REFERER']));
   exit;
}

// Prepare.
$contents = substr($contents, strlen($php_open), -strlen($php_close));

// Send.
$forum_version = 'SMF test';
eval($contents);

require_once($settings_path . '/exit_script.php');
?>