[Vtigercrm-commits] [vtiger-commits] r6470 - /vtigercrm/trunk/include/utils/EditViewUtils.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Fri May 26 10:21:08 EDT 2006


Author: saraj
Date: Fri May 26 08:21:04 2006
New Revision: 6470

Log:
code included for uitype equal to 33

Modified:
    vtigercrm/trunk/include/utils/EditViewUtils.php

Modified: vtigercrm/trunk/include/utils/EditViewUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/EditViewUtils.php (original)
+++ vtigercrm/trunk/include/utils/EditViewUtils.php Fri May 26 08:21:04 2006
@@ -107,7 +107,7 @@
 			$fieldvalue[] = array($date_format=>$current_user->date_format.' '.$app_strings['YEAR_MONTH_DATE']);
 		}
 	}
-	elseif($uitype == 15 || $uitype == 16 || $uitype == 33)
+	elseif($uitype == 15 || $uitype == 16)
 	{
 		$editview_label[]=$mod_strings[$fieldlabel];
 		$pick_query="select * from ".$fieldname;
@@ -138,6 +138,31 @@
 	{
 		$editview_label[]=$mod_strings[$fieldlabel];
 		$fieldvalue [] = $value;
+	}
+	elseif($uitype ==33)
+	{
+		$editview_label[]=$mod_strings[$fieldlabel];
+		$mulsel="select * from ".$fieldname;
+		$multiselect_result = $adb->query($mulsel);
+		$noofoptions = $adb->num_rows($multiselect_result);
+		$options = array();
+		$found = false;
+		$valur_arr = explode(' , ',$value);
+		for($j = 0; $j < $noofoptions; $j++)
+		{
+			$multiselect_combo = $adb->query_result($multiselect_result,$j,strtolower($fieldname));
+			if(in_array($multiselect_combo,$valur_arr))
+			{
+				$chk_val = "selected";
+				$found = true;
+			}
+			else
+			{
+				$chk_val = '';
+			}
+			$options[] = array($multiselect_combo=>$chk_val );
+		}
+		$fieldvalue [] = $options;
 	}
 	elseif($uitype == 19 || $uitype == 20)
 	{





More information about the vtigercrm-commits mailing list