• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP gen_pull_language函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中gen_pull_language函数的典型用法代码示例。如果您正苦于以下问题:PHP gen_pull_language函数的具体用法?PHP gen_pull_language怎么用?PHP gen_pull_language使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了gen_pull_language函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: initialize

 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'));
 }
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:34,代码来源:install.php


示例2: __construct

 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);
 }
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:10,代码来源:inventory_fields.php


示例3: __construct

 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();
 }
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:13,代码来源:assets_fields.php


示例4: install

 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;
 }
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:16,代码来源:install.php


示例5: pf_process_phreebooks

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
}
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:20,代码来源:config_phreeform.php


示例6: foreach

     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;
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:31,代码来源:pre_process.php


示例7: validate_user

// +-----------------------------------------------------------------+
// | 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) {
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:31,代码来源:pre_process.php


示例8: validate_user

// +-----------------------------------------------------------------+
// | 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"';
开发者ID:TrinityComputers,项目名称:PhreeBooksERP,代码行数:31,代码来源:pre_process.php


示例9: define

// 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' => '');
    }
}
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:31,代码来源:config.php


示例10: define

// | 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;
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:31,代码来源:pre_process.php


示例11: gen_pull_language

// 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' => '');
    }
}
开发者ID:TrinityComputers,项目名称:PhreeBooksERP,代码行数:31,代码来源:config.php


示例12: validate_ajax_user

// | 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';
}
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:31,代码来源:tab_details.php


示例13: gen_pull_language

// +-----------------------------------------------------------------+
// | 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;
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:31,代码来源:income_statement_au.php


示例14: gen_terms_to_language

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'];
}
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:61,代码来源:common_functions.php


示例15: gen_pull_language

// +-----------------------------------------------------------------+
// | 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;
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:31,代码来源:payment.php


示例16: array

//********************************* 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))) {
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:31,代码来源:R21toR30.php


示例17: initialize

 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');
     }
 }
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:72,代码来源:install.php


示例18: xmlEntry

         $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>';
                 }
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:31,代码来源:phreedom.php


示例19: define

// | 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' => '');
    }
}
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:31,代码来源:config.php


示例20: gen_pull_language

//  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' => '');
    }
}
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:31,代码来源:config.php



注:本文中的gen_pull_language函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP gen_rand_string函数代码示例发布时间:2022-05-15
下一篇:
PHP gen_plus函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap