Moved php from cgi-bin to backend

This commit is contained in:
Oleg Sh 2024-10-10 20:17:45 +02:00
parent aac9da9d45
commit 1576a1c6e4
24 changed files with 100 additions and 100 deletions

View File

@ -9,7 +9,7 @@ RewriteBase /
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond $1 !^(index\.php|script/merge\.php|script/*.|robots\.txt|favicon\.ico|sitemap\.xml|i/.*|tmp/.*|upl/.*|lib/ckeditor4/.*|cgi-bin/*.|wiki/*.|en/wiki/*.|google53bafd5cff611af3\.html|script/plugins/*.|awstats/*.|blackout/*.|sandbox/*.)
RewriteCond $1 !^(index\.php|script/merge\.php|script/*.|robots\.txt|favicon\.ico|sitemap\.xml|i/.*|tmp/.*|upl/.*|lib/ckeditor4/.*|cgi-bin/*.|wiki/*.|en/wiki/*.|google53bafd5cff611af3\.html|script/plugins/*.|awstats/*.|blackout/*.|sandbox/*.|backend/*.)
RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]
# Gzip static

0
cgi-bin/CleanImages.php → backend/CleanImages.php Executable file → Normal file
View File

0
cgi-bin/addDonate.php → backend/addDonate.php Executable file → Normal file
View File

View File

View File

0
cgi-bin/loadGraph.php → backend/loadGraph.php Executable file → Normal file
View File

0
cgi-bin/saveGraph.php → backend/saveGraph.php Executable file → Normal file
View File

View File

0
cgi-bin/saveImage.php → backend/saveImage.php Executable file → Normal file
View File

0
cgi-bin/sendEmail.php → backend/sendEmail.php Executable file → Normal file
View File

0
cgi-bin/vote.php → backend/vote.php Executable file → Normal file
View File

View File

@ -93,5 +93,5 @@
$g_config['vote'] = "./tmp/vote/vote.txt";
$g_config['voteTopics'] = "./tmp/vote/voteTopics.txt_";
$g_config['use_js_cache'] = true;
$g_config['engine_version'] = 86;
$g_config['engine_version'] = 87;
?>

View File

@ -69,7 +69,7 @@ NeedAlgorithm.prototype.result = function(resultCallback)
console.log("Vote" + this["voteIndex"]);
$.ajax({
type: "GET",
url: "/" + SiteDir + "cgi-bin/vote.php?index=" + this["voteIndex"],
url: "/" + SiteDir + "backend/vote.php?index=" + this["voteIndex"],
dataType: "text"
});
$("#voteDialog").dialog('close');

View File

@ -1,4 +1,4 @@
moduleLoader.beginCacheLoading(["/script/entities/graph/api/index.js?v=86","/script/shared/point.js?v=86","/script/entities/edge/api/index.js?v=86","/script/entities/edge/model/BaseEdge.js?v=86","/script/entities/edge/model/EdgeModel.js?v=86","/script/entities/vertex/api/index.js?v=86","/script/entities/vertex/model/BaseVertex.js?v=86","/script/entities/vertex/model/VertexModel.js?v=86","/script/entities/graph/model/Graph.js?v=86",]);{let modulDir="pages/create_graph_by_edge_list/";doInclude([include("entities/graph/api/index.js")]);}
moduleLoader.beginCacheLoading(["/script/entities/graph/api/index.js?v=87","/script/shared/point.js?v=87","/script/entities/edge/api/index.js?v=87","/script/entities/edge/model/BaseEdge.js?v=87","/script/entities/edge/model/EdgeModel.js?v=87","/script/entities/vertex/api/index.js?v=87","/script/entities/vertex/model/BaseVertex.js?v=87","/script/entities/vertex/model/VertexModel.js?v=87","/script/entities/graph/model/Graph.js?v=87",]);{let modulDir="pages/create_graph_by_edge_list/";doInclude([include("entities/graph/api/index.js")]);}
{let modulDir="entities/graph/";doInclude([include("shared/point.js"),include("entities/edge/api/index.js"),include("entities/vertex/api/index.js"),include("model/Graph.js",modulDir)])}function Point(x,y){this.x=x||0;this.y=y||0;};Point.prototype.x=null;Point.prototype.y=null;Point.prototype.add=function(v){return new Point(this.x+v.x,this.y+v.y);};Point.prototype.addValue=function(v){return new Point(this.x+v,this.y+v);};Point.prototype.clone=function(){return new Point(this.x,this.y);};Point.prototype.degreesTo=function(v){var dx=this.x-v.x;var dy=this.y-v.y;var angle=Math.atan2(dy,dx);return angle*(180/Math.PI);};Point.prototype.distance=function(v){return Math.sqrt(this.distanceSqr(v));};Point.prototype.distanceSqr=function(v){var x=this.x-v.x;var y=this.y-v.y;return x*x+y*y;};Point.prototype.equals=function(toCompare){return this.x==toCompare.x&&this.y==toCompare.y;};Point.prototype.interpolate=function(v,f){return new Point((this.x+v.x)*f,(this.y+v.y)*f);};Point.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y);};Point.prototype.normalize=function(thickness){var l=this.length();this.x=this.x/l*thickness;this.y=this.y/l*thickness;return new Point(this.x,this.y);};Point.prototype.normalizeCopy=function(thickness){var l=this.length();return new Point(this.x/l*thickness,this.y/l*thickness);};Point.prototype.orbit=function(origin,arcWidth,arcHeight,degrees){var radians=degrees*(Math.PI/180);this.x=origin.x+arcWidth*Math.cos(radians);this.y=origin.y+arcHeight*Math.sin(radians);};Point.prototype.rotate=function(center,degrees){var radians=degrees*(Math.PI/180);offset=this.subtract(center);this.x=offset.x*Math.cos(radians)-offset.y*Math.sin(radians);this.y=offset.x*Math.sin(radians)+offset.y*Math.cos(radians);this.x=this.x+center.x;this.y=this.y+center.y;return this;};Point.prototype.offset=function(dx,dy){this.x+=dx;this.y+=dy;};Point.prototype.subtract=function(v){return new Point(this.x-v.x,this.y-v.y);};Point.prototype.subtractValue=function(value){return new Point(this.x-value,this.y-value);};Point.prototype.multiply=function(value){return new Point(this.x*value,this.y*value);};Point.prototype.toString=function(){return"(x="+this.x+", y="+this.y+")";};Point.prototype.normal=function(){return new Point(-this.y,this.x);};Point.prototype.min=function(point)
{return new Point(Math.min(this.x,point.x),Math.min(this.y,point.y));};Point.prototype.max=function(point)
{return new Point(Math.max(this.x,point.x),Math.max(this.y,point.y));};Point.prototype.inverse=function()

View File

@ -1,4 +1,4 @@
moduleLoader.beginCacheLoading(["/script/entities/graph/api/index.js?v=86","/script/shared/point.js?v=86","/script/entities/edge/api/index.js?v=86","/script/entities/edge/model/BaseEdge.js?v=86","/script/entities/edge/model/EdgeModel.js?v=86","/script/entities/vertex/api/index.js?v=86","/script/entities/vertex/model/BaseVertex.js?v=86","/script/entities/vertex/model/VertexModel.js?v=86","/script/entities/graph/model/Graph.js?v=86",]);{let modulDir="pages/create_graph_by_matrix/";doInclude([include("entities/graph/api/index.js")]);}
moduleLoader.beginCacheLoading(["/script/entities/graph/api/index.js?v=87","/script/shared/point.js?v=87","/script/entities/edge/api/index.js?v=87","/script/entities/edge/model/BaseEdge.js?v=87","/script/entities/edge/model/EdgeModel.js?v=87","/script/entities/vertex/api/index.js?v=87","/script/entities/vertex/model/BaseVertex.js?v=87","/script/entities/vertex/model/VertexModel.js?v=87","/script/entities/graph/model/Graph.js?v=87",]);{let modulDir="pages/create_graph_by_matrix/";doInclude([include("entities/graph/api/index.js")]);}
{let modulDir="entities/graph/";doInclude([include("shared/point.js"),include("entities/edge/api/index.js"),include("entities/vertex/api/index.js"),include("model/Graph.js",modulDir)])}function Point(x,y){this.x=x||0;this.y=y||0;};Point.prototype.x=null;Point.prototype.y=null;Point.prototype.add=function(v){return new Point(this.x+v.x,this.y+v.y);};Point.prototype.addValue=function(v){return new Point(this.x+v,this.y+v);};Point.prototype.clone=function(){return new Point(this.x,this.y);};Point.prototype.degreesTo=function(v){var dx=this.x-v.x;var dy=this.y-v.y;var angle=Math.atan2(dy,dx);return angle*(180/Math.PI);};Point.prototype.distance=function(v){return Math.sqrt(this.distanceSqr(v));};Point.prototype.distanceSqr=function(v){var x=this.x-v.x;var y=this.y-v.y;return x*x+y*y;};Point.prototype.equals=function(toCompare){return this.x==toCompare.x&&this.y==toCompare.y;};Point.prototype.interpolate=function(v,f){return new Point((this.x+v.x)*f,(this.y+v.y)*f);};Point.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y);};Point.prototype.normalize=function(thickness){var l=this.length();this.x=this.x/l*thickness;this.y=this.y/l*thickness;return new Point(this.x,this.y);};Point.prototype.normalizeCopy=function(thickness){var l=this.length();return new Point(this.x/l*thickness,this.y/l*thickness);};Point.prototype.orbit=function(origin,arcWidth,arcHeight,degrees){var radians=degrees*(Math.PI/180);this.x=origin.x+arcWidth*Math.cos(radians);this.y=origin.y+arcHeight*Math.sin(radians);};Point.prototype.rotate=function(center,degrees){var radians=degrees*(Math.PI/180);offset=this.subtract(center);this.x=offset.x*Math.cos(radians)-offset.y*Math.sin(radians);this.y=offset.x*Math.sin(radians)+offset.y*Math.cos(radians);this.x=this.x+center.x;this.y=this.y+center.y;return this;};Point.prototype.offset=function(dx,dy){this.x+=dx;this.y+=dy;};Point.prototype.subtract=function(v){return new Point(this.x-v.x,this.y-v.y);};Point.prototype.subtractValue=function(value){return new Point(this.x-value,this.y-value);};Point.prototype.multiply=function(value){return new Point(this.x*value,this.y*value);};Point.prototype.toString=function(){return"(x="+this.x+", y="+this.y+")";};Point.prototype.normal=function(){return new Point(-this.y,this.x);};Point.prototype.min=function(point)
{return new Point(Math.min(this.x,point.x),Math.min(this.y,point.y));};Point.prototype.max=function(point)
{return new Point(Math.max(this.x,point.x),Math.max(this.y,point.y));};Point.prototype.inverse=function()

View File

@ -1,4 +1,4 @@
moduleLoader.beginCacheLoading(["/script/entities/graph/api/index.js?v=86","/script/shared/point.js?v=86","/script/entities/edge/api/index.js?v=86","/script/entities/edge/model/BaseEdge.js?v=86","/script/entities/edge/model/EdgeModel.js?v=86","/script/entities/vertex/api/index.js?v=86","/script/entities/vertex/model/BaseVertex.js?v=86","/script/entities/vertex/model/VertexModel.js?v=86","/script/entities/graph/model/Graph.js?v=86","/script/pages/create_graph_by_matrix/model/createByMatrixMain.js?v=86","/script/pages/create_graph_by_matrix/model/main.js?v=86",]);{let modulDir="pages/create_graph_by_matrix/";doInclude([include("entities/graph/api/index.js"),include("model/createByMatrixMain.js",modulDir),include("model/main.js",modulDir)]);}
moduleLoader.beginCacheLoading(["/script/entities/graph/api/index.js?v=87","/script/shared/point.js?v=87","/script/entities/edge/api/index.js?v=87","/script/entities/edge/model/BaseEdge.js?v=87","/script/entities/edge/model/EdgeModel.js?v=87","/script/entities/vertex/api/index.js?v=87","/script/entities/vertex/model/BaseVertex.js?v=87","/script/entities/vertex/model/VertexModel.js?v=87","/script/entities/graph/model/Graph.js?v=87","/script/pages/create_graph_by_matrix/model/createByMatrixMain.js?v=87","/script/pages/create_graph_by_matrix/model/main.js?v=87",]);{let modulDir="pages/create_graph_by_matrix/";doInclude([include("entities/graph/api/index.js"),include("model/createByMatrixMain.js",modulDir),include("model/main.js",modulDir)]);}
{let modulDir="entities/graph/";doInclude([include("shared/point.js"),include("entities/edge/api/index.js"),include("entities/vertex/api/index.js"),include("model/Graph.js",modulDir)])}function Point(x,y){this.x=x||0;this.y=y||0;};Point.prototype.x=null;Point.prototype.y=null;Point.prototype.add=function(v){return new Point(this.x+v.x,this.y+v.y);};Point.prototype.addValue=function(v){return new Point(this.x+v,this.y+v);};Point.prototype.clone=function(){return new Point(this.x,this.y);};Point.prototype.degreesTo=function(v){var dx=this.x-v.x;var dy=this.y-v.y;var angle=Math.atan2(dy,dx);return angle*(180/Math.PI);};Point.prototype.distance=function(v){return Math.sqrt(this.distanceSqr(v));};Point.prototype.distanceSqr=function(v){var x=this.x-v.x;var y=this.y-v.y;return x*x+y*y;};Point.prototype.equals=function(toCompare){return this.x==toCompare.x&&this.y==toCompare.y;};Point.prototype.interpolate=function(v,f){return new Point((this.x+v.x)*f,(this.y+v.y)*f);};Point.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y);};Point.prototype.normalize=function(thickness){var l=this.length();this.x=this.x/l*thickness;this.y=this.y/l*thickness;return new Point(this.x,this.y);};Point.prototype.normalizeCopy=function(thickness){var l=this.length();return new Point(this.x/l*thickness,this.y/l*thickness);};Point.prototype.orbit=function(origin,arcWidth,arcHeight,degrees){var radians=degrees*(Math.PI/180);this.x=origin.x+arcWidth*Math.cos(radians);this.y=origin.y+arcHeight*Math.sin(radians);};Point.prototype.rotate=function(center,degrees){var radians=degrees*(Math.PI/180);offset=this.subtract(center);this.x=offset.x*Math.cos(radians)-offset.y*Math.sin(radians);this.y=offset.x*Math.sin(radians)+offset.y*Math.cos(radians);this.x=this.x+center.x;this.y=this.y+center.y;return this;};Point.prototype.offset=function(dx,dy){this.x+=dx;this.y+=dy;};Point.prototype.subtract=function(v){return new Point(this.x-v.x,this.y-v.y);};Point.prototype.subtractValue=function(value){return new Point(this.x-value,this.y-value);};Point.prototype.multiply=function(value){return new Point(this.x*value,this.y*value);};Point.prototype.toString=function(){return"(x="+this.x+", y="+this.y+")";};Point.prototype.normal=function(){return new Point(-this.y,this.x);};Point.prototype.min=function(point)
{return new Point(Math.min(this.x,point.x),Math.min(this.y,point.y));};Point.prototype.max=function(point)
{return new Point(Math.max(this.x,point.x),Math.max(this.y,point.y));};Point.prototype.inverse=function()

View File

@ -1,4 +1,4 @@
moduleLoader.beginCacheLoading(["/script/shared/utils.js?v=86","/script/entities/graph/api/index.js?v=86","/script/shared/point.js?v=86","/script/entities/edge/api/index.js?v=86","/script/entities/edge/model/BaseEdge.js?v=86","/script/entities/edge/model/EdgeModel.js?v=86","/script/entities/vertex/api/index.js?v=86","/script/entities/vertex/model/BaseVertex.js?v=86","/script/entities/vertex/model/VertexModel.js?v=86","/script/entities/graph/model/Graph.js?v=86","/script/features/draw_graph/api/index.js?v=86","/script/features/draw_graph/model/BaseBackgroundDrawer.js?v=86","/script/features/draw_graph/model/EdgeStyle.js?v=86","/script/features/draw_graph/model/BaseEdgeDrawer.js?v=86","/script/features/draw_graph/model/VertexShape.js?v=86","/script/features/draw_graph/model/VertexStyle.js?v=86","/script/features/draw_graph/model/BaseVertexDrawer.js?v=86","/script/features/algorithms/api/index.js?v=86","/script/features/algorithms/model/Algorithms.js?v=86","/script/features/algorithms/model/BaseTraversal.js?v=86","/script/features/base_handler/index.js?v=86","/script/features/default_handler/index.js?v=86","/script/features/add_vertices_handler/index.js?v=86","/script/features/connect_vertices_handler/index.js?v=86","/script/features/delete_objects_handler/index.js?v=86","/script/features/algorithm_handler/index.js?v=86","/script/features/serialization/api/index.js?v=86","/script/features/serialization/model/GraphMLCreator.js?v=86","/script/features/enum_vertices/EnumVertices.js?v=86","/script/pages/editor/model/texts.js?v=86","/script/pages/editor/model/UndoStack.js?v=86","/script/pages/editor/model/DiskSaveLoad.js?v=86","/script/pages/editor/model/Application.js?v=86","/script/pages/editor/ui/ya_metrika.js?v=86","/script/pages/editor/ui/editor.js?v=86","/script/pages/editor/ui/main.js?v=86",]);{function onloadEditor(){console.log("onload() call");doIncludeAsync([include("shared/canvas2svg.js"),include("features/group_rename_handler/index.js"),include("features/saved_graph_handler/index.js"),include("features/saved_graph_image_handler/index.js"),include("features/show_adjacency_matrix/index.js"),include("features/show_distance_matrix/index.js"),include("features/show_incidence_matrix/index.js"),include("features/setup_background_style/index.js"),include("features/setup_edge_style/index.js"),include("features/setup_vertex_style/index.js"),]);postLoadPage();}
moduleLoader.beginCacheLoading(["/script/shared/utils.js?v=87","/script/entities/graph/api/index.js?v=87","/script/shared/point.js?v=87","/script/entities/edge/api/index.js?v=87","/script/entities/edge/model/BaseEdge.js?v=87","/script/entities/edge/model/EdgeModel.js?v=87","/script/entities/vertex/api/index.js?v=87","/script/entities/vertex/model/BaseVertex.js?v=87","/script/entities/vertex/model/VertexModel.js?v=87","/script/entities/graph/model/Graph.js?v=87","/script/features/draw_graph/api/index.js?v=87","/script/features/draw_graph/model/BaseBackgroundDrawer.js?v=87","/script/features/draw_graph/model/EdgeStyle.js?v=87","/script/features/draw_graph/model/BaseEdgeDrawer.js?v=87","/script/features/draw_graph/model/VertexShape.js?v=87","/script/features/draw_graph/model/VertexStyle.js?v=87","/script/features/draw_graph/model/BaseVertexDrawer.js?v=87","/script/features/algorithms/api/index.js?v=87","/script/features/algorithms/model/Algorithms.js?v=87","/script/features/algorithms/model/BaseTraversal.js?v=87","/script/features/base_handler/index.js?v=87","/script/features/default_handler/index.js?v=87","/script/features/add_vertices_handler/index.js?v=87","/script/features/connect_vertices_handler/index.js?v=87","/script/features/delete_objects_handler/index.js?v=87","/script/features/algorithm_handler/index.js?v=87","/script/features/serialization/api/index.js?v=87","/script/features/serialization/model/GraphMLCreator.js?v=87","/script/features/enum_vertices/EnumVertices.js?v=87","/script/pages/editor/model/texts.js?v=87","/script/pages/editor/model/UndoStack.js?v=87","/script/pages/editor/model/DiskSaveLoad.js?v=87","/script/pages/editor/model/Application.js?v=87","/script/pages/editor/ui/ya_metrika.js?v=87","/script/pages/editor/ui/editor.js?v=87","/script/pages/editor/ui/main.js?v=87",]);{function onloadEditor(){console.log("onload() call");doIncludeAsync([include("shared/canvas2svg.js"),include("features/group_rename_handler/index.js"),include("features/saved_graph_handler/index.js"),include("features/saved_graph_image_handler/index.js"),include("features/show_adjacency_matrix/index.js"),include("features/show_distance_matrix/index.js"),include("features/show_incidence_matrix/index.js"),include("features/setup_background_style/index.js"),include("features/setup_edge_style/index.js"),include("features/setup_vertex_style/index.js"),]);postLoadPage();}
let modulDir="pages/editor/";doInclude([include("shared/utils.js"),include("entities/graph/api/index.js"),include("features/draw_graph/api/index.js"),include("features/algorithms/api/index.js"),include("features/base_handler/index.js"),include("features/default_handler/index.js"),include("features/add_vertices_handler/index.js"),include("features/connect_vertices_handler/index.js"),include("features/delete_objects_handler/index.js"),include("features/algorithm_handler/index.js"),include("features/serialization/api/index.js"),include("features/enum_vertices/EnumVertices.js"),include("model/texts.js",modulDir),include("model/UndoStack.js",modulDir),include("model/DiskSaveLoad.js",modulDir),include("model/Application.js",modulDir),include("ui/ya_metrika.js",modulDir),include("ui/editor.js",modulDir),include("ui/main.js",modulDir)],onloadEditor);}
function gEncodeToHTML(str)
{if(typeof str!=='string')
@ -1364,13 +1364,13 @@ UndoStack.prototype.ClearUndoStack=function()
UndoStack.prototype.IsUndoStackEmpty=function()
{return(this.undoStack.length<=0);}
var DiskSaveLoad=function(){};DiskSaveLoad.LoadGraphFromDisk=function(graphName,callback)
{$.ajax({type:"GET",url:"/"+SiteDir+"cgi-bin/loadGraph.php?name="+graphName}).done(callback);}
{$.ajax({type:"GET",url:"/"+SiteDir+"backend/loadGraph.php?name="+graphName}).done(callback);}
DiskSaveLoad.SaveSVGGraphOnDisk=function(imageName,svgText,callback)
{$.ajax({type:"POST",url:"/"+SiteDir+"cgi-bin/saveSvg.php?name="+imageName,data:{svgdata:svgText},dataType:"text",success:callback});return imageName;}
{$.ajax({type:"POST",url:"/"+SiteDir+"backend/saveSvg.php?name="+imageName,data:{svgdata:svgText},dataType:"text",success:callback});return imageName;}
DiskSaveLoad.SaveGraphOnDisk=function(savedGraphName,graphAsString,callback)
{$.ajax({type:"POST",url:"/"+SiteDir+"cgi-bin/saveGraph.php?name="+savedGraphName,data:graphAsString,dataType:"text"}).done(callback);}
{$.ajax({type:"POST",url:"/"+SiteDir+"backend/saveGraph.php?name="+savedGraphName,data:graphAsString,dataType:"text"}).done(callback);}
DiskSaveLoad.SaveGraphImageOnDisk=function(imageName,rectParams,imageBase64Data,callback)
{$.ajax({type:"POST",url:"/"+SiteDir+"cgi-bin/saveImage.php?name="+imageName+rectParams,data:{base64data:imageBase64Data},dataType:"text",success:callback});}
{$.ajax({type:"POST",url:"/"+SiteDir+"backend/saveImage.php?name="+imageName+rectParams,data:{base64data:imageBase64Data},dataType:"text",success:callback});}
var globalApplication=null;function Application(document,window,listener)
{this.document=document;this.listener=listener;this.canvas=this.document.getElementById('canvas');this.handler=new DefaultHandler(this);this.savedGraphName="";this.currentEnumVerticesType=new BaseEnumVertices(this,1);this.findPathReport=1;this.isTimerRender=false;globalApplication=this;this.renderPath=[];this.renderTimer=0;this.renderPathLength=0;this.renderPathCounter=0;this.renderPathLoops=0;this.enumVerticesTextList=[new BaseEnumVertices(this,1),new BaseEnumVertices(this,0),new TextEnumVertices(this),new TextEnumVerticesCyr(this),new TextEnumVerticesGreek(this),new TextEnumVerticesCustom(this)];this.SetDefaultTransformations();this.algorithmsValues={};this.undoStack=new UndoStack(this.maxUndoStackSize);this.edgeCommonStyle=new CommonEdgeStyle();this.isEdgeCommonStyleCustom=false;this.edgeSelectedStyles=FullArrayCopy(DefaultSelectedEdgeStyles);this.isEdgeSelectedStylesCustom=false;this.edgePrintCommonStyle=new CommonPrintEdgeStyle();this.edgePrintSelectedStyles=FullArrayCopy(DefaultPrintSelectedEdgeStyles);this.vertexCommonStyle=new CommonVertexStyle();this.isVertexCommonStyleCustom=false;this.vertexSelectedVertexStyles=FullArrayCopy(DefaultSelectedGraphStyles);this.isVertexSelectedVertexStylesCustom=false;this.vertexPrintCommonStyle=new CommonPrintVertexStyle();this.vertexPrintSelectedVertexStyles=FullArrayCopy(DefaultPrintSelectedGraphStyles);this.backgroundCommonStyle=new CommonBackgroundStyle();this.backgroundPrintStyle=new PrintBackgroundStyle();this.isBackgroundCommonStyleCustom=false;this.renderPathWithEdges=false;this.edgePresets=[1,3,5,7,11,42];this.maxEdgePresets=6;this.selectionRect=null;this.defaultVertexSize=null;this.defaultEdgeWidth=null;this.processEmscriptenFunction=null;this.defaultEdge=null;this.useDefaultEdge=false;};Application.prototype.graph=new Graph();Application.prototype.dragObject=-1;Application.prototype.handler=null;Application.prototype.status={};Application.prototype.graphNameLength=16;Application.prototype.maxUndoStackSize=8;Application.prototype.getMousePos=function(canvas,e)
{var rect=canvas.getBoundingClientRect();return{x:(e.clientX-rect.left)/this.canvasScale-this.canvasPosition.x,y:(e.clientY-rect.top)/this.canvasScale-this.canvasPosition.y};}
@ -1580,11 +1580,11 @@ Application.prototype.SetAdjacencyMatrix=function(matrix,separator)
{if(separator===undefined)
{separator=",";}
var res=true;var r={};var c={};if(!this.TestAdjacencyMatrix(matrix,r,c,separator))
{$.get("/"+SiteDir+"cgi-bin/addFailedMatrix.php?text=adjacency&matrix="+encodeURIComponent(matrix),function(data){;});res=false;}
{$.get("/"+SiteDir+"backend/addFailedMatrix.php?text=adjacency&matrix="+encodeURIComponent(matrix),function(data){;});res=false;}
this.graph.SetAdjacencyMatrix(matrix,new Point(this.GetRealWidth(),this.GetRealHeight()),this.currentEnumVerticesType,separator);this.AutoAdjustViewport();this.redrawGraph();return res;}
Application.prototype.SetPair=function(pair)
{var res=true;var r={};var c={};if(!this.TestPair(pair))
{$.get("/"+SiteDir+"cgi-bin/addFailedMatrix.php?text=pair&matrix="+encodeURIComponent(pair),function(data){;});res=false;}
{$.get("/"+SiteDir+"backend/addFailedMatrix.php?text=pair&matrix="+encodeURIComponent(pair),function(data){;});res=false;}
this.graph.SetPair(pair,new Point(this.GetRealWidth(),this.GetRealHeight()),this.currentEnumVerticesType);this.AutoAdjustViewport();this.redrawGraph();return res;}
Application.prototype.GetIncidenceMatrix=function()
{return this.graph.GetIncidenceMatrix();}
@ -1594,7 +1594,7 @@ Application.prototype.TestPair=function(pair)
{return this.graph.TestPair(pair);}
Application.prototype.SetIncidenceMatrix=function(matrix)
{var res=true;var r={};var c={};if(!this.TestIncidenceMatrix(matrix,r,c))
{$.get("/"+SiteDir+"cgi-bin/addFailedMatrix.php?text=incidence&matrix="+encodeURIComponent(matrix),function(data){;});res=false;}
{$.get("/"+SiteDir+"backend/addFailedMatrix.php?text=incidence&matrix="+encodeURIComponent(matrix),function(data){;});res=false;}
this.graph.SetIncidenceMatrix(matrix,new Point(this.GetRealWidth(),this.GetRealHeight()),this.currentEnumVerticesType);this.AutoAdjustViewport();this.redrawGraph();return res;}
Application.prototype.Test=function()
{this.graph.VerticesReposition(new Point(this.GetRealWidth(),this.GetRealHeight()),this.graph.vertices);this.redrawGraph();}
@ -1983,7 +1983,7 @@ Editor.prototype.initVoteButton=function()
document.getElementById('VoteButton').onclick=function()
{var dialogButtons={};for(var i=0;i<6&&document.getElementById('vote'+i)!==null;i++)
{document.getElementById('vote'+i)["voteIndex"]=i;document.getElementById('vote'+i).onclick=function()
{console.log("Vote"+self["voteIndex"]);$.ajax({type:"GET",url:"/"+SiteDir+"cgi-bin/vote.php?index="+self["voteIndex"],dataType:"text"});$("#voteDialog").dialog('close');$("#VoteButton").hide();}}
{console.log("Vote"+self["voteIndex"]);$.ajax({type:"GET",url:"/"+SiteDir+"backend/vote.php?index="+self["voteIndex"],dataType:"text"});$("#voteDialog").dialog('close');$("#VoteButton").hide();}}
dialogButtons[g_close]=function(){$(self).dialog("close");};$("#voteDialog").dialog({resizable:false,title:g_vote,width:400,modal:true,dialogClass:'EdgeDialog',buttons:dialogButtons,});}}
Editor.prototype.initAlgorithmList=function()
{$(function(){$('#algorithmList').on('click',function(event){if(!event.originalEvent.closeThisMenu){event.stopPropagation();}});$(window).on('click',function(){$('#algorithmList').slideUp();});});let showHideCategory=function(button,elementsListName){let width=$(button).width();let elementsList=$(elementsListName);var hideMark=button.querySelector('span[name="hideMark"]')

View File

@ -843,7 +843,7 @@ Application.prototype.SetAdjacencyMatrix = function (matrix, separator)
var c = {};
if (!this.TestAdjacencyMatrix(matrix, r, c, separator))
{
$.get( "/" + SiteDir + "cgi-bin/addFailedMatrix.php?text=adjacency&matrix=" + encodeURIComponent(matrix), function( data ) {;});
$.get( "/" + SiteDir + "backend/addFailedMatrix.php?text=adjacency&matrix=" + encodeURIComponent(matrix), function( data ) {;});
res = false;
}
@ -860,7 +860,7 @@ Application.prototype.SetPair = function (pair)
var c = {};
if (!this.TestPair(pair))
{
$.get( "/" + SiteDir + "cgi-bin/addFailedMatrix.php?text=pair&matrix=" + encodeURIComponent(pair), function( data ) {;});
$.get( "/" + SiteDir + "backend/addFailedMatrix.php?text=pair&matrix=" + encodeURIComponent(pair), function( data ) {;});
res = false;
}
@ -892,7 +892,7 @@ Application.prototype.SetIncidenceMatrix = function (matrix)
var c = {};
if (!this.TestIncidenceMatrix(matrix, r, c))
{
$.get( "/" + SiteDir + "cgi-bin/addFailedMatrix.php?text=incidence&matrix=" + encodeURIComponent(matrix), function( data ) {;});
$.get( "/" + SiteDir + "backend/addFailedMatrix.php?text=incidence&matrix=" + encodeURIComponent(matrix), function( data ) {;});
res = false;
}

View File

@ -7,7 +7,7 @@ DiskSaveLoad.LoadGraphFromDisk = function (graphName, callback)
{
$.ajax({
type: "GET",
url: "/" + SiteDir + "cgi-bin/loadGraph.php?name=" + graphName
url: "/" + SiteDir + "backend/loadGraph.php?name=" + graphName
})
.done(callback);
}
@ -16,7 +16,7 @@ DiskSaveLoad.SaveSVGGraphOnDisk = function (imageName, svgText, callback)
{
$.ajax({
type: "POST",
url: "/" + SiteDir + "cgi-bin/saveSvg.php?name=" + imageName,
url: "/" + SiteDir + "backend/saveSvg.php?name=" + imageName,
data: {
svgdata : svgText
},
@ -31,7 +31,7 @@ DiskSaveLoad.SaveGraphOnDisk = function (savedGraphName, graphAsString, callback
{
$.ajax({
type: "POST",
url: "/" + SiteDir + "cgi-bin/saveGraph.php?name=" + savedGraphName,
url: "/" + SiteDir + "backend/saveGraph.php?name=" + savedGraphName,
data: graphAsString,
dataType: "text"
})
@ -42,7 +42,7 @@ DiskSaveLoad.SaveGraphImageOnDisk = function (imageName, rectParams, imageBase64
{
$.ajax({
type: "POST",
url: "/" + SiteDir + "cgi-bin/saveImage.php?name=" + imageName + rectParams,
url: "/" + SiteDir + "backend/saveImage.php?name=" + imageName + rectParams,
data: {
base64data : imageBase64Data
},

View File

@ -503,7 +503,7 @@ Editor.prototype.initVoteButton = function()
console.log("Vote" + self["voteIndex"]);
$.ajax({
type: "GET",
url: "/" + SiteDir + "cgi-bin/vote.php?index=" + self["voteIndex"],
url: "/" + SiteDir + "backend/vote.php?index=" + self["voteIndex"],
dataType: "text"
});
$("#voteDialog").dialog('close');

View File

@ -1,6 +1,6 @@
<?php
include ("cgi-bin/saveGraphHelpers.php");
include ("backend/saveGraphHelpers.php");
include ("./src/graphs_examples_func.php");
//ini_set('display_errors', 1);

View File

@ -1,6 +1,6 @@
<?php
include ("cgi-bin/saveGraphHelpers.php");
include ("backend/saveGraphHelpers.php");
include ("./src/vote_func.php");
$g_lang["current_language"] = "ru";

View File

@ -1,6 +1,6 @@
<?php
include ("cgi-bin/saveGraphHelpers.php");
include ("backend/saveGraphHelpers.php");
?>
<h1><?= L('head_no_tags')?></h1>
<p><?= L('text')?></p>