session_start(); require_once("../../config.php"); print '
'; $sql=mysql_connect($sugar_config['dbconfig']['db_host_name'],$sugar_config['dbconfig']['db_user_name'],$sugar_config['dbconfig']['db_password']); mysql_select_db($sugar_config['dbconfig']['db_name']); mysql_query("set names utf8"); mysql_query("set charaecterset utf8"); require_once("dirstree.php"); $z="select ecmdocument_id from ".$_REQUEST['relation']." where ".$_REQUEST['relationid']."='".$_REQUEST['record']."' and deleted=0"; $rr=mysql_fetch_array(mysql_query("select name from ".str_replace("ecmdocuments_","",$_REQUEST['relation'])." where id='".$_REQUEST['record']."'")); $name=$rr['name']; $w=mysql_query($z); while($r=mysql_fetch_array($w))$idp[]=$r['ecmdocument_id']; $linked_path=""; if(mysql_num_rows($w)>0) { foreach($idp as $ids) { $bl=explode("||",$ids."||".check_block($ids,"")); for($i=count($bl)-1;$i>=0;$i--) { $z="select name,id,no from ecmdocuments where id='".$bl[$i]."'"; $w=mysql_query($z); $r=mysql_fetch_array($w); if($r['name'])$linked_path.=''.$r['no'].'.'.$r['name'].' / '; } $linked_path.="