diff --git a/.htaccess b/.htaccess index 1d82f16..c594286 100755 --- a/.htaccess +++ b/.htaccess @@ -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 diff --git a/cgi-bin/CleanImages.php b/backend/CleanImages.php old mode 100755 new mode 100644 similarity index 100% rename from cgi-bin/CleanImages.php rename to backend/CleanImages.php diff --git a/cgi-bin/addDonate.php b/backend/addDonate.php old mode 100755 new mode 100644 similarity index 100% rename from cgi-bin/addDonate.php rename to backend/addDonate.php diff --git a/cgi-bin/addFailedMatrix.php b/backend/addFailedMatrix.php old mode 100755 new mode 100644 similarity index 96% rename from cgi-bin/addFailedMatrix.php rename to backend/addFailedMatrix.php index 62212a0..3b2342a --- a/cgi-bin/addFailedMatrix.php +++ b/backend/addFailedMatrix.php @@ -1,10 +1,10 @@ - \ No newline at end of file diff --git a/cgi-bin/getPluginsList.php b/backend/getPluginsList.php old mode 100755 new mode 100644 similarity index 100% rename from cgi-bin/getPluginsList.php rename to backend/getPluginsList.php diff --git a/cgi-bin/loadGraph.php b/backend/loadGraph.php old mode 100755 new mode 100644 similarity index 94% rename from cgi-bin/loadGraph.php rename to backend/loadGraph.php index d004cc0..5491436 --- a/cgi-bin/loadGraph.php +++ b/backend/loadGraph.php @@ -1,14 +1,14 @@ - + diff --git a/cgi-bin/saveGraph.php b/backend/saveGraph.php old mode 100755 new mode 100644 similarity index 95% rename from cgi-bin/saveGraph.php rename to backend/saveGraph.php index 3b24875..a6dd211 --- a/cgi-bin/saveGraph.php +++ b/backend/saveGraph.php @@ -1,16 +1,16 @@ - + diff --git a/cgi-bin/saveGraphHelpers.php b/backend/saveGraphHelpers.php old mode 100755 new mode 100644 similarity index 100% rename from cgi-bin/saveGraphHelpers.php rename to backend/saveGraphHelpers.php diff --git a/cgi-bin/saveImage.php b/backend/saveImage.php old mode 100755 new mode 100644 similarity index 100% rename from cgi-bin/saveImage.php rename to backend/saveImage.php diff --git a/cgi-bin/saveSvg.php b/backend/saveSvg.php similarity index 100% rename from cgi-bin/saveSvg.php rename to backend/saveSvg.php diff --git a/cgi-bin/sendEmail.php b/backend/sendEmail.php old mode 100755 new mode 100644 similarity index 95% rename from cgi-bin/sendEmail.php rename to backend/sendEmail.php index 9e66a86..970de3b --- a/cgi-bin/sendEmail.php +++ b/backend/sendEmail.php @@ -1,21 +1,21 @@ - \ No newline at end of file diff --git a/cgi-bin/vote.php b/backend/vote.php old mode 100755 new mode 100644 similarity index 95% rename from cgi-bin/vote.php rename to backend/vote.php index 4c7246e..2dddd79 --- a/cgi-bin/vote.php +++ b/backend/vote.php @@ -1,15 +1,15 @@ - + diff --git a/core/config/main.php b/core/config/main.php index db0047c..c8208f5 100755 --- a/core/config/main.php +++ b/core/config/main.php @@ -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; ?> diff --git a/script/features/algorithms/model/plugins/disable/NeedAlgorithm.js b/script/features/algorithms/model/plugins/disable/NeedAlgorithm.js index 504e045..3c23cb3 100644 --- a/script/features/algorithms/model/plugins/disable/NeedAlgorithm.js +++ b/script/features/algorithms/model/plugins/disable/NeedAlgorithm.js @@ -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'); diff --git a/script/pages/create_graph_by_edge_list/api/index.js.cache b/script/pages/create_graph_by_edge_list/api/index.js.cache index 0f37960..5ee5484 100644 --- a/script/pages/create_graph_by_edge_list/api/index.js.cache +++ b/script/pages/create_graph_by_edge_list/api/index.js.cache @@ -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() diff --git a/script/pages/create_graph_by_incidence_matrix/api/index.js.cache b/script/pages/create_graph_by_incidence_matrix/api/index.js.cache index 9492733..daa2652 100644 --- a/script/pages/create_graph_by_incidence_matrix/api/index.js.cache +++ b/script/pages/create_graph_by_incidence_matrix/api/index.js.cache @@ -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() diff --git a/script/pages/create_graph_by_matrix/api/index.js.cache b/script/pages/create_graph_by_matrix/api/index.js.cache index d8f7039..f671a6b 100644 --- a/script/pages/create_graph_by_matrix/api/index.js.cache +++ b/script/pages/create_graph_by_matrix/api/index.js.cache @@ -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() diff --git a/script/pages/editor/api/index.js.cache b/script/pages/editor/api/index.js.cache index f836523..3beb836 100644 --- a/script/pages/editor/api/index.js.cache +++ b/script/pages/editor/api/index.js.cache @@ -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"]') diff --git a/script/pages/editor/model/Application.js b/script/pages/editor/model/Application.js index 6ccbe4d..ca45db0 100644 --- a/script/pages/editor/model/Application.js +++ b/script/pages/editor/model/Application.js @@ -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; } diff --git a/script/pages/editor/model/DiskSaveLoad.js b/script/pages/editor/model/DiskSaveLoad.js index 585240e..b56fba9 100644 --- a/script/pages/editor/model/DiskSaveLoad.js +++ b/script/pages/editor/model/DiskSaveLoad.js @@ -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 }, diff --git a/script/pages/editor/ui/editor.js b/script/pages/editor/ui/editor.js index cc22315..3baca45 100644 --- a/script/pages/editor/ui/editor.js +++ b/script/pages/editor/ui/editor.js @@ -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'); diff --git a/src/admin/page_example_graph.php b/src/admin/page_example_graph.php index 399792c..054b3fb 100755 --- a/src/admin/page_example_graph.php +++ b/src/admin/page_example_graph.php @@ -1,6 +1,6 @@