Пример #1
0
// +-----------------------------------------------------------------+
//  Path: /modules/phreedom/pages/users/pre_process.php
//
if ($_SESSION['admin_id'] == 1) {
    $security_level = 4;
} else {
    $security_level = validate_user(SECURITY_ID_USERS);
}
/**************  include page specific files    *********************/
gen_pull_language($module, 'admin');
gen_pull_language('contacts');
require_once DIR_FS_WORKING . 'functions/phreedom.php';
require_once DIR_FS_MODULES . 'phreebooks/functions/phreebooks.php';
/**************   page specific initialization  *************************/
$error = false;
history_filter('users');
/***************   hook for custom actions  ***************************/
$custom_path = DIR_FS_WORKING . 'custom/pages/users/extra_actions.php';
if (file_exists($custom_path)) {
    include $custom_path;
}
/***************   Act on the action request   *************************/
switch ($_REQUEST['action']) {
    case 'save':
    case 'fill_all':
    case 'fill_role':
        validate_security($security_level, 2);
        $admin_id = db_prepare_input($_POST['rowSeq']);
        $fill_all = db_prepare_input($_POST['fill_all']);
        $fill_role = db_prepare_input($_POST['fill_role']);
        if ($security_level < 3 && $admin_id) {
Пример #2
0
$rowID = isset($_GET['rowID']) ? $_GET['rowID'] : 0;
$store_id = isset($_GET['storeID']) ? $_GET['storeID'] : 0;
$contactID = isset($_GET['cID']) ? $_GET['cID'] : 0;
$assembly = isset($_GET['asy']) ? true : false;
// load the filters
$f0 = isset($_REQUEST['f0']) ? $_REQUEST['f0'] : '';
// show inactive checkbox
$f1 = isset($_REQUEST['f1']) ? $_REQUEST['f1'] : '';
// inventory_type dropdown
$f2 = isset($_REQUEST['f2']) ? $_REQUEST['f2'] : '';
// limit to preferred_vendor checkbox
// save the filters for page jumps
$_GET['f0'] = $f0;
$_GET['f1'] = $f1;
$_GET['f2'] = $f2;
history_filter('inv_popup');
switch ($account_type) {
    default:
    case 'c':
        $terms_type = 'AR';
        break;
    case 'v':
        $terms_type = 'AP';
}
/***************   hook for custom actions  ***************************/
$custom_path = DIR_FS_WORKING . 'custom/pages/popup_inv/extra_actions.php';
if (file_exists($custom_path)) {
    include $custom_path;
}
/***************   Act on the action request   *************************/
switch ($_REQUEST['action']) {
Пример #3
0
// | 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/phreebooks/pages/popup_journal/pre_process.php
//
$security_level = validate_user(0, true);
/**************  include page specific files  *********************/
require DIR_FS_WORKING . 'functions/phreebooks.php';
/**************   page specific initialization  *************************/
history_filter('pb_pop_journal');
/***************   hook for custom actions  ***************************/
$custom_path = DIR_FS_WORKING . 'custom/pages/popup_journal/extra_actions.php';
if (file_exists($custom_path)) {
    include $custom_path;
}
/***************   Act on the action request   *************************/
switch ($_REQUEST['action']) {
    case 'go_first':
        $_REQUEST['list'] = 1;
        break;
    case 'go_previous':
        $_REQUEST['list'] = max($_REQUEST['list'] - 1, 1);
        break;
    case 'go_next':
        $_REQUEST['list']++;
$security_level = validate_user(SECURITY_RMA_MGT);
/**************  include page specific files    *********************/
require_once DIR_FS_WORKING . 'defaults.php';
require_once DIR_FS_MODULES . 'inventory/defaults.php';
/**************   page specific initialization  *************************/
if (!isset($_REQUEST['list'])) {
    $_REQUEST['list'] = 1;
}
$error = false;
$processed = false;
$cInfo = new objectInfo(array());
$creation_date = isset($_POST['creation_date']) ? gen_db_date($_POST['creation_date']) : date('Y-m-d');
$receive_date = isset($_POST['receive_date']) ? gen_db_date($_POST['receive_date']) : '';
$closed_date = isset($_POST['closed_date']) ? gen_db_date($_POST['closed_date']) : '';
$invoice_date = isset($_POST['invoice_date']) ? gen_db_date($_POST['invoice_date']) : '';
history_filter();
/***************   hook for custom actions  ***************************/
$custom_path = DIR_FS_WORKING . 'custom/pages/main/extra_actions.php';
if (file_exists($custom_path)) {
    include $custom_path;
}
/***************   Act on the action request   *************************/
switch ($_REQUEST['action']) {
    case 'save':
        if ($security_level < 2) {
            $messageStack->add_session(ERROR_NO_PERMISSION, 'error');
            gen_redirect(html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('action')), 'SSL'));
            break;
        }
        $id = db_prepare_input($_POST['id']);
        $rma_num = db_prepare_input($_POST['rma_num']);
// | 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/work_orders/pages/popup_tasks/pre_process.php
//
$security_level = validate_user(0, true);
/**************  include page specific files    *********************/
/**************   page specific initialization  *************************/
$rowID = isset($_GET['rowID']) ? $_GET['rowID'] : 0;
history_filter('wo_poptask');
/***************   hook for custom actions  ***************************/
$custom_path = DIR_FS_WORKING . 'custom/pages/popup_tasks/extra_actions.php';
if (file_exists($custom_path)) {
    include $custom_path;
}
/***************   Act on the action request   *************************/
switch ($_REQUEST['action']) {
    case 'go_first':
        $_REQUEST['list'] = 1;
        break;
    case 'go_previous':
        $_REQUEST['list'] = max($_REQUEST['list'] - 1, 1);
        break;
    case 'go_next':
        $_REQUEST['list']++;
Пример #6
0
// | 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/inventory/pages/price_sheets/pre_process.php
//
$security_level = validate_user(SECURITY_ID_PRICE_SHEET_MANAGER);
/**************  include page specific files    *********************/
require_once DIR_FS_WORKING . 'defaults.php';
/**************   page specific initialization  *************************/
$type = isset($_GET['type']) ? $_GET['type'] : 'c';
history_filter('inv_prices');
/***************   hook for custom actions  ***************************/
$custom_path = DIR_FS_MODULES . 'inventory/pages/price_sheets/extra_actions.php';
if (file_exists($custom_path)) {
    include $custom_path;
}
/***************   Act on the action request   *************************/
switch ($_REQUEST['action']) {
    case 'save':
    case 'update':
        validate_security($security_level, 2);
        $id = db_prepare_input($_POST['id']);
        $sheet_name = db_prepare_input($_POST['sheet_name']);
        $revision = db_prepare_input($_POST['revision']);
        $effective_date = gen_db_date($_POST['effective_date']);
        $default_sheet = isset($_POST['default_sheet']) ? '1' : '0';
Пример #7
0
// | 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/work_orders/pages/builder/pre_process.php
//
$security_level = validate_user(SECURITY_WORK_ORDERS_BUILDER);
/**************  include page specific files    *********************/
require_once DIR_FS_MODULES . 'inventory/defaults.php';
/**************   page specific initialization  *************************/
$error = false;
$processed = false;
$lock_title = false;
$hide_save = false;
$criteria = array();
history_filter('wo_build');
// load the filters
$f0 = $_GET['f0'] = isset($_POST['action']) ? isset($_POST['f0']) ? '1' : '0' : $_GET['f0'];
// show inactive checkbox
/***************   hook for custom actions  ***************************/
$custom_path = DIR_FS_WORKING . 'custom/pages/builder/extra_actions.php';
if (file_exists($custom_path)) {
    include $custom_path;
}
/***************   Act on the action request   *************************/
switch ($_REQUEST['action']) {
    case 'new':
        break;
    case 'save':
        validate_security($security_level, 2);
        $id = db_prepare_input($_POST['id']);
Пример #8
0
require DIR_FS_WORKING . 'functions/phreebooks.php';
/**************   page specific initialization  *************************/
define('JOURNAL_ID', $_GET['jID']);
define('ACCOUNT_TYPE', $_GET['type']);
switch (JOURNAL_ID) {
    default:
    case 18:
        $terms_type = 'AR';
        break;
    case 20:
        $terms_type = 'AP';
        break;
    default:
        die('Bad Journal id in modules/phreebooks/popup_bills.php');
}
history_filter('pb_pop_bills');
$acct_period = $_REQUEST['search_period'];
$period_filter = $acct_period == 'all' ? '' : ' and period = ' . $acct_period;
/***************   hook for custom actions  ***************************/
$custom_path = DIR_FS_WORKING . 'custom/pages/popup_bills/extra_actions.php';
if (file_exists($custom_path)) {
    include $custom_path;
}
/***************   Act on the action request   *************************/
switch ($_REQUEST['action']) {
    case 'go_first':
        $_REQUEST['list'] = 1;
        break;
    case 'go_previous':
        $_REQUEST['list'] = max($_REQUEST['list'] - 1, 1);
        break;
Пример #9
0
// | 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.                    |
// +-----------------------------------------------------------------+
//  Initially Written By: Harry Lu @ 2009/08/01
//  Path: /modules/payment/methods/linkpoint/pages/ccreview/pre_process.php
//
$security_level = validate_user(SECURITY_ID_PAY_BILLS);
/**************  include page specific files    *********************/
/**************   page specific initialization  *************************/
$error = false;
history_filter('linkpoint');
/***************   Act on the action request   *************************/
switch ($_REQUEST['action']) {
    case 'go_first':
        $_REQUEST['list'] = 1;
        break;
    case 'go_previous':
        $_REQUEST['list'] = max($_REQUEST['list'] - 1, 1);
        break;
    case 'go_next':
        $_REQUEST['list']++;
        break;
    case 'go_last':
        $_REQUEST['list'] = 99999;
        break;
    case 'search':
Пример #10
0
//
$security_level = validate_user(SECURITY_ID_MAINTAIN_INVENTORY);
/**************  include page specific files    *********************/
require_once DIR_FS_WORKING . 'defaults.php';
require_once DIR_FS_MODULES . 'phreebooks/functions/phreebooks.php';
require_once DIR_FS_WORKING . 'functions/inventory.php';
require_once DIR_FS_WORKING . 'classes/inventory_fields.php';
/**************   page specific initialization  *************************/
gen_pull_language('inventory', 'filter');
$error = false;
$processed = false;
$criteria = array();
$fields = new inventory_fields(false);
$type = isset($_REQUEST['inventory_type']) ? $_REQUEST['inventory_type'] : null;
// default to stock item
history_filter('inventory');
$first_entry = isset($_GET['add']) ? true : false;
// load the filters
$f0 = $_GET['f0'] = isset($_POST['action']) ? isset($_POST['f0']) ? '1' : '0' : $_GET['f0'];
// show inactive checkbox
$f1 = $_GET['f1'] = isset($_POST['f1']) ? $_POST['f1'] : $_GET['f1'];
// inventory_type dropdown
$id = isset($_POST['rowSeq']) ? db_prepare_input($_POST['rowSeq']) : db_prepare_input($_GET['cID']);
// getting the right inventory type.
if (!isset($_REQUEST['inventory_type'])) {
    if (isset($_REQUEST['cID'])) {
        $result = $db->Execute("SELECT inventory_type FROM " . TABLE_INVENTORY . " WHERE id='{$_REQUEST['cID']}'");
    } else {
        if (isset($_REQUEST['rowSeq'])) {
            $result = $db->Execute("SELECT inventory_type FROM " . TABLE_INVENTORY . " WHERE id='{$_REQUEST['rowSeq']}'");
        } else {
Пример #11
0
// | 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/phreedom/pages/roles/pre_process.php
//
$security_level = validate_user(SECURITY_ID_ROLES);
/**************   include page specific files    *********************/
gen_pull_language($module, 'admin');
//gen_pull_language('contacts');
//require_once(DIR_FS_WORKING . 'functions/phreedom.php');
//require_once(DIR_FS_MODULES . 'phreebooks/functions/phreebooks.php');
/**************  page specific initialization  *************************/
$error = false;
history_filter('roles');
/***************   hook for custom actions   ***************************/
$custom_path = DIR_FS_WORKING . 'custom/pages/roles/extra_actions.php';
if (file_exists($custom_path)) {
    include $custom_path;
}
/***************   Act on the action request   *************************/
switch ($_REQUEST['action']) {
    case 'save':
    case 'fill_all':
        validate_security($security_level, 2);
        $admin_id = db_prepare_input($_POST['rowSeq']);
        $fill_all = db_prepare_input($_POST['fill_all']);
        $prefs = array('def_store_id' => db_prepare_input($_POST['def_store_id']), 'def_cash_acct' => db_prepare_input($_POST['def_cash_acct']), 'def_ar_acct' => db_prepare_input($_POST['def_ar_acct']), 'def_ap_acct' => db_prepare_input($_POST['def_ap_acct']), 'restrict_store' => isset($_POST['restrict_store']) ? '1' : '0', 'restrict_period' => isset($_POST['restrict_period']) ? '1' : '0');
        // not the most elegent but look for a colon in the second character position
        $post_keys = array_keys($_POST);
Пример #12
0
// | 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/inventory/pages/popup_assy/pre_process.php
//
$security_level = validate_user(0, true);
/**************  include page specific files    *********************/
require DIR_FS_WORKING . 'functions/inventory.php';
/**************   page specific initialization  *************************/
history_filter('inv_pop_assy');
$acct_period = $_REQUEST['search_period'];
if (!isset($_REQUEST['list'])) {
    $_REQUEST['list'] = 1;
}
$period_filter = $acct_period == 'all' ? '' : ' and m.period = ' . $acct_period;
/***************   hook for custom actions  ***************************/
$custom_path = DIR_FS_WORKING . 'custom/pages/popup_assy/extra_actions.php';
if (file_exists($custom_path)) {
    include $custom_path;
}
/***************   Act on the action request   *************************/
switch ($_REQUEST['action']) {
    case 'go_first':
        $_REQUEST['list'] = 1;
        break;
Пример #13
0
        break;
    case 18:
        $security_token = SECURITY_ID_CUSTOMER_RECEIPTS;
        break;
    case 20:
        $security_token = SECURITY_ID_PAY_BILLS;
        break;
    default:
        die('Bad or missing journal id found (filename: modules/phreebooks/status.php), Journal_ID needs to be passed to this script to identify the correct procedure.');
}
$security_level = validate_user($security_token);
/**************  include page specific files    *********************/
require DIR_FS_WORKING . 'defaults.php';
require DIR_FS_WORKING . 'functions/phreebooks.php';
/**************   page specific initialization  *************************/
history_filter('pb' . JOURNAL_ID, $defaults = array('sf' => TEXT_DATE, 'so' => 'desc', 'search_period' => CURRENT_ACCOUNTING_PERIOD));
$date_today = date('Y-m-d');
/***************   hook for custom actions  ***************************/
$custom_path = DIR_FS_WORKING . 'custom/pages/status/extra_actions.php';
if (file_exists($custom_path)) {
    include $custom_path;
}
/***************   Act on the action request   *************************/
switch ($_REQUEST['action']) {
    case 'toggle':
        $id = db_prepare_input($_POST['rowSeq']);
        $result = $db->Execute("select waiting from " . TABLE_JOURNAL_MAIN . " where id = '" . $id . "'");
        $toggle = $result->fields['waiting'] ? '0' : '1';
        $db->Execute("update " . TABLE_JOURNAL_MAIN . " set waiting = '" . $toggle . "' where id = '" . $id . "'");
        break;
    case 'dn_attach':
Пример #14
0
// | 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/phreebooks/pages/search/pre_process.php
//
$security_level = validate_user(SECURITY_ID_SEARCH);
/**************  include page specific files    *********************/
require_once DIR_FS_WORKING . 'functions/phreebooks.php';
/**************   page specific initialization  *************************/
history_filter('pb_search');
$sort_by = array('date' => TEXT_DATE, 'id' => TEXT_JOURNAL_TYPE, 'amt' => TEXT_AMOUNT);
$choices = array('all' => TEXT_ALL, 'rng' => TEXT_RANGE, 'eq' => TEXT_EQUAL, 'neq' => TEXT_NOT_EQUAL, 'like' => TEXT_CONTAINS);
$journal_choices = array('0' => TEXT_ALL);
for ($i = 1; $i < 30; $i++) {
    $j_constant = str_pad($i, 2, '0', STR_PAD_LEFT);
    if (defined('GEN_ADM_TOOLS_J' . $j_constant)) {
        $journal_choices[$i] = sprintf(TEXT_JID_ENTRY, constant('GEN_ADM_TOOLS_J' . $j_constant));
    }
}
$_SESSION['search_date_id'] = $_REQUEST['search_date_id'] ? $_REQUEST['search_date_id'] : (isset($_SESSION['search_date_id']) ? $_SESSION['search_date_id'] : 'l');
// default to current period
$_SESSION['search_date_from'] = $_REQUEST['search_date_from'] ? $_REQUEST['search_date_from'] : (isset($_SESSION['search_date_from']) ? $_SESSION['search_date_from'] : gen_locale_date(CURRENT_ACCOUNTING_PERIOD_START));
$_SESSION['search_date_to'] = $_REQUEST['search_date_to'] ? $_REQUEST['search_date_to'] : (isset($_SESSION['search_date_to']) ? $_SESSION['search_date_to'] : gen_locale_date(CURRENT_ACCOUNTING_PERIOD_END));
$_SESSION['search_journal_id'] = isset($_REQUEST['search_journal_id']) ? $_REQUEST['search_journal_id'] : (isset($_SESSION['search_journal_id']) ? $_SESSION['search_journal_id'] : '0');
$_SESSION['search_ref_id'] = $_REQUEST['search_ref_id'] ? $_REQUEST['search_ref_id'] : (isset($_SESSION['search_ref_id']) ? $_SESSION['search_ref_id'] : 'all');
Пример #15
0
        define('GL_TYPE', 'sos');
        break;
    case 18:
        // Cash Receipts Journal
        define('GL_TYPE', 'swr');
        // sale with receipt
        break;
    case 20:
        // Purchases (direct pay)
        define('GL_TYPE', 'pwp');
        // purchase with payment
        break;
    default:
        die('No valid journal id found (filename: modules/phreebooks/popup.php), Journal ID needs to be passed to this script to identify the correct procedure.');
}
history_filter('pb_pop_orders');
$date = gen_db_date($_REQUEST['search_date']);
$acct_period = $_REQUEST['search_period'];
/***************   hook for custom actions  ***************************/
$custom_path = DIR_FS_WORKING . 'custom/pages/popup_orders/extra_actions.php';
if (file_exists($custom_path)) {
    include $custom_path;
}
/***************   Act on the action request   *************************/
switch ($_REQUEST['action']) {
    case 'go_first':
        $_REQUEST['list'] = 1;
        break;
    case 'go_previous':
        $_REQUEST['list'] = max($_REQUEST['list'] - 1, 1);
        break;
Пример #16
0
// | 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/inventory/pages/bulk_prices/pre_process.php
//
$security_level = validate_user(SECURITY_ID_PRICE_SHEET_MANAGER);
/**************  include page specific files    *********************/
/**************   page specific initialization  *************************/
history_filter('inv_bulk');
/***************   hook for custom actions  ***************************/
$custom_path = DIR_FS_WORKING . 'custom/pages/bulk_prices/extra_actions.php';
if (file_exists($custom_path)) {
    include $custom_path;
}
/***************   Act on the action request   *************************/
switch ($_REQUEST['action']) {
    case 'save':
        $j = 1;
        while (true) {
            if (isset($_POST['id_' . $j])) {
                $id = db_prepare_input($_POST['id_' . $j]);
                $re_order = $currencies->clean_value($_POST['reOrd_' . $j]);
                $min_stock = $currencies->clean_value($_POST['min_' . $j]);
                $lead_time = $currencies->clean_value($_POST['lead_' . $j]);
Пример #17
0
// | 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/inventory/pages/popup_adj/pre_process.php
//
$security_level = validate_user(0, true);
/**************  include page specific files    *********************/
/**************   page specific initialization  *************************/
history_filter('inv_pop_adj');
$filters = array();
$acct_period = $_REQUEST['search_period'];
if ($acct_period != 'all') {
    $filters[] = 'm.period = ' . $acct_period;
}
$adj_type = isset($_GET['adj_type']) ? $_GET['adj_type'] : 'adj';
// types are xfr or adj
/***************   hook for custom actions  ***************************/
$custom_path = DIR_FS_WORKING . 'custom/pages/popup_adj/module/extra_actions.php';
if (file_exists($custom_path)) {
    include $custom_path;
}
/***************   Act on the action request   *************************/
switch ($_REQUEST['action']) {
    case 'go_first':
Пример #18
0
//  Path: /modules/assets/pages/main/pre_process.php
//
$security_level = validate_user(SECURITY_ASSETS_MGT);
/**************  include page specific files    *********************/
require_once DIR_FS_MODULES . 'phreebooks/functions/phreebooks.php';
require_once DIR_FS_MODULES . 'inventory/functions/inventory.php';
require_once DIR_FS_WORKING . 'defaults.php';
require_once DIR_FS_WORKING . 'classes/assets_fields.php';
/**************   page specific initialization  *************************/
$error = false;
$processed = false;
$fields = new assets_fields();
$acquisition_date = isset($_POST['acquisition_date']) ? gen_db_date($_POST['acquisition_date']) : '';
$maintenance_date = isset($_POST['maintenance_date']) ? gen_db_date($_POST['maintenance_date']) : '';
$terminal_date = isset($_POST['terminal_date']) ? gen_db_date($_POST['terminal_date']) : '';
history_filter('assets');
/***************   hook for custom actions  ***************************/
$custom_path = DIR_FS_WORKING . 'custom/pages/main/extra_actions.php';
if (file_exists($custom_path)) {
    include $custom_path;
}
/***************   Act on the action request   *************************/
switch ($_REQUEST['action']) {
    case 'new':
        $asset = '';
        $cInfo = '';
        break;
    case 'create':
        if ($security_level < 2) {
            $messageStack->add(ERROR_NO_PERMISSION, 'error');
            gen_redirect(html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('action')), 'SSL'));
Пример #19
0
//
$security_level = validate_user(SECURITY_ID_POS_MGR);
define('JOURNAL_ID', '19');
/**************  include page specific files    *********************/
require_once DIR_FS_MODULES . 'phreebooks/classes/gen_ledger.php';
if (file_exists(DIR_FS_MODULES . 'phreepos/custom/classes/journal/journal_' . JOURNAL_ID . '.php')) {
    require_once DIR_FS_MODULES . 'phreepos/custom/classes/journal/journal_' . JOURNAL_ID . '.php';
} else {
    require_once DIR_FS_MODULES . 'phreepos/classes/journal/journal_' . JOURNAL_ID . '.php';
    // is needed here for the defining of the class and retriving the security_token
}
$class = 'journal_' . JOURNAL_ID;
/**************   page specific initialization  *************************/
define('POPUP_FORM_TYPE', 'pos:rcpt');
$error = false;
history_filter('pos_mgr');
/***************   hook for custom actions  ***************************/
$date = gen_db_date($_REQUEST['search_date']);
$acct_period = $_REQUEST['search_period'];
$oid = isset($_GET['oID']) ? $_GET['oID'] : false;
/***************   hook for custom actions  ***************************/
$custom_path = DIR_FS_WORKING . 'custom/pages/pos_mgr/extra_actions.php';
if (file_exists($custom_path)) {
    include $custom_path;
}
/***************   Act on the action request   *************************/
switch ($_REQUEST['action']) {
    case 'delete':
        $id = db_prepare_input($_POST['rowSeq']);
        if ($id) {
            $delOrd = new $class($id);
Пример #20
0
require DIR_FS_WORKING . 'classes/contacts.php';
/**************   page specific initialization  *************************/
define('JOURNAL_ID', (int) $_GET['jID']);
$account_type = isset($_GET['type']) ? $_GET['type'] : 'c';
// current types are c (customer) and v (vendor)
switch ($account_type) {
    default:
    case 'c':
        $terms_type = 'AR';
        break;
    case 'v':
        $terms_type = 'AP';
        break;
}
$fill = isset($_GET['fill']) ? $_GET['fill'] : 'bill';
history_filter('contacts_popup');
$cInfo = new contacts();
/***************   hook for custom actions  ***************************/
$custom_path = DIR_FS_WORKING . 'custom/pages/popup_accts/extra_actions.php';
if (file_exists($custom_path)) {
    include $custom_path;
}
/***************   Act on the action request   *************************/
switch ($_REQUEST['action']) {
    case 'go_first':
        $_REQUEST['list'] = 1;
        break;
    case 'go_previous':
        $_REQUEST['list'] = max($_REQUEST['list'] - 1, 1);
        break;
    case 'go_next':
Пример #21
0
// |                                                                 |
// | 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/work_orders/pages/tasks/pre_process.php
//
$security_level = validate_user(SECURITY_WORK_ORDERS_TASK);
/**************  include page specific files    *********************/
require DIR_FS_WORKING . 'defaults.php';
require DIR_FS_WORKING . 'functions/work_orders.php';
/**************   page specific initialization  *************************/
$error = false;
$processed = false;
history_filter('wo_tasks');
/***************   hook for custom actions  ***************************/
$custom_path = DIR_FS_WORKING . 'custom/pages/tasks/extra_actions.php';
if (file_exists($custom_path)) {
    include $custom_path;
}
/***************   Act on the action request   *************************/
switch ($_REQUEST['action']) {
    case 'save':
        validate_security($security_level, 2);
        $id = db_prepare_input($_POST['id']);
        $task_name = db_prepare_input($_POST['task_name']);
        $description = db_prepare_input($_POST['description']);
        $ref_doc = db_prepare_input($_POST['ref_doc']);
        $ref_spec = db_prepare_input($_POST['ref_spec']);
        $dept_id = db_prepare_input($_POST['dept_id']);
Пример #22
0
//
$security_level = validate_user(SECURITY_WORK_ORDERS);
/**************  include page specific files    *********************/
require_once DIR_FS_MODULES . 'inventory/defaults.php';
require_once DIR_FS_WORKING . 'functions/work_orders.php';
/**************   page specific initialization  *************************/
$error = false;
$processed = false;
$lock_title = false;
$hide_save = false;
$image = false;
$step_list = array();
$store_id = 0;
$post_date = $_POST['post_date'] ? gen_db_date($_POST['post_date']) : date('Y-m-d');
$close_date = $_POST['close_date'] ? $_POST['close_date'] : '';
history_filter('wo_main');
/***************   hook for custom actions  ***************************/
$custom_path = DIR_FS_WORKING . 'custom/pages/main/extra_actions.php';
if (file_exists($custom_path)) {
    include $custom_path;
}
/***************   Act on the action request   *************************/
switch ($_REQUEST['action']) {
    case 'new':
        break;
    case 'save':
    case 'print':
        validate_security($security_level, 2);
        $id = db_prepare_input($_POST['id']);
        $sku = db_prepare_input($_POST['sku']);
        $sku_id = db_prepare_input($_POST['sku_id']);
Пример #23
0
/**************   page specific initialization  *************************/
$error = false;
$contact_js = '';
$js_pmt_array = '';
$js_actions = '';
$criteria = array();
$tab_list = array();
if ($_POST['crm_date']) {
    $_POST['crm_date'] = gen_db_date($_POST['crm_date']);
}
if ($_POST['due_date']) {
    $_POST['due_date'] = gen_db_date($_POST['due_date']);
}
$type = isset($_GET['type']) ? $_GET['type'] : 'c';
// default to customer
history_filter('contacts' . $type, $defaults = array('sf' => '', 'so' => 'asc'));
// load the filters
$default_f0 = defined('CONTACTS_F0_' . strtoupper($type)) ? constant('CONTACTS_F0_' . strtoupper($type)) : DEFAULT_F0_SETTING;
$_SESSION['f0'] = isset($_SESSION['f0']) ? $_SESSION['f0'] : $default_f0;
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $_SESSION['f0'] = isset($_POST['f0']) ? $_REQUEST['f0'] : false;
}
// show inactive checkbox
if (file_exists(DIR_FS_WORKING . 'custom/classes/type/' . $type . '.php')) {
    require_once DIR_FS_WORKING . 'custom/classes/type/' . $type . '.php';
} else {
    require_once DIR_FS_WORKING . 'classes/type/' . $type . '.php';
    // is needed here for the defining of the class and retrieving the security_token
}
if ($type != 'i' && file_exists(DIR_FS_WORKING . 'custom/classes/type/i.php')) {
    require_once DIR_FS_WORKING . 'custom/classes/type/i.php';
Пример #24
0
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';
        $result = $db->Execute("select next_check_num from " . TABLE_CURRENT_STATUS);
        $default_purchase_invoice_id = $result->fields['next_check_num'];
        break;
    default:
        die('Bad Journal id in modules/phreebooks/popup.php');
}
history_filter('pb_pop_contacts');
/***************   hook for custom actions  ***************************/
$custom_path = DIR_FS_WORKING . 'custom/pages/popup_bills_accts/extra_actions.php';
if (file_exists($custom_path)) {
    include $custom_path;
}
/***************   Act on the action request   *************************/
switch ($_REQUEST['action']) {
    case 'go_first':
        $_REQUEST['list'] = 1;
        break;
    case 'go_previous':
        $_REQUEST['list'] = max($_REQUEST['list'] - 1, 1);
        break;
    case 'go_next':
        $_REQUEST['list']++;