Recent Posts

Pages: [1] 2 3 ... 10
1
PasteBin / Paste-1277339280:v:use_geshi-1:v:type-php
« Last post by SleePy on June 23, 2010, 04:28:00 pm »
<?php
// We just start, and we are already preparing to shutdown.
// !!! This file is called via php_admin_value auto_prepend_file
register_shutdown_function('sm_shutdown_function');

// The fun never ends.
function sm_shutdown_function()
{
   // Make a clean getaway.
   $contents = ob_get_contents();
   ob_clean();

   // First we find out if we are going to be redirecting and fix that.
   $headers = headers_list();
   foreach ($headers as $key => $value)
   {
      if (strpos($value, 'Location:') === false)
         continue;

      header('Location:' . strtr($value, array(
         'mydomain.com' => 'foobar.test',
      )));
   }

   // Inject something and act like nothing happened.
   $contents = str_replace('mydomain.com', 'foobar.test', $contents);
   echo $contents;
   exit;
}

?>
2
PasteBin / Paste-1277339219:v:use_geshi-1:v:type-php
« Last post by SleePy on June 23, 2010, 04:26:59 pm »
<?php
// We just start, and we are already preparing to shutdown.
// !!! This file is called via php_admin_value auto_prepend_file
register_shutdown_function('sm_shutdown_function');

// The fun never ends.
function sm_shutdown_function()
{
   // Make a clean getaway.
   $contents = ob_get_contents();
   ob_clean();


   // Inject something and act like nothing happened.
   $contents = str_replace('*****', '*****', $contents);
   echo $contents;
   exit;
}

?>
3
PasteBin / Paste-1276737521:v:use_geshi-1:v:type-php
« Last post by SleePy on June 16, 2010, 05:18:41 pm »

   $context['features'] = array(
      'General' => array(
         0 => array('sf_general_0'),
         1 => array('sf_general_1'),
         2 => array('sf_general_2', true),
         3 => array('sf_general_3'),
         4 => array('sf_general_4'),
         5 => array('sf_general_5', true),
         6 => array('sf_general_6'),
         7 => array('sf_general_7'),
         8 => array('sf_general_8'),
         9 => array('sf_general_9'),
         10 => array('sf_general_10'),
         11 => array('sf_general_11', true),
         12 => array('sf_general_12'),
         13 => array('sf_general_13'),
         14 => array('sf_general_14', false, array(
            0 => array('sf_general_14_0'),
            1 => array('sf_general_14_1'),
            ),
         ),
      ),
      'Security' => array(
         0 => array('sf_security_0'),
         1 => array('sf_security_1'),
         2 => array('sf_security_2', true),
         3 => array('sf_security_3'),
         4 => array('sf_security_4'),
         5 => array('sf_security_5'),
      ),
      'Forum Settings' => array(
         0 => array('sf_forum settings_0'),
         1 => array('sf_forum settings_1'),
         2 => array('sf_forum settings_2'),
         3 => array('sf_forum settings_3'),
      ),
      'Boards and Categories' => array(
         0 => array('sf_boards and categories_0'),
         1 => array('sf_boards and categories_1'),
         2 => array('sf_boards and categories_2'),
         3 => array('sf_boards and categories_3', true),
         4 => array('sf_boards and categories_4'),
         5 => array('sf_boards and categories_5'),
         6 => array('sf_boards and categories_6'),
         7 => array('sf_boards and categories_7'),
      ),
      'Member Registration' => array(
         0 => array('sf_member registration_0'),
         1 => array('sf_member registration_1'),
         2 => array('sf_member registration_2'),
         3 => array('sf_member registration_3'),
         4 => array('sf_member registration_4'),
         5 => array('sf_member registration_5'),
         6 => array('sf_member registration_6'),
      ),
      'Member Navigation and Authentication' => array(
         0 => array('sf_member navigation and authentication_0'),
         1 => array('sf_member navigation and authentication_1'),
         2 => array('sf_member navigation and authentication_2', true),
         3 => array('sf_member navigation and authentication_3'),
         4 => array('sf_member navigation and authentication_4'),
         5 => array('sf_member navigation and authentication_5'),
         6 => array('sf_member navigation and authentication_6'),
      ),
      'Member Tracking and Tracing' => array(
         0 => array('sf_member tracking and tracing_0'),
         1 => array('sf_member tracking and tracing_1'),
         2 => array('sf_member tracking and tracing_2'),
         3 => array('sf_member tracking and tracing_3'),
         4 => array('sf_member tracking and tracing_4'),
      ),
      'Statistics' => array(
         0 => array('sf_statistics_0'),
         1 => array('sf_statistics_1'),
         2 => array('sf_statistics_2'),
         3 => array('sf_statistics_3'),
      ),
      'News and Announcements' => array(
         0 => array('sf_news and announcements_0'),
         1 => array('sf_news and announcements_1'),
         2 => array('sf_news and announcements_2'),
         3 => array('sf_news and announcements_3'),
         4 => array('sf_news and announcements_4'),
         5 => array('sf_news and announcements_5'),
      ),
      'Communication' => array(
         0 => array('sf_communication_0', true),
         1 => array('sf_communication_1'),
         2 => array('sf_communication_2'),
      ),
      'Membergroups' => array(
         0 => array('sf_membergroups_0'),
         1 => array('sf_membergroups_1', true),
         2 => array('sf_membergroups_2'),
         3 => array('sf_membergroups_3'),
         4 => array('sf_membergroups_4'),
         5 => array('sf_membergroups_5'),
      ),
      'Banning' => array(
         0 => array('sf_banning_0'),
         1 => array('sf_banning_1', true),
         2 => array('sf_banning_2'),
         3 => array('sf_banning_3'),
         4 => array('sf_banning_4'),
         5 => array('sf_banning_5', true),
      ),
      'External integration' => array(
         0 => array('sf_external integration_0', false, array(
            0 => array('sf_external integration_0_0'),
            1 => array('sf_external integration_0_1'),
            2 => array('sf_external integration_0_2'),
            3 => array('sf_external integration_0_3'),
            4 => array('sf_external integration_0_4'),
            5 => array('sf_external integration_0_5'),
            6 => array('sf_external integration_0_6'),
            7 => array('sf_external integration_0_7'),
            8 => array('sf_external integration_0_8'),
            9 => array('sf_external integration_0_9'),
            ),
         ),
         1 => array('sf_external integration_1', false, array(
            0 => array('sf_external integration_1_0'),
            1 => array('sf_external integration_1_1'),
            2 => array('sf_external integration_1_2'),
            ),
         ),
      ),
      'Wireless access' => array(
         0 => array('sf_wireless access_0', true),
         1 => array('sf_wireless access_1'),
         2 => array('sf_wireless access_2'),
         3 => array('sf_wireless access_3'),
         4 => array('sf_wireless access_4'),
         5 => array('sf_wireless access_5'),
         6 => array('sf_wireless access_6'),
      ),
      'Theming and Templating' => array(
         0 => array('sf_theming and templating_0'),
         1 => array('sf_theming and templating_1'),
         2 => array('sf_theming and templating_2'),
         3 => array('sf_theming and templating_3'),
         4 => array('sf_theming and templating_4'),
         5 => array('sf_theming and templating_5', true),
         6 => array('sf_theming and templating_6'),
         7 => array('sf_theming and templating_7'),
      ),
      'Posting Features' => array(
         0 => array('sf_posting features_0', true),
         1 => array('sf_posting features_1', false, array(
            0 => array('sf_posting features_1_0'),
            1 => array('sf_posting features_1_1'),
            2 => array('sf_posting features_1_2'),
            ),
         ),
         2 => array('sf_posting features_2'),
         3 => array('sf_posting features_3'),
         4 => array('sf_posting features_4'),
         5 => array('sf_posting features_5'),
      ),
      'Polls' => array(
         0 => array('sf_polls_0', true),
         1 => array('sf_polls_1'),
         2 => array('sf_polls_2'),
         3 => array('sf_polls_3'),
         4 => array('sf_polls_4'),
         5 => array('sf_polls_5'),
      ),
      'Attachments' => array(
         0 => array('sf_attachments_0'),
         1 => array('sf_attachments_1', true),
         2 => array('sf_attachments_2'),
         3 => array('sf_attachments_3'),
         4 => array('sf_attachments_4'),
      ),
      'Calendar Support' => array(
         0 => array('sf_calendar support_0'),
         1 => array('sf_calendar support_1'),
         2 => array('sf_calendar support_2'),
         3 => array('sf_calendar support_3'),
         4 => array('sf_calendar support_4'),
         5 => array('sf_calendar support_5'),
         6 => array('sf_calendar support_6'),
      ),
      'Moderation Tools' => array(
         0 => array('sf_moderation tools_0', false, array(
            0 => array('sf_moderation tools_0_0'),
            ),
         ),
         1 => array('sf_moderation tools_1'),
         2 => array('sf_moderation tools_2'),
         3 => array('sf_moderation tools_3'),
         4 => array('sf_moderation tools_4', true),
         5 => array('sf_moderation tools_5'),
         6 => array('sf_moderation tools_6'),
         7 => array('sf_moderation tools_7'),
         8 => array('sf_moderation tools_8'),
         9 => array('sf_moderation tools_9'),
         10 => array('sf_moderation tools_10', false, array(
            0 => array('sf_moderation tools_10_0'),
            1 => array('sf_moderation tools_10_1'),
            ),
         ),
         11 => array('sf_moderation tools_11'),
         12 => array('sf_moderation tools_12'),
      ),
      'User Profiles and User Options' => array(
         0 => array('sf_user profiles and user options_0'),
         1 => array('sf_user profiles and user options_1'),
         2 => array('sf_user profiles and user options_2'),
         3 => array('sf_user profiles and user options_3'),
         4 => array('sf_user profiles and user options_4', false, array(
            0 => array('sf_user profiles and user options_4_0'),
            1 => array('sf_user profiles and user options_4_1'),
            2 => array('sf_user profiles and user options_4_2'),
            ),
         ),
         5 => array('sf_user profiles and user options_5'),
         6 => array('sf_user profiles and user options_6', true),
         7 => array('sf_user profiles and user options_7'),
         8 => array('sf_user profiles and user options_8'),
         9 => array('sf_user profiles and user options_9'),
      ),
      'User Resources' => array(
         0 => array('sf_user resources_0'),
         1 => array('sf_user resources_1', true),
         2 => array('sf_user resources_2'),
         3 => array('sf_user resources_3'),
         4 => array('sf_user resources_4'),
         5 => array('sf_user resources_5'),
         6 => array('sf_user resources_6'),
      ),
   );
4
PasteBin / Paste-1276031921:v:use_geshi-1:v:type-text
« Last post by SleePy on June 08, 2010, 01:18:41 pm »
The-SleePy-Laptop:Site jeremy$ svn cleanup
svn: In directory 'public_html/Forums/Themes/default/images'
svn: Error processing command 'modify-wcprop' in 'public_html/Forums/Themes/default/images'
svn: 'public_html/Forums/Themes/default/images/useron.gif' is not under version control
The-SleePy-Laptop:Site jeremy$ svn unlock --force ./
svn: Working copy '/home/svn/Site/trunk' locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
5
PasteBin / Paste-1275962792:v:use_geshi-1:v:type-php
« Last post by SleePy on June 07, 2010, 06:06:32 pm »
// Get our proper database setup.
/*
$sitedb_settings['site'] = array(
   'read' => array(
      'server' => '127.0.0.2',
      'name' => 'site',
      'user' => 'site_read',
      'passwd' => 'foobar',
      'prefix' => '',
   ),
   'write' => array(
      'server' => '127.0.0.1',
      'name' => 'site',
      'user' => 'site_write',
      'passwd' => 'barfoo',
      'prefix' => '',
   ),
);

Called by:
Readonly: site_load_db('site');
Write: site_load_db('site', true);
Both: site_load_db('site', 2); or site_load_db('site', 'both');

Special connection: site_load_db('site', false, $db_connection);
*/
function site_load_db($section, $write = false, &$connection = null)
{
   global $sitedb_settings, $site_connections, $smcFunc, $site_section;

   // No section, how lame is that.
   if (empty($section) && empty($site_section))
      trigger_error('site_query() no section set', E_ERROR);
   $section = empty($section) ? $site_section : $section;

   // Doing both?
   if ($write == 'both')
   {
      site_load_db($section, 'read');
      $write = 'read';
   }

   // Try to include our database information if we haven't already
   if (!empty($section) && !isset($site_connections[$section][$write ? 'write' : 'read']))
      require('/home/sites/xxxx.com/configs/settings_' . $section . '.php');

   // Make the connection!
   $type = $write ? 'write' : 'read';
   if (!isset($site_connections[$section][$type]))
   {
      // No read or write data? Its old skool and needs updating.
      if (!sset($sitedb_settings[$section][$type]))
         $sitedb_settings[$section][$type] = $sitedb_settings[$section];

      // The actual connection.
      $site_connections[$section][$type] = smf_db_initiate($sitedb_settings[$section][$type]['server'], $sitedb_settings[$section][$type]['name'], $sitedb_settings[$section][$type]['user'], $sitedb_settings[$section][$type]['passwd'], $sitedb_settings[$section][$type]['prefix']);

      // Using a special connection?
      if ($connection != null)
         $connection = &$site_connections[$section][$type];
   }
}
6
PasteBin / Paste-1275962749:v:use_geshi-1:v:type-php
« Last post by SleePy on June 07, 2010, 06:05:49 pm »
// Get our proper database setup.
/*
$sitedb_settings['site'] = array(
   'read' => array(
      'server' => '127.0.0.2',
      'name' => 'site',
      'user' => 'site_read',
      'passwd' => 'foobar',
      'prefix' => '',
   ),
   'write' => array(
      'server' => '127.0.0.1',
      'name' => 'site',
      'user' => 'site_write',
      'passwd' => 'barfoo',
      'prefix' => '',
   ),
);

Called by:
Readonly: site_load_db('site');
Write: site_load_db('site', true);
Both: site_load_db('site', 2); or site_load_db('site', 'both');

Special connection: site_load_db('site', false, $db_connection);
*/
function site_load_db($section, $write = false, &$connection = null)
{
   global $sitedb_settings, $site_connections, $smcFunc, $site_section;

   // No section, how lame is that.
   if (empty($section) && empty($site_section))
      trigger_error('site_query() no section set', E_ERROR);
   $section = empty($section) ? $site_section : $section;

   // Doing both?
   if ($write == 'both')
   {
      site_load_db($section, 'read');
      $write = 'read';
   }

   // Try to include our database information if we haven't already
   if (!empty($section) && !isset($site_connections[$section][$write ? 'write' : 'read']))
      require('/home/sites/xxxx.com/security/settings_' . $section . '.php');

   // Make the connection!
   $type = $write ? 'write' : 'read';
   if (!isset($site_connections[$section][$type]))
   {
      // No read or write data? Its old skool and needs updating.
      if (!sset($sitedb_settings[$section][$type]))
         $sitedb_settings[$section][$type] = $sitedb_settings[$section];

      // The actual connection.
      $site_connections[$section][$type] = smf_db_initiate($sitedb_settings[$section][$type]['server'], $sitedb_settings[$section][$type]['name'], $sitedb_settings[$section][$type]['user'], $sitedb_settings[$section][$type]['passwd'], $sitedb_settings[$section][$type]['prefix']);

      // Using a special connection?
      if ($connection != null)
         $connection = &$site_connections[$section][$type];
   }
}
7
PasteBin / Paste-1275962715:v:use_geshi-1:v:type-php
« Last post by SleePy on June 07, 2010, 06:05:15 pm »
v
8
PasteBin / Paste-1274408579:v:use_geshi-1:v:type-php
« Last post by Guest on May 20, 2010, 06:22:59 pm »
<?php

phpinfo();

?>
9
PasteBin / Paste-1274041547:v:use_geshi-1:v:type-text
« Last post by SleePy on May 16, 2010, 12:25:47 pm »
[*****@**** ~]$ ping simplemachines.org
PING simplemachines.org (10.0.100.134) 56(84) bytes of data.
64 bytes from 10.0.100.134: icmp_seq=1 ttl=64 time=0.894 ms
64 bytes from 10.0.100.134: icmp_seq=2 ttl=64 time=0.215 ms
64 bytes from 10.0.100.134: icmp_seq=3 ttl=64 time=0.282 ms

--- simplemachines.org ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.215/0.798/1.899/0.779 ms
10
PasteBin / Paste-1273966662:v:use_geshi-1:v:type-php
« Last post by SleePy on May 15, 2010, 03:37:42 pm »
<?php

$tests = array(
   "123456",
   "123456\n",
);

foreach($tests AS $test)
{
   $good = preg_match('~^[0-9]+$~', $test);

   echo '"', $test, '" ', $good ? 'is' : 'is not', ' good
';
}

?>
Pages: [1] 2 3 ... 10
Templates: 2: index (CurveSite), Recent (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 1: index+Modifications.english (CurveSite).
Style sheets: 1: site (default).
Files included: 13 - 512KB. (show)
Cache hits: 5: 0.00086s for 13,658 bytes (show)
Queries used: 12.

[Show Queries]