<?php
/*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*\
<< ******************************************************************** >>
<< * ---------------------------------------------------------------- * >>
<< * Copyright ©2011-2012 Ozzy47                                      * >>
<< * All Rights Reserved. 											  * >>
<< * This file may not be redistributed in whole or significant part. * >>
<< * ---------------------------------------------------------------- * >>
<< * You are not allowed to use this on your server unless the files  * >>
<< * you downloaded were done so with permission.					  * >>
<< * ---------------------------------------------------------------- * >>
<< ******************************************************************** >>
\*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/			

if (THIS_SCRIPT == 'private' OR THIS_SCRIPT == 'usercp' AND $vbulletin->options['dbtech_vbsuper_pm_system_enabled'])
{
	if (version_compare($vbulletin->versionnumber, '4.1.11', '>='))
	{
		require_once('./global.php');
	}
	else
	{
		$this->called['style'] = true;
	
		global $style, $vbulletin;
		//$style = $this->fetch_style_record($this->force_styleid);
		define('STYLEID', $style['styleid']);
		define('STYLE_TYPE', $style['type']);
		define('IS_MOBILE_STYLE', isset($vbulletin->stylecache['mobile'][$style['styleid']]) ? 1 : 0);
		$vbulletin->stylevars = unserialize($style['newstylevars']);
		fetch_stylevars($style, $vbulletin->userinfo);
	}	
	if (!IS_MOBILE_STYLE)
	{
		//Private message preview type
		if (THIS_SCRIPT == 'private' OR THIS_SCRIPT == 'usercp')
		{		
			if ($vbulletin->options['dbtech_vbsuper_pm_view_pm_active'] OR $vbulletin->options['dbtech_vbsuper_pm_avatar_active'])
			{
				//Switch template to mouse over title
				if ($vbulletin->options['dbtech_vbsuper_pm_view_pm_view'] == 1)
		     	{
		        	if ($this->template == 'pm_messagelistbit')
					{
						$this->template = 'dbtech_vbsuper_pm_view_mouseover';
					}
		     	}
		     	else
		     	{
		     		//Switch template to threaded view
		        	$userbit = str_replace ("</li>", "", $userbit); // Fix username code
		        	$userbit = str_replace ("<li>", "", $userbit);
		        	$userbit = str_replace ("</a>", "</a>:", $userbit);
		        	if ($this->template == 'pm_messagelistbit')
					{
						$this->template = 'dbtech_vbsuper_pm_view_threaded';
					};
		     	}
			}
		}
	
		//Move download options or move folder controls from bottom of page
		if (THIS_SCRIPT == 'private' AND $vbulletin->options['dbtech_vbsuper_pm_system_enabled'] AND $vbulletin->options['dbtech_vbsuper_pm_move_download'] OR $vbulletin->options['dbtech_vbsuper_pm_move_folder_controls'])
		{	
			if ($this->template == 'pm_messagelist')
				{
					$this->template = 'dbtech_vbsuper_pm_messagelist';
				}
		}
	}
}
	
/*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*\
<< ********************************************************************* >>
<< * Created: 09:30, Fri June 8th 2012                                 * >>
<< * VER: 1.0.0                                                        * >>
<< ********************************************************************* >>
\*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/	
?>