source: trunk/expressoCalendar/index.php @ 632

Revision 632, 3.1 KB checked in by niltonneto, 15 years ago (diff)

Modulo calendar_new renomeado para expressoCalendar

  • Property svn:executable set to *
Line 
1<?php
2/**************************************************************************\
3 * Expresso Livre - Calendar                                                *
4 * http://www.expressolivre.org                                             *
5 * Based on Webcalendar by Craig Knudsen <cknudsen@radix.net>               *
6 * Modified by Mark Peters <skeeter@phpgroupware.org>                       *
7 * And than Modified by Alexandre Muller <amuller@celepar.pr.gov.br>        *
8 * --------------------------------------------                             *
9 *  This program is free software; you can redistribute it and/or modify it *
10 *  under the terms of the GNU General Public License as published by the   *
11 *  Free Software Foundation; either version 2 of the License, or (at your  *
12 *  option) any later version.                                              *
13 \**************************************************************************/
14
15
16$phpgw_flags = Array(
17                'currentapp'    =>      'expressoCalendar',
18                'noappheader'   =>      True,
19                'noappfooter'   =>      True,
20                'nofooter'      =>      false
21                );
22
23$GLOBALS['phpgw_info']['flags'] = $phpgw_flags;
24include('../header.inc.php');
25$_SESSION['calendar']['user'] = $GLOBALS['phpgw_info']['user'];
26$_SESSION['calendar']['server'] = $GLOBALS['phpgw_info']['server'];
27
28if(!is_object($GLOBALS['phpgw']->datetime))
29{
30        $GLOBALS['phpgw']->datetime = CreateObject('phpgwapi.date_time');
31}
32if(!is_object($GLOBALS['phpgw']->categories)){
33        $GLOBALS['phpgw']->categories = CreateObject('phpgwapi.categories');
34        $bo = CreateObject('calendar.bocalendar');
35        $cat = $bo->cat;
36        $optionCategories = $cat->formated_list('select','all',$bo->cat_id,'True');
37        foreach ($bo->list_cals() as $cal_)
38                $optionCals .= '<option value="' . $cal_['grantor'] . '">'.$cal_['name'].'</option>' . "\n";
39
40}
41
42$template_1 = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
43$template_1->set_file(Array('expressoCalendar' => 'index.tpl'));
44$template_1->set_var('cat_options',$optionCategories);
45$template_1->set_var('cal_options',$optionCals);
46$template_1->set_block('expressoCalendar','index');
47$template_1->pfp('out','index');
48
49$parms = Array(
50                'date'          => date('Ymd',$GLOBALS['phpgw']->datetime->users_localtime)
51              );
52
53// Footer
54$GLOBALS['phpgw']->common->phpgw_footer();
55echo "<link rel='stylesheet' href='templates/default/main.css' />"
56."<script language='JavaScript' type='text/javascript' src='js/globals.js'></script>"
57."<script language='JavaScript' type='text/javascript' src='js/xtools.js'></script>"
58."<script src='inc/load_lang.php?".$GLOBALS['phpgw_info']['flags']['update_version']."' type='text/javascript'></script>"
59."<script language='JavaScript' type='text/javascript' src='js/connector.js'></script>"
60."<script language='JavaScript' type='text/javascript' src='js/calendar_functions.js'></script>"
61."<script language='JavaScript' type='text/javascript' src='js/drag_area.js'></script>"
62."<script language='JavaScript' type='text/javascript' src='js/MOFX.js'></script>"
63."<script language='JavaScript' type='text/javascript' src='js/common_functions.js'></script>";
64
65$GLOBALS['phpgw']->common->phpgw_exit();
66
67?>
68
69
Note: See TracBrowser for help on using the repository browser.