[Vtigercrm-commits] [vtiger-commits] r5783 - /vtigercrm/trunk/modules/Calendar/new_calendar.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Tue May 9 06:32:05 EDT 2006
Author: saraj
Date: Tue May 9 04:31:55 2006
New Revision: 5783
Log:
changes made for new calendar UI
Modified:
vtigercrm/trunk/modules/Calendar/new_calendar.php
Modified: vtigercrm/trunk/modules/Calendar/new_calendar.php
==============================================================================
--- vtigercrm/trunk/modules/Calendar/new_calendar.php (original)
+++ vtigercrm/trunk/modules/Calendar/new_calendar.php Tue May 9 04:31:55 2006
@@ -1,26 +1,68 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<?php
+global $theme;
+$theme_path = "themes/".$theme."/";
+$image_path = $theme_path."images/";
+require_once($theme_path."layout_utils.php");
+require_once("modules/Calendar/calendarLayout.php");
+require_once("modules/Calendar/Calendar.php");
+$mysel= $_GET['view'];
+$calendar_arr = Array();
+$calendar_arr['IMAGE_PATH'] = $image_path;
+if(empty($mysel))
+{
+ $mysel = 'day';
+}
+$date_data = array();
+if ( isset($_REQUEST['day']))
+{
-<html>
-<head>
- <title>vtiger CRM 5 - Free, Commercial grade Open Source CRM</title>
- <!--link rel="stylesheet" type="text/css" href="../style.css"-->
+ $date_data['day'] = $_REQUEST['day'];
+}
- <script language="JavaScript" type="text/javascript" src="modules/Calendar/script.js"> </script>
-</head>
+if ( isset($_REQUEST['month']))
+{
+ $date_data['month'] = $_REQUEST['month'];
+}
-<body leftmargin=0 topmargin=0 marginheight=0 marginwidth=0>
+if ( isset($_REQUEST['week']))
+{
+ $date_data['week'] = $_REQUEST['week'];
+}
-<?php
- $mysel= $_GET['sel'];
-
- if ($mysel=="") { include "calendar_dayview.php"; }
- if ($mysel=="day") { include "calendar_dayview.php"; }
- if ($mysel=="week") { include "calendar_weekview.php"; }
- if ($mysel=="month") { include "calendar_monthview.php"; }
- if ($mysel=="year") { include "yearview.php"; }
- if ($mysel=="share") { include "calendar_share.php"; }
-
-?>
-
+if ( isset($_REQUEST['year']))
+{
+ if ($_REQUEST['year'] > 2037 || $_REQUEST['year'] < 1970)
+ {
+ print("<font color='red'>Sorry, Year must be between 1970 and 2037</font>");
+ exit;
+ }
+ $date_data['year'] = $_REQUEST['year'];
+}
+if(empty($date_data))
+{
+ $data_value=date('Y-m-d H:i:s');
+ preg_match('/(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})/',$data_value,$value);
+ $date_data = Array(
+ 'day'=>$value[3],
+ 'month'=>$value[2],
+ 'year'=>$value[1],
+ 'hour'=>$value[4],
+ 'min'=>$value[5],
+ );
+
+}
+//echo '<pre>';print_r($date_data);echo '</pre>';
+$calendar_arr['calendar'] = new Calendar($mysel,$date_data);
+//echo '<pre>';print_r($calendar_arr['calendar']);echo '</pre>';
+if ($mysel == 'day' || $mysel == 'week' || $mysel == 'month')
+{
+ global $current_user;
+ $calendar_arr['calendar']->add_Activities($current_user);
+}
+$calendar_arr['view'] = $mysel;
+calendar_layout($calendar_arr);
+//echo '<pre>';print_r($calendar_arr);echo'</pre>';
+?>
+
More information about the vtigercrm-commits
mailing list