ultimix
browser_markup.php
Go to the documentation of this file.
1 <?php
2 
3  /*
4  * This source code is a part of the Ultimix Project.
5  * It is distributed under BSD license. All other third side source code (like tinyMCE) is distributed under
6  * it's own license wich could be found from the corresponding files or sources.
7  * This source code is provided "as is" without any warranties or garanties.
8  *
9  * Have a nice day!
10  *
11  * @url http://ultimix.sorceforge.net
12  *
13  * @author Alexey "gdever" Dodonov
14  */
15 
27  {
28 
39  var $Utilities = false;
40 
51  function __construct()
52  {
53  try
54  {
55  $this->Utilities = get_package( 'utilities' , 'last' , __FILE__ );
56  }
57  catch( Exception $e )
58  {
59  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
60  }
61  }
62 
85  function compile_browser( &$Settings )
86  {
87  try
88  {
89  return( $this->Utilities->detect_browser() );
90  }
91  catch( Exception $e )
92  {
93  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
94  }
95  }
96 
123  function compile_browsers( &$Settings , $Data )
124  {
125  try
126  {
127  $Browsers = explode( ',' , $Settings->get_setting( 'browsers' ) );
128 
129  $BrowserName = $this->Utilities->detect_browser();
130 
131  $Flag = $Name == 'for_browsers' ?
132  in_array( $BrowserName , $Browsers ) : !in_array( $BrowserName , $Browsers );
133 
134  return( $Flag ? $Data : '' );
135  }
136  catch( Exception $e )
137  {
138  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
139  }
140  }
141  }
142 
143 ?>