50 $this->CachedMultyFS =
get_package(
'cached_multy_fs' ,
'last' , __FILE__ );
53 $this->Security =
get_package(
'security' ,
'last' , __FILE__ );
96 $Fields[ $Paging->PageField ] = $Paging->Page - 1;
97 $Fields = $Paging->Utilities->pack_into_url( $Fields , array(
'page_name' ) );
98 $Fields = str_replace(
'=' ,
'[eq]' , $Fields );
100 $Code =
'{href:form_id='.$Paging->FormId.
101 ";tpl=submit0;text=left_side_switcher;action=./[page_name].html?$Fields}";
103 return( str_replace(
'{left_slide}' , $Code , $Control ) );
105 catch( Exception $e )
139 if( $this->Security->get_gp(
'reorder_field' ) )
141 $Field = $this->Security->get_gp(
'reorder_field' ,
'command' );
143 $this->Security->get_gp(
'order' ,
'command' ) ===
'ascending' ?
'ascending' :
'descending';
144 $ReorderField =
" , 'reorder_field' : '$Field' , 'order' : '$Order'";
147 return( $ReorderField );
149 catch( Exception $e )
181 if( $Paging->Page > 1 )
187 return( str_replace(
'{left_slide}' ,
'{lang:left_side_switcher}' , $Control ) );
190 catch( Exception $e )
226 $Limit =
$Settings->get_setting(
'limit' , 1000 );
228 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ,
229 20 , 30 , 40 , 50 , 100 , 200 , 300 , 400 , 500 , 1000
232 foreach( $Values as $k => $v )
236 $Options .= $this->CachedMultyFS->get_template(
237 __FILE__ ,
'records_per_page_options.tpl'
239 $Options = str_replace(
240 array(
'{value}' ,
'{title}' ,
'{selected}' ) ,
241 array( $v , $v , ( $Paging->RecordsPerPage == $v ?
' selected' :
'' ) ) ,
248 catch( Exception $e )
276 private function get_fields( &$Paging )
281 $Fields[ $Paging->PageField ] = 1;
282 $Fields = $Paging->Utilities->pack_into_url( $Fields , array(
'page_name' ) );
284 return( str_replace(
'=' ,
'[eq]' , $Fields ) );
286 catch( Exception $e )
322 $Fields = $this->get_fields( $Paging );
324 $Code = $this->CachedMultyFS->get_template( __FILE__ ,
'records_per_page_control.tpl' );
326 $Macro = array(
'{reorder_field}' ,
'{prefix}' ,
'{fields}' ,
'{form_id}' ,
'{options}' );
328 $this->Security->get_gp(
'reorder_field' ,
'command' ,
'' ) , $Paging->Prefix , $Fields ,
331 $Code = str_replace( $Macro , $Data , $Code );
335 catch( Exception $e )
367 $Control = str_replace(
368 '{records_per_page_control}' ,
'{records_per_page_control:type=default}' , $Control
371 for( ; $Parameters = $Paging->String->get_macro_parameters( $Control ,
'records_per_page_control' ) ; )
373 $this->Settings->load_settings( $Parameters );
377 $Control = str_replace(
"{records_per_page_control:$Parameters}" , $Code , $Control );
382 catch( Exception $e )
423 $Fields[ $Paging->PageField ] = $Paging->Page + 1;
424 $Fields = $Paging->Utilities->pack_into_url( $Fields , array(
'page_name' ) );
425 $Fields = str_replace(
'=' ,
'[eq]' , $Fields );
430 '{href:form_id='.$Paging->FormId.
";tpl=submit0;text=right_side_switcher;action=./".
431 "[page_name].html?$Fields}" , $Control
435 catch( Exception $e )
475 if( $CountOfRecords === $Paging->RecordsPerPage + 1 )
481 return( str_replace(
'{right_slide}' ,
'{lang:right_side_switcher}' , $Control ) );
484 catch( Exception $e )
520 $ReorderField = $this->Security->get_gp(
'reorder_field' ,
'command' ,
false );
522 if( $ReorderField && $this->Settings->get_setting(
'dbfield' ) === $ReorderField )
524 $Order = ( $this->Security->get_gp(
'order' ,
'command' ) ===
'ascending' ?
525 'ascending' :
'descending' );
526 $HiddenFields = str_replace(
'{order}' , $Order , $HiddenFields );
527 $HiddenFields = str_replace(
528 '{field}' , $this->Settings->get_setting(
'dbfield' ) , $HiddenFields
532 return( $HiddenFields );
534 catch( Exception $e )
570 for( ; $Parameters = $Paging->String->get_macro_parameters( $Paging->Header ,
'sort_link' ) ; )
572 $this->Settings->load_settings( $Parameters );
576 $Paging->Header = str_replace(
"{sort_link:$Parameters}" ,
"{href:style=display:block;text=".
577 $this->Settings->get_setting(
'text' ).
";page=javascript:ultimix.Reorder( '#".$Paging->FormId.
578 "' , ".( $Paging->Ajaxed ?
'true' :
'false' ).
" , './[page_name].html' , '".
579 $this->Settings->get_setting(
'dbfield' ).
"' )}" , $Paging->Header
583 return( $HiddenFields );
585 catch( Exception $e )