Changeset 3629
- Timestamp:
- 12/23/10 16:31:17 (13 years ago)
- Location:
- branches/2.2/mobile/inc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/mobile/inc/class.bo_mobilecc.inc.php
r3595 r3629 96 96 97 97 98 $ids = $this->bo->find($what,$rules, false,false,true);98 $ids = $this->bo->find($what,$rules,array('order'=>$search),false,true); 99 99 100 100 if(is_array($ids)) { -
branches/2.2/mobile/inc/class.ui_mobilecc.inc.php
r3615 r3629 252 252 253 253 $p->set_var('show_check',$show_checkbox?"inline":"none"); 254 $p->set_var('bg',$bg=="par"?$bg="reset-dt":$bg="par"); 255 256 if($contact["catalog"]!=="bo_group_manager") { //Contatos 257 $id=strpos($contact["catalog"],"ldap")===false?$contact["id_contact"]:$contact['uidnumber'][0]; 254 $p->set_var('bg',$bg=="par"?$bg="reset-dt":$bg="par"); 255 256 if($contact["catalog"]!=="bo_group_manager") { //Contatos 257 $id=strpos($contact["catalog"],"ldap")===false?$contact["id_contact"]:$id; 258 259 $mail = ' '; $tel = ' '; 260 foreach($contact['connections'] as $key => $conn) { 261 262 $test = false; 263 if ($conn['connection_is_default']) { 264 $test = true; 265 } 266 267 if (is_array($conn)){ 268 $test = true; 269 } 270 271 if ( $test) { 272 if ( ($conn['id_type'] == 1) ) 273 $mail = $conn['connection_value']; 274 else if ( ($conn['id_type'] == 2) ) 275 $tel = $conn['connection_value']; 276 } 277 } 278 258 279 259 $mail = $contact["connections"]["connection1"]["connection_value"];//Preciso o mail depois 260 $cn = is_array($contact["names_ordered"])? 261 $contact["names_ordered"][0]:$contact["names_ordered"]; 262 if(($contact["connections"]["connection1"]["connection_value"]==null || 263 (string)$contact["connections"]["connection1"]["id_type"]!=="1") 264 && isset($request_from)) //Se vier de outro módulo e não possuir e-mail, não mostre. 280 $cn = is_array($contact["names_ordered"])?$contact["names_ordered"][0]:$contact["names_ordered"]; 281 $vtel = ($tel==null || $tel==' ')?"none":"inline"; 282 283 if(($mail==' ' || $mail==null) && isset($request_from))//Se vier de outro módulo e não possuir e-mail, não mostre. 265 284 continue; 266 285 267 $p->set_var('contact_id',$id); 268 $p->set_var('lang_tel',lang("tel")); 269 $p->set_var('show_tel',$contact["connections"]["connection2"]["connection_value"]!=null?"inline":"none"); 270 $p->set_var('contact_name',$functions->strach_string($cn,17)); 271 $p->set_var('email', 272 $functions->strach_string( 273 ($contact["connections"]["connection1"]["connection_value"]!=null && 274 (string)$contact["connections"]["connection1"]["id_type"]==="1")? 275 $contact["connections"]["connection1"]["connection_value"]:" ",20)); 276 $p->set_var('tel',$functions->strach_string($contact["connections"]["connection1"]["id_type"]==="2"? 277 $contact["connections"]["connection1"]["connection_value"]: 278 $contact["connections"]["connection2"]["connection_value"],19)); 279 280 $block = "row_contacts"; 281 } 282 else { //Grupos 283 $id=$contact["id_group"]; 284 $mail = $cn = $contact["title"]; 285 $p->set_var('group_id',$contact["id_group"]); 286 $p->set_var('group_name',$contact["title"]); 287 $block = "row_groups"; 288 } 289 290 if($request_from==null) { 291 $p->set_var('lang_see_details',strtoupper(lang("see details"))); 292 $p->set_var('href_details',"ui_mobilecc.contact_view&id=$id&catalog=".$contact["catalog"]); 293 } 294 else { 295 $p->set_var('lang_see_details',strtoupper(lang("select"))); 296 $p->set_var("href_details","ui_mobilemail.add_recipient&mail=$mail&cn=$cn"); 297 } 298 299 $p->fp('rows',$block,True); 286 $p->set_var('show_tel',$vtel); 287 $p->set_var('email',$mail); 288 $p->set_var('tel',$tel); 289 $p->set_var('contact_id',$id); 290 $p->set_var('lang_tel',lang("tel")); 291 $p->set_var('contact_name',$functions->strach_string($cn,14)); 292 293 $block = "row_contacts"; 294 } 295 else { //Grupos 296 $id=$contact["id_group"]; 297 $mail = $cn = $contact["title"]; 298 $p->set_var('group_id',$contact["id_group"]); 299 $p->set_var('group_name',$contact["title"]); 300 $block = "row_groups"; 301 } 302 303 if($request_from==null) { 304 $p->set_var('lang_see_details',strtoupper(lang("see details"))); 305 $cat_encode = urlencode($contact["catalog"]); 306 $p->set_var('href_details',"ui_mobilecc.contact_view&id=$id&catalog=".urlencode($contact["catalog"])); 307 } 308 else { 309 $p->set_var('lang_see_details',strtoupper(lang("select"))); 310 $p->set_var("href_details","ui_mobilemail.add_recipient&mail=$mail&cn=$cn"); 311 } 312 313 $p->fp('rows',$block,True); 300 314 } 301 315
Note: See TracChangeset
for help on using the changeset viewer.