32 lines
1.5 KiB
PHP
Executable File
32 lines
1.5 KiB
PHP
Executable File
<?
|
|
require_once("modules/EcmDocuments/dirstree.php");
|
|
require_once("include/formbase.php");
|
|
if($_GET['subfoldername'])
|
|
{
|
|
$nn=getnextdirnumber($_REQUEST['record']);
|
|
$z="insert into ecmdocuments(id,name,iddir,isdir,assigned_user_id,modified_user_id,date_entered,date_modified,created_by,deleted,no) values('".create_guid()."','".$_GET['subfoldername']."','".$_REQUEST['record']."','1','".$current_user->id."','".$current_user->id."','".date("Y-m-d H:m:s")."','".date("Y-m-d H:m:s")."','".$current_user->id."','0','".$nn."')";
|
|
mysql_query($z);
|
|
}
|
|
$bl=explode("||",$_GET['record']."||".check_block($_GET['record'],""));
|
|
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.="<a class='utilsLink' href='index.php?module=EcmDocuments&action=DetailView&record=".$r['id']."'>".$r['no'].".".$r['name']."</a> / ";
|
|
}
|
|
$pathsamba="";
|
|
for($i=count($bl)-1;$i>=0;$i--)
|
|
{
|
|
$z="select name from ecmdocuments where id='".$bl[$i]."'";
|
|
$w=mysql_query($z);
|
|
$r=mysql_fetch_array($w);
|
|
$c=array("a","s","z","z","c","n","l","ó","e");
|
|
$p=array("a","s","z","z","c","n","l","o","e");
|
|
$pathsamba.="/".str_replace($c,$p,$r['name']);
|
|
}
|
|
$pathsamba=str_replace("///","/",$pathsamba);
|
|
$pathsamba="smb://janek:test55...@192.168.1.3/Celtic/CRM/Files".$patsamba."/".$_GET['subfoldername'];
|
|
mkdir($pathsamba,777);
|
|
handleRedirect($_REQUEST['record'],"EcmDocuments");
|
|
?>
|