$k = 0; $mods = get_charts_list(); foreach ($mods as $pkg_name => $ext) { $available = @$ext['available']; $installed = @$ext['version']; $id = @$ext['local_id']; $encoding = @$ext['encoding']; alt_table_row_color($k); // label_cell(is_array($ext['Descr']) ? $ext['Descr'][0] : $ext['Descr']); label_cell($available ? get_package_view_str($pkg_name, $ext['name']) : $ext['name']); label_cell($id === null ? _("None") : ($available && $installed ? $installed : _("Unknown"))); label_cell($available ? $available : _("None")); label_cell($encoding ? $encoding : _("Unknown")); if ($available && check_pkg_upgrade($installed, $available)) { // outdated or not installed theme in repo button_cell('Update' . $pkg_name, $installed ? _("Update") : _("Install"), _('Upload and install latest extension package'), ICON_DOWN); } else { label_cell(''); } if ($id !== null) { delete_button_cell('Delete' . $id, _('Delete')); submit_js_confirm('Delete' . $id, sprintf(_("You are about to remove package \\'%s\\'.\nDo you want to continue ?"), $ext['name'])); } else { label_cell(''); } end_row(); } end_table(1); div_end(); //--------------------------------------------------------------------------------------------- end_form();
} label_cell($myrow["description"]); label_cell(get_customer_trans_view_str(30, $myrow["order_no"])); if ($myrow["debtor_no"] == 0) { label_cell(""); label_cell(get_sales_group_name($myrow["group_no"])); } else { label_cell(get_customer_name($myrow["debtor_no"])); label_cell(get_branch_name($myrow['group_no'])); } label_cell($myrow["days"]); label_cell($myrow['monthly']); label_cell($begin); label_cell($end); label_cell($myrow['last_sent'] == "0000-00-00" ? "" : $last_sent); if ($overdue) { button_cell("create" . $myrow["id"], _("Create Invoices"), "", ICON_DOC); } else { label_cell(""); } end_row(); } end_table(); end_form(); if ($due) { display_note(_("Marked items are due."), 1, 0, "class='overduefg'"); } else { display_note(_("No recurrent invoices are due."), 1, 0); } br(); end_page();
function display_extensions() { global $installed_extensions; div_start('ext_tbl'); start_table(TABLESTYLE); $th = array(_("Extension"), _("Modules provided"), _("Options provided"), _("Installed"), _("Available"), "", ""); table_header($th); $k = 0; $mods = get_extensions_list('extension'); foreach ($mods as $pkg_name => $ext) { $available = @$ext['available']; $installed = @$ext['version']; $id = @$ext['local_id']; $entries = fmt_titles(@$ext['entries']); $tabs = fmt_titles(@$ext['tabs']); alt_table_row_color($k); label_cell($available ? get_package_view_str($pkg_name, $ext['name']) : $ext['name']); label_cell($tabs); label_cell($entries); label_cell($id === null ? _("None") : ($available && $installed ? $installed : _("Unknown"))); label_cell($available ? $available : _("Unknown")); if (!$available && $ext['type'] == 'extension') { // third-party plugin if (!$installed) { button_cell('Local' . $ext['package'], _("Install"), _('Install third-party extension.'), ICON_DOWN); } else { label_cell(''); } } elseif (check_pkg_upgrade($installed, $available)) { // outdated or not installed extension in repo button_cell('Update' . $pkg_name, $installed ? _("Update") : _("Install"), _('Upload and install latest extension package'), ICON_DOWN); } else { label_cell(''); } if ($id !== null) { delete_button_cell('Delete' . $id, _('Delete')); submit_js_confirm('Delete' . $id, sprintf(_("You are about to remove package \\'%s\\'.\nDo you want to continue ?"), $ext['name'])); } else { label_cell(''); } end_row(); } end_table(1); submit_center_first('Refresh', _("Update"), '', null); div_end(); }
function display_languages() { global $table_style, $installed_languages, $dflt_lang, $GetText; $th = array(_("Language"), _("Name"), _("Encoding"), _("Right To Left"), _("Installed"), _("Available"), _("Default"), "", ""); $currlang = $_SESSION["language"]->code; div_start('lang_tbl'); start_form(); // // select/display system locales support for sites using native gettext // if (function_exists('gettext')) { if (check_value('DisplayAll')) { array_insert($th, 7, _("Supported")); } start_table(); check_row(_('Display also languages not supported by server locales'), 'DisplayAll', null, true); end_table(); } start_table(TABLESTYLE); table_header($th); $k = 0; // get list of all (available and installed) langauges $langs = get_languages_list(); foreach ($langs as $pkg_name => $lng) { if ($lng == 'C') { // skip default locale (aka no translation) continue; } $lang = $lng['code']; $lang_name = $lng['name']; $charset = $lng['encoding']; $rtl = @$lng['rtl'] == 'yes' || @$lng['rtl'] === true; $available = @$lng['available']; $installed = @$lng['version']; $id = @$lng['local_id']; if ($lang == $currlang) { start_row("class='stockmankobg'"); } else { alt_table_row_color($k); } $support = $GetText->check_support($lang, $charset); if (function_exists('gettext') && !$support && !get_post('DisplayAll')) { continue; } label_cell($lang); label_cell($available ? get_package_view_str($lang, $lang_name) : $lang_name); label_cell($charset); label_cell($rtl ? _("Yes") : _("No")); label_cell($id === null ? _("None") : ($available && $installed ? $installed : _("Unknown"))); label_cell($available ? $available : _("None")); label_cell($id === null ? '' : radio(null, 'CurDflt', $id, $dflt_lang == $lang, true), "align='center'"); if (function_exists('gettext') && check_value('DisplayAll')) { label_cell($support ? _("Yes") : _("No")); } if (!$available && $lang != 'C') { // manually installed language button_cell('Edit' . $id, _("Edit"), _('Edit non standard language configuration'), ICON_EDIT); } elseif (check_pkg_upgrade($installed, $available)) { // outdated or not installed language in repo button_cell('Update' . $pkg_name, $installed ? _("Update") : _("Install"), _('Upload and install latest language package'), ICON_DOWN); } else { label_cell(''); } if ($id !== null && $lang != $currlang && $lang != 'C') { delete_button_cell('Delete' . $id, _('Delete')); submit_js_confirm('Delete' . $id, sprintf(_("You are about to remove language \\'%s\\'.\nDo you want to continue ?"), $lang_name)); } else { label_cell(''); } end_row(); } end_table(); display_note(_("The marked language is the current language which cannot be deleted."), 0, 0, "class='currentfg'"); br(); submit_center_first('Refresh', _("Update default"), '', null); submit_center_last('Add', _("Add new language manually"), '', false); end_form(); div_end(); }