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; |
---|
24 | include('../header.inc.php'); |
---|
25 | $_SESSION['calendar']['user'] = $GLOBALS['phpgw_info']['user']; |
---|
26 | $_SESSION['calendar']['server'] = $GLOBALS['phpgw_info']['server']; |
---|
27 | |
---|
28 | if(!is_object($GLOBALS['phpgw']->datetime)) |
---|
29 | { |
---|
30 | $GLOBALS['phpgw']->datetime = CreateObject('phpgwapi.date_time'); |
---|
31 | } |
---|
32 | if(!is_object($GLOBALS['phpgw']->categories)){ |
---|
33 | $GLOBALS['phpgw']->categories = CreateObject('phpgwapi.categories'); |
---|
34 | $bo = CreateObject('calendar.bocalendar'); |
---|
35 | $cat = &$bo->cat; |
---|
36 | $cat->app_name = 'calendar'; // The categories still the same from egroupwareCalendar |
---|
37 | $optionCategories = $cat->formated_list('select','all',$bo->cat_id,'True'); |
---|
38 | $optionCategories .= '<option selected value="0">'.lang("all").'</option>' . "\n"; |
---|
39 | |
---|
40 | foreach ($bo->list_cals() as $cal_) |
---|
41 | if (! strstr($cal_['value'],'g_')) |
---|
42 | $optionCals .= '<option value="' . $cal_['grantor'] . '">'.$cal_['name'].'</option>' . "\n"; |
---|
43 | } |
---|
44 | |
---|
45 | $template_1 = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); |
---|
46 | $template_1->set_var("viewType",$_GET['viewType']); |
---|
47 | $template_1->set_var("timeStamp",$_GET['datetime']); |
---|
48 | $template_1->set_var('cat_options',$optionCategories); |
---|
49 | $template_1->set_var('cal_options',$optionCals); |
---|
50 | $template_1->set_file(Array('expressoCalendar' => 'index.tpl')); |
---|
51 | $template_1->set_block('expressoCalendar','index'); |
---|
52 | $template_1->pfp('out','index'); |
---|
53 | |
---|
54 | $parms = Array( |
---|
55 | 'date' => date('Ymd',$GLOBALS['phpgw']->datetime->users_localtime) |
---|
56 | ); |
---|
57 | |
---|
58 | // Footer |
---|
59 | $GLOBALS['phpgw']->common->phpgw_footer(); |
---|
60 | echo "<link rel='stylesheet' href='templates/default/main.css' />" |
---|
61 | ."<script language='JavaScript' type='text/javascript' src='js/globals.js'></script>" |
---|
62 | ."<script language='JavaScript' type='text/javascript' src='js/xtools.js'></script>" |
---|
63 | ."<script src='inc/load_lang.php?".$GLOBALS['phpgw_info']['flags']['update_version']."' type='text/javascript'></script>" |
---|
64 | ."<script language='JavaScript' type='text/javascript' src='js/connector.js'></script>" |
---|
65 | ."<script language='JavaScript' type='text/javascript' src='js/calendar_functions.js'></script>" |
---|
66 | ."<script language='JavaScript' type='text/javascript' src='js/drag_area.js'></script>" |
---|
67 | ."<script language='JavaScript' type='text/javascript' src='js/MOFX.js'></script>" |
---|
68 | ."<script language='JavaScript' type='text/javascript' src='js/common_functions.js'></script>" |
---|
69 | ."<script language='JavaScript' type='text/javascript'>calendar.getView('div_main');</script>"; |
---|
70 | |
---|
71 | |
---|
72 | $GLOBALS['phpgw']->common->phpgw_exit(); |
---|
73 | |
---|
74 | ?> |
---|
75 | |
---|
76 | |
---|