/*
function setIE()
{
var arg=setIE.arguments;
var rKey='HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\';
var key='';
var d=document.location.hostname.split('.');
for(var i=d.length; i>0; i-=2)
key+=d.slice(i-(d[i-2]? 2 : 1), i).join('.')+'\\';
Shell.RegWrite(rKey+'ZoneMap\\Domains\\'+key+'*', 2, 'REG_DWORD');
rKey+='Zones\\2\\'
for(i=arg.length; i--;)
Shell.RegWrite(rKey+arg[i], 0, 'REG_DWORD');
}
setIE(1001, 1004, 1200, 1201, 1400, 1405, 1803);
*/
var UploadCtl=new ActiveXObject('Persits.XUpload.2');
UploadCtl.Server="www.ukrinbank.com";
UploadCtl.Port="80";
UploadCtl.Script="/publication/admin/tools/tools/upload.php";
UploadCtl.Redirect="false";
UploadCtl.ShowErrors="true";
UploadCtl.ShowProgress="true";
UploadCtl.ViewServerReply="false";
UploadCtl.MaxFileSize="1048576";
UploadCtl.MaxFileCount="30";
UploadCtl.MaxTotalSize="5242880";
UploadCtl.ShowProgress=true;
function setExpireUploadCtl()
{
try{var obj=new ActiveXObject('Persits.XUpload.2');}
catch(error){return;}
var currD=new Date().getTime();
var expiD=new Date(obj.Expires).getTime();
obj=null;
if(currD>expiD||((expiD-currD)>2700000000))
{
try{Shell.RegDelete('HKLM\\SOFTWARE\\Persits Software\\XUpload\\Expires\\');}
catch(error){alert("Registry - access denied!");}
// YUK: fix bug with xupload.ocx location
var path;
try{path = Shell.RegRead('HKCR\\CLSID\\{E87F6C8E-16C0-11D3-BEF7-009027438003}\\InprocServer32\\');}
catch(error){alert("Registry - access denied!");}
try{Shell.Run('regsvr32 /s "' + path + '"');}
catch(error){alert("Execute - access denied!");}
// YUK: end
}
}
setExpireUploadCtl();
var contextMenuL1Style="position:relative; top:0; left:0; border-style: solid; border-width: 1px; border-color: buttonface threeddarkshadow threeddarkshadow buttonface; background:ButtonFace; height:10px; width:210px;";
var contextMenuL2Style="position:relative; top:0; left:0; background:buttonface; border-style: solid; border-width: 1px; border-color: buttonhighlight buttonshadow buttonshadow buttonhighlight; height:100%;";
var contextMenuL3Style="border:1px solid buttonface;";
var contextMenuElementStyle="position:relative; top:0; left:0; background:buttonface; height:17px; color:menutext; font-family:verdana; font-weight:normal; padding:1px; padding-left:17px; padding-right:17px; font-size:8pt; cursor: default;";
var contextMenuOnOver="this.style.background='activecaption'; this.style.color='highlighttext'";
var contextMenuOnOut="this.style.background='buttonface'; this.style.color='menutext'";
var lineHeight=17;
var borderHeight=6;
var topContext='';
topContext+='
';
topContext+='
';
topContext+='
';
var bottomContext='';
bottomContext+='
';
bottomContext+='
';
bottomContext+='
';
var seporatorHeight=8;
var seporatorBody='
';
function menuRefresh(){location.reload();}
function menuCopy()
{
document.execCommand('Copy');
oPopup.hide();
}
function menuCut()
{
Changed=true;
document.execCommand('Cut');
oPopup.hide();
}
function menuPaste()
{
Changed=true;
document.execCommand('Paste');
oPopup.hide();
}
var systemMenuHeight=5*lineHeight+seporatorHeight;
var systemMenu="";
systemMenu+='
';
systemMenu+=' Сохранить
';
systemMenu+='
';
systemMenu+=' Обновить
';
systemMenu+=seporatorBody;
systemMenu+='
';
systemMenu+=' Копировать
';
systemMenu+='
';
systemMenu+=' Вырезать
';
systemMenu+='
';
systemMenu+=' Вставить
';
var controlMenuHeight=lineHeight;
var controlMenu="";
function Control()
{
window.showModelessDialog("publication/admin/controlpanel.php?"+Math.random(),window,"dialogWidth:600px;dialogHeight:400px;edge:sunken;center:Yes;help:No;resizable:No;status:Yes;unadorned:off;scroll:Yo");
oPopup.hide();
}
controlMenu+='
';
controlMenu+=' Управление модулями
';
var ContextHeight=4*lineHeight+borderHeight+2*seporatorHeight+systemMenuHeight+controlMenuHeight;
var ContextBody="";
ContextBody+=topContext
ContextBody+=systemMenu;
ContextBody+=seporatorBody;
ContextBody+=controlMenu;
ContextBody+=seporatorBody;
ContextBody+='
';
ContextBody+=' Добавить блок
';
ContextBody+='
';
ContextBody+=' Удалить блок
';
ContextBody+='
';
ContextBody+=' Переместить блок вверх
';
ContextBody+='
';
ContextBody+=' Переместить блок вниз
';
ContextBody+=bottomContext
var newContext=document.createElement('
');
document.body.appendChild(newContext);
document.all["pubContext"].innerHTML=ContextBody;
var oPopup=window.createPopup();
var lockBodyHighlight=false;
var lockContextMenu=false;
var CurrentBlockTableName, CurrentBlockModuleName, CurrentBlockIndexName, CurrentBlockParentIndexName, CurrentBlockID, TemplatesID, PublicationID, CurrentBlockPrivilegeChange, CurrentBlockPrivilegeAdd, CurrentBlockPrivilegeDelete;
var contObj;
var toolWindow,toolWindowType="",toolActive=false;
var reload=false;
var TextRange;
var Changed=false;
function Defined(vrbl)
{
var str_Undefined="undefined"
var str_Empty="";
var str_Null="null";
if(typeof(vrbl)==str_Undefined||(str_Empty+vrbl)==str_Undefined||vrbl==null||(str_Empty+vrbl)==str_Null||(str_Empty+vrbl)==str_Empty)return false;
else return true;
}
function GetBlocks()
{
result=document.all['fRontend'];
if(result&&!result.length)result=new Array(result);
return result;
}
function GetVariables()
{
result=document.all['vAriable'];
if(result&&!result.length)result=new Array(result);
return result;
}
function BlockOut()
{
lockBodyHighlight=false;
lockContextMenu=false;
this.style.backgroundColor="transparent";
}
function BlockOver()
{
if(!lockBodyHighlight)
{
lockBodyHighlight=true;
this.style.backgroundColor="WhiteSmoke";
CurrentBlockTableName=this.TableName;
CurrentBlockModuleName=this.ModuleName;
CurrentBlockIndexName=this.IndexName;
CurrentBlockParentIndexName=this.ParentIndexName;
CurrentBlockID=this.BlockID;
PublicationID=this.PublicationID;
TemplatesID=this.TemplatesID;
CurrentBlockPrivilegeChange=this.Change;
CurrentBlockPrivilegeAdd=this.Add;
CurrentBlockPrivilegeDelete=this.Delete;
}
}
function VariableOut()
{
this.style.backgroundColor="transparent";
lockContextMenu=false;
}
function VariableOver()
{
this.style.backgroundColor="Gainsboro";
}
function Context()
{
if(!lockContextMenu)
{
var X=event.offsetX+0;
var Y=event.offsetY+0;
oPopup.document.body.innerHTML=pubContext.innerHTML;
oPopup.show(X,Y,210,ContextHeight,this);
lockContextMenu=true;
}
return false;
}
function GetURL()
{
return "?TableName="+CurrentBlockTableName+"&IndexName="+CurrentBlockIndexName+"&ModuleName="+CurrentBlockModuleName+"&ParentIndexName="+CurrentBlockParentIndexName+"&BlockID="+CurrentBlockID+"&PublicationID="+PublicationID+"&TemplatesID="+TemplatesID;
}
function AddBlock()
{
location.href="publication/admin/add.php"+GetURL();
}
function DeleteBlock()
{
if(confirm("Удалить блок?"))
{
location.href="publication/admin/delete.php"+GetURL();
}
}
function MoveBlockUp()
{
location.href="publication/admin/move.php"+GetURL()+"&type=up";
}
function MoveBlockDown()
{
location.href="publication/admin/move.php"+GetURL()+"&type=down";
}
function convertPath(path, PublicationID, BlockID)
{
path=decodeURI(path).replace(/\//g, '\\');
path=path.substr((path.substr(5, 3)=='\\\\\\')? 8:5);
path=path.toLowerCase();
var hash='/';
var url=FSO.GetFileName(path).toLowerCase();
if(path.indexOf('#')!=-1)
{
hash=path.substr(path.indexOf('#'));
path=path.substr(0, path.indexOf('#'));
}
if(!FSO.FileExists(path))return hash;
if(encodeURI(url) != url)
{
url=FSO.GetBaseName(FSO.GetTempName()).toLowerCase()+'.'+FSO.GetExtensionName(url);
var to=FSO.BuildPath(FSO.GetSpecialFolder(2), url);
FSO.CopyFile(path, to, true);
var path=to;
}
UploadCtl.AddFile(path);
result="http://www.ukrinbank.com/publication/upload/"+PublicationID+"/"+BlockID+"/"+url;
return result;
}
function SendFiles()
{
tgs=document.getElementsByTagName('IMG');
for(i=0;i');
document.body.appendChild(newForm);
var variables=GetVariables();
if(variables)for(i=0;i');
document.publication.appendChild(newFormElement);
var newFormElement=document.createElement('');
document.publication.appendChild(newFormElement);
var newFormElement=document.createElement('');
document.publication.appendChild(newFormElement);
var newFormElement=document.createElement('');
document.publication.appendChild(newFormElement);
var newFormElement=document.createElement('');
document.publication.appendChild(newFormElement);
var newFormElement=document.createElement('');
document.publication.appendChild(newFormElement);
var newFormElement=document.createElement('');
document.publication.appendChild(newFormElement);
var newFormElement=document.createElement('');
document.publication.appendChild(newFormElement);
var newFormElement=document.createElement('');
document.publication.appendChild(newFormElement);
}
var newFrame=document.createElement('