function Output($params) { global $db, $currencies; if (count($params) != $this->size_params) { //upgrading $params = $this->Upgrade($params); } $list_length = array(); $contents = ''; $control = ''; for ($i = 0; $i <= $this->max_length; $i++) { $list_length[] = array('id' => $i, 'text' => $i); } $list_order = array(array('id' => 'asc', 'text' => TEXT_ASC), array('id' => 'desc', 'text' => TEXT_DESC)); $list_limit = array(array('id' => '0', 'text' => TEXT_NO), array('id' => '1', 'text' => TEXT_YES)); // Build control box form data $control = '<div class="row">'; $control .= ' <div style="white-space:nowrap">'; $control .= TEXT_SHOW . TEXT_SHOW_NO_LIMIT . ' ' . html_pull_down_menu('po_status_field_0', $list_length, $params['num_rows']) . '<br />'; $control .= CP_PO_STATUS_SORT_ORDER . ' ' . html_pull_down_menu('po_status_field_1', $list_order, $params['order']) . '<br />'; $control .= CP_PO_STATUS_HIDE_FUTURE . ' ' . html_pull_down_menu('po_status_field_2', $list_limit, $params['limit']); $control .= html_submit_field('sub_po_status', TEXT_SAVE); $control .= ' </div>'; $control .= '</div>'; if (count($params) != $this->size_params) { $this->update(); } // Build content box $sql = "select id, post_date, purchase_invoice_id, bill_primary_name, total_amount, currencies_code, currencies_value \n\t\t from " . TABLE_JOURNAL_MAIN . " where journal_id = 4 and closed = '0'"; if ($params['limit'] == '1') { $sql .= " and post_date <= '" . date('Y-m-d') . "'"; } if ($params['order'] == 'desc') { $sql .= " order by post_date desc"; } if ($params['num_rows']) { $sql .= " limit " . $params['num_rows']; } $result = $db->Execute($sql); if ($result->RecordCount() < 1) { $contents = ACT_NO_RESULTS; } else { while (!$result->EOF) { $contents .= '<div style="float:right">'; $contents .= html_button_field('invoice_' . $result->fields['id'], TEXT_RECEIVE, 'onclick="window.open(\'' . html_href_link(FILENAME_DEFAULT, 'module=phreebooks&page=orders&oID=' . $result->fields['id'] . '&jID=6&action=prc_so', 'SSL') . '\',\'_blank\')"') . " "; $contents .= $currencies->format_full($result->fields['total_amount'], true, $result->fields['currencies_code'], $result->fields['currencies_value']); $contents .= '</div>'; $contents .= '<div>'; $contents .= '<a href="' . html_href_link(FILENAME_DEFAULT, 'module=phreebooks&page=orders&oID=' . $result->fields['id'] . '&jID=4&action=edit', 'SSL') . '">'; $contents .= $result->fields['purchase_invoice_id'] . ' - '; $contents .= gen_locale_date($result->fields['post_date']); $contents .= ' ' . htmlspecialchars(gen_trim_string($result->fields['bill_primary_name'], 20, true)); $contents .= '</a>'; $contents .= '</div>' . chr(10); $result->MoveNext(); } } return $this->build_div('', $contents, $control); }
function Output($params) { global $db, $currencies; if (count($params) != $this->size_params) { //upgrading $params = $this->Upgrade($params); } $list_length = array(); $contents = ''; $control = ''; for ($i = 0; $i <= $this->max_length; $i++) { $list_length[] = array('id' => $i, 'text' => $i); } // Build control box form data $control = '<div class="row">'; $control .= '<div style="white-space:nowrap">' . TEXT_SHOW . TEXT_SHOW_NO_LIMIT; $control .= html_pull_down_menu('to_receive_inv_field_0', $list_length, $params['num_rows']); $control .= html_submit_field('sub_to_receive_inv', TEXT_SAVE); $control .= '</div></div>'; // Build content box $total = 0; $sql = "select id, purchase_invoice_id, total_amount, bill_primary_name, currencies_code, currencies_value, post_date, journal_id \n\t\t from " . TABLE_JOURNAL_MAIN . " \n\t\t where journal_id in (6,7) and waiting = '1' order by post_date DESC, purchase_invoice_id DESC"; if ($params['num_rows']) { $sql .= " limit " . $params['num_rows']; } $result = $db->Execute($sql); if ($result->RecordCount() < 1) { $contents = ACT_NO_RESULTS; } else { while (!$result->EOF) { $inv_balance = $result->fields['total_amount'] - fetch_partially_paid($result->fields['id']); if ($result->fields['journal_id'] == 7) { $inv_balance = -$inv_balance; } $total += $inv_balance; $contents .= '<div style="float:right">' . $currencies->format_full($inv_balance, true, $result->fields['currencies_code'], $result->fields['currencies_value']) . '</div>'; $contents .= '<div>'; $contents .= '<a href="' . html_href_link(FILENAME_DEFAULT, "module=phreebooks&page=orders&oID={$result->fields['id']}&jID={$result->fields['journal_id']}&action=edit", 'SSL') . '">'; $contents .= gen_locale_date($result->fields['post_date']) . ' - '; if ($result->fields['purchase_invoice_id'] != '') { $contents .= $result->fields['purchase_invoice_id'] . ' - '; } $contents .= htmlspecialchars($result->fields['bill_primary_name']); $contents .= '</a></div>' . chr(10); $result->MoveNext(); } } if (!$params['num_rows'] && $result->RecordCount() > 0) { $contents .= '<div style="float:right">' . $currencies->format_full($total, true, DEFAULT_CURRENCY, 1) . '</div>'; $contents .= '<div><b>' . TEXT_TOTAL . '</b></div>' . chr(10); } return $this->build_div('', $contents, $control); }
/** * Display Credit Card Information Submission Fields on the Checkout Payment Page * * @return array */ function selection() { global $order; for ($i = 1; $i < 13; $i++) { $j = $i < 10 ? '0' . $i : $i; $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => $j . '-' . strftime('%B', mktime(0, 0, 0, $i, 1, 2000))); } $today = getdate(); for ($i = $today['year']; $i < $today['year'] + 10; $i++) { $expires_year[] = array('id' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i))); } $selection = array('id' => $this->code, 'page' => $this->title, 'fields' => array(array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_OWNER, 'field' => html_input_field('nova_xml_field_0', $this->field_0)), array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_NUMBER, 'field' => html_input_field('nova_xml_field_1', $this->field_1)), array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_EXPIRES, 'field' => html_pull_down_menu('nova_xml_field_2', $expires_month, $this->field_2) . ' ' . html_pull_down_menu('nova_xml_field_3', $expires_year, $this->field_3)), array('title' => MODULE_PAYMENT_CC_TEXT_CVV, 'field' => html_input_field('nova_xml_field_4', $this->field_4, 'size="4" maxlength="4"' . ' id="' . $this->code . '-cc-cvv"') . ' ' . '<a href="javascript:popupWindow(\'' . html_href_link(FILENAME_POPUP_CVV_HELP) . '\')">' . TEXT_MORE_INFO . '</a>'))); return $selection; }
function assets_tabs() { global $db, $messageStack; $this->security_id = $_SESSION['admin_security'][SECURITY_ASSET_MGT_TABS]; $this->db_table = TABLE_ASSETS_TABS; $this->title = BOX_ASSET_MODULE_TABS; $this->extra_buttons = false; $this->help_path = ''; // make sure the module is installed $result = $db->Execute("SHOW TABLES LIKE '" . TABLE_ASSETS . "'"); if ($result->RecordCount() == 0) { $messageStack->add_session(ASSET_MGR_NOT_INSTALLED, 'caution'); gen_redirect(html_href_link(FILENAME_DEFAULT, 'cat=assets&module=admin', 'SSL')); } }
function Output($params) { global $db, $currencies; if (count($params) != $this->size_params) { //upgrading $params = $this->Upgrade($params); } $list_length = array(); $contents = ''; $control = ''; for ($i = 0; $i <= $this->max_length; $i++) { $list_length[] = array('id' => $i, 'text' => $i); } // Build control box form data $control = '<div class="row">'; $control .= '<div style="white-space:nowrap">' . TEXT_SHOW . TEXT_SHOW_NO_LIMIT; $control .= html_pull_down_menu('todays_s_quotes_field_0', $list_length, $params['num_rows']); $control .= html_submit_field('sub_todays_s_quotes', TEXT_SAVE); $control .= '</div></div>'; // Build content box $total = 0; $sql = "select id, purchase_invoice_id, total_amount, bill_primary_name, currencies_code, currencies_value \n\t\t from " . TABLE_JOURNAL_MAIN . " \n\t\t where journal_id = 9 and post_date = '" . date('Y-m-d') . "' order by purchase_invoice_id"; if ($params['num_rows']) { $sql .= " limit " . $params['num_rows']; } $result = $db->Execute($sql); if ($result->RecordCount() < 1) { $contents = ACT_NO_RESULTS; } else { while (!$result->EOF) { $total += $result->fields['total_amount']; $contents .= '<div style="float:right">' . $currencies->format_full($result->fields['total_amount'], true, $result->fields['currencies_code'], $result->fields['currencies_value']) . '</div>'; $contents .= '<div>'; // $contents .= '<a href="' . html_href_link(FILENAME_DEFAULT, 'module=phreebooks&page=orders&oID=' . $result->fields['id'] . '&jID=10&action=edit', 'SSL') . '">'; $contents .= '<a href="' . html_href_link(FILENAME_DEFAULT, 'module=phreebooks&page=orders&oID=' . $result->fields['id'] . '&jID=9&action=edit', 'SSL') . '">'; // $contents .= '<a href="' . html_href_link(FILENAME_DEFAULT, 'cat=orders&module=orders&oID=' . $result->fields['id'] . '&jID=9&action=edit', 'SSL') . '">'; $contents .= $result->fields['purchase_invoice_id'] . ' - '; $contents .= htmlspecialchars($result->fields['bill_primary_name']); $contents .= '</a></div>' . chr(10); $result->MoveNext(); } } if (!$params['num_rows'] && $result->RecordCount() > 0) { $contents .= '<div style="float:right">' . $currencies->format_full($total, true, $result->fields['currencies_code'], $result->fields['currencies_value']) . '</div>'; $contents .= '<div><b>' . TEXT_TOTAL . '</b></div>' . chr(10); } return $this->build_div('', $contents, $control); }
function Output($params) { global $db, $currencies; // Build control box form data $control = '<div class="row">'; $control .= '<div style="white-space:nowrap">' . TEXT_SHOW . TEXT_SHOW_NO_LIMIT; $control .= '<select name="num_rows" onchange="">'; for ($i = 0; $i <= 20; $i++) { $control .= '<option value="' . $i . '"' . ($params['num_rows'] == $i ? ' selected="selected"' : '') . '>' . $i . '</option>'; } $control .= '</select> ' . TEXT_ITEMS . ' '; $control .= '<input type="submit" value="' . TEXT_SAVE . '" />'; $control .= '</div></div>'; // Build content box $total = 0; $sql = "select id, purchase_invoice_id, total_amount, bill_primary_name, currencies_code, currencies_value \r\n\t from " . TABLE_JOURNAL_MAIN . " \r\n\t where journal_id = 12 and post_date = '" . date('Y-m-d', time()) . "' order by purchase_invoice_id"; if ($params['num_rows']) { $sql .= " limit " . $params['num_rows']; } $result = $db->Execute($sql); if ($result->RecordCount() < 1) { $contents = CP_TODAYS_SALES_NO_RESULTS; } else { while (!$result->EOF) { $total += $result->fields['total_amount']; $contents .= '<div style="float:right">' . $currencies->format_full($result->fields['total_amount'], true, $result->fields['currencies_code'], $result->fields['currencies_value']) . '</div>'; $contents .= '<div>'; $contents .= '<a href="' . html_href_link(FILENAME_DEFAULT, 'cat=orders&module=orders&oID=' . $result->fields['id'] . '&jID=12&action=edit', 'SSL') . '">'; $contents .= $result->fields['purchase_invoice_id'] . ' - '; $contents .= $result->fields['bill_primary_name']; $contents .= '</a></div>' . chr(10); $result->MoveNext(); } } if (!$params['num_rows']) { $contents .= '<div style="float:right">' . $currencies->format_full($total, true, $result->fields['currencies_code'], $result->fields['currencies_value']) . '</div>'; $contents .= '<div><b>' . TEXT_TOTAL . '</b></div>' . chr(10); } return $this->build_div($this->title, $contents, $control); }
function Output($params) { global $db, $currencies; // Build control box form data $control = '<div class="row">'; $control .= '<div style="white-space:nowrap">' . TEXT_SHOW . TEXT_SHOW_NO_LIMIT; $control .= '<select name="num_rows" onchange="">'; for ($i = 0; $i < MAX_NUM_SO_LIST; $i++) { $control .= '<option value="' . $i . '"' . ($params['num_rows'] == $i ? ' selected="selected"' : '') . '>' . $i . '</option>'; } $control .= '</select> ' . TEXT_ITEMS . ' '; $control .= '<input type="submit" value="' . TEXT_SAVE . '" />'; $control .= '</div></div>'; // Build content box $sql = "select id, post_date, purchase_invoice_id, bill_primary_name, total_amount, currencies_code, currencies_value \r\n\t\t\tfrom " . TABLE_JOURNAL_MAIN . " \r\n\t\t\twhere journal_id = 10 and closed = '0' order by post_date DESC"; if ($params['num_rows']) { $sql .= " limit " . $params['num_rows']; } $result = $db->Execute($sql); if ($result->RecordCount() < 1) { $contents = CP_SO_STATUS_NO_RESULTS; } else { while (!$result->EOF) { $contents .= '<div style="float:right">' . $currencies->format_full($result->fields['total_amount'], true, $result->fields['currencies_code'], $result->fields['currencies_value']) . '</div>'; $contents .= '<div>'; $contents .= '<a href="' . html_href_link(FILENAME_DEFAULT, 'cat=orders&module=orders&oID=' . $result->fields['id'] . '&jID=10&action=edit', 'SSL') . '">'; $contents .= $result->fields['purchase_invoice_id'] . ' - '; $contents .= gen_spiffycal_db_date_short($result->fields['post_date']); $name = strlen($result->fields['bill_primary_name']) > 20 ? substr($result->fields['bill_primary_name'], 0, 20) . '...' : $result->fields['bill_primary_name']; $contents .= ' ' . htmlspecialchars($name); $contents .= '</a></div>' . chr(10); $result->MoveNext(); } } return $this->build_div($this->title, $contents, $control); }
$order->item_rows[0] = array('pstd' => '1', 'id' => '', 'desc' => db_prepare_input($_POST['desc_1']), 'total' => $currencies->clean_value(db_prepare_input($_POST['total_1'])), 'acct' => db_prepare_input($_POST['acct_1'])); $post_credit = $order->post_ordr($action); if (!$post_credit) { $order = new objectInfo($_POST); $order->post_date = gen_db_date_short($_POST['post_date']); // fix the date to original format $order->id = $_POST['id'] != '' ? $_POST['id'] : ''; // will be null unless opening an existing purchase/receive $messageStack->add(GL_ERROR_NO_POST, 'error'); } gen_add_audit_log(AUDIT_LOG_DESC, $order->purchase_invoice_id, $order->total_amount); if (DEBUG) { $messageStack->write_debug(); } if ($action == 'save') { gen_redirect(html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('action')), 'SSL')); } // else print or print_update, fall through and load javascript to call form_popup and clear form } else { // else there was a post error, display and re-display form $order = new objectInfo($_POST); $order->post_date = gen_db_date_short($_POST['post_date']); // fix the date to original format $order->id = $_POST['id'] != '' ? $_POST['id'] : ''; // will be null unless opening an existing purchase/receive $messageStack->add(GL_ERROR_NO_POST, 'error'); } break; default: } /***************** prepare to display templates *************************/
// pull in extra toolbar overrides and additions if (count($extra_toolbar_buttons) > 0) { foreach ($extra_toolbar_buttons as $key => $value) { $toolbar->icon_list[$key] = $value; } } // add the help file index and build the toolbar $toolbar->add_help(''); echo $toolbar->build_toolbar(); // Build the page ?> <div class="pageHeading"><?php echo HEADING_TITLE_CRASH_TITLE; ?> </div> <table width="400" align="center" border="0" cellspacing="10" cellpadding="10"> <tr> <td><?php echo HEADING_TITLE_CRASH_INFORMATION; ?> </td> </tr> <tr> <td align="center"><?php echo html_button_field('download', HEADING_TITLE_CRASH_BUTTON, 'onclick="location.href = \'' . html_href_link(FILENAME_DEFAULT, 'cat=general&module=debug', 'SSL') . '\'"'); ?> </td> </tr> </table> </form>
// | | // | 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 | // | GNU General Public License for more details. | // | | // | The license that is bundled with this package is located in the | // | file: /doc/manual/ch01-Introduction/license.html. | // | If not, see http://www.gnu.org/licenses/ | // +-----------------------------------------------------------------+ // Path: /modules/inventory/pages/cat_inv/template_id.php // echo html_form('inventory', FILENAME_DEFAULT, gen_get_all_get_params(array('action'))); echo html_hidden_field('todo', '') . chr(10); // customize the toolbar actions $toolbar->icon_list['cancel']['params'] = 'onclick="location.href = \'' . html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('action', 'module')) . '&module=main', 'SSL') . '\'"'; $toolbar->icon_list['open']['show'] = false; $toolbar->icon_list['delete']['show'] = false; $toolbar->icon_list['save']['show'] = false; $toolbar->icon_list['print']['show'] = false; $toolbar->add_icon('continue', 'onclick="submitToDo(\'create\')"', $order = 10); $toolbar->add_help('07.04.01.01'); echo $toolbar->build_toolbar(); ?> <div class="pageHeading"><?php echo INV_HEADING_NEW_ITEM; ?> </div> <table width="500" align="center" cellspacing="0" cellpadding="1"> <tr> <th nowrap="nowrap" colspan="2"><?php
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | // | GNU General Public License for more details. | // | | // | The license that is bundled with this package is located in the | // | file: /doc/manual/ch01-Introduction/license.html. | // | If not, see http://www.gnu.org/licenses/ | // +-----------------------------------------------------------------+ // Path: /modules/banking/pages/popup_bills_accts/pre_process.php // /************** Check user security *****************************/ $security_level = (int) $_SESSION['admin_id']; // for popups, just make sure they are logged in if ($security_level == 0) { // no permission to enter page, error and redirect to home page $messageStack->add_session(ERROR_NO_PERMISSION, 'error'); gen_redirect(html_href_link(FILENAME_DEFAULT, '', 'SSL')); } /************** include page specific files *********************/ require DIR_FS_WORKING . 'language/' . $_SESSION['language'] . '/language.php'; require DIR_FS_WORKING . 'functions/banking.php'; /************** page specific initialization *************************/ define('JOURNAL_ID', $_GET['jID']); define('ACCOUNT_TYPE', $_GET['type']); switch (JOURNAL_ID) { default: case 18: $terms_type = 'AR'; $default_purchase_invoice_id = 'DP' . date('Ymd', time()); break; case 20: $terms_type = 'AP';
// | 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 | // | GNU General Public License for more details. | // +-----------------------------------------------------------------+ // Path: /modules/rma/config.php // // Release History // 3.0 - Converted from PhreeBooks module // 3.3 => 2011-11-15 - Bug fixes, themeroller changes // 3.6 => More bug fixes, inventory not filling properly, changes for R3.6 table paging // Module software version information define('MODULE_RMA_VERSION', 3.6); // Menu Sort Positions define('BOX_RMA_MODULE_ORDER', 70); // Menu Security id's define('SECURITY_RMA_MGT', 180); // New Database Tables define('TABLE_RMA', DB_PREFIX . 'rma_module'); if (defined('MODULE_RMA_STATUS')) { /* // Set the title menu define('MENU_HEADING_RMA_ORDER', 77); $pb_headings[MENU_HEADING_RMA_ORDER] = array( 'text' => MENU_HEADING_RMA, 'link' => html_href_link(FILENAME_DEFAULT, 'module=phreedom&page=index&mID=cat_rma', 'SSL'), ); */ // Set the menu $mainmenu["customers"]['submenu']['rma'] = array('text' => BOX_RMA_MODULE, 'order' => BOX_RMA_MODULE_ORDER, 'security_id' => SECURITY_RMA_MGT, 'link' => html_href_link(FILENAME_DEFAULT, 'module=rma&page=main', 'SSL'), 'show_in_users_settings' => true, 'params' => ''); }
// | The license that is bundled with this package is located in the | // | file: /doc/manual/ch01-Introduction/license.html. | // | If not, see http://www.gnu.org/licenses/ | // +-----------------------------------------------------------------+ // Path: /my_files/custom/extra_menus/oscommerce.php // // REMEMBER TO CHECK PERMISSIONS AFTER ADDING A NEW MENU ITEM. THEY DEFAULT TO NO ACCESS AND // DO NOT SHOW UP ON THE MENU UNITL PERMISSION HAS BEEN GRANTED AND THE USER HAS RE-LOGGED IN // include the language definition for the menu items if (file_exists(DIR_FS_MY_FILES . 'custom/oscommerce/language/' . $_SESSION['language'] . '/menu.php')) { include_once DIR_FS_MY_FILES . 'custom/oscommerce/language/' . $_SESSION['language'] . '/menu.php'; } else { include_once DIR_FS_MY_FILES . 'custom/oscommerce/language/en_us/menu.php'; } // Set the menu order, if using osCommerce title menu option (after Customers and before Vendors) define('MENU_HEADING_OSCOMMERCE_ORDER', 16); // Security id's define('SECURITY_ID_OSCOMMERCE_ADMIN', 208); define('SECURITY_ID_OSCOMMERCE_INTERFACE', 209); // Uncomment below to set the title menu for the osCommerce interface, otherwsie it will be parts of the Tools mennu /* $pb_headings[MENU_HEADING_OSCOMMERCE_ORDER] = array( 'text' => MENU_HEADING_OSCOMMERCE, 'link' => html_href_link(FILENAME_DEFAULT, 'cat=general&module=index&tpl=cat_osc', 'SSL'), ); */ // Menu Locations $menu[] = array('text' => BOX_OSCOMMERCE_ADMIN, 'heading' => MENU_HEADING_TOOLS, 'rank' => 40, 'security_id' => SECURITY_ID_OSCOMMERCE_ADMIN, 'link' => html_href_link(FILENAME_DEFAULT, 'cat=oscommerce&module=admin', 'SSL')); $menu[] = array('text' => BOX_OSCOMMERCE_MODULE, 'heading' => MENU_HEADING_TOOLS, 'rank' => 41, 'security_id' => SECURITY_ID_OSCOMMERCE_INTERFACE, 'link' => html_href_link(FILENAME_DEFAULT, 'cat=oscommerce&module=main', 'SSL')); // New Database Tables // None
$translator->extractRelease($_POST['id']); $temproot = $translator->getTempRoot(); } else { $temproot = $translator->getTempRoot(true); } $translator->searchModules($temproot, $_POST['source_lang']); break; case 'p_install': $translator->addRelease($_POST); if ($_POST['id'] != 'current_installation') { $translator->delete_directory(INSTALL_TEMP_DIR . session_id()); } header('Location:index.php?cat=translator&module=main'); exit; case 'mod': $toolbar->icon_list['cancel']['params'] = 'onclick="location.href = \'' . html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('action')) . 'action=releases', 'SSL') . '\'"'; $toolbar->icon_list['save']['show'] = true; $toolbar->icon_list['save']['params'] = 'onclick="javascript:document.translator.submit()"'; $toolbar->icon_list['delete']['params'] = 'onclick="document.translator.action.value=\'p_delete\'; document.translator.submit()"'; $toolbar->icon_list['delete']['show'] = true; $include_template = 'template_mod.php'; $release = $translator->getReleaseData($_GET['id']); break; case 'p_mod': $translator->updateRelease($_POST); header('Location:index.php?cat=translator&module=main'); exit; case 'p_delete': if (strstr($_POST['remove'], 'm_') !== false) { $id = str_replace('m_', '', $_POST['remove']); //exit;
gen_add_audit_log(PRICE_SHEETS_LOG . ($_REQUEST['action'] == 'save') ? TEXT_SAVE : TEXT_UPDATE, $sheet_name); gen_redirect(html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('psID', 'action')), 'SSL')); break; case 'delete': validate_security($security_level, 4); $id = (int) db_prepare_input($_GET['psID']); $result = $db->Execute("select sheet_name, type, default_sheet from " . TABLE_PRICE_SHEETS . " where id = " . $id); $sheet_name = $result->fields['sheet_name']; $type = $result->fields['type']; if ($result->fields['default_sheet'] == '1') { $messageStack->add(PRICE_SHEET_DEFAULT_DELETED, 'caution'); } $db->Execute("delete from " . TABLE_PRICE_SHEETS . " where id = '{$id}'"); $db->Execute("delete from " . TABLE_INVENTORY_SPECIAL_PRICES . " where price_sheet_id = '{$id}'"); gen_add_audit_log(PRICE_SHEETS_LOG . TEXT_DELETE, $sheet_name); gen_redirect(html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('psID', 'action')) . '&type=' . $type, 'SSL')); break; case 'revise': validate_security($security_level, 2); $old_id = db_prepare_input($_GET['psID']); $result = $db->Execute("select * from " . TABLE_PRICE_SHEETS . " where id = {$old_id}"); $old_rev = $result->fields['revision']; $output_array = array('sheet_name' => $result->fields['sheet_name'], 'type' => $type, 'revision' => $result->fields['revision'] + 1, 'effective_date' => gen_specific_date($result->fields['effective_date'], 1), 'default_sheet' => $result->fields['default_sheet'], 'default_levels' => $result->fields['default_levels']); db_perform(TABLE_PRICE_SHEETS, $output_array, 'insert'); $id = db_insert_id(); // this is used by the edit function later on. // expire the old sheet $db->Execute("UPDATE " . TABLE_PRICE_SHEETS . " SET expiration_date='" . gen_specific_date($result->fields['effective_date'], 1) . "' WHERE id={$old_id}"); // Copy special pricing information to new sheet $levels = $db->Execute("select inventory_id, price_levels from " . TABLE_INVENTORY_SPECIAL_PRICES . " where price_sheet_id = {$old_id}"); while (!$levels->EOF) {
</td> <td align="center" onclick="submitSeq(<?php echo $query_result->fields['id'] . ', \'edit\''; ?> )"><?php echo $query_result->fields['quantity_on_order']; ?> </td> <td align="right"> <?php // build the action toolbar if (function_exists('add_extra_action_bar_buttons')) { echo add_extra_action_bar_buttons($query_result->fields); } if ($security_level > 1) { echo html_icon('actions/edit-find-replace.png', TEXT_EDIT, 'small', 'onclick="window.open(\'' . html_href_link(FILENAME_DEFAULT, 'module=inventory&page=main&cID=' . $query_result->fields['id'] . '&action=edit&inventory_type=' . $query_result->fields['inventory_type'], 'SSL') . "','_blank')\"") . chr(10); } if ($security_level > 3 && $query_result->fields['inventory_type'] != 'mi' && $query_result->fields['inventory_type'] != 'ia') { echo html_icon('apps/accessories-text-editor.png', TEXT_RENAME, 'small', "onclick='renameItem({$query_result->fields['id']},\"{$query_result->fields['inventory_type']}\")'") . chr(10); } if ($security_level > 3 && $query_result->fields['inventory_type'] != 'mi' && $query_result->fields['inventory_type'] != 'ia' && ($query_result->fields['last_journal_date'] != '0000-00-00 00:00:00' || $query_result->fields['last_journal_date'] != '')) { echo html_icon('emblems/emblem-unreadable.png', TEXT_DELETE, 'small', "onclick='if (confirm(\"" . INV_MSG_DELETE_INV_ITEM . "\")) deleteItem({$query_result->fields['id']},\"{$query_result->fields['inventory_type']}\")'") . chr(10); } if ($security_level > 1 && $query_result->fields['inventory_type'] != 'mi' && $query_result->fields['inventory_type'] != 'ia') { echo html_icon('actions/edit-copy.png', TEXT_COPY, 'small', "onclick='copyItem({$query_result->fields['id']},\"{$query_result->fields['inventory_type']}\")'") . chr(10); } if ($security_level > 2) { echo html_icon('mimetypes/x-office-spreadsheet.png', BOX_SALES_PRICE_SHEETS, 'small', "onclick='priceMgr({$query_result->fields['id']}, \"\",{$query_result->fields['full_price']}, \"c\")'") . chr(10); } ?> </td>
// ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title><?php echo TITLE . ' - ' . COMPANY_NAME; ?> </title> <script type="text/javascript"> <!-- window.opener.location.reload(); // --> </script> </head> <?php echo '<frameset rows="' . $row_string . '" cols="10%,90%">'; $idx = 0; foreach ($content_list as $content) { echo '<frame name="print_' . $idx . '" src="' . html_href_link(FILENAME_DEFAULT, 'module=shipping&page=popup_label_button&index=' . $idx, 'SSL') . '" />'; echo '<frame name="content_' . $idx . '" src="' . $content . '" />'; $idx++; } echo '</frameset>'; echo '<noframes>'; echo ' Your browser needs to support frames for the label print function to work.'; echo '</noframes>'; ?> </html>
// | modify it under the terms of the GNU General Public License as | // | published by the Free Software Foundation, either version 3 of | // | the License, or 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 | // | GNU General Public License for more details. | // +-----------------------------------------------------------------+ // Path: /modules/payment/pages/admin/template_main.php // echo html_form('admin', FILENAME_DEFAULT, gen_get_all_get_params(array('action'))) . chr(10); // include hidden fields echo html_hidden_field('action', '') . chr(10); // customize the toolbar actions $toolbar->icon_list['cancel']['params'] = 'onclick="location.href = \'' . html_href_link(FILENAME_DEFAULT, 'module=phreedom&page=admin', 'SSL') . '\'"'; $toolbar->icon_list['open']['show'] = false; if ($security_level > 1) { $toolbar->icon_list['save']['params'] = 'onclick="submitToDo(\'save\')"'; } else { $toolbar->icon_list['save']['show'] = false; } $toolbar->icon_list['delete']['show'] = false; $toolbar->icon_list['print']['show'] = false; echo $toolbar->build_toolbar(); ?> <h1><?php echo PAGE_TITLE; ?> </h1> <div id="admintabs">
foreach ($extra_toolbar_buttons as $key => $value) { $toolbar->icon_list[$key] = $value; } } // add the help file index and build the toolbar $toolbar->add_help('03.04.02'); echo $toolbar->build_toolbar(); // Build the page ?> <div class="pageHeading"><?php echo GL_HEADING_BEGINNING_BALANCES; ?> </div> <?php if ($security_level > 1) { echo '<div align="center">' . html_button_field('bb_inv', GL_BTN_IMP_BEG_BALANCES, 'onclick="location.href = \'' . html_href_link(FILENAME_DEFAULT, 'cat=gen_ledger&module=beg_bal_imp', 'SSL') . '\'"') . '</div>' . chr(10); } ?> <table id="item_table" align="center" border="1" cellspacing="1" cellpadding="1"> <tr> <th><?php echo TEXT_GL_ACCOUNT; ?> </th> <th><?php echo TEXT_DESCRIPTION; ?> </th> <th><?php echo TEXT_ACCOUNT_TYPE; ?>
// | 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 | // | GNU General Public License for more details. | // | | // | The license that is bundled with this package is located in the | // | file: /doc/manual/ch01-Introduction/license.html. | // | If not, see http://www.gnu.org/licenses/ | // +-----------------------------------------------------------------+ // Path: /modules/general/pages/pw_lost/pre_process.php // /************** include page specific files *********************/ require DIR_FS_WORKING . 'functions/general.php'; /************** page specific initialization *************************/ if (isset($_POST['login'])) { gen_redirect(html_href_link(FILENAME_DEFAULT, 'cat=general&module=login', 'SSL')); } $error_check = false; if (isset($_POST['submit'])) { if (!$_POST['admin_email']) { $error_check = true; $email_message = ERROR_WRONG_EMAIL_NULL; } $_SESSION['company'] = $_SESSION['companies'][$_POST['company']]; $admin_email = db_prepare_input($_POST['admin_email']); $sql = "select admin_id, admin_name, admin_email, admin_pass \r\n \tfrom " . TABLE_USERS . " where admin_email = '" . db_input($admin_email) . "'"; $result = $db->Execute($sql); if (!($admin_email == $result->fields['admin_email'])) { $error_check = true; $email_message = ERROR_WRONG_EMAIL; }
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | // | GNU General Public License for more details. | // | | // | The license that is bundled with this package is located in the | // | file: /doc/manual/ch01-Introduction/license.html. | // | If not, see http://www.gnu.org/licenses/ | // +-----------------------------------------------------------------+ // Path: /modules/translator/pages/admin/template_main.php // // start the form echo html_form('admin', FILENAME_DEFAULT, gen_get_all_get_params(array('action')), 'post', '', true) . chr(10); // include hidden fields echo html_hidden_field('todo', '') . chr(10); // customize the toolbar actions $toolbar->icon_list['cancel']['params'] = 'onclick="location.href = \'' . html_href_link(FILENAME_DEFAULT, '', 'SSL') . '\'"'; $toolbar->icon_list['open']['show'] = false; $toolbar->icon_list['save']['show'] = false; $toolbar->icon_list['delete']['show'] = false; $toolbar->icon_list['print']['show'] = false; echo $toolbar->build_toolbar(); // Build the page ?> <div class="pageHeading"><?php echo PAGE_TITLE; ?> </div> <table width="500" align="center" border="0" cellspacing="2" cellpadding="2"> <tr><td><?php echo MODULE_TRANSLATOR_GEN_INFO; ?>
var xml = parseXml(sXml); if (!xml) return; if ($(xml).find("message").text()) alert ($(xml).find("message").text()); if ($(xml).find("address").text()) { document.getElementById('ship_contact').value = $(xml).find("ship_contact").text(); document.getElementById('ship_address1').value = $(xml).find("ship_address1").text(); document.getElementById('ship_address2').value = $(xml).find("ship_address2").text(); document.getElementById('ship_city_town').value = $(xml).find("ship_city_town").text(); document.getElementById('ship_state_province').value = $(xml).find("ship_state_province").text(); document.getElementById('ship_postal_code').value = $(xml).find("ship_postal_code").text(); } } function paperPrint() { window.location = "<?php echo html_href_link(FILENAME_DEFAULT, 'module=shipping&page=popup_label_viewer&method=' . $shipping_module . '&date=' . $date . '&labels=' . implode(':', $pdf_list), 'SSL'); ?> "; } // java label printing var therm_label = '<?php echo $label_data; ?> '; function labelPrint() { var tmp = ''; alert('looking for printer'); qz.findPrinter('<?php echo MODULE_SHIPPING_FEDEX_V7_PRINTER_NAME; ?>
// New Title Menu define('BOX_ASSET_MODULE', 'Administración de Activos'); define('BOX_ASSET_MODULE_ADM', 'Administrador del Módulo Administración de Activos'); define('BOX_ASSET_MODULE_TABS', 'Pestañas Administración de Activos'); define('BOX_ASSET_MODULE_FIELDS', 'Campos de la Base de Datos de Administración de Activos'); // Menu Sort Positions define('MENU_HEADING_ASSETS_ORDER', 77); define('BOX_ASSET_MODULE_ORDER', 90); define('BOX_ASSET_MODULE_ADM_ORDER', 91); define('BOX_ASSET_MODULE_TABS_ORDER', 92); define('BOX_ASSET_MODULE_FIELDS_ORDER', 93); // Menu Security id's define('SECURITY_ASSET_MGT', 170); define('SECURITY_ASSET_MGT_ADMIN', 171); define('SECURITY_ASSET_MGT_TABS', 172); define('SECURITY_ASSET_MGT_FIELDS', 173); // Set the title menu $pb_headings[MENU_HEADING_ASSETS_ORDER] = array('text' => MENU_HEADING_ASSETS, 'link' => html_href_link(FILENAME_DEFAULT, 'cat=assets&module=cat_assets', 'SSL')); // Set the menus $menu[] = array('text' => BOX_ASSET_MODULE, 'heading' => MENU_HEADING_ASSETS, 'rank' => BOX_ASSET_MODULE_ORDER, 'security_id' => SECURITY_ASSET_MGT, 'link' => html_href_link(FILENAME_DEFAULT, 'cat=assets&module=main', 'SSL')); $menu[] = array('text' => BOX_ASSET_MODULE_ADM, 'heading' => MENU_HEADING_ASSETS, 'rank' => BOX_ASSET_MODULE_ADM_ORDER, 'security_id' => SECURITY_ASSET_MGT_ADMIN, 'link' => html_href_link(FILENAME_DEFAULT, 'cat=assets&module=admin', 'SSL')); $menu[] = array('text' => BOX_ASSET_MODULE_TABS, 'heading' => MENU_HEADING_ASSETS, 'rank' => BOX_ASSET_MODULE_TABS_ORDER, 'security_id' => SECURITY_ASSET_MGT_TABS, 'link' => html_href_link(FILENAME_DEFAULT, 'cat=setup&module=main&subject=assets_tabs&page=1', 'SSL')); $menu[] = array('text' => BOX_ASSET_MODULE_FIELDS, 'heading' => MENU_HEADING_ASSETS, 'rank' => BOX_ASSET_MODULE_FIELDS_ORDER, 'security_id' => SECURITY_ASSET_MGT_FIELDS, 'link' => html_href_link(FILENAME_DEFAULT, 'cat=assets&module=assets_fields', 'SSL')); // New Database Tables define('TABLE_ASSETS', DB_PREFIX . 'assets'); define('TABLE_ASSETS_FIELDS', DB_PREFIX . 'assets_fields'); define('TABLE_ASSETS_HISTORY', DB_PREFIX . 'assets_history'); define('TABLE_ASSETS_TABS', DB_PREFIX . 'assets_tabs'); // Global Defines // This define is needed here because setup determines the tabs and will fail if this isnot here. define('ASSET_MGR_NOT_INSTALLED', 'El módulo Administración de Activos no está instalado! Ha sido redirigido al Administrador del Módulo de Administración de Activos para que instale el módulo.');
function display_links($page_name = 'list') { $pages_array = array(); for ($i = 1; $i <= $this->total_num_pages; $i++) { $pages_array[] = array('id' => $i, 'text' => $i); } if ($this->total_num_pages > 1) { $display_links = ''; if ($this->current_page_number > 1) { $display_links .= html_icon('actions/media-skip-backward.png', TEXT_GO_FIRST, 'small', 'onclick="location.href = \'' . html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('action')) . '&action=go_first', 'SSL') . '\'" style="cursor:pointer;"'); $display_links .= html_icon('phreebooks/media-playback-previous.png', TEXT_GO_PREVIOUS, 'small', 'onclick="location.href = \'' . html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('action')) . '&action=go_previous', 'SSL') . '\'" style="cursor:pointer;"'); } else { $display_links .= html_icon('actions/media-skip-backward.png', '', 'small', ''); $display_links .= html_icon('phreebooks/media-playback-previous.png', '', 'small', ''); } if (!$this->jump_page_displayed) { // only diplay pull down once (the rest are not read by browser) $display_links .= sprintf(TEXT_RESULT_PAGE, html_pull_down_menu($page_name, $pages_array, $this->current_page_number, 'onchange="jumpToPage(\'' . gen_get_all_get_params(array('list', 'action')) . '&action=go_page\')"'), $this->total_num_pages); $this->jump_page_displayed = true; } else { $display_links .= sprintf(TEXT_RESULT_PAGE, $this->current_page_number, $this->total_num_pages); } if ($this->current_page_number < $this->total_num_pages && $this->total_num_pages != 1) { $display_links .= html_icon('actions/media-playback-start.png', TEXT_GO_NEXT, 'small', 'onclick="location.href = \'' . html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('action')) . '&action=go_next', 'SSL') . '\'" style="cursor:pointer;"'); $display_links .= html_icon('actions/media-skip-forward.png', TEXT_GO_LAST, 'small', 'onclick="location.href = \'' . html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('action')) . '&action=go_last', 'SSL') . '\'" style="cursor:pointer;"'); } else { $display_links .= html_icon('actions/media-playback-start.png', '', 'small', ''); $display_links .= html_icon('actions/media-skip-forward.png', '', 'small', ''); } } else { $display_links = sprintf(TEXT_RESULT_PAGE, $this->total_num_pages, $this->total_num_pages); } return $display_links; }
// | The license that is bundled with this package is located in the | // | file: /doc/manual/ch01-Introduction/license.html. | // | If not, see http://www.gnu.org/licenses/ | // +-----------------------------------------------------------------+ // Path: /my_files/custom/extra_menus/zencart.php // // REMEMBER TO CHECK PERMISSIONS AFTER ADDING A NEW MENU ITEM. THEY DEFAULT TO NO ACCESS AND // DO NOT SHOW UP ON THE MENU UNITL PERMISSION HAS BEEN GRANTED AND THE USER HAS RE-LOGGED IN // include the language definition for the menu items if (file_exists(DIR_FS_MY_FILES . 'custom/zencart/language/' . $_SESSION['language'] . '/menu.php')) { include_once DIR_FS_MY_FILES . 'custom/zencart/language/' . $_SESSION['language'] . '/menu.php'; } else { include_once DIR_FS_MY_FILES . 'custom/zencart/language/en_us/menu.php'; } // Set the menu order, if using ZenCart title menu option (after Customers and before Vendors) define('MENU_HEADING_ZENCART_ORDER', 15); // Security id's define('SECURITY_ID_ZENCART_ADMIN', 201); define('SECURITY_ID_ZENCART_INTERFACE', 200); // Uncomment below to set the title menu for the ZenCart interface, otherwsie it will be parts of the Tools mennu /* $pb_headings[MENU_HEADING_ZENCART_ORDER] = array( 'text' => MENU_HEADING_ZENCART, 'link' => html_href_link(FILENAME_DEFAULT, 'cat=general&module=index&tpl=cat_zencart', 'SSL'), ); */ // Menu Locations $menu[] = array('text' => BOX_ZENCART_ADMIN, 'heading' => MENU_HEADING_TOOLS, 'rank' => 30, 'security_id' => SECURITY_ID_ZENCART_ADMIN, 'link' => html_href_link(FILENAME_DEFAULT, 'cat=zencart&module=admin', 'SSL')); $menu[] = array('text' => BOX_ZENCART_MODULE, 'heading' => MENU_HEADING_TOOLS, 'rank' => 31, 'security_id' => SECURITY_ID_ZENCART_INTERFACE, 'link' => html_href_link(FILENAME_DEFAULT, 'cat=zencart&module=main', 'SSL')); // New Database Tables // None
// Menu Sort Positions //define('MENU_HEADING_PHREEPOS_ORDER', 40); // Menu Security id's (refer to master doc to avoid security setting overlap) define('SECURITY_ID_PHREEPOS', 38); define('SECURITY_ID_POS_MGR', 39); define('SECURITY_ID_POS_CLOSING', 113); define('SECURITY_ID_CUSTOMER_DEPOSITS', 109); define('SECURITY_ID_VENDOR_DEPOSITS', 110); // New Database Tables define('TABLE_PHREEPOS_TILLS', DB_PREFIX . 'phreepos_tills'); define('TABLE_PHREEPOS_OTHER_TRANSACTIONS', DB_PREFIX . 'phreepos_other_trans'); if (defined('MODULE_PHREEPOS_STATUS')) { /* // Set the title menu $pb_headings[MENU_HEADING_PHREEPOS_ORDER] = array( 'text' => MENU_HEADING_PHREEPOS, 'link' => html_href_link(FILENAME_DEFAULT, 'module=phreepos&page=main&mID=cat_pos', 'SSL'), ); */ // Set the menus $mainmenu["customers"]['submenu']["phreepos"] = array('order' => 51, 'text' => BOX_PHREEPOS, 'security_id' => SECURITY_ID_PHREEPOS, 'link' => html_href_link(FILENAME_DEFAULT, 'module=phreepos&page=main', 'SSL'), 'show_in_users_settings' => true, 'params' => ''); $mainmenu["banking"]['submenu']['phreepos'] = array('order' => 50, 'text' => BOX_PHREEPOS, 'security_id' => '', 'show_in_users_settings' => false, 'params' => ''); $mainmenu["banking"]['submenu']['phreepos']['submenu']["phreepos_mgr"] = array('order' => 53, 'text' => BOX_POS_MGR, 'security_id' => SECURITY_ID_POS_MGR, 'link' => html_href_link(FILENAME_DEFAULT, 'module=phreepos&page=pos_mgr&list=1', 'SSL'), 'show_in_users_settings' => true, 'params' => ''); $mainmenu["banking"]['submenu']['phreepos']['submenu']["phreepos_closing"] = array('order' => 54, 'text' => BOX_POS_CLOSING, 'security_id' => SECURITY_ID_POS_CLOSING, 'link' => html_href_link(FILENAME_DEFAULT, 'module=phreepos&page=closing', 'SSL'), 'show_in_users_settings' => true, 'params' => ''); $mainmenu["banking"]['submenu']["receipts"]['submenu']['customer_deposit'] = array('text' => BOX_CUSTOMER_DEPOSITS, 'order' => 60, 'security_id' => SECURITY_ID_CUSTOMER_DEPOSITS, 'link' => html_href_link(FILENAME_DEFAULT, 'module=phreepos&page=deposit&type=c', 'SSL'), 'show_in_users_settings' => true, 'params' => ''); $mainmenu["banking"]['submenu']["vendor_payments"]['submenu']['vendor_deposit'] = array('text' => BOX_VENDOR_DEPOSITS, 'order' => 60, 'security_id' => SECURITY_ID_VENDOR_DEPOSITS, 'link' => html_href_link(FILENAME_DEFAULT, 'module=phreepos&page=deposit&type=v', 'SSL'), 'show_in_users_settings' => true, 'params' => ''); if (isset($_SESSION['admin_security'][SECURITY_ID_CONFIGURATION]) && $_SESSION['admin_security'][SECURITY_ID_CONFIGURATION] > 0) { gen_pull_language('phreepos', 'admin'); $mainmenu["company"]['submenu']["configuration"]['submenu']["phreepos"] = array('order' => MODULE_PHREEPOS_TITLE, 'text' => MODULE_PHREEPOS_TITLE, 'security_id' => SECURITY_ID_CONFIGURATION, 'link' => html_href_link(FILENAME_DEFAULT, 'module=phreepos&page=admin', 'SSL'), 'show_in_users_settings' => false, 'params' => ''); } }
// | Copyright(c) 2008-2014 PhreeSoft (www.PhreeSoft.com) | // +-----------------------------------------------------------------+ // | This program is free software: you can redistribute it and/or | // | modify it under the terms of the GNU General Public License as | // | published by the Free Software Foundation, either version 3 of | // | the License, or 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 | // | GNU General Public License for more details. | // +-----------------------------------------------------------------+ // Path: /modules/doc_ctl/config.php // define('NAME_TRIM_LENGTH', '24'); // TBD - needs to move to admin constant // 0.1 => 2010-09-01 - Converted from stand-alone PhreeBooks release // 1.0 => 2011-11-15 - Initial module release, themeroller compatible // 3.6 => bug fixes and compatibility issues with PhreeBooks R3.6, sync rev with PhreeBooks // Module software version information define('MODULE_DOC_CTL_VERSION', 3.6); // Menu Sort Positions define('BOX_DOC_CTL_ORDER', 10); // Security id's define('SECURITY_ID_DOC_CONTROL', 210); // New Database Tables define('TABLE_DC_DOCUMENT', DB_PREFIX . 'doc_ctl'); // Set the title menu // Menu Locations $mainmenu["quality"]['submenu']["doc_ctl"] = array('order' => BOX_DOC_CTL_ORDER, 'text' => BOX_DOC_CTL_MODULE, 'security_id' => SECURITY_ID_DOC_CONTROL, 'link' => html_href_link(FILENAME_DEFAULT, 'module=doc_ctl&page=main', 'SSL'), 'show_in_users_settings' => true, 'params' => '');
$browser_path = SHIPPING_DEFAULT_LABEL_WS . $method . '/' . str_replace('-', '/', $date) . '/'; $labels = explode(':', $label_list); if (count($labels) == 0) { die('No labels were passed to label_viewer!'); } $content_list = array(); foreach ($labels as $one_label) { $cnt = 0; while (true) { $label = $one_label . ($cnt > 0 ? '-' . $cnt : ''); if (is_file($file_path . $label . '.pdf')) { // PDF format $content_list[] = $browser_path . $label . '.pdf'; } elseif (is_file($file_path . $label . '.lpt')) { // Thermal label $content_list[] = html_href_link(FILENAME_DEFAULT, 'module=shipping&page=popup_label_image&action=notify&date=' . $date . '&method=' . $method . '&label=' . $label, 'SSL'); } elseif (is_file($file_path . $label . '.gif')) { // GIF image $content_list[] = $browser_path . $label . '.gif'; } else { break; } $cnt++; } } $row_size = intval(100 / count($content_list)); $row_string = ''; for ($i = 0; $i < count($content_list); $i++) { $row_string .= $row_size . '%,'; } $row_string = substr($row_string, 0, -1);
function Execute($zf_sql, $zf_limit = false, $zf_cache = false, $zf_cachetime = 0) { global $zc_cache, $messageStack; if ($zf_limit) { $zf_sql = $zf_sql . ' LIMIT ' . $zf_limit; } if ($zf_cache and $zc_cache->sql_cache_exists($zf_sql) and !$zc_cache->sql_cache_is_expired($zf_sql, $zf_cachetime)) { $obj = new queryFactoryResult(); $obj->cursor = 0; $obj->is_cached = true; $obj->sql_query = $zf_sql; $zp_result_array = $zc_cache->sql_cache_read($zf_sql); $obj->result = $zp_result_array; if (sizeof($zp_result_array) > 0) { $obj->EOF = false; while (list($key, $value) = each($zp_result_array[0])) { $obj->fields[$key] = $value; } return $obj; } else { $obj->EOF = true; } } elseif ($zf_cache) { $zc_cache->sql_cache_expire_now($zf_sql); $time_start = explode(' ', microtime()); $obj = new queryFactoryResult(); $obj->sql_query = $zf_sql; if (!$this->db_connected) { $this->set_error('0', DB_ERROR_NOT_CONNECTED); } $zp_db_resource = @mysql_query($zf_sql, $this->link); if (!$zp_db_resource) { $this->set_error(@mysql_errno(), @mysql_error()); } $obj->resource = $zp_db_resource; $obj->cursor = 0; $obj->is_cached = true; if ($obj->RecordCount() > 0) { $obj->EOF = false; $zp_ii = 0; while (!$obj->EOF) { $zp_result_array = @mysql_fetch_array($zp_db_resource); if ($zp_result_array) { while (list($key, $value) = each($zp_result_array)) { if (!preg_match('/^[0-9]/', $key)) { $obj->result[$zp_ii][$key] = $value; } } } else { $obj->Limit = $zp_ii; $obj->EOF = true; } $zp_ii++; } while (list($key, $value) = each($obj->result[$obj->cursor])) { if (!preg_match('/^[0-9]/', $key)) { $obj->fields[$key] = $value; } } $obj->EOF = false; } else { $obj->EOF = true; } $zc_cache->sql_cache_store($zf_sql, $obj->result); $time_end = explode(' ', microtime()); $query_time = $time_end[1] + $time_end[0] - $time_start[1] - $time_start[0]; $this->total_query_time += $query_time; $this->count_queries++; return $obj; } else { $time_start = explode(' ', microtime()); $obj = new queryFactoryResult(); if (!$this->db_connected) { $this->set_error('0', DB_ERROR_NOT_CONNECTED); } $zp_db_resource = @mysql_query($zf_sql, $this->link); if (!$zp_db_resource) { if (method_exists($messageStack, 'debug')) { $messageStack->debug("\n\nThe failing sql was: " . $zf_sql); $messageStack->debug("\n\nmySQL returned: " . @mysql_errno($this->link) . ' ' . @mysql_error($this->link)); $messageStack->write_debug(); $messageStack->add_session('The last transaction had a SQL database error.', 'error'); gen_redirect(html_href_link(FILENAME_DEFAULT, 'cat=general&module=crash', 'SSL')); } echo 'The failing sql was: ' . $zf_sql . '<br><br>'; $this->set_error(@mysql_errno($this->link), @mysql_error($this->link)); } $obj->resource = $zp_db_resource; $obj->cursor = 0; if ($obj->RecordCount() > 0) { $obj->EOF = false; $zp_result_array = @mysql_fetch_array($zp_db_resource); if ($zp_result_array) { while (list($key, $value) = each($zp_result_array)) { if (!preg_match('/^[0-9]/', $key)) { $obj->fields[$key] = $value; } } $obj->EOF = false; } else { $obj->EOF = true; } } else { $obj->EOF = true; } $time_end = explode(' ', microtime()); $query_time = $time_end[1] + $time_end[0] - $time_start[1] - $time_start[0]; $this->total_query_time += $query_time; $this->count_queries++; return $obj; } }
} // placeholder when not used if (!ENABLE_MULTI_CURRENCY) { echo html_hidden_field('display_currency', DEFAULT_CURRENCY) . chr(10); echo html_hidden_field('currencies_value', '1') . chr(10); } if (!ENABLE_MULTI_BRANCH) { echo html_hidden_field('store_id', '0') . chr(10); } // customize the toolbar actions $toolbar->icon_list['cancel']['params'] = 'onclick="location.href = \'' . html_href_link(FILENAME_DEFAULT, '', 'SSL') . '\'"'; $toolbar->icon_list['open']['params'] = 'onclick="OpenOrdrList(this)"'; $toolbar->icon_list['delete']['params'] = 'onclick="if (confirm(\'' . ORD_DELETE_ALERT . '\')) submitToDo(\'delete\')"'; $toolbar->icon_list['save']['params'] = 'onclick="submitToDo(\'save\')"'; $toolbar->icon_list['print']['params'] = 'onclick="submitToDo(\'print\')"'; $toolbar->add_icon('new', 'onclick="location.href = \'' . html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('action', 'jID')) . '&jID=' . JOURNAL_ID, 'SSL') . '\'"', 2); if ($security_level > 1 && ENABLE_BAR_CODE_READERS) { $toolbar->add_icon('bar_code', 'onclick="openBarCode()"', 9); $toolbar->icon_list['bar_code']['icon'] = 'devices/network-wired.png'; $toolbar->icon_list['bar_code']['text'] = TEXT_UPC_CODE; } if (JOURNAL_ID == 12 && $security_level > 2) { $toolbar->add_icon('post_previous', 'onclick="submitToDo(\'post_previous\')"', 10); $toolbar->icon_list['post_previous']['icon'] = 'actions/go-previous.png'; $toolbar->icon_list['post_previous']['text'] = TEXT_SAVE_OPEN_PREVIOUS; $toolbar->add_icon('post_next', 'onclick="submitToDo(\'post_next\')"', 11); $toolbar->icon_list['post_next']['icon'] = 'actions/go-next.png'; $toolbar->icon_list['post_next']['text'] = TEXT_SAVE_OPEN_NEXT; } if ($security_level > 1 && in_array(JOURNAL_ID, array(4, 6, 10, 12))) { $toolbar->add_icon('recur', 'onclick="OpenRecurList(this)"', 12);