ultimix
review_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 
27 
38  var $Security = false;
39  var $UserAlgorithms = false;
40 
51  var $Output;
52 
67  function __construct()
68  {
69  try
70  {
71  $this->Security = get_package( 'security' , 'last' , __FILE__ );
72  $this->UserAlgorithms = get_package( 'user::user_algorithms' , 'last' , __FILE__ );
73  }
74  catch( Exception $e )
75  {
76  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
77  }
78  }
79 
98  function pre_generation( $Options )
99  {
100  try
101  {
102  $PageJS = get_package( 'page::page_js' , 'last' , __FILE__ );
103  $PackagePath = _get_package_relative_path_ex( 'review::review_view' , '1.0.0::1.0.0' );
104  $PageJS->add_javascript( "{http_host}/$PackagePath/include/js/review_view.js" );
105 
106  $Lang = get_package( 'lang' , 'last' , __FILE__ );
107  $Lang->include_strings_js( 'review::review_view' );
108  }
109  catch( Exception $e )
110  {
111  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
112  }
113  }
114 
133  function public_review_list( $Options )
134  {
135  try
136  {
137  $MasterId = $this->Security->get_gp( 'master_id' , 'integer' , $this->UserAlgorithms->get_id() );
138  $MasterType = $Options->get_setting( 'master_type' , 'command' , 'user' );
139 
140  $this->Output = '';
141  $this->Output .= "{review_line:master_id=$MasterId;master_type=$MasterType}";
142  $this->Output .= "{permit:registered}{review_form:master_id=$MasterId;".
143  "master_type=$MasterType}{~permit}";
144  }
145  catch( Exception $e )
146  {
147  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
148  }
149  }
150 
173  function view( $Options )
174  {
175  try
176  {
177  $ContextSet = get_package( 'gui::context_set' , 'last' , __FILE__ );
178 
179  $ContextSet->add_context( dirname( __FILE__ ).'/conf/cfcx_public_review_list' );
180 
181  $ContextSet->execute( $Options , $this , __FILE__ );
182 
183  return( $this->Output );
184  }
185  catch( Exception $e )
186  {
187  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
188  }
189  }
190  }
191 
192 ?>