Files

109 lines
4.9 KiB
PHP
Raw Permalink Normal View History

2025-05-12 15:44:39 +00:00
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
global $theme;
$theme_path="themes/".$theme."/";
$image_path=$theme_path."images/";
require_once ($theme_path."layout_utils.php");
global $mod_strings;
require_once('modules/EcmCalendars/Calendar.php');
$minical=new Calendar();
if($_REQUEST['date'])
{
$exp=explode("-",$_REQUEST['date']);
$minical->year=$_SESSION['ecmcalendar']['y']=$exp[0];
$minical->month=$_SESSION['ecmcalendar']['m']=$exp[1];
$minical->day=$_SESSION['ecmcalendar']['d']=$exp[2];
}
else
{
if($_SESSION['ecmcalendar'])
{
$minical->year=$_SESSION['ecmcalendar']['y'];
$minical->month=$_SESSION['ecmcalendar']['m'];
$minical->day=$_SESSION['ecmcalendar']['d'];
}
else
{
$minical->year=$_SESSION['ecmcalendar']['y']=date("Y");
$minical->month=$_SESSION['ecmcalendar']['m']=date("m");
$minical->day=$_SESSION['ecmcalendar']['d']=date("d");
}
}
if($_SESSION['cal_dashlet']['act_status'])$minical->act_status=$_SESSION['cal_dashlet']['act_status'];
else $minical->act_status="All";
if($_SESSION['cal_dashlet']['act_user'])$minical->act_user=$_SESSION['cal_dashlet']['act_user'];
else $minical->act_user="All";
if($_SESSION['cal_dashlet']['act_type'])$minical->act_type=$_SESSION['cal_dashlet']['act_type'];
else $minical->act_type="All";
echo '<link href="modules/EcmCalendars/style.css" rel="stylesheet" type="text/css">';
echo '<script language="javascript" src="modules/EcmCalendars/helper.js"></script>';
echo '<script language="javascript" src="modules/EcmCalendars/mintajax.js"></script>';
echo '<script language="javascript" src="modules/EcmCalendars/Calendar.js"></script>';
//echo '<script language="javascript">document.getElementById("leftCol").style.display="none";</script>';
echo '<table cellspacing="0" cellpadding="0" border="0" width="99%">';
echo '<tr>';
echo '<td width="70%">';
echo '<div class="divTableDay">';
echo '<div id="navDay">';
echo $minical->showNavDay();
echo '</div>';
echo '<iframe id="calendar" style="border:none;width:100%;height:500px;" frameborder="no" src="index.php?to_pdf=1&module=EcmCalendars&action=ShowBigCalendar&date='.$_REQUEST['date'].'">Yours browser not accept iframes!</iframe>';
echo '</div>';
echo '</td>';
echo '<td width="30%">';
echo '<div class="divTableDay" style="width:100%;height:530px;" id="mini_calendar">';
echo $minical->showTableMiniCalendar($minical->month,$minical->year,$minical->day);
echo '</div>';
echo '</td>';
echo '</tt>';
echo '</table>';
?>