Перейти к контенту
  • 0

Ошибка при загрузке форума


henry199

Вопрос

При загрузке форума ошибка:

 

Fatal error: Class 'display' not found in /home/pay2po/public_html/index.php on line 76

 

 

Выкладываю код Index.php

 

<?php

 

 

 

 

define( 'IPB_THIS_SCRIPT', 'public' );

define( 'IPB_LOAD_SQL' , 'queries' );

 

require_once( './init.php' );

 

//===========================================================================

// MAIN PROGRAM

//===========================================================================

 

$INFO = array();

 

//--------------------------------

// Load our classes

//--------------------------------

 

require_once ROOT_PATH . "sources/ipsclass.php";

require_once ROOT_PATH . "sources/classes/class_display.php";

require_once ROOT_PATH . "sources/classes/class_session.php";

require_once ROOT_PATH . "sources/classes/class_forums.php";

require_once KERNEL_PATH . "class_converge.php";

require_once ROOT_PATH . "conf_global.php";

 

# Initiate super-class

$ipsclass = new ipsclass();

$ipsclass->vars = $INFO;

 

//--------------------------------

// The clocks a' tickin'

//--------------------------------

 

$Debug = new Debug;

$Debug->startTimer();

 

//--------------------------------

// Load the DB driver and such

//--------------------------------

 

$ipsclass->init_db_connection();

 

//--------------------------------

// INIT other classes

//--------------------------------

require_once ROOT_PATH . "sources/classes/class_payment.php";

$ipsclass->payment = new payment;

$ipsclass->payment->ipsclass =& $ipsclass;

 

$ipsclass->print = new display();

$ipsclass->print->ipsclass =& $ipsclass;

 

$ipsclass->sess = new session();

$ipsclass->sess->ipsclass =& $ipsclass;

 

$ipsclass->forums = new forum_functions();

$ipsclass->forums->ipsclass =& $ipsclass;

 

//--------------------------------

// Set up our vars

//--------------------------------

 

$ipsclass->parse_incoming();

 

//--------------------------------

// Set converge

//--------------------------------

 

$ipsclass->converge = new class_converge( $ipsclass->DB );

 

//===========================================================================

// Generate choice array

//===========================================================================

 

$choice = array(

"idx" => array( "boards" , 'boards' , array('chatting','birthdays', 'calendar') ),

"sc" => array( "boards" , 'boards' , array('chatting','birthdays', 'calendar') ),

"sf" => array( "forums" , 'forums' , array('announcements', 'multimod') ),

"sr" => array( "forums" , 'forums' , array() ),

"st" => array( "topics" , 'topics' , array('attachtypes','bbcode', 'multimod','ranks','profilefields','emoticons' ) ),

"announce" => array( "announcements" , 'announcements', array('bbcode','badwords','emoticons','ranks','profilefields' ) ),

"login" => array( "login" , 'login' , array() ),

"post" => array( "post" , 'post' , array('attachtypes','badwords','bbcode','emoticons','ranks' ) ),

"reg" => array( "register" , 'register' , array() ),

"online" => array( "online" , 'online' , array() ),

"members" => array( "memberlist" , 'memberlist' , array('ranks','profilefields' ) ),

"help" => array( "help" , 'help' , array() ),

"search" => array( "search" , 'search' , array('badwords','emoticons','attachtypes','multimod','bbcode','ranks','profilefields' ) ),

"mod" => array( "moderate" , 'moderate' , array('attachtypes','multimod','bbcode','emoticons','badwords' ) ),

"print" => array( "misc/print_page" , 'printpage' , array('attachtypes','bbcode', 'multimod','ranks','profilefields' ) ),

"forward" => array( "misc/forward_page" , 'forwardpage' , array() ),

"mail" => array( "misc/contact_member", 'contactmember', array() ),

"report" => array( "misc/contact_member", 'contactmember', array() ),

"chat" => array( "misc/contact_member", 'contactmember', array() ),

'boardrules' => array( "misc/contact_member", 'contactmember', array() ),

"msg" => array( "messenger" , 'messenger' , array('profilefields','attachtypes','badwords','bbcode','emoticons' ) ),

"usercp" => array( "usercp" , 'usercp' , array('attachtypes','badwords','bbcode','emoticons' ) ),

"profile" => array( "profile" , 'profile' , array('ranks','profilefields','badwords','bbcode','emoticons' ) ),

"track" => array( "misc/tracker" , 'tracker' , array() ),

"stats" => array( "misc/stats" , 'stats' , array() ),

"attach" => array( "misc/attach" , 'attach' , array('attachtypes' ) ),

'legends' => array( 'misc/legends' , 'legends' , array('badwords','bbcode' ,'emoticons' ) ),

'calendar' => array( "calendar" , 'calendar' , array('attachtypes','bbcode', 'ranks','multimod','emoticons','badwords' ) ),

'buddy' => array( "browsebuddy" , 'assistant' , array() ),

'mmod' => array( "misc/multi_moderate", 'mmod' , array('multimod' ) ),

'warn' => array( "misc/warn" , 'warn' , array('badwords','bbcode' ,'emoticons' ) ),

'home' => array( 'portal' , 'portal' , array('portal','attachtypes','bbcode', 'multimod','ranks','profilefields' ) ),

'module' => array( 'modules' , 'modules' , array() ),

'task' => array( 'taskloader' , 'taskloader' , array() ),

'findpost' => array( 'findpost' , 'findpost' , array() ),

"xmlout" => array( "xmlout" , 'xmlout' , array('attachtypes','multimod','bbcode','ranks','profilefields' ) ),

'paysubs' => array( 'paysubscriptions' , 'paysubscriptions' , array() ),

'rssout' => array( 'rssout' , 'rssout' , array() ),

'component' => array( 'component' , 'component' , array() ),

'paysys' => array( 'paysys' , 'paysys' , array() ),

'rep' => array( 'reputation' , 'reputation' , array() ),

);

 

//---------------------------------------------------

// Check to make sure the array key exits..

//---------------------------------------------------

 

$ipsclass->input['_low_act'] = strtolower( $ipsclass->input['act'] );

 

if (! isset($choice[ $ipsclass->input['_low_act'] ][0]) )

{

$ipsclass->input['act'] = 'idx';

$ipsclass->input['_low_act'] = 'idx';

}

 

//===========================================================================

// Short tags...

//===========================================================================

 

if ( $ipsclass->input['showforum'] != "" )

{

$ipsclass->input['act'] = "sf";

$ipsclass->input['f'] = intval($ipsclass->input['showforum']);

}

else if ( $ipsclass->input['showtopic'] != "")

{

$ipsclass->input['act'] = "st";

$ipsclass->input['t'] = intval($ipsclass->input['showtopic']);

 

//---------------------------------------------------

// Grab and cache the topic now as we need the 'f' attr for

// the skins...

//---------------------------------------------------

 

$ipsclass->DB->simple_construct( array( 'select' => '*',

'from' => 'topics',

'where' => "tid=".$ipsclass->input['t'],

) );

 

$ipsclass->DB->simple_exec();

 

$ipsclass->topic_cache = $ipsclass->DB->fetch_row();

$ipsclass->input['f'] = $ipsclass->topic_cache['forum_id'];

}

else if ( $ipsclass->input['showuser'] != "")

{

$ipsclass->input['act'] = "profile";

$ipsclass->input['MID'] = intval($ipsclass->input['showuser']);

}

else if ( $ipsclass->input['automodule'] != "" )

{

$ipsclass->input['act'] = 'module';

$ipsclass->input['module'] = $ipsclass->input['automodule'];

}

else if ( $ipsclass->input['autocom'] != "" )

{

$ipsclass->input['act'] = 'component';

$ipsclass->input['module'] = $ipsclass->input['autocom'];

}

else

{

$ipsclass->input['act'] = $ipsclass->input['act'] == '' ? "idx" : $ipsclass->input['act'];

}

 

if ( ! $ipsclass->input['_low_act'] OR $ipsclass->input['_low_act'] == 'idx' )

{

$ipsclass->input['_low_act'] = strtolower($ipsclass->input['act']);

}

 

//--------------------------------

// Start off the cache array

//--------------------------------

 

$ipsclass->cache_array = array_merge( $choice[ $ipsclass->input['_low_act'] ][2], array('rss_calendar', 'rss_export','components','banfilters', 'settings', 'group_cache', 'systemvars', 'skin_id_cache', 'forum_cache', 'moderators', 'stats', 'languages') );

 

//--------------------------------

// Module? Load INIT class

//--------------------------------

 

if ( ( $ipsclass->input['act'] == 'module' OR $ipsclass->input['act'] == 'component' ) and $ipsclass->input['module'] )

{

$file = ROOT_PATH.'sources/components_init/'. $ipsclass->txt_alphanumerical_clean( $ipsclass->input['module'] ).'.php';

 

if ( file_exists( $file ) )

{

require_once( $file );

$init_class = new component_init();

$init_class->ipsclass =& $ipsclass;

$init_class->run_init();

}

}

 

//===========================================================================

// Get cache...

//===========================================================================

 

$ipsclass->init_load_cache( $ipsclass->cache_array );

 

//--------------------------------

// Set debug mode

//--------------------------------

 

$ipsclass->DB->set_debug_mode( $ipsclass->vars['sql_debug'] == 1 ? intval($_GET['debug']) : 0 );

 

//--------------------------------

// Initialize the FUNC

//--------------------------------

 

$ipsclass->initiate_ipsclass();

 

//--------------------------------

// The rest ;)

//--------------------------------

 

$ipsclass->member = $ipsclass->sess->authorise();

$ipsclass->lastclick = $ipsclass->sess->last_click;

$ipsclass->location = $ipsclass->sess->location;

$ipsclass->session_id = $ipsclass->sess->session_id; // Used in URLs

$ipsclass->my_session = $ipsclass->sess->session_id; // Used in code

 

//-----------------------------------------

// Cache md5 check

//-----------------------------------------

 

$ipsclass->md5_check = $ipsclass->return_md5_check();

 

//--------------------------------

// Initialize the forums

//--------------------------------

 

$ipsclass->forums->strip_invisible = 1;

$ipsclass->forums->forums_init();

 

//--------------------------------

// Load the skin

//--------------------------------

 

$ipsclass->load_skin();

 

list($ppu,$tpu) = explode( "&", $ipsclass->member['view_prefs'] );

 

$ipsclass->vars['display_max_topics'] = ($tpu > 0) ? $tpu : $ipsclass->vars['display_max_topics'];

$ipsclass->vars['display_max_posts'] = ($ppu > 0) ? $ppu : $ipsclass->vars['display_max_posts'];

 

//===========================================================================

// Set up the session ID stuff

//===========================================================================

 

if ( $ipsclass->session_type == 'cookie' )

{

$ipsclass->session_id = "";

$ipsclass->base_url = $ipsclass->vars['board_url'].'/index.'.$ipsclass->vars['php_ext'].'?';

}

else

{

$ipsclass->base_url = $ipsclass->vars['board_url'].'/index.'.$ipsclass->vars['php_ext'].'?s='.$ipsclass->session_id.'&';

}

 

$ipsclass->js_base_url = $ipsclass->vars['board_url'].'/index.'.$ipsclass->vars['php_ext'].'?s='.$ipsclass->session_id.'&';

 

//--------------------------------

// Set up the forum_read cookie

//--------------------------------

 

$ipsclass->hdl_forum_read_cookie();

 

//===========================================================================

// Set up defaults

//===========================================================================

 

$ipsclass->skin_id = $ipsclass->skin['_setid'];

 

$ipsclass->vars['img_url'] = 'style_images/' . $ipsclass->skin['_imagedir'];

$ipsclass->vars['AVATARS_URL'] = 'style_avatars';

$ipsclass->vars['EMOTICONS_URL'] = 'style_emoticons/<#EMO_DIR#>';

$ipsclass->vars['mime_img'] = 'style_images/<#IMG_DIR#>';

 

//--------------------------------

// Set up our language choice

//--------------------------------

 

if ($ipsclass->vars['default_language'] == "")

{

$ipsclass->vars['default_language'] = 'en';

}

 

//--------------------------------

// Did we choose a language?

//--------------------------------

 

If ( $ipsclass->input['setlanguage'] and $ipsclass->input['langid'] and $ipsclass->member['id'] )

{

if ( is_array( $ipsclass->cache['languages'] ) and count( $ipsclass->cache['languages'] ) )

{

foreach( $ipsclass->cache['languages'] as $idx => $data )

{

if ( $data['ldir'] == $ipsclass->input['langid'] )

{

$ipsclass->DB->do_update( 'members', array( 'language' => $data['ldir'] ), 'id='.$ipsclass->member['id'] );

$ipsclass->member['language'] = $data['ldir'];

}

}

}

}

 

$ipsclass->load_language('lang_global');

 

//--------------------------------

// Legacy mode?

//--------------------------------

 

if ( LEGACY_MODE )

{

$DB =& $ipsclass->DB;

$std =& $ipsclass;

$ibforums =& $ipsclass;

$forums =& $ipsclass->forums;

$print =& $ipsclass->print;

$sess =& $ipsclass->sess;

 

$ipsclass->load_template('skin_global');

$ipsclass->skin_global = $ipsclass->compiled_templates['skin_global'];

}

 

//===========================================================================

// DECONSTRUCTOR

//===========================================================================

 

if ( USE_SHUTDOWN and $ipsclass->input['act'] != 'task' )

{

@chdir( ROOT_PATH );

$ROOT_PATH = getcwd();

 

register_shutdown_function( array( &$ipsclass, 'my_deconstructor') );

}

 

//===========================================================================

// Force log in / board offline?

//===========================================================================

 

if ($ipsclass->input['_low_act'] != 'login' and

$ipsclass->input['_low_act'] != 'reg' and

$ipsclass->input['_low_act'] != 'xmlout' and

$ipsclass->input['_low_act'] != 'attach' and

$ipsclass->input['_low_act'] != 'task' and

$ipsclass->input['_low_act'] != 'paysubs' )

{

 

//--------------------------------

// Do we have permission to view

// the board?

//--------------------------------

 

if ( $ipsclass->member['g_view_board'] != 1 )

{

$ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_view_board') );

}

 

//--------------------------------

// Is the board offline?

//--------------------------------

 

if ($ipsclass->vars['board_offline'] == 1)

{

if ($ipsclass->member['g_access_offline'] != 1)

{

$ipsclass->vars['no_reg'] = 1;

$ipsclass->board_offline();

}

}

 

//--------------------------------

// Is log in enforced?

//--------------------------------

 

if ( (! $ipsclass->member['id']) and ($ipsclass->vars['force_login'] == 1) )

{

require ROOT_PATH."sources/action_public/login.php";

$runme = new login();

$runme->ipsclass =& $ipsclass;

$runme->auto_run();

 

}

 

//--------------------------------

// Show PURCHASE screen?

// Not enforced

//--------------------------------

 

if ( ! $ipsclass->member['sub_end'] )

{

//--------------------------------

// 1: No enforce, chosen from reg

//--------------------------------

 

if ( ! $ipsclass->vars['subsm_enforce'] and $ipsclass->member['subs_pkg_chosen'] )

{

$ipsclass->input['act'] = 'paysubs';

$ipsclass->input['CODE'] = 'paymentmethod';

$ipsclass->input['sub'] = $ipsclass->member['subs_pkg_chosen'];

$ipsclass->input['nocp'] = 1;

$ipsclass->input['msgtype'] = 'fromreg';

}

 

//--------------------------------

// Show PURCHASE screen?

// Enforced

//--------------------------------

 

if ( $ipsclass->vars['subsm_enforce'] and $ipsclass->member['mgroup'] == $ipsclass->vars['subsm_nopkg_group'] )

{

$ipsclass->input['act'] = 'paysubs';

$ipsclass->input['nocp'] = 1;

$ipsclass->input['msgtype'] = 'force';

 

if ( $ipsclass->member['subs_pkg_chosen'] )

{

$ipsclass->input['CODE'] = 'paymentmethod';

$ipsclass->input['sub'] = $ipsclass->member['subs_pkg_chosen'];

}

}

}

}

 

//===========================================================================

// REQUIRE AND RUN

//===========================================================================

 

if ( $ipsclass->input['act'] == 'home' AND $ipsclass->vars['csite_on'] )

{

require ROOT_PATH."sources/action_public/portal.php";

$csite = new portal();

$csite->ipsclass =& $ipsclass;

$csite->auto_run();

}

else if ( $ipsclass->input['act'] == 'module' AND USE_MODULES )

{

require ROOT_PATH."modules/module_loader.php";

$loader = new module_loader();

$loader->ipsclass =& $ipsclass;

$loader->run_loader();

}

else if ( $ipsclass->input['act'] == 'component' )

{

$file = ROOT_PATH.'sources/components_public/'. $ipsclass->txt_alphanumerical_clean( $ipsclass->input['module'] ).'.php';

 

if ( file_exists( $file ) )

{

require_once( $file );

$loader = new component_public();

$loader->ipsclass =& $ipsclass;

$loader->run_component();

}

else

{

@header( "Location: ".$ipsclass->base_url );

}

}

else if ( $ipsclass->input['act'] == 'paysys') { $ipsclass->payment->auto_run(); }

else

{

// Require and run

require_once( ROOT_PATH."sources/action_public/".$choice[ strtolower($ipsclass->input['act']) ][0].".php" );

$runme = new $choice[ strtolower($ipsclass->input['act']) ][1];

$runme->ipsclass =& $ipsclass;

$runme->auto_run();

}

 

 

 

 

 

?>

 

 

Просьба помочь....

 

 

 

Ошибка возникла после установки SQL запроса по исправлению ошибки от SQL ошибки при попытке восстановить пароль :D

 

НО возникла НЕ сразу!!!

 

 

 

Заранее спасибо.

Ссылка на комментарий
Поделиться на других сайтах

Рекомендуемые сообщения

  • 0

В курсе что апать так часто нельзя? См. правила...

 

./init.php и ./sources/classes/class_diplay.php покажи.

 

P.S. Юзай [ codebox ]

Ссылка на комментарий
Поделиться на других сайтах

  • 0

<?php


define( 'ROOT_PATH', dirname( __FILE__ ) ."/" );

/**
* USE SHUT DOWN
*
* Enable shut down features?
* Uses PHPs register_shutdown_function to save
* low priority tasks until end of exec
* @since 2.0.0.2005-01-01
*/
define ( 'USE_SHUTDOWN', IPB_THIS_SCRIPT == 'public' ? 1 : 0 );

/**
* IPS KERNEL PATH
*
* @since 2.0.0.2005-01-01
*/
define( 'KERNEL_PATH'  , ROOT_PATH.'ips_kernel/' );

/**
* LEGACY MODE
*
* Legacy mode? Will enable hacks for 2.0 to work
* with a little modification
* @since 2.1.0.2005-07-12
*/
define( 'LEGACY_MODE', 0 );

/**
* USE MODULES
*
* Enable module usage?
* (Vital for some mods and IPB enhancements)
* @since 2.0.0.2005-01-01
*/
define ( 'USE_MODULES', 1 );

/**
* CUSTOM ERROR
*
* Enable custom error handling?
* Useful to trap skin errors, etc
* @since 2.0.0.2005-01-01
*/
define( 'CUSTOM_ERROR', 1 );

/**
* TRIAL VERSION
*
* Seriously, like, leave this alone
* @since 2.0.0.2005-01-01
*/
define( 'TRIAL_VERSION', 0 );

//-----------------------------------------------
// NO USER EDITABLE SECTIONS BELOW
//-----------------------------------------------

@set_magic_quotes_runtime(0);
error_reporting  (E_ERROR | E_WARNING | E_PARSE);

/**
* IN IPB
*
* @since 2.0.0.2005-01-01
*/
define ( 'IN_IPB', 1 );

/**
* IN ACP
*
* @since 2.0.0.2005-01-01
*/
define ( 'IN_ACP', 1 );

/**
* DEV MODE
*
* Seriously, like, leave this alone too
* @since 2.0.0.2005-01-01
*/
define ( 'IN_DEV', 0 );

/**
* SAFE MODE
*
* Seriously, like, leave this alone too
* @since 2.0.0.2005-01-01
*/
if ( IPB_THIS_SCRIPT != 'public' )
{
if ( function_exists('ini_get') )
{
	define ( 'SAFE_MODE_ON', @ini_get("safe_mode") ? 1 : 0 );
}
else
{
	define ( 'SAFE_MODE_ON', 1 );
}
}
else
{
define ( 'SAFE_MODE_ON', 0 );
}

/**
* INITIATED
*
* Seriously, like, leave this alone too
* @since 2.1.0.2005-07-19
*/
define ( 'IPB_INIT_DONE', 1 );

//-----------------------------------------------
// Use custom handler?
//-----------------------------------------------

if ( CUSTOM_ERROR )
{
set_error_handler("my_error_handler");
}

//===========================================================================
// DEBUG CLASS
//===========================================================================

/**
* Debug class
*
* @package	InvisionPowerBoard
* @author   Matt Mecham
* @version	2.1
*/
class Debug
{
   function startTimer()
   {
       global $starttime;
       $mtime = microtime ();
       $mtime = explode (' ', $mtime);
       $mtime = $mtime[1] + $mtime[0];
       $starttime = $mtime;
   }
   function endTimer()
   {
       global $starttime;
       $mtime = microtime ();
       $mtime = explode (' ', $mtime);
       $mtime = $mtime[1] + $mtime[0];
       $endtime = $mtime;
       $totaltime = round (($endtime - $starttime), 5);
       return $totaltime;
   }
}

/*-------------------------------------------------------------------------*/
// GLOBAL ROUTINES
/*-------------------------------------------------------------------------*/

/**
* Fatal error
*
* @param	string	Message
* @param	string	Help
* @return	void
*/
function fatal_error($message="", $help="")
{
echo("$message<br><br>$help");
exit;
}

/*-------------------------------------------------------------------------*/
// Custom error handler
/*-------------------------------------------------------------------------*/

/**
* Custom error handler
*
* @param	integer	Error number
* @param	string	Error string
* @param	string	Error file
* @param	string	Error line number
* @return	void
*/
function my_error_handler( $errno, $errstr, $errfile, $errline )
{
// Did we turn off errors with @?

if ( ! error_reporting() )
{
	return;
}

$errfile = str_replace( @getcwd(), "", $errfile );

switch ($errno)
{
 		case E_ERROR:
  			echo "<b>IPB ERROR</b> [$errno] $errstr (Line: $errline of $errfile)<br />\n";
  			exit(1);
  		break;
 		case E_WARNING:
 			if ( strstr( $errstr, 'load_template(./skin_cache/cacheid_' ) )
 			{
 				if ( IPB_THIS_SCRIPT != 'admin' )
 				{
				echo "<div style='font-family:sans-serif'><b>IPB TEMPLATE ERROR:</b> Could not load the required template.
					  <br /><br />First, try and remove any custom skin settings by clicking <a href='index.php?setskin&id=0'>here</a>
					  <br /><br />Then, please visit your <a href='admin.php'>Admin Control Panel</a> to repair this template.
					  <br /><br /><span style='font-size:90%;color:gray'>Error: $errstr</span></div>";
			}
			else
			{
				skin_emergency();
			}
 			}
 			else
 			{
  				echo "<b>IPB WARNING</b> [$errno] $errstr (Line: $errline of $errfile)<br />\n";
  			}
  		break;
		default:
  			//Do nothing
  		break;
}
}


?>

 

 

 

Class-Display

 

<?php


class display {

       # Global
       var $ipsclass;

   var $to_print = "";
   var $output   = "";
   var $macros   = "";

   //-----------------------------------------
   // CONSTRUCTOR
   //-----------------------------------------

   function display()
   {
   }


   //-----------------------------------------
   // Appends the parsed HTML to our class var
   //-----------------------------------------

   function add_output($to_add)
   {
       $this->to_print .= $to_add;
       //return 'true' on success
       return true;
   }



   /*-------------------------------------------------------------------------*/
   //
   // Parses all the information and prints it.
   //
   /*-------------------------------------------------------------------------*/

   function do_output($output_array)
   {
               global $Debug;

       //-----------------------------------------
       // Global
       //-----------------------------------------

       $components_links = "";

       //-----------------------------------------
       // Are we IPSing?
       //-----------------------------------------

               $this->_check_ips_report();

       //-----------------------------------------
       // UNPACK MACROS
       //-----------------------------------------

       $this->_unpack_macros();

       //-----------------------------------------
       // END TIMER
       //-----------------------------------------

       $this->ex_time  = sprintf( "%.4f",$Debug->endTimer() );

       //-----------------------------------------
       // SQL DEBUG?
       //-----------------------------------------

       $this->_check_debug();

       $stats = $this->_show_debug();

       //-----------------------------------------
       // NAVIGATION
       //-----------------------------------------

       $nav  = $this->ipsclass->compiled_templates['skin_global']->start_nav();

       $nav .= "<a href='{$this->ipsclass->base_url}act=idx'>{$this->ipsclass->vars['board_name']}</a>";

       if ( empty($output_array['OVERRIDE']) )
       {
                       if (is_array( $output_array['NAV'] ) )
                       {
                               foreach ($output_array['NAV'] as $n)
                               {
                                       if ($n)
                                       {
                                               $nav .= "<{F_NAV_SEP}>" . $n;
                                       }
                               }
                       }
       }

       $nav .= $this->ipsclass->compiled_templates['skin_global']->end_nav();

       //-----------------------------------------
       // CSS
       //-----------------------------------------

       $css = $this->_get_css();

               //-----------------------------------------
               // REMOVAL OF THIS WITHOUT PURCHASING COPYRIGHT REMOVAL WILL VIOLATE THE LICENCE YOU AGREED
               // TO WHEN DOWNLOADING THIS PRODUCT. THIS COULD MEAN REMOVAL OF YOUR BOARD AND EVEN
               // CRIMINAL CHARGES
               //-----------------------------------------

       if ($this->ipsclass->vars['ipb_copy_number'])
       {
               $copyright = "";
       }
       else if ( TRIAL_VERSION )
       {
               $copyright = "<!-- Copyright Information -->
                                         <div align='center' style='background-color:#FFF;color:#000;font-size:11px;width:auto;'>
                                                 Работает на <a href='http://damagelab.org/' style='text-decoration:none' target='_blank'>руссифицированной версии</a> <a href='http://www.invisionpower.com' target='_blank' style='color:#000'>Invision Power Board</a>
                                                 v2.1.7 © 2006  <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a> <a href='http://damagelab.org/'>Modified by ZXroot from damagelab.org</a>
                                                 <br />
                                         </div>
                                         <!-- / Copyright -->";
       }
       else
       {
               $copyright = "<!-- Copyright Information -->
                                         <div align='center' class='copyright'>
                                                 <a href='http://damagelab.org' style='text-decoration:none' target='_blank'>Русская версия</a> <a href='http://www.invisionpower.com' style='text-decoration:none' target='_blank'>Invision Power Board</a>  <a href='http://damagelab.org/'>Modified by ZXroot from damagelab.org</a>
                                                 {$this->ipsclass->version} © 2006  IPS, Inc.
                                         ";

               if ( $this->ipsclass->vars['ipb_reg_show'] and $this->ipsclass->vars['ipb_reg_name'] )
               {
                       $copyright .= "<div>".$this->ipsclass->lang['licensed_to'].$this->ipsclass->vars['ipb_reg_name']."</div>";
               }


               $copyright .= "</div>\n\t\t<!-- / Copyright -->";
       }

               //-----------------------------------------
       // Must be called before board_header
               //-----------------------------------------

       $this->ipsclass->member['new_msg'] = intval($this->ipsclass->member['new_msg']);

       if ( ($this->ipsclass->member['g_max_messages'] > 0) and ($this->ipsclass->member['msg_total'] >= $this->ipsclass->member['g_max_messages']) )
               {
                       $msg_data['TEXT'] = $this->ipsclass->lang['msg_full'];
               }
               else
               {
                       $msg_data['TEXT'] = sprintf( $this->ipsclass->lang['msg_new'], $this->ipsclass->member['new_msg']);
               }

               //-----------------------------------------
               // Components link
               //-----------------------------------------

               if ( is_array( $this->ipsclass->cache['components'] ) and count( $this->ipsclass->cache['components'] ) )
           {
                   foreach( $this->ipsclass->cache['components'] as $id => $data )
                   {
                           if ( $data['com_url_title'] AND $data['com_url_uri'] )
                           {
                                   $data['com_url_uri']   = str_replace(  '{ipb.base_url}'                   , $this->ipsclass->base_url    , $data['com_url_uri'] );
                                   $data['com_url_title'] = preg_replace( '#{ipb.lang\[[\'"](.+?)[\'"]\]}#ie', "\$this->ipsclass->lang[\\1]", $data['com_url_title'] );

                                   $components_links .= $this->ipsclass->compiled_templates['skin_global']->global_board_header_component_link( $data['com_url_uri'],$data['com_url_title'], $data );
                           }
                   }
           }

               //-----------------------------------------
               // Do it
               //-----------------------------------------

       $this_header  = $this->ipsclass->compiled_templates['skin_global']->global_board_header( $components_links );
       $this_footer  = $this->ipsclass->compiled_templates['skin_global']->global_board_footer( $this->ipsclass->get_date( time(), 'SHORT', 1 ) );

       //-----------------------------------------
       // Show rules link?
       //-----------------------------------------

       if ($this->ipsclass->vars['gl_show'] and $this->ipsclass->vars['gl_title'])
       {
               if ($this->ipsclass->vars['gl_link'] == "")
               {
                       $this->ipsclass->vars['gl_link'] = $this->ipsclass->base_url."act=boardrules";
               }

               $this_header = str_replace( "<!--IBF.RULES-->", $this->ipsclass->compiled_templates['skin_global']->rules_link($this->ipsclass->vars['gl_link'], $this->ipsclass->vars['gl_title']), $this_header );
       }

       //-----------------------------------------
       // Build the members bar
               //-----------------------------------------

               $output_array['MEMBER_BAR'] = $this->ipsclass->compiled_templates['skin_global']->member_bar($msg_data);

               //-----------------------------------------
               // Board offline?
               //-----------------------------------------

                if ($this->ipsclass->vars['board_offline'] == 1)
                {
                        $output_array['TITLE'] = $this->ipsclass->lang['warn_offline']." ".$output_array['TITLE'];
                }

       //-----------------------------------------
       // Showing skin jump?
       //-----------------------------------------

       if ( $this->ipsclass->vars['allow_skins'] and $this->ipsclass->member['id'] > 0 )
       {
               $skin_jump = $this->ipsclass->compiled_templates['skin_global']->global_skin_chooser( $this->_build_skin_list() );
       }
       else
       {
               $skin_jump = "";
       }

       //-----------------------------------------
       // Showing skin jump?
       //-----------------------------------------

       if ( $this->ipsclass->member['id'] > 0 )
       {
               $lang_jump = $this->ipsclass->compiled_templates['skin_global']->global_lang_chooser( $this->_build_language_list() );
       }
       else
       {
               $lang_jump = "";
       }

       //-----------------------------------------
       // Show quick stats?
       //-----------------------------------------

       $gzip_status = $this->ipsclass->vars['disable_gzip'] == 1 ? $this->ipsclass->lang['gzip_off'] : $this->ipsclass->lang['gzip_on'];

       if ( ! $this->ipsclass->server_load  )
       {
               $this->ipsclass->server_load = '--';
       }

       //-----------------------------------------
       // Basics
       //-----------------------------------------

       if ( $this->ipsclass->member['id'] and $this->ipsclass->vars['debug_level'] )
       {
               $quickstats = $this->ipsclass->compiled_templates['skin_global']->global_quick_stats($this->ex_time, $gzip_status, $this->ipsclass->server_load, $this->ipsclass->DB->get_query_cnt() );
       }
       else
       {
               $quickstats = "";
       }

       //-----------------------------------------
       // Add in task image?
       //-----------------------------------------

       if ( time() >= $this->ipsclass->cache['systemvars']['task_next_run'] )
       {
               $this->to_print .= "<!--TASK--><img src='{$this->ipsclass->base_url}act=task' border='0' height='1' width='1' alt='' /><!--ETASK-->";
       }

       //-----------------------------------------
               // Parse EXEC commands in wrapper only
               // If we moved this below the block of str_replace
               // we'd get exec commands parsed in HTML templates
               // too... Do we want that? Not for now...
               //-----------------------------------------

               if ( stristr( $this->ipsclass->skin['_wrapper'], '<!--exec.' ) )
               {
                       $this->_parse_exec_tags();
               }

       $this->ipsclass->skin['_wrapper'] = str_replace( "<% CSS %>"            , $css                                , $this->ipsclass->skin['_wrapper']);
               $this->ipsclass->skin['_wrapper'] = str_replace( "<% JAVASCRIPT %>"     , ""                                  , $this->ipsclass->skin['_wrapper']);
       $this->ipsclass->skin['_wrapper'] = str_replace( "<% TITLE %>"          , $output_array['TITLE']              , $this->ipsclass->skin['_wrapper']);
       $this->ipsclass->skin['_wrapper'] = str_replace( "<% BOARD %>"          , $this->to_print                     , $this->ipsclass->skin['_wrapper']);
       $this->ipsclass->skin['_wrapper'] = str_replace( "<% STATS %>"          , $stats                              , $this->ipsclass->skin['_wrapper']);
       $this->ipsclass->skin['_wrapper'] = str_replace( "<% GENERATOR %>"      , $this->_get_rss_export()            , $this->ipsclass->skin['_wrapper']);
               $this->ipsclass->skin['_wrapper'] = str_replace( "<% COPYRIGHT %>"      , $copyright                          , $this->ipsclass->skin['_wrapper']);
               $this->ipsclass->skin['_wrapper'] = str_replace( "<% BOARD HEADER %>"   , $this_header                        , $this->ipsclass->skin['_wrapper']);
               $this->ipsclass->skin['_wrapper'] = str_replace( "<% BOARD FOOTER %>"   , $this_footer                        , $this->ipsclass->skin['_wrapper']);
               $this->ipsclass->skin['_wrapper'] = str_replace( "<% NAVIGATION %>"     , $nav                                , $this->ipsclass->skin['_wrapper']);
               $this->ipsclass->skin['_wrapper'] = str_replace( "<% SKINCHOOSER %>"    , $skin_jump                          , $this->ipsclass->skin['_wrapper']);
               $this->ipsclass->skin['_wrapper'] = str_replace( "<% LANGCHOOSER %>"    , $lang_jump                          , $this->ipsclass->skin['_wrapper']);
               $this->ipsclass->skin['_wrapper'] = str_replace( "<% QUICKSTATS %>"     , $quickstats                         , $this->ipsclass->skin['_wrapper']);
               $this->ipsclass->skin['_wrapper'] = str_replace( "<% LOFIVERSION %>"    , $this->_get_lofi_link()             , $this->ipsclass->skin['_wrapper']);
               $this->ipsclass->skin['_wrapper'] = str_replace( "<% SYNDICATION %>"    , $this->_get_synd_link()             , $this->ipsclass->skin['_wrapper']);
               $this->ipsclass->skin['_wrapper'] = str_replace( "<% CHARSET %>"        , $this->ipsclass->vars['gb_char_set'], $this->ipsclass->skin['_wrapper']);


               if ( empty($output_array['OVERRIDE']) )
               {
                 $this->ipsclass->skin['_wrapper'] = str_replace( "<% MEMBER BAR %>", $output_array['MEMBER_BAR'], $this->ipsclass->skin['_wrapper']);
       }
       else
       {
                 $this->ipsclass->skin['_wrapper'] = str_replace( "<% MEMBER BAR %>", $this->ipsclass->compiled_templates['skin_global']->member_bar_disabled(), $this->ipsclass->skin['_wrapper']);
             }

             //-----------------------------------------
               // Do we have a PM show?
               //-----------------------------------------

               if ( $this->ipsclass->member['show_popup'] AND ! $this->ipsclass->member['members_disable_pm'] )
               {
                       $this->ipsclass->DB->simple_construct( array( 'update' => 'members', 'set' => 'show_popup=0', 'where' => 'id='.$this->ipsclass->member['id'] ) );
                       $this->ipsclass->DB->simple_shutdown_exec();

                       if ( $this->ipsclass->input['act'] != 'Msg' )
                       {
                               $this->ipsclass->skin['_wrapper'] = str_replace( '<!--IBF.NEWPMBOX-->', $this->ipsclass->get_new_pm_notification(), $this->ipsclass->skin['_wrapper'] );
                       }
               }

             //-----------------------------------------
             // Get the macros and replace them
             //-----------------------------------------

             if ( is_array( $this->ipsclass->skin['_macros'] ) )
             {
                       foreach( $this->ipsclass->skin['_macros'] as $i => $row )
                       {
                               if ( $row['macro_value'] != "" )
                               {
                                       $this->ipsclass->skin['_wrapper'] = str_replace( "<{".$row['macro_value']."}>", $row['macro_replace'], $this->ipsclass->skin['_wrapper'] );
                               }
                       }
               }

               $this->ipsclass->skin['_wrapper'] = str_replace( "<#IMG_DIR#>", $this->ipsclass->skin['_imagedir'], $this->ipsclass->skin['_wrapper'] );
               $this->ipsclass->skin['_wrapper'] = str_replace( "<#EMO_DIR#>", $this->ipsclass->skin['_emodir']  , $this->ipsclass->skin['_wrapper'] );

               //-----------------------------------------
               // Images on another server? uncomment and alter below
               //-----------------------------------------

               if ( $this->ipsclass->vars['ipb_img_url'] )
               {
                       $this->ipsclass->skin['_wrapper'] = preg_replace( "#img\s+?src=[\"']style_(images|avatars|emoticons)(.+?)[\"'](.+?)?".">#is", "img src=\"".$this->ipsclass->vars['ipb_img_url']."style_\\1\\2\"\\3>", $this->ipsclass->skin['_wrapper'] );
               }

               $this->_finish();

       print $this->ipsclass->skin['_wrapper'];

       exit;
   }

   /*-------------------------------------------------------------------------*/
   //
   // print the headers
   //
   /*-------------------------------------------------------------------------*/

   function do_headers()
   {
           if ( $this->ipsclass->vars['print_headers'] )
           {
                   $this->ipsclass->vars['gb_char_set'] = $this->ipsclass->vars['gb_char_set'] ? $this->ipsclass->vars['gb_char_set'] : 'windows-1251';

                       header("HTTP/1.0 200 OK");
                       header("HTTP/1.1 200 OK");
                       header( "Content-type: text/html;charset={$this->ipsclass->vars['gb_char_set']}" );

                       if ( $this->ipsclass->vars['nocache'] )
                       {
                               header("Cache-Control: no-cache, must-revalidate, max-age=0");
                               //header("Expires:" . gmdate("D, d M Y H:i:s") . " GMT");
                               header("Expires: 0");
                               header("Pragma: no-cache");
                       }
       }
   }

   /*-------------------------------------------------------------------------*/
   //
   // print a pure redirect screen
   //
   /*-------------------------------------------------------------------------*/

   function redirect_screen($text="", $url="", $override=0)
   {
           //-----------------------------------------
           // Make sure global skin is loaded
           //-----------------------------------------

           if ( $this->ipsclass->compiled_templates['skin_global'] == "" )
               {
                       $this->ipsclass->load_template('skin_global');
               }

           if ($this->ipsclass->input['debug'])
       {
               flush();
               exit();
       }

       //-----------------------------------------
       // $ibforums not initialized yet?
       //-----------------------------------------

       if ( $override != 1 )
       {
                       if ( $this->ipsclass->base_url )
                       {
                               $url = $this->ipsclass->base_url.$url;
                       }
                       else
                       {
                               $url = "{$this->ipsclass->vars['board_url']}/index.{$this->ipsclass->vars['php_ext']}?".$url;
                       }
           }

           //-----------------------------------------
           // Feck off first?
           //-----------------------------------------

           if ( $this->ipsclass->vars['ipb_remove_redirect_pages'] == 1 )
           {
                   $this->ipsclass->boink_it( $url );
           }

           $this->ipsclass->lang['stand_by'] = stripslashes($this->ipsclass->lang['stand_by']);

           //-----------------------------------------
       // CSS
       //-----------------------------------------

       $css = $this->_get_css();

       //-----------------------------------------
       // Fix up URLs
       //-----------------------------------------

       //$url = preg_replace( "#&(?!amp;)#", "&" , $url );
       //$url = preg_replace( '/#(?!\d)/'  , '#', $url );

       //-----------------------------------------
       // Get template
       //-----------------------------------------

           $html = $this->ipsclass->compiled_templates['skin_global']->Redirect( ucfirst($text), $url, $css);

           //-----------------------------------------
           // Get and parse macros
           //-----------------------------------------

           $this->_unpack_macros();

               foreach( $this->ipsclass->skin['_macros'] as $i => $row )
             {
                       if ($row['macro_value'] != "")
                       {
                               $html = str_replace( "<{".$row['macro_value']."}>", $row['macro_replace'], $html );
                       }
               }

               $html = str_replace( "<% CHARSET %>" , $this->ipsclass->vars['gb_char_set'], $html );
               $html = str_replace( "<#IMG_DIR#>"   , $this->ipsclass->skin['_imagedir']  , $html );

               $this->_finish();

           echo ($html);
           exit;
   }

   /*-------------------------------------------------------------------------*/
   //
   // print a minimalist screen suitable for small pop up windows
   //
   /*-------------------------------------------------------------------------*/

   function pop_up_window($title = '', $text = "" )
   {
           $this->_check_debug();

           //-----------------------------------------
       // CSS
       //-----------------------------------------

       $css = $this->_get_css();

               //-----------------------------------------
       // Get template
       //-----------------------------------------

           $html = $this->ipsclass->compiled_templates['skin_global']->pop_up_window($title, $css, $text);

           //-----------------------------------------
           // Get and parse macros
           //-----------------------------------------

           $this->_unpack_macros();

               foreach( $this->ipsclass->skin['_macros'] as $i => $row )
             {
                       if ($row['macro_value'] != "")
                       {
                               $html = str_replace( "<{".$row['macro_value']."}>", $row['macro_replace'], $html );
                       }
               }

               $html = str_replace( "<% CHARSET %>" , $this->ipsclass->vars['gb_char_set'], $html );
               $html = str_replace( "<#IMG_DIR#>"   , $this->ipsclass->skin['_imagedir']  , $html );
               $html = str_replace( "<#EMO_DIR#>"   , $this->ipsclass->skin['_emodir']    , $html );

           //-----------------------------------------
               // Images on another server? uncomment and alter below
               //-----------------------------------------

               if ( $this->ipsclass->vars['ipb_img_url'] )
               {
                       $html = preg_replace( "#img\s+?src=[\"']style_(images|avatars|emoticons)(.+?)[\"'](.+?)?".">#is", "img src=\"".$this->ipsclass->vars['ipb_img_url']."style_\\1\\2\"\\3>", $html );
               }

           $this->_finish();

           echo ($html);
           exit;
   }

   /*-------------------------------------------------------------------------*/
       // Parse EXEC tags
       /*-------------------------------------------------------------------------*/

       /**
       * Parses exec tags in the wrapper
       * Nicked from IP.Dynamic.
       */
       function _parse_exec_tags()
       {
               preg_match_all( "#<\!--exec\.(file|url)=(?:[\"'])?(.+?)(?:[\"'])?-->#is", $this->ipsclass->skin['_wrapper'], $match );

               for ($i=0; $i < count($match[0]); $i++)
               {
                       $method = strtolower(trim( $match[1][$i] ));
                       $uri    = trim( $match[2][$i] );

                       //-----------------------------------------
                       // PARSE: URL
                       //-----------------------------------------

                       if ( $method == 'url' )
                       {
                               //-----------------------------------------
                               // Buffer...
                               //-----------------------------------------

                               @ob_start();
                               include( $uri );
                               $data = @ob_get_contents();
                               @ob_end_clean();
                       }
                       //-----------------------------------------
                       // PARSE: LOCAL FILE
                       //-----------------------------------------
                       else
                       {
                               if ( file_exists( $uri ) )
                               {
                                       //-----------------------------------------
                                       // Buffer...
                                       //-----------------------------------------

                                       @ob_start();
                                       include( $uri );
                                       $data = @ob_get_contents();
                                       @ob_end_clean();
                               }
                       }

                       $this->ipsclass->skin['_wrapper'] = str_replace( $match[0][$i], "<!--included content-->\n".$data."\n<!--/ included content-->", $this->ipsclass->skin['_wrapper'] );
                       unset( $data );
               }
       }


   /*-------------------------------------------------------------------------*/
   // Show Syndication Links
   /*-------------------------------------------------------------------------*/

   function _get_synd_link()
   {
           //-----------------------------------------
           // INIT
           //-----------------------------------------

           $content = "";

           //-----------------------------------------
           // Got any?
           //-----------------------------------------

           if ( ( ! is_array( $this->ipsclass->cache['rss_export'] ) OR ! count( $this->ipsclass->cache['rss_export'] ) ) AND ( ! is_array( $this->ipsclass->cache['rss_calendar'] ) OR ! count( $this->ipsclass->cache['rss_calendar'] ) ))
           {
                   return;
           }

           //-----------------------------------------
           // Build
           //-----------------------------------------

           if ( is_array( $this->ipsclass->cache['rss_export'] ) and count( $this->ipsclass->cache['rss_export'] ) )
           {
                       foreach( $this->ipsclass->cache['rss_export'] as $id => $data )
                       {
                               $content .= $this->ipsclass->compiled_templates['skin_global']->global_footer_synd_link( $data ) . "\n";
                       }
           }

           //-----------------------------------------
           // Build
           //-----------------------------------------

           if ( is_array( $this->ipsclass->cache['rss_calendar'] ) and count( $this->ipsclass->cache['rss_calendar'] ) )
           {
                       foreach( $this->ipsclass->cache['rss_calendar'] as $id => $data )
                       {
                               $data['title'] = $this->ipsclass->lang['rss_calendar'].' '.$data['title'];
                               $content      .= $this->ipsclass->compiled_templates['skin_global']->global_footer_synd_link( $data ) . "\n";
                       }
           }

           //-----------------------------------------
           // Clean up content
           //-----------------------------------------

           $content = preg_replace( "#,(\s+)?$#s", "", $content );

           //-----------------------------------------
           // Return
           //-----------------------------------------

           return $this->ipsclass->compiled_templates['skin_global']->global_footer_synd_wrapper( $content );
   }

   /*-------------------------------------------------------------------------*/
   // Show RSS export links
   /*-------------------------------------------------------------------------*/

   function _get_rss_export()
   {
           //-----------------------------------------
           // INIT
           //-----------------------------------------

           $content = "";

           //-----------------------------------------
           // Got any?
           //-----------------------------------------

           if ( ( ! is_array( $this->ipsclass->cache['rss_export'] ) OR ! count( $this->ipsclass->cache['rss_export'] ) ) AND ( ! is_array( $this->ipsclass->cache['rss_calendar'] ) OR ! count( $this->ipsclass->cache['rss_calendar'] ) ))
           {
                   return;
           }

           //-----------------------------------------
           // Build
           //-----------------------------------------

           if ( is_array( $this->ipsclass->cache['rss_export'] ) and count( $this->ipsclass->cache['rss_export'] ) )
           {
                       foreach( $this->ipsclass->cache['rss_export'] as $id => $data )
                       {
                               $content .= $this->ipsclass->compiled_templates['skin_global']->global_rss_link( $data ) . "\n";
                       }
           }

           //-----------------------------------------
           // Build
           //-----------------------------------------

           if ( is_array( $this->ipsclass->cache['rss_calendar'] ) and count( $this->ipsclass->cache['rss_calendar'] ) )
           {
                       foreach( $this->ipsclass->cache['rss_calendar'] as $id => $data )
                       {
                               $data['title'] = $this->ipsclass->lang['rss_calendar'].' '.$data['title'];
                               $content      .= $this->ipsclass->compiled_templates['skin_global']->global_rss_link( $data ) . "\n";
                       }
           }

           //-----------------------------------------
           // Return
           //-----------------------------------------

           return $content;
   }

   /*-------------------------------------------------------------------------*/
   // Show lo-fi link
   /*-------------------------------------------------------------------------*/

   function _get_lofi_link()
   {
           $link = "";
           $char = '/';

           if ( substr(PHP_OS, 0, 3) == 'WIN' OR strstr( php_sapi_name(), 'cgi') OR php_sapi_name() == 'apache2filter' )
               {
                       $char = '?';
               }

           if ( $this->ipsclass->input['act'] == 'st' )
           {
                   $link = $char.'t'.$this->ipsclass->input['t'].'.html';
           }
           else if ( $this->ipsclass->input['act'] == 'sf' )
           {
                   $link = $char.'f'.$this->ipsclass->input['f'].'.html';
           }

           return $link;
   }

   /*-------------------------------------------------------------------------*/
   // Build Languages List
   /*-------------------------------------------------------------------------*/

   function _build_language_list()
   {
           $lang_list = "";

           //-----------------------------------------
               // Roots
               //-----------------------------------------

               foreach( $this->ipsclass->cache['languages'] as $id => $data )
               {
                       if ( $this->ipsclass->member['language'] == $data['ldir'] )
                       {
                               $selected = ' selected="selected"';
                       }
                       else
                       {
                               $selected = "";
                       }

                       $lang_list .= "\n<option value='{$data['ldir']}'{$selected}>{$data['lname']}</option>";
               }

               return $lang_list;
   }

       /*-------------------------------------------------------------------------*/
   // Build Skin List
   /*-------------------------------------------------------------------------*/

   function _build_skin_list()
   {
           $skin_list = "";

           //-----------------------------------------
               // Roots
               //-----------------------------------------

               foreach( $this->ipsclass->cache['skin_id_cache'] as $id => $data )
               {
                       $skin_sets[ $data['set_parent'] ]['_children'][] = $id;

                       if ( $data['set_parent'] < 1 and $id > 1 )
                       {
                               if ( $data['set_hidden'] and ! $this->ipsclass->member['g_access_cp'] )
                               {
                                       continue;
                               }

                               $star = $data['set_hidden'] ? ' *' : '';

                               if ( $this->ipsclass->skin['_setid'] == $id )
                               {
                                       $selected = ' selected="selected"';
                               }
                               else
                               {
                                       $selected = "";
                               }

                               $skin_list .= "\n<option value='$id'{$selected}>{$data['set_name']}{$star}</option><!--CHILDREN:{$id}-->";
                       }
               }

               //-----------------------------------------
               // Kids...
               //-----------------------------------------

               foreach( $skin_sets as $id => $data )
               {
                       if ( is_array( $data['_children'] ) and count( $data['_children'] ) > 0 )
                       {
                               $html = "";

                               foreach( $data['_children'] as $cid )
                               {
                                       if ( $this->ipsclass->cache['skin_id_cache'][ $cid ]['set_hidden'] and ! $this->ipsclass->member['g_access_cp'] )
                                       {
                                               continue;
                                       }

                                       $star = $this->ipsclass->cache['skin_id_cache'][ $cid ]['set_hidden'] ? ' *' : '';

                                       if ( $this->ipsclass->skin['_setid'] == $cid )
                                       {
                                               $selected = ' selected="selected"';
                                       }
                                       else
                                       {
                                               $selected = "";
                                       }

                                       $html .= "\n<option value='$cid'{$selected}>---- {$this->ipsclass->cache['skin_id_cache'][ $cid ]['set_name']}{$star}</option>";
                               }

                               $skin_list = str_replace( "<!--CHILDREN:{$id}-->", $html, $skin_list );
                       }
               }
               return $skin_list;
   }

   /*-------------------------------------------------------------------------*/
   // unpack_macros
   /*-------------------------------------------------------------------------*/

   function _unpack_macros()
   {
           if ( ! is_array( $this->ipsclass->skin['_macros'] ) OR ! count( $this->ipsclass->skin['_macros'] ) )
           {
                   $this->ipsclass->skin['_macros'] = unserialize( stripslashes($this->ipsclass->skin['_macro']) );
           }

           if ( LEGACY_MODE )
           {
                   $this->macros =& $this->ipsclass->skin['_macros'];
           }
   }

   /*-------------------------------------------------------------------------*/
   // show_debug
   /*-------------------------------------------------------------------------*/

   function _show_debug()
   {
           $input   = "";
       $queries = "";
       $sload   = "";
       $stats   = "";

      //-----------------------------------------
      // Form & Get & Skin
      //-----------------------------------------

      if ($this->ipsclass->vars['debug_level'] >= 2)
      {
                      $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>FORM and GET Input</div><div class='row1' style='padding:6px'>\n";

                       while( list($k, $v) = each($this->ipsclass->input) )
                       {
                               if ( in_array( strtolower( $k ), array( 'pass', 'password' ) ) )
                               {
                                       $v = '*******';
                               }

                               $stats .= "<strong>$k</strong> = $v<br />\n";
                       }

                       $stats .= "</div>\n</div>";

                       $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>SKIN & TASK Info</div><div class='row1' style='padding:6px'>\n";

                       while( list($k, $v) = each($this->ipsclass->skin) )
                       {
                               if ( strlen($v) > 120 )
                               {
                                       $v = substr( $v, 0, 120 ). '...';
                               }
                               $stats .= "<strong>$k</strong> = ".$this->ipsclass->txt_htmlspecialchars($v)."<br />\n";
                       }

                       $stats .= "<b>Next task</b> = ".$this->ipsclass->get_date( $this->ipsclass->cache['systemvars']['task_next_run'], 'LONG' )."\n<br /><b>Time now</b> = ".$this->ipsclass->get_date( time(), 'LONG' );
                       $stats .= "<br /><b>Timestamp Now</b> = ".time();

                       $stats .= "</div>\n</div>";

                       $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>Loaded PHP Templates</div><div class='row1' style='padding:6px'>\n";

                       $stats .= "<strong>".implode(", ",array_keys($this->ipsclass->compiled_templates))."</strong><br />\n";
                       $stats .= "<strong>".implode(", ",array_keys($this->ipsclass->loaded_templates))."</strong><br />\n";

                       $stats .= "</div>\n</div>";

       }

       //-----------------------------------------
       // SQL
       //-----------------------------------------

       if ($this->ipsclass->vars['debug_level'] >= 3)
       {
                  $stats .= "<br />\n<div class='tableborder' style='overflow:auto'>\n<div class='subtitle'>Queries Used</div><div class='row1' style='padding:6px'>";

               foreach($this->ipsclass->DB->obj['cached_queries'] as $q)
               {
                       $q = htmlspecialchars($q);
                       $q = preg_replace( "/^SELECT/i" , "<span class='red'>SELECT</span>"   , $q );
                       $q = preg_replace( "/^UPDATE/i" , "<span class='blue'>UPDATE</span>"  , $q );
                       $q = preg_replace( "/^DELETE/i" , "<span class='orange'>DELETE</span>", $q );
                       $q = preg_replace( "/^INSERT/i" , "<span class='green'>INSERT</span>" , $q );
                       $q = str_replace( "LEFT JOIN"   , "<span class='red'>LEFT JOIN</span>" , $q );

                       $q = preg_replace( "/(".$this->ipsclass->vars['sql_tbl_prefix'].")(\S+?)([\s\.,]|$)/", "<span class='purple'>\\1\\2</span>\\3", $q );

                       $stats .= "$q<hr />\n";
               }

               if ( count( $this->ipsclass->DB->obj['shutdown_queries'] ) )
               {
                               foreach($this->ipsclass->DB->obj['shutdown_queries'] as $q)
                               {
                                       $q = htmlspecialchars($q);
                                       $q = preg_replace( "/^SELECT/i" , "<span class='red'>SELECT</span>"   , $q );
                                       $q = preg_replace( "/^UPDATE/i" , "<span class='blue'>UPDATE</span>"  , $q );
                                       $q = preg_replace( "/^DELETE/i" , "<span class='orange'>DELETE</span>", $q );
                                       $q = preg_replace( "/^INSERT/i" , "<span class='green'>INSERT</span>" , $q );
                                       $q = str_replace( "LEFT JOIN"   , "<span class='red'>LEFT JOIN</span>" , $q );

                                       $q = preg_replace( "/(".$this->ipsclass->vars['sql_tbl_prefix'].")(\S+?)([\s\.,]|$)/", "<span class='purple'>\\1\\2</span>\\3", $q );

                                       $stats .= "<div style='background:#DEDEDE'><b>SHUTDOWN:</b> $q</div><hr />\n";
                               }
               }

               $stats .= "</div>\n</div>";
       }

       if ( $stats )
       {
                       $collapsed_ids = ','.$this->ipsclass->my_getcookie('collapseprefs').',';

                       $show['div_fo'] = 'show';
                       $show['div_fc'] = 'none';

                       if ( strstr( $collapsed_ids, ',debug,' ) )
                       {
                               $show['div_fo'] = 'none';
                               $show['div_fc'] = 'show';
                       }

                       $stats = "<div align='center' style='display:{$show['div_fc']}' id='fc_debug'>
                                          <div class='row2' style='padding:8px;vertical-align:middle'><a href='java script:togglecategory(\"debug\", 0);'>Show Debug Information</a></div>
                                         </div>

                                         <div align='center' style='display:{$show['div_fo']}' id='fo_debug'>
                                          <div class='row2' style='padding:8px;vertical-align:middle'><a href='java script:togglecategory(\"debug\", 1);'>Hide Debug Information</a></div>
                                          <br />
                                          <div class='tableborder' align='left'>
                                               <div class='maintitle'>Debug Information</div>
                                                <div style='padding:5px;background:#8394B2;'>$stats</div>
                                          </div>
                                         </div>";
       }

       return $stats;
   }

   /*-------------------------------------------------------------------------*/
   // check_debug
   /*-------------------------------------------------------------------------*/

   function _check_debug()
   {
           if ($this->ipsclass->DB->obj['debug'])
       {
               flush();
               print "<html><head><title>SQL Debugger</title><body bgcolor='white'><style type='text/css'> TABLE, TD, TR, BODY { font-family: verdana,arial, sans-serif;color:black;font-size:11px }</style>";
               print "<h1 align='center'>SQL Total Time: {$this->ipsclass->DB->sql_time} for {$query_cnt} queries</h1><br />".$this->ipsclass->DB->debug_html;
               print "<br /><div align='center'><strong>Total SQL Time: {$this->ipsclass->DB->sql_time}</div></body></html>";
               exit();
       }
   }

   /*-------------------------------------------------------------------------*/
   // check_ips_report
   /*-------------------------------------------------------------------------*/

   function _check_ips_report()
   {
           //-----------------------------------------
               // Note, this is designed to allow IPS validate boards
               // who've purchased copyright removal / registration.
               // The order number is the only thing shown and the
               // order number is unique to the person who paid and
               // is no good to anyone else.
               // Showing the order number poses no risk at all -
               // the information is useless to anyone outside of IPS.
               //-----------------------------------------

               $pass                     = 0;
               $key                      = trim( $_REQUEST['key'] );
               $cust_number     = 0;
               $acc_number           = 0;
               $cust_number_tmp = '0,0';

               if ( $this->ipsclass->input['ipsreport'] or $this->ipsclass->input['ipscheck'] )
               {
                       if ( $this->ipsclass->vars['ipb_copy_number'] )
                       {
                               $cust_number_tmp = preg_replace( "/^(\d+?)-(\d+?)-(\d+?)-(\S+?)$/", "\\2,\\3", $this->ipsclass->vars['ipb_copy_number'] );
                       }
                       else if ( $this->ipsclass->vars['ipb_reg_number'] )
                       {
                               $cust_number_tmp = preg_replace( "/^(\d+?)-(\d+?)-(\d+?)-(\d+?)-(\S+?)$/", "\\2,\\4", $this->ipsclass->vars['ipb_reg_number'] );
                       }

                       if ( md5($key) == '23f2554a507f6d52b8f27934d3d2a88d' )
                       {
                               $latest_version = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'upgrade_history', 'order' => 'upgrade_version_id DESC', 'limit' => array(0, 1) ) );

                                  if ( $this->ipsclass->version == 'v2.1.6' )
                               {
                                       $this->ipsclass->version = 'v'.$latest_version['upgrade_version_human'];
                               }

                               if ( $this->ipsclass->acpversion == '21012.60504.u' )

                               {
                                       $this->ipsclass->acpversion = $latest_version['upgrade_version_id'];
                               }

                               list( $cust_number, $acc_number ) = explode( ',', $cust_number_tmp );

                               @header( "Content-type: text/xml" );
                               $out  = '<?xml version="1.0" encoding="WINDOWS-1251"?'.'>';
                               $out .= "\n<ipscheck>\n\t<result>1</result>\n\t<customer_id>$cust_number</customer_id>\n\t<account_id>$acc_number</account_id>\n\t"
                                        .  "<version_id>{$this->ipsclass->acpversion}</version_id>\n\t<version_string>{$this->ipsclass->version}</version_string>\n\t<release_hash><![CDATA[<{%dyn.down.var.md5%}]]>></release_hash>"
                                        .  "\n</ipscheck>";
                               print $out;
                               exit();
                       }
                       else
                       {
                               @header( "Content-type: text/plain" );
                               print "<result>0</result>\nВы не имеете доступа к этой странице.";
                               exit();
                       }
       }
   }

   //*-------------------------------------------------------------------------*/
   // get_css
   /*-------------------------------------------------------------------------*/

   function _get_css()
   {
           if ( $this->ipsclass->skin['_usecsscache'] and @file_exists( CACHE_PATH.'style_images/css_'. $this->ipsclass->skin['_csscacheid'] .'.css' ) )
       {
               $css = $this->ipsclass->compiled_templates['skin_global']->css_external($this->ipsclass->skin['_csscacheid']);
       }
       else
       {
               $css = $this->ipsclass->compiled_templates['skin_global']->css_inline( str_replace( "<#IMG_DIR#>", $this->ipsclass->skin['_imagedir'], $this->ipsclass->skin['_css'] ) );
       }

       if ( defined('LEGACY_MODE') && LEGACY_MODE == 1 )
       {
               $css .= '<style type="text/css" media="all">table { width:100%; }'."\n".'tr, td { padding:4px }</style>';
       }

       return $css;
   }

   /*-------------------------------------------------------------------------*/
   // finish
   /*-------------------------------------------------------------------------*/

   function _finish()
   {
           //-----------------------------------------
               // Do shutdown
               //-----------------------------------------

               if ( ! USE_SHUTDOWN )
       {
               $this->ipsclass->my_deconstructor();
               $this->ipsclass->DB->close_db();
       }

               //-----------------------------------------
               // Start GZIP compression
       //-----------------------------------------

       if ($this->ipsclass->vars['disable_gzip'] != 1 )
       {
               $buffer = ob_get_contents();
               ob_end_clean();
               @ob_start('ob_gzhandler');
               print $buffer;
       }

       //-----------------------------------------
       // Print, plop and part
       //-----------------------------------------

       $this->do_headers();
   }

} // END class


?>

Ссылка на комментарий
Поделиться на других сайтах

  • 0
А можете указать где эта строчка которая у меня такая неправильная

она в файле class_display.php

найти рабочий дистрибутив и взять оттуда файл

Ссылка на комментарий
Поделиться на других сайтах

  • 0
Найти другой нуль.
Ссылка на комментарий
Поделиться на других сайтах

  • 0

Фишка в том что у меня была целая куча модов установлена штук 10 так точно есть... У меня другой файл был битый когда я его поправилэтот файл сорвался. Его РНР код выложил.

 

Мне просто нужно чтобы вы выложили 76 строчку ибо я так полагаю что некоторые комментарии могут сбить меня с толку (комментарии // в коде).

Ссылка на комментарий
Поделиться на других сайтах

Присоединиться к обсуждению

Вы можете ответить сейчас, а зарегистрироваться позже. Если у вас уже есть аккаунт, войдите, чтобы ответить от своего имени.

Гость
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Ответить на вопрос...

×   Вы вставили отформатированный текст.   Удалить форматирование

  Допустимо не более 75 смайлов.

×   Ваша ссылка была автоматически заменена на медиа-контент.   Отображать как ссылку

×   Ваши публикации восстановлены.   Очистить редактор

×   Вы не можете вставить изображения напрямую. Загрузите или вставьте изображения по ссылке.

Зарузка...
×
×
  • Создать...

Важная информация

Находясь на нашем сайте, вы соглашаетесь на использование файлов cookie, а также с нашим положением о конфиденциальности Политика конфиденциальности и пользовательским соглашением Условия использования.