-
Notifications
You must be signed in to change notification settings - Fork 10
/
index.php
67 lines (57 loc) · 1.8 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
require_once("../../global/library.php");
use FormTools\Core;
use FormTools\Modules;
use FormTools\Modules\ExportManager\ExportGroups;
$module = Modules::initModulePage("admin");
$LANG = Core::$L;
$L = $module->getLangStrings();
$root_url = Core::getRootUrl();
$sortable_id = "export_group_list";
$success = true;
$message = "";
if (isset($request["add_export_group"])) {
list ($success, $message) = ExportGroups::addExportGroup($request, $L);
}
if (isset($request["delete"])) {
list ($success, $message) = ExportGroups::deleteExportGroup($request["delete"], $L);
}
if (isset($request["update"])) {
$request["sortable_id"] = $sortable_id;
list ($success, $message) = ExportGroups::reorderExportGroups($request, $L);
}
$export_groups = ExportGroups::getExportGroups();
$page_vars = array(
"g_success" => $success,
"g_message" => $message,
"export_groups" => $export_groups,
"sortable_id" => $sortable_id,
"js_files" => array("$root_url/global/scripts/sortable.js")
);
$page_vars["head_js"] =<<< EOF
var page_ns = {};
page_ns.dialog = $("<div></div>");
page_ns.delete_export_group = function(el) {
ft.create_dialog({
dialog: page_ns.dialog,
title: "{$LANG["phrase_please_confirm"]}",
content: "{$L["confirm_delete_export_group"]}",
popup_type: "warning",
buttons: [{
text: "{$LANG["word_yes"]}",
click: function() {
var export_group_id = $(el).closest(".row_group").find(".sr_order").val();
window.location = "index.php?delete=" + export_group_id;
}
},
{
text: "{$LANG["word_no"]}",
click: function() {
$(this).dialog("close");
}
}]
});
return false;
}
EOF;
$module->displayPage("templates/index.tpl", $page_vars);