'; $text=""; $t=""; $i=0; $t=$r['name']; $num=20; for($i=0;$i<20;$i++) { if($t[$i]=="Ă")$num++; if($t[$i]=="Å")$num+2; } if(strlen($t)>$num-1) { for($i=0;$i<=$num;$i++) { $text.=$t[$i]; } $text=$text."..."; } else { $text=$t; } $template.=$text.' '; $text=""; $t=""; $i=0; $t=$r['account_name']; $num=20; for($i=0;$i<20;$i++) { if($t[$i]=="Ă" || $t[$i]=="Å")$num++; } if(strlen($t)>$num-1) { for($i=0;$i<=$num;$i++) { $text.=$t[$i]; } $text=$text."..."; } else { $text=$t; } $template.=$text.' '; $date=$r['date_entered']; $template.=$timedate->to_display(gmdate("Y-m-d",mktime(0, 0, 0, $date[5].$date[6], $date[8].$date[9], $date[0].$date[1].$date[2].$date[3])+86400),"Y-m-d",$timedate->get_date_format()); $template.=''; $za="select version from ecmfiles_versions where file_id='".$r['file_id']."' order by version desc limit 1"; $ro=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query($za)); $template.=''.$ro['version'].' '.$r['assigned_user_name'].' '; if($r['file_id'])$template.=''; else $template.=''; $template.=' '; if($r['file_id'])$template.=''; else $template.=''; $template.=' '; return $template; } ?>