source: contrib/davical/htdocs/admin.php @ 3733

Revision 3733, 1.4 KB checked in by gabriel.malheiros, 13 years ago (diff)

Ticket #1541 - <Davical customizado para o Expresso.Utiliza Caldav e CardDav?>

Line 
1<?php
2require_once('./always.php');
3require_once('classEditor.php');
4require_once('classBrowser.php');
5include("DAViCalSession.php");
6$session->LoginRequired();
7
8require_once('AwlQuery.php');
9
10param_to_global('action', '{(edit|browse)}', 'action');
11param_to_global('component', '{[a-z0-9-_]+}', 't');
12param_to_global('id', '{[a-z0-9-_]+}', 'id');
13
14$c->stylesheets[] = 'css/'.$action.'.css';
15if ( $c->enable_row_linking ) {
16  $c->scripts[] = 'js/browse.js';
17}
18
19require_once('interactive-page.php');
20
21$page_elements = array();
22$code_file = sprintf( 'ui/%s-%s.php', $component, $action );
23if ( ! @include_once( $code_file ) ) {
24  $c->messages[] = sprintf('No page found to %s %s%s%s', $action, ($action == 'browse' ? '' : 'a '), $component, ($action == 'browse' ? 's' : ''));
25  include('page-header.php');
26  include('page-footer.php');
27  exit(0);
28}
29
30include('page-header.php');
31
32/**
33* Page elements could be an array of viewers, browsers or something else
34* that supports the Render() method... or a non-object which we assume is
35* just a string of text that we echo.
36*/
37$heading_level = null;
38foreach( $page_elements AS $k => $page_element ) {
39  if ( is_object($page_element) ) {
40    echo $page_element->Render($heading_level);
41    $heading_level = 'h2';
42  }
43  else {
44    echo $page_element;
45  }
46}
47
48if (function_exists("post_render_function")) {
49  post_render_function();
50}
51
52include('page-footer.php');
Note: See TracBrowser for help on using the repository browser.