Merge branch 'master' of https://git.dirt.kz/igor/Metadata_PHP
This commit is contained in:
3
metadata/axios.min.js
vendored
Normal file
3
metadata/axios.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -1,5 +1,4 @@
|
||||
//
|
||||
package kz.goodssales.GoodsSales.dbms;
|
||||
package kz.locust.CCALM; //Главная
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.BufferedWriter;
|
||||
@ -9,13 +8,12 @@ import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
//import java.io.OutputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.StringReader;
|
||||
import java.io.Reader;
|
||||
import java.io.StringWriter;
|
||||
//import java.io.UnsupportedEncodingException;
|
||||
import java.io.Writer;
|
||||
//import java.nio.charset.StandardCharsets;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.ResultSet;
|
||||
@ -79,8 +77,9 @@ import tctable.Tools;
|
||||
import tools.EmailUtility;
|
||||
import tools.User;
|
||||
|
||||
|
||||
@Controller
|
||||
@SessionAttributes( { "user" }) //Сесионный объект!
|
||||
@SessionAttributes( { "user" }) //Сесионный объект
|
||||
public class DBMSRecords implements ServletContextAware {
|
||||
|
||||
//private static final Logger logger = LoggerFactory.getLogger(Translation.class);
|
||||
@ -124,9 +123,9 @@ public class DBMSRecords implements ServletContextAware {
|
||||
try {
|
||||
//String fullPath = context.getRealPath("/WEB-INF/config.xml");
|
||||
//File fXmlFile = new File(fullPath);
|
||||
|
||||
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
|
||||
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
|
||||
//Document doc = dBuilder.parse(fXmlFile);
|
||||
Document doc = dBuilder.parse(new ClassPathResource("config.xml").getInputStream());
|
||||
Element nMain = doc.getDocumentElement();
|
||||
NodeList nl = nMain.getChildNodes();
|
||||
@ -205,7 +204,7 @@ public class DBMSRecords implements ServletContextAware {
|
||||
|
||||
try {
|
||||
Statement stt0 = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
|
||||
//st.executeUpdate("SET TIME ZONE 'UTC';");
|
||||
//st.executeUpdate("SET TIME ZONE 'UTC';"); зачем коментил?
|
||||
stt0.executeUpdate("SET TIME ZONE 'Asia/Almaty';");
|
||||
stt0.close();
|
||||
} catch (SQLException ex) {
|
||||
@ -396,7 +395,7 @@ public class DBMSRecords implements ServletContextAware {
|
||||
xml += "<metadata fn=\"0\"></metadata>";
|
||||
}
|
||||
|
||||
result=getText(xml,user,conn);
|
||||
result=getText(conn,xml,user);
|
||||
|
||||
} else if (fn != null && fn.equals("1")) {
|
||||
String typename = "";
|
||||
@ -570,7 +569,6 @@ public class DBMSRecords implements ServletContextAware {
|
||||
} catch (XPathExpressionException ex) {
|
||||
logger.info(ex.getMessage());
|
||||
}
|
||||
|
||||
if (nodeList!=null && nodeList.getLength() > 0) {
|
||||
vt = nodeList.item(0).getAttributes().getNamedItem("vt").getNodeValue();
|
||||
//If this "file" is then copy it from the temporary folder to the specified path
|
||||
@ -1149,7 +1147,6 @@ public class DBMSRecords implements ServletContextAware {
|
||||
{
|
||||
String user_id = "";
|
||||
String cmd="";
|
||||
String window_id = "";
|
||||
String login = "";
|
||||
String password = "";
|
||||
String hash = "";
|
||||
@ -1165,7 +1162,6 @@ public class DBMSRecords implements ServletContextAware {
|
||||
|
||||
try {
|
||||
cmd = (String) xpath.compile("//metadata/cmd/text()").evaluate(reqNode, XPathConstants.STRING);
|
||||
window_id = (String) xpath.compile("//metadata/window_id/text()").evaluate(reqNode, XPathConstants.STRING);
|
||||
login = (String) xpath.compile("//metadata/login/text()").evaluate(reqNode, XPathConstants.STRING);
|
||||
password = (String) xpath.compile("//metadata/password/text()").evaluate(reqNode, XPathConstants.STRING);
|
||||
hash = (String) xpath.compile("//metadata/hash/text()").evaluate(reqNode, XPathConstants.STRING); //Сессия для авто логина если не пустая то сначала пытаемся авторизоваться по ней
|
||||
@ -1217,7 +1213,7 @@ public class DBMSRecords implements ServletContextAware {
|
||||
boolean mEerror = false;
|
||||
|
||||
String recipient = login;
|
||||
String subject = "New password for CCALM from http://www.locust.kz";
|
||||
String subject = "New password for CCALM from http://www.ccalm.org";
|
||||
String content = "Login is: "+ email.toLowerCase()+"\n<br> New password: " + newPass;
|
||||
|
||||
|
||||
@ -1309,8 +1305,6 @@ public class DBMSRecords implements ServletContextAware {
|
||||
}
|
||||
|
||||
String val;
|
||||
val = getSQLValue("i4", window_id);
|
||||
sql_query = Tools.replaceAll(sql_query,"${window_id}", val);
|
||||
val = getSQLValue("i4", user_id);
|
||||
sql_query = Tools.replaceAll(sql_query,"${user_id}", val);
|
||||
val = getSQLValue("string", login);
|
||||
@ -1403,7 +1397,7 @@ public class DBMSRecords implements ServletContextAware {
|
||||
|
||||
//Отправляем пароль на Email
|
||||
String recipient = email;
|
||||
String subject = "Password for new user on http://www.locust.kz";
|
||||
String subject = "Password for new user on http://www.ccalm.org";
|
||||
String content = "Login is: "+ email.toLowerCase()+"\n<br> Password: " + newPass;
|
||||
|
||||
//String answer = "";
|
||||
@ -1594,8 +1588,8 @@ public class DBMSRecords implements ServletContextAware {
|
||||
writer.write(" </head>\n");
|
||||
writer.write(" <body>\n");
|
||||
|
||||
writer.write("<b>" + __("Time_and_date_of_generation",user,conn) + ": </b><i>" + (new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss").format(new Date())) + "</i><br>");
|
||||
writer.write("<b>" + __("Creator",user,conn) + ": </b>" + uName);
|
||||
writer.write("<b>" + __(conn,"Time_and_date_of_generation",user) + ": </b><i>" + (new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss").format(new Date())) + "</i><br>");
|
||||
writer.write("<b>" + __(conn,"Creator",user) + ": </b>" + uName);
|
||||
|
||||
//writer.write(filter);
|
||||
|
||||
@ -1605,7 +1599,7 @@ public class DBMSRecords implements ServletContextAware {
|
||||
expr = xpath.compile("objects-list/@d");
|
||||
|
||||
writer.write(" <table border=\"1\" cellspacing=\"0\">\n");
|
||||
writer.write(" <caption><b>" + getText("" + expr.evaluate(nTypeS, XPathConstants.STRING),user,conn) + "</b></caption>\n");
|
||||
writer.write(" <caption><b>" + getText(conn,"" + expr.evaluate(nTypeS, XPathConstants.STRING),user) + "</b></caption>\n");
|
||||
writer.write(" <thead>\n");
|
||||
writer.write(" <tr>");
|
||||
|
||||
@ -1613,7 +1607,7 @@ public class DBMSRecords implements ServletContextAware {
|
||||
Object exprResult = expr.evaluate(nTypeS, XPathConstants.NODESET);
|
||||
nodeList = (NodeList) exprResult;
|
||||
for (int i = 0; i < nodeList.getLength(); i++) {
|
||||
writer.write("<td bgcolor=\"#d1d1d1\" width=\"" + nodeList.item(i).getAttributes().getNamedItem("width").getNodeValue() + "px\"><b>" + getText(nodeList.item(i).getAttributes().getNamedItem("d").getNodeValue(),user,conn)
|
||||
writer.write("<td bgcolor=\"#d1d1d1\" width=\"" + nodeList.item(i).getAttributes().getNamedItem("width").getNodeValue() + "px\"><b>" + getText(conn,nodeList.item(i).getAttributes().getNamedItem("d").getNodeValue(),user)
|
||||
+ "</b></td>");
|
||||
}
|
||||
writer.write(" </tr>\n");
|
||||
@ -1778,8 +1772,6 @@ public class DBMSRecords implements ServletContextAware {
|
||||
@ResponseBody
|
||||
public FileSystemResource home(HttpServletResponse response,@ModelAttribute User user,@RequestParam(required=false,name="t") String typename,@RequestParam(required=false,name="f") String field,@RequestParam(required=false,name="i") String id) {
|
||||
|
||||
//logger.info("user.id="+user.id+" user.name="+user.name+" user.lng="+user.language_id);
|
||||
|
||||
String metadata_file = "";
|
||||
String db_url = "";
|
||||
String db_login = "";
|
||||
@ -1787,12 +1779,12 @@ public class DBMSRecords implements ServletContextAware {
|
||||
//String data_dir = "";
|
||||
//Load DB configuration from "config.xml"
|
||||
try {
|
||||
String fullPath = context.getRealPath("/WEB-INF/config.xml");
|
||||
|
||||
File fXmlFile = new File(fullPath);
|
||||
//String fullPath = context.getRealPath("/WEB-INF/config.xml");
|
||||
//File fXmlFile = new File(fullPath);
|
||||
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
|
||||
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
|
||||
Document doc = dBuilder.parse(fXmlFile);
|
||||
//Document doc = dBuilder.parse(fXmlFile);
|
||||
Document doc = dBuilder.parse(new ClassPathResource("config.xml").getInputStream());
|
||||
Element nMain = doc.getDocumentElement();
|
||||
NodeList nl = nMain.getChildNodes();
|
||||
for (int i = 0; i < nl.getLength(); i++) {
|
||||
@ -1907,10 +1899,15 @@ public class DBMSRecords implements ServletContextAware {
|
||||
|
||||
if(conn!=null){try{conn.close();}catch(SQLException ex){}}
|
||||
|
||||
if(file!=null) {
|
||||
response.setContentType("application/octet-stream");
|
||||
response.setHeader("Content-Disposition", "attachment; filename="+afterFirst(filename,"_"));
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
return new FileSystemResource(file);
|
||||
}else {
|
||||
response.setContentType("text/html");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1923,12 +1920,12 @@ public class DBMSRecords implements ServletContextAware {
|
||||
|
||||
|
||||
try {
|
||||
String fullPath = context.getRealPath("/WEB-INF/config.xml");
|
||||
|
||||
File fXmlFile = new File(fullPath);
|
||||
//String fullPath = context.getRealPath("/WEB-INF/config.xml");
|
||||
//File fXmlFile = new File(fullPath);
|
||||
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
|
||||
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
|
||||
Document doc = dBuilder.parse(fXmlFile);
|
||||
//Document doc = dBuilder.parse(fXmlFile);
|
||||
Document doc = dBuilder.parse(new ClassPathResource("config.xml").getInputStream());
|
||||
Element nMain = doc.getDocumentElement();
|
||||
NodeList nl = nMain.getChildNodes();
|
||||
for (int i = 0; i < nl.getLength(); i++) {
|
||||
@ -2010,12 +2007,12 @@ public class DBMSRecords implements ServletContextAware {
|
||||
String data_dir = "";
|
||||
//Load DB configuration from "config.xml"
|
||||
try {
|
||||
String fullPath = context.getRealPath("/WEB-INF/config.xml");
|
||||
|
||||
File fXmlFile = new File(fullPath);
|
||||
//String fullPath = context.getRealPath("/WEB-INF/config.xml");
|
||||
//File fXmlFile = new File(fullPath);
|
||||
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
|
||||
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
|
||||
Document doc = dBuilder.parse(fXmlFile);
|
||||
//Document doc = dBuilder.parse(fXmlFile);
|
||||
Document doc = dBuilder.parse(new ClassPathResource("config.xml").getInputStream());
|
||||
Element nMain = doc.getDocumentElement();
|
||||
NodeList nl = nMain.getChildNodes();
|
||||
for (int i = 0; i < nl.getLength(); i++) {
|
||||
@ -2046,8 +2043,6 @@ public class DBMSRecords implements ServletContextAware {
|
||||
String getSQLValue(String t, String v) {
|
||||
//if($t=='object' && (strtoupper($v)!='NULL' && gettype($v)=='string')) $t='string'; //Если id шники uuid
|
||||
|
||||
//if(t.equals("object")) t="string";
|
||||
|
||||
if (t.equals("object") || t.equals("uid")) {
|
||||
if (v.equals(""))
|
||||
v = "NULL";
|
||||
@ -2161,7 +2156,7 @@ public class DBMSRecords implements ServletContextAware {
|
||||
}
|
||||
|
||||
//Перевести слово по идентификатору из базы
|
||||
public String __(String key,User user,Connection conn)
|
||||
public String __(Connection conn,String key,User user)
|
||||
{
|
||||
String result="";
|
||||
ResultSet rs=null;
|
||||
@ -2183,7 +2178,8 @@ public class DBMSRecords implements ServletContextAware {
|
||||
if(rs!=null) try{rs.close();}catch(SQLException ex) {}
|
||||
}
|
||||
|
||||
/*if(result.equals(""))
|
||||
/* закоментил так как теперь цифровые id и всё перенесено в базу
|
||||
if(result.equals(""))
|
||||
{
|
||||
if(m_props==null || !user.language_id.equals(m_props_loc))
|
||||
{
|
||||
@ -2210,7 +2206,7 @@ public class DBMSRecords implements ServletContextAware {
|
||||
}
|
||||
|
||||
//Translate text by patterns
|
||||
public String getText(String text,User user,Connection conn) {
|
||||
public String getText(Connection conn,String text,User user) {
|
||||
int pos1 = 0;
|
||||
while (true) {
|
||||
pos1 = text.indexOf("_('", pos1);
|
||||
@ -2220,7 +2216,7 @@ public class DBMSRecords implements ServletContextAware {
|
||||
if (pos2 == -1)
|
||||
break;
|
||||
|
||||
text = text.substring(0, pos1) + __(text.substring(pos1 + 3, pos2),user,conn) + text.substring(pos2 + 2);
|
||||
text = text.substring(0, pos1) + __(conn,text.substring(pos1 + 3, pos2),user) + text.substring(pos2 + 2);
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
@ -20,6 +20,7 @@ import javax.xml.xpath.XPathFactory;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@ -71,12 +72,12 @@ public class DBMSTree implements ServletContextAware {
|
||||
|
||||
//Load DB configuration from "config.xml"
|
||||
try {
|
||||
String fullPath = context.getRealPath("/WEB-INF/config.xml");
|
||||
|
||||
File fXmlFile = new File(fullPath);
|
||||
//String fullPath = context.getRealPath("/WEB-INF/config.xml");
|
||||
//File fXmlFile = new File(fullPath);
|
||||
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
|
||||
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
|
||||
Document doc = dBuilder.parse(fXmlFile);
|
||||
//Document doc = dBuilder.parse(fXmlFile);
|
||||
Document doc = dBuilder.parse(new ClassPathResource("config.xml").getInputStream());
|
||||
Element nMain = doc.getDocumentElement();
|
||||
NodeList nl = nMain.getChildNodes();
|
||||
for (int i = 0; i < nl.getLength(); i++) {
|
||||
|
||||
@ -85,8 +85,8 @@ class EdtRec
|
||||
//Задать CDATA значение для узла "type->properties->prop" по "n"
|
||||
setPropCdata(name,value)
|
||||
{
|
||||
var nodeProperties=findNodeOnPath(this.nodeMetadata, 'type/properties');
|
||||
var nodeProp=nodeProperties.firstChild;
|
||||
let nodeProperties=findNodeOnPath(this.nodeMetadata, 'type/properties');
|
||||
let nodeProp=nodeProperties.firstChild;
|
||||
while(nodeProp!=null)
|
||||
{
|
||||
if(nodeProp.nodeName=="prop")
|
||||
@ -416,13 +416,9 @@ 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.
|
||||
let opt=findNode(nodeProp, "options");
|
||||
if(opt!=null) //If combobox
|
||||
{
|
||||
let select = document.createElement('select');
|
||||
select.classList.add('DBMS');
|
||||
select.style.cssText="width: 100%;";
|
||||
@ -433,7 +429,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 );
|
||||
@ -911,15 +907,14 @@ class EdtRec
|
||||
//The result can fill the filter field with complete information or display a window with a further selection of the value.
|
||||
selObj(typeName,propname)
|
||||
{
|
||||
var win=new TWin();
|
||||
let win=new TWin();
|
||||
win.BuildGUI(pageX-10,pageY-10);
|
||||
|
||||
var str='';
|
||||
str+='<table id="thetable'+win+'" bgcolor="SlateGrey" style="border: 1px solid rgb(99, 99, 99);" width="100%">';
|
||||
str+=' <caption></caption>';
|
||||
str+=' <thead><tr><th></th></tr></thead>';
|
||||
str+=' <tbody><tr><td></td></tr></tbody>';
|
||||
str+='</table>';
|
||||
let str=`
|
||||
<table id="thetable`+win+`" bgcolor="SlateGrey" style="border: 1px solid rgb(99, 99, 99);" width="100%">
|
||||
<caption></caption>
|
||||
<thead><tr><th></th></tr></thead>
|
||||
<tbody><tr><td></td></tr></tbody>
|
||||
</table>`;
|
||||
win.setContent(str);
|
||||
};
|
||||
|
||||
@ -946,9 +941,9 @@ class EdtRec
|
||||
//Call the ShowRecord.html window with the parameters for the filter (not just the object name).
|
||||
callWindow(nodeProp)
|
||||
{
|
||||
var xmlString="";
|
||||
var TypeName="";
|
||||
var nT=findNode(nodeProp, "type");
|
||||
let xmlString="";
|
||||
let TypeName="";
|
||||
let nT=findNode(nodeProp, "type");
|
||||
if(nT!=null)
|
||||
{
|
||||
xmlString=getXMLNodeSerialisation(nT);
|
||||
@ -960,11 +955,11 @@ class EdtRec
|
||||
//Write to XML string from GUI
|
||||
while(true)
|
||||
{
|
||||
var sub1=BeforeFirst(xmlString,"${");
|
||||
let sub1=BeforeFirst(xmlString,"${");
|
||||
if(sub1==null) break;
|
||||
var sub2=AfterFirst(xmlString,"}");
|
||||
let sub2=AfterFirst(xmlString,"}");
|
||||
if(sub2==null) break;
|
||||
var val=BeforeFirst(AfterFirst(xmlString,"${"),"}");
|
||||
let val=BeforeFirst(AfterFirst(xmlString,"${"),"}");
|
||||
|
||||
let obj=document.getElementById("prop_"+this.uid+"_"+val);
|
||||
if(obj!=null){
|
||||
@ -974,7 +969,7 @@ class EdtRec
|
||||
}
|
||||
}
|
||||
|
||||
var rec=new SRec();
|
||||
let rec=new SRec();
|
||||
rec.create();
|
||||
rec.f_Settings=xmlString;
|
||||
rec.f_TypeName=TypeName;
|
||||
@ -1053,14 +1048,14 @@ class EdtRec
|
||||
//Function to populate the drop-down lists
|
||||
setDataSelect(node)
|
||||
{
|
||||
var prop_name,prop,option,nodeProp,id,value,cdataNode;
|
||||
var nodeType=findFirstNode(node, 'type');
|
||||
let prop_name,prop,option,nodeProp,id,value,cdataNode;
|
||||
let nodeType=findFirstNode(node, 'type');
|
||||
prop_name=nodeType.getAttribute("pn"); //field name
|
||||
prop=document.getElementById("prop_"+this.uid+"_"+prop_name);
|
||||
|
||||
var selector=null; //find what kind of object object
|
||||
var nodeFilter=findFirstNode(this.nodeMetadata, 'properties');
|
||||
var nodeCur=nodeFilter.firstChild;
|
||||
let selector=null; //find what kind of object object
|
||||
let nodeFilter=findFirstNode(this.nodeMetadata, 'properties');
|
||||
let nodeCur=nodeFilter.firstChild;
|
||||
while(nodeCur!=null)
|
||||
{
|
||||
if((nodeCur.nodeName=="prop")&&(nodeCur.getAttribute("n")==prop_name))
|
||||
@ -1077,7 +1072,7 @@ class EdtRec
|
||||
//in the full can be that the list has arrived after the arrival of all data and therefore the drop-down list must be set to the desired value here
|
||||
//select the value for this list
|
||||
let val=null;
|
||||
var nodeProperties=findFirstNode(this.nodeMetadata, 'properties');
|
||||
let nodeProperties=findFirstNode(this.nodeMetadata, 'properties');
|
||||
nodeProp=nodeProperties.firstChild;
|
||||
while(nodeProp!=null)
|
||||
{
|
||||
@ -1567,15 +1562,15 @@ class TCheckboxListField
|
||||
};
|
||||
// Set checked values divide ";"
|
||||
setValue(val) {
|
||||
var splits;
|
||||
let splits;
|
||||
if(val.indexOf(';')==-1)
|
||||
splits = val.split('');
|
||||
else
|
||||
splits = val.split(';');
|
||||
|
||||
for(var j=0;j<splits.length;j++)
|
||||
for(let j=0;j<splits.length;j++)
|
||||
{
|
||||
for(var i=0;i<this.array.length;i++)
|
||||
for(let i=0;i<this.array.length;i++)
|
||||
{
|
||||
if(this.array[i].value==splits[j])
|
||||
{
|
||||
|
||||
BIN
metadata/dbms/images/loading4.gif
Normal file
BIN
metadata/dbms/images/loading4.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
@ -238,9 +238,11 @@
|
||||
{
|
||||
$doc = new DOMDocument();
|
||||
try
|
||||
{ $doc->loadXML(file_get_contents("php://input"));
|
||||
{
|
||||
$doc->loadXML($HTTP_INPUT);
|
||||
} catch (Exception $e)
|
||||
{ sendError($e->getMessage());
|
||||
{
|
||||
sendError($e->getMessage());
|
||||
}
|
||||
$reqNode = $doc->documentElement;
|
||||
|
||||
@ -250,8 +252,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
//error_log($HTTP_INPUT);
|
||||
|
||||
//описание
|
||||
//(fn==0) - отправить метаданные клиенту по запрошенному узлу
|
||||
//(fn==1) - вставить одну запись в базу данных (результат id записи)
|
||||
@ -607,13 +607,8 @@
|
||||
$f2=findNodeOnPath($nTypeR,'objects-list/filter');
|
||||
setFilter($f1,$f2);//заменить все значения первого фильтра значениями из второго
|
||||
|
||||
//+++++++
|
||||
//$objXMLDocument->saveXML($currNode)
|
||||
|
||||
$sql_query=getCdataValue(findNodeOnPath($currNode, "objects-list/sql-query"));
|
||||
|
||||
//sendError($sql_query);
|
||||
|
||||
if($f1!=null)
|
||||
{
|
||||
$nextnode=$f1->firstChild;
|
||||
@ -705,7 +700,10 @@
|
||||
if(!array_key_exists("_u",$row)) { $access.="u"; } else { $access.=$row["_u"]; }
|
||||
if(!array_key_exists("_d",$row)) { $access.="d"; } else { $access.=$row["_d"]; }
|
||||
|
||||
if(array_key_exists($currNode->getAttribute("ObjectID"),$row))
|
||||
$xmlstring.=' <record id="'.$row[$currNode->getAttribute("ObjectID")].'" a="'.$access.'">';
|
||||
else
|
||||
$xmlstring.=' <record id="" a="'.$access.'">';
|
||||
$nextnode=findNode($currNode,'objects-list')->firstChild;
|
||||
while ($nextnode)
|
||||
{
|
||||
@ -917,7 +915,7 @@
|
||||
|
||||
if($cmd==0) //Restore password by email
|
||||
{
|
||||
$res = $db->query("select 1 from _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)
|
||||
{
|
||||
mail($login,'rigor.kz','Not implement',"Content-type: text/html; charset=utf-8\r\nFrom: rigor Site <info@rigor.kz>");
|
||||
|
||||
@ -42,4 +42,3 @@
|
||||
{
|
||||
echo 'error';
|
||||
}
|
||||
?>
|
||||
@ -729,46 +729,46 @@ 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);
|
||||
}else {
|
||||
|
||||
|
||||
|
||||
let input = document.createElement('input');
|
||||
input.classList.add('DBMS');
|
||||
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 );
|
||||
|
||||
let button = document.createElement('input');
|
||||
button.classList.add('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);
|
||||
|
||||
button = document.createElement('input');
|
||||
button.classList.add('button-secondary');
|
||||
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);
|
||||
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")
|
||||
{
|
||||
@ -1050,7 +1050,7 @@ class SRec
|
||||
th.style.cssText='width: 1%;';
|
||||
tr.appendChild(th);
|
||||
th=document.createElement('th');
|
||||
th.appendChild( document.createTextNode('Del'));
|
||||
th.appendChild( document.createTextNode(trt('Del')));
|
||||
th.title = trt('Invert_selection');
|
||||
th.style.cssText='width: 1%; cursor: pointer; text-decoration: underline;';
|
||||
th.onmouseover=function(){ this.style.backgroundColor=g_rowColor2; };
|
||||
@ -1557,7 +1557,7 @@ class SRec
|
||||
{
|
||||
let nodeType=findFirstNode(node, "type");
|
||||
let typeName=nodeType.getAttribute("n");
|
||||
id=nodeType.getAttribute("id");
|
||||
let id=nodeType.getAttribute("id");
|
||||
deleteHTML(id+'_'+this.uid);
|
||||
//Rebuild sequential numbering of rows (first column)
|
||||
let theTable = document.getElementById('thetable'+this.uid); //data table
|
||||
|
||||
@ -108,6 +108,11 @@ Date.prototype.toDateString = function (){
|
||||
return '' + y + '-' + (m<=9 ? '0' + m : m) + '-' + (d <= 9 ? '0' + d : d);
|
||||
}
|
||||
|
||||
Date.prototype.addHours = function(h) {
|
||||
this.setTime(this.getTime() + (h*60*60*1000));
|
||||
return this;
|
||||
}
|
||||
|
||||
//Расширяем класс строки для удаления HTML тегов
|
||||
String.prototype.stripTags = function() {
|
||||
return this.replace(/<\/?[^>]+>/g, '');
|
||||
|
||||
@ -79,7 +79,7 @@ table.DynarchCalendar-titleCont {
|
||||
.DynarchCalendar-pressed-bottomBar-today {
|
||||
border: 1px solid #000;
|
||||
background-color: #777;
|
||||
color: #fff;
|
||||
color: #0fff;
|
||||
padding: 1px 14px;
|
||||
}
|
||||
|
||||
|
||||
@ -44,8 +44,8 @@
|
||||
|
||||
|
||||
.DynarchCalendar-day-selected {
|
||||
background-color: #1864fc;
|
||||
color: #fff !important;
|
||||
background-color: #729ff7;
|
||||
color: #000000 !important;
|
||||
background-image: url("coolbg.png");
|
||||
background-position: 0 50%;
|
||||
background-repeat: repeat-x;
|
||||
|
||||
@ -15,13 +15,13 @@
|
||||
<form onsubmit="updateAction();return false;" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="text_tab" class="current" aria-controls="text_panel"><span><a href="javascript:mcTabs.displayTab('text_tab','text_panel');" onMouseDown="return false;">{#style_dlg.text_tab}</a></span></li>
|
||||
<li id="background_tab" aria-controls="background_panel"><span><a href="javascript:mcTabs.displayTab('background_tab','background_panel');" onMouseDown="return false;">{#style_dlg.background_tab}</a></span></li>
|
||||
<li id="block_tab" aria-controls="block_panel"><span><a href="javascript:mcTabs.displayTab('block_tab','block_panel');" onMouseDown="return false;">{#style_dlg.block_tab}</a></span></li>
|
||||
<li id="box_tab" aria-controls="box_panel"><span><a href="javascript:mcTabs.displayTab('box_tab','box_panel');" onMouseDown="return false;">{#style_dlg.box_tab}</a></span></li>
|
||||
<li id="border_tab" aria-controls="border_panel"><span><a href="javascript:mcTabs.displayTab('border_tab','border_panel');" onMouseDown="return false;">{#style_dlg.border_tab}</a></span></li>
|
||||
<li id="list_tab" aria-controls="list_panel"><span><a href="javascript:mcTabs.displayTab('list_tab','list_panel');" onMouseDown="return false;">{#style_dlg.list_tab}</a></span></li>
|
||||
<li id="positioning_tab" aria-controls="positioning_panel"><span><a href="javascript:mcTabs.displayTab('positioning_tab','positioning_panel');" onMouseDown="return false;">{#style_dlg.positioning_tab}</a></span></li>
|
||||
<li id="text_tab" class="current" aria-controls="text_panel"><span><a href="javascript:mcTabs.displayTab('text_tab','text_panel');" onmousedown="return false;">{#style_dlg.text_tab}</a></span></li>
|
||||
<li id="background_tab" aria-controls="background_panel"><span><a href="javascript:mcTabs.displayTab('background_tab','background_panel');" onmousedown="return false;">{#style_dlg.background_tab}</a></span></li>
|
||||
<li id="block_tab" aria-controls="block_panel"><span><a href="javascript:mcTabs.displayTab('block_tab','block_panel');" onmousedown="return false;">{#style_dlg.block_tab}</a></span></li>
|
||||
<li id="box_tab" aria-controls="box_panel"><span><a href="javascript:mcTabs.displayTab('box_tab','box_panel');" onmousedown="return false;">{#style_dlg.box_tab}</a></span></li>
|
||||
<li id="border_tab" aria-controls="border_panel"><span><a href="javascript:mcTabs.displayTab('border_tab','border_panel');" onmousedown="return false;">{#style_dlg.border_tab}</a></span></li>
|
||||
<li id="list_tab" aria-controls="list_panel"><span><a href="javascript:mcTabs.displayTab('list_tab','list_panel');" onmousedown="return false;">{#style_dlg.list_tab}</a></span></li>
|
||||
<li id="positioning_tab" aria-controls="positioning_panel"><span><a href="javascript:mcTabs.displayTab('positioning_tab','positioning_panel');" onmousedown="return false;">{#style_dlg.positioning_tab}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -91,7 +91,7 @@
|
||||
<td colspan="2">
|
||||
<table role="presentation" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input id="text_color" name="text_color" type="text" value="" size="9" onChange="updateColor('text_color_pick','text_color');" /></td>
|
||||
<td><input id="text_color" name="text_color" type="text" value="" size="9" onchange="updateColor('text_color_pick','text_color');" /></td>
|
||||
<td id="text_color_pickcontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -137,7 +137,7 @@
|
||||
<td>
|
||||
<table role="presentation" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input id="background_color" name="background_color" type="text" value="" size="9" onChange="updateColor('background_color_pick','background_color');" /></td>
|
||||
<td><input id="background_color" name="background_color" type="text" value="" size="9" onchange="updateColor('background_color_pick','background_color');" /></td>
|
||||
<td id="background_color_pickcontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -285,7 +285,7 @@
|
||||
<td>
|
||||
<table role="presentation" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input type="text" id="box_width" name="box_width" class="mceEditableSelect" onChange="synch('box_width','positioning_width');" /></td>
|
||||
<td><input type="text" id="box_width" name="box_width" class="mceEditableSelect" onchange="synch('box_width','positioning_width');" /></td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<label id="box_width_measurement_label" for="box_width_measurement" style="display: none; visibility: hidden;">Box Width Measurement Unit</label>
|
||||
@ -303,7 +303,7 @@
|
||||
<td>
|
||||
<table role="presentation" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input type="text" id="box_height" name="box_height" class="mceEditableSelect" onChange="synch('box_height','positioning_height');" /></td>
|
||||
<td><input type="text" id="box_height" name="box_height" class="mceEditableSelect" onchange="synch('box_height','positioning_height');" /></td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<label id="box_height_measurement_label" for="box_height_measurement" style="display: none; visibility: hidden;">Box Height Measurement Unit</label>
|
||||
@ -325,7 +325,7 @@
|
||||
<table role="presentation">
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><input type="checkbox" id="box_padding_same" name="box_padding_same" class="checkbox" checked="checked" onClick="toggleSame(this,'box_padding');" /> <label for="box_padding_same">{#style_dlg.same}</label></td>
|
||||
<td><input type="checkbox" id="box_padding_same" name="box_padding_same" class="checkbox" checked="checked" onclick="toggleSame(this,'box_padding');" /> <label for="box_padding_same">{#style_dlg.same}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="box_padding_top">{#style_dlg.top}</label></td>
|
||||
@ -398,7 +398,7 @@
|
||||
<table role="presentation">
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><input type="checkbox" id="box_margin_same" name="box_margin_same" class="checkbox" checked="checked" onClick="toggleSame(this,'box_margin');" /> <label for="box_margin_same">{#style_dlg.same}</label></td>
|
||||
<td><input type="checkbox" id="box_margin_same" name="box_margin_same" class="checkbox" checked="checked" onclick="toggleSame(this,'box_margin');" /> <label for="box_margin_same">{#style_dlg.same}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="box_margin_top">{#style_dlg.top}</label></td>
|
||||
@ -483,11 +483,11 @@
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td class="delim"> </td>
|
||||
<td><input type="checkbox" id="border_style_same" name="border_style_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_style');" /> <label for="border_style_same">{#style_dlg.same}</label></td>
|
||||
<td><input type="checkbox" id="border_style_same" name="border_style_same" class="checkbox" checked="checked" onclick="toggleSame(this,'border_style');" /> <label for="border_style_same">{#style_dlg.same}</label></td>
|
||||
<td class="delim"> </td>
|
||||
<td><input type="checkbox" id="border_width_same" name="border_width_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_width');" /> <label for="border_width_same">{#style_dlg.same}</label></td>
|
||||
<td><input type="checkbox" id="border_width_same" name="border_width_same" class="checkbox" checked="checked" onclick="toggleSame(this,'border_width');" /> <label for="border_width_same">{#style_dlg.same}</label></td>
|
||||
<td class="delim"> </td>
|
||||
<td><input type="checkbox" id="border_color_same" name="border_color_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_color');" /> <label for="border_color_same">{#style_dlg.same}</label></td>
|
||||
<td><input type="checkbox" id="border_color_same" name="border_color_same" class="checkbox" checked="checked" onclick="toggleSame(this,'border_color');" /> <label for="border_color_same">{#style_dlg.same}</label></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
@ -511,7 +511,7 @@
|
||||
<td>
|
||||
<table role="presentation" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input id="border_color_top" name="border_color_top" type="text" value="" size="9" onChange="updateColor('border_color_top_pick','border_color_top');" /></td>
|
||||
<td><input id="border_color_top" name="border_color_top" type="text" value="" size="9" onchange="updateColor('border_color_top_pick','border_color_top');" /></td>
|
||||
<td id="border_color_top_pickcontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -539,7 +539,7 @@
|
||||
<td>
|
||||
<table role="presentation" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input id="border_color_right" name="border_color_right" type="text" value="" size="9" onChange="updateColor('border_color_right_pick','border_color_right');" disabled="disabled" /></td>
|
||||
<td><input id="border_color_right" name="border_color_right" type="text" value="" size="9" onchange="updateColor('border_color_right_pick','border_color_right');" disabled="disabled" /></td>
|
||||
<td id="border_color_right_pickcontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -567,7 +567,7 @@
|
||||
<td>
|
||||
<table role="presentation" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input id="border_color_bottom" name="border_color_bottom" type="text" value="" size="9" onChange="updateColor('border_color_bottom_pick','border_color_bottom');" disabled="disabled" /></td>
|
||||
<td><input id="border_color_bottom" name="border_color_bottom" type="text" value="" size="9" onchange="updateColor('border_color_bottom_pick','border_color_bottom');" disabled="disabled" /></td>
|
||||
<td id="border_color_bottom_pickcontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -595,7 +595,7 @@
|
||||
<td>
|
||||
<table role="presentation" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input id="border_color_left" name="border_color_left" type="text" value="" size="9" onChange="updateColor('border_color_left_pick','border_color_left');" disabled="disabled" /></td>
|
||||
<td><input id="border_color_left" name="border_color_left" type="text" value="" size="9" onchange="updateColor('border_color_left_pick','border_color_left');" disabled="disabled" /></td>
|
||||
<td id="border_color_left_pickcontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -643,7 +643,7 @@
|
||||
<td>
|
||||
<table role="presentation" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input type="text" id="positioning_width" name="positioning_width" onChange="synch('positioning_width','box_width');" /></td>
|
||||
<td><input type="text" id="positioning_width" name="positioning_width" onchange="synch('positioning_width','box_width');" /></td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<label id="positioning_width_measurement_label" for="positioning_width_measurement" style="display: none; visibility: hidden;">Positioning width Measurement Unit</label>
|
||||
@ -661,7 +661,7 @@
|
||||
<td>
|
||||
<table role="presentation" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input type="text" id="positioning_height" name="positioning_height" onChange="synch('positioning_height','box_height');" /></td>
|
||||
<td><input type="text" id="positioning_height" name="positioning_height" onchange="synch('positioning_height','box_height');" /></td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<label id="positioning_height_measurement_label" for="positioning_height_measurement" style="display: none; visibility: hidden;">Positioning Height Measurement Unit</label>
|
||||
@ -683,7 +683,7 @@
|
||||
<table role="presentation">
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><input type="checkbox" id="positioning_placement_same" name="positioning_placement_same" class="checkbox" checked="checked" onClick="toggleSame(this,'positioning_placement');" /> <label for="positioning_placement_same">{#style_dlg.same}</label></td>
|
||||
<td><input type="checkbox" id="positioning_placement_same" name="positioning_placement_same" class="checkbox" checked="checked" onclick="toggleSame(this,'positioning_placement');" /> <label for="positioning_placement_same">{#style_dlg.same}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{#style_dlg.top}</td>
|
||||
@ -756,7 +756,7 @@
|
||||
<table role="presentation">
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><input type="checkbox" id="positioning_clip_same" name="positioning_clip_same" class="checkbox" checked="checked" onClick="toggleSame(this,'positioning_clip');" /> <label for="positioning_clip_same">{#style_dlg.same}</label></td>
|
||||
<td><input type="checkbox" id="positioning_clip_same" name="positioning_clip_same" class="checkbox" checked="checked" onclick="toggleSame(this,'positioning_clip');" /> <label for="positioning_clip_same">{#style_dlg.same}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{#style_dlg.top}</td>
|
||||
@ -826,14 +826,14 @@
|
||||
</div>
|
||||
|
||||
<div class="panel_toggle_insert_span">
|
||||
<input type="checkbox" class="checkbox" id="toggle_insert_span" name="toggle_insert_span" onClick="toggleApplyAction();" />
|
||||
<input type="checkbox" class="checkbox" id="toggle_insert_span" name="toggle_insert_span" onclick="toggleApplyAction();" />
|
||||
<label for="toggle_insert_span">{#style_dlg.toggle_insert_span}</label>
|
||||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<input type="submit" id="insert" name="insert" value="{#update}" />
|
||||
<input type="button" class="button" id="apply" name="apply" value="{#style_dlg.apply}" onClick="applyAction();" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onClick="tinyMCEPopup.close();" />
|
||||
<input type="button" class="button" id="apply" name="apply" value="{#style_dlg.apply}" onclick="applyAction();" />
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
<tr>
|
||||
<td><label for="rowtype">{#table_dlg.rowtype}</label></td>
|
||||
<td class="col2">
|
||||
<select id="rowtype" name="rowtype" class="mceFocus" onChange="changedRowType();">
|
||||
<select id="rowtype" name="rowtype" class="mceFocus" onchange="changedRowType();">
|
||||
<option value="thead">{#table_dlg.thead}</option>
|
||||
<option value="tbody">{#table_dlg.tbody}</option>
|
||||
<option value="tfoot">{#table_dlg.tfoot}</option>
|
||||
|
||||
3074
metadata/vue-router.js
Normal file
3074
metadata/vue-router.js
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user