ultimix

- Main Page
- Data Structures
- Files
- Examples

- File List
- Globals

page_manager_view.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
26 class page_manager_view_1_0_0{
27
38 var $Output;
39
50 var $CachedMultyFS = false;
51 var $Security = false;
52 var $String = false;
53
64 function __construct()
65 {
66 try
67 {
68 $this->CachedMultyFS = get_package( 'cached_multy_fs' , 'last' , __FILE__ );
69 $this->Security = get_package( 'security' , 'last' , __FILE__ );
70 $this->String = get_package( 'string' , 'last' , __FILE__ );
71 }
72 catch( Exception $e )
73 {
74 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
75 }
76 }
77
96 function update_permitions_form( $Options )
97 {
98 try
99 {
100 $this->Output = $this->CachedMultyFS->get_template( __FILE__ , 'permitions_form.tpl' );
101
102 $PermitAccess = get_package( 'permit::permit_access' , 'last' , __FILE__ );
103 $PageAlias = $this->Security->get_p( 'page_record_id' , 'command' );
104 $Permitions = $PermitAccess->get_permits_for_page( $PageAlias );
105 $Permitions = implode( ',' , $Permitions );
106
107 $this->Output = str_replace( '{prefix}' , 'page' , $this->Output );
108 $this->Output = str_replace( '{page_permitions}' , $Permitions , $this->Output );
109 $this->Output = str_replace( '{page_alias}' , $PageAlias , $this->Output );
110 }
111 catch( Exception $e )
112 {
113 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
114 }
115 }
116
139 function view( $Options )
140 {
141 try
142 {
143 $ContextSet = get_package( 'gui::context_set' , 'last' , __FILE__ );
144
145 $ContextSet->add_context( dirname( __FILE__ ).'/conf/cfcxs_packages_form' );
146
147 $ContextSet->add_context( dirname( __FILE__ ).'/conf/cfcxs_permitions_form' );
148
149 $ContextSet->execute( $Options , $this , __FILE__ );
150
151 return( $this->Output );
152 }
153 catch( Exception $e )
154 {
155 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
156 }
157 }
158 }
159
160 ?>