Index: /trunk/expressoAdmin1_2/inc/class.maillist.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.maillist.inc.php	(revision 14)
+++ /trunk/expressoAdmin1_2/inc/class.maillist.inc.php	(revision 15)
@@ -158,5 +158,5 @@
 			
 			////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-			// REPLACE MAIL & CN
+			// REPLACE MAIL || CN || SN
 			if ($new_values['mail'] != $old_values['mail'])
 			{
@@ -168,4 +168,8 @@
 				$ldap_mod_replace['cn'] = $new_values['cn'];
 				$this->db_functions->write_log("Modificado common name da lista $dn",'',$dn,'','');
+			}
+			if ($diff['uid'])
+			{
+				$ldap_mod_replace['sn'] = $new_values['uid'];
 			}
 			
Index: /trunk/contactcenter/inc/class.ui_data.inc.php
===================================================================
--- /trunk/contactcenter/inc/class.ui_data.inc.php	(revision 13)
+++ /trunk/contactcenter/inc/class.ui_data.inc.php	(revision 15)
@@ -2437,4 +2437,44 @@
 				break;
 				
+				case 'outlook2000_pt-BR':
+					$streamBuffer = "\"Tratamento\",\"Nome\",\"Segundo Nome\",\"Sobrenome\",\"Sufixo\",".
+					"\"Empresa\",\"Departamento\",\"Cargo\",\"Rua do endereço comercial\",\"Rua do endereço comercial 2\",".
+					"\"Rua do endereço comercial 3\",\"Cidade do endereço comercial\",\"Estado do endereço comercial\",".
+					"\"CEP do endereço comercial\",\"País do endereço comercial\",\"Endereço residencial\",\"Rua residencial 2\",".
+					"\"Rua residencial 3\",\"Cidade do endereço residencial\",\"Estado\",\"CEP do endereço residencial\",\"País do endereço residencial\",".
+					"\"Outro endereço\",\"Outro endereço 2\",\"Outro endereço 3\",\"Cidade\",\"Estado\",\"CEP\",\"País\",".
+					"\"Telefone do assistente\",\"Fax comercial\",\"Telefone comercial\",\"Telefone comercial 2\",\"Retorno de chamada\",".
+					"\"Telefone do carro\",\"Telefone principal da empresa\",\"Fax residencial\",\"Telefone residencial\",".
+					"\"Telefone residencial 2\",\"ISDN\",\"Telefone celular\",\"Outro fax\",\"Outro telefone\",\"Pager\",\"Telefone principal\",".
+					"\"Radiofone\",\"Telefone TTY/TDD\",\"Telex\",\"Aniversário\",\"Anotações\",\"Caixa postal\",\"Categorias\",".
+					"\"Código da empresa\",\"Código do governo\",\"Cônjuge\",\"Conta\",\"Endereço de correio eletrônico\",".
+					"\"Nome de exibição do correio eletr.\",\"Endereço de correio eletrônico 2\",".
+					"\"Nome de exibição do correio eletr.2\",\"Endereço de correio eletrônico 3\",".
+					"\"Nome de exibição do correio eletr.3\",\"Datas especiais\",\"Disponibilidade da Internet\",".
+					"\"Filhos\",\"Hobby\",\"Idioma\",\"Indicação\",\"Informações para cobrança\",\"Iniciais\",\"Local\",".
+					"\"Nome do assistente\",\"Nome do gerenciador\",\"Página da Web\",\"Palavras-chave\",\"Particular\",\"Personalizado 1\",\"Personalizado 2\",".
+					"\"Personalizado 3\",\"Personalizado 4\",\"Prioridade\",\"Profissão\",\"Quilometragem\",\"Sala\",\"Sensibilidade\",\"Servidor de diretório\",".
+					"\"Sexo\"\r\n";
+					foreach($contacts as $index => $object){
+						$streamBuffer.= ",\"".$object['names_ordered']."\",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\"".$object['connection_value']."\",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r\n";
+					}
+				break;
+				
+				case 'outlook2000_en':
+					$streamBuffer = "Title,First Name,Middle Name,Last Name,Suffix,Company,Department,Job Title,".
+					"Business Street,Business Street 2,Business Street 3,Business City,Business State,Business Postal Code,".
+					"Business Country,Home Street,Home Street 2,Home Street 3,Home City,Home State,Home Postal Code,Home Country,".
+					"Other Street,Other Street 2,Other Street 3,Other City,Other State,Other Postal Code,Other Country,".
+					"Assistant's Phone,Business Fax,Business Phone,Business Phone 2,Callback,Car Phone,Company Main Phone,Home Fax,".
+					"Home Phone,Home Phone 2,ISDN,Mobile Phone,Other Fax,Other Phone,Pager,Primary Phone,Radio Phone,TTY/TDD Phone,Telex,".
+					"Account,Anniversary,Assistant's Name,Billing Information,Birthday,Categories,Children,Directory Server,E-mail Address,".
+					"E-mail Type,E-mail Display Name,E-mail 2 Address,E-mail 2 Type,E-mail 2 Display Name,E-mail 3 Address,E-mail 3 Type,E-mail 3 Display Name,".
+					"Gender,Government ID Number,Hobby,Initials,Internet Free Busy,Keywords,Language,Location,Manager's Name,Mileage,Notes,".
+					"Office Location,Organizational ID Number,PO Box,Priority,Private,Profession,Referred By,Sensitivity,Spouse,User 1,User 2,User 3,User 4,Web Page\r\n";
+					foreach($contacts as $index => $object){
+						$streamBuffer.= ",".$object['names_ordered'].",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,".$object['connection_value'].",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r\n";
+					}
+				break;
+					
 				case 'thunderbird':
 					$streamBuffer = "";							
@@ -2468,6 +2508,4 @@
 						
 			$delim 		= ($typeImport == 'outlook' ? ';' : ',');
-			$is_default = ($typeImport == 'thunderbird' ? false : true);
-			//die(serialize(array('delimiter' => $delim, 'is_default' => $is_default)));
 			
 			if($file = $_SESSION['contactcenter']['importCSV']) {				
@@ -2478,5 +2516,5 @@
    				$handle = @fopen($file, "r") or die(serialize($return['error'] = true));   				   			
    				$header = @fgetcsv($handle, $len, $delim) or die(serialize($return['error'] = true));
-   				if(count($header)  < 2 || count($header) > 50) {
+   				if(count($header)  < 2 || count($header) > 100) {
    					$return['error'] = true;
    					$return['sizeheader'] = count($header);
@@ -2487,12 +2525,27 @@
 				$boGroup = CreateObject('contactcenter.bo_group');
 				$boPeople = CreateObject('contactcenter.bo_people_catalog');
+			
+				switch($typeImport){
+					case 'outlook2000':
+						$namepos=1;
+						$emailpos=56;
+						break;
+					case 'thunderbird':
+						$namepos=2;
+						$emailpos=4;
+						break;
+					default:
+						$namepos=0;
+						$emailpos=1;
+				}
+				
 				while (($data = fgetcsv($handle, $len, $delim))) {
 
        				foreach ($header as $key=>$heading)
                			$row[$heading]=(isset($data[$key])) ? $data[$key] : '';
-
+       				
 					$sdata = array();
-					$full_name  = trim($row[$is_default ? $header[0] : $header[2]]);
-					$email		= trim($row[$is_default ? $header[1] : $header[4]]);
+					$full_name  = trim($row[$header[$namepos]]);
+					$email		= trim($row[$header[$emailpos]]);
 					$array_name = explode(' ', str_replace('"','',(str_replace('\'','',$full_name))));
 					$sdata['given_names'] = $array_name[0];
@@ -2520,5 +2573,5 @@
        			}       			
    				fclose($handle);
-				unlink($file);				
+				unlink($file);
 			}
 			else
Index: /trunk/contactcenter/js/ccIEContacts.js
===================================================================
--- /trunk/contactcenter/js/ccIEContacts.js	(revision 2)
+++ /trunk/contactcenter/js/ccIEContacts.js	(revision 15)
@@ -41,4 +41,5 @@
 			'Selecione o tipo do arquivo:&nbsp;<select id="typeImport">'+
 			'<option value="outlook">Outlook Express</option>'+
+			'<option value="outlook2000">Outlook 2000</option>'+
 			'<option value="thunderbird">Mozilla Thunderbird</option>'+
 			'<option value="expresso" selected>Expresso (padrão)</option></select><br>'+
@@ -59,5 +60,7 @@
 			'<input style="border:0" id="typeExport_1" name="radio" type="radio" value="outlook_pt-BR">Exportar como CSV do Outlook Express (Português)<br>'+
 			'<input style="border:0" id="typeExport_2" name="radio" type="radio" value="outlook_en">Exportar como CSV do Outlook Express (Inglês)<br>'+
-			'<input style="border:0" id="typeExport_3" name="radio" type="radio" value="thunderbird">Exportar como CSV do Mozilla Thunderbird'+
+			'<input style="border:0" id="typeExport_3" name="radio" type="radio" value="outlook2000_pt-BR">Exportar como CSV do Outlook 2000 (Português)<br>'+
+			'<input style="border:0" id="typeExport_4" name="radio" type="radio" value="outlook2000_en">Exportar como CSV do Outlook 2000 (Inglês)<br>'+
+			'<input style="border:0" id="typeExport_5" name="radio" type="radio" value="thunderbird">Exportar como CSV do Mozilla Thunderbird<br>'+
 			'</td></tr>'+
 			'<tr><td align="center">&nbsp;</td></tr>'+
@@ -216,7 +219,7 @@
 		var typeExport = Element("typeExport");
 
-		for(var index = 0; index < 4; index++){
+		for(var index = 0; index < 5; index++){
 			if(Element('typeExport_'+index).checked)
-				break;			
+				break;
 		}
 
Index: /trunk/index.php
===================================================================
--- /trunk/index.php	(revision 2)
+++ /trunk/index.php	(revision 15)
@@ -124,7 +124,7 @@
 	}
 
-	if(!isset($GLOBALS['phpgw_info']['nofooter']))
+	/*if(!isset($GLOBALS['phpgw_info']['nofooter']))
 	{
 		$GLOBALS['phpgw']->common->phpgw_footer();
-	}
+	}*/
 ?>
Index: /trunk/calendar/inc/class.uialarm.inc.php
===================================================================
--- /trunk/calendar/inc/class.uialarm.inc.php	(revision 2)
+++ /trunk/calendar/inc/class.uialarm.inc.php	(revision 15)
@@ -206,5 +206,7 @@
 //echo "<p>alarm_management='".htmlspecialchars($this->template->get_var('alarm_management'))."'</p>\n";
 			$this->template->pfp('out','alarm_management');
-		}
+			$GLOBALS['phpgw']->common->phpgw_footer();
+		}
+	
 	}
 ?>
Index: /trunk/calendar/inc/class.boicalendar.inc.php
===================================================================
--- /trunk/calendar/inc/class.boicalendar.inc.php	(revision 2)
+++ /trunk/calendar/inc/class.boicalendar.inc.php	(revision 15)
@@ -40,7 +40,7 @@
 	* Class
 	*/
-	define('PRIVATE',0);
-	define('PUBLIC',1);
-	define('CONFIDENTIAL',3);
+	define('_PRIVATE',0);
+	define('_PUBLIC',1);
+	define('_CONFIDENTIAL',3);
 
 	/*
@@ -1896,12 +1896,12 @@
 				switch($var)
 				{
-					case 'PRIVATE':
-						return PRIVATE;
-						break;
-					case 'PUBLIC':
-						return PUBLIC;
-						break;
-					case 'CONFIDENTIAL':
-						return CONFIDENTIAL;
+					case '_PRIVATE':
+						$var = _PRIVATE;
+						break;
+					case '_PUBLIC':
+						$var = _PUBLIC;
+						break;
+					case '_CONFIDENTIAL':
+						$var = _CONFIDENTIAL;
 						break;
 				}
@@ -1911,19 +1911,16 @@
 				switch((int)$var)
 				{
-					case PRIVATE:
-						return 'PRIVATE';
-						break;
-					case PUBLIC:
-						return 'PUBLIC';
-						break;
-					case CONFIDENTIAL:
-						return 'CONFIDENTIAL';
-						break;
-				}
-			}
-			else
-			{
-				return $var;
-			}
+					case _PRIVATE:
+						$var = '_PRIVATE';
+						break;
+					case _PUBLIC:
+						$var = '_PUBLIC';
+						break;
+					case _CONFIDENTIAL:
+						$var = '_CONFIDENTIAL';
+						break;
+				}
+			}
+			return $var;
 		}
 
Index: /trunk/calendar/inc/class.uicalendar.inc.php
===================================================================
--- /trunk/calendar/inc/class.uicalendar.inc.php	(revision 2)
+++ /trunk/calendar/inc/class.uicalendar.inc.php	(revision 15)
@@ -327,4 +327,5 @@
 			}
 			$GLOBALS['phpgw']->redirect($this->page('',$params));
+			
 		}
 
@@ -365,5 +366,5 @@
 				
 				$GLOBALS['phpgw']->common->phpgw_header();
-				$new_body = $this->bo->debug_string.$body;
+				$new_body = $this->bo->debug_string.$body;				
 				
 			}
@@ -374,4 +375,5 @@
 		{
 			echo $this->printer_friendly($this->get_month(),lang('Monthview'));
+			$GLOBALS['phpgw']->common->phpgw_footer();
 		}
 
@@ -469,4 +471,5 @@
 		{
 			echo $this->printer_friendly($this->get_week(),lang('Weekview'));
+			$GLOBALS['phpgw']->common->phpgw_footer();
 		}
 
@@ -644,4 +647,5 @@
 			}
 			echo $this->printer_friendly($this->get_year(),lang('Yearview'));
+			$GLOBALS['phpgw']->common->phpgw_footer();
 		}
 
@@ -933,4 +937,5 @@
 			));
 			
+			$GLOBALS['phpgw']->common->phpgw_footer();
 		}
 
@@ -1261,4 +1266,5 @@
 				)
 			);
+			$GLOBALS['phpgw']->common->phpgw_footer();
 		}
 
@@ -1382,4 +1388,5 @@
 			$p->parse('day_events','day_event');
 			print $this->printer_friendly($p->fp('out','day'),lang('Dayview'));
+			$GLOBALS['phpgw']->common->phpgw_footer();
 		}
 
