<?php /********************************************************************** Copyright (C) FrontAccounting, LLC. Released under the terms of the GNU General Public License, GPL, as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here <http://www.gnu.org/licenses/gpl-3.0.html>. ***********************************************************************/ $page_security = 'SA_SOFTWAREUPGRADE'; $path_to_root = ".."; include $path_to_root . "/includes/session.inc"; page(_($help_context = "System Diagnostics")); include $path_to_root . "/includes/ui.inc"; include $path_to_root . "/includes/system_tests.inc"; //------------------------------------------------------------------------------------------------- display_system_tests(); end_page();
start_form(); switch (@$_POST['Page']) { default: // include ('../install.html'); // submit_center('continue', _('Continue >>')); // break; // include ('../install.html'); // submit_center('continue', _('Continue >>')); // break; case '1': div_start('welcome'); subpage_title(_('System Diagnostics')); start_table(); instlang_list_row(_("Select install wizard language:"), 'inst_lang', $_SESSION['inst_set']['inst_lang']); end_table(1); $_POST['Tests'] = display_system_tests(true); br(); if (@$_POST['Tests']) { display_notification(_('All application preliminary requirements seems to be correct. Please press Continue button below.')); submit_center('continue', _('Continue >>')); } else { display_error(_('Application cannot be installed. Please fix problems listed below in red, and press Refresh button.')); submit_center('refresh', _('Refresh')); } div_end(); break; case '2': if (!isset($_POST['host'])) { foreach ($_SESSION['inst_set'] as $name => $val) { $_POST[$name] = $val; }
function display_applications(&$waapp) { global $path_to_root, $use_popup_windows; include_once "{$path_to_root}/includes/ui.inc"; include_once $path_to_root . "/reporting/includes/class.graphic.inc"; include $path_to_root . "/includes/system_tests.inc"; if ($use_popup_windows) { echo "<script language='javascript'>\n"; echo get_js_open_window(900, 500); echo "</script>\n"; } $selected_app = $waapp->get_selected_application(); // first have a look through the directory, // and remove old temporary pdfs and pngs $dir = company_path() . '/pdf_files'; if ($d = @opendir($dir)) { while (($file = readdir($d)) !== false) { if (!is_file($dir . '/' . $file) || $file == 'index.php') { continue; } // then check to see if this one is too old $ftime = filemtime($dir . '/' . $file); // seems 3 min is enough for any report download, isn't it? if (time() - $ftime > 180) { unlink($dir . '/' . $file); } } closedir($d); } if ($selected_app->id == "orders") { display_customer_topten(); } elseif ($selected_app->id == "AP") { display_supplier_topten(); } elseif ($selected_app->id == "stock") { display_stock_topten(); } elseif ($selected_app->id == "manuf") { display_stock_topten(true); } elseif ($selected_app->id == "proj") { display_dimension_topten(); } elseif ($selected_app->id == "GL") { display_gl_info(); } else { $title = "Display System Diagnostics"; br(2); display_heading($title); br(); display_system_tests(); } }