Merge branch 'master' of http://git.dirt.kz/igor/Metadata_PHP
This commit is contained in:
@ -20,7 +20,7 @@ class EdtRec
|
|||||||
this.win.setContent('<div id="eDiv'+this.uid+'" style="width: 100%; /*height: 100%;*/ position: relative;"></div>');
|
this.win.setContent('<div id="eDiv'+this.uid+'" style="width: 100%; /*height: 100%;*/ position: relative;"></div>');
|
||||||
|
|
||||||
let eDiv=document.getElementById('eDiv'+this.uid);
|
let eDiv=document.getElementById('eDiv'+this.uid);
|
||||||
eDiv.innerHTML = '<table width="100%" height="100%" border="0px" cellspacing="0" cellpadding="0"><tr><td style="vertical-align:middle;" bgcolor="#F1F1F1"><center><IMG src="../resources/metadata/dbms/images/loading.gif"></center></td></tr></table>'
|
eDiv.innerHTML = '<table width="100%" height="100%"><tr><td style="vertical-align:middle;" bgcolor="#F1F1F1"><center><IMG src="../resources/metadata/dbms/images/loading.gif"></center></td></tr></table>'
|
||||||
|
|
||||||
if(caption!='')
|
if(caption!='')
|
||||||
this.win.setCaption(document.createTextNode(caption));
|
this.win.setCaption(document.createTextNode(caption));
|
||||||
@ -405,14 +405,11 @@ class EdtRec
|
|||||||
}else
|
}else
|
||||||
if(vt=="i4")
|
if(vt=="i4")
|
||||||
{
|
{
|
||||||
|
|
||||||
//alert2(trt('Alert'),"prop name = "+nodeProp.getAttribute("n"));
|
|
||||||
|
|
||||||
//If there is a node "list" with the elements "CheckBox" then create them.
|
//If there is a node "list" with the elements "CheckBox" then create them.
|
||||||
var opt=findNode(nodeProp, "options");
|
let opt=findNode(nodeProp, "options");
|
||||||
if(opt!=null) //If combobox
|
if(opt!=null) //If combobox
|
||||||
{
|
{
|
||||||
var select = document.createElement('select');
|
let select = document.createElement('select');
|
||||||
select.style.cssText="width: 100%;";
|
select.style.cssText="width: 100%;";
|
||||||
select.setAttribute("name",nodeProp.getAttribute("n"));
|
select.setAttribute("name",nodeProp.getAttribute("n"));
|
||||||
select.setAttribute("id","prop_"+this.uid+"_"+nodeProp.getAttribute("n"));
|
select.setAttribute("id","prop_"+this.uid+"_"+nodeProp.getAttribute("n"));
|
||||||
@ -421,7 +418,7 @@ class EdtRec
|
|||||||
{
|
{
|
||||||
if(opt.nodeName=="option")
|
if(opt.nodeName=="option")
|
||||||
{
|
{
|
||||||
option = document.createElement("option");
|
let option = document.createElement("option");
|
||||||
option.setAttribute("value",opt.getAttribute("val"));
|
option.setAttribute("value",opt.getAttribute("val"));
|
||||||
option.appendChild(document.createTextNode(opt.getAttribute("d")));
|
option.appendChild(document.createTextNode(opt.getAttribute("d")));
|
||||||
select.appendChild( option );
|
select.appendChild( option );
|
||||||
|
|||||||
102
metadata/dbms/html5doctor.css
Normal file
102
metadata/dbms/html5doctor.css
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
/*
|
||||||
|
html5doctor.com Reset Stylesheet
|
||||||
|
v1.6.1
|
||||||
|
Last Updated: 2010-09-17
|
||||||
|
Author: Richard Clark - http://richclarkdesign.com
|
||||||
|
Twitter: @rich_clark
|
||||||
|
*/
|
||||||
|
|
||||||
|
html, body, div, span, object, iframe,
|
||||||
|
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||||
|
abbr, address, cite, code,
|
||||||
|
del, dfn, em, img, ins, kbd, q, samp,
|
||||||
|
small, strong, sub, sup, var,
|
||||||
|
b, i,
|
||||||
|
dl, dt, dd, ol, ul, li,
|
||||||
|
fieldset, form, label, legend,
|
||||||
|
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||||
|
article, aside, canvas, details, figcaption, figure,
|
||||||
|
footer, header, hgroup, menu, nav, section, summary,
|
||||||
|
time, mark, audio, video {
|
||||||
|
margin:0;
|
||||||
|
padding:0;
|
||||||
|
border:0;
|
||||||
|
outline:0;
|
||||||
|
font-size:100%;
|
||||||
|
vertical-align:baseline;
|
||||||
|
background:transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
line-height:1;
|
||||||
|
}
|
||||||
|
|
||||||
|
article,aside,details,figcaption,figure,
|
||||||
|
footer,header,hgroup,menu,nav,section {
|
||||||
|
display:block;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav ul {
|
||||||
|
list-style:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote, q {
|
||||||
|
quotes:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote:before, blockquote:after,
|
||||||
|
q:before, q:after {
|
||||||
|
content:'';
|
||||||
|
content:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
margin:0;
|
||||||
|
padding:0;
|
||||||
|
font-size:100%;
|
||||||
|
vertical-align:baseline;
|
||||||
|
background:transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* change colours to suit your needs */
|
||||||
|
ins {
|
||||||
|
background-color:#ff9;
|
||||||
|
color:#000;
|
||||||
|
text-decoration:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* change colours to suit your needs */
|
||||||
|
mark {
|
||||||
|
background-color:#ff9;
|
||||||
|
color:#000;
|
||||||
|
font-style:italic;
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
del {
|
||||||
|
text-decoration: line-through;
|
||||||
|
}
|
||||||
|
|
||||||
|
abbr[title], dfn[title] {
|
||||||
|
border-bottom:1px dotted;
|
||||||
|
cursor:help;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-collapse:collapse;
|
||||||
|
border-spacing:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* change border colour to suit your needs */
|
||||||
|
hr {
|
||||||
|
display:block;
|
||||||
|
height:1px;
|
||||||
|
border:0;
|
||||||
|
border-top:1px solid #cccccc;
|
||||||
|
margin:1em 0;
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
input, select {
|
||||||
|
vertical-align:middle;
|
||||||
|
}
|
||||||
@ -111,7 +111,7 @@ class DBMSUser
|
|||||||
<td style="padding: 2px;"><input type="password" maxlength="33" style="width: 100%; padding: 2px; display: inline;" id="tcPassword'+this.uid+'" name="password"><br></td>\n\
|
<td style="padding: 2px;"><input type="password" maxlength="33" style="width: 100%; padding: 2px; display: inline;" id="tcPassword'+this.uid+'" name="password"><br></td>\n\
|
||||||
</tr>\n\
|
</tr>\n\
|
||||||
<tr>\n\
|
<tr>\n\
|
||||||
<td style="padding: 2px;" colspan="2"><table cellspacing="0" cellpadding="0" border="0" style="width: 100%;"><tr><td><label for="save0" style="white-space: nowrap;"><input id="save_'+this.uid+'" type="checkbox" style="display: inline;" checked/> Remember (<a href="#" onclick="showRestoreForm();">Forgot your password?</a>)</label></td></tr></table></td>\n\
|
<td style="padding: 2px;" colspan="2"><table style="width: 100%;"><tr><td><label for="save0" style="white-space: nowrap;"><input id="save_'+this.uid+'" type="checkbox" style="display: inline;" checked/> Remember (<a href="#" onclick="g_user.showRestoreForm();">Forgot your password?</a>)</label></td></tr></table></td>\n\
|
||||||
</tr>\n\
|
</tr>\n\
|
||||||
<tr><td colspan="2" style="text-align: right;"><input class="button-secondary" id="TLogin_E'+this.uid+'" type="button" style="display: inline;" value="'+trt('Log_in')+'"></td></tr>\n\
|
<tr><td colspan="2" style="text-align: right;"><input class="button-secondary" id="TLogin_E'+this.uid+'" type="button" style="display: inline;" value="'+trt('Log_in')+'"></td></tr>\n\
|
||||||
</table>\n\
|
</table>\n\
|
||||||
@ -219,223 +219,15 @@ class DBMSUser
|
|||||||
this.m_ls[i]=null;
|
this.m_ls[i]=null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Login form (not cross-source).
|
|
||||||
* [^\x00-\x7F]+
|
|
||||||
*/
|
|
||||||
/*function TLogin()
|
|
||||||
{
|
|
||||||
this.showLoginForm = function()
|
|
||||||
{
|
|
||||||
this.win.BuildGUI(10,10);
|
|
||||||
this.win.shadow=true;
|
|
||||||
this.win.setCaption(document.createTextNode("Enter"));
|
|
||||||
|
|
||||||
var str='<div style="width: 100%; height: 100%; padding: 3px; text-align: left;">\n\
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%;">\n\
|
|
||||||
<tbody>\n\
|
|
||||||
<tr><td>\n\
|
|
||||||
<table border="0" style="width: 100%; height: 100%;">\n\
|
|
||||||
<tr>\n\
|
|
||||||
<td style="padding: 2px; width: 30%; white-space: nowrap"><b>'+trt('Login')+' (E-mail):</b></td>\n\
|
|
||||||
<td style="padding: 2px;"><input type="text" maxlength="50" style="width: 100%; padding: 2px; display: inline;" id="tcLogin'+this.uid+'" name="login"><br></td>\n\
|
|
||||||
</tr>\n\
|
|
||||||
<tr>\n\
|
|
||||||
<td style="padding: 2px;"><b>Password:</b></td>\n\
|
|
||||||
<td style="padding: 2px;"><input type="password" maxlength="33" style="width: 100%; padding: 2px; display: inline;" id="tcPassword'+this.uid+'" name="password"><br></td>\n\
|
|
||||||
</tr>\n\
|
|
||||||
<tr>\n\
|
|
||||||
<td style="padding: 2px;" colspan="2"><table cellspacing="0" cellpadding="0" border="0" style="width: 100%;"><tr><td><label for="save0" style="white-space: nowrap;"><input id="save_'+this.uid+'" type="checkbox" style="display: inline;" checked/> Remember (<a href="#" onclick="showRestoreForm();">Forgot your password?</a>)</label></td></tr></table></td>\n\
|
|
||||||
</tr>\n\
|
|
||||||
<tr><td colspan="2" style="text-align: right;"><input class="button-secondary" id="TLogin_E'+this.uid+'" type="button" style="display: inline;" value="'+trt('Log_in')+'"></td></tr>\n\
|
|
||||||
</table>\n\
|
|
||||||
</td></tr>\n\
|
|
||||||
</tbody>\n\
|
|
||||||
</table>\n\
|
|
||||||
</div>';
|
|
||||||
|
|
||||||
this.win.setContent(str);
|
|
||||||
|
|
||||||
var e=document.getElementById('TLogin_E'+this.uid);
|
|
||||||
e.onclick=function(obj){ return function(){obj.onEnter(); };}(this);
|
|
||||||
e=document.getElementById('tcLogin'+this.uid);
|
|
||||||
e.onkeydown=function(obj){ return function(e){ if(e.which==13) obj.onEnter(); return true; };}(this);
|
|
||||||
e=document.getElementById('tcPassword'+this.uid);
|
|
||||||
e.onkeydown=function(obj){ return function(e){ if(e.which==13) obj.onEnter(); return true; };}(this);
|
|
||||||
|
|
||||||
this.win.setSize("300px","155px");
|
|
||||||
this.win.setCenter();
|
|
||||||
this.win.obj=this;
|
|
||||||
|
|
||||||
this.win.hide(false);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
this.onEnter=function()
|
|
||||||
{
|
|
||||||
var login=document.getElementById('tcLogin'+this.uid).value;
|
|
||||||
var password=document.getElementById('tcPassword'+this.uid).value;
|
|
||||||
if(login=='' || password=='')
|
|
||||||
{ str="Not filled in the required fields: ";
|
|
||||||
if(login=='') str+='"'+trt('Login')+' (E-mail)"';
|
|
||||||
if(login=='' && password=='') str+=', ';
|
|
||||||
if(password=='') str+='"Password"';
|
|
||||||
str+='!';
|
|
||||||
alert(str);
|
|
||||||
}else
|
|
||||||
this.Login(login,password,document.getElementById('save_'+this.uid).checked);
|
|
||||||
};
|
|
||||||
|
|
||||||
this.applyReq=function(req,fn,node)
|
|
||||||
{
|
|
||||||
// alert(getXMLNodeSerialisation(node));
|
|
||||||
|
|
||||||
if (fn==-1)
|
|
||||||
{
|
|
||||||
alert(findFirstNode(node,'#cdata-section').nodeValue);
|
|
||||||
}else if (fn==4)
|
|
||||||
{
|
|
||||||
//nodeToTable(node);
|
|
||||||
}else if (fn==7)
|
|
||||||
{
|
|
||||||
var cmd=getCdataValue(findFirstNode(node,"cmd"));
|
|
||||||
//alert('cmd='+cmd);
|
|
||||||
if(cmd==='0')
|
|
||||||
{
|
|
||||||
this.m_lo=getCdataValue(findFirstNode(node,"login")) == '0' ? false : true;
|
|
||||||
if(!this.m_lo)
|
|
||||||
{ this.showLoginForm();
|
|
||||||
}else
|
|
||||||
{
|
|
||||||
var name=getCdataValue(findFirstNode(node,"name"));
|
|
||||||
var user_name=document.getElementById('user_name');
|
|
||||||
if(user_name!=null) user_name.innerHTML=name;
|
|
||||||
|
|
||||||
//Информируем слушатеелй о логине
|
|
||||||
for(i=0;i<this.m_ls.length;i++)
|
|
||||||
if(this.m_ls[i]!==null)
|
|
||||||
this.m_ls[i].OnLogin(true); //0 - authorized, 1 - an incorrect username or password, 2 - left.
|
|
||||||
}
|
|
||||||
}else if(cmd==='1')
|
|
||||||
{
|
|
||||||
location.reload();
|
|
||||||
}else if(cmd==='2')
|
|
||||||
{
|
|
||||||
var login=getCdataValue(findFirstNode(node,"login")) == '0' ? false : true;
|
|
||||||
if(!login)
|
|
||||||
{ alert('Не удалось авторизоваться.\nНеверный логин и/или пароль.');
|
|
||||||
}else
|
|
||||||
{
|
|
||||||
this.m_lo=true;
|
|
||||||
this.win.Close();
|
|
||||||
|
|
||||||
var name=getCdataValue(findFirstNode(node,"name"));
|
|
||||||
var user_name=document.getElementById('user_name');
|
|
||||||
if(user_name!=null) user_name.innerHTML=name;
|
|
||||||
//Информируем слушатеелй о логине
|
|
||||||
for(i=0;i<this.m_ls.length;i++)
|
|
||||||
if(this.m_ls[i]!==null)
|
|
||||||
this.m_ls[i].OnLogin(true); //0 - authorized, 1 - an incorrect username or password, 2 - left.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//this.m_lo=getCdataValue(findFirstNode(node,"login")) == '0' ? true : false;
|
|
||||||
//if(this.m_lo && this.win.div!==null) this.win.hide(true);
|
|
||||||
//this.m_UserName=getCdataValue(findFirstNode(node,"name"));
|
|
||||||
|
|
||||||
}else
|
|
||||||
alert("Not known function! fn=\""+fn+"\"" );
|
|
||||||
|
|
||||||
this.win.hideProgressBar();
|
|
||||||
};
|
|
||||||
|
|
||||||
//l - login, p - password, s - allow or disallow auto-login!
|
|
||||||
this.Login=function(login,password,save)
|
|
||||||
{
|
|
||||||
if(save)
|
|
||||||
{ setCookie('GUID', guid(), 60, '/','','');
|
|
||||||
}else
|
|
||||||
{ setCookie('GUID', '', 60, '/','','');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var xs='<?xml version="1.0" encoding="utf-8"?><metadata fn="7">\n\
|
|
||||||
<cmd><![CDATA[2]]></cmd>\n\
|
|
||||||
<login><![CDATA['+login+']]></login>\n\
|
|
||||||
<password><![CDATA['+password+']]></password>\n\
|
|
||||||
</metadata>';
|
|
||||||
|
|
||||||
//alert(xs);
|
|
||||||
|
|
||||||
if(this.request.callServer(ScriptName,xs))
|
|
||||||
{
|
|
||||||
this.win.showProgressBar();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
//logout current user
|
|
||||||
this.Exit=function()
|
|
||||||
{
|
|
||||||
if(this.request.callServer(ScriptName,'<?xml version="1.0" encoding="utf-8"?><metadata fn="7"><cmd><![CDATA[1]]></cmd></metadata>'))
|
|
||||||
{
|
|
||||||
setCookie('GUID', '', 60, '/','','');
|
|
||||||
showProgressBar(document.body);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
this.addListener=function(l)
|
|
||||||
{ if(l.OnLogin==null) alert('Object does not have the function "OnLogin()"!');
|
|
||||||
this.m_ls[this.m_ls.length]=l;
|
|
||||||
};
|
|
||||||
|
|
||||||
this.remListener=function(l)
|
|
||||||
{ for(i=0;i<this.m_ls.length;i++)
|
|
||||||
{ if(this.m_ls[i]==l)
|
|
||||||
this.m_ls[i]=null;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
//Check whether the already authorized (+ attempt to log in through "hash").
|
|
||||||
this.LoadData=function()
|
|
||||||
{
|
|
||||||
var xs='<?xml version="1.0" encoding="utf-8"?><metadata fn="7"><cmd><![CDATA[2]]></cmd></metadata>';
|
|
||||||
|
|
||||||
//alert('xs='+xs);
|
|
||||||
|
|
||||||
this.request.callServer(ScriptName,xs);
|
|
||||||
};
|
|
||||||
|
|
||||||
TLogin.LoginIsOk=0; //login in
|
|
||||||
TLogin.LoginIsError=1; //Invalid password and / or login.
|
|
||||||
TLogin.LoginIsExit=2; //Exit
|
|
||||||
|
|
||||||
this.m_lo=false; //login in?
|
|
||||||
this.name='Login';
|
|
||||||
this.uid=getUID();
|
|
||||||
this.win=new TWin();
|
|
||||||
this.win.shadow=true;
|
|
||||||
|
|
||||||
this.m_ls=new Array(); //Listeners called OnLogin function.
|
|
||||||
this.guid='';
|
|
||||||
this.m_UserName=''; //Member Name
|
|
||||||
|
|
||||||
this.m_html=false;
|
|
||||||
|
|
||||||
this.request = new TRequest(this);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
//Display password recovery form
|
//Display password recovery form
|
||||||
function showRestoreForm()
|
showRestoreForm()
|
||||||
{
|
{
|
||||||
var win=new TWin(true);
|
var win=new TWin(true);
|
||||||
win.BuildGUI(10,10);
|
win.BuildGUI(10,10);
|
||||||
win.setCaption(trt("Password_recovery"));
|
win.setCaption(trt("Password_recovery"));
|
||||||
|
|
||||||
str='<div id="TWin_DT_'+win.tWinId+'" style="width: 100%; height: 100%; padding: 4px; text-align: left;">\n\
|
str='<div style="width: 100%; height: 100%; padding: 4px; text-align: left;">\n\
|
||||||
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%; padding: 0px;">\n\
|
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%; padding: 0px;">\n\
|
||||||
<tr>\n\
|
<tr>\n\
|
||||||
<td style="padding: 2px; white-space: nowrap"><b>'+trt('Login')+' (E-mail)</b></td>\n\
|
<td style="padding: 2px; white-space: nowrap"><b>'+trt('Login')+' (E-mail)</b></td>\n\
|
||||||
@ -446,9 +238,7 @@ function showRestoreForm()
|
|||||||
</table>\n\
|
</table>\n\
|
||||||
</td></tr>\n\
|
</td></tr>\n\
|
||||||
</div>';
|
</div>';
|
||||||
document.getElementById('TWin_Co_'+win.tWinId).innerHTML=str;
|
win.setContent(str);
|
||||||
|
|
||||||
win.setSize("300px","100px");
|
|
||||||
|
|
||||||
//Центрируем окно и отображаем тень
|
//Центрируем окно и отображаем тень
|
||||||
if(win.tbl.offsetHeight>win.div.offsetHeight) win.div.style.height=win.tbl.offsetHeight+"px";
|
if(win.tbl.offsetHeight>win.div.offsetHeight) win.div.style.height=win.tbl.offsetHeight+"px";
|
||||||
@ -466,7 +256,6 @@ function showRestoreForm()
|
|||||||
{ return function()
|
{ return function()
|
||||||
{
|
{
|
||||||
win.showProgressBar();
|
win.showProgressBar();
|
||||||
//showProgressBar(document.getElementById('TWin_DT_'+win.tWinId),win.uid);
|
|
||||||
|
|
||||||
var em=document.getElementById(win.uid+'_email').value;
|
var em=document.getElementById(win.uid+'_email').value;
|
||||||
|
|
||||||
@ -536,3 +325,6 @@ function showRestoreForm()
|
|||||||
}(win);
|
}(win);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -223,7 +223,7 @@
|
|||||||
/*if($_SESSION['USER_ID']==null && $_COOKIE['GUID']!=null)
|
/*if($_SESSION['USER_ID']==null && $_COOKIE['GUID']!=null)
|
||||||
{
|
{
|
||||||
$res = $db->query("select * from ".$Schema."p__Login(null,null,null,'".$_COOKIE['GUID']."');");
|
$res = $db->query("select * from ".$Schema."p__Login(null,null,null,'".$_COOKIE['GUID']."');");
|
||||||
//$res = $db->query("select * from \"p__Login_1\"(null,null,null,'".$_COOKIE['GUID']."');");
|
//$res = $db->query("select * from p__Login_1(null,null,null,'".$_COOKIE['GUID']."');");
|
||||||
if($res->rowCount()>0)
|
if($res->rowCount()>0)
|
||||||
{
|
{
|
||||||
$result = $res->fetch(PDO::FETCH_ASSOC);
|
$result = $res->fetch(PDO::FETCH_ASSOC);
|
||||||
@ -280,7 +280,7 @@
|
|||||||
//Вернём значение прав доступа для запрошенного объекта
|
//Вернём значение прав доступа для запрошенного объекта
|
||||||
//$allow=true;
|
//$allow=true;
|
||||||
$allow=false;
|
$allow=false;
|
||||||
//$sql_query='select a.*,at.name from _Access a, _Actions at where a.del=false and at.id=a.action_id and at.name=\'Insert_'.$typename.'\' and a.group_id in (select group_id from _UsersRoles where user_id='.$_SESSION['USER_ID'].');'
|
//$sql_query='select a.*,at.name from _Access a, _Actions at where a.del=false and at.id=a.action_id and at.name=\'Insert_'.$typename.'\' and a.role_id in (select group_id from _UsersRoles where user_id='.$_SESSION['USER_ID'].');'
|
||||||
$sql_query='select '.$Schema.'p_getaccess('.getSQLValue(gettype($_SESSION['USER_ID']),$_SESSION['USER_ID']).',\'Insert_'.$typename.'\') as allow;';
|
$sql_query='select '.$Schema.'p_getaccess('.getSQLValue(gettype($_SESSION['USER_ID']),$_SESSION['USER_ID']).',\'Insert_'.$typename.'\') as allow;';
|
||||||
|
|
||||||
$res = $db->query($sql_query);
|
$res = $db->query($sql_query);
|
||||||
@ -293,7 +293,7 @@
|
|||||||
$currNode->setAttributeNode($xmlAttr);
|
$currNode->setAttributeNode($xmlAttr);
|
||||||
|
|
||||||
$allow=false;
|
$allow=false;
|
||||||
//$sql_query='select a.*,at.name from _Access a, _Actions at where a.del=false and at.id=a.action_id and at.name=\'Update_'.$typename.'\' and a.group_id in (select group_id from _UsersRoles where user_id='.$_SESSION['USER_ID'].');';
|
//$sql_query='select a.*,at.name from _Access a, _Actions at where a.del=false and at.id=a.action_id and at.name=\'Update_'.$typename.'\' and a.role_id in (select group_id from _UsersRoles where user_id='.$_SESSION['USER_ID'].');';
|
||||||
$sql_query='select '.$Schema.'p_getaccess('.getSQLValue(gettype($_SESSION['USER_ID']),$_SESSION['USER_ID']).',\'Update_'.$typename.'\') as allow;';
|
$sql_query='select '.$Schema.'p_getaccess('.getSQLValue(gettype($_SESSION['USER_ID']),$_SESSION['USER_ID']).',\'Update_'.$typename.'\') as allow;';
|
||||||
$res = $db->query($sql_query);
|
$res = $db->query($sql_query);
|
||||||
while ($row = $res->fetch(PDO::FETCH_ASSOC))// $row - ассоциативный массив значений, ключи - названия столбцов
|
while ($row = $res->fetch(PDO::FETCH_ASSOC))// $row - ассоциативный массив значений, ключи - названия столбцов
|
||||||
@ -305,7 +305,7 @@
|
|||||||
$currNode->setAttributeNode($xmlAttr);
|
$currNode->setAttributeNode($xmlAttr);
|
||||||
|
|
||||||
$allow=false;
|
$allow=false;
|
||||||
//$sql_query='select a.*,at.name from _Access a, _Actions at where a.del=false and at.id=a.action_id and at.name=\'Delete_'.$typename.'\' and a.group_id in (select group_id from _UsersRoles where user_id='.$_SESSION['USER_ID'].');';
|
//$sql_query='select a.*,at.name from _Access a, _Actions at where a.del=false and at.id=a.action_id and at.name=\'Delete_'.$typename.'\' and a.role_id in (select group_id from _UsersRoles where user_id='.$_SESSION['USER_ID'].');';
|
||||||
$sql_query='select '.$Schema.'p_getaccess('.getSQLValue(gettype($_SESSION['USER_ID']),$_SESSION['USER_ID']).',\'Delete_'.$typename.'\') as allow;';
|
$sql_query='select '.$Schema.'p_getaccess('.getSQLValue(gettype($_SESSION['USER_ID']),$_SESSION['USER_ID']).',\'Delete_'.$typename.'\') as allow;';
|
||||||
$res = $db->query($sql_query);
|
$res = $db->query($sql_query);
|
||||||
while ($row = $res->fetch(PDO::FETCH_ASSOC))// $row - ассоциативный массив значений, ключи - названия столбцов
|
while ($row = $res->fetch(PDO::FETCH_ASSOC))// $row - ассоциативный массив значений, ключи - названия столбцов
|
||||||
@ -785,7 +785,7 @@
|
|||||||
//загружаем мета данные и смотрим какие поля должны передать клиенту
|
//загружаем мета данные и смотрим какие поля должны передать клиенту
|
||||||
$mdoc = new DOMDocument();
|
$mdoc = new DOMDocument();
|
||||||
try
|
try
|
||||||
{ //$mdoc->load('metadata.xml');
|
{
|
||||||
$mdoc->loadXML($xmls);
|
$mdoc->loadXML($xmls);
|
||||||
} catch (Exception $e)
|
} catch (Exception $e)
|
||||||
{ sendError($e->getMessage());
|
{ sendError($e->getMessage());
|
||||||
@ -918,13 +918,10 @@
|
|||||||
$res = $db->query("select 1 from '.$Schema.'_Users where del=false and email = '$login';");
|
$res = $db->query("select 1 from '.$Schema.'_Users where del=false and email = '$login';");
|
||||||
if($res->rowCount()>0)
|
if($res->rowCount()>0)
|
||||||
{
|
{
|
||||||
|
mail($login,'rigor.kz','Not implement',"Content-type: text/html; charset=utf-8\r\nFrom: rigor Site <info@rigor.kz>");
|
||||||
|
|
||||||
//mail($login,'BigFootTrade.kz','Not implement',"Content-type: text/html; charset=utf-8\r\nFrom: BigFootTrade Site <info@bigfoottrade.kz>");
|
|
||||||
}
|
}
|
||||||
}elseif($cmd==1) //Logout
|
}elseif($cmd==1) //Logout
|
||||||
{
|
{
|
||||||
//filter_input(INPUT_COOKIE, 'S_HASH', FILTER_VALIDATE_INT, array('options'=>array('default'=>-1)));
|
|
||||||
$sql='delete from '.$Schema.'_Logins where sessionid='.getSQLValue('string',$_COOKIE['GUID']).' and user_id='.getSQLValue('object',$_SESSION['USER_ID']).';';
|
$sql='delete from '.$Schema.'_Logins where sessionid='.getSQLValue('string',$_COOKIE['GUID']).' and user_id='.getSQLValue('object',$_SESSION['USER_ID']).';';
|
||||||
try
|
try
|
||||||
{ $db->exec($sql);
|
{ $db->exec($sql);
|
||||||
@ -1008,6 +1005,27 @@
|
|||||||
}else
|
}else
|
||||||
if ($fn==8)//Получить отчёт как Excel.xls файл (почти тоже самое что и функция 4)
|
if ($fn==8)//Получить отчёт как Excel.xls файл (почти тоже самое что и функция 4)
|
||||||
{
|
{
|
||||||
|
$dir='./temp/';
|
||||||
|
|
||||||
|
if(isset($_REQUEST['file'])) {
|
||||||
|
$file = $_REQUEST['file'];
|
||||||
|
$myFile = $dir.$file;
|
||||||
|
if(file_exists($myFile))
|
||||||
|
{
|
||||||
|
header("Content-type: application/octet-stream");
|
||||||
|
header('Content-Disposition: attachment; filename="'.$file.'"');
|
||||||
|
header('Content-Length: '.filesize($myFile));
|
||||||
|
readfile($myFile);
|
||||||
|
exit();
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found", true, 404);
|
||||||
|
echo 'File "'.$file.'" not found!';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
session_write_close(); //Разблокируем сессионный файл так как запросы могут быть достаточно долгими
|
session_write_close(); //Разблокируем сессионный файл так как запросы могут быть достаточно долгими
|
||||||
//if (!isset($_SESSION['USER_ID']) || $_SESSION['USER_ID']=='') sendError(trt('You are not logged in!'));
|
//if (!isset($_SESSION['USER_ID']) || $_SESSION['USER_ID']=='') sendError(trt('You are not logged in!'));
|
||||||
|
|
||||||
@ -1030,6 +1048,7 @@
|
|||||||
{
|
{
|
||||||
$objXMLDocument=$currNode->ownerDocument;
|
$objXMLDocument=$currNode->ownerDocument;
|
||||||
|
|
||||||
|
$objListR = findFirstNode($nTypeR,'objects-list');
|
||||||
//В переданном запросе может быть не полный фильтр заполняем серверный значениями из переданного
|
//В переданном запросе может быть не полный фильтр заполняем серверный значениями из переданного
|
||||||
$f1=findNodeOnPath($currNode,'objects-list/filter');
|
$f1=findNodeOnPath($currNode,'objects-list/filter');
|
||||||
$f2=findNodeOnPath($nTypeR,'objects-list/filter');
|
$f2=findNodeOnPath($nTypeR,'objects-list/filter');
|
||||||
@ -1117,6 +1136,10 @@
|
|||||||
$nextnode = $nextnode->nextSibling;
|
$nextnode = $nextnode->nextSibling;
|
||||||
}
|
}
|
||||||
$sql_query=str_replace('${_user_id}',getSQLValue(gettype($_SESSION['USER_ID']),$_SESSION['USER_ID']),$sql_query);
|
$sql_query=str_replace('${_user_id}',getSQLValue(gettype($_SESSION['USER_ID']),$_SESSION['USER_ID']),$sql_query);
|
||||||
|
if($objListR!=null && $objListR->getAttribute('order')!='' && $objListR->getAttribute('order')!=null && $objListR->getAttribute('order')!='null')
|
||||||
|
{
|
||||||
|
$sql_query=str_replace('${_order}',findNodeOnAttribute(findFirstNode($currNode,'objects-list'), "column","n",$objListR->getAttribute("order"))->getAttribute("order"),$sql_query);
|
||||||
|
}else $sql_query=str_replace('${_order}','1',$sql_query);
|
||||||
|
|
||||||
//Выполняем запрос
|
//Выполняем запрос
|
||||||
try
|
try
|
||||||
@ -1126,7 +1149,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Сохраняем результсет в файл в виде HTML с расширением XLS
|
//Сохраняем результсет в файл в виде HTML с расширением XLS
|
||||||
$dir='./temp/';
|
|
||||||
$file='file_'.rand(0,1000).'.xls';
|
$file='file_'.rand(0,1000).'.xls';
|
||||||
$myFile = $dir.$file;
|
$myFile = $dir.$file;
|
||||||
|
|
||||||
@ -1259,7 +1281,7 @@
|
|||||||
{
|
{
|
||||||
session_write_close(); //Разблокируем сессионный файл так как запросы могут быть достаточно долгими
|
session_write_close(); //Разблокируем сессионный файл так как запросы могут быть достаточно долгими
|
||||||
//Клиент передаёт название таблицы, название поля, id поля
|
//Клиент передаёт название таблицы, название поля, id поля
|
||||||
$typename = $_REQUEST['t']; //Тип из metadata.xml
|
$typename = $_REQUEST['t']; //Тип
|
||||||
$field = $_REQUEST['f']; //Название поля с двоичными данными
|
$field = $_REQUEST['f']; //Название поля с двоичными данными
|
||||||
$name = $_REQUEST['n']; //поле с названием файла
|
$name = $_REQUEST['n']; //поле с названием файла
|
||||||
$idval = $_REQUEST['i']; //Идентификатор поля в базе
|
$idval = $_REQUEST['i']; //Идентификатор поля в базе
|
||||||
@ -1278,7 +1300,7 @@
|
|||||||
//Ищем поле в метаданных
|
//Ищем поле в метаданных
|
||||||
$objXMLDocument = new DOMDocument();
|
$objXMLDocument = new DOMDocument();
|
||||||
try
|
try
|
||||||
{ //$objXMLDocument->load('metadata.xml');
|
{
|
||||||
$objXMLDocument->loadXML($xmls);
|
$objXMLDocument->loadXML($xmls);
|
||||||
} catch (Exception $e)
|
} catch (Exception $e)
|
||||||
{ echo $e->getMessage();
|
{ echo $e->getMessage();
|
||||||
|
|||||||
@ -81,7 +81,7 @@ class SRec
|
|||||||
if(this.rwin!=null)
|
if(this.rwin!=null)
|
||||||
{
|
{
|
||||||
this.rwin.hideProgressBar();
|
this.rwin.hideProgressBar();
|
||||||
this.rwin.setContent('<table border="0px" style="width: 100%; height: 100%; background-color: #f1f1f1;"><tr><td align="center"><a href="'+ScriptRName+'?file='+findFirstNode(node,'#cdata-section').nodeValue+'" target="_blank">'+trt('Download_report')+': "'+this.win.getCaption().innerHTML+'".</a></td></tr></table>');
|
this.rwin.setContent('<table border="0px" style="width: 100%; height: 100%; background-color: '+g_backColor1+';"><tr><td align="center"><a href="'+ScriptRName+(ScriptRName.indexOf('?')!=-1 ? '&file=' : '?file=')+findFirstNode(node,'#cdata-section').nodeValue+'" target="_blank">'+trt('Download_report')+': "'+this.win.getCaption().innerHTML+'".</a></td></tr></table>');
|
||||||
}
|
}
|
||||||
}else
|
}else
|
||||||
alert2(trt('Alert'),"Unknown function! fn=\""+fn+"\"" );
|
alert2(trt('Alert'),"Unknown function! fn=\""+fn+"\"" );
|
||||||
@ -141,7 +141,7 @@ class SRec
|
|||||||
{
|
{
|
||||||
let str='\
|
let str='\
|
||||||
<div id="eDiv'+this.uid+'" style="width: 100%; height: 100%; position: relative;">\
|
<div id="eDiv'+this.uid+'" style="width: 100%; height: 100%; position: relative;">\
|
||||||
<table class="SFilter" border="0" cellspacing="0" cellpadding="0" style="width: 100%; height: 100%;"><tr><td>\
|
<table class="SFilter" style="width: 100%; height: 100%;"><tr><td>\
|
||||||
<table id="idfilter'+this.uid+'" cellspacing="2" cellpadding="0" style="border: 1px solid rgb(99, 99, 99); table-layout: auto;" width="100%" bgcolor="'+g_rowColor2+'">\
|
<table id="idfilter'+this.uid+'" cellspacing="2" cellpadding="0" style="border: 1px solid rgb(99, 99, 99); table-layout: auto;" width="100%" bgcolor="'+g_rowColor2+'">\
|
||||||
<caption></caption><thead></thead><tbody></tbody>\
|
<caption></caption><thead></thead><tbody></tbody>\
|
||||||
</table>\
|
</table>\
|
||||||
@ -185,7 +185,7 @@ class SRec
|
|||||||
|
|
||||||
document.getElementById('SRec_Add_'+this.uid).onclick = ()=>this.insertRecord();
|
document.getElementById('SRec_Add_'+this.uid).onclick = ()=>this.insertRecord();
|
||||||
document.getElementById('SRec_Del_'+this.uid).onclick = ()=>this.deleteRecord();
|
document.getElementById('SRec_Del_'+this.uid).onclick = ()=>this.deleteRecord();
|
||||||
document.getElementById('SRec_Exc_'+this.uid).onclick = ()=>this.showreport('xls');
|
document.getElementById('SRec_Exc_'+this.uid).onclick = ()=>this.showReport('xls');
|
||||||
document.getElementById('SRec_Rfr_'+this.uid).onclick = ()=>{this.appendFilter(); this.sendFilter(-1,0);};
|
document.getElementById('SRec_Rfr_'+this.uid).onclick = ()=>{this.appendFilter(); this.sendFilter(-1,0);};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -718,6 +718,28 @@ class SRec
|
|||||||
}else
|
}else
|
||||||
if (columnNode.getAttribute("vt")==="i4")
|
if (columnNode.getAttribute("vt")==="i4")
|
||||||
{
|
{
|
||||||
|
let opt=findNode(columnNode, "options");
|
||||||
|
if(opt!=null) //If combobox
|
||||||
|
{
|
||||||
|
let select = document.createElement('select');
|
||||||
|
select.style.cssText="width: 100%;";
|
||||||
|
select.setAttribute("name",columnNode.getAttribute("n"));
|
||||||
|
select.setAttribute("id", 'filter_' + this.uid + '_' + columnNode.getAttribute("n"));
|
||||||
|
opt=opt.firstChild
|
||||||
|
while(opt!=null)
|
||||||
|
{
|
||||||
|
if(opt.nodeName=="option")
|
||||||
|
{
|
||||||
|
let option = document.createElement("option");
|
||||||
|
option.setAttribute("value",opt.getAttribute("val"));
|
||||||
|
option.appendChild(document.createTextNode(opt.getAttribute("d")));
|
||||||
|
select.appendChild( option );
|
||||||
|
}
|
||||||
|
opt=opt.nextSibling;
|
||||||
|
}
|
||||||
|
td2.appendChild(select);
|
||||||
|
|
||||||
|
}else {
|
||||||
let table = document.createElement('table');
|
let table = document.createElement('table');
|
||||||
table.border = 0;
|
table.border = 0;
|
||||||
table.style.cssText = "width:100%;/*table-layout:fixed;*/border-spacing:0;border-collapse:collapse;";
|
table.style.cssText = "width:100%;/*table-layout:fixed;*/border-spacing:0;border-collapse:collapse;";
|
||||||
@ -732,7 +754,9 @@ class SRec
|
|||||||
let input = document.createElement('input');
|
let input = document.createElement('input');
|
||||||
input.style.cssText = "width: 100%;";
|
input.style.cssText = "width: 100%;";
|
||||||
input.setAttribute("type", "text");
|
input.setAttribute("type", "text");
|
||||||
input.onkeydown=function(){ if(event.keyCode==13) event.keyCode=9; };
|
input.onkeydown = function () {
|
||||||
|
if (event.keyCode == 13) event.keyCode = 9;
|
||||||
|
};
|
||||||
input.setAttribute("name", columnNode.getAttribute("n"));
|
input.setAttribute("name", columnNode.getAttribute("n"));
|
||||||
if (columnNode.getAttribute("size") != null)
|
if (columnNode.getAttribute("size") != null)
|
||||||
input.setAttribute("maxlength", columnNode.getAttribute("size"), 0);
|
input.setAttribute("maxlength", columnNode.getAttribute("size"), 0);
|
||||||
@ -746,17 +770,26 @@ class SRec
|
|||||||
button.setAttribute("value", "+");
|
button.setAttribute("value", "+");
|
||||||
button.style.cssText = "height:100%;width:22px;margin:0px;padding:0px;";
|
button.style.cssText = "height:100%;width:22px;margin:0px;padding:0px;";
|
||||||
newCell2.appendChild(button);
|
newCell2.appendChild(button);
|
||||||
button.onclick=function(inp){return function(){ inp.value=getIntVal(inp.value)+1; }}(input);
|
button.onclick = function (inp) {
|
||||||
|
return function () {
|
||||||
|
inp.value = getIntVal(inp.value) + 1;
|
||||||
|
}
|
||||||
|
}(input);
|
||||||
|
|
||||||
button = document.createElement('input');
|
button = document.createElement('input');
|
||||||
button.className = 'button-secondary';
|
button.className = 'button-secondary';
|
||||||
button.setAttribute("type", "button");
|
button.setAttribute("type", "button");
|
||||||
button.setAttribute("value", "-");
|
button.setAttribute("value", "-");
|
||||||
button.style.cssText = "height:100%;width:22px;margin:0px;padding:0px;";
|
button.style.cssText = "height:100%;width:22px;margin:0px;padding:0px;";
|
||||||
button.onclick=function(inp){return function(){ inp.value=getIntVal(inp.value)-1; }}(input);
|
button.onclick = function (inp) {
|
||||||
|
return function () {
|
||||||
|
inp.value = getIntVal(inp.value) - 1;
|
||||||
|
}
|
||||||
|
}(input);
|
||||||
newCell3.appendChild(button);
|
newCell3.appendChild(button);
|
||||||
|
|
||||||
td2.appendChild(table);
|
td2.appendChild(table);
|
||||||
|
}
|
||||||
}else
|
}else
|
||||||
if (columnNode.getAttribute("vt")==="f8")
|
if (columnNode.getAttribute("vt")==="f8")
|
||||||
{
|
{
|
||||||
@ -1437,7 +1470,7 @@ class SRec
|
|||||||
if (error_msg!="") alert2(trt('Alert'),"ShowRecords: \n"+error_msg);
|
if (error_msg!="") alert2(trt('Alert'),"ShowRecords: \n"+error_msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
showreport(ext)
|
showReport(ext)
|
||||||
{
|
{
|
||||||
if(this.rwin!=null) this.rwin.Close();
|
if(this.rwin!=null) this.rwin.Close();
|
||||||
|
|
||||||
@ -1446,7 +1479,7 @@ class SRec
|
|||||||
this.rwin.setParent(this.win);
|
this.rwin.setParent(this.win);
|
||||||
this.rwin.setSize(280,130);
|
this.rwin.setSize(280,130);
|
||||||
this.rwin.setCaption(trt('Report'));
|
this.rwin.setCaption(trt('Report'));
|
||||||
this.rwin.setContent('<table border="0px" style="width: 100%; height: 100%; background-color: #f1f1f1;"><tr><td align="center"><b>'+trt('Preparing_of_report')+'</b></td></tr></table>');
|
this.rwin.setContent('<table border="0px" style="width: 100%; height: 100%; background-color: '+g_backColor1+';"><tr><td align="center"><b>'+trt('Preparing_of_report')+'</b></td></tr></table>');
|
||||||
|
|
||||||
this.appendFilter();
|
this.appendFilter();
|
||||||
//Call data from server
|
//Call data from server
|
||||||
|
|||||||
@ -191,7 +191,7 @@ function loadContent(url,obj)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Вывести текст поверх окон с кнопочкой OK
|
//Вывести текст поверх окон с кнопочкой OK
|
||||||
function alert2(title,text)
|
function alert2(title,text,okFunc=null)
|
||||||
{
|
{
|
||||||
let win=new TWin(true);
|
let win=new TWin(true);
|
||||||
win.BuildGUI(10,10);
|
win.BuildGUI(10,10);
|
||||||
@ -209,7 +209,7 @@ function alert2(title,text)
|
|||||||
|
|
||||||
win.setContent(html);
|
win.setContent(html);
|
||||||
let obj=document.getElementById(win.uid+'_close');
|
let obj=document.getElementById(win.uid+'_close');
|
||||||
if(obj!=null) obj.onclick=function(win){return function(){ win.Close(); };}(win);
|
if(obj!=null) obj.onclick=function(win,okFunc){return function(){ win.Close(); if(okFunc!=null) okFunc(); };}(win,okFunc);
|
||||||
win.setSize("300px","150px");
|
win.setSize("300px","150px");
|
||||||
win.setCenter();
|
win.setCenter();
|
||||||
win.shadow=true;
|
win.shadow=true;
|
||||||
@ -1209,7 +1209,7 @@ class TWin
|
|||||||
this.tWinId=Wins.add(this);
|
this.tWinId=Wins.add(this);
|
||||||
/*
|
/*
|
||||||
var hd='';
|
var hd='';
|
||||||
hd+='<table border="0px" cellspacing="0" cellpadding="0" style="width: 100%;">';
|
hd+='<table style="width: 100%;">';
|
||||||
hd+=' <tr>';
|
hd+=' <tr>';
|
||||||
hd+=' <td style="vertical-align:bottom;cursor:move;" id="TWin_H1_'+this.tWinId+'"><img src="../metadata/dbms/form/t1.gif" style="width: 20px; height: 20px; display: block;" alt="" border="0px" draggable="false"/></td>';
|
hd+=' <td style="vertical-align:bottom;cursor:move;" id="TWin_H1_'+this.tWinId+'"><img src="../metadata/dbms/form/t1.gif" style="width: 20px; height: 20px; display: block;" alt="" border="0px" draggable="false"/></td>';
|
||||||
hd+=' <td align="center" width="100%" bgcolor="#3366CC" style="font-weight: bold; cursor:move; background: #92b5df url(../metadata/dbms/form/1.gif) repeat-x top;" id="TWin_H2_'+this.tWinId+'"><nobr id="TWin_Ca_'+this.tWinId+'"></nobr></td>';
|
hd+=' <td align="center" width="100%" bgcolor="#3366CC" style="font-weight: bold; cursor:move; background: #92b5df url(../metadata/dbms/form/1.gif) repeat-x top;" id="TWin_H2_'+this.tWinId+'"><nobr id="TWin_Ca_'+this.tWinId+'"></nobr></td>';
|
||||||
@ -1223,7 +1223,7 @@ class TWin
|
|||||||
hd+='</table>';
|
hd+='</table>';
|
||||||
|
|
||||||
var str='';
|
var str='';
|
||||||
str+='<table id="TWin_TBL_'+this.tWinId+'" border="0px" cellspacing="0" cellpadding="0" style="width: 100%; height: 100%;">';
|
str+='<table id="TWin_TBL_'+this.tWinId+'" border="0px" style="width: 100%; height: 100%;">';
|
||||||
str+=' <tr id="TWin_H0_'+this.tWinId+'"><td colspan=3>'+hd+'</td></tr>';
|
str+=' <tr id="TWin_H0_'+this.tWinId+'"><td colspan=3>'+hd+'</td></tr>';
|
||||||
str+=' <tr>';
|
str+=' <tr>';
|
||||||
str+=' <td style="width: 10px; height: 10px; cursor:nw-resize;"><img src="../metadata/dbms/form/_t-l.gif" alt="" style="width: 10px; height: 10px; display: block;" border="0px" draggable="false" id="TWin_TL_'+this.tWinId+'"></td>';
|
str+=' <td style="width: 10px; height: 10px; cursor:nw-resize;"><img src="../metadata/dbms/form/_t-l.gif" alt="" style="width: 10px; height: 10px; display: block;" border="0px" draggable="false" id="TWin_TL_'+this.tWinId+'"></td>';
|
||||||
@ -1232,7 +1232,7 @@ class TWin
|
|||||||
str+=' </tr>';
|
str+=' </tr>';
|
||||||
str+=' <tr style="height: 100%">';
|
str+=' <tr style="height: 100%">';
|
||||||
str+=' <td style="vertical-align:top;height: 10px; cursor:w-resize;" background="../metadata/dbms/form/l.gif" id="TWin_L_'+this.tWinId+'"></td>';
|
str+=' <td style="vertical-align:top;height: 10px; cursor:w-resize;" background="../metadata/dbms/form/l.gif" id="TWin_L_'+this.tWinId+'"></td>';
|
||||||
str+=' <td style="vertical-align:top;cursor:default;"><table border="0px" cellspacing="0" cellpadding="0" style="width: 100%; height: 100%;"><tr><td id="TWin_Co_'+this.tWinId+'" style="vertical-align:top;"> </td></tr></table></td>';
|
str+=' <td style="vertical-align:top;cursor:default;"><table style="width: 100%; height: 100%;"><tr><td id="TWin_Co_'+this.tWinId+'" style="vertical-align:top;"> </td></tr></table></td>';
|
||||||
str+=' <td style="vertical-align: top; height: 10px; cursor:e-resize;" background="../metadata/dbms/form/r.gif" id="TWin_R_'+this.tWinId+'"></td>';
|
str+=' <td style="vertical-align: top; height: 10px; cursor:e-resize;" background="../metadata/dbms/form/r.gif" id="TWin_R_'+this.tWinId+'"></td>';
|
||||||
str+=' </tr>';
|
str+=' </tr>';
|
||||||
str+=' <tr>';
|
str+=' <tr>';
|
||||||
@ -1244,8 +1244,8 @@ class TWin
|
|||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
var str='';
|
var str='';
|
||||||
str+='<table id="TWin_TBL_'+this.tWinId+'" class="TWin" border="0px" cellspacing="0" cellpadding="0">';
|
str+='<table id="TWin_TBL_'+this.tWinId+'" class="TWin">';
|
||||||
str+=' <tr id="TWin_H0_'+this.tWinId+'" style="border-bottom: 1px solid #b3b3b3;"><td></td><td><table cellspacing="0" cellpadding="0" style="width: 100%; height: 29px;"><tr><td id="TWin_Ca_'+this.tWinId+'" style="vertical-align: middle; cursor: move; font-weight: bold; white-space: nowrap;"></td><td style="width: 10px; vertical-align: middle;"><img src="../resources/metadata/dbms/form/x.gif" id="TWin_CL_'+this.tWinId+'" style="cursor:pointer;"></td></tr></table></td><td></td></tr>';
|
str+=' <tr id="TWin_H0_'+this.tWinId+'" style="border-bottom: 1px solid #b3b3b3;"><td></td><td><table style="width: 100%; height: 29px;"><tr><td id="TWin_Ca_'+this.tWinId+'" style="vertical-align: middle; cursor: move; font-weight: bold; white-space: nowrap;"></td><td style="width: 10px; vertical-align: middle;"><img src="../resources/metadata/dbms/form/x.gif" id="TWin_CL_'+this.tWinId+'" style="cursor:pointer;"></td></tr></table></td><td></td></tr>';
|
||||||
str+=' <tr>';
|
str+=' <tr>';
|
||||||
str+=' <td style="width: 5px; height: 5px;'+(!this.dialog ? ' cursor:nw-resize;' : '')+'" id="TWin_TL_'+this.tWinId+'"><img src="../resources/metadata/dbms/form/5.gif" alt="" style="display: block;" border="0px" draggable="false"></td>';
|
str+=' <td style="width: 5px; height: 5px;'+(!this.dialog ? ' cursor:nw-resize;' : '')+'" id="TWin_TL_'+this.tWinId+'"><img src="../resources/metadata/dbms/form/5.gif" alt="" style="display: block;" border="0px" draggable="false"></td>';
|
||||||
str+=' <td style="vertical-align: top; height: 5px;'+(!this.dialog ? ' cursor: n-resize;' : '')+'" id="TWin_T_'+this.tWinId+'"></td>';
|
str+=' <td style="vertical-align: top; height: 5px;'+(!this.dialog ? ' cursor: n-resize;' : '')+'" id="TWin_T_'+this.tWinId+'"></td>';
|
||||||
@ -1253,7 +1253,7 @@ class TWin
|
|||||||
str+=' </tr>';
|
str+=' </tr>';
|
||||||
str+=' <tr style="height: 100%">';
|
str+=' <tr style="height: 100%">';
|
||||||
str+=' <td style="height: 5px;'+(!this.dialog ? ' cursor:w-resize;' : '')+'" id="TWin_L_'+this.tWinId+'"></td>';
|
str+=' <td style="height: 5px;'+(!this.dialog ? ' cursor:w-resize;' : '')+'" id="TWin_L_'+this.tWinId+'"></td>';
|
||||||
str+=' <td style="vertical-align:top; cursor: default;"><table border="0px" cellspacing="0" cellpadding="0" style="width: 100%; height: 100%;"><tr><td id="TWin_Co_'+this.tWinId+'" style="vertical-align:top;"></td></tr></table></td>';
|
str+=' <td style="vertical-align:top; cursor: default;"><table style="width: 100%; height: 100%;"><tr><td id="TWin_Co_'+this.tWinId+'" style="vertical-align:top;"></td></tr></table></td>';
|
||||||
str+=' <td style="height: 5px;'+(!this.dialog ? ' cursor:e-resize;' : '')+'" id="TWin_R_'+this.tWinId+'"></td>';
|
str+=' <td style="height: 5px;'+(!this.dialog ? ' cursor:e-resize;' : '')+'" id="TWin_R_'+this.tWinId+'"></td>';
|
||||||
str+=' </tr>';
|
str+=' </tr>';
|
||||||
str+=' <tr>';
|
str+=' <tr>';
|
||||||
@ -1272,8 +1272,8 @@ class TWin
|
|||||||
}
|
}
|
||||||
|
|
||||||
let str='';
|
let str='';
|
||||||
str+='<table id="TWin_TBL_'+this.tWinId+'" class="shadow" border="0px" cellspacing="0" cellpadding="0" style="width: 100%; height: 100%; border: 1px solid #000000;">';
|
str+='<table id="TWin_TBL_'+this.tWinId+'" class="shadow" style="width: 100%; height: 100%; border: 1px solid #000000;">';
|
||||||
str+=' <tr id="TWin_H0_'+this.tWinId+'" style="background: url(../resources/metadata/dbms/form/'+imgB+') repeat-x;"><td></td><td><table cellspacing="0" cellpadding="0" style="width: 100%; height: 29px;"><tr><td id="TWin_Ca_'+this.tWinId+'" style="vertical-align: middle; cursor: move; font-weight: bold; white-space: nowrap;"></td><td style="width: 10px; vertical-align: middle;">'+(this.disableClosing ? '' : '<img src="../resources/metadata/dbms/form/'+imgX+'" id="TWin_CL_'+this.tWinId+'" style="cursor:pointer;padding-right: 5px;">')+'</td></tr></table></td><td></td></tr>';
|
str+=' <tr id="TWin_H0_'+this.tWinId+'" style="background: url(../resources/metadata/dbms/form/'+imgB+') repeat-x;"><td></td><td><table style="width: 100%; height: 29px;"><tr><td id="TWin_Ca_'+this.tWinId+'" style="vertical-align: middle; cursor: move; font-weight: bold; white-space: nowrap;"></td><td style="width: 10px; vertical-align: middle;">'+(this.disableClosing ? '' : '<img src="../resources/metadata/dbms/form/'+imgX+'" id="TWin_CL_'+this.tWinId+'" style="cursor:pointer;padding-right: 5px;">')+'</td></tr></table></td><td></td></tr>';
|
||||||
str+=' <tr>';
|
str+=' <tr>';
|
||||||
str+=' <td style="width: 5px; height: 5px;'+(!this.dialog ? ' cursor:nw-resize;' : '')+'" id="TWin_TL_'+this.tWinId+'"><img src="../resources/metadata/dbms/form/5.gif" alt="" style="display: block;" border="0px" draggable="false"></td>';
|
str+=' <td style="width: 5px; height: 5px;'+(!this.dialog ? ' cursor:nw-resize;' : '')+'" id="TWin_TL_'+this.tWinId+'"><img src="../resources/metadata/dbms/form/5.gif" alt="" style="display: block;" border="0px" draggable="false"></td>';
|
||||||
str+=' <td style="vertical-align:top;height: 5px;'+(!this.dialog ? ' cursor:n-resize;' : '')+'" id="TWin_T_'+this.tWinId+'"></td>';
|
str+=' <td style="vertical-align:top;height: 5px;'+(!this.dialog ? ' cursor:n-resize;' : '')+'" id="TWin_T_'+this.tWinId+'"></td>';
|
||||||
@ -1281,7 +1281,7 @@ class TWin
|
|||||||
str+=' </tr>';
|
str+=' </tr>';
|
||||||
str+=' <tr style="height: 100%">';
|
str+=' <tr style="height: 100%">';
|
||||||
str+=' <td style="height: 5px;'+(!this.dialog ? ' cursor:w-resize;' : '')+'" id="TWin_L_'+this.tWinId+'"></td>';
|
str+=' <td style="height: 5px;'+(!this.dialog ? ' cursor:w-resize;' : '')+'" id="TWin_L_'+this.tWinId+'"></td>';
|
||||||
str+=' <td style="vertical-align:top;cursor:default;"><table border="0px" cellspacing="0" cellpadding="0" style="width: 100%; height: 100%;"><tr><td id="TWin_Co_'+this.tWinId+'" style="vertical-align:top;"></td></tr></table></td>';
|
str+=' <td style="vertical-align:top;cursor:default;"><table style="width: 100%; height: 100%;"><tr><td id="TWin_Co_'+this.tWinId+'" style="vertical-align:top;"></td></tr></table></td>';
|
||||||
str+=' <td style="height: 5px;'+(!this.dialog ? ' cursor:e-resize;' : '')+'" id="TWin_R_'+this.tWinId+'"></td>';
|
str+=' <td style="height: 5px;'+(!this.dialog ? ' cursor:e-resize;' : '')+'" id="TWin_R_'+this.tWinId+'"></td>';
|
||||||
str+=' </tr>';
|
str+=' </tr>';
|
||||||
str+=' <tr>';
|
str+=' <tr>';
|
||||||
|
|||||||
@ -54,4 +54,4 @@ if (isset($_REQUEST['id'])) $id = $_REQUEST['id']; else $id = '';
|
|||||||
|
|
||||||
header ("Content-type: image/gif");
|
header ("Content-type: image/gif");
|
||||||
imagegif($src);
|
imagegif($src);
|
||||||
?>
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ $_CONFIG = array(
|
|||||||
|
|
||||||
'disabled' => false,
|
'disabled' => false,
|
||||||
'uploadURL' => "upload",
|
'uploadURL' => "upload",
|
||||||
'uploadDir' => "O:/www/www.bigfoottrade.kz_old/shop/",
|
'uploadDir' => "O:/www/www.rigor.kz_old/shop/",
|
||||||
'theme' => "default",
|
'theme' => "default",
|
||||||
|
|
||||||
'types' => array(
|
'types' => array(
|
||||||
|
|||||||
@ -13,10 +13,10 @@ function getScript($path)
|
|||||||
//Функция для перевода текста без применения GetText "trt("
|
//Функция для перевода текста без применения GetText "trt("
|
||||||
function trt($text)
|
function trt($text)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db,$Schema;
|
||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
$sql='select translation from main._translations where del=false and language_id='.$_SESSION["LNG"].' and identifier=\''.$text.'\';';
|
$sql='select translation from '.$Schema.'_translations where del=false and language_id='.$_SESSION["LNG"].' and identifier=\''.$text.'\';';
|
||||||
//$sql='select translation from main._translations where del=false and language_id=(select id from main._languages where short_name=\''.$_SESSION["LNG"].'\') and identifier=\''.$text.'\';';
|
//$sql='select translation from main._translations where del=false and language_id=(select id from main._languages where short_name=\''.$_SESSION["LNG"].'\') and identifier=\''.$text.'\';';
|
||||||
$res = NULL;
|
$res = NULL;
|
||||||
try
|
try
|
||||||
|
|||||||
@ -285,7 +285,7 @@ function TMenu(v_obj,v_scr,v_treepath) //Горизонтальное меню
|
|||||||
pn=pn.parent;
|
pn=pn.parent;
|
||||||
}
|
}
|
||||||
//Шаблон кнопки по умолчанию
|
//Шаблон кнопки по умолчанию
|
||||||
if(str=='') str='<div style="border: 1px solid #dddddd;" onClick="window.location.href = \'./?path=${path}\'" onMouseOver="this.style.backgroundColor=\'#ffffff\'; this.style.textDecoration=\'underline\';" onMouseOut="this.style.backgroundColor=\'#dddddd\'; this.style.textDecoration=\'none\';"><table border="0" cellspacing="0" cellpadding="0" style="width: 100%;"><tr><td style="vertical-align: middle;"><nobr> <a href="./?path=${path}" style="${select}">${name}</a> </nobr></td><td style="vertical-align: middle; width: 10px; padding-right: 4px;"><img src="./img/next.gif" alt="" align="right" style="vertical-align: middle; display: ${none};"></td></tr></table></div>';
|
if(str=='') str='<div style="border: 1px solid #dddddd;" onClick="window.location.href = \'./?path=${path}\'" onMouseOver="this.style.backgroundColor=\'#ffffff\'; this.style.textDecoration=\'underline\';" onMouseOut="this.style.backgroundColor=\'#dddddd\'; this.style.textDecoration=\'none\';"><table style="width: 100%;"><tr><td style="vertical-align: middle;"><nobr> <a href="./?path=${path}" style="${select}">${name}</a> </nobr></td><td style="vertical-align: middle; width: 10px; padding-right: 4px;"><img src="./img/next.gif" alt="" align="right" style="vertical-align: middle; display: ${none};"></td></tr></table></div>';
|
||||||
|
|
||||||
str=str.replace(/\${path}/g, tn.getTreePath());
|
str=str.replace(/\${path}/g, tn.getTreePath());
|
||||||
str=str.replace(/\${hash}/g, crc32(tn.getTreePath()));
|
str=str.replace(/\${hash}/g, crc32(tn.getTreePath()));
|
||||||
@ -417,7 +417,7 @@ function TMenu(v_obj,v_scr,v_treepath) //Горизонтальное меню
|
|||||||
if(str!='') break;
|
if(str!='') break;
|
||||||
nTmp=nTmp.parentNode;
|
nTmp=nTmp.parentNode;
|
||||||
}
|
}
|
||||||
if(str=='') str='<div style="border: 1px solid #dddddd;" onClick="window.location.href = \'./?path=${path}\'" onMouseOver="this.style.backgroundColor=\'#ffffff\'; this.style.textDecoration=\'underline\';" onMouseOut="this.style.backgroundColor=\'#dddddd\'; this.style.textDecoration=\'none\';"><table border="0" cellspacing="0" cellpadding="0" style="width: 100%;"><tr><td style="vertical-align: middle;"><nobr> <a href="./?path=${path}">${name}</a> </nobr></td><td style="vertical-align: middle; width: 10px; padding-right: 4px;"><img src="./img/next.gif" alt="" align="right" style="vertical-align: middle; display: ${none};"></td></tr></table></div>';
|
if(str=='') str='<div style="border: 1px solid #dddddd;" onClick="window.location.href = \'./?path=${path}\'" onMouseOver="this.style.backgroundColor=\'#ffffff\'; this.style.textDecoration=\'underline\';" onMouseOut="this.style.backgroundColor=\'#dddddd\'; this.style.textDecoration=\'none\';"><table style="width: 100%;"><tr><td style="vertical-align: middle;"><nobr> <a href="./?path=${path}">${name}</a> </nobr></td><td style="vertical-align: middle; width: 10px; padding-right: 4px;"><img src="./img/next.gif" alt="" align="right" style="vertical-align: middle; display: ${none};"></td></tr></table></div>';
|
||||||
str=str.replace(/\${path}/g, this.m_tn[this.m_tn.length-1].getTreePath());
|
str=str.replace(/\${path}/g, this.m_tn[this.m_tn.length-1].getTreePath());
|
||||||
str=str.replace(/\${name}/g, getCdataValue(nodeTree));
|
str=str.replace(/\${name}/g, getCdataValue(nodeTree));
|
||||||
str=str.replace(/\${none}/g, nodeTree.getAttribute("c")=='1' ? 'block' : 'none');
|
str=str.replace(/\${none}/g, nodeTree.getAttribute("c")=='1' ? 'block' : 'none');
|
||||||
|
|||||||
@ -502,11 +502,8 @@ function getSiteMap($nParent,$nParams,$db,$first,$path)
|
|||||||
}
|
}
|
||||||
$rСol.='</columns>'."\n";
|
$rСol.='</columns>'."\n";
|
||||||
|
|
||||||
if($url=='')
|
|
||||||
{ $url=getHashFromPath($path.$treeid.';'.$fid.';');
|
|
||||||
}
|
|
||||||
$result.=' <url>'."\n";
|
$result.=' <url>'."\n";
|
||||||
$result.=' <loc>http://'.$_SERVER["SERVER_NAME"].'/shop/'.$url.'.html</loc>'."\n";
|
$result.=' <loc>https://'.$_SERVER["SERVER_NAME"].$url.'</loc>'."\n";
|
||||||
$result.=' <lastmod>'.$date.'</lastmod>'."\n";
|
$result.=' <lastmod>'.$date.'</lastmod>'."\n";
|
||||||
$result.=' <changefreq>daily</changefreq>'."\n";
|
$result.=' <changefreq>daily</changefreq>'."\n";
|
||||||
$result.=' </url>'."\n";
|
$result.=' </url>'."\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user