function build_main_html() { global $db, $messageStack, $currencies; $content = array(); $content['thead'] = array('value' => array(TEXT_DESCRIPTION, TEXT_GL_ACCOUNT, TEXT_BANK_ACCOUNT, TEXT_ACTION), 'params' => 'width="100%" cellspacing="0" cellpadding="1"'); $result = $db->Execute("select * from " . $this->db_table); $rowCnt = 0; while (!$result->EOF) { $actions = ''; if ($this->security_id > 1) { $actions .= html_icon('actions/edit-find-replace.png', TEXT_EDIT, 'small', 'onclick="loadPopUp(\'' . $this->code . '_edit\', ' . $result->fields['kt_id'] . ')"') . chr(10); } if ($this->security_id > 3) { $actions .= html_icon('emblems/emblem-unreadable.png', TEXT_DELETE, 'small', 'onclick="if (confirm(\'' . SETUP_TILL_DELETE_INTRO . '\')) subjectDelete(\'' . $this->code . '\', ' . $result->fields['kt_id'] . ')"') . chr(10); } $content['tbody'][$rowCnt] = array(array('value' => htmlspecialchars($result->fields['description']), 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'' . $this->code . '_edit\',\'' . $result->fields['kt_id'] . '\')"'), array('value' => gen_get_type_description(TABLE_CHART_OF_ACCOUNTS, $result->fields['gl_acct_id']), 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'' . $this->code . '_edit\',\'' . $result->fields['kt_id'] . '\')"'), array('value' => $result->fields['bank_account'], 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'' . $this->code . '_edit\',\'' . $result->fields['kt_id'] . '\')"'), array('value' => $actions, 'params' => 'align="right"')); $result->MoveNext(); $rowCnt++; } return html_datatable('' . $this->code . '_table', $content); }
function build_main_html() { global $db, $messageStack, $project_cost_types; $content = array(); $content['thead'] = array('value' => array(TEXT_SHORT_NAME, TEXT_COST_TYPE, TEXT_INACTIVE, TEXT_ACTION), 'params' => 'width="100%" cellspacing="0" cellpadding="1"'); $result = $db->Execute("select cost_id, description_short, cost_type, inactive from " . $this->db_table); $rowCnt = 0; while (!$result->EOF) { $params = unserialize($result->fields['params']); $actions = ''; if ($this->security_id > 1) { $actions .= html_icon('actions/edit-find-replace.png', TEXT_EDIT, 'small', 'onclick="loadPopUp(\'project_costs_edit\', ' . $result->fields['cost_id'] . ')"') . chr(10); } if ($this->security_id > 3) { $actions .= html_icon('emblems/emblem-unreadable.png', TEXT_DELETE, 'small', 'onclick="if (confirm(\'' . SETUP_PROJECT_COSTS_DELETE_INTRO . '\')) subjectDelete(\'project_costs\', ' . $result->fields['cost_id'] . ')"') . chr(10); } $content['tbody'][$rowCnt] = array(array('value' => htmlspecialchars($result->fields['description_short']), 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'project_costs_edit\',\'' . $result->fields['cost_id'] . '\')"'), array('value' => $project_cost_types[$result->fields['cost_type']], 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'project_costs_edit\',\'' . $result->fields['cost_id'] . '\')"'), array('value' => $result->fields['inactive'] ? TEXT_YES : '', 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'project_costs_edit\',\'' . $result->fields['cost_id'] . '\')"'), array('value' => $actions, 'params' => 'align="right"')); $result->MoveNext(); $rowCnt++; } return html_datatable('proj_cost_table', $content); }
public function build_main_html() { global $db, $messageStack; $content = array(); $content['thead'] = array('value' => array(TEXT_TITLE, TEXT_DESCRIPTION, TEXT_SORT_ORDER, TEXT_ACTION), 'params' => 'width="100%" cellspacing="0" cellpadding="1"'); $result = $db->Execute("select id, tab_name, description, sort_order from " . TABLE_EXTRA_TABS . " where module_id='" . $this->module . "'"); $rowCnt = 0; while (!$result->EOF) { $actions = ''; if ($_SESSION['admin_security'][SECURITY_ID_CONFIGURATION] > 1) { $actions .= html_icon('actions/edit-find-replace.png', TEXT_EDIT, 'small', 'onclick="loadPopUp(\'tabs_edit\', ' . $result->fields['id'] . ')"') . chr(10); } if ($_SESSION['admin_security'][SECURITY_ID_CONFIGURATION] > 3) { $actions .= html_icon('emblems/emblem-unreadable.png', TEXT_DELETE, 'small', 'onclick="if (confirm(\'' . EXTRA_TABS_DELETE_INTRO . '\')) subjectDelete(\'tabs\', ' . $result->fields['id'] . ')"') . chr(10); } $content['tbody'][$rowCnt] = array(array('value' => htmlspecialchars($result->fields['tab_name']), 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'tabs_edit\',\'' . $result->fields['id'] . '\')"'), array('value' => htmlspecialchars($result->fields['description']), 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'tabs_edit\',\'' . $result->fields['id'] . '\')"'), array('value' => $result->fields['sort_order'], 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'tabs_edit\',\'' . $result->fields['id'] . '\')"'), array('value' => $actions, 'params' => 'align="right"')); $result->MoveNext(); $rowCnt++; } return html_datatable('tab_table', $content); }
function build_main_html() { global $db, $messageStack; $tab_array = xtra_field_get_tabs('assets'); $content = array(); $content['thead'] = array('value' => array(TEXT_DESCRIPTION, TEXT_FLDNAME, TEXT_TAB_NAME, TEXT_TYPE, TEXT_ACTION), 'params' => 'width="100%" cellspacing="0" cellpadding="1"'); $field_list = array('id', 'field_name', 'entry_type', 'description', 'tab_id'); $result = $db->Execute("select " . implode(', ', $field_list) . " from " . TABLE_EXTRA_FIELDS . " where module_id='assets'"); $rowCnt = 0; while (!$result->EOF) { $actions = ''; if ($_SESSION['admin_security'][SECURITY_ID_CONFIGURATION] > 1) { $actions .= html_icon('actions/edit-find-replace.png', TEXT_EDIT, 'small', 'onclick="loadPopUp(\'fields_edit\', ' . $result->fields['id'] . ')"') . chr(10); } if ($result->fields['tab_id'] && $_SESSION['admin_security'][SECURITY_ID_CONFIGURATION] > 3) { $actions .= html_icon('emblems/emblem-unreadable.png', TEXT_DELETE, 'small', 'onclick="if (confirm(\'' . ASSETS_FIELD_DELETE_INTRO . '\')) subjectDelete(\'fields\', ' . $result->fields['id'] . ')"') . chr(10); } $content['tbody'][$rowCnt] = array(array('value' => htmlspecialchars($result->fields['description']), 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'fields_edit\',\'' . $result->fields['id'] . '\')"'), array('value' => $result->fields['field_name'], 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'fields_edit\',\'' . $result->fields['id'] . '\')"'), array('value' => $tab_array[$result->fields['tab_id']], 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'fields_edit\',\'' . $result->fields['id'] . '\')"'), array('value' => $result->fields['entry_type'], 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'fields_edit\',\'' . $result->fields['id'] . '\')"'), array('value' => $actions, 'params' => 'align="right"')); $result->MoveNext(); $rowCnt++; } return html_datatable('field_table', $content); }
function build_main_html() { global $db, $messageStack; $content = array(); $content['thead'] = array('value' => array(SETUP_CURRENCY_NAME, SETUP_CURRENCY_CODES, TEXT_VALUE, TEXT_ACTION), 'params' => 'width="100%" cellspacing="0" cellpadding="1"'); $result = $db->Execute("select currencies_id, title, code, symbol_left, symbol_right, decimal_point, thousands_point, decimal_places, last_updated, value \n\t from " . TABLE_CURRENCIES); $rowCnt = 0; while (!$result->EOF) { $actions = ''; if ($this->security_id > 1) { $actions .= html_icon('actions/edit-find-replace.png', TEXT_EDIT, 'small', 'onclick="loadPopUp(\'currency_edit\', ' . $result->fields['currencies_id'] . ')"') . chr(10); } if ($this->security_id > 3 && $result->fields['code'] != DEFAULT_CURRENCY) { $actions .= html_icon('emblems/emblem-unreadable.png', TEXT_DELETE, 'small', 'onclick="if (confirm(\'' . SETUP_CURR_DELETE_INTRO . '\')) subjectDelete(\'currency\', ' . $result->fields['currencies_id'] . ')"') . chr(10); } $content['tbody'][$rowCnt] = array(array('value' => DEFAULT_CURRENCY == $result->fields['code'] ? '<b>' . htmlspecialchars($result->fields['title']) . ' (' . TEXT_DEFAULT . ')</b>' : htmlspecialchars($result->fields['title']), 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'currency_edit\',\'' . $result->fields['currencies_id'] . '\')"'), array('value' => $result->fields['code'], 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'currency_edit\',\'' . $result->fields['currencies_id'] . '\')"'), array('value' => number_format($result->fields['value'], 8), 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'currency_edit\',\'' . $result->fields['currencies_id'] . '\')"'), array('value' => $actions, 'params' => 'align="right"')); $result->MoveNext(); $rowCnt++; } return html_datatable('currency_table', $content); }
function build_main_html() { global $db, $messageStack; $tax_authorities_array = gen_build_tax_auth_array(); $content = array(); $content['thead'] = array('value' => array(SETUP_TAX_DESC_SHORT, TEXT_DESCRIPTION, SETUP_HEADING_TOTAL_TAX, SETUP_HEADING_TAX_FREIGHT, TEXT_ACTION), 'params' => 'width="100%" cellspacing="0" cellpadding="1"'); $result = $db->Execute("select tax_rate_id, description_short, description_long, rate_accounts, freight_taxable \n\t\tfrom " . $this->db_table . " where type = '" . $this->type . "'"); $rowCnt = 0; while (!$result->EOF) { $actions = ''; if ($this->security_id > 1) { $actions .= html_icon('actions/edit-find-replace.png', TEXT_EDIT, 'small', 'onclick="loadPopUp(\'' . $this->code . '_edit\', ' . $result->fields['tax_rate_id'] . ')"') . chr(10); } if ($this->security_id > 3) { $actions .= html_icon('emblems/emblem-unreadable.png', TEXT_DELETE, 'small', 'onclick="if (confirm(\'' . SETUP_TAX_DELETE_INTRO . '\')) subjectDelete(\'' . $this->code . '\', ' . $result->fields['tax_rate_id'] . ')"') . chr(10); } $content['tbody'][$rowCnt] = array(array('value' => htmlspecialchars($result->fields['description_short']), 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'' . $this->code . '_edit\',\'' . $result->fields['tax_rate_id'] . '\')"'), array('value' => htmlspecialchars($result->fields['description_long']), 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'' . $this->code . '_edit\',\'' . $result->fields['tax_rate_id'] . '\')"'), array('value' => gen_calculate_tax_rate($result->fields['rate_accounts'], $tax_authorities_array), 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'' . $this->code . '_edit\',\'' . $result->fields['tax_rate_id'] . '\')"'), array('value' => $result->fields['freight_taxable'] ? TEXT_YES : TEXT_NO, 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'' . $this->code . '_edit\',\'' . $result->fields['tax_rate_id'] . '\')"'), array('value' => $actions, 'params' => 'style="cursor:pointer" align="right"')); $result->MoveNext(); $rowCnt++; } return html_datatable('' . $this->code . '_' . $this->type . '_table', $content); }
function build_main_html() { global $db, $messageStack; $tab_array = xtra_field_get_tabs($this->module); $content = array(); $content['thead'] = array('value' => array(TEXT_DESCRIPTION, TEXT_FLDNAME, TEXT_TAB_NAME, TEXT_TYPE, $this->type_desc, TEXT_SORT_ORDER, TEXT_GROUP, TEXT_ACTION), 'params' => 'width="100%" cellspacing="0" cellpadding="1"'); $field_list = array('id', 'field_name', 'entry_type', 'description', 'tab_id', 'params', 'sort_order', 'group_by'); $result = $db->Execute("select " . implode(', ', $field_list) . " from " . TABLE_EXTRA_FIELDS . " where module_id='" . $this->module . "' order by group_by, sort_order"); $rowCnt = 0; while (!$result->EOF) { $params = unserialize($result->fields['params']); $actions = ''; if ($this->security_id > 1) { $actions .= html_icon('actions/edit-find-replace.png', TEXT_EDIT, 'small', 'onclick="loadPopUp(\'fields_edit\', ' . $result->fields['id'] . ')"') . chr(10); } if ($result->fields['tab_id'] != '0' && $this->security_id > 3) { $actions .= html_icon('emblems/emblem-unreadable.png', TEXT_DELETE, 'small', 'onclick="if (confirm(\'' . ASSETS_FIELD_DELETE_INTRO . '\')) subjectDelete(\'fields\', ' . $result->fields['id'] . ')"') . chr(10); } $content['tbody'][$rowCnt] = array(array('value' => htmlspecialchars($result->fields['description']), 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'fields_edit\',\'' . $result->fields['id'] . '\')"'), array('value' => $result->fields['field_name'], 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'fields_edit\',\'' . $result->fields['id'] . '\')"'), array('value' => $tab_array[$result->fields['tab_id']], 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'fields_edit\',\'' . $result->fields['id'] . '\')"'), array('value' => $result->fields['entry_type'], 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'fields_edit\',\'' . $result->fields['id'] . '\')"'), array('value' => isset($params[$this->type_params]) ? $params[$this->type_params] : '', 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'fields_edit\',\'' . $result->fields['id'] . '\')"'), array('value' => $result->fields['sort_order'], 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'fields_edit\',\'' . $result->fields['id'] . '\')"'), array('value' => $result->fields['group_by'], 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'fields_edit\',\'' . $result->fields['id'] . '\')"'), array('value' => $actions, 'params' => 'align="right"')); $result->MoveNext(); $rowCnt++; } return html_datatable('field_table', $content); }
function build_main_html() { global $db, $messageStack; $content = array(); $content['thead'] = array('value' => array(GL_HEADING_ACCOUNT_NAME, TEXT_ACCT_DESCRIPTION, GL_INFO_ACCOUNT_TYPE, GL_HEADING_SUBACCOUNT, TEXT_ACTION), 'params' => 'width="100%" cellspacing="0" cellpadding="1"'); $result = $db->Execute("select id, description, heading_only, primary_acct_id, account_type, account_inactive from " . $this->db_table); $rowCnt = 0; while (!$result->EOF) { $bkgnd = $result->fields['account_inactive'] ? 'class="ui-state-error" ' : ''; $account_type_desc = constant('COA_' . str_pad($result->fields['account_type'], 2, "0", STR_PAD_LEFT) . '_DESC'); if ($result->fields['heading_only']) { $account_type_desc = TEXT_HEADING; $bkgnd = 'class="ui-state-active" '; } $actions = ''; if ($this->security_id > 1) { $actions .= html_icon('actions/edit-find-replace.png', TEXT_EDIT, 'small', 'onclick="loadPopUp(\'chart_of_accounts_edit\', \'' . $result->fields['id'] . '\')"') . "\n"; } if ($this->security_id > 3) { $actions .= html_icon('emblems/emblem-unreadable.png', TEXT_DELETE, 'small', 'onclick="if (confirm(\'' . GL_INFO_DELETE_INTRO . '\')) subjectDelete(\'chart_of_accounts\', ' . $result->fields['id'] . ')"') . "\n"; } $content['tbody'][$rowCnt] = array(array('value' => htmlspecialchars($result->fields['id']), 'params' => $bkgnd . 'style="cursor:pointer" onclick="loadPopUp(\'chart_of_accounts_edit\',\'' . $result->fields['id'] . '\')"'), array('value' => htmlspecialchars($result->fields['description']), 'params' => $bkgnd . 'style="cursor:pointer" onclick="loadPopUp(\'chart_of_accounts_edit\',\'' . $result->fields['id'] . '\')"'), array('value' => htmlspecialchars($account_type_desc), 'params' => $bkgnd . 'style="cursor:pointer" onclick="loadPopUp(\'chart_of_accounts_edit\',\'' . $result->fields['id'] . '\')"'), array('value' => $result->fields['primary_acct_id'] ? TEXT_YES . ' - ' . htmlspecialchars($result->fields['primary_acct_id']) : TEXT_NO, 'params' => $bkgnd . 'style="cursor:pointer" onclick="loadPopUp(\'chart_of_accounts_edit\',\'' . $result->fields['id'] . '\')"'), array('value' => $actions, 'params' => $bkgnd . 'align="right"')); $result->MoveNext(); $rowCnt++; } return html_datatable('coa_table', $content); }
function build_main_html() { global $db, $messageStack; $content = array(); $content['thead'] = array('value' => array(HR_ACCOUNT_ID, TEXT_DESCRIPTION, HR_HEADING_SUBACCOUNT, TEXT_INACTIVE, TEXT_ACTION), 'params' => 'width="100%" cellspacing="0" cellpadding="1"'); $result = $db->Execute("select id, description_short, description, subdepartment, primary_dept_id, department_inactive from " . $this->db_table); $rowCnt = 0; while (!$result->EOF) { $actions = ''; if ($this->security_id > 1) { $actions .= html_icon('actions/edit-find-replace.png', TEXT_EDIT, 'small', 'onclick="loadPopUp(\'departments_edit\', \'' . $result->fields['id'] . '\')"') . chr(10); } if ($this->security_id > 3) { $actions .= html_icon('emblems/emblem-unreadable.png', TEXT_DELETE, 'small', 'onclick="if (confirm(\'' . HR_INFO_DELETE_INTRO . '\')) subjectDelete(\'departments\', ' . $result->fields['id'] . ')"') . chr(10); } $content['tbody'][$rowCnt] = array(array('value' => htmlspecialchars($result->fields['description_short']), 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'departments_edit\',\'' . $result->fields['id'] . '\')"'), array('value' => htmlspecialchars($result->fields['description']), 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'departments_edit\',\'' . $result->fields['id'] . '\')"'), array('value' => $result->fields['subdepartment'] ? TEXT_YES : TEXT_NO, 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'departments_edit\',\'' . $result->fields['id'] . '\')"'), array('value' => $result->fields['department_inactive'] ? TEXT_YES : TEXT_NO, 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'departments_edit\',\'' . $result->fields['id'] . '\')"'), array('value' => $actions, 'params' => 'align="right"')); $result->MoveNext(); $rowCnt++; } return html_datatable('dept_table', $content); }
function build_main_html() { global $db, $messageStack; $content = array(); $content['thead'] = array('value' => array(SETUP_INFO_DEPT_TYPES_NAME, TEXT_ACTION), 'params' => 'width="100%" cellspacing="0" cellpadding="1"'); $result = $db->Execute("select id, description from " . $this->db_table); $rowCnt = 0; while (!$result->EOF) { $actions = ''; if ($this->security_id > 1) { $actions .= html_icon('actions/edit-find-replace.png', TEXT_EDIT, 'small', 'onclick="loadPopUp(\'dept_types_edit\', \'' . $result->fields['id'] . '\')"') . chr(10); } if ($this->security_id > 3) { $actions .= html_icon('emblems/emblem-unreadable.png', TEXT_DELETE, 'small', 'onclick="if (confirm(\'' . SETUP_DEPT_TYPES_DELETE_INTRO . '\')) subjectDelete(\'dept_types\', ' . $result->fields['id'] . ')"') . chr(10); } $content['tbody'][$rowCnt] = array(array('value' => htmlspecialchars($result->fields['description']), 'params' => 'style="cursor:pointer" onclick="loadPopUp(\'dept_types_edit\',\'' . $result->fields['id'] . '\')"'), array('value' => $actions, 'params' => 'align="right"')); $result->MoveNext(); $rowCnt++; } return html_datatable('dept_type_table', $content); }