Пример #1
0
 function initialize($module)
 {
     global $db, $messageStack;
     gen_pull_language('inventory');
     require_once DIR_FS_MODULES . 'zencart/classes/zencart.php';
     require_once DIR_FS_MODULES . 'zencart/functions/zencart.php';
     require_once DIR_FS_MODULES . 'zencart/language/' . $_SESSION['language'] . '/language.php';
     require_once DIR_FS_MODULES . 'inventory/defaults.php';
     require_once DIR_FS_MODULES . 'inventory/functions/inventory.php';
     $error = false;
     if (defined('MODULE_ZENCART_LAST_UPDATE') && MODULE_ZENCART_LAST_UPDATE != '') {
         $where = " and ( last_update >'" . MODULE_ZENCART_LAST_UPDATE . "' or last_journal_date >'" . MODULE_ZENCART_LAST_UPDATE . "')";
     }
     $result = $db->Execute("select id from " . TABLE_INVENTORY . " where catalog = '1' " . $where);
     $cnt = 0;
     if ($result->RecordCount() == 0) {
         return true;
     }
     while (!$result->EOF) {
         $prodXML = new zencart();
         if (!$prodXML->submitXML($result->fields['id'], 'product_ul', true, true)) {
             $error = true;
             break;
         }
         $cnt++;
         $result->MoveNext();
     }
     if ($error) {
         return false;
     }
     $messageStack->add(sprintf(ZENCART_BULK_UPLOAD_SUCCESS, $cnt), 'success');
     gen_add_audit_log(ZENCART_BULK_UPLOAD);
     write_configure('MODULE_ZENCART_LAST_UPDATE', date('Y-m-d H:i:s'));
 }
Пример #2
0
 public function __construct($sync = true)
 {
     gen_pull_language('inventory');
     require DIR_FS_MODULES . 'inventory/defaults.php';
     foreach ($inventory_types_plus as $key => $value) {
         $this->type_array[] = array('id' => $key, 'text' => $value);
     }
     $this->type_desc = INV_ENTRY_INVENTORY_TYPE;
     parent::__construct($sync);
 }
Пример #3
0
 public function __construct()
 {
     gen_pull_language('assets');
     $this->type_array[] = array('id' => 'vh', 'text' => TEXT_VEHICLE);
     $this->type_array[] = array('id' => 'bd', 'text' => TEXT_BUILDING);
     $this->type_array[] = array('id' => 'fn', 'text' => TEXT_FURNITURE);
     $this->type_array[] = array('id' => 'pc', 'text' => TEXT_COMPUTER);
     $this->type_array[] = array('id' => 'te', 'text' => TEXT_EQUIP);
     $this->type_array[] = array('id' => 'ld', 'text' => TEXT_LAND);
     $this->type_array[] = array('id' => 'sw', 'text' => TEXT_SOFTWARE);
     $this->type_desc = ASSETS_ENTRY_ASSETS_TYPE;
     parent::__construct();
 }
Пример #4
0
 function install($module)
 {
     $error = false;
     // load all the active modules and load directory structure, reports
     global $loaded_modules;
     if (is_array($loaded_modules)) {
         foreach ($loaded_modules as $method) {
             require_once DIR_FS_MODULES . $method . '/classes/install.php';
             gen_pull_language($method, 'admin');
             $cName = $method . '_admin';
             $mInstall = new $cName();
             $mInstall->load_reports($method);
         }
     }
     return $error;
 }
Пример #5
0
function pf_process_phreebooks($strData, $Process)
{
    switch ($Process) {
        case "ordr_qty":
            return pb_pull_order_qty($strData);
        case "j_desc":
            gen_pull_language('phreebooks');
            return defined('GEN_ADM_TOOLS_J' . str_pad($strData, 2, '0', STR_PAD_LEFT)) ? constant('GEN_ADM_TOOLS_J' . str_pad($strData, 2, '0', STR_PAD_LEFT)) : $strData;
        case "coa_type":
            return pb_get_coa_type($strData);
        case "avg_cost":
            return pb_get_avg_cost($strData);
        case "avg_total":
            return pb_get_avg_total($strData);
        default:
            // Do nothing
    }
    return $strData;
    // No Process recognized, return original value
}
Пример #6
0
     if (!install_build_co_config_file($db_name, 'DB_SERVER_HOST', $db_server)) {
         $error = true;
     }
 }
 $copy_modules = $core_modules;
 foreach ($loaded_modules as $entry) {
     if (isset($_POST[$entry])) {
         $copy_modules[] = $entry;
     }
 }
 $backup = new backup();
 $backup->source_dir = DIR_FS_MY_FILES . $db_name . '/temp/';
 $backup->source_file = 'temp.sql';
 if (!$error) {
     foreach ($copy_modules as $entry) {
         gen_pull_language($entry, 'admin');
     }
     foreach ($copy_modules as $entry) {
         require_once DIR_FS_MODULES . $entry . '/classes/install.php';
         $classname = $entry . '_admin';
         $install_mod = new $classname();
         $task = $_POST[$entry . '_action'];
         if ($entry == 'phreedom') {
             $task = 'data';
         }
         // force complete copy of phreedom module
         switch ($task) {
             case 'core':
             case 'demo':
                 if (admin_install_dirs($install_mod->dirlist, DIR_FS_MY_FILES . $db_name . '/')) {
                     $error = true;
Пример #7
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/phreedom/pages/encryption/pre_process.php
//
$security_level = validate_user(SECURITY_ID_ENCRYPTION);
/**************  include page specific files    *********************/
gen_pull_language($module, 'admin');
/**************   page specific initialization  *************************/
$error = false;
/***************   hook for custom actions  ***************************/
$custom_path = DIR_FS_WORKING . 'custom/pages/encryption/extra_actions.php';
if (file_exists($custom_path)) {
    include $custom_path;
}
/***************   Act on the action request   *************************/
switch ($_REQUEST['action']) {
    case 'save':
        $enc_key = db_prepare_input($_POST['enc_key']);
        $enc_key_confirm = db_prepare_input($_POST['enc_key_confirm']);
        if ($enc_key != $enc_key_confirm) {
            $error = $messageStack->add(ERROR_WRONG_ENCRYPT_KEY_MATCH, 'error');
        } elseif ($enc_key) {
// +-----------------------------------------------------------------+
// | 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/phreebooks/pages/popup_status/pre_process.php
//
$security_level = validate_user(0, true);
/**************  include page specific files    *********************/
gen_pull_language('contacts');
require_once DIR_FS_WORKING . 'functions/phreebooks.php';
/**************   page specific initialization  *************************/
$id = (int) $_GET['id'];
/***************   Act on the action request   *************************/
// Load the customer status
$customer = $db->Execute("select c.type, c.inactive, c.special_terms, a.notes \n  from " . TABLE_CONTACTS . " c inner join " . TABLE_ADDRESS_BOOK . " a on c.id = a.ref_id \n  where c.id = " . $id . " and a.type like '%m'");
$notes = $customer->fields['notes'] ? str_replace(chr(10), "<br />", $customer->fields['notes']) : '&nbsp;';
$type = $customer->fields['type'] == 'v' ? 'AP' : 'AR';
$new_data = calculate_aging($id, $customer->fields['type'], $customer->fields['special_terms']);
// set the customer/vendor status in order of importance
if ($customer->fields['inactive']) {
    $inactive_flag = 'class="ui-state-error"';
    $status_text = TEXT_INACTIVE;
} elseif ($new_data['past_due'] > 0) {
    $inactive_flag = 'class="ui-state-highlight"';
Пример #9
0
// 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&amp;page=main&amp;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&amp;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&amp;page=pos_mgr&amp;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&amp;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&amp;page=deposit&amp;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&amp;page=deposit&amp;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&amp;page=admin', 'SSL'), 'show_in_users_settings' => false, 'params' => '');
    }
}
Пример #10
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/amazon/pages/amazon/pre_process.php
//
define('AMAZON_SHIP_CONFIRM_FILE_NAME', 'confirm_' . date('Y-m-d') . '.txt');
$security_level = validate_user(SECURITY_ID_AMAZON_INTERFACE);
/**************  include page specific files    *********************/
gen_pull_language('phreebooks');
//require(DIR_FS_MODULES . 'phreebooks/functions/phreebooks.php');
require DIR_FS_MODULES . 'phreebooks/classes/gen_ledger.php';
//require(DIR_FS_MODULES . 'phreebooks/classes/orders.php');
//require(DIR_FS_ADMIN   . 'soap/classes/parser.php');
require DIR_FS_WORKING . 'classes/amazon.php';
/**************   page specific initialization  *************************/
$upload_name = 'file_name';
// Template field name for the uploaded file
define('JOURNAL_ID', 12);
// used for importing orders, 12 is hard coded for amazon invoice manager
define('SO_POPUP_FORM_TYPE', 'cust:so');
define('POPUP_FORM_TYPE', 'cust:inv');
$error = false;
// fill search and accounting period criteria
$acct_period = $_GET['search_period'] ? $_GET['search_period'] : CURRENT_ACCOUNTING_PERIOD;
Пример #11
0
// 3.1 => 2011-04-15 - Bug fixes
// 3.3 => 2011-11-15 - Theme conversion
// 3.6 => 2013-09-23 - Updates for PhreeBooks R3.6
// 3.7 => 2014-07-18 - bug fix
// Module software version information
gen_pull_language('phreebooks', 'menu');
define('MODULE_ASSETS_VERSION', 3.7);
// Menu sort positions
define('MENU_HEADING_ASSETS_ORDER', 77);
define('BOX_ASSETS_MODULE_ORDER', 90);
// Menu security id's
define('SECURITY_ASSETS_MGT', 170);
// New database tables
define('TABLE_ASSETS', DB_PREFIX . 'assets');
if (defined('MODULE_ASSETS_STATUS')) {
    if (defined(ASSETS_OWN_HEADING) && ASSETS_OWN_HEADING == TRUE) {
        // Set the title menu
        $mainmenu["assets"] = array('order' => MENU_HEADING_ASSETS_ORDER, 'text' => MENU_HEADING_ASSETS, 'link' => html_href_link(FILENAME_DEFAULT, 'module=phreedom&amp;page=main&amp;mID=cat_assets', 'SSL'));
        $mainmenu["assets"]['submenu']["new_asset"] = array('order' => 1, 'text' => sprintf(BOX_TEXT_NEW_TITLE, BOX_ASSET_MODULE), 'security_id' => SECURITY_ASSETS_MGT, 'link' => html_href_link(FILENAME_DEFAULT, 'module=assets&amp;page=main&amp;action=new', 'SSL'), 'show_in_users_settings' => false, 'params' => '');
        $mainmenu["assets"]['submenu']["asset_mgr"] = array('order' => 2, 'text' => sprintf(BOX_STATUS_MGR, BOX_ASSET_MODULE), 'security_id' => SECURITY_ASSETS_MGT, 'link' => html_href_link(FILENAME_DEFAULT, 'module=assets&amp;page=main', 'SSL'), 'show_in_users_settings' => true, 'params' => '');
    } else {
        $mainmenu["company"]['submenu']["assets"] = array('order' => BOX_ASSETS_MODULE_ORDER, 'text' => BOX_ASSET_MODULE, 'security_id' => SECURITY_ASSETS_MGT, 'link' => html_href_link(FILENAME_DEFAULT, 'module=assets&amp;page=main', 'SSL'), 'show_in_users_settings' => false, 'params' => '');
        $mainmenu["company"]['submenu']["assets"]['submenu']["new_asset"] = array('order' => 1, 'text' => sprintf(BOX_TEXT_NEW_TITLE, BOX_ASSET_MODULE), 'security_id' => SECURITY_ASSETS_MGT, 'link' => html_href_link(FILENAME_DEFAULT, 'module=assets&amp;page=main&amp;action=new', 'SSL'), 'show_in_users_settings' => false, 'params' => '');
        // Set the menus
        $mainmenu["company"]['submenu']["assets"]['submenu']["asset_mgr"] = array('order' => 2, 'text' => sprintf(BOX_STATUS_MGR, BOX_ASSET_MODULE), 'security_id' => SECURITY_ASSETS_MGT, 'link' => html_href_link(FILENAME_DEFAULT, 'module=assets&amp;page=main', '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('assets', 'admin');
        $mainmenu["company"]['submenu']["configuration"]['submenu']["asset"] = array('order' => MODULE_ASSETS_TITLE, 'text' => MODULE_ASSETS_TITLE, 'security_id' => SECURITY_ID_CONFIGURATION, 'link' => html_href_link(FILENAME_DEFAULT, 'module=assets&amp;page=admin', 'SSL'), 'show_in_users_settings' => false, 'params' => '');
    }
}
Пример #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/phreedom/ajax/tab_details.php
//
/**************   Check user security   *****************************/
$security_level = validate_ajax_user();
/**************  include page specific files    *********************/
gen_pull_language('phreedom', 'admin');
gen_pull_language($_GET['mod'], 'admin');
require_once DIR_FS_MODULES . 'phreedom/functions/phreedom.php';
/**************   page specific initialization  *************************/
$page = $_GET['mod'];
$subject = $_GET['subject'];
$rID = $_GET['rID'];
$xml = NULL;
if (!$page || !subject) {
    die('no subject or module');
}
if (!$_REQUEST['list']) {
    $_REQUEST['list'] = 1;
}
if (!$_REQUEST['action']) {
    $_REQUEST['action'] = 'go_first';
}
Пример #13
0
// +-----------------------------------------------------------------+
// | 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/phreebooks/classes/income_statement_au.php
//
gen_pull_language('phreebooks', 'admin');
// need coa types defines
// this file contains special function calls to generate the data array needed to build reports not possible
// with the current reportbuilder structure.
class income_statement_au
{
    function __construct()
    {
        global $currencies;
        $this->zero = $currencies->format(0);
        $this->coa_types = load_coa_types();
        $this->inc_stmt_data = array();
    }
    function load_report_data($report)
    {
        global $db;
Пример #14
0
function gen_terms_to_language($terms_encoded, $short = true, $type = 'AR')
{
    gen_pull_language('contacts');
    // required for calculating terms
    $type = strtoupper($type);
    $terms = explode(':', $terms_encoded);
    $result = array();
    switch ($terms[0]) {
        default:
        case '0':
            // Default terms
            if ((int) constant($type . '_PREPAYMENT_DISCOUNT_PERCENT') != 0) {
                $result['long'] = ACT_DISCOUNT . constant($type . '_PREPAYMENT_DISCOUNT_PERCENT') . ACT_EARLY_DISCOUNT . ACT_DUE_IN . constant($type . '_PREPAYMENT_DISCOUNT_DAYS') . ACT_TERMS_EARLY_DAYS;
                $result['short'] = constant($type . '_PREPAYMENT_DISCOUNT_PERCENT') . ACT_EARLY_DISCOUNT_SHORT . constant($type . '_PREPAYMENT_DISCOUNT_DAYS') . ', ';
            }
            $result['long'] .= ACT_TERMS_NET . constant($type . '_NUM_DAYS_DUE') . ACT_TERMS_STANDARD_DAYS;
            $result['short'] .= ACT_TERMS_NET . constant($type . '_NUM_DAYS_DUE');
            break;
        case '1':
            // Cash on Delivery (COD)
            $result['long'] = ACT_COD_LONG;
            $result['short'] = ACT_COD_SHORT;
            break;
        case '2':
            // Prepaid
            $result['long'] = ACT_PREPAID;
            $result['short'] = ACT_PREPAID;
            break;
        case '3':
            // Special terms
            if ($terms[1] != 0) {
                $result['long'] = ACT_DISCOUNT . $terms[1] . ACT_EARLY_DISCOUNT . ACT_DUE_IN . $terms[2] . ACT_TERMS_EARLY_DAYS;
                $result['short'] = $terms[1] . ACT_EARLY_DISCOUNT_SHORT . $terms[2] . ', ';
            }
            $result['long'] .= ACT_TERMS_NET . $terms[3] . ACT_TERMS_STANDARD_DAYS;
            $result['short'] .= ACT_TERMS_NET . $terms[3];
            break;
        case '4':
            // Due on day of next month
            if ($terms[1] != 0) {
                $result['long'] = ACT_DISCOUNT . $terms[1] . ACT_EARLY_DISCOUNT . ACT_DUE_IN . $terms[2] . ACT_TERMS_EARLY_DAYS;
                $result['short'] = $terms[1] . ACT_EARLY_DISCOUNT_SHORT . $terms[2] . ', ';
            }
            $result['long'] .= ACT_DUE_ON . $terms[3];
            $result['short'] .= ACT_DUE_ON . $terms[3];
            break;
        case '5':
            // Due at end of month
            if ($terms[1] != 0) {
            } else {
                $result['long'] = ACT_DISCOUNT . $terms[1] . ACT_EARLY_DISCOUNT . ACT_DUE_IN . $terms[2] . ACT_TERMS_EARLY_DAYS;
                $result['short'] = $terms[1] . ACT_EARLY_DISCOUNT_SHORT . $terms[2] . ', ';
            }
            $result['long'] .= ACT_END_OF_MONTH;
            $result['short'] .= ACT_END_OF_MONTH;
    }
    if ($short) {
        return $result['short'];
    }
    return $result['long'];
}
Пример #15
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/payment/classes/payment.php
//
// Revision history
// 2012-05-11 - Created
gen_pull_language('payment');
class payment
{
    public $payment_fields;
    public $title;
    public $description;
    public $open_pos_drawer = false;
    public $show_in_pos = true;
    public $pos_gl_acct;
    public $sort_order;
    public $key = array();
    public function __construct()
    {
        define('FILENAME_POPUP_CVV_HELP', 'popup_cvv_help');
        // TBD
        $this->open_pos_drawer = defined('MODULE_PAYMENT_' . strtoupper($this->code) . '_OPEN_POS_DRAWER') ? constant('MODULE_PAYMENT_' . strtoupper($this->code) . '_OPEN_POS_DRAWER') : $this->open_pos_drawer;
Пример #16
0
//********************************* END OF IMPORTANT ****************************************//
if (!db_field_exists(TABLE_JOURNAL_MAIN, 'closed_date')) {
    // reconfigure table configuration to new format, remove this constant list whic is no longer needed
    $toBeRemoved = array('AR_PAYMENT_TERMS', 'AP_DEFAULT_TERMS', 'MODULE_PAYMENT_INSTALLED', 'MODULE_ZENCART_INSTALLED', 'PDF_APP', 'SEND_EMAILS', 'ENTRY_EMAIL_ADDRESS_CHECK', 'EMAIL_ARCHIVE', 'EMAIL_FRIENDLY_ERRORS', 'EMAIL_SEND_MUST_BE_STORE', 'CONTACT_US_LIST', 'CONTACT_US_STORE_NAME_ADDRESS', 'CC_OWNER_MIN_LENGTH', 'CC_NUMBER_MIN_LENGTH', 'CC_ENABLED_VISA', 'CC_ENABLED_MC', 'CC_ENABLED_AMEX', 'CC_ENABLED_DISCOVER', 'CC_ENABLED_DINERS_CLUB', 'CC_ENABLED_JCB', 'CC_ENABLED_AUSTRALIAN_BANKCARD', 'MODULE_PRICE_SHEET_QTY_STATUS', 'MODULE_PRICE_SHEET_QTY_SORT_ORDER', 'MODULE_PRICE_SHEETS_INSTALLED', 'MODULE_SHIPPING_INSTALLED', 'USE_DEFAULT_LANGUAGE_CURRENCY');
    foreach ($toBeRemoved as $value) {
        $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key = '" . $value . "'");
    }
    // change True's and False's to 1's and 0s
    $db->Execute("update " . TABLE_CONFIGURATION . " set configuration_value = '0'\n    where configuration_value in ('false', 'False', 'FALSE', 'no', 'No', 'NO')");
    $db->Execute("update " . TABLE_CONFIGURATION . " set configuration_value = '1'\n    where configuration_value in ('true', 'True', 'TRUE', 'yes', 'Yes', 'YES')");
    // increase field length to description
    $db->Execute("ALTER TABLE " . TABLE_JOURNAL_MAIN . " ADD closed_date DATE NOT NULL AFTER closed");
}
// convert reports
gen_pull_language('phreebooks');
gen_pull_language('phreeform', 'admin');
require_once DIR_FS_MODULES . 'phreeform/functions/phreeform.php';
require_once DIR_FS_MODULES . 'phreeform/functions/reportwriter.php';
$result = $db->Execute("select * from " . TABLE_REPORTS);
$count = 0;
while (!$result->EOF) {
    $skip_report = false;
    $report = PrepReport($result->fields['id']);
    if (!($params = import_text_params($report))) {
        $messageStack->add(sprintf(PB_CONVERT_SAVE_ERROR, $result->fields['description']), 'error');
        $skip_report = true;
    }
    // fix some fields
    $params->custom = $result->fields['standard_report'] ? 's' : 'c';
    if (!$skip_report) {
        if (!($success = save_report($params))) {
Пример #17
0
define('SECURITY_ID_PRICE_SHEET_MANAGER', 88);
define('SECURITY_ID_VEND_PRICE_SHEET_MGR', 89);
define('SECURITY_ID_ADJUST_INVENTORY', 152);
define('SECURITY_ID_ASSEMBLE_INVENTORY', 153);
define('SECURITY_ID_MAINTAIN_INVENTORY', 151);
define('SECURITY_ID_TRANSFER_INVENTORY', 156);
// New Database Tables
define('TABLE_INVENTORY', DB_PREFIX . 'inventory');
define('TABLE_INVENTORY_ASSY_LIST', DB_PREFIX . 'inventory_assy_list');
define('TABLE_INVENTORY_COGS_OWED', DB_PREFIX . 'inventory_cogs_owed');
define('TABLE_INVENTORY_COGS_USAGE', DB_PREFIX . 'inventory_cogs_usage');
define('TABLE_INVENTORY_HISTORY', DB_PREFIX . 'inventory_history');
define('TABLE_INVENTORY_MS_LIST', DB_PREFIX . 'inventory_ms_list');
define('TABLE_INVENTORY_PURCHASE', DB_PREFIX . 'inventory_purchase_details');
define('TABLE_INVENTORY_SPECIAL_PRICES', DB_PREFIX . 'inventory_special_prices');
define('TABLE_PRICE_SHEETS', DB_PREFIX . 'price_sheets');
// Set the title menu
// Set the menus
$mainmenu["inventory"]["submenu"]["new_inventory"] = array('order' => 1, 'text' => BOX_INV_NEW, 'security_id' => SECURITY_ID_MAINTAIN_INVENTORY, 'link' => html_href_link(FILENAME_DEFAULT, 'module=inventory&amp;page=main&amp;action=new', 'SSL'), 'show_in_users_settings' => false, 'params' => '');
$mainmenu["inventory"]["submenu"]["inventory_mgr"] = array('order' => 5, 'text' => BOX_INV_MAINTAIN, 'security_id' => SECURITY_ID_MAINTAIN_INVENTORY, 'link' => html_href_link(FILENAME_DEFAULT, 'module=inventory&amp;page=main&amp;list=1', 'SSL'), 'show_in_users_settings' => true, 'params' => '');
$mainmenu["inventory"]["submenu"]["adjustment"] = array('text' => ORD_TEXT_16_WINDOW_TITLE, 'order' => 15, 'security_id' => SECURITY_ID_ADJUST_INVENTORY, 'link' => html_href_link(FILENAME_DEFAULT, 'module=inventory&amp;page=adjustments', 'SSL'), 'show_in_users_settings' => true, 'params' => '');
$mainmenu["inventory"]["submenu"]["assemble"] = array('text' => ORD_TEXT_14_WINDOW_TITLE, 'order' => 20, 'security_id' => SECURITY_ID_ASSEMBLE_INVENTORY, 'link' => html_href_link(FILENAME_DEFAULT, 'module=inventory&amp;page=assemblies', 'SSL'), 'show_in_users_settings' => true, 'params' => '');
if (defined('ENABLE_MULTI_BRANCH') && ENABLE_MULTI_BRANCH) {
    $mainmenu["inventory"]["submenu"]["transfer"] = array('text' => BOX_INV_TRANSFER, 'order' => 80, 'security_id' => SECURITY_ID_TRANSFER_INVENTORY, 'link' => html_href_link(FILENAME_DEFAULT, 'module=inventory&amp;page=transfer', 'SSL'), 'show_in_users_settings' => true, 'params' => '');
}
$mainmenu["customers"]["submenu"]["pricesheet"] = array('text' => BOX_SALES_PRICE_SHEETS, 'order' => 65, 'security_id' => SECURITY_ID_PRICE_SHEET_MANAGER, 'link' => html_href_link(FILENAME_DEFAULT, 'module=inventory&amp;page=price_sheets&amp;type=c&amp;list=1', 'SSL'), 'show_in_users_settings' => true, 'params' => '');
$mainmenu["vendors"]["submenu"]["pricesheet"] = array('text' => BOX_PURCHASE_PRICE_SHEETS, 'order' => 65, 'security_id' => SECURITY_ID_VEND_PRICE_SHEET_MGR, 'link' => html_href_link(FILENAME_DEFAULT, 'module=inventory&amp;page=price_sheets&amp;type=v&amp;list=1', '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('inventory', 'admin');
    $mainmenu["company"]['submenu']["configuration"]['submenu']["inventory"] = array('order' => MODULE_INVENTORY_TITLE, 'text' => MODULE_INVENTORY_TITLE, 'security_id' => SECURITY_ID_CONFIGURATION, 'link' => html_href_link(FILENAME_DEFAULT, 'module=inventory&amp;page=admin', 'SSL'), 'show_in_users_settings' => false, 'params' => '');
}
Пример #18
0
 function initialize($loaded_modules)
 {
     global $db, $messageStack, $currencies;
     // load the latest currency exchange rates
     if (web_connected(false) && AUTO_UPDATE_CURRENCY && ENABLE_MULTI_CURRENCY) {
         gen_pull_language('phreedom', 'admin');
         require_once DIR_FS_MODULES . 'phreedom/classes/currency.php';
         $currency = new currency();
         $currency->btn_update();
     }
     // Fix for change to audit log for upgrade to R3.6 causes perpertual crashing when writing audit log
     if (!db_field_exists(TABLE_AUDIT_LOG, 'stats')) {
         $db->Execute("ALTER TABLE " . TABLE_AUDIT_LOG . " ADD stats VARCHAR(32) NOT NULL AFTER ip_address");
     }
     // load installed modules and initialize them
     if (is_array($loaded_modules)) {
         foreach ($loaded_modules as $module) {
             if ($module == 'phreedom') {
                 continue;
             }
             // skip this module
             require_once DIR_FS_MODULES . $module . '/classes/install.php';
             $install_class = $module . '_admin';
             $mod_init = new $install_class();
             if (constant('MODULE_' . strtoupper($module) . '_STATUS') != constant('MODULE_' . strtoupper($module) . '_VERSION')) {
                 // add any new constants
                 if (sizeof($mod_init->keys) > 0) {
                     foreach ($mod_init->keys as $key => $value) {
                         if (!defined($key)) {
                             write_configure($key, $value);
                         }
                     }
                 }
                 admin_install_dirs($mod_init->dirlist, DIR_FS_MY_FILES . $_SESSION['company'] . '/');
                 if (method_exists($mod_init, 'update')) {
                     $mod_init->update($module);
                 }
             }
             if (method_exists($mod_init, 'initialize')) {
                 $mod_init->initialize($module);
             }
         }
     }
     if (web_connected(false) && CFG_AUTO_UPDATE_CHECK && SECURITY_ID_CONFIGURATION > 3) {
         // check for software updates
         $revisions = @file_get_contents(VERSION_CHECK_URL);
         if ($revisions) {
             $versions = xml_to_object($revisions);
             $latest = $versions->Revisions->Phreedom->Current;
             $current = MODULE_PHREEDOM_VERSION;
             if ($latest > $current) {
                 $messageStack->add_session(sprintf(TEXT_VERSION_CHECK_NEW_VER, $current, $latest), 'caution');
             }
             foreach ($loaded_modules as $mod) {
                 // check rest of modules
                 if ($mod == 'phreedom') {
                     continue;
                 }
                 // skip this module
                 $latest = $versions->Revisions->Modules->{$mod}->Current;
                 $current = constant('MODULE_' . strtoupper($mod) . '_VERSION');
                 if ($latest > $current) {
                     $messageStack->add_session(sprintf(TEXT_VERSION_CHECK_NEW_MOD_VER, $mod, $current, $latest), 'caution');
                 }
             }
         }
     }
     // Make sure the install directory has been moved/removed
     if (is_dir(DIR_FS_ADMIN . 'install')) {
         $messageStack->add_session(TEXT_INSTALL_DIR_PRESENT, 'caution');
     }
 }
Пример #19
0
         $xml .= xmlEntry('id', $key);
         $xml .= xmlEntry('text', $value);
         $xml .= '</menu>' . chr(10);
     }
     break;
 case 'chart':
     $modID = $_GET['modID'];
     $fID = $_GET['fID'];
     $x = 0;
     $data = array();
     while (isset($_GET['d' . $x])) {
         $data[$x] = $_GET['d' . $x];
         $x++;
     }
     if (file_exists(DIR_FS_MODULES . $modID . '/functions/' . $modID . '.php')) {
         gen_pull_language($modID);
         require_once DIR_FS_MODULES . $modID . '/functions/' . $modID . '.php';
         if ($results = get_chart_data($fID, $data)) {
             $xml .= xmlEntry('modID', $_GET['modID']);
             $xml .= xmlEntry('type', $results['type']);
             $xml .= xmlEntry('title', $results['title']);
             $xml .= xmlEntry('width', $results['width']);
             $xml .= xmlEntry('height', $results['height']);
             $xml .= xmlEntry('rowCnt', sizeof($results['data']));
             if (sizeof($results['data']) > 0) {
                 foreach ($results['data'] as $value) {
                     $xml .= '<chartData>';
                     $xml .= xmlEntry('string', $value['label']);
                     $xml .= xmlEntry('number', $value['value']);
                     $xml .= '</chartData>';
                 }
Пример #20
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/payment/config.php
//
// Release History
// 3.0 => 2011-01-15 - Converted from stand-alone PhreeBooks release
// 3.1 => 2011-04-15 - Bug fixes
// 3.2 => 2011-08-01 - Bug fixes
// 3.3 => 2011-11-15 - bug fixes, themeroller changes
// 3.4 => 2012-02-15 - bug fixes
// 3.5 => 2012-05-13 - bug fixes, redesign of the classes/methods
// 3.6 => 2013-06-30 - bug fixes
// 3.7 => 2014-07-21 - bug fixes
// Module software version information
define('MODULE_PAYMENT_VERSION', 3.7);
// Menu Sort Positions
// Menu Security id's (refer to master doc to avoid security setting overlap)
define('SECURITY_ID_PAYMENT', 81);
// New Database Tables
// Set the title menu
// Set the menus
if (defined('MODULE_PAYMENT_STATUS')) {
    if (isset($_SESSION['admin_security'][SECURITY_ID_CONFIGURATION]) && $_SESSION['admin_security'][SECURITY_ID_CONFIGURATION] > 0) {
        gen_pull_language('payment', 'admin');
        $mainmenu["company"]['submenu']["configuration"]['submenu']["payment"] = array('order' => MODULE_PAYMENT_TITLE, 'text' => MODULE_PAYMENT_TITLE, 'security_id' => SECURITY_ID_CONFIGURATION, 'link' => html_href_link(FILENAME_DEFAULT, 'module=payment&amp;page=admin', 'SSL'), 'show_in_users_settings' => false, 'params' => '');
    }
}
Пример #21
0
// | GNU General Public License for more details.                    |
// +-----------------------------------------------------------------+
//  Path: /modules/zencart/config.php
//
// Release History
// 3.0 => 2011-01-25 - Converted from stand-alone PhreeBooks release
// 3.1 => 2011-04-15 - Bug fixes
// 3.2 => 2011-05-27 - Patch for shared field change in Phreedom 3.1
// 3.5 => 2013-08-08 - added product fields
// 3.6 => 2014-01-15 - updated for move back to phreebooks and menu changes
// Module software version information
define('MODULE_ZENCART_VERSION', 3.6);
// 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_INTERFACE', 200);
// New Database Tables
if (defined('MODULE_ZENCART_STATUS')) {
    /*
      $pb_headings[MENU_HEADING_ZENCART_ORDER] = array(
        'text' => MENU_HEADING_ZENCART, 
        'link' => html_href_link(FILENAME_DEFAULT, 'module=phreedom&amp;page=index&amp;mID=cat_zencart', 'SSL'),
      );
    */
    // Menu Locations
    $mainmenu["tools"]['submenu']['zencart'] = array('text' => BOX_ZENCART_MODULE, 'rank' => 31, 'security_id' => SECURITY_ID_ZENCART_INTERFACE, 'link' => html_href_link(FILENAME_DEFAULT, 'module=zencart&amp;page=main', '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('zencart', 'admin');
        $mainmenu["company"]['submenu']["configuration"]['submenu']["zencart"] = array('order' => MODULE_ZENCART_TITLE, 'text' => MODULE_ZENCART_TITLE, 'security_id' => SECURITY_ID_CONFIGURATION, 'link' => html_href_link(FILENAME_DEFAULT, 'module=zencart&amp;page=admin', 'SSL'), 'show_in_users_settings' => false, 'params' => '');
    }
}
Пример #22
0
//  Path: /modules/import_bank/config.php
//
// Release History
// 0.1 01-03-2011 created.
// 0.2 04-03-2011 location of xml changed and sample added.
// 0.3 22-03-2011 Added install functions for contacts 3.1
// 0.4 31-01-2011 removed bugg from install class
// 1   15-01-2013 added the function so that multiple bank could be attached to one contact and added iban support.
// 1.1 27-1-2013  added the transaction templates (aka known transactions). plus support for payment of multiple invoices.
// 2   28-1-2013  	complete rewrite reduced the number of sql calles.
//					added function to find invoicenumber in description for transactions that are not connected to a bank or iban account
// 2.1 27-09-2013 fixed bug that it would try to find a contact for known_transactions.
// 2.2 28-08-2014 fixed bug that it would try to find a contact for known_transactions.
// 2.3 24-09-2014 fixed bug.
gen_pull_language('phreedom', 'menu');
// Module software version information
define('MODULE_IMPORT_BANK_VERSION', 2.3);
// Menu Sort Positions
// Menu Security id's
define('SECURITY_ID_IMPORT_BANK', 980);
// New Database Tables
define('TABLE_IMPORT_BANK', DB_PREFIX . 'import_bank');
// Set the menus
gen_pull_language('phreebooks');
if (defined('MODULE_IMPORT_BANK_STATUS')) {
    $mainmenu["banking"]['submenu']['import_banking'] = array('text' => BOX_IMPORT_BANK_MODULE, 'order' => 55, 'security_id' => SECURITY_ID_IMPORT_BANK, 'link' => html_href_link(FILENAME_DEFAULT, 'module=import_bank&amp;page=main', '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('import_bank', 'admin');
        $mainmenu["company"]['submenu']["configuration"]['submenu']["import_bank"] = array('order' => MODULE_IMPORT_BANK_TITLE, 'text' => MODULE_IMPORT_BANK_TITLE, 'security_id' => SECURITY_ID_CONFIGURATION, 'link' => html_href_link(FILENAME_DEFAULT, 'module=import_bank&amp;page=admin', 'SSL'), 'show_in_users_settings' => false, 'params' => '');
    }
}
Пример #23
0
        $result->MoveNext();
    }
    // search the list modules and load configuration files and language files
    gen_pull_language('phreedom', 'menu');
    gen_pull_language('phreebooks', 'menu');
    require_once DIR_FS_MODULES . 'phreedom/config.php';
    $messageStack->debug_header();
    $loaded_modules = array();
    $dirs = scandir(DIR_FS_MODULES);
    foreach ($dirs as $dir) {
        // first pull all module language files, loaded or not
        if ($dir == '.' || $dir == '..') {
            continue;
        }
        if (is_dir(DIR_FS_MODULES . $dir)) {
            gen_pull_language($dir, 'menu');
        }
        if (defined('MODULE_' . strtoupper($dir) . '_STATUS')) {
            // module is loaded
            $loaded_modules[] = $dir;
            require_once DIR_FS_MODULES . $dir . '/config.php';
        }
    }
    // pull in the custom language over-rides for this module (to pre-define the standard language)
    $path = DIR_FS_MODULES . $module . '/custom/pages/' . $page . '/extra_menus.php';
    if (file_exists($path)) {
        include $path;
    }
    $currencies = new currencies();
}
if (isset($_SESSION['LAST_ACTIVITY']) && time() - $_SESSION['LAST_ACTIVITY'] > (SESSION_TIMEOUT_ADMIN < 360 ? 360 : SESSION_TIMEOUT_ADMIN)) {
Пример #24
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/shipping/config.php
//
// Release History
// 3.0 => 2011-01-15 - Converted from stand-alone PhreeBooks release
// 3.1 => 2011-04-15 - Bug fixes, java label printing, improved xml
// 3.2 => 2011-08-01 - Bug fixes
// 3.3 => 2011-11-15 - Bug fixes, themeroller changes
// 3.4 => 2012-02-15 - bug fixes
// 3.5 => 2012-10-01 - bug fixes
// 3.6 => 2013-06-30 - bug fixes
// 3.7 => 2014-07-21 - bug fixes
// Module software version information
define('MODULE_SHIPPING_VERSION', 3.7);
// Menu Sort Positions
// Menu Security id's (refer to master doc to avoid security setting overlap)
define('SECURITY_ID_SHIPPING_MANAGER', 13);
// New Database Tables
define('TABLE_SHIPPING_LOG', DB_PREFIX . 'shipping_log');
// Set the title menu
// Set the menus
if (defined('MODULE_SHIPPING_STATUS')) {
    $mainmenu["tools"]['submenu']['shipping'] = array('text' => BOX_SHIPPING_MANAGER, 'order' => 5, 'security_id' => SECURITY_ID_SHIPPING_MANAGER, 'link' => html_href_link(FILENAME_DEFAULT, 'module=shipping&amp;page=ship_mgr', 'SSL'), 'show_in_users_settings' => true);
    if (isset($_SESSION['admin_security'][SECURITY_ID_CONFIGURATION]) && $_SESSION['admin_security'][SECURITY_ID_CONFIGURATION] > 0) {
        gen_pull_language('shipping', 'admin');
        $mainmenu["company"]['submenu']["configuration"]['submenu']["shipping"] = array('order' => MODULE_SHIPPING_TITLE, 'text' => MODULE_SHIPPING_TITLE, 'security_id' => SECURITY_ID_CONFIGURATION, 'link' => html_href_link(FILENAME_DEFAULT, 'module=shipping&amp;page=admin', 'SSL'), 'show_in_users_settings' => false, 'params' => '');
    }
}
Пример #25
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/zencart/pages/main/pre_process.php
//
$security_level = validate_user(SECURITY_ID_ZENCART_INTERFACE);
/**************  include page specific files    *********************/
gen_pull_language('shipping');
gen_pull_language('inventory');
require_once DIR_FS_MODULES . 'inventory/defaults.php';
require_once DIR_FS_MODULES . 'shipping/defaults.php';
require_once DIR_FS_WORKING . 'functions/zencart.php';
require_once DIR_FS_MODULES . 'inventory/functions/inventory.php';
require_once DIR_FS_WORKING . 'classes/zencart.php';
require_once DIR_FS_WORKING . 'classes/bulk_upload.php';
/**************   page specific initialization  *************************/
$error = false;
$ship_date = $_POST['ship_date'] ? gen_db_date($_POST['ship_date']) : date('Y-m-d');
/***************   hook for custom actions  ***************************/
$custom_path = DIR_FS_MODULES . 'custom/zencart/pages/main/extra_actions.php';
if (file_exists($custom_path)) {
    include $custom_path;
}
/***************   Act on the action request   *************************/
Пример #26
0
// | 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/import_bank/config.php
//
gen_pull_language('phreedom', 'menu');
// Release History
// 1 16-10-2012 created.
// Module software version information
define('MODULE_AUDIT_VERSION', '1');
// Menu Sort Positions
// Menu Security id's
define('SECURITY_ID_AUDIT', 500);
// New Database Tables
// Set the menus
if (defined('MODULE_AUDIT_STATUS')) {
    $mainmenu["gl"]['submenu']["audit"] = array('order' => 80, 'text' => BOX_AUDIT_MODULE, 'show_in_users_settings' => true, 'security_id' => SECURITY_ID_AUDIT, 'link' => html_href_link(FILENAME_DEFAULT, 'module=audit&amp;page=main', 'SSL'), 'params' => '');
    if (isset($_SESSION['admin_security'][SECURITY_ID_CONFIGURATION]) && $_SESSION['admin_security'][SECURITY_ID_CONFIGURATION] > 0) {
        gen_pull_language('audit', 'admin');
        $mainmenu["company"]['submenu']["configuration"]['submenu']["audit"] = array('order' => MODULE_AUDIT_TITLE, 'text' => MODULE_AUDIT_TITLE, 'security_id' => SECURITY_ID_CONFIGURATION, 'link' => html_href_link(FILENAME_DEFAULT, 'module=audit&amp;page=admin', 'SSL'), 'show_in_users_settings' => false, 'params' => '');
    }
}
Пример #27
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/phreeform/pages/admin/pre_process.php
//
$security_level = validate_user(SECURITY_ID_CONFIGURATION);
/**************  include page specific files    *********************/
gen_pull_language($module, 'admin');
gen_pull_language('phreedom', 'admin');
require_once DIR_FS_WORKING . 'defaults.php';
require_once DIR_FS_WORKING . 'functions/phreeform.php';
require_once DIR_FS_MODULES . 'phreedom/functions/phreedom.php';
require_once DIR_FS_WORKING . 'classes/install.php';
/**************   page specific initialization  *************************/
$error = false;
$install = new phreeform_admin();
/***************   Act on the action request   *************************/
switch ($_REQUEST['action']) {
    case 'save':
        validate_security($security_level, 3);
        // save general tab
        foreach ($install->keys as $key => $default) {
            $field = strtolower($key);
            if (isset($_POST[$field])) {
Пример #28
0
$mainmenu["vendors"]['params'] = '';
$mainmenu["employees"]['order'] = MENU_HEADING_EMPLOYEES_ORDER;
$mainmenu["employees"]['text'] = MENU_HEADING_EMPLOYEES;
$mainmenu["employees"]['security_id'] = '';
$mainmenu["employees"]['link'] = html_href_link(FILENAME_DEFAULT, 'module=phreedom&amp;page=main&amp;mID=cat_hr', 'SSL');
$mainmenu["employees"]['params'] = '';
// Set the menus
$mainmenu["customers"]['submenu']["contact"] = array('order' => 10, 'text' => MENU_HEADING_CUSTOMERS, 'link' => html_href_link(FILENAME_DEFAULT, 'module=contacts&amp;page=main&amp;type=c&amp;list=1', 'SSL'), 'security_id' => SECURITY_ID_MAINTAIN_CUSTOMERS, 'show_in_users_settings' => false, 'params' => '');
$mainmenu["customers"]['submenu']["contact"]['submenu']["new_customer"] = array('text' => sprintf(BOX_TEXT_NEW_TITLE, TEXT_CUSTOMER), 'order' => 5, 'security_id' => SECURITY_ID_MAINTAIN_CUSTOMERS, 'link' => html_href_link(FILENAME_DEFAULT, 'module=contacts&amp;page=main&amp;action=new&amp;type=c', 'SSL'), 'show_in_users_settings' => false, 'params' => '');
$mainmenu["customers"]['submenu']["contact"]['submenu']["customer_mgr"] = array('text' => sprintf(BOX_STATUS_MGR, TEXT_CUSTOMER), 'order' => 10, 'security_id' => SECURITY_ID_MAINTAIN_CUSTOMERS, 'link' => html_href_link(FILENAME_DEFAULT, 'module=contacts&amp;page=main&amp;type=c&amp;list=1', 'SSL'), 'show_in_users_settings' => true, 'params' => '');
$mainmenu["customers"]['submenu']["crm"] = array('text' => BOX_PHREECRM_MODULE, 'order' => 15, 'security_id' => SECURITY_ID_PHREECRM, 'link' => html_href_link(FILENAME_DEFAULT, 'module=contacts&amp;page=main&amp;type=i&amp;list=1', 'SSL'), 'show_in_users_settings' => true, 'params' => '');
$mainmenu["vendors"]['submenu']["contact"] = array('order' => 10, 'text' => MENU_HEADING_VENDORS, 'link' => html_href_link(FILENAME_DEFAULT, 'module=contacts&amp;page=main&amp;type=v&amp;list=1', 'SSL'), 'security_id' => SECURITY_ID_MAINTAIN_VENDORS, 'show_in_users_settings' => false, 'params' => '');
$mainmenu["vendors"]['submenu']["contact"]['submenu']["new_vendor"] = array('text' => sprintf(BOX_TEXT_NEW_TITLE, TEXT_VENDOR), 'order' => 5, 'security_id' => SECURITY_ID_MAINTAIN_VENDORS, 'link' => html_href_link(FILENAME_DEFAULT, 'module=contacts&amp;page=main&amp;action=new&amp;type=v', 'SSL'), 'show_in_users_settings' => false, 'params' => '');
$mainmenu["vendors"]['submenu']["contact"]['submenu']["vendor_mgr"] = array('text' => sprintf(BOX_STATUS_MGR, TEXT_VENDOR), 'order' => 10, 'security_id' => SECURITY_ID_MAINTAIN_VENDORS, 'link' => html_href_link(FILENAME_DEFAULT, 'module=contacts&amp;page=main&amp;type=v&amp;list=1', 'SSL'), 'show_in_users_settings' => true, 'params' => '');
$mainmenu["employees"]['submenu']["contact"] = array('order' => 10, 'text' => MENU_HEADING_EMPLOYEES, 'link' => html_href_link(FILENAME_DEFAULT, 'module=contacts&amp;page=main&amp;type=e&amp;list=1', 'SSL'), 'security_id' => SECURITY_ID_MAINTAIN_EMPLOYEES, 'show_in_users_settings' => false, 'params' => '');
$mainmenu["employees"]['submenu']["contact"]['submenu']["new_employee"] = array('text' => sprintf(BOX_TEXT_NEW_TITLE, TEXT_EMPLOYEE), 'order' => 5, 'security_id' => SECURITY_ID_MAINTAIN_EMPLOYEES, 'link' => html_href_link(FILENAME_DEFAULT, 'module=contacts&amp;page=main&amp;action=new&amp;type=e', 'SSL'), 'show_in_users_settings' => false, 'params' => '');
$mainmenu["employees"]['submenu']["contact"]['submenu']["employee_mgr"] = array('text' => sprintf(BOX_STATUS_MGR, TEXT_EMPLOYEE), 'order' => 10, 'security_id' => SECURITY_ID_MAINTAIN_EMPLOYEES, 'link' => html_href_link(FILENAME_DEFAULT, 'module=contacts&amp;page=main&amp;type=e&amp;list=1', 'SSL'), 'show_in_users_settings' => true, 'params' => '');
if (defined('ENABLE_MULTI_BRANCH') && ENABLE_MULTI_BRANCH == true) {
    // don't show menu if multi-branch is disabled
    $mainmenu["company"]['submenu']["branches"] = array('order' => 55, 'text' => TEXT_BRANCHES, 'link' => html_href_link(FILENAME_DEFAULT, 'module=contacts&amp;page=main&amp;type=b&amp;list=1', 'SSL'), 'security_id' => SECURITY_ID_MAINTAIN_BRANCH, 'show_in_users_settings' => false, 'params' => '');
    $mainmenu["company"]['submenu']["branches"]['submenu']["new_branch"] = array('text' => sprintf(BOX_TEXT_NEW_TITLE, TEXT_BRANCH), 'order' => 55, 'security_id' => SECURITY_ID_MAINTAIN_BRANCH, 'link' => html_href_link(FILENAME_DEFAULT, 'module=contacts&amp;page=main&amp;action=new&amp;type=b', 'SSL'), 'show_in_users_settings' => false, 'params' => '');
    $mainmenu["company"]['submenu']["branches"]['submenu']["branch_mgr"] = array('text' => sprintf(BOX_STATUS_MGR, TEXT_BRANCH), 'order' => 56, 'security_id' => SECURITY_ID_MAINTAIN_BRANCH, 'link' => html_href_link(FILENAME_DEFAULT, 'module=contacts&amp;page=main&amp;type=b&amp;list=1', 'SSL'), 'show_in_users_settings' => true, 'params' => '');
}
// end disable if not looking at branches
$mainmenu["customers"]['submenu']['projects'] = array('order' => 60, 'text' => TEXT_PROJECTS, 'link' => html_href_link(FILENAME_DEFAULT, 'module=contacts&amp;page=main&amp;type=j&amp;list=1', 'SSL'), 'security_id' => SECURITY_ID_MAINTAIN_PROJECTS, 'show_in_users_settings' => false, 'params' => '');
$mainmenu["customers"]['submenu']['projects']['submenu']["new_project"] = array('text' => sprintf(BOX_TEXT_NEW_TITLE, TEXT_PROJECT), 'order' => 5, 'security_id' => SECURITY_ID_MAINTAIN_PROJECTS, 'link' => html_href_link(FILENAME_DEFAULT, 'module=contacts&amp;page=main&amp;action=new&amp;type=j', 'SSL'), 'show_in_users_settings' => false, 'params' => '');
$mainmenu["customers"]['submenu']['projects']['submenu']["project_mgr"] = array('text' => sprintf(BOX_STATUS_MGR, TEXT_PROJECT), 'order' => 10, 'security_id' => SECURITY_ID_MAINTAIN_PROJECTS, 'show_in_users_settings' => true, 'link' => html_href_link(FILENAME_DEFAULT, 'module=contacts&amp;page=main&amp;type=j&amp;list=1', 'SSL'), 'params' => '');
if (isset($_SESSION['admin_security'][SECURITY_ID_CONFIGURATION]) && $_SESSION['admin_security'][SECURITY_ID_CONFIGURATION] > 0) {
    gen_pull_language('contacts', 'admin');
    $mainmenu["company"]['submenu']["configuration"]['submenu']["contacts"] = array('order' => MODULE_CONTACTS_TITLE, 'text' => MODULE_CONTACTS_TITLE, 'security_id' => SECURITY_ID_CONFIGURATION, 'link' => html_href_link(FILENAME_DEFAULT, 'module=contacts&amp;page=admin', 'SSL'), 'show_in_users_settings' => false, 'params' => '');
}
Пример #29
0
// | 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/phreepos/ajax/other_transactions.php
//
$security_level = validate_user(SECURITY_ID_PHREEPOS);
define('JOURNAL_ID', 2);
/**************  include page specific files    *********************/
gen_pull_language('contacts');
gen_pull_language('phreebooks');
gen_pull_language('inventory');
gen_pull_language('phreeform');
require_once DIR_FS_MODULES . 'inventory/defaults.php';
require_once DIR_FS_MODULES . 'phreeform/defaults.php';
require_once DIR_FS_MODULES . 'phreebooks/functions/phreebooks.php';
require_once DIR_FS_MODULES . 'phreebooks/classes/gen_ledger.php';
require_once DIR_FS_MODULES . 'phreepos/classes/tills.php';
require_once DIR_FS_MODULES . 'phreepos/classes/other_transactions.php';
/**************   page specific initialization  *************************/
define('ORD_ACCT_ID', GEN_CUSTOMER_ID);
define('GL_TYPE', 'sos');
define('DEF_INV_GL_ACCT', AR_DEF_GL_SALES_ACCT);
define('DEF_GL_ACCT', AR_DEFAULT_GL_ACCT);
define('DEF_GL_ACCT_TITLE', ORD_AR_ACCOUNT);
define('POPUP_FORM_TYPE', 'pos:rcpt');
$error = false;
$account_type = 'c';
Пример #30
0
        $security_token = SECURITY_ID_SALES_ORDER;
        break;
    case 12:
        $security_token = SECURITY_ID_SALES_INVOICE;
        break;
    case 13:
        $security_token = SECURITY_ID_SALES_CREDIT;
        break;
    default:
        die('No valid journal id found (filename: modules/orders.php), Journal ID needs to be passed to this script to identify the action required.');
}
$security_level = validate_user($security_token);
/**************  include page specific files    *********************/
gen_pull_language('contacts');
gen_pull_language('inventory');
gen_pull_language('shipping');
require_once DIR_FS_WORKING . 'defaults.php';
require_once DIR_FS_MODULES . 'inventory/defaults.php';
require_once DIR_FS_WORKING . 'functions/phreebooks.php';
require_once DIR_FS_WORKING . 'classes/gen_ledger.php';
require_once DIR_FS_WORKING . 'classes/orders.php';
if (defined('MODULE_SHIPPING_STATUS')) {
    require_once DIR_FS_MODULES . 'shipping/functions/shipping.php';
    require_once DIR_FS_MODULES . 'shipping/defaults.php';
}
/**************   page specific initialization  *************************/
switch (JOURNAL_ID) {
    case 3:
        // Vendor Quote Journal
        define('ORD_ACCT_ID', GEN_VENDOR_ID);
        define('GL_TYPE', 'poo');