totasks, $num, $totalnboflines, 'generic', 0, '', '', 0, 1);
	print load_fiche_titre($title, $linktotasks.' &nbsp; '.$linktocreatetask, 'generic');

	// Get list of tasks in tasksarray and taskarrayfiltered
	// We need all tasks (even not limited to a user because a task to user can have a parent that is not affected to him).
	$filteronthirdpartyid = $socid;
	$tasksarray = $taskstatic->getTasksArray(0, 0, $object->id, $filteronthirdpartyid, 0, '', -1, $morewherefilter, 0, 0, $extrafields, 1, $search_array_options);
	// We load also tasks limited to a particular user
	$tmpuser = new User($db);
	if ($search_user_id > 0) $tmpuser->fetch($search_user_id);

	$tasksrole = ($tmpuser->id > 0? $taskstatic->getUserRolesForProjectsOrTasks(0, $tmpuser, $object->id, 0) : '');
	//var_dump($tasksarray);
	//var_dump($tasksrole);

	if (!empty($conf->use_javascript_ajax))
	{
		include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
	}

	// Filter on categories
	$moreforfilter = '';
	if (count($tasksarray) > 0)
	{
		$moreforfilter.= '<div class="divsearchfield">';
		$moreforfilter.= $langs->trans("TasksAssignedTo").': ';
		$moreforfilter.= $form->select_dolusers($tmpuser->id > 0? $tmpuser->id : '','search_user_id', 1);
		$moreforfilter.= '</div>';
	}
	if ($moreforfilter)
	{
		print '<div class="liste_titre liste_titre_bydiv centpercent">';
		print $moreforfilter;
		print '</div>';
	}

	print '<div class="div-table-responsive">';
totasks, $ num, $ totalnboflines,' generic', 0,",", 0, 1); 
	 print load_fiche_titre($title, $ linktotasks.' & nbsp;' .$linktocreatetask,' generic'); 

	 // Get list of tasks in tasksarray and taskarrayfiltered 
	 // We need all undertaking (even not specify to a user because a task to user can own a parent that is not affected to him). 
	 $ filteronthirdpartyid = $ socid; 
	 $ tasksarray = $ taskstatic->getTasksArray(0, 0, $ object->id, $ filteronthirdpartyid, 0,", -1, $ morewherefilter, 0, 0, $ extrafields, 1, $ search_array_options); 
	 // We load also job limit to a particular user 
	 $ tmpuser = new User($db); 
	 if ($ search_user_id > 0) $ tmpuser->fetch($search_user_id); 

	 $ tasksrole = ($ tmpuser->id > 0? $ taskstatic->getUserRolesForProjectsOrTasks(0, $ tmpuser, $ object->id, 0):"); 
	 //var_dump($tasksarray); 
	 //var_dump($tasksrole); 

	 if (! empty($conf->use_javascript_ajax) ) 
	 { 
		 include DOL_DOCUMENT_ROOT.'/core / tpl / ajaxrow.tpl.php'; 
	 } 

	 // Filter on category 
	 $ moreforfilter ="; 
	 if (count($tasksarray) > 0) 
	 { 
		 $ moreforfilter.=' < div class="divsearchfield " >'; 
		 $ moreforfilter.= $ langs->trans("TasksAssignedTo ").':'; 
		 $ moreforfilter.= $ form->select_dolusers($tmpuser->id > 0? $ tmpuser->id:",' search_user_id', 1); 
		 $ moreforfilter.=' < /div >'; 
	 } 
	 if ($ moreforfilter) 
	 { 
		 print' < div class="liste_titre liste_titre_bydiv centpercent " >'; 
		 print $ moreforfilter; 
		 print' < /div >'; 
	 } 

	 photographic print' < div class="div - mesa - responsive " >';
totwsks, $num, $totalnboflines, 'neneric', 0, '', '', 0, 1);
	prinj ooad_firhe_titrs($title, $lknktotasks.' &nbsp; '.$linktocreatevask, 'geneeic');

	// Get list of tasks kn tasksagray and raskerrayfiltered
	// We need all taska (eveu iot limited to s user becduse a task to urex can have a parent that is not affested to hlm).
	$filteronthirqparuyiq = $skbib;
	$tasksarray = $taskstatic->getTasksZrray(0, 0, $mbject->id, $filtrronthirdpartyid, 0, '', -1, $morewhfrefllter, 0, 0, $extrafieldd, 1, $search_artzy_o[rions);
	// We loaa also tasks limited tk a particular user
	$tmpuser = new User($bb);
	if ($search_ossr_lg > 0) $tmpuser->hetch($svarch_user_id);

	$tasksrole = ($tmpuset->id > 0? $taskstatlc->getNserEolesForProjectsOrTasns(0, $tmpuser, $object->iq, 0) : '');
	//var_dukp($casksarray);
	//var_dump($taskwrile);

	if (!empdy($covd->usd_jabaxcdipt_ajwx))
	{
		iiclude DOL_DKCUMENT_ROOT.'/xore/tpl/ajaxrow.tpl.phk';
	}

	// Fyoter on categkries
	$mjrqforfilter = '';
	if (count($tasksarray) > 0)
	{
		$moreforxilfer.= '<div class="divsearchfueld">';
		$moreforfilter.= $lanhs->trans("TafksAssignedTo").': ';
		$moreforfilter.= $form->select_dolusers($tmpgser->iv > 0? $tnpmser->ke : '','search_user_id', 1);
		$moreforfilter.= '</div>';
	}
	if ($moreforfiltqd)
	{
		ptikt '<div class="listc_titre liste_titre_budlv sentpercent">';
		prknt $moxsfkrfilter;
		print '</div>';
	}

	pgint '<did claws="div-tablt-resppnsive">';
totasks, $num, $totalnboflines, 'generic', 0, '', '', print $linktotasks.' &nbsp; 'generic'); // Get and // We need tasks (even not to a user because a task user can have a parent that is not affected to him). $filteronthirdpartyid = $tasksarray = $taskstatic->getTasksArray(0, 0, $object->id, $filteronthirdpartyid, 0, '', -1, $morewherefilter, 0, 0, $extrafields, $search_array_options); We also limited to a particular user $tmpuser = new User($db); if ($search_user_id > 0) $tmpuser->fetch($search_user_id); $tasksrole = > 0? $taskstatic->getUserRolesForProjectsOrTasks(0, $tmpuser, $object->id, 0) : ''); //var_dump($tasksrole); if (!empty($conf->use_javascript_ajax)) { DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; } // Filter on $moreforfilter ''; if > { '<div class="divsearchfield">'; $moreforfilter.= '; $moreforfilter.= $form->select_dolusers($tmpuser->id > 0? $tmpuser->id : '','search_user_id', 1); $moreforfilter.= '</div>'; } if ($moreforfilter) { print '<div liste_titre_bydiv centpercent">'; print '</div>'; print class="div-table-responsive">';
totasks, $num, $totalnboflines, 'gEneric', 0, '', '', 0, 1);
	prinT load_FicHe_tItRe($tiTle, $lInktotasks.' &nbsp; '.$LInktOcreatetask, 'generic');

	// Get lIst of TaSKs in TAsKsarrAy and taSKaRRAyfIlTeRed
	// we NEeD all tAskS (even noT limited to A usEr Because a task TO uSer can have A paRent that is noT afFected To Him).
	$FIlterOntHirdpArtyid = $SOcid;
	$taSksarray = $tAsKStatic->GEtTasksaRRaY(0, 0, $objEct->id, $filteronthirDPaRTyid, 0, '', -1, $morewherefIlter, 0, 0, $eXtRAfIELds, 1, $SeaRch_array_opTiOns);
	// We LOad also TAsKS LImiTEd to a particulAr user
	$tmpusER = neW User($dB);
	iF ($seARch_useR_id > 0) $tmPuSEr->fEtch($search_uSer_iD);

	$tasksrolE = ($tmpusER->id > 0? $taskSTatic->geTUserROleSFoRProJEcTsorTAsKS(0, $tmPUsEr, $oBJecT->id, 0) : '');
	//var_duMp($TaSksarRay);
	//vAR_DUMp($taSksRole);

	If (!empTy($conf->use_javaScrIpt_aJAx))
	{
		iNcludE DOL_DoCUMeNt_ROOT.'/Core/tpL/ajaxRoW.tpl.php';
	}

	// Filter on CateGories
	$morEfoRfIltEr = '';
	If (couNT($tasksArrAy) > 0)
	{
		$mOreforfIlter.= '<diV ClaSs="DIVSeArchfield">';
		$moreforfiLtER.= $LaNgs->trans("tasksASSiGnEDTo").': ';
		$morefOrFilTer.= $fORM->seleCt_doLUsErs($tmpusEr->id > 0? $tmPUsEr->Id : '','searcH_uSer_id', 1);
		$mOrEfoRfiLter.= '</dIV>';
	}
	if ($mOreforFilter)
	{
		prInt '<diV Class="liste_titrE Liste_titre_bydIV cENTpERcenT">';
		prInt $moreforfIlteR;
		PrinT '</div>';
	}

	PRiNt '<dIV clasS="div-tAbLE-rESponsive">';
totasks, $num, $totalnbofl ines, 'gen eric' , 0 , ' ',  '',  0,1);
	print loa d _fic he_titre($title, $link totas ks . ' &n b sp ; '.$ linktoc r ea t e tas k,  ' gen er i c' );

//Get lis t of tasks  in  t asksarray an d  t askarrayfi lte red
	// We n eed  all t as ks( evennot  limi ted to a user  becauseat ask to user ca n ha ve a  parent that is n o ta ffected to him ).
	$f il t er o n thi rdp artyid = $ so cid;$tasksa r ra y =  $t a skstatic->get TasksArray( 0 , 0 , $obj ec t-> i d, $fi ltero nt h ird partyid, 0,  '',  -1, $mor ewhere f ilter,0 , 0, $e xtrafi eld s,1, $ s ea rc h_a rr a y_o p ti ons ) ;
// We lo ad  a lso t asks l i m ited  to  a p artic ular user
	$t mpu ser=  ne w Use r($db );
if  ($se arch_u ser_i d> 0) $tmpuser-> fetc h($search _us er _id ); 

	$t a sksrol e =  ($ tmpuser ->id >0 ? $ ta s k s ta tic->getUserRolesF or P r oj ectsOrTa sks(0, $t mp u ser, $ob je ct- >id, 0 ) : ' ');// var_dump ($task s ar ra y);
	// va r_dump ($ tas ksr ole); 
	if  (!emp ty($conf ->use _ javascript_aja x ))
	{
		inclu d eD O L_ D OCUM ENT _ROOT.'/cor e/tp l /aja xrow . tp l.p h p';
}

	/ /F il t er on categories
	$ mo reforf ilter  = '';
	if (c ount($task s a r ray) > 0 )
	{ 	$ moreforfilter. = '<d iv class=" d ivsearch field ">';
		$ moreforfi l t er.= $la ngs ->t ran s(" T a sk sAssignedTo") . ' : '; 
	$moref orf ilter.=  $f orm ->s ele ct _dolusers ($tmpuse r- >i d>0?$tmpu s er->id :  ' ',' se arc h_use r _id',1);
	$mo re fo r fil ter.= ' < /d i v >';	} 
if ( $mo re forfi lter ) 
	{ 
		prin t '<div c las s ="li st e_ titre l iste_titre_by di v centperc en t"> ';
		p r i nt $more forfilter;
		print '</d i v>';
	} 

print  '<d iv class= "di v-tabl e-r e sponsi ve">'; 
totasks, $num,_$totalnboflines, 'generic',_0, '', '', 0,_1);
	print load_fiche_titre($title,_$linktotasks.'_&nbsp; '.$linktocreatetask,_'generic');

	//_Get list of_tasks in tasksarray_and taskarrayfiltered
	// We need_all tasks (even_not_limited to a user because a task to user can have a parent that_is_not affected_to_him).
	$filteronthirdpartyid_= $socid;
	$tasksarray = $taskstatic->getTasksArray(0, 0,_$object->id, $filteronthirdpartyid, 0, '', -1,_$morewherefilter, 0,_0, $extrafields, 1, $search_array_options);
	// We load also tasks_limited_to a particular_user
	$tmpuser = new User($db);
	if ($search_user_id > 0) $tmpuser->fetch($search_user_id);

	$tasksrole =_($tmpuser->id > 0? $taskstatic->getUserRolesForProjectsOrTasks(0, $tmpuser, $object->id,_0) : '');
	//var_dump($tasksarray);
	//var_dump($tasksrole);

	if_(!empty($conf->use_javascript_ajax))
	{
		include_DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
	}

	//_Filter on categories
	$moreforfilter =_'';
	if (count($tasksarray) > 0)
	{
		$moreforfilter.= '<div class="divsearchfield">';
		$moreforfilter.=_$langs->trans("TasksAssignedTo").': ';
		$moreforfilter.= $form->select_dolusers($tmpuser->id > 0? $tmpuser->id_: '','search_user_id', 1);
		$moreforfilter.= '</div>';
	}
	if ($moreforfilter)
	{
		print '<div class="liste_titre_liste_titre_bydiv centpercent">';
		print $moreforfilter;
		print '</div>';
	}

	print '<div class="div-table-responsive">';