diff --git a/.htaccess b/.htaccess index 639348a..dbf1545 100755 --- a/.htaccess +++ b/.htaccess @@ -1,5 +1,5 @@ -Options +ExecCGI -AddHandler AddType application/x-httpd-php .exe +#Options +ExecCGI +#AddHandler AddType application/x-httpd-php .exe Options -Indexes RewriteEngine on diff --git a/cgi-bin/loadGraph.php b/cgi-bin/loadGraph.php index 467fe95..561ff8b 100755 --- a/cgi-bin/loadGraph.php +++ b/cgi-bin/loadGraph.php @@ -1,4 +1,5 @@ diff --git a/core/config/main.php b/core/config/main.php index 3e10294..1246c53 100755 --- a/core/config/main.php +++ b/core/config/main.php @@ -79,4 +79,6 @@ // Donate files $g_config['donateTotal'] = "./tmp/donate/total.txt"; $g_config['donateTransactions'] = "./tmp/donate/transactions.txt"; + $g_config['vote'] = "./tmp/vote/vote.txt"; + $g_config['voteTopics'] = "./tmp/vote/voteTopics.txt_"; ?> diff --git a/core/config/page_editor.php b/core/config/page_editor.php index c63386c..012615e 100755 --- a/core/config/page_editor.php +++ b/core/config/page_editor.php @@ -44,7 +44,8 @@ array('link' => SiteRoot('admin/page_editor'), 'name' => 'Все страницы', 'label' => 'Смотреть все страницы'), array('link' => SiteRoot('admin/page_editor_add'), 'name' => 'Добавить', 'label' => 'Добавить новую страницу'), array('link' => SiteRoot('admin/page_saved_graph'), 'name' => 'Статистика', 'label' => 'Статистика сохранений'), - array('link' => SiteRoot('admin/page_example_graph'), 'name' => 'Примеры', 'label' => 'Примеры графов') + array('link' => SiteRoot('admin/page_example_graph'), 'name' => 'Примеры', 'label' => 'Примеры графов'), + array('link' => SiteRoot('admin/page_vote'), 'name' => 'Голосование', 'label' => 'Результаты голосования') ) ); diff --git a/lang/en/home.php b/lang/en/home.php index e46587d..5fe80df 100755 --- a/lang/en/home.php +++ b/lang/en/home.php @@ -100,4 +100,6 @@ $g_lang["group_rename"] = "Group rename"; $g_lang["enter_vertices_text_in_each_line"] = "Enter text for each vertex in separate line"; $g_lang["or"] = "or"; + $g_lang["vote"] = "Vote"; + $g_lang["vote_question"] = "What functions should we add firstly?"; ?> diff --git a/lang/ru/home.php b/lang/ru/home.php index 5f7e78e..ae5de02 100755 --- a/lang/ru/home.php +++ b/lang/ru/home.php @@ -104,5 +104,7 @@ $g_lang["group_rename"] = "Групповое переименование"; $g_lang["enter_vertices_text_in_each_line"] = "Введите текст для каждой вершины в отдельную строку"; $g_lang["or"] = "или"; - + $g_lang["vote"] = "Опрос"; + $g_lang["vote_question"] = "Какие функции нам добавить в первую очередь?"; + ?> diff --git a/script/main.js b/script/main.js index 22b8546..b089583 100644 --- a/script/main.js +++ b/script/main.js @@ -398,7 +398,40 @@ function postLoadPage() } } - + if (document.getElementById('VoteButton') !== null) + 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" + this["voteIndex"]); + $.ajax({ + type: "GET", + url: "/cgi-bin/vote.php?index=" + this["voteIndex"], + dataType: "text" + }); + $("#voteDialog").dialog('close'); + $("#VoteButton").hide(); + } + } + + dialogButtons[g_close] = function() { + $( this ).dialog( "close" ); + }; + + $( "#voteDialog" ).dialog({ + resizable: false, + title: g_vote, + width: 400, + modal: true, + dialogClass: 'EdgeDialog', + buttons: dialogButtons, + }); + } // Get algorithms list and load it. $.get( "/cgi-bin/getPluginsList.php", diff --git a/script/texts.js b/script/texts.js index 62e15dd..ce312e1 100644 --- a/script/texts.js +++ b/script/texts.js @@ -66,6 +66,7 @@ var g_editWeight = "Edit weight"; var g_noWeight = "No weight"; var g_groupRename = "Group rename"; +var g_vote = "Vote"; function loadTexts() { @@ -133,4 +134,5 @@ function loadTexts() g_noWeight = document.getElementById("noWeight").innerHTML; g_groupRename = document.getElementById("groupeRenameText").innerHTML; + g_vote = document.getElementById("voteText").innerHTML; } diff --git a/src/admin/page_vote.php b/src/admin/page_vote.php new file mode 100644 index 0000000..1fb69f4 --- /dev/null +++ b/src/admin/page_vote.php @@ -0,0 +1,15 @@ + \ No newline at end of file diff --git a/src/home.php b/src/home.php index b671366..9539ac0 100755 --- a/src/home.php +++ b/src/home.php @@ -1,6 +1,7 @@ diff --git a/src/vote_func.php b/src/vote_func.php new file mode 100644 index 0000000..f2ac930 --- /dev/null +++ b/src/vote_func.php @@ -0,0 +1,48 @@ + \ No newline at end of file diff --git a/tmp/auto_merge_css_js/css/.gitignore b/tmp/auto_merge_css_js/css/.gitignore new file mode 100644 index 0000000..9af511e --- /dev/null +++ b/tmp/auto_merge_css_js/css/.gitignore @@ -0,0 +1,6 @@ +*.css +*.css.gz +*.txt +**/*.css +**/*.css.gz +**/*.txt \ No newline at end of file diff --git a/tmp/saved/.gitignore b/tmp/saved/.gitignore new file mode 100644 index 0000000..fc8d619 --- /dev/null +++ b/tmp/saved/.gitignore @@ -0,0 +1,4 @@ +*.png +*.xml +**/*.png +**/*.xml \ No newline at end of file diff --git a/tmp/vote/vote.txt b/tmp/vote/vote.txt new file mode 100644 index 0000000..e69de29 diff --git a/tmp/vote/voteTopics.txt_en b/tmp/vote/voteTopics.txt_en new file mode 100644 index 0000000..88689f2 --- /dev/null +++ b/tmp/vote/voteTopics.txt_en @@ -0,0 +1,4 @@ +User account|Possibility to store graphs in your user account and other settings. +Improved visualization|The ability to change colors for vertexes and edges, as well as the shape and size of the vertexes. +Improving the support of large graphs|Make easy work with large graphs with the number of vertixes is more than 300. +More algorithms|Add more algorithms: maximum flow, minimum cut, radius, diameter, coloring graph. \ No newline at end of file diff --git a/tmp/vote/voteTopics.txt_ru b/tmp/vote/voteTopics.txt_ru new file mode 100644 index 0000000..2e59914 --- /dev/null +++ b/tmp/vote/voteTopics.txt_ru @@ -0,0 +1,4 @@ +Личный кабинет|Возможность сохранения графов в своём личном кабинете и другие персоональные настройки. +Улучшение визуализации|Возможность изменения цветов для вешин и дуг, а также формы и размеров вершин. +Улучшение поддержки больших графов|Удобная работа с графами больших размеров с количеством вершин больше 300. +Больше алгоритмов|Добавление большего числа алгоритмов: максимальный поток, минимальный разрез, радиус, диаметр, раскраска графа. \ No newline at end of file diff --git a/tpl/admin/admin_menu.php b/tpl/admin/admin_menu.php index be9f8a0..ca6015a 100755 --- a/tpl/admin/admin_menu.php +++ b/tpl/admin/admin_menu.php @@ -4,7 +4,7 @@ -