[Vtigercrm-commits] [vtiger-commits] r5890 - in /vtigercrm/branches/5.0_postgresql_integration: ./ Smarty/templates/ include/js/ include/language/ modules/Calendar/ modules/CustomView/ modules/CustomView/language/ modules/Import/ modules/Import/language/ modules/Portal/ modules/Rss/ soap/

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Thu May 11 19:40:17 EDT 2006


Author: jeffk
Date: Thu May 11 17:39:58 2006
New Revision: 5890

Log:
refs #752. merge trunk changesets [5863] through [5869]. see #752 for conflict, branch version kept

Added:
    vtigercrm/branches/5.0_postgresql_integration/modules/Portal/Portal.php
      - copied unchanged from r5889, vtigercrm/trunk/modules/Portal/Portal.php
Modified:
    vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/Buttons_List.tpl
    vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/CustomView.tpl
    vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/DetailView.tpl
    vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/DetailViewHidden.tpl
    vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/GroupDetailview.tpl
    vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/Header.tpl
    vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/Importerror.tpl
    vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/ListView.tpl
    vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/ListViewEntries.tpl
    vtigercrm/branches/5.0_postgresql_integration/include/js/ListView.js
    vtigercrm/branches/5.0_postgresql_integration/include/js/search.js
    vtigercrm/branches/5.0_postgresql_integration/include/language/en_us.lang.php
    vtigercrm/branches/5.0_postgresql_integration/index.php
    vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/Appointment.php
    vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/Calendar.php
    vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/Date.php
    vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/addEventUI.php
    vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/calendarLayout.php
    vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/script.js
    vtigercrm/branches/5.0_postgresql_integration/modules/CustomView/CustomView.php
    vtigercrm/branches/5.0_postgresql_integration/modules/CustomView/language/en_us.lang.php
    vtigercrm/branches/5.0_postgresql_integration/modules/Import/ImportStep3.php
    vtigercrm/branches/5.0_postgresql_integration/modules/Import/ImportSteplast.php
    vtigercrm/branches/5.0_postgresql_integration/modules/Import/language/en_us.lang.php
    vtigercrm/branches/5.0_postgresql_integration/modules/Portal/Popup.php
    vtigercrm/branches/5.0_postgresql_integration/modules/Rss/ListView.php
    vtigercrm/branches/5.0_postgresql_integration/modules/Rss/Rss.php
    vtigercrm/branches/5.0_postgresql_integration/soap/contactserialize.php

Modified: vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/Buttons_List.tpl
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/Buttons_List.tpl (original)
+++ vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/Buttons_List.tpl Thu May 11 17:39:58 2006
@@ -31,7 +31,7 @@
 					{/if}
 									
 					{if $CHECK.index eq 'yes'}
-					 <td style="padding-right:0px"><a href="#" onClick="moveMe('searchAcc');searchshowhide('searchAcc')" ><img src="{$IMAGE_PATH}btnL3Search.gif" alt="{$APP.LBL_SEARCH_ALT}{$MODULE}..." title="{$APP.LBL_SEARCH_TITLE}{$MODULE}..." border=0></a></a></td>
+					 <td style="padding-right:0px"><a href="#" onClick="moveMe('searchAcc');searchshowhide('searchAcc','advSearch')" ><img src="{$IMAGE_PATH}btnL3Search.gif" alt="{$APP.LBL_SEARCH_ALT}{$MODULE}..." title="{$APP.LBL_SEARCH_TITLE}{$MODULE}..." border=0></a></a></td>
 					{/if}
 					<td style="padding-right:0px"><a href="#" onClick='return window.open("index.php?module=Contacts&action=vtchat","Chat","width=450,height=400,resizable=1,scrollbars=1");'><img src="{$IMAGE_PATH}tbarChat.gif" alt="{$APP.LBL_CHAT_ALT}" title="{$APP.LBL_CHAT_TITLE}" border=0></a>
                     			 </td>	
@@ -47,7 +47,7 @@
 					<td style="padding-right:0px"><a href="#"><img src="{$IMAGE_PATH}btnL3Clock.gif" alt="{$APP.LBL_CLOCK_ALT}" title="{$APP.LBL_CLOCK_TITLE}" border=0 onClick="fnvshobj(this,'wclock')"></a></a></td>
 					<td style="padding-right:0px"><a href="#"><img src="{$IMAGE_PATH}btnL3Calc.gif" alt="{$APP.LBL_CALCULATOR_ALT}" title="{$APP.LBL_CALCULATOR_TITLE}" border=0 onClick="fnvshobj(this,'calc')"></a></a></td>
 			<td nowrap="nowrap" width="25">&nbsp;</td>
-			<td style="padding-right: 0px;"><a href="#" onClick="fnvshobj(this,'allMenu')"><img src="{$IMAGE_PATH}btnL3AllMenu.gif" alt="{$APP.LBL_ALL_MENU_ALT}" title="{$APP.LBL_ALL_MENU_TITLE}" border="0"></a></td>
+			<td style="padding-right: 0px;"><a href="#" onMouseover="fnvshobj(this,'allMenu')"><img src="{$IMAGE_PATH}btnL3AllMenu.gif" alt="{$APP.LBL_ALL_MENU_ALT}" title="{$APP.LBL_ALL_MENU_TITLE}" border="0"></a></td>
 				</tr>
 				</table>
 			</td>

Modified: vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/CustomView.tpl
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/CustomView.tpl (original)
+++ vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/CustomView.tpl Thu May 11 17:39:58 2006
@@ -10,7 +10,7 @@
 -->
 <link rel="stylesheet" type="text/css" media="all" href="jscalendar/calendar-win2k-cold-1.css">
 <script type="text/javascript" src="jscalendar/calendar.js"></script>
-<script type="text/javascript" src="jscalendar/lang/calendar-en.js"></script>
+<script type="text/javascript" src="jscalendar/lang/calendar-{$APP.LBL_JSCALENDAR_LANG}.js"></script>
 <script type="text/javascript" src="jscalendar/calendar-setup.js"></script>
 <script type="text/javascript" src="modules/CustomView/CustomView.js"></script>
 <script language="JavaScript" type="text/javascript" src="include/calculator/calc.js"></script>
@@ -60,11 +60,11 @@
                 var errorMessage = "";
                 if (trim(document.CustomView.viewName.value) == "") {ldelim}
                         isError = true;
-                        errorMessage += "\nView Name";
+                        errorMessage += "\n{$MOD.LBL_VIEW_NAME}";
                 {rdelim}
                 // Here we decide whether to submit the form.
                 if (isError == true) {ldelim}
-                        alert("Missing required fields:" + errorMessage);
+                        alert("{$MOD.Missing_required_fields}:" + errorMessage);
                         return false;
                 {rdelim}
 		
@@ -104,7 +104,7 @@
   <td valign="top"><img src="{$IMAGE_PATH}showPanelTopLeft.gif"></td>
   <td class="showPanelBg" valign="top" width="100%">
    <div class="small" style="padding: 20px;">
-      <span class="lvtHeaderText">{$MODULE} &gt; New Custom View</span> <br>
+      <span class="lvtHeaderText">{$APP.$MODULE} &gt; {$MOD.New_Custom_View}</span> <br>
       <hr noshade="noshade" size="1">
       <form name="EditView" method="post" enctype="multipart/form-data" action="index.php">
             <table align="center" border="0" cellpadding="0" cellspacing="0" width="95%">
@@ -112,10 +112,10 @@
               <td align="left" valign="top">
                <table width="100%"  border="0" cellspacing="0" cellpadding="5">
 		<tr>
-		 <td colspan="4" class="detailedViewHeader"><strong>Details</strong></td>
+		 <td colspan="4" class="detailedViewHeader"><strong>{$MOD.Details}</strong></td>
 		</tr>
 		<tr>
-		 <td class="dvtCellInfo" align="right" width="25%"><span class="style1">*</span>View Name </td>
+		 <td class="dvtCellInfo" align="right" width="25%"><span class="style1">*</span>{$MOD.LBL_VIEW_NAME} </td>
 		 <td class="dvtCellInfo" width="25%">
 		  <input class="detailedViewTextBox" type="text" name='viewName' value="{$VIEWNAME}" onfocus="this.className='detailedViewTextBoxOn'" onblur="this.className='detailedViewTextBox'"/>
 		 </td>
@@ -129,12 +129,12 @@
 		<tr><td colspan="3">&nbsp;</td></tr>
 		<tr>
 		 <td colspan="4" class="detailedViewHeader">
-		  <b>Select Columns to show in this view </b>
+		  <b>{$MOD.LBL_STEP_2_TITLE} </b>
 		 </td>
 		</tr>
 		<tr class="dvtCellLabel">
 		  <td><select name="column1" id="column1">
-	                <option value="">None</option>
+	                <option value="">{$MOD.LBL_NONE}</option>
 			{foreach item=filteroption key=label from=$CHOOSECOLUMN1}
 				<optgroup label="{$label}" class=\"select\" style=\"border:none\">
 				{foreach item=text from=$filteroption}
@@ -144,7 +144,7 @@
           	        {$CHOOSECOLUMN1}
 	              </select></td>
 		   <td><select name="column2" id="column2">
-                        <option value="">None</option>
+                        <option value="">{$MOD.LBL_NONE}</option>
                         {foreach item=filteroption key=label from=$CHOOSECOLUMN2}
                                 <optgroup label="{$label}" class=\"select\" style=\"border:none\">
                                 {foreach item=text from=$filteroption}
@@ -154,7 +154,7 @@
                         {$CHOOSECOLUMN2}
                       </select></td>
 		   <td><select name="column3" id="column3">
-                        <option value="">None</option>
+                        <option value="">{$MOD.LBL_NONE}</option>
                         {foreach item=filteroption key=label from=$CHOOSECOLUMN3}
                                 <optgroup label="{$label}" class=\"select\" style=\"border:none\">
                                 {foreach item=text from=$filteroption}
@@ -164,7 +164,7 @@
                         {$CHOOSECOLUMN3}
                       </select></td>
 		   <td><select name="column4" id="column4">
-                        <option value="">None</option>
+                        <option value="">{$MOD.LBL_NONE}</option>
                         {foreach item=filteroption key=label from=$CHOOSECOLUMN4}
                                 <optgroup label="{$label}" class=\"select\" style=\"border:none\">
                                 {foreach item=text from=$filteroption}
@@ -177,7 +177,7 @@
 		</tr>
 		<tr class="dvtCellInfo">
 		   <td><select name="column5" id="column5">
-                        <option value="">None</option>
+                        <option value="">{$MOD.LBL_NONE}</option>
                         {foreach item=filteroption key=label from=$CHOOSECOLUMN5}
                                 <optgroup label="{$label}" class=\"select\" style=\"border:none\">
                                 {foreach item=text from=$filteroption}
@@ -187,7 +187,7 @@
                         {$CHOOSECOLUMN5}
                       </select></td>
                    <td><select name="column6" id="column6">
-                        <option value="">None</option>
+                        <option value="">{$MOD.LBL_NONE}</option>
                         {foreach item=filteroption key=label from=$CHOOSECOLUMN6}
                                 <optgroup label="{$label}" class=\"select\" style=\"border:none\">
                                 {foreach item=text from=$filteroption}
@@ -197,7 +197,7 @@
                         {$CHOOSECOLUMN6}
                       </select></td>
                    <td><select name="column7" id="column7">
-                        <option value="">None</option>
+                        <option value="">{$MOD.LBL_NONE}</option>
                         {foreach item=filteroption key=label from=$CHOOSECOLUMN7}
                                 <optgroup label="{$label}" class=\"select\" style=\"border:none\">
                                 {foreach item=text from=$filteroption}
@@ -207,7 +207,7 @@
                         {$CHOOSECOLUMN7}
                       </select></td>
                    <td><select name="column8" id="column8">
-                        <option value="">None</option>
+                        <option value="">{$MOD.LBL_NONE}</option>
                         {foreach item=filteroption key=label from=$CHOOSECOLUMN8}
                                 <optgroup label="{$label}" class=\"select\" style=\"border:none\">
                                 {foreach item=text from=$filteroption}
@@ -219,7 +219,7 @@
 		</tr>
 		<tr class="dvtCellLabel">
 		   <td><select name="column9" id="column9">
-                        <option value="">None</option>
+                        <option value="">{$MOD.LBL_NONE}</option>
                         {foreach item=filteroption key=label from=$CHOOSECOLUMN9}
                                 <optgroup label="{$label}" class=\"select\" style=\"border:none\">
                                 {foreach item=text from=$filteroption}
@@ -238,7 +238,7 @@
 		<td align="center">
 		{math equation="(x-1)*4+ y" x=$smarty.section.SelectColumn.index y=$smarty.section.Column.index}.&nbsp;	
 		  <select id="column{math equation="(x-1)*4+ y" x=$smarty.section.SelectColumn.index y=$smarty.section.Column.index}" name ="column{math equation="(x-1)*4+ y" x=$smarty.section.SelectColumn.index y=$smarty.section.Column.index}" class="detailedViewTextBox">
-		   <option value="">None</option>
+		   <option value="">{$MOD.LBL_NONE}</option>
 		   {foreach item=filteroption key=label from={$CHOOSECOLUMN|cat: {math equation="(x-1)*4+ y" x=$smarty.section.SelectColumn.index y=$smarty.section.Column.index}}}
 		    <optgroup label="{$label}" class=\"select\" style=\"border:none\">
 		    {foreach item=text from=$filteroption}
@@ -258,10 +258,10 @@
 		   <tbody><tr>
 		    <td class="dvtTabCache" style="width: 10px;" nowrap="nowrap">&nbsp;</td>
 		    <td width="75" align="center" nowrap="nowrap" class="dvtSelectedCell" id="pi" onclick="fnLoadValues('pi','mi','mnuTab','mnuTab2')">
-		     <b>Simple Filter</b>
+		     <b>{$MOD.LBL_STEP_3_TITLE}</b>
 		    </td>
 		    <td class="dvtUnSelectedCell" style="width: 100px;" align="center" nowrap="nowrap" id="mi" onclick="fnLoadValues('mi','pi','mnuTab2','mnuTab')">
-		     <b>Advanced Filter </b>
+		     <b>{$MOD.LBL_STEP_4_TITLE}</b>
 		    </td>
 		    <td class="dvtTabCache" nowrap="nowrap">&nbsp;</td>
 		   </tr>
@@ -275,14 +275,13 @@
 		     <table width="100%" cellspacing="0" cellpadding="5" class="dvtContentSpace">
 		      <tr><td>&nbsp;</td></tr>
                       <tr><td class="dvtCellInfo">
-		       Simple Time Filter allows you to select date based on <b>Account Created Time</b> or 
-		       <b>Account Modified Time</b>.<br /><br />
+                      {$MOD.LBL_AF_HDR5}<br /><br />
 		      </td></tr>
                       <tr><td>
 			<table width="75%" border="0" cellpadding="5" cellspacing="0" align="center">
-			  <tr><td colspan="2" class="detailedViewHeader"><b>Simple Time Filter</b></td></tr>
+			  <tr><td colspan="2" class="detailedViewHeader"><b>{$MOD.Simple_Time_Filter}</b></td></tr>
 			  <tr>
-			     <td width="75%" align="right" class="dvtCellLabel">Select a Column :</td>
+			     <td width="75%" align="right" class="dvtCellLabel">{$MOD.LBL_Select_a_Column} :</td>
 			     <td width="25%" class="dvtCellInfo">
 				<select name="stdDateFilterField" class="select">
 				{foreach item=stdfilter from=$STDFILTERCOLUMNS}
@@ -291,7 +290,7 @@
                                 </select>
 			  </tr>
 			  <tr>
-			     <td align="right" class="dvtCellLabel">Select Duration :</td>
+			     <td align="right" class="dvtCellLabel">{$MOD.Select_Duration} :</td>
 			     <td class="dvtCellInfo">
 			        <select name="stdDateFilter" class="select" onchange='showDateRange(this.options[this.selectedIndex].value )'>
 				{foreach item=duration from=$STDFILTERCRITERIA}
@@ -301,7 +300,7 @@
 			     </td>
 			  </tr>
 			  <tr>
-			     <td align="right" class="dvtCellLabel">Start Date :</td>
+			     <td align="right" class="dvtCellLabel">{$MOD.Start_Date} :</td>
 			     <td width="25%" align=left class="dvtCellInfo">
 			     <input name="startdate" id="jscal_field_date_start" type="text" size="10" class="textField" value="{$STARTDATE}">
 			     <img src="{$IMAGE_PATH}calendar.gif" id="jscal_trigger_date_start">
@@ -312,7 +311,7 @@
 			     </script></td>
 	            	  </tr>
 			  <tr>
-			     <td align="right" class="dvtCellLabel">End Date :</td> 
+			     <td align="right" class="dvtCellLabel">{$MOD.End_Date} :</td> 
   			     <td width="25%" align=left class="dvtCellInfo">
 			     <input name="enddate" id="jscal_field_date_end" type="text" size="10" class="textField" value="{$ENDDATE}">
 			     <img src="{$IMAGE_PATH}calendar.gif" id="jscal_trigger_date_end">
@@ -337,11 +336,11 @@
        </td></tr>
        <tr><td>
 	<table width="75%" border="0" cellpadding="5" cellspacing="0" align="center">
-	  <tr><td colspan="3" class="detailedViewHeader"><b>Rule</b></td></tr>
+	  <tr><td colspan="3" class="detailedViewHeader"><b>{$MOD.LBL_RULE}</b></td></tr>
 	  
 	  <tr class="dvtCellLabel">
           <td><select name="fcol1" id="fcol1" onchange="updatefOptions(this, 'fop1');">
-              <option value="">None</option>
+              <option value="">{$MOD.LBL_NONE}</option>
               {foreach item=filteroption key=label from=$BLOCK1}
                 <optgroup label="{$label}" class=\"select\" style=\"border:none\">
                 {foreach item=text from=$filteroption}
@@ -349,16 +348,16 @@
                 {/foreach}
               {/foreach}
               </select> &nbsp; <select name="fop1" id="fop1">
-              <option value="">None</option>
+              <option value="">{$MOD.LBL_NONE}</option>
               {foreach item=criteria from=$FOPTION1}
                 <option {$criteria.selected} value={$criteria.value}>{$criteria.text}</option>
               {/foreach}
               </select>&nbsp; <input name="fval1" id="fval1" type="text" size=30 maxlength=80 value="{$VALUE1}">
-            &nbsp;And</td>
+            &nbsp;{$MOD.LBL_AND}</td>
         </tr>
 	<tr class="dvtCellInfo">
           <td><select name="fcol2" id="fcol2" onchange="updatefOptions(this, 'fop2');">
-              <option value="">None</option>
+              <option value="">{$MOD.LBL_NONE}</option>
               {foreach item=filteroption key=label from=$BLOCK2}
                 <optgroup label="{$label}" class=\"select\" style=\"border:none\">
                 {foreach item=text from=$filteroption}
@@ -366,16 +365,16 @@
                 {/foreach}
               {/foreach}
               </select> &nbsp; <select name="fop2" id="fop2">
-              <option value="">None</option>
+              <option value="">{$MOD.LBL_NONE}</option>
               {foreach item=criteria from=$FOPTION2}
                 <option {$criteria.selected} value={$criteria.value}>{$criteria.text}</option>
               {/foreach}
               </select>&nbsp; <input name="fval2" id="fval2" type="text" size=30 maxlength=80 value="{$VALUE2}">
-            &nbsp;And</td>
+            &nbsp;{$MOD.LBL_AND}</td>
         </tr>
 	<tr class="dvtCellLabel">
           <td><select name="fcol3" id="fcol3" onchange="updatefOptions(this, 'fop3');">
-              <option value="">None</option>
+              <option value="">{$MOD.LBL_NONE}</option>
               {foreach item=filteroption key=label from=$BLOCK3}
                 <optgroup label="{$label}" class=\"select\" style=\"border:none\">
                 {foreach item=text from=$filteroption}
@@ -383,16 +382,16 @@
                 {/foreach}
               {/foreach}
               </select> &nbsp; <select name="fop3" id="fop3">
-              <option value="">None</option>
+              <option value="">{$MOD.LBL_NONE}</option>
               {foreach item=criteria from=$FOPTION3}
                 <option {$criteria.selected} value={$criteria.value}>{$criteria.text}</option>
               {/foreach}
               </select>&nbsp; <input name="fval3" id="fval3" type="text" size=30 maxlength=80 value="{$VALUE3}">
-            &nbsp;And</td>
+            &nbsp;{$MOD.LBL_AND}</td>
         </tr>
 	<tr class="dvtCellInfo">
           <td><select name="fcol4" id="fcol4" onchange="updatefOptions(this, 'fop4');">
-              <option value="">None</option>
+              <option value="">{$MOD.LBL_NONE}</option>
               {foreach item=filteroption key=label from=$BLOCK4}
                 <optgroup label="{$label}" class=\"select\" style=\"border:none\">
                 {foreach item=text from=$filteroption}
@@ -405,11 +404,11 @@
                 <option {$criteria.selected} value={$criteria.value}>{$criteria.text}</option>
               {/foreach}
               </select>&nbsp; <input name="fval4" id="fval4" type="text" size=30 maxlength=80 value="{$VALUE4}">
-            &nbsp;And</td>
+            &nbsp;{$MOD.LBL_AND}</td>
         </tr>
 	<tr class="dvtCellLabel">
           <td><select name="fcol5" id="fcol5" onchange="updatefOptions(this, 'fop5');">
-              <option value="">None</option>
+              <option value="">{$MOD.LBL_NONE}</option>
               {foreach item=filteroption key=label from=$BLOCK5}
                 <optgroup label="{$label}" class=\"select\" style=\"border:none\">
                 {foreach item=text from=$filteroption}
@@ -417,7 +416,7 @@
                 {/foreach}
               {/foreach}
               </select> &nbsp; <select name="fop5" id="fop5">
-              <option value="">None</option>
+              <option value="">{$MOD.LBL_NONE}</option>
               {foreach item=criteria from=$FOPTION5}
                 <option {$criteria.selected} value={$criteria.value}>{$criteria.text}</option>
               {/foreach}
@@ -429,7 +428,7 @@
 	  <tr class="{cycle values="dvtCellInfo,dvtCellLabel"}">
 	    <td align="left" width="33%">
 	      <select name="fcol{$smarty.section.advancedFilter.index}" id="fcol{$smarty.section.advancedFilter.index}" onchange="updatefOptions(this, 'fop{$smarty.section.advancedFilter.index}'); class="detailedViewTextBox">
-	      <option value="">None</option>
+	      <option value="">{$MOD.LBL_NONE}</option>
 	      {foreach item=filteroption key=label from=$BLOCK}
 		<optgroup label="{$label}" class=\"select\" style=\"border:none\">
 		{foreach item=text from=$filteroption}
@@ -440,7 +439,7 @@
 	    </td>
 	    <td align="left" width="33%">
 	      <select name="fcol{$smarty.section.advancedFilter.index}" id="fcol{$smarty.section.advancedFilter.index}" class="detailedViewTextBox">
-	      <option value="">None</option>
+	      <option value="">{$MOD.LBL_NONE}</option>
 	      {foreach item=criteria from=$FOPTION}
 		<option {$criteria.selected} value={$criteria.value}>{$criteria.text}</option>
 	      {/foreach}

Modified: vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/DetailView.tpl
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/DetailView.tpl (original)
+++ vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/DetailView.tpl Thu May 11 17:39:58 2006
@@ -69,7 +69,7 @@
 		
 		<table align="center" border="0" cellpadding="0" cellspacing="0" width="95%"><tr><td>		
 		 <span class="lvtHeaderText"><font color="purple">[ {$ID} ] </font>{$NAME} -  {$SINGLE_MOD} Information</span>&nbsp;&nbsp;<span id="vtbusy_info" style="display:none;" valign="bottom"><img src="{$IMAGE_PATH}vtbusy.gif" border="0"></span><span id="vtbusy_info" style="visibility:hidden;" valign="bottom"><img src="{$IMAGE_PATH}vtbusy.gif" border="0"></span></td><td>&nbsp;</td></tr>
-		 <tr height=20><td>{$UPDATEINFO}</td><td align="right" width="400" nowrap><div id="addtagdiv"><a href="javascript:;" onClick="show('tagdiv'),hide('addtagdiv'),document.getElementById('txtbox_tagfields').focus()">+addtag</a></div><div id="tagdiv" style="display:block";><input class="textbox"  type="text" id="txtbox_tagfields" name="textbox_First Name" value=""></input>&nbsp;&nbsp;<input name="button_tagfileds" type="button" class="small" value="Tag it" onclick="return tagvalidate()"/><input name="close" type="button" class="small" value="Close" onClick="hide('tagdiv'),show('addtagdiv')"></div></td></tr>
+		 <tr height=20><td>{$UPDATEINFO}</td><td align="right" width="400" nowrap><div id="addtagdiv"><a href="javascript:;" onClick="show('tagdiv'),hide('addtagdiv'),document.getElementById('txtbox_tagfields').focus()">+addtag</a></div><div id="tagdiv" style="display:none;"><input class="textbox"  type="text" id="txtbox_tagfields" name="textbox_First Name" value=""></input>&nbsp;&nbsp;<input name="button_tagfileds" type="button" class="small" value="Tag it" onclick="return tagvalidate()"/><input name="close" type="button" class="small" value="Close" onClick="hide('tagdiv'),show('addtagdiv')"></div></td></tr>
 		 </table>			 
 		 <hr noshade size=1>
 		

Modified: vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/DetailViewHidden.tpl
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/DetailViewHidden.tpl (original)
+++ vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/DetailViewHidden.tpl Thu May 11 17:39:58 2006
@@ -29,6 +29,7 @@
 	<input type="hidden" name="email_id">
 	<input type="hidden" name="source_module">
 	<input type="hidden" name="entity_id">
+	{$HIDDEN_PARENTS_LIST}
 
 {elseif $MODULE eq 'Contacts'}
 	<input type="hidden" name="module" value="{$MODULE}">
@@ -50,6 +51,7 @@
 	<input type="hidden" name="case_id">
 	<input type="hidden" name="new_reports_to_id">
 	<input type="hidden" name="email_directing_module">
+	{$HIDDEN_PARENTS_LIST}
 {elseif $MODULE eq 'Potentials'}
 	<input type="hidden" name="module" value="{$MODULE}">
         <input type="hidden" name="record" value="{$ID}">

Modified: vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/GroupDetailview.tpl
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/GroupDetailview.tpl (original)
+++ vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/GroupDetailview.tpl Thu May 11 17:39:58 2006
@@ -34,7 +34,7 @@
     <tr>
       <td width="95%" style="padding-left:20px;" valign="top"><table width="95%" cellpadding="5" cellspacing="0" class="leadTable" align="center">
           <tr>
-            <td style="padding:5px;border-bottom:2px dotted #CCCCCC;" width="5%" ><img src="{$IMAGEPATH}groups.gif" width="48" height="48" align="absmiddle" /> </td>
+            <td style="padding:5px;border-bottom:2px dotted #CCCCCC;" width="5%" ><img src="{$IMAGE_PATH}groups.gif" width="48" height="48" align="absmiddle" /> </td>
             <td style="padding:5px;border-bottom:2px dotted #AAAAAA;"><span class="genHeaderGrayBig">{$GROUPINFO.0.groupname} {$APP.LBL_GROUP}</span><br />
                 <span class="big">{$CMOD.LBL_DETAIL_VIEW} {$GROUPINFO.0.groupname} {$APP.LBL_GROUP}</span> </td>
           </tr>
@@ -69,22 +69,22 @@
                       	  	<tr>
 								{if $type == "User"}
 								<td class="dvtCellLabel" valign="top" align="left" width="5%">
-										<img src="{$IMAGEPATH}user_icon.gif" align="absmiddle">
+										<img src="{$IMAGE_PATH}user_icon.gif" align="absmiddle">
 								</td>
 								{/if}
 								{if $type == "Role" }
 								<td class="dvtCellLabel" valign="top" align="left" width="5%">
-										<img src="{$IMAGEPATH}roles_icon.gif" align="absmiddle">
+										<img src="{$IMAGE_PATH}roles_icon.gif" align="absmiddle">
 								</td>
 								{/if}
 								{if $type == "Role and Subordinates" }
 								<td class="dvtCellLabel" valign="top" align="left" width="5%">
-										<img src="{$IMAGEPATH}roles_icon.gif" align="absmiddle">
+										<img src="{$IMAGE_PATH}roles_icon.gif" align="absmiddle">
 								</td>
 								{/if}
 								{if $type == "Group" }
 								<td class="dvtCellLabel" valign="top" align="left" width="5%">
-										<img src="{$IMAGEPATH}groups_icon.gif" align="absmiddle">
+										<img src="{$IMAGE_PATH}groups_icon.gif" align="absmiddle">
 								</td>
 								{/if}
 								<td class="dvtCellLabel" valign="top" align="right" width="15%"><b>{$type} {$CMOD.LBL_COLON} </b></td>

Modified: vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/Header.tpl
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/Header.tpl (original)
+++ vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/Header.tpl Thu May 11 17:39:58 2006
@@ -24,6 +24,7 @@
 	<script language="JavaScript" type="text/javascript" src="include/js/general.js"></script>
 	<script language="JavaScript" type="text/javascript" src="include/js/ajax.js"></script>
 	<script language="JavaScript" type="text/javascript" src="include/js/menu.js"></script>
+	<script language="JavaScript" type="text/javascript" src="modules/Calendar/script.js"></script>
 	<TABLE border=0 cellspacing=0 cellpadding=0 width=100% class="hdrNameBg">
 	<tr>
 		<td><img src="{$IMAGEPATH}/vtiger-crm.gif" alt="vtiger CRM" title="vtiger CRM" border=0></td>

Modified: vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/Importerror.tpl
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/Importerror.tpl (original)
+++ vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/Importerror.tpl Thu May 11 17:39:58 2006
@@ -10,42 +10,48 @@
  ********************************************************************************/
 -->*}
 <table  cellpadding="0" cellspacing="0" width="100%">
-<tr>
-<td width="75%" valign=top>
+   <tr>
+	<td width="75%" valign=top>
+		<form enctype="multipart/form-data" name="Import" method="POST" action="index.php">
+		<input type="hidden" name="module" value="{$MODULE}">
+ 		<input type="hidden" name="return_module" value="{$MODULE}">
+		<input type="hidden" name="return_action" value="index">
+		<input type="hidden" name="step" value="2">
+		<input type="hidden" name="action" value="Import">
 
-<form enctype="multipart/form-data" name="Import" method="POST" action="index.php">
-  <input type="hidden" name="module" value="{$MODULE}">
-  <input type="hidden" name="step" value="2">
-  <input type="hidden" name="action" value="Import">
+		<!-- IMPORT ERROR STARTS HERE  -->
+		<br /><br /><br />
 
+		<table align="center" cellpadding="5" cellspacing="0" width="95%" class="leadTable">
+		   <tr>
+			<td colspan="2" bgcolor="#FFFFFF" height="50" valign="middle" align="left" class="genHeaderSmall">{$MOD.LBL_MODULE_NAME} {$MODULE}</td>
+		   </tr>
+		   <tr bgcolor="#ECECEC">
+			<td colspan="2" align="left" valign="top">&nbsp;</td>
+		   </tr>
+		   <tr bgcolor="#ECECEC">
+			<td colspan="2" align="left" valign="top" style="padding-left:40px;">
+				<span class="genHeaderSmall">{$MOD.LBL_MODULE_NAME} {$MOD.LBL_ERROR}</span> 
+			</td>
+		   </tr>
+	
+		   <tr bgcolor="#ECECEC"><td align="left" valign="top" colspan="2">&nbsp;</td></tr>
+		   <tr bgcolor="#ECECEC">
+			<td align="left" valign="top" colspan="2" style="padding-left:80px;"><font color="red" size="2px">{$MESSAGE}</font></td>
+		   </tr>
 
-<!-- IMPORT ERROR STARTS HERE  -->
-<br /><br /><br />
-<table align="center" cellpadding="5" cellspacing="0" width="95%" class="leadTable">
-<tr>
-	<td colspan="2" bgcolor="#FFFFFF" height="50" valign="middle" align="left" class="genHeaderSmall">{$MOD.LBL_MODULE_NAME} {$MODULE}</td>
-</tr>
-	<tr bgcolor="#ECECEC"><td colspan="2" align="left" valign="top">&nbsp;</td></tr>
-	<tr bgcolor="#ECECEC">
-		<td colspan="2" align="left" valign="top" style="padding-left:40px;">
-			<span class="genHeaderSmall">{$MOD.LBL_MODULE_NAME} {$MOD.LBL_ERROR}</span> 
-		</td>
-	</tr>
-	
-	<tr bgcolor="#ECECEC"><td align="left" valign="top" colspan="2">&nbsp;</td></tr>
-	<tr bgcolor="#ECECEC"><td align="left" valign="top" colspan="2" style="padding-left:80px;"><font color="red" size="2px">{$MESSAGE}</font></td></tr>
-
-	<tr bgcolor="#ECECEC"><td colspan="2" height="50">&nbsp;</td></tr>
-
-	<tr bgcolor="#ECECEC"><td colspan="2"><hr /></td></tr>
-	<tr bgcolor="#ECECEC">
-		<td colspan="2" align="right" style="padding-right:40px;">
-			<input title="{$MOD.LBL_TRY_AGAIN}" accessKey="" class="classBtn" type="submit" name="button" value=" {$MOD.LBL_TRY_AGAIN} "  >
-		</td>
-	</tr>
-	<tr bgcolor="#ECECEC"><td colspan="2" align="right" valign="top">&nbsp;</td></tr>
+		   <tr bgcolor="#ECECEC"><td colspan="2" height="50">&nbsp;</td></tr>
+		   <tr bgcolor="#ECECEC"><td colspan="2"><hr /></td></tr>
+		   <tr bgcolor="#ECECEC">
+			<td colspan="2" align="right" style="padding-right:40px;">
+				<input title="{$MOD.LBL_TRY_AGAIN}" accessKey="" class="classBtn" type="submit" name="button" value=" {$MOD.LBL_TRY_AGAIN} "  >
+			</td>
+		   </tr>
+		   <tr bgcolor="#ECECEC"><td colspan="2" align="right" valign="top">&nbsp;</td>
+		   </tr>
+		</table>
+		<br />
+		</form>
+	</td>
+   </tr>
 </table>
-<br />
-</form>
-</td></tr>
-</table>

Modified: vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/ListView.tpl
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/ListView.tpl (original)
+++ vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/ListView.tpl Thu May 11 17:39:58 2006
@@ -115,7 +115,7 @@
 <form name="basicSearch" action="index.php">
 <table width="80%" cellpadding="5" cellspacing="0" style="border:1px dashed #CCCCCC;" class="small" align="center">
 	<tr>
-		<td width="15%" class="dvtCellLabel" nowrap align="right"><img src="{$IMAGE_PATH}basicSearchLens.gif" align="absmiddle" alt="Basic Search" title="Basic Search" border=0>&nbsp;<b>Search {$MODULE} for</b></td>
+		<td width="15%" class="dvtCellLabel" nowrap align="right"><img src="{$IMAGE_PATH}basicSearchLens.gif" align="absmiddle" alt="{$APP.LNK_BASIC_SEARCH}" title="{$APP.LNK_BASIC_SEARCH}" border=0>&nbsp;&nbsp;<b>Search for</b></td>
 		<td width="25%" class="dvtCellLabel"><input type="text"  class="txtBox" name="search_text"></td>
 		<td width="25%" class="dvtCellLabel"><b>In</b>&nbsp;
 			<select name ="search_field" class="txtBox">
@@ -130,7 +130,7 @@
 		</td>
 		<td width="35%" class="dvtCellLabel">
 			  <input name="submit" type="button" class="classBtn" onClick="callSearch('Basic');" value=" Search Now ">&nbsp;
-			   <span class="hiliteBtn4Search"><a href="#" onClick="hide('searchAcc');show('advSearch');document.basicSearch.searchtype.value='advance';">Go to Advanced Search</a></span>	
+			   <span class="hiliteBtn4Search"><a href="#" onClick="hide('searchAcc');show('advSearch');document.basicSearch.searchtype.value='advance';">Go to {$APP.LNK_ADVANCED_SEARCH}</a></span>	
 							</td>
 	</tr>
 	<tr>
@@ -148,10 +148,10 @@
 <div id="advSearch" style="display:none;">
 		<table  cellspacing=0 cellpadding=5 width=80% style="border-top:1px dashed #CCCCCC;border-left:1px dashed #CCCCCC;border-right:1px dashed #CCCCCC;" class="small" align="center">
 			<tr>
-					<td width="15%"  class="dvtCellLabel" align="right"><img src="{$IMAGE_PATH}advancedSearchLens.gif" alt="Advanced Search" title="Advanced Search" border=0></td>
+					<td width="15%"  class="dvtCellLabel" align="right"><img src="{$IMAGE_PATH}advancedSearchLens.gif" alt="{$APP.LNK_ADVANCED_SEARCH}" title="{$APP.LNK_ADVANCED_SEARCH}" border=0></td>
 					<td nowrap width="30%" class="dvtCellLabel"><b><input name="matchtype" type="radio" value="all">&nbsp;Match All of the Following</b></td>
 					<td nowrap class="dvtCellLabel" width="30%"><b><input name="matchtype" type="radio" value="any" checked>&nbsp;Match Any of the Following</b></td>
-					<td width="35%" class="dvtCellLabel"><span class="hiliteBtn4Search"><a href="#" onClick="show('searchAcc');hide('advSearch')">Go to Basic Search</a></span></td>
+					<td width="35%" class="dvtCellLabel"><span class="hiliteBtn4Search"><a href="#" onClick="show('searchAcc');hide('advSearch')">Go to {$APP.LNK_BASIC_SEARCH}</a></span></td>
 			</tr>
 		</table>
 		<table style="border-left:1px dashed #CCCCCC;border-right:1px dashed #CCCCCC;" cellpadding="2" cellspacing="0" width="80%" align="center" class="small">
@@ -238,7 +238,7 @@
                                         {/if}
 
                                  {/foreach}
-                                             <input class="small" type="button" value="Change Owner" onclick="return change(this,'changeowner')"/>
+                                             <input class="small" type="button" value="{$APP.LBL_CHANGE_OWNER}" onclick="return change(this,'changeowner')"/>
                     </td>
 				 <td style="padding-right:20px" class="small" nowrap>{$RECORD_COUNTS}</td>
 		        	 <td nowrap >
@@ -303,7 +303,7 @@
                                         {/if}
 
                                  {/foreach}
-                                             <input class="small" type="button" value="Change Owner" onclick="return change(this,'changeowner')"/>
+                                             <input class="small" type="button" value="{$APP.LBL_CHANGE_OWNER}" onclick="return change(this,'changeowner')"/>
                     </td>
 				 <td style="padding-right:20px" class="small" nowrap>{$RECORD_COUNTS}</td>
 				 <td nowrap >

Modified: vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/ListViewEntries.tpl
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/ListViewEntries.tpl (original)
+++ vtigercrm/branches/5.0_postgresql_integration/Smarty/templates/ListViewEntries.tpl Thu May 11 17:39:58 2006
@@ -42,6 +42,8 @@
 					</table>
                                  </td>
 				 <td width=100% align="right">
+				 <!-- This if condition is added to hide the Custom View Links in Imported ListView -->
+				 {if $HIDE_CUSTOM_LINKS neq 1}
 				   <table border=0 cellspacing=0 cellpadding=0 class="small">
 					<tr>
 						<td>{$APP.LBL_VIEW}</td>
@@ -62,6 +64,7 @@
 						    {/if}	
 					</tr>
 				   </table>
+				 {/if}
 				 </td>	
                		      </tr>
 			 </table>

Modified: vtigercrm/branches/5.0_postgresql_integration/include/js/ListView.js
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/include/js/ListView.js (original)
+++ vtigercrm/branches/5.0_postgresql_integration/include/js/ListView.js Thu May 11 17:39:58 2006
@@ -52,7 +52,7 @@
 function massDelete(module)
 {
         x = document.massdelete.selected_id.length;
-	var viewid = document.massdelete.viewname.value;
+		var viewid = document.massdelete.viewname.value;
         idstring = "";
 
         if ( x == undefined)
@@ -60,7 +60,8 @@
 
                 if (document.massdelete.selected_id.checked)
                 {
-                        document.massdelete.idlist.value=document.massdelete.selected_id.value;
+                        idstring = document.massdelete.selected_id.value+':';
+                		xx = 1;
                 }
                 else
                 {

Modified: vtigercrm/branches/5.0_postgresql_integration/include/js/search.js
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/include/js/search.js (original)
+++ vtigercrm/branches/5.0_postgresql_integration/include/js/search.js Thu May 11 17:39:58 2006
@@ -1,12 +1,14 @@
-function searchshowhide(argg)
+function searchshowhide(argg,argg2)
 {
     var x=document.getElementById(argg).style
-    if (x.display=="none")
+    var y=document.getElementById(argg2).style
+    if (x.display=="none" && y.display=="none")
     {
         x.display="block"
    
     }
     else {
+	    y.display="none"
             x.display="none"
           }
 }

Modified: vtigercrm/branches/5.0_postgresql_integration/include/language/en_us.lang.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/include/language/en_us.lang.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/include/language/en_us.lang.php Thu May 11 17:39:58 2006
@@ -228,9 +228,9 @@
 
 
 
-'LNK_ADVANCED_SEARCH'=>'Advanced',
-
-'LNK_BASIC_SEARCH'=>'Basic',
+'LNK_ADVANCED_SEARCH'=>'Advanced Search',
+
+'LNK_BASIC_SEARCH'=>'Basic Search',
 
 'LNK_EDIT'=>'edit',
 

Modified: vtigercrm/branches/5.0_postgresql_integration/index.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/index.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/index.php Thu May 11 17:39:58 2006
@@ -215,13 +215,6 @@
  	         header( "Pragma: no-cache" );        
  	}
 
-	if ( $action == "Import" &&
-                isset($_REQUEST['step']) &&
-                $_REQUEST['step'] == '4'  )
-        {
-                $skipHeaders=true;
-                $skipFooters=true;
-        }
         if($module == 'Users' || $module == 'Home' || $module == 'Administration' || $module == 'uploads' || $module == 'Calendar')
         {
           $skipSecurityCheck=true;

Modified: vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/Appointment.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/Appointment.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/Appointment.php Thu May 11 17:39:58 2006
@@ -27,6 +27,8 @@
 	var $record;
 	var $image_name;
 	var $formatted_datetime;
+	var $duration_min;
+	var $duration_hour;
 
 	function Appointment()
 	{
@@ -34,11 +36,11 @@
 		$this->participant_state = Array();
 		$this->description = "";
 	}	
-	function readAppointment($userid, &$from_datetime, &$to_datetime)
+	function readAppointment($userid, &$from_datetime, &$to_datetime, $view)
 	{
 		global $current_user,$adb;
 		$shared_ids = getSharedCalendarId($current_user->id,'shared');		
-                $q= "select activity.*,crmentity.*,account.accountname,account.accountid,activitygrouprelation.groupname FROM activity inner join crmentity on activity.activityid = crmentity.crmid left outer join activitygrouprelation on activitygrouprelation.activityid=activity.activityid left join cntactivityrel on activity.activityid = cntactivityrel.activityid left join contactdetails on cntactivityrel.contactid = contactdetails.contactid left join account  on contactdetails.accountid = account.accountid inner join salesmanactivityrel on salesmanactivityrel.activityid=activity.activityid WHERE activity.activitytype in ('Call','Meeting') AND ";
+                $q= "select activity.*, crmentity.*, account.accountname,account.accountid,activitygrouprelation.groupname FROM activity inner join crmentity on activity.activityid = crmentity.crmid left join recurringevents on activity.activityid=recurringevents.activityid left outer join activitygrouprelation on activitygrouprelation.activityid=activity.activityid left join cntactivityrel on activity.activityid = cntactivityrel.activityid left join contactdetails on cntactivityrel.contactid = contactdetails.contactid left join account  on contactdetails.accountid = account.accountid inner join salesmanactivityrel on salesmanactivityrel.activityid=activity.activityid WHERE activity.activitytype in ('Call','Meeting') AND ";
 
                 if(!is_admin($current_user))
                 {
@@ -52,10 +54,10 @@
                 {
                         $q .= "  ) AND ((crmentity.smownerid ='".$current_user->id."' and salesmanactivityrel.smid = '".$current_user->id."') or (crmentity.smownerid in ($shared_ids) and salesmanactivityrel.smid in ($shared_ids) and activity.visibility='Public'))";
                 }
-                $q .= " AND crmentity.deleted = 0)";
+                $q .= " AND crmentity.deleted = 0) AND recurringevents.activityid is NULL ";
                 $q .= " ORDER by activity.date_start,activity.time_start";
 
-
+		//echo $q;
 		$r = $adb->query($q);
                 $n = $adb->getRowCount($r);
                 $a = 0;
@@ -65,18 +67,48 @@
                         $obj = &new Appointment();
                         $result = $adb->fetchByAssoc($r);
                         //echo '<pre>' print_r($result);echo '</pre>';
-                        $obj->readResult($result);
+                        $obj->readResult($result, $view);
 			//$list_arr[$obj->record] = $obj;
                         $a++;
 			$list[] = $obj;
                         unset($obj);
                 }
+		//Get Recurring events
+		$q = "SELECT activity.activityid, activity.subject, activity.activitytype, crmentity.description, activity.time_start, activity.duration_hours, activity.duration_minutes, activity.priority, activity.location,activity.eventstatus, crmentity.*, recurringevents.recurringid, recurringevents.recurringdate as date_start ,recurringevents.recurringtype,account.accountname,account.accountid,activitygrouprelation.groupname from activity inner join crmentity on activity.activityid = crmentity.crmid inner join recurringevents on activity.activityid=recurringevents.activityid left outer join activitygrouprelation on activitygrouprelation.activityid=activity.activityid left join cntactivityrel on activity.activityid = cntactivityrel.activityid left join contactdetails on cntactivityrel.contactid = contactdetails.contactid left join account  on contactdetails.accountid = account.accountid inner join salesmanactivityrel on salesmanactivityrel.activityid=activity.activityid";
+
+                $q.=" where ( activity.activitytype in ('Call','Meeting') AND ";
+                if(!is_admin($current_user))
+                {
+                        $q .= " ( ";
+                }
+                $q .= "  (recurringdate < '".$to_datetime->get_formatted_date()."' AND recurringdate >= '".$from_datetime->get_formatted_date(). "') ";
+                if(!is_admin($current_user))
+                {
+			$q .= " ) AND ((crmentity.smownerid ='".$current_user->id."' and salesmanactivityrel.smid = '".$current_user->id."' ) or (crmentity.smownerid in ($shared_ids) and salesmanactivityrel.smid in ($shared_ids) and activity.visibility='Public'))";
+                }
+
+                $q .= " AND crmentity.deleted = 0 )" ;
+                $q .= " ORDER by recurringid";
+                $r = $adb->query($q);
+                $n = $adb->getRowCount($r);
+                $a = 0;
+		while ( $a < $n )
+                {
+			$obj = &new Appointment();
+                        $result = $adb->fetchByAssoc($r);
+                        $obj->readResult($result,$view);
+                        $a++;
+			$list[] = $obj;
+                        unset($obj);
+                }
+
+
 		usort($list,'compare');
 		//echo '<pre>';print_r($list);echo '</pre>';
 		return $list;
 	}
 
-	function readResult($act_array)
+	function readResult($act_array, $view)
 	{
 		$format_sthour='';
                 $format_stmin='';
@@ -137,6 +169,8 @@
                 $this->end_time          = new DateTime($end_date_arr,true);
                 $this->subject           = $act_array["subject"];
                 $this->activity_type     = $act_array["activitytype"];
+		$this->duration_hour     = $act_array["duration_hours"];
+		$this->duration_minute   = $act_array["duration_minutes"];
 		if($act_array["activitytype"] == 'Call')
 		{
 			$this->image_name = 'Calls.gif';
@@ -146,7 +180,10 @@
 			$this->image_name = 'Meetings.gif';
 		}
                 $this->record            = $act_array["activityid"];
-		$this->formatted_datetime= $act_array["date_start"].":".$st_hour;
+		if($view == 'day')
+			$this->formatted_datetime= $act_array["date_start"].":".$st_hour;
+		else
+			$this->formatted_datetime= $act_array["date_start"];
 		return;
 	}
 	

Modified: vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/Calendar.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/Calendar.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/Calendar.php Thu May 11 17:39:58 2006
@@ -53,8 +53,8 @@
 			case 'day':
 				$day_start_hour = $this->day_start_hour;
 				$day_end_hour = $this->day_end_hour;
-				$dayview_hours = $day_end_hour - $day_start_hour;
-				for($i=0;$i<=$dayview_hours;$i++)
+				//$dayview_hours = $day_end_hour - $day_start_hour;
+				for($i=$day_start_hour;$i<=$day_end_hour;$i++)
 				{
 					$layout = new Layout('hour',$this->date_time->getTodayDatetimebyIndex($i));
 					$this->day_slice[$layout->start_time->get_formatted_date().':'.$layout->start_time->hour] = $layout;
@@ -127,21 +127,44 @@
 	{
 		if ( $this->view == 'week')
 		{
+			$start_datetime = $this->date_time->getThisweekDaysbyIndex(0);
 			$end_datetime = $this->date_time->get_first_day_of_changed_week('increment');
-                } else {
+                } elseif($this->view == 'month') {
+			$start_datetime = $this->date_time->getThismonthDaysbyIndex(0);
+			$end_datetime = $this->date_time->get_first_day_of_changed_month('increment');
+		} else {
+			$start_datetime = $this->date_time;
                         $end_datetime = $this->date_time->get_changed_day('increment');
                 }
 		
 		$activities = Array();
-		$activities = Appointment::readAppointment($current_user->id,$this->date_time,$end_datetime);
+		$activities = Appointment::readAppointment($current_user->id,$start_datetime,$end_datetime,$this->view);
+		
 		if(!empty($activities))
 		{
 			foreach($activities as $key=>$value)
 			{
 				if($this->view == 'day')
-					array_push($this->day_slice[$value->formatted_datetime]->activities,  $value);
+				{
+					array_push($this->day_slice[$value->formatted_datetime]->activities, $value);
+				}
+				elseif($this->view == 'week')
+				{
+			
+				}
+				elseif($this->view == 'month')
+				{
+					array_push($this->month_array[$value->formatted_datetime]->activities,$value);
+				}
+				elseif($this->view == 'year')
+				{
+				}
+				else
+					die("view:".$this->view." is not defined");
+
 			}
 		}
+		//echo '<pre>';print_r($this->month_array);echo'</pre>';
 		
 	}
 	

Modified: vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/Date.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/Date.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/Date.php Thu May 11 17:39:58 2006
@@ -1,15 +1,15 @@
 <?php
 class DateTime
 {
-	var $second;
-	var $minute;
-	var $hour;
-	var $ms_hour;
+	var $second = '00';
+	var $minute = '00';
+	var $hour = '00';
+	var $z_hour = '00';
 	var $day;
-	var $ms_day;
+	var $z_day;
 	var $week;
 	var $month;
-	var $ms_month;
+	var $z_month;
 	var $year;
 	var $dayofweek;
 	var $dayofyear;
@@ -182,16 +182,16 @@
                 list(
                 $this->minute,
                 $this->hour,
-		$this->ms_hour,
+		$this->z_hour,
                 $this->day,
-		$this->ms_day,
+		$this->z_day,
                 $this->daysinmonth,
                 $this->dayofweek,
                 $this->dayofyear,
                 $is_leap,
                 $this->week,
                 $this->month,
-		$this->ms_month,
+		$this->z_month,
                 $this->year,
                 $this->offset,
 		$this->tz,
@@ -255,11 +255,11 @@
 	}
 	function get_formatted_date()
         {
-                return $this->year."-".$this->ms_month."-".$this->ms_day;
+                return $this->year."-".$this->z_month."-".$this->z_day;
         }
         function get_formatted_time()
         {
-                return $this->ms_hour.":".$this->min;
+                return $this->z_hour.":".$this->min;
         }
 	
 	function get_changed_day($mode)

Modified: vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/addEventUI.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/addEventUI.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/addEventUI.php Thu May 11 17:39:58 2006
@@ -59,15 +59,15 @@
 				<td width=50% valign=top style="border-right:1px solid #dddddd">
 					<table border=0 cellspacing=0 cellpadding=2 width=90%>
 					<tr><td colspan=3 ><b>Event starts at</b></td></tr>
-				        <tr><td><input type="text" name="time_start" value="12:00 AM" class="textbox" style="width:90px"></td><td width=50%><img border=0 src="<?echo $image_path?>btnL3Clock.gif" alt="Set time.." title="Set time.."></td></tr>
-                                        <tr><td><input type="text" name="date_start" value="20 Dec 2005" class="textbox" style="width:90px"></td><td width=50%><img border=0 src="<?echo $image_path?>btnL3Calendar.gif" alt="Set date.." title="Set date.."></td></tr>
+				        <tr><td><input type="text" name="time_start" id="time_start" value="" class="textbox" style="width:90px"></td><td width=50%><img border=0 src="<?echo $image_path?>btnL3Clock.gif" alt="Set time.." title="Set time.."></td></tr>
+                                        <tr><td><input type="text" name="date_start" id="date_start" value="" class="textbox" style="width:90px"></td><td width=50%><img border=0 src="<?echo $image_path?>btnL3Calendar.gif" alt="Set date.." title="Set date.."></td></tr>
 					</table>
 				</td>
 				<td width=50% valign=top >
 					<table border=0 cellspacing=0 cellpadding=2 width=90%>
 					<tr><td><b>Event ends on</b></td></tr>
-				        <tr><td><input type="text" value="12:00 AM" class="textbox" style="width:90px"></td><td width=100%><img border=0 src="<?echo $image_path?>btnL3Clock.gif" alt="Set time.." title="Set time.."></td></tr>
-				        <tr><td><input type="text" name="due_date" value="20 Dec 2005" class="textbox" style="width:90px"></td><td width=100%><img border=0 src="<?echo $image_path?>btnL3Calendar.gif" alt="Set date.." title="Set date.."></td></tr>
+				        <tr><td><input type="text" name="time_end" id="time_end" value="" class="textbox" style="width:90px"></td><td width=100%><img border=0 src="<?echo $image_path?>btnL3Clock.gif" alt="Set time.." title="Set time.."></td></tr>
+				        <tr><td><input type="text" name="due_date" id="due_date" value="" class="textbox" style="width:90px"></td><td width=100%><img border=0 src="<?echo $image_path?>btnL3Calendar.gif" alt="Set date.." title="Set date.."></td></tr>
 					</table>
 				</td>
 				</tr>

Modified: vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/calendarLayout.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/calendarLayout.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/calendarLayout.php Thu May 11 17:39:58 2006
@@ -94,16 +94,20 @@
 //use getPendingActivities() method of Activities/OpenListView.php to get pending activities
 function get_cal_header_data(& $cal_arr)
 {
+	//echo '<pre>'; print_r($cal_arr); echo '</pre>';
+	$format = $cal_arr['calendar']->hour_format;
+	$hour_startat = convertTime2UserSelectedFmt($format,$cal_arr['calendar']->day_start_hour); 
+	$hour_endat = convertTime2UserSelectedFmt($format,($cal_arr['calendar']->day_start_hour+1));
 	$headerdata = "";
 	$headerdata .="<table align='center' border='0' cellpadding='5' cellspacing='0' width='98%'>
 			<tr><td colspan='3'>&nbsp;</td></tr>
 			<tr>
 				<td class='tabSelected' style='border: 1px solid rgb(102, 102, 102);' align='center' width='10%'>
-					<a onClick='gshow(\"addEvent\")' href='javascript:void(0)'>Add Event</a>
+					<a onClick='gshow(\"addEvent\",\"".$cal_arr['calendar']->date_time->get_formatted_date()."\",\"".$cal_arr['calendar']->date_time->get_formatted_date()."\",\"".$hour_startat."\",\"".$hour_endat."\")' href='javascript:void(0)'>Add Event</a>
 					<img src='".$cal_arr['IMAGE_PATH']."menuDnArrow.gif' style='padding-left: 5px;' border='0'>
 				</td>
 				<td align='center' width='65%'>";
-	$headerdata .= get_event_todo_info($cal_arr,'listcnt'); 
+	$headerdata .= getEventTodoInfo($cal_arr,'listcnt'); 
 	$headerdata .= "	</td>
 				<td align='right' width='25%'><b>View : </b>";
 	$view_options = getEventViewOption($cal_arr);
@@ -188,19 +192,19 @@
 {
 	if($view['view'] == 'day')
 	{
-		get_dayview_layout($view,$type);
+		getDayViewLayout($view,$type);
 	}
 	elseif($view['view'] == 'week')
 	{
-		 get_weekview_layout($view,$type);
+		 getWeekViewLayout($view,$type);
 	}
 	elseif($view['view'] == 'month')
 	{
-		 get_monthview_layout($view,$type);
+		 getMonthViewLayout($view,$type);
 	}
 	elseif($view['view'] == 'year')
 	{
-		 get_yearview_layout($view,$type);
+		 getYearViewLayout($view,$type);
 	}
 	else
 	{
@@ -255,17 +259,18 @@
 	
 }
 
-function get_dayview_layout(& $cal,$type)
+function getDayViewLayout(& $cal,$type)
 {
 	$day_start_hour = $cal['calendar']->day_start_hour;
 	$day_end_hour = $cal['calendar']->day_end_hour;
-        $dayview_hours = $day_end_hour - $day_start_hour;
+	$format = $cal['calendar']->hour_format;
 	$dayview_layout = '';
 	$dayview_layout .= '<br><!-- HOUR VIEW LAYER STARTS HERE -->
                 <div id="hrView_'.$type.'">
                         <table border="0" cellpadding="10" cellspacing="0" width="98%">';
-        for($i=0;$i<=$dayview_hours;$i++)
-        {
+        for($i=$day_start_hour;$i<=$day_end_hour;$i++)
+        {
+		
 		if($cal['calendar']->hour_format == 'am/pm')
 		{
 			if($i == 12)
@@ -290,6 +295,9 @@
 			$hour = $i;
                         $sub_str = ':00';
 		}
+		$y = $i+1;
+		$hour_startat = convertTime2UserSelectedFmt($format,$i);
+	        $hour_endat = convertTime2UserSelectedFmt($format,$y);
 		$dayview_layout .= '<tr>
 					<td style="border-right: 1px solid rgb(102, 102, 102);" align="right" width="10%">
 						<span class="genHeaderBig">'.$hour.'</span>
@@ -297,13 +305,13 @@
 					</td>
 					<td style="border-bottom: 1px solid rgb(204, 204, 204); width:5%;" onmouseover="show(\''.$hour.''.$sub_str.'\')" onmouseout="hide(\''.$hour.''.$sub_str.'\')" height="65">
 			                	<div id="'.$hour.''.$sub_str.'" style="display: none;">
-							<a onClick="gshow(\'addEvent\')" href="javascript:void(0)"><img src="'.$cal['IMAGE_PATH'].'cal_add.jpg" border="0"></a>
+							<a onClick="gshow(\'addEvent\',\''.$cal['calendar']->date_time->get_formatted_date().'\',\''.$cal['calendar']->date_time->get_formatted_date().'\',\''.$hour_startat.'\',\''.$hour_endat.'\')" href="javascript:void(0)"><img src="'.$cal['IMAGE_PATH'].'cal_add.jpg" border="0"></a>
 						</div>
 					</td>
 					<td style="border-bottom: 1px solid rgb(204, 204, 204);">';
 		//echo '<pre>';print_r($cal);echo '</pre>';
 		
-		$dayview_layout .= getEventLayer($cal,$cal['calendar']->slices[$i]);
+		$dayview_layout .= getdayEventLayer($cal,$cal['calendar']->slices[$i]);
 		/*get events/tasks that has current date as starting time
 			*/
 		//$dayview_layout .= 
@@ -316,7 +324,7 @@
 	echo $dayview_layout;		
 }
 
-function get_weekview_layout(& $cal,$type)
+function getWeekViewLayout(& $cal,$type)
 {
         $day_start_hour = $cal['calendar']->day_start_hour;
         $day_end_hour = $cal['calendar']->day_end_hour;
@@ -346,7 +354,7 @@
 	}
 	$weekview_layout .= '</tr></table>';
 	$weekview_layout .= '<table border="0" cellpadding="10" cellspacing="1" width="98%" class="calDayHour" style="background-color: #dadada">';
-	for($i=0;$i<=$dayview_hours;$i++)
+	for($i=$day_start_hour;$i<=$day_end_hour;$i++)
 	{
 		$weekview_layout .= '<tr>';
 		for ($column=1;$column<=1;$column++)
@@ -382,11 +390,6 @@
 		}
 		for ($column=0;$column<=6;$column++)
 		{
-			/*$weekview_layout .= '<td class="cellNormal" onmouseover="show(\''.$hour.''.$sub_str.'\')" onmouseout="hide(\''.$hour.''.$sub_str.'\')" style="height: 40px;" bgcolor="white" valign="top" width="12%">
-                                                <div id="'.$hour.''.$sub_str.'" style="display: none;" valign="bottom">
-                                                        <a onClick="gshow(\'addEvent\')" href="javascript:void(0)"><img src="'.$cal['IMAGE_PATH'].'cal_add.jpg" border="0"></a>
-                                                </div>
-                                        </td>';*/
 			$weekview_layout .= '<td class="cellNormal" onclick="gshow(\'addEvent\')" onmouseover="this.className=\'cellNormalHover\'" onmouseout="this.className=\'cellNormal\'" style="height: 40px;" bgcolor="white" valign="top" width="12%">';
 			$weekview_layout .= '</td>';
 		}
@@ -397,7 +400,7 @@
 		
 }
 	
-function get_monthview_layout(& $cal,$type)
+function getMonthViewLayout(& $cal,$type)
 {
 	$count = 0;
         if ($cal['calendar']->month_array[$cal['calendar']->slices[35]]->start_time->month != $cal['calendar']->date_time->month) {
@@ -405,7 +408,9 @@
         } else {
                 $rows = 6;
         }
-	
+	$format = $cal['calendar']->hour_format;
+        $hour_startat = convertTime2UserSelectedFmt($format,$cal['calendar']->day_start_hour);
+        $hour_endat = convertTime2UserSelectedFmt($format,($cal['calendar']->day_start_hour+1));
 	$monthview_layout = '';
 	$monthview_layout .= '<br><!-- HOUR VIEW LAYER STARTS HERE -->
 		<div id="hrView_'.$type.'" style = "padding:5px">
@@ -417,6 +422,7 @@
 	}
 	$monthview_layout .= '</tr></table>';
 	$monthview_layout .= '<table border=0 cellspacing=1 cellpadding=5 width=100% class="calDayHour" style="background-color: #dadada">';
+	$cnt = 0;
 	for ($i = 0; $i < $rows; $i ++)
 	{
 	        $monthview_layout .= '<tr>';
@@ -436,16 +442,12 @@
 		$monthview_layout .= '<tr>';
 		for ($j = 0; $j < 7; $j ++)
 		{
-			//$cal['slice'] = $cal['calendar']->month_array[$cal['calendar']->slices[$count]];
-			$monthview_layout .= '<td onClick="gshow(\'addEvent\')" onMouseOver="this.className=\'cellNormalHover\'" onMouseOut="this.className=\'cellNormal\'" bgcolor="white" height="90" valign="top" width="200">';//style="height:40px" width=12% valign=top>';
-		        /*$monthview_layout .= '<a href="index.php?module=Calendar&action=index&view='.$cal['slice']->getView().'&'.$cal['slice']->start_time->get_date_str().'">';
-			if ($cal['slice']->start_time->getMonth() == $cal['calendar']->date_time->getMonth()) 			      {
-				$monthview_layout .= $cal['slice']->start_time->get_Date();
-                        }
-			$monthview_layout .= '</a>
-					<!--div valign=bottom align=right onclick="gshow(\'addEvent\')"  onMouseOut="ghide(\'12pm\')"  width=10%>+</div-->';
+			$temp_date = $cal['calendar']->month_array[$cal['calendar']->slices[$cnt]]->start_time->get_formatted_date();
+			$monthview_layout .= '<td onClick="gshow(\'addEvent\',\''.$temp_date.'\',\''.$temp_date.'\',\''.$hour_startat.'\',\''.$hour_endat.'\')" onMouseOver="this.className=\'cellNormalHover\'" onMouseOut="this.className=\'cellNormal\'" bgcolor="white" height="90" valign="top" width="200">';
+			$monthview_layout .= getmonthEventLayer($cal,$cal['calendar']->slices[$cnt]);
 			$monthview_layout .= '</td>';
-			$count++;*/
+			$cnt++;
+
 		}
 		$monthview_layout .= '</tr>';
 	}
@@ -454,12 +456,12 @@
 		
 }
 
-function get_yearview_layout(& $cal,$type)
-{
-}
-
-
-function getEventLayer(& $cal,$slice)
+function getYearViewLayout(& $cal,$type)
+{
+}
+
+
+function getdayEventLayer(& $cal,$slice)
 {
 	$eventlayer = '';
 	$arrow_img_name = '';
@@ -470,9 +472,16 @@
 		{
 			$arrow_img_name = 'event'.$cal['calendar']->day_slice[$slice]->start_time->hour.'_'.$i;
 			$subject = $act[$i]->subject;
+			$id = $act[$i]->record;
 			if(strlen($subject)>25)
 				$subject = substr($subject,0,25)."...";
-			$start_hour = $act[$i]->start_time->hour;
+			$start_time = $act[$i]->start_time->hour.':'.$act[$i]->start_time->minute;
+			$format = $cal['calendar']->hour_format;
+			$duration_hour = $act[$i]->duration_hour;
+			$duration_min = $act[$i]->duration_minute;
+			$st_end_time = convertStEdTime2UserSelectedFmt($format,$start_time,$duration_hour,$duration_min);
+			$start_hour = $st_end_time['starttime'];
+			$end_hour = $st_end_time['endtime'];
 			$account_name = $act[$i]->accountname;
 			$image = $cal['IMAGE_PATH'].''.$act[$i]->image_name;
 		$eventlayer .='<div class ="eventLay" id="'.$cal['calendar']->day_slice[$slice]->start_time->hour.'_'.$i.'">
@@ -480,8 +489,8 @@
 						<tr onmouseover="show(\''.$arrow_img_name.'\');" onmouseout="hide(\''.$arrow_img_name.'\');">
 						<td align="left" width="5%"><img src="'.$image.'" align="right top"></td>
 						<td align="left" width="85%"><span class="fontBold">'.$account_name.'</span><br>
-							'.$start_hour.',<span class="orgTab">'.$subject.'</span>&nbsp;
-							<a href="#" class="webMnu">[More...]</a>
+							<b>'.$start_hour.'</b>&nbsp;,<span class="orgTab">'.$subject.'</span>&nbsp;
+							<a href="index.php?action=DetailView&module=Activities&record='.$id.'&activity_mode=Events" class="webMnu">[More...]</a>
 					
 						</td>
 						<td align="right" width="5%">
@@ -496,6 +505,56 @@
 		}
 		return $eventlayer;
 	}
+}
+
+function getmonthEventLayer(& $cal,$slice)
+{
+	$eventlayer = '';
+	$arrow_img_name = '';
+	$act = $cal['calendar']->month_array[$slice]->activities;
+	//echo '<pre>';print_r($act);echo '</pre>';
+	if(!empty($act))
+        {
+		$no_of_act = count($act);
+		if($no_of_act>2)
+		{
+			$act_row = 2;
+			$remin_list = $no_of_act - $act_row;
+		}
+		else
+		{
+			$act_row = $no_of_act;
+			$remin_list = null;
+		}
+                for($i=0;$i<$act_row;$i++)
+                {
+                        $arrow_img_name = 'event'.$cal['calendar']->month_array[$slice]->start_time->hour.'_'.$i;
+			$id = $act[$i]->record;
+                        $subject = $act[$i]->subject;
+                        if(strlen($subject)>10)
+                                $subject = substr($subject,0,10)."...";
+			$start_time = $act[$i]->start_time->hour.':'.$act[$i]->start_time->minute;
+			$format = $cal['calendar']->hour_format;
+                        $duration_hour = $act[$i]->duration_hour;
+                        $duration_min = $act[$i]->duration_minute;
+                        $st_end_time = convertStEdTime2UserSelectedFmt($format,$start_time,$duration_hour,$duration_min);
+                        $start_hour = $st_end_time['starttime'];
+                        $end_hour = $st_end_time['endtime'];
+                        $account_name = $act[$i]->accountname;
+                        $image = $cal['IMAGE_PATH'].''.$act[$i]->image_name;
+			$eventlayer .='<div id="'.$cal['calendar']->month_array[$slice]->start_time->hour.'_'.$i.'">
+                                        <img src="'.$image.'" valign="absmiddle"><a href="index.php?action=DetailView&module=Activities&record='.$id.'&activity_mode=Events">&nbsp;<b>'.$start_hour.'</b>&nbsp;'.$subject.'</a>&nbsp;
+                                </div><br>';
+                }
+		if($remin_list != null)
+		{
+			$eventlayer .='<div valign=bottom align=right width=10%>
+					<a href="index.php?module=Calendar&action=index&view='.$cal['calendar']->month_array[$slice]->getView().'&'.$cal['calendar']->month_array[$slice]->start_time->get_date_str().'" class="webMnu">
+					+'.$remin_list.'&nbsp;More</a></div>';
+		}
+                return $eventlayer;
+        }
+
 }
 
 
@@ -543,120 +602,10 @@
 		$duration_hour = $adb->query_result($result,$i,"duration_hours");
                 $duration_min = $adb->query_result($result,$i,"duration_minutes");
 		$start_time = $adb->query_result($result,$i,"time_start");
-		$end_time = '';
-		list($hour,$min) = explode(":",$start_time);
-		if($calendar['calendar']->hour_format == 'am/pm')
-		{
-			//echo $start_time;
-			if($hour>'12')
-			{
-				$hour = $hour - 12;
-				$start_hour = $hour;
-				if($start_hour <= 9 && strlen(trim($start_hour)) < 2)
-                                        $start_hour = "0".$start_hour;
-				$start_time = $start_hour.":".$min."pm";
-				$end_min = $min+$duration_min;
-				$end_hour = $hour+$duration_hour;
-				if($end_min>=60)
-				{
-					$end_min = $end_min%60;
-					$end_hour++;
-				}
-				if($end_hour <= 9 && strlen(trim($end_hour)) < 2)
-                                        $end_hour = "0".$end_hour;
-				if($end_min <= 9 && strlen(trim($end_min)) < 2)
-					$end_min = "0".$end_min;
-				$end_time = $end_hour.":".$end_min."pm";
-				//echo $start_time;
-			}
-			elseif($hour == '12')
-			{
-				$start_hour = $hour;
-                                if($start_hour <= 9 && strlen(trim($start_hour)) < 2)
-                                        $start_hour = "0".$start_hour;
-				$start_time = $start_hour.":".$min."pm";
-				$end_min = $min+$duration_min;
-                                $end_hour = $hour+$duration_hour;
-				if($end_min>=60)
-                                {
-                                        $end_min = $end_min%60;
-                                        $end_hour++;
-                                }
-				if($end_hour>'12')
-                                {
-                                        $end_hour = $end_hour - 12;
-					if($end_hour <= 9 && strlen(trim($end_hour)) < 2)
-	                                        $end_hour = "0".$end_hour;
-                                        if($end_min <= 9 && strlen(trim($end_min)) < 2)
-                                                $end_min = "0".$end_min;
-                                        $end_time = $end_hour.":".$end_min."pm";
-                                }
-                                else
-                                {
-					if($end_hour <= 9 && strlen(trim($end_hour)) < 2)
-	                                        $end_hour = "0".$end_hour;
-                                        if($end_min <= 9 && strlen(trim($end_min)) < 2)
-                                                $end_min = "0".$end_min;
-                                        $end_time  = $end_hour.":".$end_min."am";
-                                }
-			}
-			else
-			{
-				$start_hour = $hour;
-                                if($start_hour <= 9 && strlen(trim($start_hour)) < 2)
-                                        $start_hour = "0".$start_hour;
-				$start_time = $start_hour.":".$min."am";
-				$end_min = $min+$duration_min;
-                                $end_hour = $hour+$duration_hour;
-				if($end_min>=60)
-                                {
-                                        $end_min = $end_min%60;
-                                        $end_hour++;
-                                }
-				if($end_hour>='12')
-				{
-					if($end_hour == '12' && $end_hour > '00')
-						$end_hour = $end_hour;
-					else
-						$end_hour = $end_hour - 12;
-					if($end_hour <= 9 && strlen(trim($end_hour)) < 2)
-	                                        $end_hour = "0".$end_hour;
-					if($end_min <= 9 && strlen(trim($end_min)) < 2)
-	                                        $end_min = "0".$end_min;
-					$end_time = $end_hour.":".$end_min."pm";
-				}
-				else
-				{
-					if($end_hour <= 9 && strlen(trim($end_hour)) < 2)
-	                                        $end_hour = "0".$end_hour;
-					if($end_min <= 9 && strlen(trim($end_min)) < 2)
-	                                        $end_min = "0".$end_min;
-				 	$end_time  = $end_hour.":".$end_min."am";
-				}
-				
-			}
-			$element['starttime'] = $start_time;
-			$element['endtime'] = $end_time;
-		}
-		else
-		{
-                        $hour = $hour;
-                        $min = $min;
-			$end_min = $min+$duration_min;
-                        $end_hour = $hour+$duration_hour;
-			if($end_min>=60)
-                        {
-                                $end_min = $end_min%60;
-                                $end_hour++;
-                        }
-			if($end_hour <= 9 && strlen(trim($end_hour)) < 2)
-				$end_hour = "0".$end_hour;
-			if($end_min <= 9 && strlen(trim($end_min)) < 2)
-	                        $end_min = "0".$end_min;
-			$end_time  = $end_hour.":".$end_min;
-			$element['starttime'] = $start_time;
-			$element['endtime'] = $end_time;
-		}
+		$format = $calendar['calendar']->hour_format;
+		$st_end_time = convertStEdTime2UserSelectedFmt($format,$start_time,$duration_hour,$duration_min);
+		$element['starttime'] = $st_end_time['starttime'];
+                $element['endtime'] = $st_end_time['endtime'];
 		$contact_id = $adb->query_result($result,$i,"contactid");
 		$id = $adb->query_result($result,$i,"activityid");
 		$subject = $adb->query_result($result,$i,"subject");
@@ -690,7 +639,7 @@
 	return $todo;
 }
 
-function get_event_todo_info(& $cal, $mode)
+function getEventTodoInfo(& $cal, $mode)
 {
 	$event_todo = Array();
 	$event_todo['event']=getListView($cal, $mode);
@@ -728,23 +677,191 @@
                              );
 	$list_view .="<br><table style='background-color: rgb(204, 204, 204);' class='small' align='center' border='0' cellpadding='5' cellspacing='1' width='98%'>
                         <tr>";
-        for($i=0;$i<count($header);$i++)
+	$header_rows = count($header);
+        for($i=0;$i<$header_rows;$i++)
         {
                 $list_view .="<td class='lvtCol' width='".$header_width[$i]."'>".$header[$i]."</td>";
         }
         $list_view .="</tr>";
-	for($i=0;$i<count($entry_list);$i++)
-        {
-		$list_view .="<tr class='lvtColData' onmouseover='this.className=\"lvtColDataHover\"' onmouseout='this.className=\"lvtColData\"' bgcolor='white'>";
-		foreach($entry_list[$i] as $key=>$entry)
-        	{
-                	 $list_view .="<td>".$entry."</td>";
-	        }
-        	$list_view .="</tr>";
+	$rows = count($entry_list);
+	if($rows != 0)
+	{
+		for($i=0;$i<count($entry_list);$i++)
+		{
+			$list_view .="<tr class='lvtColData' onmouseover='this.className=\"lvtColDataHover\"' onmouseout='this.className=\"lvtColData\"' bgcolor='white'>";
+			foreach($entry_list[$i] as $key=>$entry)
+			{
+				$list_view .="<td>".$entry."</td>";
+			}
+			$list_view .="</tr>";
+		}
+	}
+	else
+	{
+		$list_view .="<tr style='height: 25px;' bgcolor='white'>";
+                	$list_view .="<td colspan='".$header_rows."'><i>None Scheduled</i></td>";
+                $list_view .="</tr>";
 	}
 	$list_view .="</table>";
 	echo $list_view;
 }
 
+function convertTime2UserSelectedFmt($format,$time)
+{
+	if($format == 'am/pm')
+        {
+		if($time>='12')
+                {
+			if($time == '12')
+				$hour = $time;
+			else
+				$hour = $time - 12;
+			/*if($hour <= 9 && strlen(trim($hour)) < 2)
+                                $hour = "0".$hour;*/
+			$hour = $hour.":00pm";
+		}
+		else
+                {
+                        $hour = $time;
+                        /*if($hour <= 9 && strlen(trim($hour)) < 2)
+                                $hour = "0".$hour;*/
+			$hour = $hour.":00am";
+		}
+		return $hour;
+	}
+	else
+        {
+                $hour = $time;
+		if($hour <= 9 && strlen(trim($hour)) < 2)
+                                $hour = "0".$start_hour;
+		$hour = $hour.":00";
+		return $hour;
+	}
+}
+
+function convertStEdTime2UserSelectedFmt($format,$start_time,$duration_hr='',$duration_min='')
+{
+	list($hour,$min) = explode(":",$start_time);
+	if($format == 'am/pm')
+        {
+		//echo $start_time;
+                if($hour>'12')
+		{
+			$hour = $hour - 12;
+                        $start_hour = $hour;
+                        if($start_hour <= 9 && strlen(trim($start_hour)) < 2)
+				$start_hour = "0".$start_hour;
+			$start_time = $start_hour.":".$min."pm";
+                        $end_min = $min+$duration_min;
+                        $end_hour = $hour+$duration_hr;
+                        if($end_min>=60)
+                        {
+	                        $end_min = $end_min%60;
+                                $end_hour++;
+                        }
+                        if($end_hour <= 9 && strlen(trim($end_hour)) < 2)
+                                $end_hour = "0".$end_hour;
+                        if($end_min <= 9 && strlen(trim($end_min)) < 2)
+                                $end_min = "0".$end_min;
+                        $end_time = $end_hour.":".$end_min."pm";
+                        //echo $start_time;
+		}
+		elseif($hour == '12')
+		{
+			$start_hour = $hour;
+			if($start_hour <= 9 && strlen(trim($start_hour)) < 2)
+				$start_hour = "0".$start_hour;
+			$start_time = $start_hour.":".$min."pm";
+			$end_min = $min+$duration_min;
+			$end_hour = $hour+$duration_hr;
+			if($end_min>=60)
+			{
+				$end_min = $end_min%60;
+				$end_hour++;
+			}
+			if($end_hour>'12')
+			{
+				$end_hour = $end_hour - 12;
+				if($end_hour <= 9 && strlen(trim($end_hour)) < 2)
+					$end_hour = "0".$end_hour;
+				if($end_min <= 9 && strlen(trim($end_min)) < 2)
+					$end_min = "0".$end_min;
+				$end_time = $end_hour.":".$end_min."pm";
+			}
+			else
+			{
+				if($end_hour <= 9 && strlen(trim($end_hour)) < 2)
+					$end_hour = "0".$end_hour;
+				if($end_min <= 9 && strlen(trim($end_min)) < 2)
+					$end_min = "0".$end_min;
+				$end_time  = $end_hour.":".$end_min."am";
+			}
+		}
+		else
+		{
+			$start_hour = $hour;
+			if($start_hour <= 9 && strlen(trim($start_hour)) < 2)
+				$start_hour = "0".$start_hour;
+			$start_time = $start_hour.":".$min."am";
+			$end_min = $min+$duration_min;
+			$end_hour = $hour+$duration_hr;
+			if($end_min>=60)
+			{
+				$end_min = $end_min%60;
+				$end_hour++;
+			}
+			if($end_hour>='12')
+			{
+				if($end_hour == '12' && $end_hour > '00')
+					$end_hour = $end_hour;
+				else
+					$end_hour = $end_hour - 12;
+				if($end_hour <= 9 && strlen(trim($end_hour)) < 2)
+					$end_hour = "0".$end_hour;
+				if($end_min <= 9 && strlen(trim($end_min)) < 2)
+					$end_min = "0".$end_min;
+				$end_time = $end_hour.":".$end_min."pm";
+			}
+			else
+			{
+				if($end_hour <= 9 && strlen(trim($end_hour)) < 2)
+					$end_hour = "0".$end_hour;
+				if($end_min <= 9 && strlen(trim($end_min)) < 2)
+					$end_min = "0".$end_min;
+				$end_time  = $end_hour.":".$end_min."am";
+			}
+
+		}
+		$return_data = Array(
+					'starttime'=>$start_time,
+					'endtime'  =>$end_time
+				    );
+	}
+	else
+	{
+		$hour = $hour;
+		$min = $min;
+		$end_min = $min+$duration_min;
+		$end_hour = $hour+$duration_hr;
+		if($end_min>=60)
+		{
+			$end_min = $end_min%60;
+			$end_hour++;
+		}
+		if($end_hour <= 9 && strlen(trim($end_hour)) < 2)
+			$end_hour = "0".$end_hour;
+		if($end_min <= 9 && strlen(trim($end_min)) < 2)
+			$end_min = "0".$end_min;
+		$end_time  = $end_hour.":".$end_min;
+		$return_data = Array(
+                                        'starttime'=>$start_time,
+                                        'endtime'  =>$end_time
+                                    );
+	}
+	return $return_data;
+
+
+}
+
 		
 ?>

Modified: vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/script.js
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/script.js (original)
+++ vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/script.js Thu May 11 17:39:58 2006
@@ -80,15 +80,17 @@
 
 
 
-function gshow(argg1)
+function gshow(argg1,startdate,enddate,starttime,endtime)
 {
 	var y=document.getElementById(argg1).style;
 	
 	if (y.display=="none") 
 	{
+		document.getElementById("date_start").value = startdate;
+		document.getElementById("due_date").value = enddate;	
+		document.getElementById("time_start").value = starttime;
+		document.getElementById("time_end").value = endtime;
 		y.display="block";
-		
-	
 	}
 }
 
@@ -263,50 +265,20 @@
 
 function ajaxCalSaveResponse(response)
 {
-        document.getElementById("hrView_default").style.display = "none";
+	document.getElementById("hrView_default").style.display = "none";
         document.getElementById("toggleDiv").innerHTML=response.responseText;
 }
 
 function fnRedirect(view,hour,day,month,year){
-        var ajaxObj = new Ajax(ajaxCalSaveResponse);
-        var tagName =  document.getElementById('viewBox');
-        var OptionData = tagName.options[tagName.selectedIndex].value;
-        if(OptionData == 'hourview'){
-                var urlstring ="module=Calendar&action=CalendarAjax&view="+view+"&hour="+hour+"&day="+day+"&month="+month+"&year="+year+"&type="+OptionData+"&parenttab=My Home Page&ajax=true";
-        }
-        else if(OptionData == 'listview'){
-                var urlstring ="module=Calendar&action=CalendarAjax&view="+view+"&hour="+hour+"&day="+day+"&month="+month+"&year="+year+"&type="+OptionData+"&parenttab=My Home Page&ajax=true";
-        }
-        ajaxObj.process("index.php?",urlstring);
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+	var ajaxObj = new Ajax(ajaxCalSaveResponse);
+	var tagName =  document.getElementById('viewBox');
+	var OptionData = tagName.options[tagName.selectedIndex].value;
+	if(OptionData == 'hourview'){
+		var urlstring ="module=Calendar&action=CalendarAjax&view="+view+"&hour="+hour+"&day="+day+"&month="+month+"&year="+year+"&type="+OptionData+"&parenttab=My Home Page&ajax=true";
+	}
+	else if(OptionData == 'listview'){
+		var urlstring ="module=Calendar&action=CalendarAjax&view="+view+"&hour="+hour+"&day="+day+"&month="+month+"&year="+year+"&type="+OptionData+"&parenttab=My Home Page&ajax=true";
+	}
+	ajaxObj.process("index.php?",urlstring);
+}
+

Modified: vtigercrm/branches/5.0_postgresql_integration/modules/CustomView/CustomView.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/modules/CustomView/CustomView.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/modules/CustomView/CustomView.php Thu May 11 17:39:58 2006
@@ -21,15 +21,15 @@
 
 global $adv_filter_options;
 
-$adv_filter_options = array("e"=>"equals",
-                            "n"=>"not equal to",
-                            "s"=>"starts with",
-                            "c"=>"contains",
-                            "k"=>"does not contain",
-                            "l"=>"less than",
-                            "g"=>"greater than",
-                            "m"=>"less or equal",
-                            "h"=>"greater or equal"
+$adv_filter_options = array("e"=>"".$mod_strings['equals']."",
+                            "n"=>"".$mod_strings['not_equal_to']."",
+                            "s"=>"".$mod_strings['starts_with']."",
+                            "c"=>"".$mod_strings['contains']."",
+                            "k"=>"".$mod_strings['does_not_contain']."",
+                            "l"=>"".$mod_strings['less_than']."",
+                            "g"=>"".$mod_strings['greater_than']."",
+                            "m"=>"".$mod_strings['less_or_equal']."",
+                            "h"=>"".$mod_strings['greater_or_equal']."",
                             );
 
 class CustomView extends CRMEntity{
@@ -324,33 +324,34 @@
 
 	function getStdFilterCriteria($selcriteria = "")
 	{
+		global $mod_strings; 
 		$filter = array();
 
-		$stdfilter = Array("custom"=>"Custom",
-				"prevfy"=>"Previous FY",
-				"thisfy"=>"Current FY",
-				"nextfy"=>"Next FY",
-				"prevfq"=>"Previous FQ",
-				"thisfq"=>"Current FQ",
-				"nextfq"=>"Next FQ",
-				"yesterday"=>"Yesterday",
-				"today"=>"Today",
-				"tomorrow"=>"Tomorrow",
-				"lastweek"=>"Last Week",
-				"thisweek"=>"Current Week",
-				"nextweek"=>"Next Week",
-				"lastmonth"=>"Last Month",
-				"thismonth"=>"Current Month",
-				"nextmonth"=>"Next Month",
-				"last7days"=>"Last 7 Days",
-				"last30days"=>"Last 30 Days", 
-				"last60days"=>"Last 60 Days",
-				"last90days"=>"Last 90 Days",
-				"last120days"=>"Last 120 Days",
-				"next30days"=>"Next 30 Days",
-				"next60days"=>"Next 60 Days",
-				"next90days"=>"Next 90 Days",
-				"next120days"=>"Next 120 Days"
+		$stdfilter = Array("custom"=>"".$mod_strings['Custom']."",
+				"prevfy"=>"".$mod_strings['Previous FY']."",
+				"thisfy"=>"".$mod_strings['Current FY']."",
+				"nextfy"=>"".$mod_strings['Next FY']."",
+				"prevfq"=>"".$mod_strings['Previous FQ']."",
+				"thisfq"=>"".$mod_strings['Current FQ']."",
+				"nextfq"=>"".$mod_strings['Next FQ']."",
+				"yesterday"=>"".$mod_strings['Yesterday']."",
+				"today"=>"".$mod_strings['Today']."",
+				"tomorrow"=>"".$mod_strings['Tomorrow']."",
+				"lastweek"=>"".$mod_strings['Last Week']."",
+				"thisweek"=>"".$mod_strings['Current Week']."",
+				"nextweek"=>"".$mod_strings['Next Week']."",
+				"lastmonth"=>"".$mod_strings['Last Month']."",
+				"thismonth"=>"".$mod_strings['Current Month']."",
+				"nextmonth"=>"".$mod_strings['Next Month']."",
+				"last7days"=>"".$mod_strings['Last 7 Days']."",
+				"last30days"=>"".$mod_strings['Last 30 Days']."",
+				"last60days"=>"".$mod_strings['Last 60 Days']."",
+				"last90days"=>"".$mod_strings['Last 90 Days']."",
+				"last120days"=>"".$mod_strings['Last 120 Days']."",
+				"next30days"=>"".$mod_strings['Next 30 Days']."",
+				"next60days"=>"".$mod_strings['Next 60 Days']."",
+				"next90days"=>"".$mod_strings['Next 90 Days']."",
+				"next120days"=>"".$mod_strings['Next 120 Days']."",
 					);
 
 				foreach($stdfilter as $FilterKey=>$FilterValue)

Modified: vtigercrm/branches/5.0_postgresql_integration/modules/CustomView/language/en_us.lang.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/modules/CustomView/language/en_us.lang.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/modules/CustomView/language/en_us.lang.php Thu May 11 17:39:58 2006
@@ -1,40 +1,272 @@
-<?php
-/*********************************************************************************
- * The contents of this file are subject to the SugarCRM Public License Version 1.1.2
- * ("License"); You may not use this file except in compliance with the
- * License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
- * Software distributed under the License is distributed on an  "AS IS"  basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
- * the specific language governing rights and limitations under the License.
- * The Original Code is:  SugarCRM Open Source
- * The Initial Developer of the Original Code is SugarCRM, Inc.
- * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
- * All Rights Reserved.
- * Contributor(s): ______________________________________.
- ********************************************************************************/
-/*********************************************************************************
- * $Header$
- * Description:  Defines the English language pack for the Account module.
- * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
- * All Rights Reserved.
- * Contributor(s): ______________________________________..
- ********************************************************************************/
-$mod_strings = Array(
-'LBL_MODULE_NAME'=>'Custom View',
-'LBL_STEP_1_TITLE'=>'View Information',
-'LBL_VIEW_NAME'=>'View Name:',
-'LBL_SETDEFAULT'=>'Set as Default',
-'LBL_LIST_IN_METRICS'=>'List in Metrics',
-'LBL_STEP_2_TITLE'=>'Choose Columns',
-'LBL_STEP_3_TITLE'=>'Standard Filters',
-'LBL_STEP_4_TITLE'=>'Advanced Filters',
-'LBL_STEP_5_TITLE'=>'Access Information',
-'LBL_SF_COLUMNS'=>'Column',
-'LBL_SF_STARTDATE'=>'Start Date',
-'LBL_SF_ENDDATE'=>'End Date',
-'LBL_AF_HDR1'=>'Set the search conditions to further restrict the list.',
-'LBL_AF_HDR2'=>'You can use &quot;or&quot; filters by entering multiple items in the third column.',
-'LBL_AF_HDR3'=>'You can enter up to 10 items, separated by commas. For example: CA, NY, TX, FL searches for CA or NY or TX or FL.',
-'LBL_AF_HDR4'=>'If "Activity Type" is selected, give any one of the following values "Call","Meeting" or "Task".');
+<?php 
+/********************************************************************************* 
+ * The contents of this file are subject to the SugarCRM Public License  
+Version 1.1.2 
+ * ("License"); You may not use this file except in compliance with the 
+ * License. You may obtain a copy of the License at  
+http://www.sugarcrm.com/SPL 
+ * Software distributed under the License is distributed on an  "AS IS"   
+basis, 
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the  
+License for 
+ * the specific language governing rights and limitations under the License. 
+ * The Original Code is:  SugarCRM Open Source 
+ * The Initial Developer of the Original Code is SugarCRM, Inc. 
+ * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.; 
+ * All Rights Reserved. 
+ * Contributor(s): ______________________________________. 
+ ********************************************************************************/ 
+/********************************************************************************* 
+ * $Header$ 
+ * Description:  Defines the English language pack for the Account module. 
+ * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. 
+ * All Rights Reserved. 
+ * Contributor(s): ______________________________________.. 
+ ********************************************************************************/ 
+$mod_strings = Array( 
+'LBL_MODULE_NAME'=>'Custom View', 
+'LBL_STEP_1_TITLE'=>'View Information', 
+'LBL_VIEW_NAME'=>'View Name:', 
+'LBL_SETDEFAULT'=>'Set as Default', 
+'LBL_LIST_IN_METRICS'=>'List in Metrics', 
+'LBL_STEP_2_TITLE'=>'Choose Columns', 
+'LBL_STEP_3_TITLE'=>'Standard Filters', 
+'LBL_STEP_4_TITLE'=>'Advanced Filters', 
+'LBL_STEP_5_TITLE'=>'Access Information', 
+'LBL_SF_COLUMNS'=>'Column', 
+'LBL_SF_STARTDATE'=>'Start Date', 
+'LBL_SF_ENDDATE'=>'End Date', 
+'LBL_AF_HDR1'=>'Set the search conditions to further restrict the list.', 
+'LBL_AF_HDR2'=>'You can use &quot;or&quot; filters by entering multiple  
+items in the third column.', 
+'LBL_AF_HDR3'=>'You can enter up to 10 items, separated by commas. For  
+example: CA, NY, TX, FL searches for CA or NY or TX or FL.', 
+'LBL_AF_HDR4'=>'If "Activity Type" is selected, give any one of the  
+following values "Call","Meeting" or "Task".', 
+ 
+//strings added for vtiger 5, date format... 
+'LBL_NONE'=>'None', 
+'View_Name'=>'View_Name', 
+'LBL_AND'=>'And', 
+'LBL_DATE_FORMAT_CUSTOMVIEW'=>'Y-m-d', 
+//Strings added for filter 
+'Custom'=>'Custom',
+'Previous FY'=>'Previous FY', 
+'Current FY'=>'Current FY', 
+'Next FY'=>'Next FY', 
+'Previous FQ'=>'Previous FQ', 
+'Current FQ'=>'Current FQ', 
+'Next FQ'=>'Next FQ', 
+'Yesterday'=>'Yesterday', 
+'Today'=>'Today', 
+'Tomorrow'=>'Tomorrow', 
+'Last Week'=>'Last Week', 
+'Current Week'=>'Current Week', 
+'Next Week'=>'Next Week', 
+'Last Month'=>'Last Month', 
+'Current Month'=>'Current Month', 
+'Next Month'=>'Next Month', 
+'Last 7 Days'=>'Last 7 Days', 
+'Last 30 Days'=>'Last 30 Days', 
+'Last 60 Days'=>'Last 60 Days', 
+'Last 90 Days'=>'Last 90 Days', 
+'Last 120 Days'=>'Last 120 Days', 
+'Next 30 Days'=>'Next 30 Days', 
+'Next 60 Days'=>'Next 60 Days', 
+'Next 90 Days'=>'Next 90 Days', 
+'Next 120 Days'=>'Next 120 Days', 
+ 
+'equals'=>'equals', 
+'not_equal_to'=>'Not equal to', 
+'starts_with'=>'Starts with', 
+'contains'=>'Contains', 
+'does_not_contain'=>'does not contain', 
+'less_than'=>'less than', 
+'greater_than'=>'greater than', 
+'less_or_equal'=>'less or equal', 
+'greater_or_equal'=>'greater or equal', 
+ 
+//Strings added to translate field label groups 
+'Address'=>'Address', 
+'Information'=>'Information', 
+'Description'=>'Description', 
+'Custom Information'=>'Custom Information', 
+'- Event Information'=>'- Event Information', 
+'- Event Description'=>'- Event Description', 
+'- Task Information'=>'- Task Information', 
+'- Task Description'=>'- Task Description', 
+ 
+//Strings added for helpdesk module fields 
+'Title'=>'Title', 
+'Assigned To'=>'Assigned To', 
+'Related to'=>'Related to', 
+'Priority'=>'Priority', 
+'Product Name'=>'Product Name', 
+'Severity'=>'Severity', 
+'Status'=>'Status', 
+'Category'=>'Category', 
+'Created Time'=>'Created Time', 
+'Modified Time'=>'Modified Time', 
+'Attachment'=>'Attachment', 
+ 
+//Strings added for Leads module fields 
+'First Name'=>'First Name', 
+'Phone'=>'Phone', 
+'Last Name'=>'Last Name', 
+'Company'=>'Company', 
+'Lead Source'=>'Lead Source', 
+'Website'=>'Website', 
+'Industry'=>'Industry', 
+'Lead Status'=>'Lead Status', 
+'Annual Revenue'=>'Annual Revenue', 
+'Rating'=>'Rating', 
+'No Of Employees'=>'No of Employees', 
+'Street'=>'Street', 
+'Po Box'=>'PO Box', 
+'Postal Code'=>'Postal Code', 
+'City'=>'City', 
+'Country'=>'Country', 
+'State'=>'State', 
+ 
+//Strings added for Accounts module fields 
+'Account Name'=>'Account Name', 
+'Ticker Symbol'=>'Ticker Symbol', 
+'Other Phone'=>'Other Phone', 
+'Member Of'=>'Member Of', 
+'Employees'=>'Employees', 
+'Other Email'=>'Other Email', 
+'Ownership'=>'Ownership', 
+'industry'=>'industry', 
+'SIC Code'=>'SIC Code', 
+'Email Opt Out'=>'Email Opt Out', 
+'Billing Address'=>'Billing Address', 
+'Shipping Address'=>'Shipping Address', 
+'Shipping Po Box'=>'Shipping Po Box', 
+'Billing Po Box'=>'Billing Po Box', 
+'Billing City'=>'Billing City', 
+'Shipping City'=>'Shipping City', 
+'Billing State'=>'Billing State', 
+'Shipping State'=>'Shipping State', 
+'Billing Code'=>'Billing Code', 
+'Shipping Code'=>'Shipping Code', 
+'Shipping Country'=>'Shipping Country', 
+'Billing Country'=>'Billing Country', 
+ 
+ 
+//Strings added for Contacts module fields 
+ 
+'Office Phone'=>'Office Phone', 
+'Home Phone'=>'Home Phone', 
+'Birthdate'=>'Birthdate', 
+'Reports To'=>'Reports To', 
+'Assistant Phone'=>'Assistant Phone', 
+'Do Not Call'=>'Do Not Call', 
+'Mailing Street'=>'Mailing Street', 
+'Other Street'=>'Other Street', 
+'Mailing Po Box'=>'Mailing Po Box', 
+'Other Po Box'=>'Other Po Box', 
+'Mailing City'=>'Mailing City', 
+'Other City'=>'Other City', 
+'Mailing State'=>'Mailing State', 
+'Other State'=>'Other State', 
+'Mailing Zip'=>'Mailing Zip', 
+'Other Zip'=>'Other Zip', 
+'Mailing Country'=>'Mailing Country', 
+'Other Country'=>'Other Country', 
+ 
+ 
+//Strings added for Potential module fields 
+ 
+'Potential Name'=>'Potential Name', 
+'Amount'=>'Amount', 
+'Expected Close Date'=>'Expected Close Date', 
+'Next Step'=>'Next Step', 
+'Sales Stage'=>'Sales Stage', 
+'Probability'=>'Probability', 
+ 
+ 
+//Strings added for Quotes module fields 
+'Subject'=>'Subject', 
+'Quote Stage'=>'Quote Stage', 
+'Valid Till'=>'Valid Till', 
+'Team'=>'Team', 
+'Contact Name'=>'Contact Name', 
+'Carrier'=>'Carrier', 
+'Shipping'=>'Shipping', 
+'Inventory Manager'=>'Inventory Manager', 
+ 
+//Strings added for Sales Orders module fields 
+'Customer No'=>'Customer No', 
+'Quote Name'=>'Quote Name', 
+'Purchase Order'=>'Purchase Order', 
+'Due Date'=>'Due Date', 
+'Pending'=>'Pending', 
+'Sales Commission'=>'Sales Commission', 
+'Excise Duty'=>'Excise Duty', 
+ 
+//Strings added for Invoices module fields 
+'Sales Order'=>'Sales Order', 
+'Invoice Date'=>'Invoice Date', 
+ 
+//Strings added for Product module fields 
+'Product Code'=>'Product Code', 
+'Product Active'=>'Product Active', 
+'Product Category'=>'Product Category', 
+'Sales Start Date'=>'Sales Start Date', 
+'Sales End Date'=>'Sales End Date', 
+'Support Start Date'=>'Support Start Date', 
+'Vendor Name'=>'Vendor Name', 
+'Mfr PartNo'=>'Mfr PartNo', 
+'Vendor PartNo'=>'Vendor PartNo', 
+ 
+'Serial No'=>'Serial No', 
+'Product Sheet'=>'Product Sheet', 
+'GL Account'=>'GL Account', 
+ 
+//Strings added for Price book module fields 
+'Price Book Name'=>'Price Book Name', 
+'Active'=>'Active', 
+ 
+//Strings added for tasks & events module fields 
+'Start Date & Time'=>'Start Date & Time', 
+ 
+//error message 
+'Missing required fields'=>'Missing required fields', 
+//Strings added for campaigns 
+'Campaign Name'=>'Campaign Name', 
+'Campaign Type'=>'Campaign Type', 
+'Product'=>'Product', 
+'Campaign Status'=>'Campaign Status', 
+'Expected Revenue'=>'Expected Revenue', 
+'Budget Cost'=>'Budget Cost', 
+'Actual Cost'=>'Actual Cost', 
+'Expected Response'=>'Expected Response', 
+'Num Sent'=>'Num Sent', 
+'Target Audience'=>'Target Audience', 
+'TargetSize'=>'TargetSize', 
+'Sponsor'=>'Sponsor', 
+'Expected Sales Count'=>'Expected Sales Count', 
+'Expected Response Count'=>'Expected Response Count', 
+'Expected ROI'=>'Expected ROI', 
+'Actual Sales Count'=>'Actual Sales Count', 
+'Actual Response Count'=>'Actual Response Count', 
+'Actual ROI'=>'Actual ROI', 
+ 
+ 
+ 
+//Added for customview.tpl 
+ 
+'LBL_Select_a_Column'=>'Select a Column', 
+'Missing_required_fields'=>'Missing required fields', 
+'Details'=>'Details', 
+'New_Custom_View'=>'New Custom view', 
+'LBL_AF_HDR5'=>'Simple Time Filter allows you to select date based on  
+<b>Account Created Time</b> or  <b>Account Modified Time</b>', 
+'Select_Duration'=>'Select Duration', 
+'Simple_Time_Filter'=>'Simple Time Filter', 
+'Start_Date'=>'Start Date', 
+'End_Date'=>'End_Date', 
+'LBL_RULE'=>'RULE' 
+); 
+?> 
 
-?>

Modified: vtigercrm/branches/5.0_postgresql_integration/modules/Import/ImportStep3.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/modules/Import/ImportStep3.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/modules/Import/ImportStep3.php Thu May 11 17:39:58 2006
@@ -445,15 +445,17 @@
 {
 	var tagName;
 	var count = 0;
-	var required_count = 0;
 	var field_count = "<?php echo $field_count; ?>";
 	var required_fields = new Array();
+	var required_fields_name = new Array();
+	var seq_string = '';
 
 	<?php 
 		foreach($focus->required_fields as $name => $index)
 		{
 			?>
 			required_fields[count] = "<?php echo $name; ?>";
+			required_fields_name[count] = "<?php echo $translated_column_fields[$name]; ?>";
 			count = count + 1;
 			<?php 
 		} 
@@ -462,37 +464,44 @@
 	{
 		tagName = document.getElementById('colnum'+loop_count);
 		optionData = tagName.options[tagName.selectedIndex].value;
-		for(inner_loop = 0; inner_loop<required_fields.length;inner_loop++)
-		{
-			if(optionData == required_fields[inner_loop])
+
+		if(optionData != -1)
+		{
+			tmp = seq_string.indexOf(optionData);
+			if(tmp == -1)
 			{
-				required_count = required_count +1;
+				seq_string = seq_string + optionData;
+			}
+			else
+			{
+				//if a field mapped more than once, alert the user and return
+				alert("'"+tagName.options[tagName.selectedIndex].text+"' has been mapped twice. Please check.");
+				return false;
 			}
 		}
-	}
-
-	var err_msg = '';
-	if(required_count != required_fields.length)
-	{
-		err_msg = "Please Map All Required Fileds";
-	}
-	else
-	{
-		//This is to check whether the save map name has been given or not when save map check box is checked
-		if(document.getElementById("save_map").checked == true)
-		{
-			if(trim(document.getElementById("save_map_as").value) == '')
-			{
-				err_msg = "Please Enter Save Map Name";
-			}
+
+	}
+
+	//check whether the mandatory fields have been mapped.
+	for(inner_loop = 0; inner_loop<required_fields.length;inner_loop++)
+	{
+		if(seq_string.indexOf(required_fields[inner_loop]) == -1)
+		{
+			alert('Please map the mandatory field "'+required_fields_name[inner_loop]+'"');
+			return false;
 		}
 	}
-	if(err_msg != '')
-	{
-		alert(err_msg);
-		return false;
-	}
-	else
-		return true;
+
+	//This is to check whether the save map name has been given or not when save map check box is checked
+	if(document.getElementById("save_map").checked == true)
+	{
+		if(trim(document.getElementById("save_map_as").value) == '')
+		{
+			alert("Please Enter Save Map Name");
+			return false;
+		}
+	}
+
+	return true;
 }
 </script>

Modified: vtigercrm/branches/5.0_postgresql_integration/modules/Import/ImportSteplast.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/modules/Import/ImportSteplast.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/modules/Import/ImportSteplast.php Thu May 11 17:39:58 2006
@@ -89,7 +89,7 @@
 					<input type="hidden" name="return_action" value="<?php echo (($_REQUEST['return_action'] != '')?$_REQUEST['return_action']:'index'); ?>">
 					<input title="<?php echo $mod_strings['LBL_FINISHED'] ?>" accessKey="" class="classBtn" type="submit" name="button" value="  <?php echo $mod_strings['LBL_FINISHED'] ?>  "  onclick="this.form.action.value=this.form.return_action.value;this.form.return_module.value=this.form.return_module.value;return true;">
 					<br><br>
-					<input title="<?php echo $mod_strings['LBL_IMPORT_MORE'] ?>" accessKey="" class="classBtn" type="submit" name="button" value="  <?php echo $mod_strings['LBL_IMPORT_MORE'] ?>  "  onclick="return true;">
+					<input title="<?php echo $mod_strings['LBL_IMPORT_MORE'] ?>" accessKey="" class="classBtn" type="submit" name="button" value="  <?php echo $mod_strings['LBL_IMPORT_MORE'] ?>  "  onclick="this.form.return_module.value=this.form.module.value; return true;">
 				   </form>
 				</td>
 			   </tr>
@@ -208,6 +208,7 @@
 		$listview_entries = getListViewEntries($object,$module_name,$list_result,$navigation_array,"","","EditView","Delete","");
 
 		$smarty->assign("NAVIGATION", $navigationOutput);
+		$smarty->assign("HIDE_CUSTOM_LINKS", 1);//Added to hide the CustomView links in imported records ListView
 		$smarty->assign("LISTHEADER", $listview_header);
 		$smarty->assign("LISTENTITY", $listview_entries);
 

Modified: vtigercrm/branches/5.0_postgresql_integration/modules/Import/language/en_us.lang.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/modules/Import/language/en_us.lang.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/modules/Import/language/en_us.lang.php Thu May 11 17:39:58 2006
@@ -158,8 +158,8 @@
 'LBL_STEP_2_TXT'=>'To map the fields, Select the corresponding in combo boxes for each',
 'LBL_USE_SAVED_MAPPING'=>'Use Saved Mapping :',
 'LBL_MAPPING'=>'Mapping',
-'LBL_HEADERS'=>'Headers :'
-
+'LBL_HEADERS'=>'Headers :',
+'LBL_ERROR_MULTIPLE'=>'Same fields may be mapped twice. Please check the mapped fields.',
 
 );
 

Modified: vtigercrm/branches/5.0_postgresql_integration/modules/Portal/Popup.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/modules/Portal/Popup.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/modules/Portal/Popup.php Thu May 11 17:39:58 2006
@@ -9,7 +9,7 @@
 *
 ********************************************************************************/
 
-
+require_once('modules/Portal/Portal.php');
 global $app_strings;
 global $app_list_strings;
 global $mod_strings;
@@ -39,15 +39,5 @@
 
 echo $portal_inputs;
 
-function SavePortal($portalname,$portalurl)
-{
 
-global $adb;
-$portalid=$adb->getUniqueID('portal');
-$portal_name=$_REQUEST['portalname'];
-$portal_url=$_REQUEST['portalurl'];
-$query="insert into portal values(".$portalid.",'".$portal_name."','".$portal_url."',0)";
-$result=$adb->query($query);
-return $portalid;
-}
 ?>

Modified: vtigercrm/branches/5.0_postgresql_integration/modules/Rss/ListView.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/modules/Rss/ListView.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/modules/Rss/ListView.php Thu May 11 17:39:58 2006
@@ -47,6 +47,8 @@
 $rss_form->assign("MOD", $mod_strings);
 $rss_form->assign("APP", $app_strings);
 $rss_form->assign("IMAGEPATH",$image_path);
+$rss_form->assign("MODULE", $currentModule);
+$rss_form->assign("CATEGORY", getParenttab());
 
 //<<<<<<<<<<<<<<lastrss>>>>>>>>>>>>>>>>>>//
 //$url = 'http://forums/rss.php?name=forums&file=rss';

Modified: vtigercrm/branches/5.0_postgresql_integration/modules/Rss/Rss.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/modules/Rss/Rss.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/modules/Rss/Rss.php Thu May 11 17:39:58 2006
@@ -16,7 +16,7 @@
 
 require_once('data/CRMEntity.php');
 require_once('include/database/PearDatabase.php');
-require_once($theme_path."layout_utils.php");
+//require_once($theme_path."layout_utils.php");
 // Require the xmlParser class
 require_once('include/feedParser/xmlParser.php');
 
@@ -98,9 +98,11 @@
 	  * returns true on sucess 
 	  * returns false if fails
 	 */
-	function saveRSSUrl($url,$makestarred,$rsscategory)
-	{
-		global $adb;
+	function saveRSSUrl($url,$makestarred=0,$rsscategory='')
+	{
+		global $adb;
+		if($rsscategory == '')
+			$rsscategory = 'vtiger Discussions';	
 
 		if ($url != "")
 		{

Modified: vtigercrm/branches/5.0_postgresql_integration/soap/contactserialize.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/soap/contactserialize.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/soap/contactserialize.php Thu May 11 17:39:58 2006
@@ -524,6 +524,55 @@
 	array('return'=>'xsd:string'),
 	$NAMESPACE);
 
+
+$server->register(
+	'create_vendor_from_webform',
+	array('vendorname'=>'xsd:string',
+		'email'=>'xsd:string', 
+		'phone'=>'xsd:string', 
+		'website'=>'xsd:string'), 
+	array('return'=>'xsd:string'),
+	$NAMESPACE);
+
+
+
+$server->register(
+	'create_product_from_webform',
+	array('productname'=>'xsd:string',
+		'productcode'=>'xsd:string', 
+		'website'=>'xsd:string'), 
+	array('return'=>'xsd:string'),
+	$NAMESPACE);
+
+
+
+$server->register(
+	'create_note_from_webform',
+	array('title'=>'xsd:string',
+		'notecontent'=>'xsd:string'), 
+	array('return'=>'xsd:string'),
+	$NAMESPACE);
+
+
+
+
+$server->register(
+	'create_site_from_webform',
+	array('portalname'=>'xsd:string',
+		'portalurl'=>'xsd:string'), 
+	array('return'=>'xsd:string'),
+	$NAMESPACE);
+
+
+
+$server->register(
+	'create_rss_from_webform',
+	array('rssurl'=>'xsd:string'),
+	array('return'=>'xsd:string'),
+	$NAMESPACE);
+
+
+
 $server->register(
 	'save_faq_comment',
 	array('faqid'=>'xsd:string','comments'=>'xsd:string'),
@@ -2409,6 +2458,128 @@
 	
 	return $output_list;
 }
+
+
+
+
+
+function create_vendor_from_webform($vendorname,$email,$phone,$website)
+{
+	global $adb;
+	$adb->println("Create New Vendor from Web Form - Starts");
+	require_once("modules/Vendors/Vendor.php");
+
+	$focus = new Vendor();
+	$focus->column_fields['vendorname'] = $vendorname;
+	$focus->column_fields['email'] = $email;
+	$focus->column_fields['phone'] = $phone;
+	$focus->column_fields['website'] = $website;
+
+	$focus->save("Vendors");
+	
+	$focus->retrieve_entity_info($focus->id,"Vendors");
+
+	$adb->println("Create New Vendor from Web Form - Ends");
+
+	if($focus->id != '')
+		return 'Thank you for your interest. Information has been successfully added as Vendor.';
+	else
+		return "Vendor creation failed. Try again";
+}
+
+
+
+function create_product_from_webform($productname,$code,$website)
+{
+	global $adb;
+	$adb->println("called >>>>>>>>>>>>>>>>>>>>>>>");
+	$adb->println("Create New Product from Web Form - Starts");
+	require_once("modules/Products/Product.php");
+
+	$focus = new Product();
+	$focus->column_fields['productname'] = $productname;
+	$focus->column_fields['productcode'] = $code;
+	$focus->column_fields['website'] = $website;
+
+	$adb->println("Values are  --------------->".$productname .'       '.$code .'           '.$website);
+	$focus->save("Products");
+	
+	$focus->retrieve_entity_info($focus->id,"Products");
+
+	$adb->println("Create New Product from Web Form - Ends");
+
+	if($focus->id != '')
+		return 'Thank you for your interest. Information has been successfully added as Product.';
+	else
+		return "Product creation failed. Try again";
+}
+
+
+
+function create_note_from_webform($subject,$desc)
+{
+	global $adb;
+	$adb->println("Create New Note from Web Form - Starts");
+	require_once("modules/Notes/Note.php");
+
+	$focus = new Note();
+	$focus->column_fields['title'] = $subject;
+	$focus->column_fields['notecontent'] = $desc;
+
+	$focus->save("Notes");
+	
+	$focus->retrieve_entity_info($focus->id,"Notes");
+
+	$adb->println("Create New Note from Web Form - Ends");
+
+	if($focus->id != '')
+		return 'Thank you for your interest. Information has been successfully added as Note.';
+	else
+		return "Note creation failed. Try again";
+}
+
+
+
+function create_site_from_webform($name,$url)
+{
+	global $adb;
+	$adb->println("Create New Site from Web Form - Starts");
+	require_once("modules/Portal/Portal.php");
+	$adb->println("name url  >>>>>>>>>>".$name .' >>>>>>>>>>> ' .$url);
+
+	$result = SavePortal($name,$url);
+	
+	$adb->println("Create New Portal from Web Form - Ends");
+
+	if($result != '')
+		return 'Thank you for your interest. Information has been successfully added as Portal';
+	else
+		return "Portal creation failed. Try again";
+}
+
+
+function create_rss_from_webform($url)
+{
+	global $adb;
+	$adb->println("Create New RSS from Web Form - Starts");
+	require_once("modules/Rss/Rss.php");
+
+	$oRss = new vtigerRSS();
+	if($oRss->setRSSUrl($url))
+	{
+		if($oRss->saveRSSUrl($url) == false)
+		{
+			return "RSS creation failed. Try again";
+		}
+		else
+		{
+			return 'Thank you for your interest. Information has been successfully added as RSS.';
+        	}
+
+	}
+}
+
+
 //calendar
 
 //$log->fatal("In soap.php");





More information about the vtigercrm-commits mailing list