Не знаю что
This commit is contained in:
@ -99,15 +99,15 @@ public class DBMSRecords implements ServletContextAware {
|
|||||||
|
|
||||||
public String sendError(int code, String message) {
|
public String sendError(int code, String message) {
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
json.put("errorCode",code);
|
json.put("error_code",code);
|
||||||
json.put("errorMessage",message);
|
json.put("error_message",message);
|
||||||
return json.toString();
|
return json.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Документация по @RequestBody http://javastudy.ru/spring-mvc/json-xml/ application/xml
|
//Документация по @RequestBody http://javastudy.ru/spring-mvc/json-xml/ application/xml
|
||||||
@RequestMapping(value = "/records.php",method = {RequestMethod.POST,RequestMethod.GET},produces = "text/plain; charset=utf-8")
|
@RequestMapping(value = "/monitoring/records.php",method = {RequestMethod.POST,RequestMethod.GET},produces = "text/plain; charset=utf-8")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object ajaxTamer(@ModelAttribute User user,@RequestBody byte[] reqData,@RequestParam(required=false,name="lng") String language_id) {
|
public Object ajaxTamer(@ModelAttribute User user,@RequestBody(required = false) byte[] reqData,@RequestParam(required=false,name="lng") String language_id) {
|
||||||
|
|
||||||
if(language_id!=null && !language_id.equals(""))
|
if(language_id!=null && !language_id.equals(""))
|
||||||
user.language_id=language_id;
|
user.language_id=language_id;
|
||||||
@ -115,6 +115,9 @@ public class DBMSRecords implements ServletContextAware {
|
|||||||
|
|
||||||
boolean error=false;
|
boolean error=false;
|
||||||
String result=sendError(1,"Request not processed!");
|
String result=sendError(1,"Request not processed!");
|
||||||
|
if(reqData==null)
|
||||||
|
return result;
|
||||||
|
|
||||||
//response.setCharacterEncoding("UTF-8");
|
//response.setCharacterEncoding("UTF-8");
|
||||||
|
|
||||||
//response.getWriter().append("Served at: ").append(request.getContextPath());
|
//response.getWriter().append("Served at: ").append(request.getContextPath());
|
||||||
|
|||||||
@ -1204,27 +1204,7 @@ class EdtRec
|
|||||||
this.hideProgressBar();
|
this.hideProgressBar();
|
||||||
|
|
||||||
if(node.errorCode>0) {
|
if(node.errorCode>0) {
|
||||||
let fullText = node.errorMessage;
|
alert2(trt('Alert'), node.errorMessage);
|
||||||
let smallText = '';
|
|
||||||
let pos1=fullText.indexOf('[[');
|
|
||||||
let pos2=fullText.indexOf(']]');
|
|
||||||
if(pos1>=0 && pos2>=0 && pos1<pos2) smallText=fullText.substring(pos1+2, pos2);
|
|
||||||
|
|
||||||
if(fullText.indexOf("id456[[")>=0){ //Если есть идентификатор того что это перезапись
|
|
||||||
let okFunc=()=>{
|
|
||||||
this.setValue('seq',0);
|
|
||||||
this.sendData(); //Применить ещё раз
|
|
||||||
};
|
|
||||||
if (smallText != '')
|
|
||||||
confirm2(trt('Warning'),smallText, fullText, okFunc, null);
|
|
||||||
else
|
|
||||||
confirm2(trt('Warning'),smallText, '', okFunc, null);
|
|
||||||
}else {
|
|
||||||
if (smallText != '')
|
|
||||||
alert2(trt('Alert'), smallText, fullText);
|
|
||||||
else
|
|
||||||
alert2(trt('Alert'), fullText);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -19,8 +19,10 @@ class DBMSUser
|
|||||||
applyReq(req,fn,node)
|
applyReq(req,fn,node)
|
||||||
{
|
{
|
||||||
this.showShadow(false);
|
this.showShadow(false);
|
||||||
|
|
||||||
if(node.errorCode>0) {
|
if(node.errorCode>0) {
|
||||||
alert2(trt('Alert'), node.errorMessage);
|
alert2(trt('Alert'), node.errorMessage);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(fn==7)
|
if(fn==7)
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
}else
|
}else
|
||||||
if($fn=='1')
|
if($fn=='1')
|
||||||
{
|
{
|
||||||
@session_start();
|
@session_start(['cookie_lifetime' => 43200,'cookie_secure' => true,'cookie_httponly' => true]);
|
||||||
echo session_id();
|
echo session_id();
|
||||||
exit;
|
exit;
|
||||||
}else
|
}else
|
||||||
|
|||||||
@ -52,26 +52,7 @@ class SRec
|
|||||||
this.hideProgressBar();
|
this.hideProgressBar();
|
||||||
|
|
||||||
if(node.errorCode>0) {
|
if(node.errorCode>0) {
|
||||||
let fullText = node.errorMessage;
|
alert2(trt('Alert'), node.errorMessage);
|
||||||
let smallText = '';
|
|
||||||
let pos1=fullText.indexOf('[[');
|
|
||||||
let pos2=fullText.indexOf(']]');
|
|
||||||
if(pos1>=0 && pos2>=0 && pos1<pos2) smallText=fullText.substring(pos1+2, pos2);
|
|
||||||
if(fullText.indexOf("id456[[")>=0){ //Если есть идентификатор того что это перезапись
|
|
||||||
let okFunc=()=>{
|
|
||||||
this.setValue('seq',0);
|
|
||||||
this.sendData(); //Применить ещё раз
|
|
||||||
};
|
|
||||||
if (smallText != '')
|
|
||||||
confirm2(trt('Warning'),smallText, fullText, okFunc, null);
|
|
||||||
else
|
|
||||||
confirm2(trt('Warning'),smallText, '', okFunc, null);
|
|
||||||
}else {
|
|
||||||
if (smallText != '')
|
|
||||||
alert2(trt('Alert'), smallText, fullText);
|
|
||||||
else
|
|
||||||
alert2(trt('Alert'), fullText);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -244,6 +244,10 @@ function alert2(title,smallText,fullText,okFunc=null)
|
|||||||
smallText=fullText;
|
smallText=fullText;
|
||||||
fullText='';
|
fullText='';
|
||||||
}
|
}
|
||||||
|
let pos1=smallText.indexOf('[[');
|
||||||
|
let pos2=smallText.indexOf(']]');
|
||||||
|
if(pos1>=0 && pos2>=0 && pos1<pos2) smallText=smallText.substring(pos1+2, pos2);
|
||||||
|
|
||||||
let win=new TWin(true);
|
let win=new TWin(true);
|
||||||
win.BuildGUI(10,10);
|
win.BuildGUI(10,10);
|
||||||
win.setCaption(document.createTextNode(title));
|
win.setCaption(document.createTextNode(title));
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
@session_start();
|
@session_start(['cookie_lifetime' => 43200,'cookie_secure' => true,'cookie_httponly' => true]);
|
||||||
//if(isset($_SESSION['REMOTE_ADDR']) && $_SESSION['REMOTE_ADDR'] != $_SERVER['REMOTE_ADDR']) unset($_SESSION["USER_ID"]); //Делаемся не авторизованным если зашли с другого ip адреса
|
//if(isset($_SESSION['REMOTE_ADDR']) && $_SESSION['REMOTE_ADDR'] != $_SERVER['REMOTE_ADDR']) unset($_SESSION["USER_ID"]); //Делаемся не авторизованным если зашли с другого ip адреса
|
||||||
if (isset($_REQUEST['id'])) $id = $_REQUEST['id']; else $id = '';
|
if (isset($_REQUEST['id'])) $id = $_REQUEST['id']; else $id = '';
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
if(isset($_GET[session_name()]) && $_GET[session_name()]!='') //Чтоб ID сессии переданная гетом был главней а не создавался заново
|
if(isset($_GET[session_name()]) && $_GET[session_name()]!='') //Чтоб ID сессии переданная гетом был главней а не создавался заново
|
||||||
session_id($_GET[session_name()]);
|
session_id($_GET[session_name()]);
|
||||||
@session_start();
|
@session_start(['cookie_lifetime' => 43200,'cookie_secure' => true,'cookie_httponly' => true]);
|
||||||
if(isset($_SESSION['REMOTE_ADDR']) && $_SESSION['REMOTE_ADDR'] != $_SERVER['REMOTE_ADDR']) unset($_SESSION["USER_ID"]); //Делаемся не авторизованным если зашли с другого ip адреса
|
if(isset($_SESSION['REMOTE_ADDR']) && $_SESSION['REMOTE_ADDR'] != $_SERVER['REMOTE_ADDR']) unset($_SESSION["USER_ID"]); //Делаемся не авторизованным если зашли с другого ip адреса
|
||||||
|
|
||||||
//sleep(1); //Тестирование с задержкой
|
//sleep(1); //Тестирование с задержкой
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
if(isset($_GET[session_name()]) && $_GET[session_name()]!='') //Чтоб сессия переданная гетом была главней
|
if(isset($_GET[session_name()]) && $_GET[session_name()]!='') //Чтоб сессия переданная гетом была главней
|
||||||
session_id($_GET[session_name()]);
|
session_id($_GET[session_name()]);
|
||||||
@session_start();
|
@session_start(['cookie_lifetime' => 43200,'cookie_secure' => true,'cookie_httponly' => true]);
|
||||||
if(isset($_SESSION['REMOTE_ADDR']) && $_SESSION['REMOTE_ADDR'] != $_SERVER['REMOTE_ADDR']) unset($_SESSION["USER_ID"]); //Делаемся не авторизованным если зашли с другого ip адреса
|
if(isset($_SESSION['REMOTE_ADDR']) && $_SESSION['REMOTE_ADDR'] != $_SERVER['REMOTE_ADDR']) unset($_SESSION["USER_ID"]); //Делаемся не авторизованным если зашли с другого ip адреса
|
||||||
|
|
||||||
require_once("../include/zip.lib.php");
|
require_once("../include/zip.lib.php");
|
||||||
|
|||||||
Reference in New Issue
Block a user