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(); } }
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_SUPPTRANSVIEW'; $path_to_root = "../.."; include_once $path_to_root . "/purchasing/includes/purchasing_db.inc"; include_once $path_to_root . "/includes/session.inc"; include_once $path_to_root . "/purchasing/includes/purchasing_ui.inc"; $js = ""; if ($use_popup_windows) { $js .= get_js_open_window(900, 500); } page(_($help_context = "View Supplier Credit Note"), true, false, "", $js); if (isset($_GET["trans_no"])) { $trans_no = $_GET["trans_no"]; } elseif (isset($_POST["trans_no"])) { $trans_no = $_POST["trans_no"]; } $supp_trans = new supp_trans(ST_SUPPCREDIT); read_supp_invoice($trans_no, ST_SUPPCREDIT, $supp_trans); display_heading("<font color=red>" . _("SUPPLIER CREDIT NOTE") . " # " . $trans_no . "</font>"); echo "<br>"; start_table(TABLESTYLE, "width=95%"); start_row(); label_cells(_("Supplier"), $supp_trans->supplier_name, "class='tableheader2'"); label_cells(_("Reference"), $supp_trans->reference, "class='tableheader2'");
<?php /********************************************** Author: Joe Hunt Name: Revenue / Cost Accruals v2.2 Free software under GNU GPL ***********************************************/ $page_security = 'SA_ACCRUALS'; $path_to_root = ".."; include_once $path_to_root . "/includes/session.inc"; include_once $path_to_root . "/gl/includes/db/gl_db_trans.inc"; $js = get_js_open_window(800, 500); if ($use_date_picker) { $js .= get_js_date_picker(); } // Begin the UI include_once $path_to_root . "/includes/ui.inc"; $_SESSION['page_title'] = _($help_context = "Revenue / Cost Accruals"); page($_SESSION['page_title'], false, false, '', $js); //-------------------------------------------------------------------------------------------------- if (!isset($_POST['freq'])) { $_POST['freq'] = 3; } // If the import button was selected, we'll process the form here. (If not, skip to actual content below.) if (isset($_POST['go']) || isset($_POST['show'])) { $input_error = 0; if (!is_date($_POST['date_'])) { display_error(_("The entered date is invalid.")); set_focus('date_'); $input_error = 1; } elseif (!is_date_in_fiscalyear($_POST['date_'])) {