function clearDlgBx(){ if(document.forms.MkRnDir.nome){document.forms.MkRnDir.nome.value="";} if(document.forms.MkRnDir.note){document.forms.MkRnDir.note.value="";} if(document.forms.MkRnFile.nome){document.forms.MkRnFile.nome.value="*.*";} if(document.forms.MkRnFile.html){document.forms.MkRnFile.html.checked=false;} if(document.forms.MCDirFile.MCpath){document.forms.MCDirFile.MCpath.value="";} if(document.forms.MCDirFile.MCidPath){document.forms.MCDirFile.MCidPath.value="";} } function clearActions(){ document.getElementById('menuActions').innerHTML=''; } function cngModVis(){ valDataPass="ajaxOpt=cngModVis"; ajaxPhpPOST.ajaxRequest(valDataPass,"workPanel",0); var dettAntID=document.getElementById('dettAnt'); var CMV=document.getElementById('CMV'); if(CMV.innerHTML=="d"){ dettAntID.innerHTML="\"Dettagli\""; CMV.innerHTML="a"; }else{ dettAntID.innerHTML="\"Anteprima\""; CMV.innerHTML="d"; } } function editFile(){ getFiles(); valDataPass="ajaxOpt=editfile"; valDataPass+="&actionFiles="+encodeURIComponent(encodeURI(document.forms.fileListForm.actionFiles.value)); ajaxPhpPOST.ajaxRequest(valDataPass,"workPanel",0); } function valEditFile(){ check=true; if (document.forms.EditFile.code.value==""||document.forms.EditFile.code.value==" ") { if(!confirm("Non hai scritto il contenuto del file:\n Continuare?")){document.forms.EditFile.code.focus();check=false;} } if(check){ valDataPass="ajaxOpt=editfile"; valDataPass+="&actionFiles="+encodeURIComponent(encodeURI(document.forms.EditFile.actionFiles.value)); valDataPass+="&code="+encodeURIComponent(encodeURI(document.forms.EditFile.code.value)); valDataPass+="&done="+encodeURIComponent(encodeURI("1")); ajaxPhpPOST.ajaxRequest(valDataPass,"workPanel",0); } } function MkFile(){ document.getElementById('MkRnFileTitle').innerHTML="Crea nuovo file"; document.forms.MkRnFile.opt.value="m"; document.getElementById('MkRnFileHtml').innerHTML="(html template)"; document.forms.MkRnFile.html.disabled=false; openDialog('MkRnFileID'); } function MkDir(){ document.getElementById('MkRnDirTitle').innerHTML="Crea nuova cartella"; document.forms.MkRnDir.opt.value="m"; openDialog('MkRnDirID'); } function Rename(t){ getFiles(); var f=document.forms.fileListForm.actionFiles.value; var dat=f.split("#"); if(t=="c"){RnDir(dat[0]);} if(t=="f"){RnFile(dat[0]);} } function RnFile(f){ document.getElementById('MkRnFileTitle').innerHTML="Rinomina file"; document.forms.MkRnFile.opt.value="r"; document.forms.MkRnFile.nome.value=f; document.getElementById('MkRnFileHtml').innerHTML=""; openDialog('MkRnFileID'); } function RnDirAjx(){ if(ajaxPhpPOST.AJAX.readyState < 4){var timer=setTimeout("RnDirAjx()",1)}else{ document.forms.MkRnDir.note.value=ajaxPhpPOST.output; openDialog('MkRnDirID'); } } function RnDir(f){ valDataPass="ajaxOpt=getdirinfo"; valDataPass+="&actionFiles="+encodeURIComponent(encodeURI(document.forms.fileListForm.actionFiles.value)); valDataPass+="&obj=nome"; ajaxPhpPOST.ajaxRequest(valDataPass,0,1); document.getElementById('MkRnDirTitle').innerHTML="Rinomina cartella"; document.forms.MkRnDir.opt.value="r"; document.forms.MkRnDir.nome.value=f; RnDirAjx(); } function valMkRnDir(){ check=true; Filtro = /^([a-zA-Z0-9_\-])+$/; if (document.forms.MkRnDir.nome.value==""||document.forms.MkRnDir.nome.value==" ") {alert("Non hai scritto il nome della cartella!");document.forms.MkRnDir.nome.focus();check=false;} if (check && !Filtro.test(document.forms.MkRnDir.nome.value)){alert("Nome non valido!\nSono consentiti solo i caratteri alfanumerici (accentate escluse),\ne i caratteri '_' e '-'");document.forms.MkRnDir.nome.focus();check=false;} if(check){ if(document.forms.MkRnDir.opt.value=="m"){valDataPass="ajaxOpt=mkdir";}else{ valDataPass="ajaxOpt=rndir"; valDataPass+="&actionFiles="+encodeURIComponent(encodeURI(document.forms.fileListForm.actionFiles.value)); } valDataPass+="&nome="+encodeURIComponent(encodeURI(document.forms.MkRnDir.nome.value)); valDataPass+="¬e="+encodeURIComponent(encodeURI(document.forms.MkRnDir.note.value)); ajaxPhpPOST.ajaxRequest(valDataPass,"workPanel",0); hid_it('MkRnDirID'); document.forms.MkRnDir.nome.value=""; document.forms.MkRnDir.note.value=""; } } function valMkRnFile(){ check=true; Filtro = /^([a-zA-Z0-9_\-\.])+$/; var fileName = new Array(); if (document.forms.MkRnFile.nome.value=="*.*" || document.forms.MkRnFile.nome.value=="" || document.forms.MkRnFile.nome.value==" ") {alert("Non hai scritto il nome del file!");document.forms.MkRnFile.nome.focus();check=false;} if (check && !Filtro.test(document.forms.MkRnFile.nome.value)){alert("Nome non valido!\nSono consentiti solo i caratteri alfanumerici (accentate escluse),\ne i caratteri '.', '_' e '-'");document.forms.MkRnFile.nome.focus();check=false;} if(document.forms.MkRnFile.nome.value.indexOf('.' != -1)) { fileName = document.forms.MkRnFile.nome.value.split('.'); ext=fileName.pop(); if(check && ext=="flmngr"){alert("Estensione non valida!");document.forms.MkRnFile.nome.focus();check=false;} } if(check){ if(document.forms.MkRnFile.opt.value=="m"){ valDataPass="ajaxOpt=mkfile"; if(document.forms.MkRnFile.html.checked){ valDataPass+="&html="+encodeURIComponent(encodeURI("yes")); }else{ valDataPass+="&html="+encodeURIComponent(encodeURI("no")); } }else{ valDataPass="ajaxOpt=rnfile"; valDataPass+="&actionFiles="+encodeURIComponent(encodeURI(document.forms.fileListForm.actionFiles.value)); } valDataPass+="&nome="+encodeURIComponent(encodeURI(document.forms.MkRnFile.nome.value)); ajaxPhpPOST.ajaxRequest(valDataPass,"workPanel",0); hid_it('MkRnFileID'); document.forms.MkRnFile.nome.value="*.*"; } } function valWrtFile(){ check=true; if (document.forms.WrtFile.code.value==""||document.forms.WrtFile.code.value==" ") { if(!confirm("Non hai scritto il contenuto del file:\n Continuare?")){document.forms.WrtFile.code.focus();check=false;} } if(check){ valDataPass="ajaxOpt=mkfile"; valDataPass+="&nome="+encodeURIComponent(encodeURI(document.forms.WrtFile.nome.value)); valDataPass+="&code="+encodeURIComponent(encodeURI(document.forms.WrtFile.code.value)); valDataPass+="&done="+encodeURIComponent(encodeURI("1")); ajaxPhpPOST.ajaxRequest(valDataPass,"workPanel",0); } } function selectall(){ selId=document.forms.fileListForm.selId; selIdAll=document.forms.fileListForm.selIdAll; if(selId){ if(selId.length==undefined){ if(selIdAll.checked==true){ selId.checked=true; document.getElementById("tr0").className="rowOver"; }else{ selId.checked=false; document.getElementById("tr0").className="rowOut"; } }else{ if(selIdAll.checked==true){ for (i = 0; i\"Elimina\"   ","\"Copia\"   ","\"Copia\"   ","\"Sposta\"   ","\"Sposta\"   ","\"Rinomina\"   ","\"Modifica\"   ","\"Visualizza\"   ","\"Play\"   "); actions=""; if(t=="f"){ } if(t=="c"){ } if(e=="1"){ } if(b=="1"){actions+=act[7];} if(p=="1"){actions+=act[8];} } }else{ var act=new Array("\"Elimina\"   ","\"Copia\"   ","\"Copia\"   ","\"Sposta\"   ","\"Sposta\"   ","\"Rinomina\"   ","\"Modifica\"   ","\"Visualizza\"   ","\"Play\"   "); for (i = 0; i1){ actions=""; }else{ if(nchk==1){ actions=""; if(t=="f"){ } if(t=="c"){ } if(e=="1"){ } if(b=="1"){actions+=act[7];} if(p=="1"){actions+=act[8];} } } } document.getElementById('menuActions').innerHTML=actions; } } function getFiles(){ selId=document.forms.fileListForm.selId; listCheckedFiles=""; if(selId.length==undefined){ listCheckedFiles+=selId.value+"#"; }else{ for (i = 0; i < selId.length; ++ i){ if(selId[i].checked==true){listCheckedFiles+=selId[i].value+"#";} } } document.forms.fileListForm.actionFiles.value=listCheckedFiles; } function delFiles(){ if(confirm('Eliminare le cartelle e/o i file selezionati?')){ getFiles(); valDataPass="ajaxOpt=delfile"; valDataPass+="&actionFiles="+encodeURIComponent(encodeURI(document.forms.fileListForm.actionFiles.value)); ajaxPhpPOST.ajaxRequest(valDataPass,"workPanel",0); } } function copyFiles(){ getFiles(); document.getElementById('moveCopyTitle').innerHTML="Copia file e cartelle"; document.getElementById('moveCopyAct').innerHTML="copiare"; document.forms.MCDirFile.MCaction.value="copy"; openDialog('moveCopy'); } function copyFilesAjx(){ if(document.forms.MCDirFile.MCidPath.value==""){alert("Devi selezionare la cartella di destinazione!");}else{ valDataPass="ajaxOpt=copyfile"; valDataPass+="&actionFiles="+encodeURIComponent(encodeURI(document.forms.fileListForm.actionFiles.value)); valDataPass+="&target="+encodeURIComponent(encodeURI(document.forms.MCDirFile.MCidPath.value)); ajaxPhpPOST.ajaxRequest(valDataPass,"workPanel",0); hid_it('moveCopy'); document.forms.MCDirFile.MCpath.value=""; document.forms.MCDirFile.MCidPath.value=""; } } function moveFiles(){ getFiles(); document.getElementById('moveCopyTitle').innerHTML="Sposta file e cartelle"; document.getElementById('moveCopyAct').innerHTML="spostare"; document.forms.MCDirFile.MCaction.value="move"; openDialog('moveCopy'); } function moveFilesAjx(){ if(document.forms.MCDirFile.MCidPath.value==""){alert("Devi selezionare la cartella di destinazione!");}else{ valDataPass="ajaxOpt=movefile"; valDataPass+="&actionFiles="+encodeURIComponent(encodeURI(document.forms.fileListForm.actionFiles.value)); valDataPass+="&target="+encodeURIComponent(encodeURI(document.forms.MCDirFile.MCidPath.value)); ajaxPhpPOST.ajaxRequest(valDataPass,"workPanel",0); hid_it('moveCopy'); document.forms.MCDirFile.MCpath.value=""; document.forms.MCDirFile.MCidPath.value=""; } } function MCswitchAction(){ if(document.forms.MCDirFile.MCaction.value=="copy"){copyFilesAjx();} if(document.forms.MCDirFile.MCaction.value=="move"){moveFilesAjx();} } function MCsetPathAJx(){ if(ajaxPhpPOST.AJAX.readyState < 4){var timer=setTimeout("MCsetPathAJx()",1)}else{ document.forms.MCDirFile.MCpath.focus(); document.forms.MCDirFile.MCpath.value=ajaxPhpPOST.output; } } function MCsetPath(n){ valDataPass="ajaxOpt=strutturadir"; valDataPass+="&fromtree="+n; ajaxPhpPOST.ajaxRequest(valDataPass,0,1); document.forms.MCDirFile.MCidPath.value=n; MCsetPathAJx(); } function updateTrees(){ document.getElementById('menuTree').src=document.getElementById('menuTree').src; document.getElementById('functionMenuTree').src=document.getElementById('functionMenuTree').src; } function openObj(){ if(ajaxPhpPOST.AJAX.readyState < 4){var timer=setTimeout("openObj()",1)}else{ window.open("TMP.php",((new Date()).valueOf())); } } function openObjSetPath(){ selId=document.forms.fileListForm.selId; if(selId.length==undefined){ file=selId.value; }else{ for (i = 0; i < selId.length; ++ i){ if(selId[i].checked==true){file=selId[i].value;} } } valDataPass="ajaxOpt=openPath"; valDataPass+="&file="+encodeURIComponent(encodeURI(file)); ajaxPhpPOST.ajaxRequest(valDataPass,0,1); openObj(); } function playFlv(){ selId=document.forms.fileListForm.selId; if(selId.length==undefined){ file=selId.value; }else{ for (i = 0; i < selId.length; ++ i){ if(selId[i].checked==true){file=selId[i].value;} } } valDataPass="ajaxOpt=video"; valDataPass+="&file="+encodeURIComponent(encodeURI(file)); ajaxPhpPOST.ajaxRequest(valDataPass,'workPanel',0); clearActions(); }