ultimix
page_db_access.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 
38  var $AddLimitations = '1 = 1';
39 
58  function set_add_limitations( $theAddLimitation )
59  {
60  try
61  {
62  if( $this->AddLimitations === '1 = 1' )
63  {
64  $this->AddLimitations = $theAddLimitation;
65  }
66  else
67  {
68  throw( new Exception( '"AddLimitations" was already set' ) );
69  }
70  }
71  catch( Exception $e )
72  {
73  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
74  }
75  }
76 
102  private function fetch_package_appliance( $PageName )
103  {
104  try
105  {
106  $RowPage = $this->CachedMultyFS->file_get_contents(
107  dirname( __FILE__ ).'/../page_access/data/pa_'.$PageName
108  );
109 
110  $Appliance = array();
111 
112  foreach( $RowPage as $rp )
113  {
114  $Appliance [] = array(
115  'package' => $rp[ 0 ] , 'package_version' => $rp[ 1 ] ,
116  'options' => $rp[ 2 ] , 'placeholder' => $rp[ 3 ]
117  );
118  }
119 
120  return( $Appliance );
121  }
122  catch( Exception $e )
123  {
124  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
125  }
126  }
127 
153  function get_package_appliance( $PageName )
154  {
155  try
156  {
157  $Security = & get_package( 'security' );
158  $PageName = $Security->get( $PageName , string );
159 
160  $PageName = htmlspecialchars( $PageName , ENT_QUOTES );
161 
162  if( file_exists( dirname( __FILE__ ).'/../page_access/data/pa_'.$PageName ) )
163  {
164  return( $this->fetch_package_appliance( $PageName ) );
165  }
166 
167  return( array() );
168  }
169  catch( Exception $e )
170  {
171  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
172  }
173  }
174 
193  function get_page_list()
194  {
195  try
196  {
197  $Utilities = get_package( 'utilities' , 'last' , __FILE__ );
198  return( $Utilities->get_files_from_directory( dirname( __FILE__ ).'/data' , '/pa_.+/' ) );
199  }
200  catch( Exception $e )
201  {
202  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
203  }
204  }
205 
239  function get_page_description( $PageName )
240  {
241  try
242  {
243  }
244  catch( Exception $e )
245  {
246  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
247  }
248  }
249  }
250 
251 ?>