function edit_param() { $_POST['data_filter'] = $this->data_filter; $_POST['days_future'] = $this->days_future; text_row_ex(_("Days in future:"), 'days_future', 2); text_row_ex(_("Filter:"), 'data_filter', 50); }
function edit_param() { global $top, $sequences, $asc_desc; $graph_types = array('LineChart' => _("Line Chart"), 'ColumnChart' => _("Column Chart"), 'Table' => _("Table")); $_POST['top'] = $this->top; $_POST['graph_type'] = $this->graph_type; $_POST['data_filter'] = $this->data_filter; text_row_ex(_("Number of weeks:"), 'top', 2); text_row_ex(_("Filter:"), 'data_filter', 50); select_row(_("Graph Type:"), "graph_type", null, $graph_types, null); }
end_row(); } end_table(1); start_table(TABLESTYLE2); if ($selected_id != -1) { if ($Mode == 'Edit') { $result = fetchAuthors($selected_id); while ($myrow = db_fetch($result)) { $_POST['fname'] = $myrow['author_fname']; $_POST['mname'] = $myrow['author_mname']; $_POST['lname'] = $myrow['author_lname']; $_POST['bdate'] = sql2date($myrow["author_birthdate"]); $_POST['address'] = $myrow['author_address']; $_POST['contact_number'] = $myrow['author_contact_number']; $_POST['email_address'] = $myrow['author_email']; $_POST['selected_id'] = $myrow['id']; } } hidden('selected_id', $selected_id); } text_row_ex(_("First Name:"), 'fname', 25); text_row_ex(_("Middle Name:"), 'mname', 25); text_row_ex(_("Last Name:"), 'lname', 25); date_row(_("Birth Date:"), 'bdate'); text_row_ex(_("Address:"), 'address', 25); text_row_ex(_("Contact Number:"), 'contact_number', 25); text_row_ex(_("Email Address:"), 'email_address', 25); end_table(1); submit_add_or_update_center($selected_id == -1, '', 'both'); end_form(); end_page();
$th = array(_("ID"), _("Group Name"), "", ""); inactive_control_column($th); table_header($th); $k = 0; while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["id"]); label_cell($myrow["description"]); inactive_control_cell($myrow["id"], $myrow["inactive"], 'groups', 'id'); edit_button_cell("Edit" . $myrow["id"], _("Edit")); delete_button_cell("Delete" . $myrow["id"], _("Delete")); end_row(); } inactive_control_row($th); end_table(1); //------------------------------------------------------------------------------------------------- start_table(TABLESTYLE2); if ($selected_id != -1) { if ($Mode == 'Edit') { //editing an existing group $myrow = get_sales_group($selected_id); $_POST['description'] = $myrow["description"]; } hidden("selected_id", $selected_id); label_row(_("ID"), $myrow["id"]); } text_row_ex(_("Group Name:"), 'description', 30); end_table(1); submit_add_or_update_center($selected_id == -1, '', 'both'); end_form(); end_page();
end_table(); //------------------------------------------------------------------------------------------------ hyperlink_no_params($_SERVER['PHP_SELF'], tr("New Sales Person")); //------------------------------------------------------------------------------------------------ start_form(); if (isset($selected_id)) { //editing an existing Sales-person $sql = "SELECT * FROM salesman WHERE salesman_code='{$selected_id}'"; $result = db_query($sql, "could not get sales person"); $myrow = db_fetch($result); $_POST['salesman_name'] = $myrow["salesman_name"]; $_POST['salesman_phone'] = $myrow["salesman_phone"]; $_POST['salesman_fax'] = $myrow["salesman_fax"]; $_POST['salesman_email'] = $myrow["salesman_email"]; $_POST['provision'] = percent_format($myrow["provision"]); $_POST['break_pt'] = price_format($myrow["break_pt"]); $_POST['provision2'] = percent_format($myrow["provision2"]); hidden('selected_id', $selected_id); } start_table("{$table_style2} width=60%"); text_row_ex(tr("Sales person name:"), 'salesman_name', 30); text_row_ex(tr("Telephone number:"), 'salesman_phone', 20); text_row_ex(tr("Fax number:"), 'salesman_fax', 20); text_row_ex(tr("Email:"), 'salesman_email', 40); percent_row(tr("Provision"), 'provision'); amount_row(tr("Break Pt.:"), 'break_pt'); percent_row(tr("Provision") . " 2", 'provision2'); end_table(1); submit_add_or_update_center(!isset($selected_id)); end_form(); end_page();
inactive_control_row($th); end_table(1); //----------------------------------------------------------------------------------- start_table(TABLESTYLE2); if ($selected_id != "") { if ($Mode == 'Edit') { //editing an existing status code $myrow = get_account_type($selected_id); $_POST['id'] = $myrow["id"]; $_POST['name'] = $myrow["name"]; $_POST['parent'] = $myrow["parent"]; if ($_POST['parent'] == '-1') { $_POST['parent'] == ""; } $_POST['class_id'] = $myrow["class_id"]; hidden('selected_id', $myrow['id']); hidden('old_id', $myrow["id"]); } else { hidden('selected_id', $selected_id); hidden('old_id', $_POST["old_id"]); } } text_row_ex(_("ID:"), 'id', 10); text_row_ex(_("Name:"), 'name', 50); gl_account_types_list_row(_("Subgroup Of:"), 'parent', null, _("None"), true); class_list_row(_("Class:"), 'class_id', null); end_table(1); submit_add_or_update_center($selected_id == "", '', 'both'); end_form(); //------------------------------------------------------------------------------------ end_page();
break; case '5': if (!isset($_POST['name'])) { foreach ($_SESSION['inst_set'] as $name => $val) { $_POST[$name] = $val; } set_focus('name'); } if (!isset($installed_extensions)) { $installed_extensions = array(); update_extensions($installed_extensions); } subpage_title(_('Company Settings')); start_table(TABLESTYLE); text_row_ex(_("Company Name:"), 'name', 30); text_row_ex(_("Admin Login:"******"Admin Password:"******"Reenter Password:"******"Select Chart of Accounts:"), 'coa'); languages_list_row(_("Select Default Language:"), 'lang'); end_table(1); submit_center_first('back', _('<< Back')); submit_center_last('set_admin', _('Continue >>')); break; case '6': // final screen subpage_title(_('SerbizHub Suite ERP has been installed successsfully.')); display_note(_('Please do not forget to remove install wizard folder.')); session_unset(); session_destroy(); hyperlink_no_params($path_to_root . '/index.php', _('Click here to start.'));
label_cell($myrow["address"]); inactive_control_cell($myrow["shipper_id"], $myrow["inactive"], 'shippers', 'shipper_id'); edit_button_cell("Edit" . $myrow["shipper_id"], _("Edit")); delete_button_cell("Delete" . $myrow["shipper_id"], _("Delete")); end_row(); } inactive_control_row($th); end_table(1); //---------------------------------------------------------------------------------------------- start_table(TABLESTYLE2); if ($selected_id != -1) { if ($Mode == 'Edit') { //editing an existing Shipper $myrow = get_shipper($selected_id); $_POST['shipper_name'] = $myrow["shipper_name"]; $_POST['contact'] = $myrow["contact"]; $_POST['phone'] = $myrow["phone"]; $_POST['phone2'] = $myrow["phone2"]; $_POST['address'] = $myrow["address"]; } hidden('selected_id', $selected_id); } text_row_ex(_("Name:"), 'shipper_name', 40); text_row_ex(_("Contact Person:"), 'contact', 30); text_row_ex(_("Phone Number:"), 'phone', 32, 30); text_row_ex(_("Secondary Phone Number:"), 'phone2', 32, 30); text_row_ex(_("Address:"), 'address', 50); end_table(1); submit_add_or_update_center($selected_id == -1, '', 'both'); end_form(); end_page();
function edit_param() { $_POST['data_filter'] = $this->data_filter; text_row_ex(_("Filter:"), 'data_filter', 50); }
//editing an existing status code if (!isset($_POST['name'])) { $group = get_tax_group($selected_id); $_POST['name'] = $group["name"]; $_POST['tax_shipping'] = $group["tax_shipping"]; $items = get_tax_group_items($selected_id); $i = 0; while ($tax_item = db_fetch($items)) { $_POST['tax_type_id' . $i] = $tax_item["tax_type_id"]; $_POST['rate' . $i] = percent_format($tax_item["rate"]); $i++; } } hidden('selected_id', $selected_id); } text_row_ex(tr("Description:"), 'name', 40); yesno_list_row(tr("Tax Shipping:"), 'tax_shipping', null, "", "", true); end_table(); display_note(tr("Select the taxes that are included in this group."), 1); start_table($table_style2); $th = array(tr("Tax"), tr("Default Rate (%)"), tr("Rate (%)")); table_header($th); for ($i = 0; $i < 5; $i++) { start_row(); if (!isset($_POST['tax_type_id' . $i])) { $_POST['tax_type_id' . $i] = 0; } tax_types_list_cells(null, 'tax_type_id' . $i, $_POST['tax_type_id' . $i], true, tr("None"), true); if ($_POST['tax_type_id' . $i] != 0 && $_POST['tax_type_id' . $i] != reserved_words::get_all_numeric()) { $default_rate = get_tax_type_default_rate($_POST['tax_type_id' . $i]); label_cell(percent_format($default_rate), "nowrap align=right");
} hidden('selected_id', $selected_id); } text_row_ex(_("Description") . ':', 'description', 50, 60); quick_entry_types_list_row(_("Entry Type") . ':', 'type', null, true); if (get_post('type') == QE_JOURNAL) { yesno_list_row(_("Balance Based"), 'bal_type', null, _("Yes"), _("No"), true); } if (list_updated('bal_type') || list_updated('type')) { $Ajax->activate('qe'); } if (get_post('type') == QE_JOURNAL && get_post('bal_type') == 1) { yesno_list_row(_("Period"), 'base_amount', null, _("Monthly"), _("Yearly")); gl_all_accounts_list_row(_("Account"), 'base_desc', null, true); } else { text_row_ex(_("Base Amount Description") . ':', 'base_desc', 50, 60, ''); amount_row(_("Default Base Amount") . ':', 'base_amount', price_format(0)); } end_table(1); submit_add_or_update_center($selected_id == -1, '', 'both'); div_end(); if ($selected_id != -1) { display_heading(_("Quick Entry Lines") . " - " . $_POST['description']); $result = get_quick_entry_lines($selected_id); start_table(TABLESTYLE2); $dim = get_company_pref('use_dimension'); if ($dim == 2) { $th = array(_("Post"), _("Account/Tax Type"), _("Amount"), _("Dimension"), _("Dimension") . " 2", "", ""); } elseif ($dim == 1) { $th = array(_("Post"), _("Account/Tax Type"), _("Amount"), _("Dimension"), "", ""); } else {
function edit_param() { global $top; $item_types = array('stock' => _("Stock"), 'manuf' => _("Manufactured")); $graph_types = array('PieChart' => _("Pie Chart"), 'Table' => _("Table")); $_POST['top'] = $this->top; $_POST['item_type'] = $this->item_type; $_POST['graph_type'] = $this->graph_type; $_POST['data_filter'] = $this->data_filter; text_row_ex(_("Number of items:"), 'top', 2); text_row_ex(_("Filter:"), 'data_filter', 50); select_row(_("Graph Type"), "graph_type", null, $graph_types, null); select_row(_("Item Type"), "item_type", null, $item_types, null); }
} label_cell($myrow["cid"]); label_cell($myrow['class_name']); label_cell($bs_text); edit_link_cell("selected_id=" . $myrow["cid"]); delete_link_cell("selected_id=" . $myrow["cid"] . "&delete=1"); end_row(); } end_table(); //----------------------------------------------------------------------------------- hyperlink_no_params($_SERVER['PHP_SELF'], tr("New Account Class")); start_form(); start_table($table_style2); if ($selected_id != -1) { //editing an existing status code $myrow = get_account_class($selected_id); $_POST['id'] = $myrow["cid"]; $_POST['name'] = $myrow["class_name"]; $_POST['Balance'] = $myrow["balance_sheet"]; hidden('selected_id', $selected_id); label_row(tr("Class ID:"), $_POST['id']); } else { text_row_ex(tr("Class ID:"), 'id', 3); } text_row_ex(tr("Class Name:"), 'name', 50); yesno_list_row(tr("Balance Sheet:"), 'Balance', null, "", "", false); end_table(1); submit_add_or_update_center($selected_id == -1); end_form(); //------------------------------------------------------------------------------------ end_page();
hyperlink_no_params($_SERVER['PHP_SELF'], tr("New Location")); start_form(); start_table($table_style2); if (isset($selected_id)) { //editing an existing Location $myrow = get_item_location($selected_id); $_POST['loc_code'] = $myrow["loc_code"]; $_POST['location_name'] = $myrow["location_name"]; $_POST['delivery_address'] = $myrow["delivery_address"]; $_POST['contact'] = $myrow["contact"]; $_POST['phone'] = $myrow["phone"]; $_POST['fax'] = $myrow["fax"]; $_POST['email'] = $myrow["email"]; hidden("selected_id", $selected_id); hidden("loc_code", $_POST['loc_code']); label_row(tr("Location Code:"), $_POST['loc_code']); } else { //end of if $selected_id only do the else when a new record is being entered text_row(tr("Location Code:"), 'loc_code', null, 5, 5); } text_row_ex(tr("Location Name:"), 'location_name', 50, 50); text_row_ex(tr("Contact for deliveries:"), 'contact', 30, 30); textarea_row(tr("Address:"), 'delivery_address', null, 35, 5); text_row_ex(tr("Telephone No:"), 'phone', 30, 30); text_row_ex(tr("Facsimile No:"), 'fax', 30, 30); text_row_ex(tr("Email:"), 'email', 30, 30); end_table(1); submit_add_or_update_center(!isset($selected_id)); end_form(); //end if record deleted no point displaying form to add record end_page();
possible separators can be added by modifying the array definition by editing that file */ if (!isset($_POST['language'])) { $_POST['language'] = $_SESSION['language']->code; } table_section_title(_("Language")); languages_list_row(_("Language:"), 'language', $_POST['language']); table_section(2); table_section_title(_("Miscellaneous")); check_row(_("Show hints for new users:"), 'show_hints', user_hints()); check_row(_("Show GL Information:"), 'show_gl', user_show_gl_info()); check_row(_("Show Item Codes:"), 'show_codes', user_show_codes()); themes_list_row(_("Theme:"), "theme", user_theme()); /* The array $themes is set up in config.php for modifications possible separators can be added by modifying the array definition by editing that file */ pagesizes_list_row(_("Page Size:"), "page_size", user_pagesize()); tab_list_row(_("Start-up Tab"), 'startup_tab', user_startup_tab()); /* The array $pagesizes is set up in config.php for modifications possible separators can be added by modifying the array definition by editing that file */ if (!isset($_POST['print_profile'])) { $_POST['print_profile'] = user_print_profile(); } print_profiles_list_row(_("Printing profile") . ':', 'print_profile', null, _('Browser printing support')); check_row(_("Use popup window to display reports:"), 'rep_popup', user_rep_popup(), false, _('Set this option to on if your browser directly supports pdf files')); check_row(_("Use icons instead of text links:"), 'graphic_links', user_graphic_links(), false, _('Set this option to on for using icons instead of text links')); text_row_ex(_("Query page size:"), 'query_size', 5, 5, '', user_query_size()); check_row(_("Remember last document date:"), 'sticky_doc_date', sticky_doc_date(), false, _('If set document date is remembered on subsequent documents, otherwise default is current date')); end_outer_table(1); submit_center('setprefs', _("Update"), true, '', 'default'); end_form(2); //------------------------------------------------------------------------------------------------- end_page();
function display_module_edit($selected_id) { global $installed_modules, $table_style2; if ($selected_id != -1) { $n = $selected_id; } else { $n = count($installed_modules); } start_form(true, true); echo "\n\t\t<script language='javascript'>\n\t\tfunction updateModule() {\n\t\t\tdocument.forms[0].action='inst_module.php?c=u&id=" . $n . "'\n\t\t\tdocument.forms[0].submit()\n\t\t}\n\t\t</script>"; start_table($table_style2); if ($selected_id != -1) { $mod = $installed_modules[$selected_id]; $_POST['tab'] = $mod['tab']; $_POST['name'] = $mod['name']; $_POST['path'] = $mod['path']; $_POST['filename'] = $mod['filename']; hidden('selected_id', $selected_id); hidden('filename', $_POST['filename']); } tab_list_row(tr("Menu Tab"), 'tab', null); text_row_ex(tr("Name"), 'name', 30); text_row_ex(tr("Folder"), 'path', 20); label_row(tr("Module File"), "<input name='uploadfile' type='file'>"); label_row(tr("SQL File"), "<input name='uploadfile2' type='file'>"); end_table(0); display_note(tr("Select your module PHP file from your local harddisk."), 0, 1); echo "<center><input onclick='javascript:updateModule()' type='button' style='width:150' value='" . tr("Save") . "'>"; end_form(); }
//END WHILE LIST LOOP end_table(); hyperlink_no_params($_SERVER['PHP_SELF'], tr("New Payment Term")); //------------------------------------------------------------------------------------------------- start_form(); start_table($table_style2); $day_in_following_month = $days_before_due = 0; if (isset($selected_id)) { //editing an existing payment terms $sql = "SELECT * FROM payment_terms\n\t\tWHERE terms_indicator='{$selected_id}'"; $result = db_query($sql, "could not get payment term"); $myrow = db_fetch($result); $_POST['terms'] = $myrow["terms"]; $days_before_due = $myrow["days_before_due"]; $day_in_following_month = $myrow["day_in_following_month"]; hidden('selected_id', $selected_id); } text_row(tr("Terms Description:"), 'terms', null, 40, 40); check_row(tr("Due After A Given No. Of Days:"), 'DaysOrFoll', $day_in_following_month == 0); if (!isset($_POST['DayNumber'])) { if ($days_before_due != 0) { $_POST['DayNumber'] = $days_before_due; } else { $_POST['DayNumber'] = $day_in_following_month; } } text_row_ex(tr("Days (Or Day In Following Month):"), 'DayNumber', 3); end_table(1); submit_add_or_update_center(!isset($selected_id)); end_form(); end_page();
function display_company_edit($selected_id) { global $def_coy, $db_connections, $tb_pref_counter, $table_style2; if ($selected_id != -1) { $n = $selected_id; } else { $n = count($db_connections); } start_form(true, true); echo "\n\t\t<script language='javascript'>\n\t\tfunction updateCompany() {\n\t\t\tif (document.forms[0].uploadfile.value!='' && document.forms[0].dbname.value!='') {\n\t\t\t\tdocument.forms[0].action='create_coy.php?c=u&ul=1&id=" . $n . "&fn=' + document.forms[0].uploadfile.value\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdocument.forms[0].action='create_coy.php?c=u&id=" . $n . "&fn=' + document.forms[0].uploadfile.value\n\t\t\t}\n\t\t\tdocument.forms[0].submit()\n\t\t}\n\t\t</script>"; start_table($table_style2); if ($selected_id != -1) { $conn = $db_connections[$selected_id]; $_POST['name'] = $conn['name']; $_POST['host'] = $conn['host']; $_POST['dbuser'] = $conn['dbuser']; $_POST['dbpassword'] = $conn['dbpassword']; $_POST['dbname'] = $conn['dbname']; if ($selected_id == $def_coy) { $_POST['def'] = true; } else { $_POST['def'] = false; } $_POST['dbcreate'] = false; hidden('selected_id', $selected_id); hidden('dbpassword', $_POST['dbpassword']); } else { text_row_ex(tr("Company"), 'name', 30); } text_row_ex(tr("Host"), 'host', 30); text_row_ex(tr("Database User"), 'dbuser', 30); if ($selected_id == -1) { text_row_ex(tr("Database Password"), 'dbpassword', 30); } text_row_ex(tr("Database Name"), 'dbname', 30); yesno_list_row(tr("Default"), 'def', null, "", "", false); start_row(); label_cell(tr("Database Script")); label_cell("<input name='uploadfile' type='file'>"); end_row(); text_row_ex(tr("New script Admin Password"), 'admpassword', 20); end_table(); display_note(tr("Choose from Database scripts in SQL folder. No Datase is created without a script."), 0, 1); echo "<center><input onclick='javascript:updateCompany()' type='button' style='width:150' value='" . tr("Save") . "'>"; end_form(); }
} else { $disallow_text = "<b>" . _("NO INVOICING") . "</b>"; } label_cell($myrow["reason_description"]); label_cell($disallow_text); inactive_control_cell($myrow["id"], $myrow["inactive"], 'credit_status', 'id'); edit_button_cell("Edit" . $myrow['id'], _("Edit")); delete_button_cell("Delete" . $myrow['id'], _("Delete")); end_row(); } inactive_control_row($th); end_table(); echo '<br>'; //----------------------------------------------------------------------------------- start_table(TABLESTYLE2); if ($selected_id != -1) { if ($Mode == 'Edit') { //editing an existing status code $myrow = get_credit_status($selected_id); $_POST['reason_description'] = $myrow["reason_description"]; $_POST['DisallowInvoices'] = $myrow["dissallow_invoices"]; } hidden('selected_id', $selected_id); } text_row_ex(_("Description:"), 'reason_description', 50); yesno_list_row(_("Dissallow invoicing ?"), 'DisallowInvoices', null); end_table(1); submit_add_or_update_center($selected_id == -1, '', 'both'); end_form(); //------------------------------------------------------------------------------------ end_page();
//----------------------------------------------------------------------------------- start_table(TABLESTYLE2); if ($selected_id != "") { if ($Mode == 'Edit') { //editing an existing status code $myrow = get_account_class($selected_id); $_POST['id'] = $myrow["cid"]; $_POST['name'] = $myrow["class_name"]; if (isset($use_oldstyle_convert) && $use_oldstyle_convert == 1) { $_POST['ctype'] = $myrow["ctype"] >= CL_ASSETS && $myrow["ctype"] < CL_INCOME ? 1 : 0; } else { $_POST['ctype'] = $myrow["ctype"]; } hidden('selected_id', $selected_id); } hidden('id'); label_row(_("Class ID:"), $_POST['id']); } else { text_row_ex(_("Class ID:"), 'id', 3); } text_row_ex(_("Class Name:"), 'name', 50, 60); if (isset($use_oldstyle_convert) && $use_oldstyle_convert == 1) { check_row(_("Balance Sheet"), 'ctype', null); } else { class_types_list_row(_("Class Type:"), 'ctype', null); } end_table(1); submit_add_or_update_center($selected_id == "", '', 'both'); end_form(); //------------------------------------------------------------------------------------ end_page();
function display_company_edit($selected_id) { global $def_coy, $db_connections, $tb_pref_counter; start_form(); start_table(TABLESTYLE2); if ($selected_id != -1) { $conn = $db_connections[$selected_id]; $_POST['name'] = $conn['name']; $_POST['host'] = $conn['host']; $_POST['dbuser'] = $conn['dbuser']; $_POST['dbpassword'] = $conn['dbpassword']; $_POST['dbname'] = $conn['dbname']; $_POST['tbpref'] = $conn['tbpref']; if ($selected_id == $def_coy) { $_POST['def'] = true; } else { $_POST['def'] = false; } $_POST['dbcreate'] = false; hidden('selected_id', $selected_id); hidden('tbpref', $_POST['tbpref']); hidden('dbpassword', $_POST['dbpassword']); } else { $_POST['tbpref'] = $tb_pref_counter . "_"; // Insert the current settings as default $conn = $db_connections[user_company()]; $_POST['name'] = ''; $_POST['host'] = $conn['host']; $_POST['dbuser'] = $conn['dbuser']; $_POST['dbpassword'] = $conn['dbpassword']; $_POST['dbname'] = $conn['dbname']; } text_row_ex(_("Company"), 'name', 50); if ($selected_id == -1) { text_row_ex(_("Host"), 'host', 30, 60); text_row_ex(_("Database User"), 'dbuser', 30); text_row_ex(_("Database Password"), 'dbpassword', 30); text_row_ex(_("Database Name"), 'dbname', 30); yesno_list_row(_("Table Pref"), 'tbpref', 1, $_POST['tbpref'], _("None"), false); } else { label_row(_("Host"), $_POST['host']); label_row(_("Database User"), $_POST['dbuser']); label_row(_("Database Name"), $_POST['dbname']); label_row(_("Table Pref"), $_POST['tbpref']); } yesno_list_row(_("Default"), 'def', null, "", "", false); if ($selected_id == -1) { coa_list_row(_("Database Script"), 'coa'); text_row_ex(_("New script Admin Password"), 'admpassword', 20); } end_table(1); submit_center('save', _("Save")); end_form(); }
function display_currency_edit($selected_id) { global $Mode; start_table(TABLESTYLE2); if ($selected_id != '') { if ($Mode == 'Edit') { //editing an existing currency $myrow = get_currency($selected_id); $_POST['Abbreviation'] = $myrow["curr_abrev"]; $_POST['Symbol'] = $myrow["curr_symbol"]; $_POST['CurrencyName'] = $myrow["currency"]; $_POST['country'] = $myrow["country"]; $_POST['hundreds_name'] = $myrow["hundreds_name"]; $_POST['auto_update'] = $myrow["auto_update"]; } hidden('Abbreviation'); hidden('selected_id', $selected_id); label_row(_("Currency Abbreviation:"), $_POST['Abbreviation']); } else { $_POST['auto_update'] = 1; text_row_ex(_("Currency Abbreviation:"), 'Abbreviation', 4, 3); } text_row_ex(_("Currency Symbol:"), 'Symbol', 10); text_row_ex(_("Currency Name:"), 'CurrencyName', 20); text_row_ex(_("Hundredths Name:"), 'hundreds_name', 15); text_row_ex(_("Country:"), 'country', 40); check_row(_("Automatic exchange rate update:"), 'auto_update', get_post('auto_update')); end_table(1); submit_add_or_update_center($selected_id == '', '', 'both'); }
end_row(); } inactive_control_row($th); end_table(1); //------------------------------------------------------------------------------------------------- start_table(TABLESTYLE2); if ($selected_id != -1) { if ($Mode == 'Edit') { //editing an existing area $myrow = get_crm_category($selected_id); $_POST['name'] = $myrow["name"]; $_POST['type'] = $myrow["type"]; $_POST['subtype'] = $myrow["action"]; $_POST['description'] = $myrow["description"]; } hidden("selected_id", $selected_id); } if ($Mode == 'Edit' && $myrow['system']) { label_row(_("Contact Category Type:"), $_POST['type']); label_row(_("Contact Category Subtype:"), $_POST['subtype']); } else { // crm_category_type_list_row(_("Contact Category Type:"), 'type', null, _('Other')); text_row_ex(_("Contact Category Type:"), 'type', 30); text_row_ex(_("Contact Category Subtype:"), 'subtype', 30); } text_row_ex(_("Category Short Name:"), 'name', 30); textarea_row(_("Category Description:"), 'description', null, 60, 4); end_table(1); submit_add_or_update_center($selected_id == -1, '', 'both'); end_form(); end_page();
function edit_param() { global $top; $graph_types = array('ColumnChart' => _("Column Chart"), 'Table' => _("Table")); $_POST['top'] = $this->top; $_POST['data_filter'] = $this->data_filter; text_row_ex(_("Number of Suppliers:"), 'top', 2); text_row_ex(_("Filter:"), 'data_filter', 50); select_row(_("Graph Type:"), "graph_type", null, $graph_types, null); }
if ($Mode == 'Edit') { //editing an existing area $myrow = get_recurrent_invoice($selected_id); $_POST['description'] = $myrow["description"]; $_POST['order_no'] = $myrow["order_no"]; $_POST['debtor_no'] = $myrow["debtor_no"]; $_POST['group_no'] = $myrow["group_no"]; $_POST['days'] = $myrow["days"]; $_POST['monthly'] = $myrow["monthly"]; $_POST['begin'] = sql2date($myrow["begin"]); $_POST['end'] = sql2date($myrow["end"]); $_POST['last_sent'] = $myrow['last_sent'] == "0000-00-00" ? "" : sql2date($myrow["last_sent"]); } hidden("selected_id", $selected_id); } text_row_ex(_("Description:"), 'description', 50); templates_list_row(_("Template:"), 'order_no'); customer_list_row(_("Customer:"), 'debtor_no', null, " ", true); if ($_POST['debtor_no'] > 0) { customer_branches_list_row(_("Branch:"), $_POST['debtor_no'], 'group_no', null, false); } else { sales_groups_list_row(_("Sales Group:"), 'group_no', null, " "); } small_amount_row(_("Days:"), 'days', 0, null, null, 0); small_amount_row(_("Monthly:"), 'monthly', 0, null, null, 0); date_row(_("Begin:"), 'begin'); date_row(_("End:"), 'end', null, null, 0, 0, 5); if ($selected_id != -1 && $_POST['last_sent'] != "") { date_row(_("Last Created"), 'last_sent'); } end_table(1);
if ($selected_id != -1) { //editing an existing Location if ($Mode == 'Edit') { $myrow = get_item_location($selected_id); $_POST['loc_code'] = $myrow["loc_code"]; $_POST['location_name'] = $myrow["location_name"]; $_POST['delivery_address'] = $myrow["delivery_address"]; $_POST['contact'] = $myrow["contact"]; $_POST['phone'] = $myrow["phone"]; $_POST['phone2'] = $myrow["phone2"]; $_POST['fax'] = $myrow["fax"]; $_POST['email'] = $myrow["email"]; } hidden("selected_id", $selected_id); hidden("loc_code"); label_row(_("Location Code:"), $_POST['loc_code']); } else { //end of if $selected_id only do the else when a new record is being entered text_row(_("Location Code:"), 'loc_code', null, 5, 5); } text_row_ex(_("Location Name:"), 'location_name', 50, 50); text_row_ex(_("Contact for deliveries:"), 'contact', 30, 30); textarea_row(_("Address:"), 'delivery_address', null, 35, 5); text_row_ex(_("Telephone No:"), 'phone', 32, 30); text_row_ex(_("Secondary Phone Number:"), 'phone2', 32, 30); text_row_ex(_("Facsimile No:"), 'fax', 32, 30); email_row_ex(_("E-mail:"), 'email', 30); end_table(1); submit_add_or_update_center($selected_id == -1, '', 'both'); end_form(); end_page();
foreach ($db_connections as $id => $conn) { $conn['dbuser'] = $_POST['user']; $conn['dbpassword'] = $_POST['passwd']; if (!($db = db_open($conn))) { display_error("Wrong user name or password - " . mysql_error()); } else { if (!db_import($_FILES['uploadfile']['tmp_name'], $conn)) { display_error("Bad SQL file or you have already updated the company: " . $id . " " . $conn['name'] . " - " . mysql_error()); } else { display_notification("Database has been updated for company: " . $id . " " . $conn['name']); } } } } } } if (!isset($_POST['passwd'])) { $_POST['passwd'] = ""; } echo "<form enctype='multipart/form-data' method='post' action='" . $_SERVER['PHP_SELF'] . "'>\n"; echo "<table align='center' width='50%' cellpadding=3 border=1 bordercolor='#cccccc' style='border-collapse: collapse'>\n"; text_row_ex("Database User", "user", 20); label_row("Password", "<input name='passwd' type='password' value='" . $_POST['passwd'] . "' />"); label_row("Upload Script", "<input name='uploadfile' type='file'>"); submit_row("submit", "Update"); echo "</table>\n"; echo "<br><br>"; echo "<center><span>Choose from Database update scripts in SQL folder. No Datase is updated without a script.</span></center>\n"; echo "<br>"; echo "</form>\n"; echo "</body></html>\n";
$_POST['pos'] = $myrow["pos"]; } hidden('selected_id', $selected_id); hidden('user_id'); start_row(); label_row(_("User login:"******"User Login:"******"user_id", null, 22, 20); $_POST['language'] = user_language(); $_POST['print_profile'] = user_print_profile(); $_POST['rep_popup'] = user_rep_popup(); $_POST['pos'] = user_pos(); } $_POST['password'] = ""; password_row(_("Password:"******"Enter a new password to change, leave empty to keep current.")); } text_row_ex(_("Full Name") . ":", 'real_name', 50); text_row_ex(_("Telephone No.:"), 'phone', 30); email_row_ex(_("Email Address:"), 'email', 50); security_roles_list_row(_("Access Level:"), 'role_id', null); languages_list_row(_("Language:"), 'language', null); pos_list_row(_("User's POS") . ':', 'pos', null); print_profiles_list_row(_("Printing profile") . ':', 'print_profile', null, _('Browser printing support')); check_row(_("Use popup window for reports:"), 'rep_popup', $_POST['rep_popup'], false, _('Set this option to on if your browser directly supports pdf files')); end_table(1); submit_add_or_update_center($selected_id == -1, '', 'both'); end_form(); end_page();
function edit_param() { $_POST['data_filter'] = $this->data_filter; $_POST['days_past'] = $this->days_past; $_POST['days_future'] = $this->days_future; $_POST['bank_act'] = $this->bank_act; text_row_ex(_("Days in past:"), 'days_past', 2); text_row_ex(_("Days in future:"), 'days_future', 2); bank_accounts_list_cells(_("Account:"), 'bank_act', null); text_row_ex(_("Filter:"), 'data_filter', 50); }
email_row_ex(_("BCC Address for all outgoing mails:"), 'bcc_email', 25, 55); text_row_ex(_("Official Company Number:"), 'coy_no', 25); text_row_ex(_("GSTNo:"), 'gst_no', 25); currencies_list_row(_("Home Currency:"), 'curr_default', $_POST['curr_default']); fiscalyears_list_row(_("Fiscal Year:"), 'f_year', $_POST['f_year']); text_row_ex(_("Tax Periods:"), 'tax_prd', 10, 10, '', null, null, _('Months.')); text_row_ex(_("Tax Last Period:"), 'tax_last', 10, 10, '', null, null, _('Months back.')); table_section(2); label_row(_("Company Logo:"), $_POST['coy_logo']); file_row(_("New Company Logo (.jpg)") . ":", 'pic', 'pic'); check_row(_("Delete Company Logo:"), 'del_coy_logo', $_POST['del_coy_logo']); number_list_row(_("Use Dimensions:"), 'use_dimension', null, 0, 2); sales_types_list_row(_("Base for auto price calculations:"), 'base_sales', $_POST['base_sales'], false, _('No base price list')); text_row_ex(_("Add Price from Std Cost:"), 'add_pct', 10, 10, '', null, null, "%"); $curr = get_currency($_POST['curr_default']); text_row_ex(_("Round to nearest:"), 'round_to', 10, 10, '', null, null, $curr['hundreds_name']); label_row("", " "); check_row(_("Search Item List"), 'no_item_list', null); check_row(_("Search Customer List"), 'no_customer_list', null); check_row(_("Search Supplier List"), 'no_supplier_list', null); label_row("", " "); check_row(_("Automatic Revaluation Currency Accounts"), 'auto_curr_reval', $_POST['auto_curr_reval']); check_row(_("Time Zone on Reports"), 'time_zone', $_POST['time_zone']); text_row_ex(_("Login Timeout:"), 'login_tout', 10, 10, '', null, null, _('seconds')); label_row(_("Version Id"), $_POST['version_id']); end_outer_table(1); hidden('coy_logo', $_POST['coy_logo']); submit_center('update', _("Update"), true, '', 'default'); end_form(2); //------------------------------------------------------------------------------------------------- end_page();