<?php require "../../../global/library.php"; ft_init_module_page(); require_once "../library.php"; $request = array_merge($_POST, $_GET); $export_group_type_id = "export_group_types"; $page = ft_load_module_field("export_manager", "page", "export_manager_tab", "main"); $export_group_id = ft_load_module_field("export_manager", "export_group_id", "export_manager_export_group_id", "export_group_id"); if (isset($request["add_export_type"])) { list($g_success, $g_message) = exp_add_export_type($request); } $php_self = ft_get_clean_php_self(); $tabs = array("main" => array("tab_label" => "Main", "tab_link" => "{$php_self}?page=main&export_group_id={$export_group_id}"), "permissions" => array("tab_label" => $LANG["word_permissions"], "tab_link" => "{$php_self}?page=permissions&export_group_id={$export_group_id}"), "export_types" => array("tab_label" => "Export Types", "tab_link" => "{$php_self}?page=export_types&export_group_id={$export_group_id}", "pages" => array("export_types", "add_export_type", "edit_export_type"))); $links = ft_get_export_group_prev_next_links($export_group_id); $prev_tabset_link = !empty($links["prev_id"]) ? "edit.php?page={$page}&export_group_id={$links["prev_id"]}" : ""; $next_tabset_link = !empty($links["next_id"]) ? "edit.php?page={$page}&export_group_id={$links["next_id"]}" : ""; $page_vars = array(); $page_vars["tabs"] = $tabs; $page_vars["show_tabset_nav_links"] = true; $page_vars["prev_tabset_link"] = $prev_tabset_link; $page_vars["next_tabset_link"] = $next_tabset_link; $page_vars["head_string"] = <<<END <link type="text/css" rel="stylesheet" href="{$g_root_url}/modules/export_manager/global/css/styles.css?v=205"> <script src="{$g_root_url}/global/scripts/sortable.js"></script> <script src="{$g_root_url}/modules/export_manager/global/scripts/admin.js"></script> <script src="{$g_root_url}/global/codemirror/js/codemirror.js"></script> END; // load the appropriate code pages switch ($page) { case "main":
<?php require_once "../../global/library.php"; ft_init_module_page(); $folder = dirname(__FILE__); require_once "{$folder}/library.php"; $page = ft_load_module_field("swift_mailer", "page", "tab", "settings"); $php_self = ft_get_clean_php_self(); $tabs = array("settings" => array("tab_label" => $LANG["word_settings"], "tab_link" => "{$php_self}?page=settings"), "test" => array("tab_label" => $L["word_test"], "tab_link" => "{$php_self}?page=test")); // load the appropriate code page switch ($page) { case "settings": require "tab_settings.php"; break; case "test": require "tab_test.php"; break; default: require "tab_settings.php"; break; }
/** * This hook function is what actually outputs the Export options at the bottom of the Submission Listing page. * * @param string $template_name * @param array $params */ function exp_display_export_options($template_name, $params) { global $g_smarty, $g_root_url, $g_root_dir; $account_id = $params["SESSION"]["account"]["account_id"]; $form_id = $params["form_id"]; $view_id = $params["view_id"]; $export_groups = array(); $is_admin = false; if ($template_name == "admin_submission_listings_bottom") { $is_admin = true; } if ($is_admin) { $account_id = "admin"; } // this does all the hard work of figuring out what groups & types should appear $export_groups = exp_get_assigned_export_types($account_id, $form_id, $view_id); // now for the fun stuff! We loop through all export groups and log all the settings for // each of the fields, based on incoming POST values $page_vars = array(); foreach ($export_groups as $export_group) { $export_group_id = $export_group["export_group_id"]; $page_vars["export_group_{$export_group_id}_results"] = ft_load_module_field("export_manager", "export_group_{$export_group_id}_results", "export_group_{$export_group_id}_results"); $page_vars["export_group_{$export_group_id}_export_type"] = ft_load_module_field("export_manager", "export_group_{$export_group_id}_export_type", "export_group_{$export_group_id}_export_type"); } $params["LANG"]["export_manager"] = ft_get_module_lang_file_contents("export_manager"); // now pass the information to the Smarty template to display $g_smarty->assign("export_groups", $export_groups); $g_smarty->assign("is_admin", $is_admin); $g_smarty->assign("page_vars", $page_vars); $g_smarty->assign("LANG", $params["LANG"]); $g_smarty->assign("export_icon_folder", "{$g_root_url}/modules/export_manager/images/icons"); echo $g_smarty->fetch("../../modules/export_manager/templates/export_options_html.tpl"); }
<?php $folder = dirname(__FILE__); require_once "{$folder}/../../global/session_start.php"; $request = array_merge($_GET, $_POST); $action = $request["action"]; switch ($action) { case "remember_advanced_settings": ft_load_module_field("swift_mailer", "remember_advanced_settings", "remember_advanced_settings"); break; }
<?php require_once "../../global/library.php"; ft_init_module_page(); $page = ft_load_module_field("system_check", "page", "page", "summary"); $page_vars = array(); $same_page = ft_get_clean_php_self(); $tabs = array("summary" => array("tab_label" => $L["word_summary"], "tab_link" => "{$same_page}?page=summary", "pages" => array("summary")), "phpinfo" => array("tab_label" => "phpinfo", "tab_link" => "{$same_page}?page=phpinfo", "pages" => array("phpinfo"))); $page_vars["page"] = $page; $page_vars["tabs"] = $tabs; switch ($page) { case "summary": require_once "env_tab_summary.php"; break; case "phpinfo": require_once "env_tab_phpinfo.php"; break; default: require_once "env_tab_summary.php"; break; }
* This file does the actual generation of the content for view / display by the user. It calls the * export.tpl found in the /modules/export_manager/templates folder. */ require_once realpath(dirname(__FILE__) . "/../../global/session_start.php"); ft_include_module("export_manager"); $request = array_merge($_POST, $_GET); // passed in explicitly via POST or GET $export_group_id = isset($request["export_group_id"]) ? $request["export_group_id"] : ""; $export_type_id = isset($request["export_type_id"]) ? $request["export_type_id"] : ""; $results = isset($request["export_group_{$export_group_id}_results"]) ? $request["export_group_{$export_group_id}_results"] : "all"; // drawn from sessions $form_id = isset($_SESSION["ft"]["curr_form_id"]) ? $_SESSION["ft"]["curr_form_id"] : ""; $view_id = isset($_SESSION["ft"]["form_{$form_id}_view_id"]) ? $_SESSION["ft"]["form_{$form_id}_view_id"] : ""; $order = isset($_SESSION["ft"]["current_search"]["order"]) ? $_SESSION["ft"]["current_search"]["order"] : ""; $search_fields = isset($_SESSION["ft"]["current_search"]["search_fields"]) ? $_SESSION["ft"]["current_search"]["search_fields"] : array(); $export_group_results = ft_load_module_field("export_manager", "export_group_{$export_group_id}_results", "export_group_{$export_group_id}_results"); // if any of the required fields weren't entered, just output a simple blank message if (empty($form_id) || empty($view_id) || empty($order) || empty($search_fields) || empty($export_group_id)) { echo $LANG["export_manager"]["notify_export_incomplete_fields"]; exit; } set_time_limit(300); // if the user only wants to display the currently selected rows, limit the query to those submission IDs $submission_ids = array(); if ($results == "selected") { $submission_ids = $_SESSION["ft"]["form_{$form_id}_selected_submissions"]; } // perform the almighty search query $results_info = ft_search_submissions($form_id, $view_id, "all", 1, $order, "all", $search_fields, $submission_ids); $search_rows = $results_info["search_rows"]; $search_num_results = $results_info["search_num_results"];
<?php require_once "../../global/library.php"; ft_init_module_page(); $folder = dirname(__FILE__); require_once "{$folder}/library.php"; if (isset($_GET["delete"])) { list($g_success, $g_message) = pg_delete_page($_GET["delete"]); } $page = ft_load_module_field("pages", "page", "module_pages_page", 1); $num_pages_per_page = ft_get_module_settings("num_pages_per_page"); $pages_info = pg_get_pages($num_pages_per_page, $page); $results = $pages_info["results"]; $num_results = $pages_info["num_results"]; $text_intro_para_2 = ft_eval_smarty_string($L["text_intro_para_2"], array("url" => "../../admin/settings/index.php?page=menus")); // ------------------------------------------------------------------------------------------------ $page_vars = array(); $page_vars["pages"] = $results; $page_vars["head_title"] = $L["module_name"]; $page_vars["pagination"] = ft_get_page_nav($num_results, $num_pages_per_page, $page, ""); $page_vars["js_messages"] = array("word_edit", "phrase_please_confirm", "word_yes", "word_no"); $page_vars["module_js_messages"] = array("confirm_delete_page"); $page_vars["text_intro_para_2"] = $text_intro_para_2; $page_vars["head_string"] = <<<EOF <script type="text/javascript" src="scripts/pages.js"></script> EOF; ft_display_module_page("templates/index.tpl", $page_vars);
<?php if (isset($_POST["send"])) { list($g_success, $g_message) = swift_send_test_email($_POST); } $settings = ft_get_module_settings(); $test_email_format = ft_load_module_field("swift_mailer", "test_email_format", "test_email_format", "text"); $recipient_email = ft_load_module_field("swift_mailer", "recipient_email", "recipient_email", $_SESSION["ft"]["account"]["email"]); $from_email = ft_load_module_field("swift_mailer", "from_email", "from_email", $_SESSION["ft"]["account"]["email"]); $page_vars = array(); $page_vars["page"] = $page; $page_vars["tabs"] = $tabs; $page_vars["test_email_format"] = $test_email_format; $page_vars["recipient_email"] = $recipient_email; $page_vars["from_email"] = $from_email; $page_vars["sm_settings"] = $settings; $page_vars["php_version"] = phpversion(); $page_vars["head_js"] = <<<EOF var rules = []; rules.push("required,recipient_email,{$L["validation_no_recipient_email"]}"); rules.push("valid_email,recipient_email,{$L["validation_invalid_recipient_email"]}"); rules.push("required,from_email,{$L["validation_no_sender_email"]}"); rules.push("valid_email,from_email,{$L["validation_invalid_sender_email"]}"); EOF; ft_display_module_page("templates/index.tpl", $page_vars);