diff --git a/metadata/dbms/editrecord.js b/metadata/dbms/editrecord.js index 09cc5a2..6d1d7ff 100644 --- a/metadata/dbms/editrecord.js +++ b/metadata/dbms/editrecord.js @@ -20,7 +20,7 @@ class EdtRec this.win.setContent('
'); let eDiv=document.getElementById('eDiv'+this.uid); - eDiv.innerHTML = '
' + eDiv.innerHTML = '
' if(caption!='') this.win.setCaption(document.createTextNode(caption)); @@ -405,14 +405,11 @@ class EdtRec }else if(vt=="i4") { - - //alert2(trt('Alert'),"prop name = "+nodeProp.getAttribute("n")); - //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 - { - var select = document.createElement('select'); + { + let select = document.createElement('select'); select.style.cssText="width: 100%;"; select.setAttribute("name",nodeProp.getAttribute("n")); select.setAttribute("id","prop_"+this.uid+"_"+nodeProp.getAttribute("n")); @@ -421,7 +418,7 @@ class EdtRec { if(opt.nodeName=="option") { - option = document.createElement("option"); + let option = document.createElement("option"); option.setAttribute("value",opt.getAttribute("val")); option.appendChild(document.createTextNode(opt.getAttribute("d"))); select.appendChild( option ); diff --git a/metadata/dbms/html5doctor.css b/metadata/dbms/html5doctor.css new file mode 100644 index 0000000..9792c13 --- /dev/null +++ b/metadata/dbms/html5doctor.css @@ -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; +} \ No newline at end of file diff --git a/metadata/dbms/login.js b/metadata/dbms/login.js index 1d8acc2..32af443 100644 --- a/metadata/dbms/login.js +++ b/metadata/dbms/login.js @@ -111,7 +111,7 @@ class DBMSUser
\n\ \n\ \n\ -
\n\ +
\n\ \n\ \n\ \n\ @@ -219,257 +219,46 @@ class DBMSUser 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='
\n\ - \n\ - \n\ - \n\ - \n\ -
\n\ - \n\ - \n\ - \n\ - \n\ - \n\ - \n\ - \n\ - \n\ - \n\ - \n\ - \n\ - \n\ - \n\ -
'+trt('Login')+' (E-mail):
Password:
\n\ -
\n\ -
'; - - 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\n\ - \n\ - '; - -//alert(xs); - - if(this.request.callServer(ScriptName,xs)) - { - this.win.showProgressBar(); - } - }; - - //logout current user - this.Exit=function() - { - if(this.request.callServer(ScriptName,'')) - { - 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\n\ - \n\ - \n\ - \n\ - \n\ - \n\ - \n\ -
'+trt('Login')+' (E-mail)\n\ -
\n\ - \n\ - '; - document.getElementById('TWin_Co_'+win.tWinId).innerHTML=str; - - win.setSize("300px","100px"); - - //Центрируем окно и отображаем тень - if(win.tbl.offsetHeight>win.div.offsetHeight) win.div.style.height=win.tbl.offsetHeight+"px"; - if(win.tbl.offsetWidth>win.div.offsetWidth) win.div.style.width=win.tbl.offsetWidth+"px"; - win.setCenter(); - win.shadow=true; - win.hide(false); - - //Click on restore button - var obj=null; - obj=document.getElementById(win.uid+'_restore'); - if(obj!=null) + showRestoreForm() { - obj.onclick=function(win) - { return function() + var win=new TWin(true); + win.BuildGUI(10,10); + win.setCaption(trt("Password_recovery")); + + str='
\n\ + \n\ + \n\ + \n\ + \n\ + \n\ + \n\ +
'+trt('Login')+' (E-mail)\n\ +
\n\ + \n\ +
'; + win.setContent(str); + + //Центрируем окно и отображаем тень + if(win.tbl.offsetHeight>win.div.offsetHeight) win.div.style.height=win.tbl.offsetHeight+"px"; + if(win.tbl.offsetWidth>win.div.offsetWidth) win.div.style.width=win.tbl.offsetWidth+"px"; + win.setCenter(); + win.shadow=true; + win.hide(false); + + //Click on restore button + var obj=null; + obj=document.getElementById(win.uid+'_restore'); + if(obj!=null) + { + obj.onclick=function(win) + { return function() { win.showProgressBar(); - //showProgressBar(document.getElementById('TWin_DT_'+win.tWinId),win.uid); - + var em=document.getElementById(win.uid+'_email').value; - + if(em==''){ document.getElementById(win.uid+'_email').select(); alert(trt('Not_filled_Email_address')); win.hideProgressBar(); return; } if(! isEmail(em)){ document.getElementById(win.uid+'_email').select(); alert(trt('Please_enter_a_valid_email_address')); win.hideProgressBar(); return; } @@ -511,7 +300,7 @@ function showRestoreForm() }else if(fn==7) { - alert(findFirstNode(node,'#cdata-section').nodeValue); + alert(findFirstNode(node,'#cdata-section').nodeValue); this.win.Close(); } } @@ -531,8 +320,11 @@ function showRestoreForm() var call=new myXMLHttpRequest(obj); call.callServer(ScriptName,xml); - + }; - }(win); + }(win); + } } -} \ No newline at end of file + +} + diff --git a/metadata/dbms/records.php b/metadata/dbms/records.php index e7d7c91..813793d 100644 --- a/metadata/dbms/records.php +++ b/metadata/dbms/records.php @@ -223,7 +223,7 @@ /*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 \"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) { $result = $res->fetch(PDO::FETCH_ASSOC); @@ -280,7 +280,7 @@ //Вернём значение прав доступа для запрошенного объекта //$allow=true; $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;'; $res = $db->query($sql_query); @@ -293,7 +293,7 @@ $currNode->setAttributeNode($xmlAttr); $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;'; $res = $db->query($sql_query); while ($row = $res->fetch(PDO::FETCH_ASSOC))// $row - ассоциативный массив значений, ключи - названия столбцов @@ -305,7 +305,7 @@ $currNode->setAttributeNode($xmlAttr); $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;'; $res = $db->query($sql_query); while ($row = $res->fetch(PDO::FETCH_ASSOC))// $row - ассоциативный массив значений, ключи - названия столбцов @@ -785,7 +785,7 @@ //загружаем мета данные и смотрим какие поля должны передать клиенту $mdoc = new DOMDocument(); try - { //$mdoc->load('metadata.xml'); + { $mdoc->loadXML($xmls); } catch (Exception $e) { sendError($e->getMessage()); @@ -918,13 +918,10 @@ $res = $db->query("select 1 from '.$Schema.'_Users where del=false and email = '$login';"); if($res->rowCount()>0) { - - - //mail($login,'BigFootTrade.kz','Not implement',"Content-type: text/html; charset=utf-8\r\nFrom: BigFootTrade Site "); + mail($login,'rigor.kz','Not implement',"Content-type: text/html; charset=utf-8\r\nFrom: rigor Site "); } }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']).';'; try { $db->exec($sql); @@ -1008,6 +1005,27 @@ }else 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(); //Разблокируем сессионный файл так как запросы могут быть достаточно долгими //if (!isset($_SESSION['USER_ID']) || $_SESSION['USER_ID']=='') sendError(trt('You are not logged in!')); @@ -1030,6 +1048,7 @@ { $objXMLDocument=$currNode->ownerDocument; + $objListR = findFirstNode($nTypeR,'objects-list'); //В переданном запросе может быть не полный фильтр заполняем серверный значениями из переданного $f1=findNodeOnPath($currNode,'objects-list/filter'); $f2=findNodeOnPath($nTypeR,'objects-list/filter'); @@ -1117,6 +1136,10 @@ $nextnode = $nextnode->nextSibling; } $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 @@ -1126,7 +1149,6 @@ } //Сохраняем результсет в файл в виде HTML с расширением XLS - $dir='./temp/'; $file='file_'.rand(0,1000).'.xls'; $myFile = $dir.$file; @@ -1259,7 +1281,7 @@ { session_write_close(); //Разблокируем сессионный файл так как запросы могут быть достаточно долгими //Клиент передаёт название таблицы, название поля, id поля - $typename = $_REQUEST['t']; //Тип из metadata.xml + $typename = $_REQUEST['t']; //Тип $field = $_REQUEST['f']; //Название поля с двоичными данными $name = $_REQUEST['n']; //поле с названием файла $idval = $_REQUEST['i']; //Идентификатор поля в базе @@ -1278,7 +1300,7 @@ //Ищем поле в метаданных $objXMLDocument = new DOMDocument(); try - { //$objXMLDocument->load('metadata.xml'); + { $objXMLDocument->loadXML($xmls); } catch (Exception $e) { echo $e->getMessage(); diff --git a/metadata/dbms/showrecord.js b/metadata/dbms/showrecord.js index 5f2cd40..4a381aa 100644 --- a/metadata/dbms/showrecord.js +++ b/metadata/dbms/showrecord.js @@ -81,7 +81,7 @@ class SRec if(this.rwin!=null) { this.rwin.hideProgressBar(); - this.rwin.setContent('
'+trt('Download_report')+': "'+this.win.getCaption().innerHTML+'".
'); + this.rwin.setContent('
'+trt('Download_report')+': "'+this.win.getCaption().innerHTML+'".
'); } }else alert2(trt('Alert'),"Unknown function! fn=\""+fn+"\"" ); @@ -141,7 +141,7 @@ class SRec { let str='\
\ -
\ +
\ \ \
\ @@ -185,7 +185,7 @@ class SRec document.getElementById('SRec_Add_'+this.uid).onclick = ()=>this.insertRecord(); 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);}; } @@ -718,45 +718,78 @@ class SRec }else if (columnNode.getAttribute("vt")==="i4") { - let table=document.createElement('table'); - table.border=0; - table.style.cssText="width:100%;/*table-layout:fixed;*/border-spacing:0;border-collapse:collapse;"; - let newRow=table.insertRow(0); //We add a row in the created table. - let newCell1 = newRow.insertCell(0); - newCell1.style.cssText="padding:0px;padding-right:1px;width:100%;"; - let newCell2 = newRow.insertCell(1); - newCell2.style.cssText="padding:0px;padding-right:1px;height:100%;"; - let newCell3 = newRow.insertCell(2); - newCell3.style.cssText="padding:0px;width:25px;height:100%;"; + 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); - let input = document.createElement('input'); - input.style.cssText="width: 100%;"; - input.setAttribute("type","text"); - input.onkeydown=function(){ if(event.keyCode==13) event.keyCode=9; }; - input.setAttribute("name",columnNode.getAttribute("n")); - if(columnNode.getAttribute("size")!=null) - input.setAttribute("maxlength",columnNode.getAttribute("size"),0); - input.setAttribute("value",value); - input.setAttribute("id",'filter_'+this.uid+'_'+columnNode.getAttribute("n")); - newCell1.appendChild( input ); + }else { + let table = document.createElement('table'); + table.border = 0; + table.style.cssText = "width:100%;/*table-layout:fixed;*/border-spacing:0;border-collapse:collapse;"; + let newRow = table.insertRow(0); //We add a row in the created table. + let newCell1 = newRow.insertCell(0); + newCell1.style.cssText = "padding:0px;padding-right:1px;width:100%;"; + let newCell2 = newRow.insertCell(1); + newCell2.style.cssText = "padding:0px;padding-right:1px;height:100%;"; + let newCell3 = newRow.insertCell(2); + newCell3.style.cssText = "padding:0px;width:25px;height:100%;"; - let button = document.createElement('input'); - button.className='button-secondary'; - button.setAttribute("type","button"); - button.setAttribute("value","+"); - button.style.cssText="height:100%;width:22px;margin:0px;padding:0px;"; - newCell2.appendChild( button ); - button.onclick=function(inp){return function(){ inp.value=getIntVal(inp.value)+1; }}(input); + let input = document.createElement('input'); + input.style.cssText = "width: 100%;"; + input.setAttribute("type", "text"); + input.onkeydown = function () { + if (event.keyCode == 13) event.keyCode = 9; + }; + input.setAttribute("name", columnNode.getAttribute("n")); + if (columnNode.getAttribute("size") != null) + input.setAttribute("maxlength", columnNode.getAttribute("size"), 0); + input.setAttribute("value", value); + input.setAttribute("id", 'filter_' + this.uid + '_' + columnNode.getAttribute("n")); + newCell1.appendChild(input); - button = document.createElement('input'); - button.className='button-secondary'; - button.setAttribute("type","button"); - button.setAttribute("value","-"); - button.style.cssText="height:100%;width:22px;margin:0px;padding:0px;"; - button.onclick=function(inp){return function(){ inp.value=getIntVal(inp.value)-1; }}(input); - newCell3.appendChild( button ); + let button = document.createElement('input'); + button.className = 'button-secondary'; + button.setAttribute("type", "button"); + button.setAttribute("value", "+"); + button.style.cssText = "height:100%;width:22px;margin:0px;padding:0px;"; + newCell2.appendChild(button); + button.onclick = function (inp) { + return function () { + inp.value = getIntVal(inp.value) + 1; + } + }(input); - td2.appendChild( table ); + button = document.createElement('input'); + button.className = 'button-secondary'; + button.setAttribute("type", "button"); + button.setAttribute("value", "-"); + button.style.cssText = "height:100%;width:22px;margin:0px;padding:0px;"; + button.onclick = function (inp) { + return function () { + inp.value = getIntVal(inp.value) - 1; + } + }(input); + newCell3.appendChild(button); + + td2.appendChild(table); + } }else if (columnNode.getAttribute("vt")==="f8") { @@ -1437,7 +1470,7 @@ class SRec if (error_msg!="") alert2(trt('Alert'),"ShowRecords: \n"+error_msg); } - showreport(ext) + showReport(ext) { if(this.rwin!=null) this.rwin.Close(); @@ -1446,7 +1479,7 @@ class SRec this.rwin.setParent(this.win); this.rwin.setSize(280,130); this.rwin.setCaption(trt('Report')); - this.rwin.setContent('
'+trt('Preparing_of_report')+'
'); + this.rwin.setContent('
'+trt('Preparing_of_report')+'
'); this.appendFilter(); //Call data from server diff --git a/metadata/dbms/tools.js b/metadata/dbms/tools.js index bf87b64..9974634 100644 --- a/metadata/dbms/tools.js +++ b/metadata/dbms/tools.js @@ -191,7 +191,7 @@ function loadContent(url,obj) } //Вывести текст поверх окон с кнопочкой OK -function alert2(title,text) +function alert2(title,text,okFunc=null) { let win=new TWin(true); win.BuildGUI(10,10); @@ -209,7 +209,7 @@ function alert2(title,text) win.setContent(html); 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.setCenter(); win.shadow=true; @@ -1209,7 +1209,7 @@ class TWin this.tWinId=Wins.add(this); /* var hd=''; - hd+=''; + hd+='
'; hd+=' '; hd+=' '; hd+=' '; @@ -1223,7 +1223,7 @@ class TWin hd+='
'; var str=''; - str+=''; + str+='
'; str+=' '; str+=' '; str+=' '; @@ -1232,7 +1232,7 @@ class TWin str+=' '; str+=' '; str+=' '; - str+=' '; + str+=' '; str+=' '; str+=' '; str+=' '; @@ -1244,8 +1244,8 @@ class TWin */ /* var str=''; - str+='
'+hd+'
 
 
'; - str+=' '; + str+='
'; + str+=' '; str+=' '; str+=' '; str+=' '; @@ -1253,7 +1253,7 @@ class TWin str+=' '; str+=' '; str+=' '; - str+=' '; + str+=' '; str+=' '; str+=' '; str+=' '; @@ -1272,8 +1272,8 @@ class TWin } let str=''; - str+='
'; - str+=' '; + str+='
'+(this.disableClosing ? '' : '')+'
'; + str+=' '; str+=' '; str+=' '; str+=' '; @@ -1281,7 +1281,7 @@ class TWin str+=' '; str+=' '; str+=' '; - str+=' '; + str+=' '; str+=' '; str+=' '; str+=' '; diff --git a/metadata/include/captcha.php b/metadata/include/captcha.php index f6459cf..2c63972 100644 --- a/metadata/include/captcha.php +++ b/metadata/include/captcha.php @@ -54,4 +54,4 @@ if (isset($_REQUEST['id'])) $id = $_REQUEST['id']; else $id = ''; header ("Content-type: image/gif"); imagegif($src); -?> + diff --git a/metadata/include/kcfinder/conf/config.php b/metadata/include/kcfinder/conf/config.php index 844b9b5..1975fb0 100644 --- a/metadata/include/kcfinder/conf/config.php +++ b/metadata/include/kcfinder/conf/config.php @@ -23,7 +23,7 @@ $_CONFIG = array( 'disabled' => false, 'uploadURL' => "upload", - 'uploadDir' => "O:/www/www.bigfoottrade.kz_old/shop/", + 'uploadDir' => "O:/www/www.rigor.kz_old/shop/", 'theme' => "default", 'types' => array( diff --git a/metadata/include/tools.php b/metadata/include/tools.php index f9b66e9..fe19623 100644 --- a/metadata/include/tools.php +++ b/metadata/include/tools.php @@ -13,10 +13,10 @@ function getScript($path) //Функция для перевода текста без применения GetText "trt(" function trt($text) { - global $db; + global $db,$Schema; $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.'\';'; $res = NULL; try diff --git a/metadata/tree/tree.js b/metadata/tree/tree.js index 4fb377c..eb6273d 100644 --- a/metadata/tree/tree.js +++ b/metadata/tree/tree.js @@ -285,7 +285,7 @@ function TMenu(v_obj,v_scr,v_treepath) //Горизонтальное меню pn=pn.parent; } //Шаблон кнопки по умолчанию - if(str=='') str='
'+(this.disableClosing ? '' : '')+'
  ${name}  
'; + if(str=='') str='
  ${name}  
'; str=str.replace(/\${path}/g, 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; nTmp=nTmp.parentNode; } - if(str=='') str='
  ${name}  
'; + if(str=='') str='
  ${name}  
'; str=str.replace(/\${path}/g, this.m_tn[this.m_tn.length-1].getTreePath()); str=str.replace(/\${name}/g, getCdataValue(nodeTree)); str=str.replace(/\${none}/g, nodeTree.getAttribute("c")=='1' ? 'block' : 'none'); diff --git a/metadata/tree/treetools.php b/metadata/tree/treetools.php index c30cf44..b7507e1 100644 --- a/metadata/tree/treetools.php +++ b/metadata/tree/treetools.php @@ -502,11 +502,8 @@ function getSiteMap($nParent,$nParams,$db,$first,$path) } $rСol.=''."\n"; - if($url=='') - { $url=getHashFromPath($path.$treeid.';'.$fid.';'); - } $result.=' '."\n"; - $result.=' http://'.$_SERVER["SERVER_NAME"].'/shop/'.$url.'.html'."\n"; + $result.=' https://'.$_SERVER["SERVER_NAME"].$url.''."\n"; $result.=' '.$date.''."\n"; $result.=' daily'."\n"; $result.=' '."\n";