57 'page::page_markup::page_markup_utilities' ,
'last' , __FILE__
59 $this->Security =
get_package(
'security' ,
'last' , __FILE__ );
93 if( $Settings->get_setting(
'need_run' , 1 ) == 1 )
95 $this->PageMarkupUtilities->direct_controller( $Settings );
100 catch( Exception $e )
132 $this->Security->reset_s(
'direct_view' ,
true );
134 $Settings->set_undefined(
'view' , 1 );
137 if( $Settings->get_setting(
'need_run' , 1 ) == 1 )
139 $Code = $this->PageMarkupUtilities->direct_view( $Settings );
142 $this->Security->reset_s(
'direct_view' ,
false );
146 catch( Exception $e )
178 $NeedRedirect = intval( $Settings->get_setting(
'need_redirect' , 1 ) );
182 header(
'Location: '.$Settings->get_setting(
'page' ) );
188 catch( Exception $e )
224 return( $this->Security->get( $Data ,
'string' ) );
226 catch( Exception $e )
266 foreach( $Names as $i => $Name )
268 if( strpos( $Str ,
'{'.$Name.
'}' ) !==
false )
270 $Code =
"{settings:package_name=page::page_composer;name=$Name;config_file_name=cf_site}";
272 $Str = str_replace(
'{'.$Name.
'}' , $Code , $Str );
277 return( array( $Str , $Changed ) );
279 catch( Exception $e )
319 if( $this->Security->get_gp(
'page_name' ,
'command' ) !=
'index' )
321 return( array( $Str , $Changed ) );
324 foreach( $Names as $i => $Name )
326 if( strpos( $Str ,
'{'.$Name.
'}' ) !== false )
328 $Code =
'<h1>{settings:package_name=page::page_composer;name='.$Name.
329 ';config_file_name=cf_site}</h1>';
331 $Str = str_replace(
'{'.$Name.
'}' , $Code , $Str );
336 return( array( $Str , $Changed ) );
338 catch( Exception $e )
374 $Pages = explode(
',' , $Settings->get_setting(
'pages' ) );
376 $PageName = $this->Security->get_gp(
'page_name' ,
'command' );
378 if(
in_array( $PageName , $Pages ) )
385 catch( Exception $e )
421 $Pages = explode(
',' , $Settings->get_setting(
'pages' ) );
423 $PageName = $this->Security->get_gp(
'page_name' ,
'command' );
425 if( !
in_array( $PageName , $Pages ) )
432 catch( Exception $e )
460 private function run_meta_settings( &$MetaSettings , $Str )
464 $Settings = $MetaSettings->get_all_settings();
466 if( $MetaSettings->get_setting(
'controller' ,
'0' ) !=
'0' )
468 $Code =
"{direct_controller:$Settings}";
470 elseif( $MetaSettings->get_setting(
'view' ,
'0' ) !=
'0' )
472 $Code =
"{direct_view:$Settings}";
474 elseif( $MetaSettings->get_setting(
'post_process' ,
'0' ) !=
'0' )
476 $AutoMarkup =
get_package(
'page::auto_markup' ,
'last' , __FILE__ );
477 $Str = $AutoMarkup->compile_string( $Str );
479 $Str = str_replace(
"{meta:$Parameters}" , $Code , $Str );
482 catch( Exception $e )
510 private function load_meta_settings( &$MacroSettings , &$MetaSettings )
514 $PackageName = $MacroSettings->get_setting(
'package_name' );
515 $PackageVersion = $MacroSettings->get_setting(
'package_version' ,
'last' );
518 $MeatFile .=
'/meta/'.$MacroSettings->get_setting(
'name' );
520 $MetaSettings->load_file( $MetaFile );
522 $MetaSettings->set_setting(
'package_name' , $PackageName );
523 $MetaSettings->set_setting(
'package_version' , $PackageVersion );
525 catch( Exception $e )
558 $this->load_meta_settings( $Settings , $MetaSettings );
560 $Str = $this->run_meta_settings( $MetaSettings , $Str );
562 catch( Exception $e )