@@ -174,6 +174,58 @@ function onShow() {
174174 $ _SESSION ["s " ]["form " ]["return_to " ] = $ list_name ;
175175 //die(print_r($_SESSION["s"]["list"][$list_name]));
176176
177+ // defaults
178+ $ listTpl ->setVar ('app_title ' , $ app ->_conf ['app_title ' ]);
179+ if (isset ($ _SESSION ['s ' ]['user ' ])) {
180+ $ listTpl ->setVar ('app_version ' , $ app ->_conf ['app_version ' ]);
181+ // get pending datalog changes
182+ $ datalog = $ app ->db ->datalogStatus ();
183+ $ listTpl ->setVar ('datalog_changes_txt ' , $ app ->lng ('datalog_changes_txt ' ));
184+ $ listTpl ->setVar ('datalog_changes_end_txt ' , $ app ->lng ('datalog_changes_end_txt ' ));
185+ $ listTpl ->setVar ('datalog_changes_count ' , $ datalog ['count ' ]);
186+ $ listTpl ->setLoop ('datalog_changes ' , $ datalog ['entries ' ]);
187+ } else {
188+ $ listTpl ->setVar ('app_version ' , '' );
189+ }
190+ $ listTpl ->setVar ('app_link ' , $ app ->_conf ['app_link ' ]);
191+
192+ $ listTpl ->setVar ('app_logo ' , $ app ->_conf ['logo ' ]);
193+
194+ $ listTpl ->setVar ('phpsessid ' , session_id ());
195+
196+ $ listTpl ->setVar ('theme ' , $ _SESSION ['s ' ]['theme ' ]);
197+ $ listTpl ->setVar ('html_content_encoding ' , $ app ->_conf ['html_content_encoding ' ]);
198+
199+ $ listTpl ->setVar ('delete_confirmation ' , $ app ->lng ('delete_confirmation ' ));
200+ //print_r($_SESSION);
201+ if (isset ($ _SESSION ['s ' ]['module ' ]['name ' ])) {
202+ $ listTpl ->setVar ('app_module ' , $ _SESSION ['s ' ]['module ' ]['name ' ]);
203+ }
204+ if (isset ($ _SESSION ['s ' ]['user ' ]) && $ _SESSION ['s ' ]['user ' ]['typ ' ] == 'admin ' ) {
205+ $ listTpl ->setVar ('is_admin ' , 1 );
206+ }
207+ if (isset ($ _SESSION ['s ' ]['user ' ]) && $ app ->auth ->has_clients ($ _SESSION ['s ' ]['user ' ]['userid ' ])) {
208+ $ listTpl ->setVar ('is_reseller ' , 1 );
209+ }
210+ /* Show username */
211+ if (isset ($ _SESSION ['s ' ]['user ' ])) {
212+ $ listTpl ->setVar ('cpuser ' , $ _SESSION ['s ' ]['user ' ]['username ' ]);
213+ $ listTpl ->setVar ('logout_txt ' , $ app ->lng ('logout_txt ' ));
214+ /* Show search field only for normal users, not mail users */
215+ if (stristr ($ _SESSION ['s ' ]['user ' ]['username ' ], '@ ' )){
216+ $ listTpl ->setVar ('usertype ' , 'mailuser ' );
217+ } else {
218+ $ listTpl ->setVar ('usertype ' , 'normaluser ' );
219+ }
220+ }
221+
222+ /* Global Search */
223+ $ listTpl ->setVar ('globalsearch_resultslimit_of_txt ' , $ app ->lng ('globalsearch_resultslimit_of_txt ' ));
224+ $ listTpl ->setVar ('globalsearch_resultslimit_results_txt ' , $ app ->lng ('globalsearch_resultslimit_results_txt ' ));
225+ $ listTpl ->setVar ('globalsearch_noresults_text_txt ' , $ app ->lng ('globalsearch_noresults_text_txt ' ));
226+ $ listTpl ->setVar ('globalsearch_noresults_limit_txt ' , $ app ->lng ('globalsearch_noresults_limit_txt ' ));
227+ $ listTpl ->setVar ('globalsearch_searchfield_watermark_txt ' , $ app ->lng ('globalsearch_searchfield_watermark_txt ' ));
228+
177229 return $ listTpl ->grab ();
178230
179231 }
0 commit comments